]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(usage): Move to precede all other functions.
authorJim Meyering <jim@meyering.net>
Wed, 4 Oct 1995 21:19:28 +0000 (21:19 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 4 Oct 1995 21:19:28 +0000 (21:19 +0000)
src/join.c

index f54d3e58b8e2730bd3bd67ab1fd594c1786136c5..2e14ff6e8e479f1f0c05d7d1e970b565d057f145 100644 (file)
@@ -116,6 +116,48 @@ static struct option const longopts[] =
 /* Used to print non-joining lines */
 static struct line uni_blank;
 
+static void
+usage (status)
+     int status;
+{
+  if (status != 0)
+    fprintf (stderr, _("Try `%s --help' for more information.\n"),
+            program_name);
+  else
+    {
+      printf (_("\
+Usage: %s [OPTION]... FILE1 FILE2\n\
+"),
+             program_name);
+      printf (_("\
+For each pair of input lines with identical join fields, write a line to\n\
+standard output.  The default join field is the first, delimited\n\
+by whitespace.  When FILE1 or FILE2 (not both) is -, read standard input.\n\
+\n\
+  -a SIDE          print unpairable lines coming from file SIDE\n\
+  -e EMPTY         replace missing input fields with EMPTY\n\
+  -j FIELD         (Obsolescent) equivalent to `-1 FIELD -2 FIELD'\n\
+  -j1 FIELD        (Obsolescent) equivalent to `-1 FIELD'\n\
+  -j2 FIELD        (Obsolescent) equivalent to `-2 FIELD'\n\
+  -1 FIELD         join on this FIELD of file 1\n\
+  -2 FIELD         join on this FIELD of file 2\n\
+  -o FORMAT        obey FORMAT while constructing output line\n\
+  -t CHAR          use CHAR as input and output field separator\n\
+  -v SIDE          like -a SIDE, but suppress joined output lines\n\
+  --help           display this help and exit\n\
+  --version        output version information and exit\n\
+\n\
+Unless -t CHAR is given, leading blanks separate fields and are ignored,\n\
+else fields are separated by CHAR.  Any FIELD is a field number counted\n\
+from 1.  FORMAT is one or more comma or blank separated specifications,\n\
+each being `SIDE.FIELD' or `0'.  Default FORMAT outputs the join field,\n\
+the remaining fields from FILE1, the remaining fields from FILE2, all\n\
+separated by CHAR.\n\
+"));
+    }
+  exit (status);
+}
+
 static void
 ADD_FIELD (line, field, len)
      struct line *line;
@@ -738,45 +780,3 @@ main (argc, argv)
 
   exit (0);
 }
-
-static void
-usage (status)
-     int status;
-{
-  if (status != 0)
-    fprintf (stderr, _("Try `%s --help' for more information.\n"),
-            program_name);
-  else
-    {
-      printf (_("\
-Usage: %s [OPTION]... FILE1 FILE2\n\
-"),
-             program_name);
-      printf (_("\
-For each pair of input lines with identical join fields, write a line to\n\
-standard output.  The default join field is the first, delimited\n\
-by whitespace.  When FILE1 or FILE2 (not both) is -, read standard input.\n\
-\n\
-  -a SIDE          print unpairable lines coming from file SIDE\n\
-  -e EMPTY         replace missing input fields with EMPTY\n\
-  -j FIELD         (Obsolescent) equivalent to `-1 FIELD -2 FIELD'\n\
-  -j1 FIELD        (Obsolescent) equivalent to `-1 FIELD'\n\
-  -j2 FIELD        (Obsolescent) equivalent to `-2 FIELD'\n\
-  -1 FIELD         join on this FIELD of file 1\n\
-  -2 FIELD         join on this FIELD of file 2\n\
-  -o FORMAT        obey FORMAT while constructing output line\n\
-  -t CHAR          use CHAR as input and output field separator\n\
-  -v SIDE          like -a SIDE, but suppress joined output lines\n\
-  --help           display this help and exit\n\
-  --version        output version information and exit\n\
-\n\
-Unless -t CHAR is given, leading blanks separate fields and are ignored,\n\
-else fields are separated by CHAR.  Any FIELD is a field number counted\n\
-from 1.  FORMAT is one or more comma or blank separated specifications,\n\
-each being `SIDE.FIELD' or `0'.  Default FORMAT outputs the join field,\n\
-the remaining fields from FILE1, the remaining fields from FILE2, all\n\
-separated by CHAR.\n\
-"));
-    }
-  exit (status);
-}