From 96507a8ae0aad6c16ff6591a21d1ebd210960759 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Mon, 6 Feb 2012 20:43:01 +0300 Subject: [PATCH] Fixed preprocessor conditions. Signed-off-by: Andrew Borodin --- lib/utilunix.c | 4 ++-- lib/vfs/vfs.c | 2 +- src/filemanager/chmod.c | 2 +- src/filemanager/cmd.c | 2 +- src/filemanager/find.c | 2 +- src/filemanager/midnight.c | 5 ++--- src/filemanager/mountlist.c | 2 +- src/filemanager/panel.c | 2 +- src/main.c | 2 +- 9 files changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/utilunix.c b/lib/utilunix.c index 909f7acb8..61ec9f34d 100644 --- a/lib/utilunix.c +++ b/lib/utilunix.c @@ -733,7 +733,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 */ @@ -761,7 +761,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))) { diff --git a/lib/vfs/vfs.c b/lib/vfs/vfs.c index 09e88186b..873811672 100644 --- a/lib/vfs/vfs.c +++ b/lib/vfs/vfs.c @@ -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 diff --git a/src/filemanager/chmod.c b/src/filemanager/chmod.c index ea5ac9cf7..8bd464e4e 100644 --- a/src/filemanager/chmod.c +++ b/src/filemanager/chmod.c @@ -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); diff --git a/src/filemanager/cmd.c b/src/filemanager/cmd.c index b2c57bb6c..3dd7ca224 100644 --- a/src/filemanager/cmd.c +++ b/src/filemanager/cmd.c @@ -846,7 +846,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); diff --git a/src/filemanager/find.c b/src/filemanager/find.c index c3421b85a..740f9fe99 100644 --- a/src/filemanager/find.c +++ b/src/filemanager/find.c @@ -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; diff --git a/src/filemanager/midnight.c b/src/filemanager/midnight.c index 548d1fab8..84acdefc2 100644 --- a/src/filemanager/midnight.c +++ b/src/filemanager/midnight.c @@ -469,8 +469,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, @@ -638,7 +637,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 */ diff --git a/src/filemanager/mountlist.c b/src/filemanager/mountlist.c index 7a1af6662..24f2a517e 100644 --- a/src/filemanager/mountlist.c +++ b/src/filemanager/mountlist.c @@ -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); diff --git a/src/filemanager/panel.c b/src/filemanager/panel.c index 29b897a94..74df95a89 100644 --- a/src/filemanager/panel.c +++ b/src/filemanager/panel.c @@ -2378,7 +2378,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 diff --git a/src/main.c b/src/main.c index d88ffab28..4dccde65f 100644 --- a/src/main.c +++ b/src/main.c @@ -285,7 +285,7 @@ do_cd (const char *new_dir, enum cd_enum exact) res = do_panel_cd (current_panel, _new_dir, exact); -#if HAVE_CHARSET +#ifdef HAVE_CHARSET if (res) { vfs_path_t *vpath = vfs_path_from_str (current_panel->cwd); -- 2.11.4.GIT