Lazy BNF / EBNF Help Messages
authorMarkus Bröker <mbroeker@largo.dyndns.tv>
Thu, 16 Apr 2009 12:49:13 +0200
changeset 61 4b4c97f179da
parent 60 47c13ca8c4d0
child 62 b7061c0e239f
Lazy BNF / EBNF Help Messages committer: Markus Bröker <mbroeker@largo.homelinux.org>
base10.c
dnsresolve.c
gauss.c
lotto.c
max.c
recording.c
testcase.c
tree.c
--- a/base10.c
+++ b/base10.c
@@ -47,7 +47,7 @@
     int i;
 
     if (argc != 2) {
-        printf ("Usage: %s [value]\n", argv[0]);
+        printf ("Usage: %s <value>\n", argv[0]);
         return EXIT_FAILURE;
     }
 
--- a/dnsresolve.c
+++ b/dnsresolve.c
@@ -18,7 +18,7 @@
     int i = 0;
 
     if (argc != 2) {
-        fprintf (stderr, "Usage: %s hostname\n", argv[0]);
+        fprintf (stderr, "Usage: %s <hostname>\n", argv[0]);
         return EXIT_FAILURE;
     }
 
--- a/gauss.c
+++ b/gauss.c
@@ -96,7 +96,7 @@
     float **A;
 
     if (argc != 2) {
-        printf ("Benutzung: %s UNBEKANNTE\n", argv[0]);
+        printf ("Benutzung: %s <UNBEKANNTE>\n", argv[0]);
         printf ("Berechnet ein lineares Gleichungssystem mit n UNBEKANNTEN und n Zeilen ( nxn ).\n");
         printf ("Praktische Beispiele stehen in der README Datei.\n");
         return EXIT_FAILURE;
--- a/lotto.c
+++ b/lotto.c
@@ -184,7 +184,7 @@
             printf ("       -n: n-numbers from [1..end]\n");
             printf ("       -v: verbose output\n");
             printf ("       -w: verbose and wide output\n");
-            return 0;
+            return EXIT_SUCCESS;
         }
     }
 
--- a/max.c
+++ b/max.c
@@ -17,7 +17,7 @@
     unsigned int b;
 
     if (argc != 3) {
-        printf ("Usage: %s value1 value2\n", argv[0]);
+        printf ("Usage: %s <integer> <integer>\n", argv[0]);
         return EXIT_FAILURE;
     }
     a = atoi (argv[1]);
--- a/recording.c
+++ b/recording.c
@@ -36,7 +36,7 @@
      */
 
     if (argc != 2) {
-        printf ("Usage: %s <DEVICE>\n", argv[0]);
+        printf ("Usage: %s <device>\n", argv[0]);
         printf ("Example: %s /dev/dsp\n", argv[0]);
         printf ("Example: %s /dev/dsp1\n", argv[0]);
         return EXIT_FAILURE;
--- a/testcase.c
+++ b/testcase.c
@@ -15,7 +15,7 @@
     char *token;
 
     if (argc != 4) {
-        printf ("Usage: %s (char*)string (char*)delim1 (char*)delim2\n", argv[0]);
+        printf ("Usage: %s <string> <delim> <delim>\n", argv[0]);
         return EXIT_FAILURE;
     }
 
--- a/tree.c
+++ b/tree.c
@@ -51,7 +51,7 @@
     T *t, *next;
 
     if (argc != 3) {
-        printf ("Usage: %s elements rand_max\n", argv[0]);
+        printf ("Usage: %s <elements> <rand_max>\n", argv[0]);
         return EXIT_FAILURE;
     }