1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-17 09:05:50 +02:00
Commit Graph

18889 Commits

Author SHA1 Message Date
Paul Eggert
618dd92be6 printf now uses long double. 2004-07-12 06:40:24 +00:00
Paul Eggert
6ab31c1e23 New file. 2004-07-12 06:39:23 +00:00
Paul Eggert
830de27082 (vstrtold): Renamed from vstrtod.
Now returns long double.  All uses changed.
(print_direc): Use "L" length modifier when printing floating point
numbers, since we're now printing long double.
2004-07-12 06:36:55 +00:00
Paul Eggert
bae8432a9b (gl_PREREQ): Add gl_C_STRTOLD. 2004-07-12 06:36:02 +00:00
Paul Eggert
fdfe049a93 New file. 2004-07-12 06:31:53 +00:00
Paul Eggert
9b8e02c39e (c_strtold): New decl. 2004-07-12 06:31:01 +00:00
Paul Eggert
d06984e2be Include <config.h> first.
(C_STRTOD, DOUBLE, STRTOD): New macros.
(c_strtod): Use them.
2004-07-12 06:30:36 +00:00
Paul Eggert
c98f2fb04a (libfetish_a_SOURCES): Add c-strtold.c. 2004-07-12 06:29:59 +00:00
Jim Meyering
c5211912ed . 2004-07-08 14:04:35 +00:00
Jim Meyering
dd0d9c278a *** empty log message *** 2004-07-08 14:03:45 +00:00
Jim Meyering
405c640f5b printf cleanup, to avoid undefined behavior, to add support for
formats that Bash supports, and to support wide integers like
Bash does.

Add tests for the above.
2004-07-08 14:03:20 +00:00
Jim Meyering
3f61615681 *** empty log message *** 2004-07-08 14:01:59 +00:00
Jim Meyering
62e1d5259d printf cleanup, to avoid undefined behavior, to add support for
formats that Bash supports, and to support wide integers like
Bash does.

(UNSPECIFIED): Remove.  All uses now replaced by
booleans, so that we don't reserve any values for precision or
width (like Bash).
(STRTOX): Use prototype, not K&R-style definition.
(vstrtoimax): Renamed from xstrtol (to avoid confusion with xstrtol
in ../lib), with type change to intmax_t.
All uses changed.
(vstrtoumax): Renamed from xstrtoul, with type change to uintmax_t.
All uses changed.
(vstrtod): Renamed from xstrtod.  All uses changed.
(print_direc): Use boolean arg instead of special value to indicate
a missing precision or width.  LENGTH no longer includes
length modifiers or conversion character.  New arg CONVERSION
now specifies conversion character.
Use intmax_t-width formatting for integers (like Bash).
Add support for C99 %a, %A, %F (like Bash).
Add support for field width with %c (POSIX requires this).
Add a FIXME for lack of support for field width and precision
for %b.
Add support for '\'', '0' flags.
Check for invalid combinations of flags, field width, precision,
and conversion, to prevent use of undefined behavior.
Allow multiple length modifiers, for formats like "%lld" (like Bash).
Add support for C99 'j', 't', 'z' length modifiers (like Bash).
In error message, output entire invalid conversion specification,
instead of merely outputting % followed by the conversion char.
2004-07-08 14:01:49 +00:00
Jim Meyering
2aa1f2d16b *** empty log message *** 2004-07-07 15:54:54 +00:00
Jim Meyering
f1314a409c Don't infloop when MAXSYMLINKS is not defined.
Detect symlink loops much earlier (albeit lazily) on systems
with MAXSYMLINKS defined to a large value.

Include "cycle-check.h".
(canonicalize_filename_mode): Don't try to detect loops by counting
symlink-hops.  Instead, use the cycle-check module.
2004-07-07 15:54:51 +00:00
Jim Meyering
ff5ea92271 Include stdbool.h.
Forward-declare `struct stat'.
2004-07-07 15:07:08 +00:00
Jim Meyering
de9faabfe6 *** empty log message *** 2004-07-07 09:28:24 +00:00
Jim Meyering
f7975d11d7 (canonicalize_filename_mode): Remove do-while(0) loop.
Replace each corresponding `break' stmt with `continue'.
2004-07-07 09:28:15 +00:00
Jim Meyering
0f3da8f425 . 2004-07-06 17:30:29 +00:00
Jim Meyering
bb11ba8316 . 2004-07-06 17:00:53 +00:00
Jim Meyering
2b19667f16 Include "stat-macros.h".
(canonicalize_filename_mode): Remove #ifdef S_ISLNK, now that
S_ISLNK is guaranteed to be defined (via stat-macros.h).
2004-07-06 17:00:36 +00:00
Jim Meyering
260a2f0a47 *** empty log message *** 2004-07-06 16:56:30 +00:00
Jim Meyering
b2c18c67d4 (libfetish_a_SOURCES): Add canonicalize.c unconditionally. 2004-07-06 16:56:21 +00:00
Jim Meyering
51dfe9cc31 (canonicalize_mode_t): New type. 2004-07-06 16:55:40 +00:00
Jim Meyering
17b22ef83f Include "file-type.h".
(canonicalize_filename_mode): New function, based on
canonicalize_file_name, supports three canonicalize modes.
(canonicalize_file_name)
[!HAVE_CANONICALIZE_FILE_NAME && !HAVE_RESOLVEPATH]: Use it.
2004-07-06 16:55:26 +00:00
Jim Meyering
e86c162eed *** empty log message *** 2004-07-06 16:17:25 +00:00
Jim Meyering
859fcb7eec (AC_FUNC_CANONICALIZE_FILE_NAME): Do not add canonicalize.c here. 2004-07-06 16:17:10 +00:00
Jim Meyering
48e3ae2b2f *** empty log message *** 2004-07-06 16:16:01 +00:00
Jim Meyering
159c3f467e (readlink invocation): Document new
"readlink -f" behaviour and new canonicalize options, -e and -m.
2004-07-06 16:15:45 +00:00
Jim Meyering
0966feecc2 . 2004-07-06 16:14:45 +00:00
Jim Meyering
06291f1741 renamed from ../misc/readline 2004-07-06 16:14:40 +00:00
Jim Meyering
0206598b8b . 2004-07-06 16:14:19 +00:00
Jim Meyering
6ec3b19040 From Dmitry V. Levin 2004-07-06 16:14:15 +00:00
Jim Meyering
519533ed8e (SUBDIRS): Add readlink. 2004-07-06 16:13:31 +00:00
Jim Meyering
bb16bf0cd5 (AC_CONFIG_FILES): Add tests/readlink/Makefile. 2004-07-06 16:13:17 +00:00
Jim Meyering
ef09b8426a (TESTS): Remove basic readlink test. 2004-07-06 16:13:01 +00:00
Jim Meyering
037b7fc0b9 renamed to ../readlink/rl-1 2004-07-06 16:12:39 +00:00
Jim Meyering
e0b8973bd4 Change "readlink -f" to be more compatible with prior implementations.
Add more canonicalize options, -e and -m.
Add comprehensive tests for all readlink modes.

(longopts): Add new options.
(usage): Document them.
(canonicalize_fname): New proxy function.
(main): Handle new options.
2004-07-06 16:11:03 +00:00
Jim Meyering
554dc97975 *** empty log message *** 2004-07-05 08:41:43 +00:00
Jim Meyering
a8aa538b09 (path_concat): Improve comment. From Paul Eggert. 2004-07-05 08:41:13 +00:00
Jim Meyering
325a75af63 *** empty log message *** 2004-07-04 20:14:52 +00:00
Jim Meyering
034b4caa6d (mempcpy): Don't define if a system header defines it.
Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
(longest_relative_suffix): New function.
(path_concat): Use it.  Assume first argument is not NULL.
Port to DOS.  Omit redundant separators.
Report an error instead of returning NULL.
Use mempcpy instead of memcpy.
(xpath_concat): Remove: not declared or used.
2004-07-04 20:14:44 +00:00
Jim Meyering
fb4cd3cc3f *** empty log message *** 2004-07-04 18:13:02 +00:00
Jim Meyering
5e1589ace8 (copy_internal): Add a FIXME comment. 2004-07-04 18:12:55 +00:00
Jim Meyering
6ce20e8caa (canonicalize_file_name): Assume that path_concat never returns NULL. 2004-07-04 18:03:07 +00:00
Jim Meyering
19dc6a7964 *** empty log message *** 2004-07-04 18:01:56 +00:00
Jim Meyering
10da95cf3f (main): Don't pass NULL first argument to path_concat.
This cleans up the semantics a bit, as we no longer try to open the
same file twice.
2004-07-04 18:01:04 +00:00
Jim Meyering
cc4105f095 (movefile): Assume path_concat returns non-NULL. 2004-07-04 17:47:29 +00:00
Jim Meyering
ae206c4b1c (do_copy): Assume path_concat returns non-NULL.
(make_path_private): 2nd arg is now size_t, not int,
to avoid problem when path_concat dir name is longer than 2 GiB (!).
2004-07-04 17:47:09 +00:00
Jim Meyering
aead5906dc (copy_dir): Assume path_concat returns non-NULL. 2004-07-04 17:46:17 +00:00