Pádraig Brady wrote: > While this patch is more verbose than my previous patch > in this thread, it is more accurate. So let's drop the > previous one. However... > > The info was inaccurate for ls, so I've split the SIZE > specific info into a new emit_size_note(). That also > allows refactoring to be done in split and truncate. > > I've also changed the text in emit_blocksize_note() a bit. > > Also I sync'd the SIZE text used in the info docs, > which is now more accurate. > > cheers, > Pádraig >>From 43ee481910b5949941a6f7724c754c646875488f Mon Sep 17 00:00:00 2001 > From: =?utf-8?q?Ond=C5=99ej=20Va=C5=A1=C3=ADk?= <ova...@redhat.com> > Date: Thu, 10 Sep 2009 12:33:41 +0100 > Subject: [PATCH] doc: improve various BLOCKSIZE and SIZE help > > * doc/coreutils.texi (multiplierSuffixes): Mention that > the suffix can be specified without a leading number > * src/split.c (usage): Refactor SIZE help to within a function > * src/truncate.c (usage): Likewise > * src/ls.c (usage): Likewise > * src/df.c (usage): Likewise. Also add a function with BLOCKSIZE help > * src/du.c (usage): Likewise. > * src/system.h: Define 2 functions to emit common help text > This was prompted by https://bugzilla.redhat.com/show_bug.cgi?id=511188 ...
Looks good modulo two indenatation nits: Please commit. diff --git a/src/system.h b/src/system.h index 878a001..7cdad4a 100644 --- a/src/system.h +++ b/src/system.h @@ -619,7 +619,7 @@ ptr_align (void const *ptr, size_t alignment) static inline void emit_size_note (void) { - fputs (_("\n\ + fputs (_("\n\ SIZE may be (or may be an integer optionally followed by) one of following:\n\ KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.\n\ "), stdout); @@ -628,7 +628,7 @@ KB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, P, E, Z, Y.\n\ static inline void emit_blocksize_note (char const *program) { - printf (_("\n\ + printf (_("\n\ If none of the environment variables BLOCKSIZE, BLOCK_SIZE or %s_BLOCK_SIZE\n\ or --block-size option specify SIZE, display in units of 1024 bytes.\n\ (or 512 bytes if the POSIXLY_CORRECT environment variable is set)\n\