Jim Meyering [Tue, 6 Jul 2004 16:55:26 +0000 (16:55 +0000)]
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.
Jim Meyering [Tue, 6 Jul 2004 16:11:03 +0000 (16:11 +0000)]
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.
Jim Meyering [Sun, 4 Jul 2004 20:14:44 +0000 (20:14 +0000)]
(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.
Jim Meyering [Sun, 4 Jul 2004 17:47:09 +0000 (17:47 +0000)]
(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 (!).
Jim Meyering [Fri, 2 Jul 2004 17:02:15 +0000 (17:02 +0000)]
(Common options, Target directory, cp invocation,
install invocation, mv invocation, ln invocation): Add -t as a
short option for --target-directory, and -T as a short option for
--no-target-directory. Clean up relevant synopses a bit, so that
the language is similar for all.
Jim Meyering [Fri, 2 Jul 2004 16:29:50 +0000 (16:29 +0000)]
Put the right amount of space at sentence ends.
Make sure "i.e." and "e.g." are followed by commas (the GNU style).
Put blank lines before and after every @example, prefer the
previous line to end in ":" (when not a sentence end, for consistency),
and prepend @noindent to the following line when appropriate.
In examples, use "--" arguments when needed to prevent undesired
interpretation of operands as options.
Use "file name" rather than "filename", as per the GNU coding standards.
Remove unwanted spaces before @footnote.
Use "---" when appropriate, instead of " -- ".
Use "name" (or something like that) rather than "path" or "pathname",
since the GNU coding standards don't allow "path".
Use @acronym, @command, @minus{}, @samp in a few places,
where appropriate.
(Target directory): Clarify description of example.
(fmt invocation): Give issue number for reference, and reword
for clarity.
(sort invocation): Note that xargs without -0 also mishandles
file names containing some special characters other than newline.
(Translating): Mention that \012 is not universally portable.
Use '\0' rather than '\000'.
(Squeezing): bourne -> Bourne.
Fix unportable usage of '\n' by replacing it with '[\n*]'.
(More details about version sort): Remove unnecessary indent
in examples.
(dd invocation): Use 'kill -s USR1', not 'kill -USR1', as POSIX
indicates that the former is more portable (the latter is an XSI
extension).
(shred invocation): Use @uref rather than @url, and use a more-typical
style for the date.
(kill invocation): Clarify usage; for example, "kill -s TERM -1"
isn't allowed.
(seq invocation): Reword to avoid implying that printf necessarily
fails for numbers outside the 32-bit range. Prefer separating
options from their operands.
(Opening the software toolbox): Give an online reference to
Robbins's article, and give a date. Don't imply that the
current documentation is unchanged from his article.
(Putting the tools together): Rework examples so that they don't
assume the C locale; nowadays many users now operate outside the C
locale by default. While we're at it, don't assume ASCII either.
Indent example to match actual output from GNU uniq. Remove some
unnecessary and confusing brackets from 'tr' operands. "Software
Tools in Pascal" is back in print, according to Amazon anyway.
Add references to Kernighan's online copies of examples.
Jim Meyering [Wed, 30 Jun 2004 22:41:59 +0000 (22:41 +0000)]
(gl_AC_DOS): Define FILE_SYSTEM_PREFIX_LEN, not
FILESYSTEM_PREFIX_LEN. Generate
FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX, not
FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX. Generate
FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR, not
FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
Jim Meyering [Wed, 30 Jun 2004 22:31:43 +0000 (22:31 +0000)]
(usage, main): Output "file system" rather than "filesystem".
(long_options, usage): Rename "--filesystem" to
"--file-system". But keep the old name around, for compatibility reasons.
Jim Meyering [Wed, 30 Jun 2004 18:42:01 +0000 (18:42 +0000)]
(Common options, Target directory, cp
invocation, install invocation, mv invocation, ln invocation):
Likewise.
(link invocation): Explain how to rewrite link using ln now
that we have --no-target-directory.
(ln invocation): Explain that --no-target-directory subsumes
--no-dereference.
(unlink invocation): Modify wording to match new wording in
link invocation.
Jim Meyering [Tue, 29 Jun 2004 14:40:47 +0000 (14:40 +0000)]
Add support for 'install --target-directory', an option
that has been documented for years but not implemented (!).
(TARGET_DIRECTORY_OPTION): New var.
(long_options, main, usage): Add --target-directory.
(target_directory_operand): New function, stolen from mv.c.
(main): Use it. Check for -d and --target-directory.
Alter wording of diagnostics to match other programs.