lib/quotearg.c


Log

Author Commit Date CI Message
Jim Meyering 3e3c7925 2001-08-31T07:51:13 BSD/OS 4.1 wchar.h requires FILE and struct tm to be declared.
Jim Meyering db5283c7 2001-02-17T10:39:17 (mbrtowc, mbsinit): Remove workaround macros for hosts that have mbrtowc but not mbstate_t, as we now insist on proper declarations for both before using mbrtowc.
Jim Meyering 4d00eea9 2001-01-26T11:15:37 Include stddef.h.
Jim Meyering 3bd332e0 2000-09-09T15:56:26 Rename ISASCII to IN_CTYPE_DOMAIN.
Jim Meyering 28c9a4ad 2000-07-31T18:30:21 (quotearg_n_options): Don't make the initial slot vector a constant, since it might get modified.
Jim Meyering 62a3c6b1 2000-07-31T07:23:01 (quotearg_n_options): Preallocate a slot 0 buffer, so that the caller can always quote one small component of a "memory exhausted" message in slot 0. From a suggestion by Jim Meyering.
Jim Meyering 8ed25ee6 2000-07-24T06:14:19 Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX), so that mbstate_t is always defined. Do not inspect MB_LEN_MAX, since it's incorrectly defined to be 1 in at least one GCC installation, and this configuration error is likely to be common. Ignoring MB_LEN_MAX hurts performance on hosts that have mbrtowc but have only unibyte locales, but I assume these hosts are rare.
Jim Meyering f7d4132b 2000-07-23T21:48:17 Streamline by invoking multibyte code only if needed. <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX. (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX). (quotearg_buffer_restyled): If a unibyte locale, don't bother to invoke multibyte primitives.
Jim Meyering a62b804c 2000-07-23T08:38:25 When the system forces us to redefine mbstate_t, shadow its mbsinit function.
Jim Meyering a618b12d 2000-07-14T13:56:07 (mbrtowc): Do not use HAVE_WCHAR_H in the definition. Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT, to decide whether to define the BeOS workaround macro; this adjusts to the change to AC_MBSTATE_T.
Jim Meyering d98c6d36 2000-07-14T11:26:28 (quoting_style_args, quoting_style_vals, quotearg_buffer_restyled): Add support for clocale_quoting_style. Undo previous change to locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}" and "{RIGHT QUOTATION MARK}" msgids.
Jim Meyering 12cdbeb9 2000-07-09T15:46:46 The old behavior of quoting `like this' doesn't look good with newer, ISO-style fonts. See: http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html Instead, quote "like this" by default. Let the translator tailor the locale-specific quoting behavior by providing translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}. (N_): New macro. (gettext_default): New function. (quotearg_buffer_restyled): Use gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
Jim Meyering 1f1d0940 2000-07-06T04:47:28 (mbrtowc): Declare returned type, since BeOS doesn't.
Jim Meyering 2793141d 2000-07-06T04:31:59 (struct quoting_options): Simplify quote_these_too dimension.
Jim Meyering 38254f7f 2000-07-04T17:31:56 Make inclusion of <wchar.h> independent of whether HAVE_MBRTOWC is set. Required at least for irix-5.6, which lacks mbrtowc.
Jim Meyering 9c9a405b 2000-07-04T07:03:16 (mbrtowc): Assign to *pwc, and return 1 only if result is nonzero. (iswprint): Use ISPRINT when substituting our own mbrtowc.
Jim Meyering c69e9127 2000-07-02T18:32:05 (mbstate_t): Don't define here.
Jim Meyering e986b397 2000-06-23T21:05:50 Include <wctype.h> after <wchar.h>, for Solaris 2.5. (mbrtowc, mbstate_t): Define substitutes if HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT. (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT, not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
Jim Meyering 02b27c92 2000-02-28T20:45:28 (ALERT_CHAR): New macro. (quotearg_buffer_restyled): Use it.
Jim Meyering f0fcee86 2000-01-31T08:42:45 fix typo. sheesh
Jim Meyering 017cf285 2000-01-31T08:27:51 (ISASCII): Add #undef and move definition to follow inclusion of wctype.h to work around solaris2.6 namespace pollution. (ISPRINT): Likewise.
Jim Meyering cbdd6c8a 2000-01-22T22:19:48 [HAVE_WCTYPE_H]: Include <wctype.h>.
Jim Meyering 35c6eecd 2000-01-17T08:01:40 (quotearg_buffer_restyled): Do not quote alert, backslash, formfeed, and vertical tab unnecessarily in shell quoting style.
Jim Meyering c4b7f3f8 2000-01-15T11:57:11 Quote multibyte characters correctly. (ISGRAPH): Remove. (ISPRINT): New macro. (<wchar.h>): Include if HAVE_MBRTOWC && HAVE_WCHAR_H. (isprint, mbrtowc, mbsinit, mbstate_t): New macros, defined if ! (HAVE_MBRTOWC && HAVE_WCHAR_H). (quotearg_buffer_restyled): New function, with most of the old quotearg_buffer's contents. Major rewrite to support multibyte characters. (quotearg_buffer): Now just calls quotearg_buffer_restyled.
Jim Meyering 66bec62b 1999-08-10T10:50:18 Include <libintl.h> if ENABLE_NLS. (_): New macro. (quoting_style_args, quoting_style_v, quotearg_buffer): Add support for locale_quoting_style, using _("`") and _("'") for open and close quote symbols. Do not quote spaces in escape_quoting_style. (quotearg_n_style, quotearg_style): New functions.
Jim Meyering 3c3d25cd 1999-08-01T07:44:39 (quotearg_buffer): Don't quote spaces if C quoting style.
Jim Meyering 06e76561 1999-01-25T00:17:22 (quotearg_n_options): Revert type of parameter `n' (and hence that of the local `n1', too) to `int' at Paul's request.
Jim Meyering c5779c09 1999-01-16T15:55:20 (quotearg_n_options): Declare n1 to be of type unsigned int, not just int.
Jim Meyering 8b1764e8 1999-01-11T03:11:15 (quotearg_buffer): Change escape_quoting_style so that it no longer escapes ` '. Suggestion from Paul Eggert.
Jim Meyering 5f3336eb 1999-01-01T07:03:16 (quotearg_n_options): Make `options' parameter be `const'.
Jim Meyering 94a2786e 1999-01-01T07:02:16 (quotearg_buffer): Cast -1 to size_t before comparing. (quotearg_n): Change type of 1st parameter from int to unsigned int. (quotearg_n_options): Likewise. From Akim Demaille.
Jim Meyering e4d36862 1998-12-11T14:14:16 (quotearg_buffer): Use `7' as the mask, not `3'. From Bruno Haible.
Jim Meyering d56026b4 1998-03-21T08:49:00 Update from patch-2.5.3.
Jim Meyering 0402072d 1998-02-23T10:16:53 .