Commit Graph

116 Commits

Author SHA1 Message Date
Sergey Poznyakoff
cd206cd899 Added exitfail.[hc] 2003-07-24 14:44:24 +00:00
Sergey Poznyakoff
4dc30d7397 Added to the repository 2003-07-24 14:43:30 +00:00
Paul Eggert
e547e855e9 import from gnulib 2003-06-04 23:35:46 +00:00
Paul Eggert
bdece51882 import from gnulib 2003-04-05 06:53:09 +00:00
Paul Eggert
fcb62b60d9 import from gnulib 2003-03-10 07:31:50 +00:00
Paul Eggert
dc861c7ab9 import from gnulib 2003-01-10 21:06:49 +00:00
Paul Eggert
7154feb583 import from gnulib 2003-01-08 18:42:38 +00:00
Paul Eggert
4f5e37c861 import from gnulib 2002-12-06 08:08:13 +00:00
Paul Eggert
504274b059 import from gnulib 2002-12-05 20:46:03 +00:00
Paul Eggert
4ff9279d9d import from gnulib 2002-11-22 16:25:53 +00:00
kaun
b94aa0bc5f (print_copyright)
- fix typo (use print_unicode_char, not print_unicode_success)
2002-08-02 00:04:07 +00:00
Paul Eggert
784a497c40 (strtoll): Depend on HAVE_LONG_LONG, not HAVE_UNSIGNED_LONG_LONG. 2002-07-09 17:40:33 +00:00
Paul Eggert
f2daf2e598 import from gnulib 2002-06-26 06:17:35 +00:00
Paul Eggert
d1c27c2308 Sync with fileutils 2002-02-11 14:28:35 +00:00
Paul Eggert
9ded0a0567 Sync with fileutils 2002-02-11 14:28:09 +00:00
Paul Eggert
4bfdfaa270 allow using unicode 2002-01-26 06:04:19 +00:00
Paul Eggert
ba32aa1147 From textutils 2.1 2002-01-22 07:43:55 +00:00
Paul Eggert
bb5b309581 Sync with fileutils. 2002-01-16 22:43:41 +00:00
Paul Eggert
f762709bb0 Sync with fileutils. 2001-12-19 15:05:33 +00:00
Paul Eggert
bab605d5bd (strtol): Do not declare if HAVE_DECL_STRTOL.
(strtoul): Do not declare if HAVE_DECL_STRTOUL.
(strtoimax, strtoumax): Do not declare if already defined as a macro.
2001-09-28 06:54:20 +00:00
Paul Eggert
1a9ace4d99 Include iconv.h before testing for EILSEQ. 2001-09-25 22:52:27 +00:00
Paul Eggert
1ad624bbbc (EILSEQ): Include <time.h> and <wchar.h> if <errno.h> does not define
EILSEQ, because BSD/OS 4.1 defines EILSEQ in <wchar.h>, which requires
<time.h>.  Define a replacement EILSEQ to be ENOENT, not EINVAL, since
callers may want to distinguish EINVAL and EILSEQ.
2001-09-25 18:17:36 +00:00
Paul Eggert
61170ee840 Don't assume we're using the included libintl. 2001-09-23 06:40:35 +00:00
Paul Eggert
1b10ab140f (<libintl.h>): Do not include; no longer needed.
(_): Remove; no longer needed.
2001-09-23 05:37:04 +00:00
Paul Eggert
06e4c77310 (unicode_to_mb): Return int, not void. New arg for failure callback.
(print_unicode_success, print_unicode_failure): New decls.
(print_unicode_char): Return int, not void.
2001-09-21 22:26:45 +00:00
Paul Eggert
a942967415 (EILSEQ, ENOTSUP): New macros, if not defined by errno.h.
(<error.h>): Do not include.
(unicode_to_mb): Return int, not void.  New arg for failure callback.
Invoke the failure callback instead of invoking 'error'.
(print_unicode_success): Renamed from fprintf_callback.  Now extern.
Return -1 on failure, 0 on success.
(print_unicode_failure): New function.
(print_unicode_char): Return int.  Adjust to changes to unicode_to_mb.
Do not report error: instead, print an approximation.
2001-09-21 22:26:45 +00:00
Paul Eggert
92734c1511 Rewrite from scratch, as print-copyr.h. 2001-09-21 22:19:09 +00:00
Paul Eggert
4b5d60ef38 Rewrite from scratch, as print-copyr.c. 2001-09-21 22:19:09 +00:00
Paul Eggert
1589ca47d0 From Jim Meyering.
(strtoimax): Guard declaration with
`#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
have their own, conflicting declaration of strtoimax in sys/inttypes.h.
(strtoumax): Likewise, for completeness (it wasn't necessary).
2001-09-20 18:01:31 +00:00
Paul Eggert
356b01119e Include stddef.h, for size_t.
Include langinfo.h if needed.
Use locale_charset only if USE_INCLUDED_LIBINTL;
if not, use nl_langinfo (CODESET) if available.
2001-09-15 06:11:37 +00:00
Paul Eggert
792f268988 Initial revision 2001-09-14 00:27:39 +00:00
Paul Eggert
f596d1be2e (HAVE_LONG_LONG): Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
(strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
to work around bug in IBM C compiler.
2001-09-06 19:47:45 +00:00
Paul Eggert
0e79725f53 Fix typo in local var; from Jim Meyering. 2001-09-03 04:17:04 +00:00
Paul Eggert
9f95e73642 (xgetcwd): Reorganize to avoid some duplication.
Use an initial, malloc'd, buffer of length 128 rather than
a statically allocated one of length 1024.
2001-08-31 11:36:54 +00:00
Paul Eggert
9efbc4be3b (strtoimax): New decl. 2001-08-31 01:36:06 +00:00
Paul Eggert
509ab656f7 Initial revision 2001-08-29 06:36:20 +00:00
Paul Eggert
01c35d7225 Fix copyright notice.
(UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.
(verify): New macro.
(INT): Renamed from uintmax_t.
(strtoumax, strtoull, strtoul): Remove.
(strtoimax, strtol, strtoll): New macros.
(strtoimax): Renamed from strtoumax.  Interchange signed with unsigned.
Verify sizes at compile-time, not at run-time.
Prefer strtol to strtoll if both work.
(main): Remove.
2001-08-29 06:36:20 +00:00
Paul Eggert
07c3d5fe32 ("pathmax.h"): Do not include; no longer needed.
(<stdlib.h>, <unistd.h>): Include if available.
("xalloc.h"): Include.
(xmalloc, xstrdup, free): Remove decls; no longer needed.
(xgetcwd): Don't assume sizes fit in 'unsigned'.
Check for overflow when path size gets too large.
Simplify failure code.
2001-08-29 06:36:20 +00:00
Paul Eggert
efc9c76cb7 (xstrtoimax): New decl. 2001-08-28 22:28:02 +00:00
Paul Eggert
bec3001dcb Comment fix. 2001-08-28 20:29:12 +00:00
Paul Eggert
7fec439aff Update comment. 2001-08-28 20:04:21 +00:00
Paul Eggert
13b9e5afc8 Add copyright notice.
(_DECLARE_XSTRTOL): Improve quality of diagnostic for
LONGINT_INVALID_SUFFIX_CHAR.
2001-08-27 14:05:15 +00:00
Paul Eggert
255c8a9880 Include <string.h>; required for C99 since we use strlen. 2001-08-27 00:41:28 +00:00
Paul Eggert
c74b3c3fb7 Initial revision 2001-08-26 06:58:10 +00:00
Paul Eggert
f17ce7b6ae Initial revision 2001-08-23 17:25:11 +00:00
Paul Eggert
01244cf133 glibc version. 2001-08-21 02:56:57 +00:00
Paul Eggert
4ae648023c (alloca): Arg is of type size_t, not unsigned. 2001-07-08 19:08:50 +00:00
Paul Eggert
0a4cfe3e6c (get_date): Initialize tm_isdst to -1 before invoking mktime the last time. 2001-04-08 19:58:59 +00:00
Paul Eggert
e873bb4ed8 Initial revision 2001-04-03 15:18:12 +00:00
Paul Eggert
11c437d44b (malloc): Undef before defining. 2001-02-16 18:57:56 +00:00