diff options
author | behdad <behdad> | 2002-07-22 19:25:22 +0000 |
---|---|---|
committer | behdad <behdad> | 2002-07-22 19:25:22 +0000 |
commit | 9abcd976ed3bb09d185c148432c9f8ca1c6edf8b (patch) | |
tree | f045a148793d6abd7c945cbca1393eb08deefee6 | |
parent | ead89322cb5b66c564d884c430926ec9d8ba9d81 (diff) |
Small changes.
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | fribidi.c | 10 | ||||
-rw-r--r-- | fribidi.h | 4 | ||||
-rw-r--r-- | fribidi.spec.in | 2 | ||||
-rw-r--r-- | fribidi_env.c | 7 | ||||
-rw-r--r-- | fribidi_env.h | 2 | ||||
-rw-r--r-- | fribidi_main.c | 9 | ||||
-rw-r--r-- | fribidi_mem.h | 2 |
8 files changed, 21 insertions, 19 deletions
diff --git a/configure.in b/configure.in index db730ad..8516f83 100644 --- a/configure.in +++ b/configure.in @@ -72,6 +72,10 @@ if test "x$GCC" = "xyes"; then *[\ \ ]-Wall[\ \ ]*) ;; *) CFLAGS="$CFLAGS -Wall " ;; esac + case " $CFLAGS " in + *[\ \ ]-pedantic[\ \ ]*) ;; + *) CFLAGS="$CFLAGS -pedantic " ;; + esac fi changequote([,])dnl @@ -41,11 +41,9 @@ #endif #ifdef DEBUG -#define DBG(s) do { if (fribidi_debug_status(fribidienv)) { fprintf(stderr, s); } } while (0) -#define DBG2(s, t) do { if (fribidi_debug_status(fribidienv)) { fprintf(stderr, s, t); } } while (0) +#define DBG(s...) do { if (fribidi_debug_status(fribidienv)) { fprintf(stderr, s); } } while (0) #else -#define DBG(s) -#define DBG2(s, t) +#define DBG(s...) #endif #ifdef DEBUG @@ -622,8 +620,8 @@ fribidi_analyse_string (FriBidiEnv *fribidienv, } } base_dir = FRIBIDI_LEVEL_TO_DIR (base_level); - DBG2 (" Base level : %c\n", fribidi_char_from_level (base_level)); - DBG2 (" Base dir : %c\n", fribidi_char_from_type (base_dir)); + DBG (" Base level : %c\n", fribidi_char_from_level (base_level)); + DBG (" Base dir : %c\n", fribidi_char_from_type (base_dir)); DBG (" Finding the base level, Done\n"); #ifdef DEBUG @@ -24,6 +24,10 @@ #ifndef FRIBIDI_H #define FRIBIDI_H +#ifndef NULL +#define NULL 0 +#endif + #include "fribidi_config.h" #include "fribidi_unicode.h" #include "fribidi_mem.h" diff --git a/fribidi.spec.in b/fribidi.spec.in index a0d6734..056a7ff 100644 --- a/fribidi.spec.in +++ b/fribidi.spec.in @@ -6,7 +6,7 @@ # Runtime material: Shared library and command line tool # lib@PACKAGE@N-version-release-arch.rpm # Development material: Static library and header files -# (requires lib@PACKAGE@) +# (requires lib@PACKAGE@N) # lib@PACKAGE@N-devel-version-release-arch.rpm # Where N is the major version number. diff --git a/fribidi_env.c b/fribidi_env.c index 1559f67..e8240e8 100644 --- a/fribidi_env.c +++ b/fribidi_env.c @@ -43,11 +43,8 @@ * argument. *----------------------------------------------------------------------*/ -/* For standard malloc() and free(). */ #include <stdlib.h> -#include <assert.h> - #include "fribidi_env.h" /*====================================================================== @@ -97,7 +94,7 @@ destroy_fribidienv (FriBidiEnv *fribidienv) * environments, which support exceptions. *----------------------------------------------------------------------*/ void * -fribidi_malloc (FriBidiEnv *fribidienv, size_t size) +fribidi_malloc (FriBidiEnv *fribidienv, int size) { FriBidiMemChunkPrefix *lChunk_ptr; FriBidiMemChunkPrefix *lNextChunk_ptr; @@ -165,7 +162,7 @@ fribidi_free (FriBidiEnv *fribidienv, void *ptr) lNextChunk_ptr = (FriBidiMemChunkPrefix *) (lChunk_ptr->iNext); lPrevChunk_ptr = (FriBidiMemChunkPrefix *) (lChunk_ptr->iPrev); - assert (NULL != lPrevChunk_ptr); + /* assert (NULL != lPrevChunk_ptr); */ /* Remove the current memory chunk from the doubly-linked list. */ lPrevChunk_ptr->iNext = lNextChunk_ptr; diff --git a/fribidi_env.h b/fribidi_env.h index 723bee2..88d15dc 100644 --- a/fribidi_env.h +++ b/fribidi_env.h @@ -163,7 +163,7 @@ extern "C" * This function may throw an Out-Of-Memory exception in * environments, which support exceptions. *----------------------------------------------------------------------*/ - void *fribidi_malloc (FriBidiEnv *fribidienv, size_t size); + void *fribidi_malloc (FriBidiEnv *fribidienv, int size); /*====================================================================== diff --git a/fribidi_main.c b/fribidi_main.c index 3b2a359..b408caa 100644 --- a/fribidi_main.c +++ b/fribidi_main.c @@ -86,10 +86,11 @@ help (void) " -h, --help Display this information and exit\n" " -V, --version Display version information and exit\n" " -v, --verbose Verbose mode, same as --basedir --ltov --vtol \\\n" - " --levels --changes\n" - " -d, --debug Output debug information\n" - " -t, --test Test %s, same as --clean --nobreak --showinput \\\n" - " --reordernsm\n", FRIBIDI_PACKAGE); + " --levels --changes\n"); + printf (" -d, --debug Output debug information\n" + " -t, --test Test " FRIBIDI_PACKAGE + ", same as --clean --nobreak --showinput \\\n" + " --reordernsm\n"); #ifdef FRIBIDI_NO_CHARSETS printf (" -c, --charset CS Specify character set, default is %s \\\n" " CS should be a valid iconv character set name\n", diff --git a/fribidi_mem.h b/fribidi_mem.h index d0c9d5d..a495194 100644 --- a/fribidi_mem.h +++ b/fribidi_mem.h @@ -22,8 +22,6 @@ #ifndef FRIBIDI_MEM_H #define FRIBIDI_MEM_H -#include <stdlib.h> - #include "fribidi_config.h" /* #include "fribidi_env.h" */ |