Make HUMAN_READABLE be single argument like the others.

This commit is contained in:
Eric Andersen 2001-02-23 13:23:03 +00:00
parent 2498b155fd
commit ed0d958c3e
3 changed files with 30 additions and 27 deletions

View File

@ -127,19 +127,21 @@
#ifdef BB_FEATURE_HUMAN_READABLE #ifdef BB_FEATURE_HUMAN_READABLE
#define USAGE_HUMAN_READABLE(a,b) a #define USAGE_HUMAN_READABLE(a) a
#define USAGE_NOT_HUMAN_READABLE(a)
#else #else
#define USAGE_HUMAN_READABLE(a,b) b #define USAGE_HUMAN_READABLE(a)
#define USAGE_NOT_HUMAN_READABLE(a) a
#endif #endif
#define df_trivial_usage \ #define df_trivial_usage \
"[-" USAGE_HUMAN_READABLE("hm", "") "k] [filesystem ...]" "[-" USAGE_HUMAN_READABLE("hm") USAGE_NOT_HUMAN_READABLE("") "k] [filesystem ...]"
#define df_full_usage \ #define df_full_usage \
"Print the filesystem space used and space available.\n\n" \ "Print the filesystem space used and space available.\n\n" \
"Options:\n" \ "Options:\n" \
USAGE_HUMAN_READABLE( \ USAGE_HUMAN_READABLE( \
"\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \ "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
"\t-m\tprint sizes in megabytes\n" \ "\t-m\tprint sizes in megabytes\n" \
"\t-k\tprint sizes in kilobytes(default)", \ "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
"\n\t-k\tprint sizes in kilobytes(compatability)") "\n\t-k\tprint sizes in kilobytes(compatability)")
#define dirname_trivial_usage \ #define dirname_trivial_usage \
@ -184,7 +186,7 @@
"\t-X\tVerbose extract" "\t-X\tVerbose extract"
#define du_trivial_usage \ #define du_trivial_usage \
"[-ls" USAGE_HUMAN_READABLE("hm", "") "k] [FILE]..." "[-ls" USAGE_HUMAN_READABLE("hm") USAGE_NOT_HUMAN_READABLE("") "k] [FILE]..."
#define du_full_usage \ #define du_full_usage \
"Summarizes disk space used for each FILE and/or directory.\n" \ "Summarizes disk space used for each FILE and/or directory.\n" \
"Disk space is printed in units of 1024 bytes.\n\n" \ "Disk space is printed in units of 1024 bytes.\n\n" \
@ -194,8 +196,7 @@
USAGE_HUMAN_READABLE( \ USAGE_HUMAN_READABLE( \
"\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \ "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
"\t-m\tprint sizes in megabytes\n" \ "\t-m\tprint sizes in megabytes\n" \
"\t-k\tprint sizes in kilobytes(default)" \ "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
, \
"\n\t-k\tprint sizes in kilobytes(compatability)") "\n\t-k\tprint sizes in kilobytes(compatability)")
#define dumpkmap_trivial_usage \ #define dumpkmap_trivial_usage \
@ -524,7 +525,7 @@
#define USAGE_AUTOWIDTH(a) #define USAGE_AUTOWIDTH(a)
#endif #endif
#define ls_trivial_usage \ #define ls_trivial_usage \
"[-1Aa" USAGE_LS_TIMESTAMPS("c") "Cd" USAGE_LS_TIMESTAMPS("e") USAGE_LS_FILETYPES("F") "iln" USAGE_LS_FILETYPES("p") USAGE_LS_FOLLOWLINKS("L") USAGE_LS_RECURSIVE("R") USAGE_LS_SORTFILES("rS") "s" USAGE_AUTOWIDTH("T") USAGE_LS_TIMESTAMPS("tu") USAGE_LS_SORTFILES("v") USAGE_AUTOWIDTH("w") "x" USAGE_LS_SORTFILES("X") USAGE_HUMAN_READABLE("h", "") "k] [filenames...]" "[-1Aa" USAGE_LS_TIMESTAMPS("c") "Cd" USAGE_LS_TIMESTAMPS("e") USAGE_LS_FILETYPES("F") "iln" USAGE_LS_FILETYPES("p") USAGE_LS_FOLLOWLINKS("L") USAGE_LS_RECURSIVE("R") USAGE_LS_SORTFILES("rS") "s" USAGE_AUTOWIDTH("T") USAGE_LS_TIMESTAMPS("tu") USAGE_LS_SORTFILES("v") USAGE_AUTOWIDTH("w") "x" USAGE_LS_SORTFILES("X") USAGE_HUMAN_READABLE("h") USAGE_NOT_HUMAN_READABLE("") "k] [filenames...]"
#define ls_full_usage \ #define ls_full_usage \
"List directory contents\n\n" \ "List directory contents\n\n" \
"Options:\n" \ "Options:\n" \
@ -554,7 +555,7 @@
USAGE_LS_SORTFILES("\t-X\tsort the listing by extension\n") \ USAGE_LS_SORTFILES("\t-X\tsort the listing by extension\n") \
USAGE_HUMAN_READABLE( \ USAGE_HUMAN_READABLE( \
"\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \ "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
"\t-k\tprint sizes in kilobytes(default)" , \ "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
"\t-k\tprint sizes in kilobytes(compatability)") "\t-k\tprint sizes in kilobytes(compatability)")
#define lsmod_trivial_usage \ #define lsmod_trivial_usage \

View File

@ -127,19 +127,21 @@
#ifdef BB_FEATURE_HUMAN_READABLE #ifdef BB_FEATURE_HUMAN_READABLE
#define USAGE_HUMAN_READABLE(a,b) a #define USAGE_HUMAN_READABLE(a) a
#define USAGE_NOT_HUMAN_READABLE(a)
#else #else
#define USAGE_HUMAN_READABLE(a,b) b #define USAGE_HUMAN_READABLE(a)
#define USAGE_NOT_HUMAN_READABLE(a) a
#endif #endif
#define df_trivial_usage \ #define df_trivial_usage \
"[-" USAGE_HUMAN_READABLE("hm", "") "k] [filesystem ...]" "[-" USAGE_HUMAN_READABLE("hm") USAGE_NOT_HUMAN_READABLE("") "k] [filesystem ...]"
#define df_full_usage \ #define df_full_usage \
"Print the filesystem space used and space available.\n\n" \ "Print the filesystem space used and space available.\n\n" \
"Options:\n" \ "Options:\n" \
USAGE_HUMAN_READABLE( \ USAGE_HUMAN_READABLE( \
"\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \ "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
"\t-m\tprint sizes in megabytes\n" \ "\t-m\tprint sizes in megabytes\n" \
"\t-k\tprint sizes in kilobytes(default)", \ "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
"\n\t-k\tprint sizes in kilobytes(compatability)") "\n\t-k\tprint sizes in kilobytes(compatability)")
#define dirname_trivial_usage \ #define dirname_trivial_usage \
@ -184,7 +186,7 @@
"\t-X\tVerbose extract" "\t-X\tVerbose extract"
#define du_trivial_usage \ #define du_trivial_usage \
"[-ls" USAGE_HUMAN_READABLE("hm", "") "k] [FILE]..." "[-ls" USAGE_HUMAN_READABLE("hm") USAGE_NOT_HUMAN_READABLE("") "k] [FILE]..."
#define du_full_usage \ #define du_full_usage \
"Summarizes disk space used for each FILE and/or directory.\n" \ "Summarizes disk space used for each FILE and/or directory.\n" \
"Disk space is printed in units of 1024 bytes.\n\n" \ "Disk space is printed in units of 1024 bytes.\n\n" \
@ -194,8 +196,7 @@
USAGE_HUMAN_READABLE( \ USAGE_HUMAN_READABLE( \
"\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \ "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
"\t-m\tprint sizes in megabytes\n" \ "\t-m\tprint sizes in megabytes\n" \
"\t-k\tprint sizes in kilobytes(default)" \ "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
, \
"\n\t-k\tprint sizes in kilobytes(compatability)") "\n\t-k\tprint sizes in kilobytes(compatability)")
#define dumpkmap_trivial_usage \ #define dumpkmap_trivial_usage \
@ -524,7 +525,7 @@
#define USAGE_AUTOWIDTH(a) #define USAGE_AUTOWIDTH(a)
#endif #endif
#define ls_trivial_usage \ #define ls_trivial_usage \
"[-1Aa" USAGE_LS_TIMESTAMPS("c") "Cd" USAGE_LS_TIMESTAMPS("e") USAGE_LS_FILETYPES("F") "iln" USAGE_LS_FILETYPES("p") USAGE_LS_FOLLOWLINKS("L") USAGE_LS_RECURSIVE("R") USAGE_LS_SORTFILES("rS") "s" USAGE_AUTOWIDTH("T") USAGE_LS_TIMESTAMPS("tu") USAGE_LS_SORTFILES("v") USAGE_AUTOWIDTH("w") "x" USAGE_LS_SORTFILES("X") USAGE_HUMAN_READABLE("h", "") "k] [filenames...]" "[-1Aa" USAGE_LS_TIMESTAMPS("c") "Cd" USAGE_LS_TIMESTAMPS("e") USAGE_LS_FILETYPES("F") "iln" USAGE_LS_FILETYPES("p") USAGE_LS_FOLLOWLINKS("L") USAGE_LS_RECURSIVE("R") USAGE_LS_SORTFILES("rS") "s" USAGE_AUTOWIDTH("T") USAGE_LS_TIMESTAMPS("tu") USAGE_LS_SORTFILES("v") USAGE_AUTOWIDTH("w") "x" USAGE_LS_SORTFILES("X") USAGE_HUMAN_READABLE("h") USAGE_NOT_HUMAN_READABLE("") "k] [filenames...]"
#define ls_full_usage \ #define ls_full_usage \
"List directory contents\n\n" \ "List directory contents\n\n" \
"Options:\n" \ "Options:\n" \
@ -554,7 +555,7 @@
USAGE_LS_SORTFILES("\t-X\tsort the listing by extension\n") \ USAGE_LS_SORTFILES("\t-X\tsort the listing by extension\n") \
USAGE_HUMAN_READABLE( \ USAGE_HUMAN_READABLE( \
"\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \ "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
"\t-k\tprint sizes in kilobytes(default)" , \ "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
"\t-k\tprint sizes in kilobytes(compatability)") "\t-k\tprint sizes in kilobytes(compatability)")
#define lsmod_trivial_usage \ #define lsmod_trivial_usage \

19
usage.h
View File

@ -127,19 +127,21 @@
#ifdef BB_FEATURE_HUMAN_READABLE #ifdef BB_FEATURE_HUMAN_READABLE
#define USAGE_HUMAN_READABLE(a,b) a #define USAGE_HUMAN_READABLE(a) a
#define USAGE_NOT_HUMAN_READABLE(a)
#else #else
#define USAGE_HUMAN_READABLE(a,b) b #define USAGE_HUMAN_READABLE(a)
#define USAGE_NOT_HUMAN_READABLE(a) a
#endif #endif
#define df_trivial_usage \ #define df_trivial_usage \
"[-" USAGE_HUMAN_READABLE("hm", "") "k] [filesystem ...]" "[-" USAGE_HUMAN_READABLE("hm") USAGE_NOT_HUMAN_READABLE("") "k] [filesystem ...]"
#define df_full_usage \ #define df_full_usage \
"Print the filesystem space used and space available.\n\n" \ "Print the filesystem space used and space available.\n\n" \
"Options:\n" \ "Options:\n" \
USAGE_HUMAN_READABLE( \ USAGE_HUMAN_READABLE( \
"\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \ "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
"\t-m\tprint sizes in megabytes\n" \ "\t-m\tprint sizes in megabytes\n" \
"\t-k\tprint sizes in kilobytes(default)", \ "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
"\n\t-k\tprint sizes in kilobytes(compatability)") "\n\t-k\tprint sizes in kilobytes(compatability)")
#define dirname_trivial_usage \ #define dirname_trivial_usage \
@ -184,7 +186,7 @@
"\t-X\tVerbose extract" "\t-X\tVerbose extract"
#define du_trivial_usage \ #define du_trivial_usage \
"[-ls" USAGE_HUMAN_READABLE("hm", "") "k] [FILE]..." "[-ls" USAGE_HUMAN_READABLE("hm") USAGE_NOT_HUMAN_READABLE("") "k] [FILE]..."
#define du_full_usage \ #define du_full_usage \
"Summarizes disk space used for each FILE and/or directory.\n" \ "Summarizes disk space used for each FILE and/or directory.\n" \
"Disk space is printed in units of 1024 bytes.\n\n" \ "Disk space is printed in units of 1024 bytes.\n\n" \
@ -194,8 +196,7 @@
USAGE_HUMAN_READABLE( \ USAGE_HUMAN_READABLE( \
"\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \ "\n\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
"\t-m\tprint sizes in megabytes\n" \ "\t-m\tprint sizes in megabytes\n" \
"\t-k\tprint sizes in kilobytes(default)" \ "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
, \
"\n\t-k\tprint sizes in kilobytes(compatability)") "\n\t-k\tprint sizes in kilobytes(compatability)")
#define dumpkmap_trivial_usage \ #define dumpkmap_trivial_usage \
@ -524,7 +525,7 @@
#define USAGE_AUTOWIDTH(a) #define USAGE_AUTOWIDTH(a)
#endif #endif
#define ls_trivial_usage \ #define ls_trivial_usage \
"[-1Aa" USAGE_LS_TIMESTAMPS("c") "Cd" USAGE_LS_TIMESTAMPS("e") USAGE_LS_FILETYPES("F") "iln" USAGE_LS_FILETYPES("p") USAGE_LS_FOLLOWLINKS("L") USAGE_LS_RECURSIVE("R") USAGE_LS_SORTFILES("rS") "s" USAGE_AUTOWIDTH("T") USAGE_LS_TIMESTAMPS("tu") USAGE_LS_SORTFILES("v") USAGE_AUTOWIDTH("w") "x" USAGE_LS_SORTFILES("X") USAGE_HUMAN_READABLE("h", "") "k] [filenames...]" "[-1Aa" USAGE_LS_TIMESTAMPS("c") "Cd" USAGE_LS_TIMESTAMPS("e") USAGE_LS_FILETYPES("F") "iln" USAGE_LS_FILETYPES("p") USAGE_LS_FOLLOWLINKS("L") USAGE_LS_RECURSIVE("R") USAGE_LS_SORTFILES("rS") "s" USAGE_AUTOWIDTH("T") USAGE_LS_TIMESTAMPS("tu") USAGE_LS_SORTFILES("v") USAGE_AUTOWIDTH("w") "x" USAGE_LS_SORTFILES("X") USAGE_HUMAN_READABLE("h") USAGE_NOT_HUMAN_READABLE("") "k] [filenames...]"
#define ls_full_usage \ #define ls_full_usage \
"List directory contents\n\n" \ "List directory contents\n\n" \
"Options:\n" \ "Options:\n" \
@ -554,7 +555,7 @@
USAGE_LS_SORTFILES("\t-X\tsort the listing by extension\n") \ USAGE_LS_SORTFILES("\t-X\tsort the listing by extension\n") \
USAGE_HUMAN_READABLE( \ USAGE_HUMAN_READABLE( \
"\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \ "\t-h\tprint sizes in human readable format (e.g., 1K 243M 2G )\n" \
"\t-k\tprint sizes in kilobytes(default)" , \ "\t-k\tprint sizes in kilobytes(default)") USAGE_NOT_HUMAN_READABLE( \
"\t-k\tprint sizes in kilobytes(compatability)") "\t-k\tprint sizes in kilobytes(compatability)")
#define lsmod_trivial_usage \ #define lsmod_trivial_usage \