X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fquotearg.c;h=9d4395977ed4adacd3334d87cd68de750b626a01;hb=488cf84c63fbbffa44143d0ebf56e5a6c26d4383;hp=68458940af9847ea76a0b418e1c4a7ff1a5f0b8a;hpb=28c9a4add5188c044ff0bf52bef77bb204c26ef9;p=gnulib.git diff --git a/lib/quotearg.c b/lib/quotearg.c index 68458940a..9d4395977 100644 --- a/lib/quotearg.c +++ b/lib/quotearg.c @@ -1,5 +1,5 @@ /* quotearg.c - quote arguments for output - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,6 +21,9 @@ # include #endif +#if HAVE_STDDEF_H +# include /* For the definition of size_t on windows w/MSVC. */ +#endif #include #include #include @@ -60,16 +63,15 @@ #endif #if HAVE_WCHAR_H + +/* BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared. */ +# include +# include + # include #endif -#if HAVE_MBRTOWC -size_t mbrtowc (); -# ifdef mbstate_t -# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) -# define mbsinit(ps) 1 -# endif -#else +#if !HAVE_MBRTOWC /* Disable multibyte processing entirely. Since MB_CUR_MAX is 1, the other macros are defined only for documentation and to satisfy C syntax. */ @@ -92,15 +94,14 @@ size_t mbrtowc (); #define INT_BITS (sizeof (int) * CHAR_BIT) #if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) -/* Undefine to protect against the definition in wctype.h of solaris2.6. */ -# undef ISASCII -# define ISASCII(c) 1 +# define IN_CTYPE_DOMAIN(c) 1 #else -# define ISASCII(c) isascii (c) +# define IN_CTYPE_DOMAIN(c) isascii(c) #endif + /* Undefine to protect against the definition in wctype.h of solaris2.6. */ #undef ISPRINT -#define ISPRINT(c) (ISASCII (c) && isprint (c)) +#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c)) struct quoting_options {