diff options
author | wlemb <wlemb> | 2004-05-16 22:33:07 +0000 |
---|---|---|
committer | wlemb <wlemb> | 2004-05-16 22:33:07 +0000 |
commit | 726778ace2659a24c1c079ce378e99c5893669f5 (patch) | |
tree | 1f32ff0bd2fb50bf78f36dd9f124a43fbfabdc13 /src | |
parent | 65a30a4a64793f61f998ac16df7c21640cc46e6b (diff) | |
download | groff-726778ace2659a24c1c079ce378e99c5893669f5.tar.gz |
* REVISION: Set to 2.
* aclocal.m4 (GROFF_STDINT_H): Removed.
(GROFF_INTTYPES_H): Define HACE_CC_INTTYPES_H.
* configure.ac: Updated.
* configure, src/include/config.hin: Regenerated.
* src/libs/libgroff/tmpname.cpp: Don't include stdint.h but
inttypes.h conditionally.
Diffstat (limited to 'src')
-rw-r--r-- | src/include/config.hin | 6 | ||||
-rw-r--r-- | src/libs/libgroff/tmpname.cpp | 6 | ||||
-rw-r--r-- | src/preproc/refer/label.y | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/include/config.hin b/src/include/config.hin index 20b305ba..0702c446 100644 --- a/src/include/config.hin +++ b/src/include/config.hin @@ -3,15 +3,15 @@ /* Define if your C++ doesn't understand `delete []'. */ #undef ARRAY_DELETE_NEEDS_SIZE +/* Define if you have a C++ <inttypes.h>. */ +#undef HAVE_CC_INTTYPES_H + /* Define if you have a C++ <limits.h>. */ #undef HAVE_CC_LIMITS_H /* Define if you have a C++ <osfcn.h>. */ #undef HAVE_CC_OSFCN_H -/* Define if you have a C++ <stdint.h>. */ -#undef HAVE_CC_STDINT_H - /* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you don't. */ #undef HAVE_DECL_SYS_SIGLIST diff --git a/src/libs/libgroff/tmpname.cpp b/src/libs/libgroff/tmpname.cpp index f867fe06..2442c8dd 100644 --- a/src/libs/libgroff/tmpname.cpp +++ b/src/libs/libgroff/tmpname.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. Written by Werner Lemberg (wl@gnu.org) This file is part of groff. @@ -48,8 +48,8 @@ extern "C" { #endif #endif -#if HAVE_CC_STDINT_H -# include <stdint.h> +#if HAVE_CC_INTTYPES_H +# include <inttypes.h> #endif /* Use the widest available unsigned type if uint64_t is not diff --git a/src/preproc/refer/label.y b/src/preproc/refer/label.y index 93993c8e..eee05b81 100644 --- a/src/preproc/refer/label.y +++ b/src/preproc/refer/label.y @@ -1089,10 +1089,10 @@ int same_author_last_name(const reference &r1, const reference &r2, int n) { const char *ae1; const char *as1 = r1.get_sort_field(0, n, 0, &ae1); - assert(as1 != 0); const char *ae2; const char *as2 = r2.get_sort_field(0, n, 0, &ae2); - assert(as2 != 0); + if (!as1 && !as2) return 1; // they are the same + if (!as1 || !as2) return 0; return ae1 - as1 == ae2 - as2 && memcmp(as1, as2, ae1 - as1) == 0; } @@ -1100,10 +1100,10 @@ int same_author_name(const reference &r1, const reference &r2, int n) { const char *ae1; const char *as1 = r1.get_sort_field(0, n, -1, &ae1); - assert(as1 != 0); const char *ae2; const char *as2 = r2.get_sort_field(0, n, -1, &ae2); - assert(as2 != 0); + if (!as1 && !as2) return 1; // they are the same + if (!as1 || !as2) return 0; return ae1 - as1 == ae2 - as2 && memcmp(as1, as2, ae1 - as1) == 0; } |