summaryrefslogtreecommitdiff
path: root/src/system.h
diff options
context:
space:
mode:
authorOndřej Vašík <ovasik@redhat.com>2009-09-10 12:33:41 +0100
committerPádraig Brady <P@draigBrady.com>2009-09-10 15:28:50 +0100
commitb64d9b6d9e7fdc96614e3cbef001f8e078fe9588 (patch)
treedfe32e71e396a8de020ef5edcde5012b4ed21d6f /src/system.h
parent0bbb9d7785957437182fc633b2d387cc51ee918e (diff)
downloadcoreutils-b64d9b6d9e7fdc96614e3cbef001f8e078fe9588.tar.xz
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
Diffstat (limited to 'src/system.h')
-rw-r--r--src/system.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/system.h b/src/system.h
index 3a0550122..a15c298b8 100644
--- a/src/system.h
+++ b/src/system.h
@@ -616,6 +616,25 @@ ptr_align (void const *ptr, size_t alignment)
? false : (((Accum) = (Accum) * 10 + (Digit_val)), true)) \
)
+static inline void
+emit_size_note (void)
+{
+ 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);
+}
+
+static inline void
+emit_blocksize_note (char const *program)
+{
+ printf (_("\n\
+Display values are in units of the first available SIZE from --block-size,\n\
+and the %s_BLOCK_SIZE, BLOCK_SIZE and BLOCKSIZE environment variables.\n\
+Otherwise, units default to 1024 bytes (or 512 if POSIXLY_CORRECT is set).\n\
+"), program);
+}
+
#include "hard-locale.h"
static inline void
emit_bug_reporting_address (void)