1
1
* 2876_cleanup:
  Update EN and RU man pages: add missing options.
  fixed doxygen documentation
  fixed doxygen.cfg, excluded directory /tests/ from doxygen path's
  removed obsolete params from edit_push_undo_action/edit_push_redo_action
  Ticket #2861: additional error handling in edit_save_block().
  (str_utf8_normalize): ret rid of extra memory allocation.
  Use g_strndup() instead of g_strdup()
  (get_absolute_name): missing finish NULL in vfs_path_append_vpath_new() call.
  (edit_do_undo): cleanup of labeled statement usage.
  Fix mouse event handling in menu that overlaps buttonbar.
  mcdiffview: code cleanup and cosmetics.
  Reorder checks in configure.ac.
  Cleanup of screen library detection m4 code.
  Refactoring of many conditions.
  (edit_do_search): refactoring of search loop condition.
  Avoid double checks of bookmarks in editor.
  Ticket #2876: code cleanup before 4.8.6 release.
Этот коммит содержится в:
Slava Zanko 2012-09-10 14:30:19 +03:00
родитель ded2b30443 cbdd38405a
Коммит 22595e3d6a
43 изменённых файлов: 1180 добавлений и 1298 удалений

Просмотреть файл

@ -2,267 +2,66 @@ dnl
dnl Configure.in file for the Midnight Commander
dnl
AC_INIT([GNU Midnight Commander], [], [mc-devel@gnome.org])
AC_PREREQ(2.60)
AC_INIT([GNU Midnight Commander], [], [mc-devel@gnome.org])
m4_pattern_forbid(MC_)
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(src/main.c)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR(src/main.c)
AC_CONFIG_HEADERS(config.h)
MC_VERSION
AM_INIT_AUTOMAKE(mc, ${VERSION} )
LIBMC_VERSION="0.0.1"
LIBMC_RELEASE="1"
AC_SUBST(LIBMC_VERSION)
AC_SUBST(LIBMC_RELEASE)
dnl Enable silent rules by default (if yes)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
AC_CANONICAL_HOST
AC_USE_SYSTEM_EXTENSIONS
AC_DEFINE_UNQUOTED([MC_CONFIGURE_ARGS],["$ac_configure_args"],[MC configure arguments])
AC_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG
AC_PATH_PROG([PERL], [perl], [/usr/bin/perl])
AC_ISC_POSIX
dnl ############################################################################
dnl Check for compiler
dnl ############################################################################
AC_PROG_CC_STDC
AM_PROG_CC_C_O
dnl Doxygen
MC_CHECK_CFLAGS
DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
DX_CHI_FEATURE(OFF)
DX_MAN_FEATURE(OFF)
DX_RTF_FEATURE(OFF)
DX_XML_FEATURE(OFF)
DX_PDF_FEATURE(OFF)
DX_PS_FEATURE(OFF)
DX_INIT_DOXYGEN(mc,doxygen.cfg,devel)
dnl PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
AC_CHECK_GLIB
AC_G_MODULE_SUPPORTED
AC_ARG_ENABLE([mclib],
[AS_HELP_STRING([--enable-mclib], [Compile shared library libmc.so @<:@no@:>@])],
[
if test "x$enableval" = "xno" ; then
enable_mclib=no
else
if test "x$enable_shared" = "xno" ; then
AC_MSG_WARN([Build of shared library is disabled. Specify --enable-shared first])
enable_mclib=no
else
enable_mclib=yes
fi
fi
],
[enable_mclib=no])
AM_CONDITIONAL([ENABLE_MCLIB], [test x$enable_mclib = xyes])
AC_HEADER_MAJOR
AC_C_CONST
dnl Check this before type sizeof checks
AC_SYS_LARGEFILE
AC_PROG_LN_S
AC_CHECK_TOOL(AR, ar, ar)
dnl Only list browsers here that can be run in background (i.e. with `&')
AC_CHECK_PROGS(X11_WWW, [gnome-moz-remote mozilla firefox konqueror opera])
dnl
dnl Ovverriding mmap support. This has to be before AC_FUNC_MMAP is used.
dnl We use only part of the functionality of mmap, so on AIX,
dnl it's possible to use mmap, even if it doesn't pass the autoconf test.
dnl
AC_ARG_WITH(mmap,
[ --with-mmap Use the mmap call [[yes if found]]])
if test x$with_mmap != xno; then
if test x$with_mmap = x; then
AC_FUNC_MMAP
else
AC_DEFINE(HAVE_MMAP, 1)
fi
CFLAGS_OPTS=""
if test "x$CFLAGS" = "x"; then
CFLAGS_OPTS=" -O2 "
fi
if test x$USE_MAINTAINER_MODE = xyes; then
CFLAGS_OPTS="-g3 -O -ggdb"
AC_DEFINE(USE_MAINTAINER_MODE, 1, [Use maintainer mode])
fi
dnl
dnl Internationalization
dnl
AM_GNU_GETTEXT(no-libtool, need-ngettext)
AM_GNU_GETTEXT_VERSION(0.14.3)
if test "x$USE_INCLUDED_LIBINTL" = xyes; then
CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/intl -I\$(top_srcdir)/intl"
AC_ARG_ENABLE([werror],
AS_HELP_STRING([--enable-werror], [Handle all compiler warnings as errors]))
if test "x$enable_werror" = xyes; then
MC_CHECK_ONE_CFLAG([-Werror])
fi
dnl Determine which help translations we want to install.
ALL_DOC_LINGUAS="es hu it pl ru sr"
AC_PROG_LIBTOOL
DOC_LINGUAS=
if test "x$USE_NLS" = xyes; then
if test -z "$LINGUAS"; then
langs="`grep -v '^#' $srcdir/po/LINGUAS`"
else
langs="$LINGUAS"
fi
else
langs=
fi
for h_lang in $ALL_DOC_LINGUAS; do
for lang in $langs; do
if test "$lang" = "$h_lang"; then
DOC_LINGUAS="$DOC_LINGUAS $lang"
break
fi
done
done
AC_SUBST(DOC_LINGUAS)
dnl
dnl OS specific flags.
dnl
case $host_os in
aux*)
# A/UX
LIBS="$LIBS -lposix"
AC_DEFINE(_POSIX_SOURCE)
;;
esac
dnl ############################################################################
dnl Check for programs
dnl ############################################################################
PKG_PROG_PKG_CONFIG
AC_PROG_INSTALL
AC_CHECK_HEADERS([unistd.h string.h memory.h limits.h malloc.h \
utime.h fcntl.h sys/statfs.h sys/vfs.h sys/time.h \
sys/select.h sys/ioctl.h stropts.h arpa/inet.h \
sys/socket.h sys/sysmacros.h sys/types.h sys/mkdev.h])
AC_PROG_LN_S
AC_PATH_PROG([PERL], [perl], [/usr/bin/perl])
AC_HEADER_TIME
AC_HEADER_DIRENT
AC_HEADER_ASSERT
dnl Missing structure components
AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_rdev])
AC_STRUCT_ST_BLOCKS
dnl
dnl Check availability of some functions
dnl
AC_CHECK_FUNCS([\
atoll \
isascii \
statfs sysconf \
tcgetattr tcsetattr \
ftruncate \
strverscmp \
strncasecmp \
realpath
])
dnl
dnl getpt is a GNU Extension (glibc 2.1.x)
dnl
AC_CHECK_FUNCS(posix_openpt, , [AC_CHECK_FUNCS(getpt)])
AC_CHECK_FUNCS(grantpt, , [AC_CHECK_LIB(pt, grantpt)])
dnl replacing lstat with statlstat on sco makes it more portable between
dnl sco clones
AC_CHECK_FUNCS(statlstat)
dnl
dnl If running under AIX, AC_AIX does not tell us that
dnl
AC_MSG_CHECKING([for AIX defines])
AC_EGREP_CPP(yes,
[#if defined(AIX) || defined(_AIX) || defined(__aix__) || defined(aix)
yes
#endif
], [
AC_DEFINE(IS_AIX, 1, [Define if compiling for AIX])
AC_MSG_RESULT(yes)
], [AC_MSG_RESULT(no)])
dnl
dnl Missing typedefs and replacements
dnl
AC_CHECK_SIZEOF(long)
AC_TYPE_UINTMAX_T
AC_CHECK_SIZEOF(uintmax_t)
AC_TYPE_OFF_T
AC_CHECK_SIZEOF(off_t)
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_TYPE_UID_T
AC_FUNC_STRCOLL
mc_AC_GET_FS_INFO
dnl X11 support.
dnl Used to read keyboard modifiers when running under X11.
MC_WITH_X
dnl
dnl Sequent wants getprocessstats
dnl
AC_CHECK_LIB(seq, get_process_stats, [
LIBS="$LIBS -lseq"
AC_DEFINE(HAVE_GET_PROCESS_STATS, 1,
[Define if you have function `get_process_stats' and
have to use that instead of gettimeofday])])
AC_MC_VFS_CHECKS
dnl
dnl Check for gpm mouse support (Linux only)
dnl
mouse_lib="xterm only"
AC_ARG_WITH(gpm-mouse,
[ --with-gpm-mouse Compile with gpm mouse support (Linux only)
[[yes if found]]])
case $host_os in
linux*)
if test x$with_gpm_mouse != xno; then
AC_CHECK_LIB(gpm, Gpm_Repeat,
[AC_DEFINE(HAVE_LIBGPM, 1,
[Define to enable gpm mouse support on Linux])
mouse_lib="gpm and xterm"
MCLIBS="$MCLIBS -lgpm"],
if test "x$with_gpm_mouse" = "xyes"; then
[AC_MSG_ERROR([libgpm is missing or older than 0.18])]
else
[AC_MSG_WARN([libgpm is missing or older than 0.18])]
fi
)
fi
;;
esac
MC_CHECK_SEARCH_TYPE
dnl
dnl Check nroff and the options it supports
dnl
AC_CHECK_PROG(HAVE_nroff, nroff, true, false)
dnl Default values
MANDOC=-man
MAN_FLAGS=
if $HAVE_nroff; then
AC_MSG_CHECKING([for manual formatting macros])
AC_CACHE_VAL(mc_cv_mandoc, [
@ -308,10 +107,7 @@ fi
AC_SUBST(MANDOC)
AC_SUBST(MAN_FLAGS)
dnl
dnl Check for -L option to file
dnl
AC_CHECK_PROG(HAVE_FILECMD, file, true, false)
if $HAVE_FILECMD; then
AC_MSG_CHECKING([for -L option to file command])
@ -330,6 +126,267 @@ if $HAVE_FILECMD; then
AC_MSG_RESULT([$filel])
fi
dnl Only list browsers here that can be run in background (i.e. with `&')
AC_CHECK_PROGS(X11_WWW, [gnome-moz-remote mozilla firefox konqueror opera])
dnl ############################################################################
dnl Check for other tools
dnl ############################################################################
AC_CHECK_TOOL(AR, ar, ar)
MC_UNIT_TESTS
dnl ############################################################################
dnl Check for main libraies
dnl ############################################################################
AC_CHECK_GLIB
AC_G_MODULE_SUPPORTED
MC_WITH_SCREEN
MC_CHECK_SEARCH_TYPE
dnl X11 support. Used to read keyboard modifiers when running under X11.
MC_WITH_X
dnl ############################################################################
dnl Check for header files
dnl ############################################################################
AC_CHECK_HEADERS([unistd.h string.h memory.h limits.h malloc.h \
utime.h fcntl.h sys/statfs.h sys/vfs.h sys/time.h \
sys/select.h sys/ioctl.h stropts.h arpa/inet.h \
sys/socket.h sys/sysmacros.h sys/types.h sys/mkdev.h])
AC_HEADER_MAJOR
AC_HEADER_TIME
AC_HEADER_DIRENT
AC_HEADER_ASSERT
dnl ############################################################################
dnl Check for types
dnl ############################################################################
AC_C_CONST
dnl Check largefile before type sizeof checks
AC_SYS_LARGEFILE
AC_CHECK_SIZEOF(long)
AC_TYPE_UINTMAX_T
AC_CHECK_SIZEOF(uintmax_t)
AC_TYPE_OFF_T
AC_CHECK_SIZEOF(off_t)
AC_TYPE_MODE_T
AC_TYPE_PID_T
AC_TYPE_UID_T
AC_STRUCT_ST_BLOCKS
AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_rdev])
dnl ############################################################################
dnl Check for functions
dnl ############################################################################
AC_CHECK_FUNCS([\
atoll \
isascii \
statfs sysconf \
tcgetattr tcsetattr \
ftruncate \
strverscmp \
strncasecmp \
realpath
])
AC_FUNC_STRCOLL
dnl getpt is a GNU Extension (glibc 2.1.x)
AC_CHECK_FUNCS(posix_openpt, , [AC_CHECK_FUNCS(getpt)])
AC_CHECK_FUNCS(grantpt, , [AC_CHECK_LIB(pt, grantpt)])
dnl replacing lstat with statlstat on sco makes it more portable between
dnl sco clones
AC_CHECK_FUNCS(statlstat)
dnl Ovverriding mmap support. This has to be before AC_FUNC_MMAP is used.
dnl We use only part of the functionality of mmap, so on AIX,
dnl it's possible to use mmap, even if it doesn't pass the autoconf test.
AC_ARG_WITH([mmap],
AS_HELP_STRING([--with-mmap], [Use the mmap call @<:@yes if found@:>@]))
if test x$with_mmap != xno; then
if test x$with_mmap = x; then
AC_FUNC_MMAP
else
AC_DEFINE(HAVE_MMAP, 1)
fi
fi
dnl Sequent wants getprocessstats
AC_CHECK_LIB(seq, get_process_stats, [
LIBS="$LIBS -lseq"
AC_DEFINE(HAVE_GET_PROCESS_STATS, 1,
[Define if you have function `get_process_stats' and
have to use that instead of gettimeofday])])
mc_AC_GET_FS_INFO
dnl ############################################################################
dnl Internationalization
dnl ############################################################################
AM_GNU_GETTEXT(no-libtool, need-ngettext)
AM_GNU_GETTEXT_VERSION(0.14.3)
if test "x$USE_INCLUDED_LIBINTL" = xyes; then
CPPFLAGS="$CPPFLAGS -I\$(top_builddir)/intl -I\$(top_srcdir)/intl"
fi
dnl User visible support for charset conversion.
AC_ARG_ENABLE([charset],
AS_HELP_STRING([--enable-charset], [Support for charset selection and conversion @<:@yes@:>@]))
have_charset=
charset_msg="no"
if test "x$enable_charset" != "xno"; then
AC_DEFINE(HAVE_CHARSET, 1, [Define to enable charset selection and conversion])
have_charset=yes
charset_msg="yes"
fi
dnl ############################################################################
dnl OS specific flags
dnl ############################################################################
AC_ISC_POSIX
case $host_os in
aux*)
# A/UX
LIBS="$LIBS -lposix"
AC_DEFINE(_POSIX_SOURCE)
;;
esac
dnl If running under AIX, AC_AIX does not tell us that
AC_MSG_CHECKING([for AIX defines])
AC_EGREP_CPP([yes],
[
#if defined(AIX) || defined(_AIX) || defined(__aix__) || defined(aix)
yes
#endif
],
[
AC_DEFINE(IS_AIX, 1, [Define if compiling for AIX])
AC_MSG_RESULT(yes)
],
[
AC_MSG_RESULT(no)
])
dnl Check if the OS is supported by the console saver.
cons_saver=""
case $host_os in
linux*)
cons_saver=yes
esac
dnl Check for gpm mouse support (Linux only)
mouse_lib="xterm only"
AC_ARG_WITH([gpm-mouse],
AS_HELP_STRING([--with-gpm-mouse], [Compile with gpm mouse support (Linux only) @<:@yes if found@:>@]))
case $host_os in
linux*)
if test x$with_gpm_mouse != xno; then
AC_CHECK_LIB(gpm, Gpm_Repeat,
[AC_DEFINE(HAVE_LIBGPM, 1,
[Define to enable gpm mouse support on Linux])
mouse_lib="gpm and xterm"
MCLIBS="$MCLIBS -lgpm"],
if test "x$with_gpm_mouse" = "xyes"; then
[AC_MSG_ERROR([libgpm is missing or older than 0.18])]
else
[AC_MSG_WARN([libgpm is missing or older than 0.18])]
fi
)
fi
;;
esac
dnl ############################################################################
dnl libmc
dnl ############################################################################
LIBMC_VERSION="0.0.1"
LIBMC_RELEASE="1"
AC_SUBST(LIBMC_VERSION)
AC_SUBST(LIBMC_RELEASE)
AC_ARG_ENABLE([mclib],
[AS_HELP_STRING([--enable-mclib], [Compile shared library libmc.so @<:@no@:>@])],
[
if test "x$enableval" = "xno" ; then
enable_mclib=no
else
if test "x$enable_shared" = "xno" ; then
AC_MSG_WARN([Build of shared library is disabled. Specify --enable-shared first])
enable_mclib=no
else
enable_mclib=yes
fi
fi
],
[enable_mclib=no])
AM_CONDITIONAL([ENABLE_MCLIB], [test x$enable_mclib = xyes])
dnl ############################################################################
dnl Where config files should be placed
dnl ############################################################################
AC_ARG_WITH([homedir],
AS_HELP_STRING([--with-homedir],
[Choose any place of user settings relative to home dir, or XDG for respect XDG standards @<:@XDG@:>@]),
[
if test "x$withval" = "xXDG"; then
with_homedir=XDG
else
with_homedir=$withval
fi
],
[with_homedir=XDG])
if test x$with_homedir = xXDG; then
AC_DEFINE(MC_HOMEDIR_XDG, 1,
[Define to enable XDG standard support])
else
AC_DEFINE_UNQUOTED([MC_USERCONF_DIR], ["$with_homedir"], [Where configs will be placed relative to $HOME])
fi
dnl ############################################################################
dnl MC options
dnl ############################################################################
MC_WITH_EDIT
dnl Diff viewer support.
AC_ARG_WITH([diff_viewer],
AS_HELP_STRING([--with-diff-viewer], [Compile with diff viewer @<:@yes@:>@]))
if test x$with_diff_viewer != xno; then
AC_DEFINE(USE_DIFF_VIEW, 1, [Define to enable diff viewer])
use_diff=yes
diff_msg="yes"
AC_MSG_NOTICE([using diff viewer])
else
diff_msg="no"
fi
AC_MSG_CHECKING([for subshell support])
AC_ARG_WITH(subshell,
@ -356,111 +413,14 @@ fi
AC_MSG_RESULT([$result])
subshell="$result"
MC_WITH_SCREEN
MC_WITH_EDIT
dnl
dnl Diff viewer support.
dnl
AC_ARG_WITH(diff_viewer,
[ --with-diff-viewer Compile with diff viewer [[yes]]])
if test x$with_diff_viewer != xno; then
AC_DEFINE(USE_DIFF_VIEW, 1, [Define to enable diff viewer])
use_diff=yes
diff_msg="yes"
AC_MSG_NOTICE([using diff viewer])
else
diff_msg="no"
fi
dnl Check if the OS is supported by the console saver.
cons_saver=""
case $host_os in
linux*)
cons_saver=yes
esac
dnl
dnl Where config files should be placed
dnl
AC_ARG_WITH([homedir],
AS_HELP_STRING([--with-homedir], [Choose any place of user settings relative to home dir, or XDG for respect XDG standards @<:@XDG@:>@]),
[
if test "x$withval" = "xXDG"; then
with_homedir=XDG
else
with_homedir=$withval
fi
],
[with_homedir=XDG])
if test x$with_homedir = xXDG; then
AC_DEFINE(MC_HOMEDIR_XDG, 1,
[Define to enable XDG standard support])
else
AC_DEFINE_UNQUOTED([MC_USERCONF_DIR], ["$with_homedir"], [Where configs will be placed relative to $HOME])
fi
MC_BACKGROUND
AC_MC_VFS_CHECKS
dnl
dnl User visible support for charset conversion.
dnl
AC_ARG_ENABLE([charset],
[ --enable-charset Support for charset selection and conversion [[yes]]])
have_charset=
charset_msg="no"
if test "x$enable_charset" != "xno"; then
AC_DEFINE(HAVE_CHARSET, 1,
[Define to enable charset selection and conversion])
have_charset=yes
charset_msg="yes"
fi
if test "$GLIBC21" != yes; then
AC_DEFINE(USE_INCLUDED_REGEX, 1, [Use the regex included here])
fi
MC_CHECK_CFLAGS
CFLAGS_OPTS=""
if test "x$CFLAGS" = "x"; then
CFLAGS_OPTS=" -O2 "
fi
if test x$USE_MAINTAINER_MODE = xyes; then
CFLAGS_OPTS="-g3 -O -ggdb"
AC_DEFINE(USE_MAINTAINER_MODE, 1, [Use maintainer mode])
fi
AC_ARG_ENABLE(
[werror],
AS_HELP_STRING([--enable-werror], [Handle all compiler warnings as errors])
)
if test "x$enable_werror" = xyes; then
MC_CHECK_ONE_CFLAG([-Werror])
fi
CFLAGS="$mc_configured_cflags $CFLAGS_OPTS $CFLAGS"
MC_UNIT_TESTS
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
dnl Libraries used only when building the mc binary
AC_SUBST(MCLIBS)
dnl ############################################################################
dnl Directories
dnl ############################################################################
dnl ${prefix} and ${exec_prefix} are undefined here if --prefix is not used in command line
dnl Let define ${prefix} and ${exec_prefix}
@ -474,9 +434,61 @@ else
fi
AC_SUBST(EXTHELPERSDIR)
dnl ############################################################################
dnl Documentation
dnl ############################################################################
MAN_DATE="$(LC_ALL=C date "+%B %Y")"
AC_SUBST(MAN_DATE)
dnl Determine which help translations we want to install.
ALL_DOC_LINGUAS="es hu it pl ru sr"
DOC_LINGUAS=
if test "x$USE_NLS" = xyes; then
if test -z "$LINGUAS"; then
langs="`grep -v '^#' $srcdir/po/LINGUAS`"
else
langs="$LINGUAS"
fi
else
langs=
fi
for h_lang in $ALL_DOC_LINGUAS; do
for lang in $langs; do
if test "$lang" = "$h_lang"; then
DOC_LINGUAS="$DOC_LINGUAS $lang"
break
fi
done
done
AC_SUBST(DOC_LINGUAS)
DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
DX_CHI_FEATURE(OFF)
DX_MAN_FEATURE(OFF)
DX_RTF_FEATURE(OFF)
DX_XML_FEATURE(OFF)
DX_PDF_FEATURE(OFF)
DX_PS_FEATURE(OFF)
DX_INIT_DOXYGEN(mc,doxygen.cfg,devel)
dnl ############################################################################
dnl Configure results
dnl ############################################################################
CFLAGS="$mc_configured_cflags $CFLAGS_OPTS $CFLAGS"
AC_SUBST(MCLIBS)
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LIBS)
AM_CONDITIONAL(USE_NLS, [test x"$USE_NLS" = xyes])
AM_CONDITIONAL(USE_MAINTAINER_MODE, [test x"$USE_MAINTAINER_MODE" = xyes])
AM_CONDITIONAL(USE_SCREEN_SLANG, [test x"$with_screen" = xslang])
@ -486,6 +498,8 @@ AM_CONDITIONAL(USE_DIFF, [test -n "$use_diff"])
AM_CONDITIONAL(CHARSET, [test -n "$have_charset"])
AM_CONDITIONAL(CONS_SAVER, [test -n "$cons_saver"])
AC_DEFINE_UNQUOTED([MC_CONFIGURE_ARGS], ["$ac_configure_args"], [MC configure arguments])
AC_CONFIG_FILES(
[
src/man2hlp/man2hlp
@ -621,7 +635,6 @@ tests/lib/vfs/Makefile
tests/src/Makefile
tests/src/filemanager/Makefile
])
fi

Просмотреть файл

@ -91,7 +91,7 @@ FILE_PATTERNS = *.c \
RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = */intl/*
EXCLUDE_PATTERNS = */intl/* */tests/* */.git/*
EXCLUDE_SYMBOLS =
EXAMPLE_PATH = $(SRCDIR)
EXAMPLE_PATTERNS =
@ -242,7 +242,7 @@ DIRECTORY_GRAPH = YES
DOT_IMAGE_FORMAT = png
DOT_PATH = $(DOT_PATH)
DOTFILE_DIRS =
DOT_GRAPH_MAX_NODES = 50
DOT_GRAPH_MAX_NODES = 550
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO

Просмотреть файл

@ -36,11 +36,11 @@ Colors
.\"Colors"
section.
.TP
.I \-S arg
.I \-S arg, \-\-skin=arg
Specify a name of skin in the command line. Technology of skins is
documented in the
.\"LINK2"
Skins\&.
Skins
.\"Skins"
section.
.TP
@ -75,6 +75,9 @@ Don't load key bindings from any file, use default hardcoded keys.
.I \-l file, \-\-ftplog=file
Save the ftpfs dialog with the server in file.
.TP
.I \-D N, \-\-debuglevel=N
Save the debug level for SMB VFS. N is in 0\-10 range.
.TP
.I \-P file, \-\-printwd=file
Print the last working directory to the specified file. This option is
not meant to be used directly. Instead, it's used from a special shell
@ -87,7 +90,7 @@ the last directory the Midnight Commander was in. Source the file
.B mc
as an alias to the appropriate shell script.
.TP
.I \-s
.I \-s, \-\-slow
Set alternative mode drawing of frameworks.
If the section [Lines] is not filled, the symbol for the pseudographics
frame is a space, otherwise the frame characters are taken from follow params.

Просмотреть файл

@ -20,43 +20,35 @@ UNIX\-подобных операционных системах.
.SH "КЛЮЧИ"
Ключи запуска программы Midnight Commander
.TP
.I \-a
.I \-a, \-\-stickchars
Отключить использование графических символов для рисования линий.
.TP
.I \-b
.I \-b, \-\-nocolor
Запуск программы в черно\-белом режиме экрана.
.TP
.I \-c
.I \-c, \-\-color
Включает цветной режим дисплея. Для получения более подробной информации
смотрите раздел
.\"LINK2"
Цвета\&.
.\"Colors"
.TP
.I \-C arg
.I \-C arg, \-\-colors=arg
Используется для того, чтобы задать другой набор цветов в командной
строке. Формат аргумента arg описан в разделе
.\"LINK2"
Цвета\&.
.\"Colors"
.TP
.I \-S arg
.I \-S arg, \-\-skin
Используется для того, чтобы задать другой скин в командной
строке. Технология скинов описана в разделе
.\"LINK2"
Внешний вид\&.
.\"Skins"
.TP
.I \-d
.I \-d, \-\-nomouse
Отключает поддержку мыши.
.TP
.I \-D N
Используется только если код был скомпилирован с поддержкой
.\"LINK2"
виртуальной файловой системы smbfs
.\"SMB File System"
для установки уровня отладочных сообщений smbfs в N (0\-10).
.TP
.I \-e [файл]
Запустить встроенный редактор. Если параметр "файл" задан, этот файл
будет открыт при запуске. Смотрите также
@ -73,7 +65,7 @@ UNIX\-подобных операционных системах.
.I \-\-configure\-options
Выводит опции конфигурирования, с которыми был собран Midnight Commander.
.TP
.I \-k
.I \-k, \-\-resetsoft
Восстанавливает значения команд, назначенных функциональным клавишам в
предусмотренные по умолчанию значения, используя базу данных
termcap/terminfo. Этот ключ используется только на терминалах HP, где
@ -87,11 +79,19 @@ termcap/terminfo. Этот ключ используется только на
Не загружать клавиатурные комбинации из файла, использовать определённые
в исходном коде.
.TP
.I \-l файл
.I \-l файл, \-\-ftplog=файл
Сохранить диалог с ftp\-сервером, а также отладочную информацию smbfs в
файл file.
.TP
.I \-P файл
.I \-D N, --debuglevel=N
Используется только если код был скомпилирован с поддержкой
.\"LINK2"
виртуальной файловой системы smbfs
.\"SMB File System"
для установки уровня отладочных сообщений smbfs в N (0\-10).
.TP
.TP
.I \-P файл, \-\-printwd=файл
По окончании работы Midnight Commander запишет последний текущий каталог
в указанный файл. Эту опцию не следует использовать напрямую. Она
используется специальной функцией оболочки, которая меняет текущий
@ -103,25 +103,25 @@ Commander.
для оболочек bash и zsh, а для оболочки tcsh соответственно файл
.B %prefix%/share/mc/bin/mc.csh
.TP
.I \-s
.I \-s, \-\-slow
Включает медленный режим терминала, в котором программа выводит меньше
псевдографических символов (в том числе в меню и экранах помощи) и
отключается вывод дополнительных (избыточных) сообщений.
.TP
.I \-t
Используется только в том случае, когда код был скомпилирован со Slang и
.I \-t, \-\-termcap
Используется только в том случае, когда код был скомпилирован с S-Lang и
terminfo: в этом случае Midnight Commander использует значение
переменной
.B TERMCAP
для получения информации о терминале вместо использования системной базы
терминалов.
.TP
.I \-u
.I \-u, \-\-nosubshell
Отключает использование альтернативных оболочек shell (имеет смысл
только в том случае, когда Midnight Commander был скомпилирован с
поддержкой альтернативной оболочки).
.TP
.I \-U
.I \-U, \-\-subshell
Делает возможным использование subshell (имеет смысл только в том
случае, когда Midnight Commander был скомпилирован с поддержкой subshell
как опции).
@ -131,10 +131,10 @@ terminfo: в этом случае Midnight Commander использует зн
просмотра указанного файла. После выхода из режима просмотра вы выходите
из Midnight Commander и оказываетесь в shell.
.TP
.I \-V
.I \-V, \-\-version
Отображает версию программы.
.TP
.I \-x
.I \-x, --xterm
Запускает программу в режиме xterm. Используется только на терминалах,
работающих в режиме xterm (два режима работы экрана и возможность
формировать экранирующие последовательности с помощью мыши) (two screen

Просмотреть файл

@ -1,4 +1,4 @@
/** \file util.h
/** \file lib/hook.h
* \brief Header: hooks
*/

Просмотреть файл

@ -23,7 +23,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \file serialize.c
/** \file lib/serialize.c
* \brief Source: serialize/unserialize functionality for INI-like formats.
*/

Просмотреть файл

@ -527,9 +527,15 @@ int str_verscmp (const char *s1, const char *s2);
void str_msg_term_size (const char *text, int *lines, int *columns);
/**
skip first <skip_count> needle's in haystack and returns pointer to
<skip_count+1> needle (or NULL if not found).
* skip first needle's in haystack
*
* @param haystack pointer to string
* @param needle pointer to string
* @param skip_count skip first bytes
*
* @returns pointer to skip_count+1 needle (or NULL if not found).
*/
char *strrstr_skip_count (const char *haystack, const char *needle, size_t skip_count);
/*** inline functions ****************************************************************************/
@ -554,7 +560,14 @@ str_replace (char *s, char from, char to)
*
* We can't use str*cpy funs here:
* http://kerneltrap.org/mailarchive/openbsd-misc/2008/5/27/1951294
*
* @param dest pointer to string
* @param src pointer to string
*
* @returns a newly allocated string
*
*/
static inline char *
str_move (char *dest, const char *src)
{

Просмотреть файл

@ -160,16 +160,15 @@ strutils_unescape (const char *src, gsize src_len, const char *unescaped_chars,
/* --------------------------------------------------------------------------------------------- */
/** To be compatible with the general posix command lines we have to escape
strings for the command line
\param src
string for escaping
\returns
return escaped string (which needs to be freed later)
or NULL when NULL string is passed.
/**
* To be compatible with the general posix command lines we have to escape
* strings for the command line
*
* @param src string for escaping
*
* @returns escaped string (which needs to be freed later) or NULL when NULL string is passed.
*/
char *
strutils_shell_escape (const char *src)
{
@ -194,15 +193,15 @@ strutils_regex_escape (const char *src)
/* --------------------------------------------------------------------------------------------- */
/** Unescape paths or other strings for e.g the internal cd
shell-unescape within a given buffer (writing to it!)
\param text
string for unescaping
\returns
return unescaped string (which needs to be freed)
/**
* Unescape paths or other strings for e.g the internal cd
* shell-unescape within a given buffer (writing to it!)
*
* @param text string for unescaping
*
* @returns unescaped string (which needs to be freed)
*/
char *
strutils_shell_unescape (const char *text)
{
@ -226,18 +225,15 @@ strutils_regex_unescape (const char *text)
/* --------------------------------------------------------------------------------------------- */
/** Check if char in pointer contain escape'd chars
\param start
string for checking
\param current
pointer to checked character
\returns
return TRUE if string contain escaped chars
otherwise return FALSE
/**
* Check if char in pointer contain escape'd chars
*
* @param start string for checking
* @param current pointer to checked character
*
* @returns TRUE if string contain escaped chars otherwise return FALSE
*/
gboolean
strutils_is_char_escaped (const char *start, const char *current)
{

Просмотреть файл

@ -984,12 +984,14 @@ str_utf8_search_last (const char *text, const char *search, int case_sen)
static char *
str_utf8_normalize (const char *text)
{
GString *fixed = g_string_new ("");
GString *fixed;
char *tmp;
char *result;
const char *start;
const char *end;
fixed = g_string_sized_new (4);
start = text;
while (!g_utf8_validate (start, -1, &end) && start[0] != '\0')
{
@ -1006,6 +1008,7 @@ str_utf8_normalize (const char *text)
if (start == text)
{
result = g_utf8_normalize (text, -1, G_NORMALIZE_ALL);
g_string_free (fixed, TRUE);
}
else
{
@ -1015,9 +1018,8 @@ str_utf8_normalize (const char *text)
g_string_append (fixed, tmp);
g_free (tmp);
}
result = g_strdup (fixed->str);
result = g_string_free (fixed, FALSE);
}
g_string_free (fixed, TRUE);
return result;
}
@ -1025,12 +1027,14 @@ str_utf8_normalize (const char *text)
static char *
str_utf8_casefold_normalize (const char *text)
{
GString *fixed = g_string_new ("");
GString *fixed;
char *tmp, *fold;
char *result;
const char *start;
const char *end;
fixed = g_string_sized_new (4);
start = text;
while (!g_utf8_validate (start, -1, &end) && start[0] != '\0')
{
@ -1051,6 +1055,7 @@ str_utf8_casefold_normalize (const char *text)
fold = g_utf8_casefold (text, -1);
result = g_utf8_normalize (fold, -1, G_NORMALIZE_ALL);
g_free (fold);
g_string_free (fixed, TRUE);
}
else
{
@ -1062,9 +1067,8 @@ str_utf8_casefold_normalize (const char *text)
g_free (tmp);
g_free (fold);
}
result = g_strdup (fixed->str);
result = g_string_free (fixed, FALSE);
}
g_string_free (fixed, TRUE);
return result;
}

Просмотреть файл

@ -31,7 +31,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \file
/** \file lib/util.c
* \brief Source: various utilities
*/
@ -915,6 +915,9 @@ wipe_password (char *passwd)
/* --------------------------------------------------------------------------------------------- */
/**
* Convert "\E" -> esc character and ^x to control-x key and ^^ to ^ key
*
* @param p pointer to string
*
* @returns a newly allocated string
*/

Просмотреть файл

@ -1,4 +1,4 @@
/** \file util.h
/** \file lib/util.h
* \brief Header: various utilities
*/

Просмотреть файл

@ -280,9 +280,13 @@ my_system (int flags, const char *shell, const char *command)
/* --------------------------------------------------------------------------------------------- */
/**
* Perform tilde expansion if possible.
* Always return a newly allocated string, even if it's unchanged.
*
* @param directory pointer to the path
*
* @returns a newly allocated string, even if it's unchanged.
*/
char *
@ -376,9 +380,12 @@ open_error_pipe (void)
/* --------------------------------------------------------------------------------------------- */
/**
* Returns true if an error was displayed
* error: -1 - ignore errors, 0 - display warning, 1 - display error
* text is prepended to the error message from the pipe
* Close a pipe
*
* @param error '-1' - ignore errors, '0' - display warning, '1' - display error
* @param text is prepended to the error message from the pipe
*
* @returns not 0 if an error was displayed
*/
int

Просмотреть файл

@ -597,15 +597,6 @@ vfs_path_strip_home (const char *dir)
/* --------------------------------------------------------------------------------------------- */
/*** public functions ****************************************************************************/
/* --------------------------------------------------------------------------------------------- */
/**
* Convert first elements_count elements from vfs_path_t to string representation with flags.
*
* @param vpath pointer to vfs_path_t object
* @param elements_count count of first elements for convert
* @param flags flags for converter
*
* @return pointer to newly created string.
*/
#define vfs_append_from_path(appendfrom, is_relative) \
{ \
@ -625,6 +616,16 @@ vfs_path_strip_home (const char *dir)
} \
}
/**
* Convert first elements_count elements from vfs_path_t to string representation with flags.
*
* @param vpath pointer to vfs_path_t object
* @param elements_count count of first elements for convert
* @param flags for converter
*
* @return pointer to newly created string.
*/
char *
vfs_path_to_str_flags (const vfs_path_t * vpath, int elements_count, vfs_path_flag_t flags)
{
@ -1031,6 +1032,9 @@ vfs_prefix_to_class (const char *prefix)
}
/* --------------------------------------------------------------------------------------------- */
#ifdef HAVE_CHARSET
/**
* Check if need cleanup charset converter for vfs_path_element_t
*
@ -1038,7 +1042,7 @@ vfs_prefix_to_class (const char *prefix)
*
* @return TRUE if need cleanup converter or FALSE otherwise
*/
#ifdef HAVE_CHARSET
gboolean
vfs_path_element_need_cleanup_converter (const vfs_path_element_t * element)
{
@ -1047,13 +1051,14 @@ vfs_path_element_need_cleanup_converter (const vfs_path_element_t * element)
#endif
/* --------------------------------------------------------------------------------------------- */
/**
* Serialize vfs_path_t object to string
*
* @param vpath data for serialization
* @param error contain pointer to object for handle error code and message
*
* @return serialized vpath as newly allocated string
* @returns serialized vpath as newly allocated string
*/
char *
@ -1189,6 +1194,7 @@ vfs_path_deserialize (const char *data, GError ** error)
/**
* Build vfs_path_t object from arguments.
*
* @param first_element of path
* @param ... path tokens, terminated by NULL
*
* @return newly allocated vfs_path_t object
@ -1217,6 +1223,7 @@ vfs_path_build_filename (const char *first_element, ...)
* Append tokens to path object
*
* @param vpath path object
* @param first_element of path
* @param ... NULL-terminated strings
*
* @return newly allocated path object
@ -1250,6 +1257,7 @@ vfs_path_append_new (const vfs_path_t * vpath, const char *first_element, ...)
/**
* Append vpath_t tokens to path object
*
* @param first_vpath vpath objects
* @param ... NULL-terminated vpath objects
*
* @return newly allocated path object
@ -1288,6 +1296,7 @@ vfs_path_append_vpath_new (const vfs_path_t * first_vpath, ...)
}
/* --------------------------------------------------------------------------------------------- */
/**
* get tockens count in path.
*
@ -1325,6 +1334,7 @@ vfs_path_tokens_count (const vfs_path_t * vpath)
}
/* --------------------------------------------------------------------------------------------- */
/**
* Get subpath by tokens
*
@ -1435,12 +1445,14 @@ vfs_path_vtokens_get (const vfs_path_t * vpath, ssize_t start_position, ssize_t
}
/* --------------------------------------------------------------------------------------------- */
/**
* Build URL parameters (such as user:pass@host:port) from one path element object
* Build URL parameters (such as user:pass @ host:port) from one path element object
*
* @param element path element
* @param keep_password TRUE or FALSE
*
* @return newly allocated string
* @returns newly allocated string
*/
char *

Просмотреть файл

@ -622,13 +622,14 @@ vfs_change_encoding (vfs_path_t * vpath, const char *encoding)
* Preallocate space for file in new place for ensure that file
* will be fully copied with less fragmentation.
*
* @param dest_desc mc VFS file handler
* @param dest_vfs_fd mc VFS file handler
* @param src_fsize source file size
* @param dest_fsize destination file size (if destination exists, otherwise should be 0)
*
* @return 0 if success and non-zero otherwise.
* @returns 0 if success and non-zero otherwise.
* Note: function doesn't touch errno global variable.
*/
int
vfs_preallocate (int dest_vfs_fd, off_t src_fsize, off_t dest_fsize)
{

Просмотреть файл

@ -210,7 +210,7 @@ history_load (struct mc_config_t * cfg, const char *name)
hist = list_append_unique (hist, this_entry);
else
{
hist = list_append_unique (hist, g_strdup (buffer->str));
hist = list_append_unique (hist, g_strndup (buffer->str, buffer->len));
g_free (this_entry);
}
}

Просмотреть файл

@ -1,5 +1,5 @@
/** \file history.h
/** \file lib/widget/history.h
* \brief Header: save, load and show history
*/

Просмотреть файл

@ -209,7 +209,8 @@ do_show_hist (WInput * in)
}
/* --------------------------------------------------------------------------------------------- */
/** Strip password from incomplete url (just user:pass@host without VFS prefix).
/**
* Strip password from incomplete url (just user:pass@host without VFS prefix).
*
* @param url partial URL
* @return newly allocated string without password

Просмотреть файл

@ -25,7 +25,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \file complete.c
/** \file lib/widget/input_complete.c
* \brief Source: Input line filename/username/hostname/variable/command completion
*/

Просмотреть файл

@ -9,7 +9,7 @@ dnl @copyright Free Software Foundation, Inc.
AC_DEFUN([MC_CHECK_ONE_CFLAG],[
AC_MSG_CHECKING([if gcc accepts $1])
AC_MSG_CHECKING([whether gcc accepts $1])
safe_CFLAGS=$CFLAGS
CFLAGS="$1"

Просмотреть файл

@ -48,7 +48,7 @@ AC_DEFUN([MC_CHECK_NCURSES_BY_PATH], [
if test x"$found_ncurses" = x"yes"; then
screen_type=ncurses
screen_msg="ncurses library (installed on the system)"
screen_msg="Ncurses library"
AC_DEFINE(HAVE_NCURSES, 1,
[Define to use ncurses library for screen management])
@ -100,7 +100,7 @@ AC_DEFUN([MC_WITH_NCURSES], [
[AC_MSG_ERROR([Cannot find ncurses library])])
screen_type=ncurses
screen_msg="ncurses library"
screen_msg="Ncurses library"
AC_DEFINE(USE_NCURSES, 1,
[Define to use ncurses for screen management])
else
@ -124,7 +124,7 @@ AC_DEFUN([MC_WITH_NCURSES], [
fi
screen_type=ncurses
screen_msg="ncurses library"
screen_msg="Ncurses library"
AC_DEFINE(USE_NCURSES, 1,
[Define to use ncurses for screen management])
fi
@ -174,7 +174,7 @@ AC_DEFUN([MC_WITH_NCURSESW], [
fi
screen_type=ncursesw
screen_msg="ncursesw library"
screen_msg="Ncursesw library"
AC_DEFINE(USE_NCURSESW, 1,
[Define to use ncursesw for screen management])

Просмотреть файл

@ -4,11 +4,11 @@ AC_DEFUN([MC_CHECK_SLANG_HEADER], [
AC_MSG_CHECKING([for slang/slang.h])
AC_PREPROC_IFELSE(
[
AC_LANG_PROGRAM([#include <slang/slang.h>],[return 0;])
AC_LANG_PROGRAM([#include <slang/slang.h>], [return 0;])
],
[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SLANG_SLANG_H, 1,[Define to use slang.h])
AC_DEFINE(HAVE_SLANG_SLANG_H, 1, [Define to use slang.h])
found_slang=yes
],
[
@ -44,7 +44,7 @@ AC_DEFUN([MC_CHECK_SLANG_BY_PATH], [
AC_MSG_CHECKING([for slang.h])
AC_PREPROC_IFELSE(
[
AC_LANG_PROGRAM([#include <slang.h>],[return 0;])
AC_LANG_PROGRAM([#include <slang.h>], [return 0;])
],
[
AC_MSG_RESULT(yes)
@ -55,7 +55,7 @@ AC_DEFUN([MC_CHECK_SLANG_BY_PATH], [
ac_slang_lib_path="-L/usr/lib"
fi
found_slang=yes
AC_DEFINE(HAVE_SLANG_H, 1,[Define to use slang.h])
AC_DEFINE(HAVE_SLANG_H, 1, [Define to use slang.h])
],
[
@ -63,7 +63,7 @@ AC_DEFUN([MC_CHECK_SLANG_BY_PATH], [
MC_CHECK_SLANG_HEADER
if test x"$found_slang" = xno; then
error_msg_slang="Slang header not found"
error_msg_slang="S-Lang header not found"
else
if test x"$ac_slang_inc_path" = x; then
ac_slang_inc_path="-I/usr/include"
@ -124,42 +124,27 @@ int main (void)
saved_LDFLAGS="-ltermcap $saved_LDFLAGS"
fi
dnl Check the library
unset ac_cv_lib_slang_SLang_init_tty
unset ac_cv_lib_slang_SLang_init_tty
AC_CHECK_LIB(
[slang],
[SLang_init_tty],
[:],
[
found_slang=no
error_msg_slang="S-lang library not found"
error_msg_slang="S-Lang library not found"
]
)
fi
dnl Unless external S-Lang was requested, reject S-Lang with UTF-8 hacks
if test x"$found_slang" = x"yes"; then
unset ac_cv_lib_slang_SLsmg_write_nwchars
AC_CHECK_LIB(
[slang],
[SLsmg_write_nwchars],
[
found_slang=no
error_msg_slang="Rejecting S-Lang with UTF-8 support, it's not fully supported yet"
],
[:]
)
fi
if test x"$found_slang" = x"yes"; then
screen_type=slang
screen_msg="S-Lang library (installed on the system)"
screen_msg="S-Lang library"
MCLIBS="$ac_slang_lib_path -lslang $MCLIBS"
CFLAGS="$ac_slang_inc_path $saved_CFLAGS"
dnl do not reset CPPFLAGS
dnl - if CPPFLAGS are resetted then cpp does not find the specified header
dnl - if CPPFLAGS are reset then cpp does not find the specified header
LDFLAGS="$saved_LDFLAGS"
else
CFLAGS="$saved_CFLAGS"
@ -178,7 +163,7 @@ AC_DEFUN([MC_WITH_SLANG], [
AC_ARG_WITH([slang-includes],
AS_HELP_STRING([--with-slang-includes=@<:@DIR@:>@],
[set path to SLANG includes @<:@default=/usr/include@:>@; make sense only if --with-screen=slang]
[set path to S-Lang includes @<:@default=/usr/include@:>@; make sense only if --with-screen=slang]
),
[ac_slang_inc_path="$withval"],
[ac_slang_inc_path=""]
@ -186,13 +171,13 @@ AC_DEFUN([MC_WITH_SLANG], [
AC_ARG_WITH([slang-libs],
AS_HELP_STRING([--with-slang-libs=@<:@DIR@:>@],
[set path to SLANG library @<:@default=/usr/lib@:>@; make sense only if --with-screen=slang]
[set path to S-Lang library @<:@default=/usr/lib@:>@; make sense only if --with-screen=slang]
),
[ac_slang_lib_path="$withval"],
[ac_slang_lib_path=""]
)
if test x"$ac_slang_lib_path" != x -o x"$ac_slang_inc_path" != x; then
echo 'checking SLANG-headers in specified place ...'
echo 'checking S-Lang headers in specified place ...'
MC_CHECK_SLANG_BY_PATH([$ac_slang_inc_path],[$ac_slang_lib_path])
else
found_slang=no
@ -208,14 +193,14 @@ AC_DEFUN([MC_WITH_SLANG], [
ac_slang_inc_path="/usr/include"
ac_slang_lib_path="/usr/lib"
echo 'checking SLANG-headers in /usr ...'
echo 'checking S-Lang headers in /usr ...'
MC_CHECK_SLANG_BY_PATH([$ac_slang_inc_path],[$ac_slang_lib_path])
if test x"$found_slang" = "xno"; then
found_slang=yes
ac_slang_inc_path="/usr/local/include"
ac_slang_lib_path="/usr/local/lib"
echo 'checking SLANG-headers in /usr/local ...'
echo 'checking S-Lang headers in /usr/local ...'
MC_CHECK_SLANG_BY_PATH( $ac_slang_inc_path , $ac_slang_lib_path )
if test x"$found_slang" = "xno"; then
AC_MSG_ERROR([$error_msg_slang])
@ -223,9 +208,7 @@ AC_DEFUN([MC_WITH_SLANG], [
fi
fi
AC_DEFINE(HAVE_SLANG, 1,
[Define to use S-Lang library for screen management])
AC_DEFINE(HAVE_SLANG, 1, [Define to use S-Lang library for screen management])
MC_CHECK_SLANG_HEADER
])

Просмотреть файл

@ -7,13 +7,13 @@ dnl
AC_DEFUN([MC_WITH_SCREEN], [
AC_ARG_WITH(screen,
[ --with-screen=LIB Compile with screen library: slang or
ncurses [[slang if found]]])
AC_ARG_WITH([screen],
AS_HELP_STRING([--with-screen=@<:@LIB@:>@],
[Compile with screen library: slang or ncurses @<:@slang if found@:>@]))
case x$with_screen in
xslang)
MC_WITH_SLANG(strict)
x | xslang)
MC_WITH_SLANG
;;
xncurses)
MC_WITH_NCURSES
@ -21,9 +21,6 @@ AC_DEFUN([MC_WITH_SCREEN], [
xncursesw)
MC_WITH_NCURSESW
;;
x)
MC_WITH_SLANG
;;
*)
AC_MSG_ERROR([Value of the screen library is incorrect])
;;

Просмотреть файл

@ -136,7 +136,6 @@ typedef struct WDiff
ssize_t last_found_line;
ssize_t last_accessed_num_line;
} search;
} WDiff;
/*** global variables defined in .c file *********************************************************/
@ -147,7 +146,4 @@ typedef struct WDiff
void dview_search_cmd (WDiff * dview);
void dview_continue_search_cmd (WDiff * dview);
/* ydiff.c */
void dview_update (WDiff * dview);
#endif /* MC__DIFFVIEW_INTERNAL_H */

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -11,6 +11,6 @@
/*** declarations of public functions ************************************************************/
int dview_diff_cmd (const void *f0, const void *f1);
gboolean dview_diff_cmd (const void *f0, const void *f1);
#endif /* MC__DIFFVIEW_YDIFF_H */

Просмотреть файл

@ -272,9 +272,10 @@ book_mark_flush (WEdit * edit, int c)
void
book_mark_inc (WEdit * edit, long line)
{
if (edit->book_mark)
if (edit->book_mark != NULL)
{
struct _book_mark *p;
p = book_mark_find (edit, line);
for (p = p->next; p != NULL; p = p->next)
p->line++;
@ -290,6 +291,7 @@ book_mark_dec (WEdit * edit, long line)
if (edit->book_mark != NULL)
{
struct _book_mark *p;
p = book_mark_find (edit, line);
for (p = p->next; p != NULL; p = p->next)
p->line--;

Просмотреть файл

@ -215,8 +215,8 @@ int edit_delete (WEdit * edit, const int byte_delete);
int edit_backspace (WEdit * edit, const int byte_delete);
void edit_insert (WEdit * edit, int c);
void edit_cursor_move (WEdit * edit, off_t increment);
void edit_push_undo_action (WEdit * edit, long c, ...);
void edit_push_redo_action (WEdit * edit, long c, ...);
void edit_push_undo_action (WEdit * edit, long c);
void edit_push_redo_action (WEdit * edit, long c);
void edit_push_key_press (WEdit * edit);
void edit_insert_ahead (WEdit * edit, int c);
off_t edit_write_stream (WEdit * edit, FILE * f);

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -946,10 +946,8 @@ edit_do_search (WEdit * edit)
search_create_bookmark = FALSE;
book_mark_flush (edit, -1);
while (TRUE)
while (mc_search_run (edit->search, (void *) edit, q, edit->last_byte, &len))
{
if (!mc_search_run (edit->search, (void *) edit, q, edit->last_byte, &len))
break;
if (found == 0)
edit->search_start = edit->search->normal_offset;
found++;
@ -1282,7 +1280,7 @@ edit_collect_completions (WEdit * edit, off_t word_start, gsize word_len,
g_string_free (recoded, TRUE);
}
#endif
compl[*num].text = g_strdup (temp->str);
compl[*num].text = g_strndup (temp->str, temp->len);
compl[*num].len = temp->len;
(*num)++;
start += len;
@ -2921,7 +2919,7 @@ edit_ok_to_exit (WEdit * edit)
gboolean
edit_save_block (WEdit * edit, const char *filename, off_t start, off_t finish)
{
int len, file;
int len = 1, file;
vfs_path_t *vpath;
vpath = vfs_path_from_str (filename);

Просмотреть файл

@ -108,9 +108,6 @@ static inline void
status_string (WEdit * edit, char *s, int w)
{
char byte_str[16];
unsigned char cur_byte = 0;
unsigned int cur_utf = 0;
int cw = 1;
/*
* If we are at the end of file, print <EOF>,
@ -119,15 +116,12 @@ status_string (WEdit * edit, char *s, int w)
*/
if (edit->curs1 < edit->last_byte)
{
if (!edit->utf8)
#ifdef HAVE_CHARSET
if (edit->utf8)
{
cur_byte = edit_get_byte (edit, edit->curs1);
unsigned int cur_utf = 0;
int cw = 1;
g_snprintf (byte_str, sizeof (byte_str), "%4d 0x%03X",
(int) cur_byte, (unsigned) cur_byte);
}
else
{
cur_utf = edit_get_utf (edit, edit->curs1, &cw);
if (cw > 0)
{
@ -140,7 +134,15 @@ status_string (WEdit * edit, char *s, int w)
g_snprintf (byte_str, sizeof (byte_str), "%04d 0x%03X",
(int) cur_utf, (unsigned) cur_utf);
}
}
else
#endif
{
unsigned char cur_byte = 0;
cur_byte = edit_get_byte (edit, edit->curs1);
g_snprintf (byte_str, sizeof (byte_str), "%4d 0x%03X",
(int) cur_byte, (unsigned) cur_byte);
}
}
else
@ -160,11 +162,9 @@ status_string (WEdit * edit, char *s, int w)
edit->curs_line + 1,
edit->total_lines + 1, (long) edit->curs1, (long) edit->last_byte, byte_str,
#ifdef HAVE_CHARSET
mc_global.source_codepage >=
0 ? get_codepage_id (mc_global.source_codepage) : ""
#else
""
mc_global.source_codepage >= 0 ? get_codepage_id (mc_global.source_codepage) :
#endif
""
);
else
g_snprintf (s, w,
@ -179,11 +179,9 @@ status_string (WEdit * edit, char *s, int w)
edit->curs_line + 1,
edit->total_lines + 1, (long) edit->curs1, (long) edit->last_byte, byte_str,
#ifdef HAVE_CHARSET
mc_global.source_codepage >=
0 ? get_codepage_id (mc_global.source_codepage) : ""
#else
""
mc_global.source_codepage >= 0 ? get_codepage_id (mc_global.source_codepage) :
#endif
""
);
}
@ -514,7 +512,6 @@ edit_draw_this_line (WEdit * edit, off_t b, long row, long start_col, long end_c
int color;
int abn_style;
int i;
int utf8lag = 0;
unsigned int cur_line = 0;
int book_mark = 0;
char line_stat[LINE_STATE_WIDTH + 1] = "\0";
@ -609,14 +606,16 @@ edit_draw_this_line (WEdit * edit, off_t b, long row, long start_col, long end_c
if (q >= edit->found_start && q < (off_t) (edit->found_start + edit->found_len))
p->style |= MOD_BOLD;
if (!edit->utf8)
{
c = edit_get_byte (edit, q);
}
else
#ifdef HAVE_CHARSET
if (edit->utf8)
{
c = edit_get_utf (edit, q, &cw);
}
else
#endif
{
c = edit_get_byte (edit, q);
}
/* we don't use bg for mc - fg contains both */
if (book_mark)
{
@ -630,7 +629,7 @@ edit_draw_this_line (WEdit * edit, off_t b, long row, long start_col, long end_c
switch (c)
{
case '\n':
col = (end_col + utf8lag) - edit->start_col + 1; /* quit */
col = end_col - edit->start_col + 1; /* quit */
break;
case '\t':
i = TAB_SIZE - ((int) col % TAB_SIZE);
@ -762,24 +761,23 @@ edit_draw_this_line (WEdit * edit, off_t b, long row, long start_col, long end_c
control_char = TRUE;
break;
}
if (!edit->utf8)
#ifdef HAVE_CHARSET
if (edit->utf8)
{
if ((mc_global.utf8_display && g_unichar_isprint (c)) ||
(!mc_global.utf8_display && is_printable (c)))
{
if (g_unichar_isprint (c))
p->ch = c;
p++;
}
else
{
p->ch = '.';
p->style = abn_style;
p++;
}
p++;
}
else
#endif
{
if (g_unichar_isprint (c))
if ((mc_global.utf8_display && g_unichar_isprint (c)) ||
(!mc_global.utf8_display && is_printable (c)))
{
p->ch = c;
p++;

Просмотреть файл

@ -721,15 +721,6 @@ edit_dialog_event (Gpm_Event * event, void *data)
if (ret == MOU_UNHANDLED)
dlg_select_widget (w);
}
else if (event->y == h->y + h->lines)
{
/* buttonbar */
/* In general, this can be handled in default way (dlg_mouse_event)
* but let make it here to avoid walking in widget list */
w = (Widget *) find_buttonbar (h);
ret = w->mouse (event, w);
}
return ret;
}

Просмотреть файл

@ -77,9 +77,13 @@ struct WEdit
unsigned char *buffers1[MAXBUFF + 1]; /* all data up to curs1 */
unsigned char *buffers2[MAXBUFF + 1]; /* all data from end of file down to curs2 */
/* UTF8 */
#ifdef HAVE_CHARSET
/* multibyte support */
gboolean utf8; /* It's multibyte file codeset */
GIConv converter;
char charbuf[4 + 1];
int charpoint;
#endif
/* search handler */
mc_search_t *search;
@ -108,7 +112,6 @@ struct WEdit
unsigned int delete_file:1; /* New file, needs to be deleted unless modified */
unsigned int highlight:1; /* There is a selected block */
unsigned int column_highlight:1;
unsigned int utf8:1; /* It's multibyte file codeset */
unsigned int fullscreen:1; /* Is window fullscreen or not */
long prev_col; /* recent column position of the cursor - used when moving
up or down past lines that are shorter than the current line */
@ -159,15 +162,11 @@ struct WEdit
GTree *defines; /* List of defines */
gboolean is_case_insensitive; /* selects language case sensitivity */
/* user map stuff */
GIConv converter;
/* line break */
LineBreaks lb;
gboolean extmod;
char *labels[10];
};
/*** global variables defined in .c file *********************************************************/

Просмотреть файл

@ -422,7 +422,7 @@ aspell_get_lang (void)
/**
* Set the language.
*
* @param Language name
* @param lang Language name
* @returns FALSE or error
*/

Просмотреть файл

@ -21,7 +21,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/** \file dir.c
/** \file src/filemanager/dir.c
* \brief Source: directory routines
*/

Просмотреть файл

@ -43,7 +43,7 @@
* operations.
*/
/** \file file.c
/** \file src/filemanager/file.c
* \brief Source: file management
*/

Просмотреть файл

@ -65,7 +65,7 @@ get_absolute_name (const vfs_path_t * vpath)
if (*(vfs_path_get_by_index (vpath, 0)->path) == PATH_SEP)
return vfs_path_clone (vpath);
return vfs_path_append_vpath_new (vfs_get_raw_current_dir (), vpath);
return vfs_path_append_vpath_new (vfs_get_raw_current_dir (), vpath, NULL);
}
/* --------------------------------------------------------------------------------------------- */

Просмотреть файл

@ -1426,7 +1426,8 @@ hot_load_group (struct hotlist *grp)
case TKN_GROUP:
CHECK_TOKEN (TKN_STRING);
new_grp =
add2hotlist (g_strdup (tkn_buf->str), 0, HL_TYPE_GROUP, LISTBOX_APPEND_AT_END);
add2hotlist (g_strndup (tkn_buf->str, tkn_buf->len), 0, HL_TYPE_GROUP,
LISTBOX_APPEND_AT_END);
SKIP_TO_EOL;
hot_load_group (new_grp);
current_group = grp;
@ -1434,7 +1435,7 @@ hot_load_group (struct hotlist *grp)
case TKN_ENTRY:
{
CHECK_TOKEN (TKN_STRING);
label = g_strdup (tkn_buf->str);
label = g_strndup (tkn_buf->str, tkn_buf->len);
CHECK_TOKEN (TKN_URL);
CHECK_TOKEN (TKN_STRING);
url = tilde_expand (tkn_buf->str);
@ -1443,7 +1444,7 @@ hot_load_group (struct hotlist *grp)
}
break;
case TKN_COMMENT:
label = g_strdup (tkn_buf->str);
label = g_strndup (tkn_buf->str, tkn_buf->len);
add2hotlist (label, 0, HL_TYPE_COMMENT, LISTBOX_APPEND_AT_END);
break;
case TKN_EOF:
@ -1480,7 +1481,8 @@ hot_load_file (struct hotlist *grp)
case TKN_GROUP:
CHECK_TOKEN (TKN_STRING);
new_grp =
add2hotlist (g_strdup (tkn_buf->str), 0, HL_TYPE_GROUP, LISTBOX_APPEND_AT_END);
add2hotlist (g_strndup (tkn_buf->str, tkn_buf->len), 0, HL_TYPE_GROUP,
LISTBOX_APPEND_AT_END);
SKIP_TO_EOL;
hot_load_group (new_grp);
current_group = grp;
@ -1488,7 +1490,7 @@ hot_load_file (struct hotlist *grp)
case TKN_ENTRY:
{
CHECK_TOKEN (TKN_STRING);
label = g_strdup (tkn_buf->str);
label = g_strndup (tkn_buf->str, tkn_buf->len);
CHECK_TOKEN (TKN_URL);
CHECK_TOKEN (TKN_STRING);
url = tilde_expand (tkn_buf->str);
@ -1497,7 +1499,7 @@ hot_load_file (struct hotlist *grp)
}
break;
case TKN_COMMENT:
label = g_strdup (tkn_buf->str);
label = g_strndup (tkn_buf->str, tkn_buf->len);
add2hotlist (label, 0, HL_TYPE_COMMENT, LISTBOX_APPEND_AT_END);
break;
case TKN_EOL:

Просмотреть файл

@ -1629,14 +1629,6 @@ midnight_event (Gpm_Event * event, void *data)
ret = ((Widget *) the_menubar)->mouse (event, the_menubar);
}
}
else if (event->y == h->y + h->lines && mc_global.keybar_visible)
{
/* buttonbar */
/* in general, this can be handled in default way (dlg_mouse_event)
* but let make it here to avoid walking in widget list */
ret = ((Widget *) the_bar)->mouse (event, the_bar);
}
return ret;
}

Просмотреть файл

@ -4005,9 +4005,13 @@ panel_new (const char *panel_name)
}
/* --------------------------------------------------------------------------------------------- */
/** Panel creation for specified directory.
/**
* Panel creation for specified directory.
*
* @param panel_name specifies the name of the panel for setup retieving
* @param the path of working panel directory. If path is NULL then panel will be created for current directory
* @param wpath the path of working panel directory. If path is NULL then panel will be created
* for current directory
*
* @returns new instance of WPanel
*/
@ -4478,12 +4482,14 @@ panel_set_sort_order (WPanel * panel, const panel_field_t * sort_order)
}
/* --------------------------------------------------------------------------------------------- */
#ifdef HAVE_CHARSET
/**
* Change panel encoding.
* @param panel WPanel object
*/
#ifdef HAVE_CHARSET
void
panel_change_encoding (WPanel * panel)
{
@ -4570,7 +4576,7 @@ remove_encoding_from_path (const vfs_path_t * vpath)
str_vfs_convert_from (converter, path_element->path, tmp_conv);
g_free (path_element->path);
path_element->path = g_strdup (tmp_conv->str);
path_element->path = g_strndup (tmp_conv->str, tmp_conv->len);
g_string_set_size (tmp_conv, 0);
@ -4584,6 +4590,7 @@ remove_encoding_from_path (const vfs_path_t * vpath)
#endif /* HAVE_CHARSET */
/* --------------------------------------------------------------------------------------------- */
/**
* This routine reloads the directory in both panels. It tries to
* select current_file in current_panel and other_file in other_panel.
@ -4592,6 +4599,9 @@ remove_encoding_from_path (const vfs_path_t * vpath)
*
* if force_update has the UP_ONLY_CURRENT bit toggled on, then it
* will not reload the other panel.
*
* @param flags for reload panel
* @param current_file name of the current file
*/
void

Просмотреть файл

@ -1,4 +1,4 @@
/** \file history.h
/** \file src/history.h
* \brief Header: defines history section names
*/

Просмотреть файл

@ -369,12 +369,14 @@ static const struct
/* --------------------------------------------------------------------------------------------- */
/**
Get name of config file.
* Get name of config file.
*
* @param subdir If not NULL, config is also searched in specified subdir.
* @param config_file_name If relative, file if searched in standard paths.
*
* @returns Newly allocated string with config name or NULL if file is not found.
*/
@param subdir If not NULL, config is also searched in specified subdir.
@param config_file_name If relative, file if searched in standard paths.
@returns Newly allocated string with config name or NULL if file is not found.
*/
static char *
load_setup_get_full_config_name (const char *subdir, const char *config_file_name)
{

Просмотреть файл

@ -127,6 +127,10 @@ sftpfs_correct_file_name (const char *filename)
}
/* --------------------------------------------------------------------------------------------- */
#define POINTER_TO_STRUCTURE_MEMBER(type) \
((type) ((void *) config_entity + (off_t) config_variables[i].offset))
/**
* Parse string and filling one config entity by parsed data.
*
@ -134,9 +138,6 @@ sftpfs_correct_file_name (const char *filename)
* @param buffer string for parce
*/
#define POINTER_TO_STRUCTURE_MEMBER(type) \
((type) ((void *) config_entity + (off_t) config_variables[i].offset))
static void
sftpfs_fill_config_entity_from_string (sftpfs_ssh_config_entity_t * config_entity, char *buffer)
{

Просмотреть файл

@ -220,11 +220,12 @@ sftpfs_fstat (void *data, struct stat *buf, GError ** error)
/**
* Read up to 'count' bytes from the file descriptor 'file_handler' to the buffer starting at 'buffer'.
*
* @param data file data handler
* @param file_handler file data handler
* @param buffer buffer for data
* @param count data size
* @param error pointer to the error handler
* @return 0 if sucess, negative value otherwise
* @param count data size
* @param error pointer to the error handler
*
* @returns 0 on sucess, negative value otherwise
*/
ssize_t
@ -267,14 +268,16 @@ sftpfs_read_file (vfs_file_handler_t * file_handler, char *buffer, size_t count,
}
/* --------------------------------------------------------------------------------------------- */
/**
* Write up to 'count' bytes from the buffer starting at 'buffer' to the descriptor 'file_handler'.
*
* @param data file data handler
* @param buffer buffer for data
* @param count data size
* @param error pointer to the error handler
* @return 0 if sucess, negative value otherwise
* @param file_handler file data handler
* @param buffer buffer for data
* @param count data size
* @param error pointer to the error handler
*
* @returns 0 on sucess, negative value otherwise
*/
ssize_t
@ -312,12 +315,14 @@ sftpfs_write_file (vfs_file_handler_t * file_handler, const char *buffer, size_t
}
/* --------------------------------------------------------------------------------------------- */
/**
* Close a file descriptor.
*
* @param data file data handler
* @param error pointer to the error handler
* @return 0 if sucess, negative value otherwise
* @param file_handler file data handler
* @param error pointer to the error handler
*
* @returns 0 on sucess, negative value otherwise
*/
int
@ -338,14 +343,16 @@ sftpfs_close_file (vfs_file_handler_t * file_handler, GError ** error)
}
/* --------------------------------------------------------------------------------------------- */
/**
* Reposition the offset of the open file associated with the file descriptor.
*
* @param data file data handler
* @param offset file offset
* @param whence method of seek (at begin, at current, at end)
* @param error pointer to the error handler
* @return 0 if sucess, negative value otherwise
* @param file_handler file data handler
* @param offset file offset
* @param whence method of seek (at begin, at current, at end)
* @param error pointer to the error handler
*
* @returns 0 on sucess, negative value otherwise
*/
off_t