]> granicus.if.org Git - fribidi/commitdiff
Drop the rest of #if FOO+0
authorKhaled Hosny <khaledhosny@eglug.org>
Tue, 13 Feb 2018 00:05:33 +0000 (02:05 +0200)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 13 Feb 2018 00:07:55 +0000 (16:07 -0800)
https://bugzilla.gnome.org/show_bug.cgi?id=792481#c12

23 files changed:
bin/fribidi-benchmark.c
bin/fribidi-main.c
gen.tab/gen-arabic-shaping-tab.c
gen.tab/gen-bidi-type-tab.c
gen.tab/gen-brackets-tab.c
gen.tab/gen-brackets-type-tab.c
gen.tab/gen-joining-type-tab.c
gen.tab/gen-mirroring-tab.c
gen.tab/gen-unicode-version.c
gen.tab/packtab.c
lib/bidi-types.h
lib/common.h
lib/debug.h
lib/fribidi-arabic.c
lib/fribidi-bidi-types.c
lib/fribidi-bidi.c
lib/fribidi-joining-types.c
lib/fribidi-joining.c
lib/fribidi-run.c
lib/fribidi.c
lib/fribidi.h
lib/joining-types.h
lib/run.h

index a35b63aec6d3bd85e2ceed9cf5c7a8fd201b8a64..e5fc9c0efaec244715bb5c72a134787a48d2a3a4 100644 (file)
@@ -33,7 +33,7 @@
 #include <fribidi-deprecated.h>
 
 #include <stdio.h>
-#if STDC_HEADERS+0
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
 #  include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H+0
+#ifdef HAVE_STRING_H
 # if !STDC_HEADERS && HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H+0
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
-#if HAVE_SYS_TIMES_H+0
+#ifdef HAVE_SYS_TIMES_H
 # include <sys/times.h>
 #endif
 #ifdef _WIN32
@@ -133,7 +133,7 @@ utime (
   else
       return 0.0;
 #else /* !_WIN32 */
-#if HAVE_SYS_TIMES_H+0
+#ifdef HAVE_SYS_TIMES_H
   struct tms tb;
   times (&tb);
   return 0.01 * tb.tms_utime;
index d8aa9f2285f0fa634d7c18fe8ab0e538f2c0af47..6a396932129b2a68ea0f6d2abdffd34992ab600b 100644 (file)
 
 #include <fribidi.h>
 #include <fribidi-deprecated.h>
-#if FRIBIDI_CHARSETS+0
+#ifdef FRIBIDI_CHARSETS
 #else
 # include <fribidi-char-sets.h>
 #endif /* !FRIBIDI_CHARSETS */
 
 #include <stdio.h>
-#if STDC_HEADERS+0
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
 #  include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H+0
+#ifdef HAVE_STRING_H
 # if STDC_HEADERS && HAVE_MEMORY_H
 # else
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H+0
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
 
index aaba5bf9491efb91d2ea8c6ec72aacdc5b09cb02..fd2ef63a3f8cdd046f275c8a8a3a7e90aaefde25 100644 (file)
@@ -30,7 +30,7 @@
 #include <fribidi-unicode.h>
 
 #include <stdio.h>
-#if STDC_HEADERS+0
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
 #  include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H+0
+#ifdef HAVE_STRING_H
 # if !STDC_HEADERS && HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H+0
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
 
index ffe2e3d52df33bf1015f4e63a2e6c8f545016a8f..d1b3870273facb10fda54495c96fc0092ae2d4b9 100644 (file)
@@ -30,7 +30,7 @@
 #include <fribidi-unicode.h>
 
 #include <stdio.h>
-#if STDC_HEADERS+0
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
 #  include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H+0
+#ifdef HAVE_STRING_H
 # if !STDC_HEADERS && HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H+0
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
 
index 810ed3fbd6fdd9d44df13f3d37ac00607e6cc976..37d08fca7cdd92742b7348d68d63c005dfe78551 100644 (file)
@@ -32,7 +32,7 @@
 #include <fribidi-unicode.h>
 
 #include <stdio.h>
-#if STDC_HEADERS+0
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
 #  include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H+0
+#ifdef HAVE_STRING_H
 # if !STDC_HEADERS && HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H+0
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
 
index 8111ade4a929bdc68f7a73ac1a25aa8b32868475..1238f0a411c4c60b37740b085761c3ce71d90edb 100644 (file)
@@ -32,7 +32,7 @@
 #include <fribidi-unicode.h>
 
 #include <stdio.h>
-#if STDC_HEADERS+0
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
 #  include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H+0
+#ifdef HAVE_STRING_H
 # if !STDC_HEADERS && HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H+0
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
 
index c0f2621c1c7e092a84d35fe5d0c399388a81c8f9..b9f381e57b90020844a7e70f6bbdef437f937a8a 100644 (file)
@@ -30,7 +30,7 @@
 #include <fribidi-unicode.h>
 
 #include <stdio.h>
-#if STDC_HEADERS+0
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
 #  include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H+0
+#ifdef HAVE_STRING_H
 # if !STDC_HEADERS && HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H+0
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
 
index 0e890319e105c9259769c0eb80c3918d4c512028..36932222ed73ea5d9707b675c24279d1c3a1649d 100644 (file)
@@ -30,7 +30,7 @@
 #include <fribidi-unicode.h>
 
 #include <stdio.h>
-#if STDC_HEADERS+0
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
 #  include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H+0
+#ifdef HAVE_STRING_H
 # if !STDC_HEADERS && HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H+0
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
 
index 23efa9a618d47e34999a77c93aa5a6127bddc659..f8bdec2bb0c21d0386f7f7b8d5a07a0635ec61fe 100644 (file)
@@ -28,7 +28,7 @@
 #include <common.h>
 
 #include <stdio.h>
-#if STDC_HEADERS+0
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
 #  include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H+0
+#ifdef HAVE_STRING_H
 # if !STDC_HEADERS && HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H+0
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
 
index a2d19f49671befdd6f3934f16bb5072e4b814418..197e194dcf750c8fa8d127b29316f0790e56644b 100644 (file)
   1 <= max_depth <= 21
 */
 
-#if HAVE_CONFIG_H+0
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif /* HAVE_CONFIG_H */
 
 #include <stdio.h>
-#if STDC_HEADERS+0
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
 #  include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H+0
+#ifdef HAVE_STRING_H
 # if !STDC_HEADERS && HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H+0
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
 
index 9d36d0d94639b02aa59919dba9e2432147f7300e..4f19973e387ba9bdc1ca406a8655b6a13a9eda0c 100644 (file)
@@ -37,7 +37,7 @@
 #define FRIBIDI_LEVEL_INVALID FRIBIDI_BIDI_MAX_RESOLVED_LEVELS
 #define FRIBIDI_SENTINEL -1
 
-#if DEBUG+0
+#ifdef DEBUG
 
 #define fribidi_char_from_bidi_type FRIBIDI_PRIVATESPACE(char_from_bidi_type)
 char
index 04ce67baa35b5b7af54f88915f02d5a698fae660..f6a51d3e68647926f0bd892475a105286a1a9c00 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef _COMMON_H
 #define _COMMON_H
 
-#if HAVE_CONFIG_H+0
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
 # endif        /* !fribidi_free */
 #endif /* fribidi_malloc */
 
-#if HAVE_STRING_H+0
+#ifdef HAVE_STRING_H
 # if !STDC_HEADERS && HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H+0
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
 
 # define FRIBIDI_EMPTY_STMT FRIBIDI_BEGIN_STMT (void) 0; FRIBIDI_END_STMT
 #endif /* !FRIBIDI_EMPTY_STMT */
 
-#if HAVE_STRINGIZE+0
+#ifdef HAVE_STRINGIZE
 # define STRINGIZE(symbol) #symbol
 #else /* !HAVE_STRINGIZE */
 #  error "No stringize operator available?"
index 080d0294f922bdec638dd27d55c58c05d6238547..74a5026aca2f84b6f9b2bd992be544266c72a398 100644 (file)
@@ -33,7 +33,7 @@
 
 #include <fribidi-begindecls.h>
 
-#if DEBUG+0
+#ifdef DEBUG
 
 /* These definitions should only be used in DEBUG mode: */
 #ifndef __LINE__
index afa58a956558ee1811b10829f6b9d05d4ac016b5..dbfdc0949430c1e413b178ea1c09aff37e7b5d5f 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "common.h"
 
-#if HAVE_STDLIB_H+0
+#ifdef HAVE_STDLIB_H
 # include <stdlib.h>
 #endif
 
index c77ad8f436cdcec6d0d26cee16caa02714b56c84..76ce79e209ab94deb56321f2d897cf7b9b51f6ee 100644 (file)
@@ -92,7 +92,7 @@ fribidi_get_bidi_type_name (
     }
 }
 
-#if DEBUG+0
+#ifdef DEBUG
 
 char
 fribidi_char_from_bidi_type (
index 911a470211154b755053ae048328e4eafa8bffee..9d2ce795a6b54c1200e7c5c6c8f85f3686a9b2a0 100644 (file)
@@ -161,7 +161,7 @@ static FriBidiRun *get_adjacent_run(FriBidiRun *list, fribidi_boolean forward, f
   return ppp;
 }
 
-#if DEBUG+0
+#ifdef DEBUG
 /*======================================================================
  *  For debugging, define some functions for printing the types and the
  *  levels.
index c26bcd3d06bc8b1e9dad1b1cb9f63a7c72645303..ba52cc7b17d3bfe341515edceff7f3bd3b915309 100644 (file)
@@ -83,7 +83,7 @@ fribidi_get_joining_type_name (
     }
 }
 
-#if DEBUG+0
+#ifdef DEBUG
 
 char
 fribidi_char_from_joining_type (
index 610445e57d1f62f386e921642eb1e87042930ef2..99c4f377b7fc288cb3af30b14c49fcb50945e458 100644 (file)
@@ -32,7 +32,7 @@
 #include "bidi-types.h"
 #include "joining-types.h"
 
-#if DEBUG+0
+#ifdef DEBUG
 /*======================================================================
  *  For debugging, define some functions for printing joining types and
  *  properties.
index 5d806f609da1e74cf25d7918d155f2ce571dff3c..c74c8663fa778fe33e505ce67140a9e26f8554af 100644 (file)
@@ -305,7 +305,7 @@ out:
   return status;
 }
 
-#if DEBUG+0
+#ifdef DEBUG
 
 void
 fribidi_validate_run_list (
index 07864dd0ae7e3f154f0ce2e8c29d9d534b438d70..d2e91d398e44f85360f3a124a9fb7e9e035dac08 100644 (file)
@@ -31,7 +31,7 @@
 
 #include <fribidi.h>
 
-#if DEBUG+0
+#ifdef DEBUG
 static int flag_debug = false;
 #endif
 
@@ -40,7 +40,7 @@ fribidi_debug_status (
   void
 )
 {
-#if DEBUG+0
+#ifdef DEBUG
   return flag_debug;
 #else
   return false;
@@ -53,7 +53,7 @@ fribidi_set_debug (
   fribidi_boolean state
 )
 {
-#if DEBUG+0
+#ifdef DEBUG
   return flag_debug = state;
 #else
   return false;
@@ -69,10 +69,10 @@ const char *fribidi_version_info =
   "interface version " FRIBIDI_INTERFACE_VERSION_STRING ",\n"
   "Unicode Character Database version " FRIBIDI_UNICODE_VERSION ",\n"
   "Configure options"
-#if DEBUG+0
+#ifdef DEBUG
   " --enable-debug"
 #endif /* DEBUG */
-#if FRIBIDI_CHARSETS+0
+#ifdef FRIBIDI_CHARSETS
 #else
   " --disable-charsets"
 #endif /* !FRIBIDI_CHARSETS */
index 55b7b6ebd7c73f73b07b648f610befaa60278eee..957d56a84ba13eb0b1e6cfb4a82251e9c7fb2fba 100644 (file)
@@ -41,7 +41,7 @@
 #include "fribidi-shape.h"
 
 
-#if FRIBIDI_CHARSETS+0
+#ifdef FRIBIDI_CHARSETS
 # include "fribidi-char-sets.h"
 #endif                         /* FRIBIDI_CHARSETS */
 
index 4a3b58c59afd9e8ffd63862d986162899dad2b08..399fa294dfcb572ab569a81bc88848733d71d215 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <fribidi-begindecls.h>
 
-#if DEBUG+0
+#ifdef DEBUG
 
 #define fribidi_char_from_joining_type FRIBIDI_PRIVATESPACE(char_from_joining_type)
 char
index 46952c6af1c3d68fc6fd731e487bd53ba98624a2..c116305a2ce9bc751ac07da16650b871e8aabff2 100644 (file)
--- a/lib/run.h
+++ b/lib/run.h
@@ -131,7 +131,7 @@ new_run (
        for ((x) = (list)->next; (x)->type != FRIBIDI_TYPE_SENTINEL; (x) = (x)->next)
 
 
-#if DEBUG+0
+#ifdef DEBUG
 
 #define fribidi_validate_run_list FRIBIDI_PRIVATESPACE(validate_run_list)
      void fribidi_validate_run_list (