Fixed preprocessor conditions.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2012-02-06 20:43:01 +03:00 committed by Slava Zanko
parent d38385eb37
commit 308237aa11
9 changed files with 11 additions and 12 deletions

View File

@ -623,7 +623,7 @@ custom_canonicalize_pathname (char *path, CANON_PATH_FLAGS flags)
else
{
/* "token/../foo" -> "foo" */
#if HAVE_CHARSET
#ifdef HAVE_CHARSET
if ((strncmp (s, VFS_ENCODING_PREFIX, enc_prefix_len) == 0)
&& (is_supported_encoding (s + enc_prefix_len)))
/* special case: remove encoding */
@ -651,7 +651,7 @@ custom_canonicalize_pathname (char *path, CANON_PATH_FLAGS flags)
/* "foo/token/.." -> "foo" */
if (s == lpath + 1)
s[0] = 0;
#if HAVE_CHARSET
#ifdef HAVE_CHARSET
else if ((strncmp (s, VFS_ENCODING_PREFIX, enc_prefix_len) == 0)
&& (is_supported_encoding (s + enc_prefix_len)))
{

View File

@ -148,7 +148,7 @@ _vfs_translate_path (const char *path, int size, GIConv defcnv, GString * buffer
memcpy (encoding, semi, ms);
encoding[ms] = '\0';
#if HAVE_CHARSET
#ifdef HAVE_CHARSET
if (is_supported_encoding (encoding))
coder = str_crt_conv_to (encoding);
#endif

View File

@ -144,7 +144,7 @@ chmod_i18n (void)
i18n = TRUE;
#if ENABLE_NLS
#ifdef ENABLE_NLS
for (i = 0; i < check_perm_num; i++)
check_perm[i].text = _(check_perm[i].text);

View File

@ -894,7 +894,7 @@ edit_cmd_force_internal (void)
void
edit_cmd_new (void)
{
#if HAVE_CHARSET
#ifdef HAVE_CHARSET
mc_global.source_codepage = default_source_codepage;
#endif
do_edit (NULL);

View File

@ -119,7 +119,7 @@ typedef struct
static char **find_ignore_dirs = NULL;
/* Size of the find parameters window */
#if HAVE_CHARSET
#ifdef HAVE_CHARSET
static int FIND_Y = 19;
#else
static int FIND_Y = 18;

View File

@ -458,8 +458,7 @@ toggle_panels_split (void)
/* --------------------------------------------------------------------------------------------- */
#if ENABLE_VFS
#ifdef ENABLE_VFS
/* event helper */
static gboolean
check_panel_timestamp (const WPanel * panel, panel_view_mode_t mode, struct vfs_class *vclass,
@ -626,7 +625,7 @@ create_panels (void)
else
current_panel = left_panel;
#if ENABLE_VFS
#ifdef ENABLE_VFS
mc_event_add (MCEVENT_GROUP_CORE, "vfs_timestamp", check_other_panel_timestamp, NULL, NULL);
mc_event_add (MCEVENT_GROUP_CORE, "vfs_timestamp", check_current_panel_timestamp, NULL, NULL);
#endif /* ENABLE_VFS */

View File

@ -436,7 +436,7 @@ fstype_to_string (short int t)
static char *
fsp_to_string (const struct statfs *fsp)
{
#if HAVE_STRUCT_STATFS_F_FSTYPENAME
#ifdef HAVE_STRUCT_STATFS_F_FSTYPENAME
return (char *) (fsp->f_fstypename);
#else
return fstype_to_string (fsp->f_type);

View File

@ -2603,7 +2603,7 @@ do_enter_on_file_entry (file_entry * fe)
g_free (cmd);
}
#if HAVE_CHARSET
#ifdef HAVE_CHARSET
mc_global.source_codepage = default_source_codepage;
#endif

View File

@ -291,7 +291,7 @@ do_cd (const vfs_path_t * new_dir_vpath, enum cd_enum exact)
res = do_panel_cd (current_panel, _new_dir_vpath, exact);
#if HAVE_CHARSET
#ifdef HAVE_CHARSET
if (res)
{
const vfs_path_element_t *path_element;