diff options
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/chroot.c | 2 | ||||
-rw-r--r-- | coreutils/cp.c | 2 | ||||
-rw-r--r-- | coreutils/date.c | 2 | ||||
-rw-r--r-- | coreutils/dd.c | 5 | ||||
-rw-r--r-- | coreutils/ln.c | 6 | ||||
-rw-r--r-- | coreutils/mkdir.c | 7 | ||||
-rw-r--r-- | coreutils/mknod.c | 6 | ||||
-rw-r--r-- | coreutils/mv.c | 2 | ||||
-rw-r--r-- | coreutils/rm.c | 3 | ||||
-rw-r--r-- | coreutils/rmdir.c | 2 | ||||
-rw-r--r-- | coreutils/sleep.c | 4 | ||||
-rw-r--r-- | coreutils/sync.c | 2 | ||||
-rw-r--r-- | coreutils/touch.c | 4 | ||||
-rw-r--r-- | coreutils/uname.c | 5 |
14 files changed, 27 insertions, 25 deletions
diff --git a/coreutils/chroot.c b/coreutils/chroot.c index 8e432b3..16524d9 100644 --- a/coreutils/chroot.c +++ b/coreutils/chroot.c @@ -27,7 +27,7 @@ #include <errno.h> -static const char chroot_usage[] = "NEWROOT [COMMAND...]\n" +static const char chroot_usage[] = "chroot NEWROOT [COMMAND...]\n\n" "Run COMMAND with root directory set to NEWROOT.\n"; diff --git a/coreutils/cp.c b/coreutils/cp.c index 9dac2af..57158c8 100644 --- a/coreutils/cp.c +++ b/coreutils/cp.c @@ -28,7 +28,7 @@ #include <dirent.h> static const char cp_usage[] = "cp [OPTION]... SOURCE DEST\n" - " or: cp [OPTION]... SOURCE... DIRECTORY\n" + " or: cp [OPTION]... SOURCE... DIRECTORY\n\n" "Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.\n" "\n" "\t-a\tsame as -dpR\n" diff --git a/coreutils/date.c b/coreutils/date.c index 501ccc2..6be89df 100644 --- a/coreutils/date.c +++ b/coreutils/date.c @@ -35,7 +35,7 @@ mail commands */ static const char date_usage[] = "date [OPTION]... [+FORMAT]\n" -" or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]\n" +" or: date [OPTION] [MMDDhhmm[[CC]YY][.ss]]\n\n" "Display the current time in the given FORMAT, or set the system date.\n" "\nOptions:\n\t-R\t\toutput RFC-822 compliant date string\n" "\t-s\t\tset time described by STRING\n" diff --git a/coreutils/dd.c b/coreutils/dd.c index 33c4594..800ed59 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c @@ -34,7 +34,7 @@ #include <errno.h> static const char dd_usage[] = -"dd [if=name] [of=name] [bs=n] [count=n]\n" +"dd [if=name] [of=name] [bs=n] [count=n]\n\n" "Copy a file, converting and formatting according to options\n\n" "\tif=FILE\tread from FILE instead of stdin\n" "\tof=FILE\twrite to FILE instead of stout\n" @@ -227,8 +227,7 @@ extern int dd_main (int argc, char **argv) exit( TRUE); usage: - fprintf (stderr, "%s", dd_usage); - exit( FALSE); + usage( dd_usage); } diff --git a/coreutils/ln.c b/coreutils/ln.c index 62496fb..60fe394 100644 --- a/coreutils/ln.c +++ b/coreutils/ln.c @@ -27,9 +27,9 @@ #include <errno.h> -static const char ln_usage[] = "ln [OPTION] TARGET... LINK_NAME|DIRECTORY\n" -"Create a link named LINK_NAME or DIRECTORY to the specified TARGET\n" -"\nOptions:\n" +static const char ln_usage[] = "ln [OPTION] TARGET... LINK_NAME|DIRECTORY\n\n" +"Create a link named LINK_NAME or DIRECTORY to the specified TARGET\n\n" +"Options:\n" "\t-s\tmake symbolic links instead of hard links\n" "\t-f\tremove existing destination files\n"; diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index 0d0a90e..4c7ebed 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c @@ -26,10 +26,11 @@ #include <errno.h> #include <sys/param.h> -static const char mkdir_usage[] = "Usage: mkdir [OPTION] DIRECTORY...\n" +static const char mkdir_usage[] = "Usage: mkdir [OPTION] DIRECTORY...\n\n" "Create the DIRECTORY(ies), if they do not already exist\n\n" -"-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n" -"-p\tno error if existing, make parent directories as needed\n"; +"Options:\n" +"\t-m\tset permission mode (as in chmod), not rwxrwxrwx - umask\n" +"\t-p\tno error if existing, make parent directories as needed\n"; static int parentFlag = FALSE; diff --git a/coreutils/mknod.c b/coreutils/mknod.c index 81c846b..c3389cc 100644 --- a/coreutils/mknod.c +++ b/coreutils/mknod.c @@ -27,9 +27,9 @@ #include <fcntl.h> #include <unistd.h> -static const char mknod_usage[] = "mknod file b|c|u|p major minor\n" -"\tMake special files.\n" -"\n" +static const char mknod_usage[] = "mknod [OPTION]... NAME TYPE MAJOR MINOR\n\n" +"Make block or character special files.\n\n" +"Options:\n" "\tb:\tMake a block (buffered) device.\n" "\tc or u:\tMake a character (un-buffered) device.\n" "\tp:\tMake a named pipe. Major and minor are ignored for named pipes.\n"; diff --git a/coreutils/mv.c b/coreutils/mv.c index e502250..b861ab7 100644 --- a/coreutils/mv.c +++ b/coreutils/mv.c @@ -29,7 +29,7 @@ static const char mv_usage[] = "mv SOURCE DEST\n" -" or: mv SOURCE... DIRECTORY\n" +" or: mv SOURCE... DIRECTORY\n\n" "Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.\n"; diff --git a/coreutils/rm.c b/coreutils/rm.c index 077e792..e6132ab 100644 --- a/coreutils/rm.c +++ b/coreutils/rm.c @@ -27,8 +27,9 @@ #include <utime.h> #include <dirent.h> -static const char* rm_usage = "rm [OPTION]... FILE...\n" +static const char* rm_usage = "rm [OPTION]... FILE...\n\n" "Remove (unlink) the FILE(s).\n\n" +"Options:\n" "\t-f\tremove existing destinations, never prompt\n" "\t-r\tremove the contents of directories recursively\n"; diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c index 56b8387..013fef1 100644 --- a/coreutils/rmdir.c +++ b/coreutils/rmdir.c @@ -29,7 +29,7 @@ extern int rmdir_main(int argc, char **argv) { if ( argc==1 || **(argv+1) == '-' ) { - usage( "rmdir [OPTION]... DIRECTORY...\nRemove the DIRECTORY(ies), if they are empty."); + usage( "rmdir [OPTION]... DIRECTORY...\n\nRemove the DIRECTORY(ies), if they are empty.\n"); } while (--argc > 0) { diff --git a/coreutils/sleep.c b/coreutils/sleep.c index 8266978..bfbb78f 100644 --- a/coreutils/sleep.c +++ b/coreutils/sleep.c @@ -23,8 +23,8 @@ #include "internal.h" #include <stdio.h> -const char sleep_usage[] = " NUMBER\n" -"Pause for NUMBER seconds.\n"; +const char sleep_usage[] = "sleep N\n\n" +"Pause for N seconds.\n"; extern int sleep_main(int argc, char * * argv) diff --git a/coreutils/sync.c b/coreutils/sync.c index cb4690c..145ed1e 100644 --- a/coreutils/sync.c +++ b/coreutils/sync.c @@ -27,7 +27,7 @@ extern int sync_main(int argc, char * * argv) { if ( argc>1 && **(argv+1) == '-' ) { - usage( "sync\nWrite all buffered filesystem blocks to disk.\n"); + usage( "sync\n\nWrite all buffered filesystem blocks to disk.\n"); } exit( sync()); } diff --git a/coreutils/touch.c b/coreutils/touch.c index b98a2e4..d2d3e94 100644 --- a/coreutils/touch.c +++ b/coreutils/touch.c @@ -31,7 +31,7 @@ static const char touch_usage[] = "touch [-c] file [file ...]\n\n" -"\tUpdate the last-modified date on the given file[s].\n"; +"Update the last-modified date on the given file[s].\n"; @@ -54,7 +54,7 @@ touch_main(int argc, char **argv) create = FALSE; break; default: - fprintf(stderr, "Unknown option: %c\n", **argv); + usage( touch_usage); exit( FALSE); } argc--; diff --git a/coreutils/uname.c b/coreutils/uname.c index b54deb3..9083edb 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c @@ -41,8 +41,9 @@ static const char uname_usage[] = - "uname [OPTION]...\n" - "Print certain system information. With no OPTION, same as -s.\n" + "uname [OPTION]...\n\n" + "Print certain system information. With no OPTION, same as -s.\n\n" + "Options:\n" "\t-a\tprint all information\n" "\t-m\tthe machine (hardware) type\n" "\t-n\tprint the machine's network node hostname\n" |