Use ifdef instead of if for strict spec.

SVN revision: 29338
This commit is contained in:
Sebastian Dransfeld 2007-04-04 10:41:53 +00:00
parent 1e0ad5e156
commit 8ec72de321
4 changed files with 15 additions and 10 deletions

View File

@ -48,11 +48,16 @@ AM_CONDITIONAL(HAVE_ECORE_DESKTOP, test "x$have_ecore_desktop" = xyes)
AC_ARG_ENABLE(strict-spec,
[AC_HELP_STRING([--enable-strict-spec],[Enable strict spec compliance])],
[enable_strict_spec=$enableval], [enable_strict_spec="auto"])
STRICT_SPEC=0
if test "x$enable_strict_spec" = "xyes" ; then
STRICT_SPEC=1
AC_DEFINE(STRICT_SPEC, 1, [Strict Spec Compliance])
fi
AC_ARG_ENABLE(sloppy-spec,
[AC_HELP_STRING([--enable-sloppy-spec],[Enable sloppy spec compliance])],
[enable_sloppy_spec=$enableval], [enable_sloppy_spec="auto"])
if test "x$enable_sloppy_spec" = "xyes" ; then
AC_DEFINE(SLOPPY_SPEC, 1, [Sloppy Spec Compliance])
fi
AC_DEFINE_UNQUOTED(STRICT_SPEC, $STRICT_SPEC, [Strict Spec Compliance])
CFLAGS=$PCFLAGS

View File

@ -669,7 +669,7 @@ efreet_desktop_string_list_parse(const char *string)
/* If this is true, the .desktop file does not follow the standard */
if (*s)
{
#if STRICT_SPEC
#ifdef STRICT_SPEC
printf("[Efreet]: Found a string list without ';' "
"at the end: %s\n", string);
#endif
@ -1191,7 +1191,7 @@ efreet_desktop_command_build(Efreet_Desktop_Command *command)
exec[len++] = *p;
break;
default:
#if STRICT_SPEC
#ifdef STRICT_SPEC
printf("[Efreet]: Unknown conversion character: '%c'\n", *p);
#endif
break;

View File

@ -184,7 +184,7 @@ efreet_icon_theme_list_get(void)
theme = ecore_hash_get(efreet_icon_themes, dir);
if (theme->hidden || theme->fake) continue;
#if !STRICT_SPEC
#ifndef STRICT_SPEC
if (!theme->name.name) continue;
#endif
@ -583,7 +583,7 @@ efreet_icon_fallback_dir_scan(const char *dir, const char *icon_name)
if (ecore_file_exists(path))
{
icon = efreet_icon_new(path);
#if STRICT_SPEC
#ifdef STRICT_SPEC
if (icon)
printf("[Efreet]: Found an icon that already has an extension: %s\n", path);
#endif

View File

@ -1800,7 +1800,7 @@ efreet_menu_handle_legacy_dir_helper(Efreet_Menu_Internal *root,
efreet_menu_create_app_dirs_list(legacy_internal);
ecore_list_append(legacy_internal->app_dirs, app_dir);
#if !STRICT_SPEC
#ifndef STRICT_SPEC
if (root)
{
/* XXX This seems wrong, but it makes efreet pass the fdo tests */
@ -1999,7 +1999,7 @@ efreet_menu_handle_old(Efreet_Menu_Internal *parent, Efreet_Xml *xml)
/* If we already moved this menu, remove the old move */
/* XXX This seems wrong, but it makes efreet pass the fdo tests */
#if !STRICT_SPEC
#ifndef STRICT_SPEC
move = ecore_list_find(parent->moves,
ECORE_COMPARE_CB(efreet_menu_cb_move_compare), xml->text);
if (move) ecore_list_remove_destroy(parent->moves);
@ -3494,7 +3494,7 @@ efreet_menu_directory_get(Efreet_Menu_Internal *internal, const char *path)
static int
efreet_menu_cb_md_compare(Efreet_Menu_Desktop *a, Efreet_Menu_Desktop *b)
{
#if STRICT_SPEC
#ifdef STRICT_SPEC
return strcmp(ecore_file_get_file(a->desktop->orig_path), ecore_file_get_file(b->desktop->orig_path));
#else
return strcasecmp(a->desktop->name, b->desktop->name);