diff options
author | Jim Meyering <jim@meyering.net> | 2000-07-15 13:29:01 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-07-15 13:29:01 +0000 |
commit | 015bcbb713a553fa8bfa4c0f382f24da8f11ea9e (patch) | |
tree | 6fb73367709096af985023f77d4cd01af2f07b4f | |
parent | a23c47755552d2740d62ea11c493d611e0cf9a8f (diff) | |
download | coreutils-015bcbb713a553fa8bfa4c0f382f24da8f11ea9e.tar.xz |
.
-rw-r--r-- | old/fileutils/ChangeLog | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/old/fileutils/ChangeLog b/old/fileutils/ChangeLog index 76bdb964d..887a4f925 100644 --- a/old/fileutils/ChangeLog +++ b/old/fileutils/ChangeLog @@ -1,3 +1,45 @@ +2000-07-15 Jim Meyering <meyering@lucent.com> + + + Begin converting "`%s'" in format strings to "%s", and wrap each + corresponding argument in a `quote (...)' call -- if there's only one. + If there are more than one, then use `quote_n (0, ...), + quote_n (1, ...), ...'. + + Here's the justification, from Paul Eggert (thanks, Paul): + + [Consider] the following, taken from fileutils/copy.c: + + error (0, errno, _("cannot create directory `%s'"), dst_path); + + Now, suppose dst_path is "/'\nrm: removing all files under `/" + (expressed in C string syntax). This will cause the user to see + the following delightfully ambiguous display: + + cp: cannot create directory `/' + rm: removing all files under `/' + + It would be better to rewrite the above line to be something + like this: + + error (0, errno, _("cannot create directory %s"), quote (dst_path)); + + using the definition of "quote" [in lib/quote.c]. That way, + the user will see the following unambiguous display instead: + + cp: cannot create directory `/\'\nrm: removing all files under `/' + + One might object that any user who asks to copy a file with + a weird name like that deserves to get confused. But this + is not a good objection, as the source of the string may not + be under the user's control, or even visible to the user. + + * src/copy.c: Adapt format strings and args as above. Include quote.h. + I have deliberately not changed the output of --verbose. + FIXME: maybe I should. + * src/cp.c: Likewise. + * src/remove.c: Likewise. + 2000-07-13 Paul Eggert <eggert@twinsun.com> * NEWS: Describe --quoting-style=clocale. |