summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cat.c2
-rw-r--r--src/cksum.c2
-rw-r--r--src/comm.c2
-rw-r--r--src/csplit.c4
-rw-r--r--src/cut.c2
-rw-r--r--src/expand.c2
-rw-r--r--src/fmt.c2
-rw-r--r--src/fold.c2
-rw-r--r--src/head.c3
-rw-r--r--src/join.c2
-rw-r--r--src/md5sum.c2
-rw-r--r--src/nl.c2
-rw-r--r--src/od.c3
-rw-r--r--src/paste.c2
-rw-r--r--src/pr.c5
-rw-r--r--src/ptx.c10
-rw-r--r--src/sort.c2
-rw-r--r--src/split.c2
-rw-r--r--src/sum.c2
-rw-r--r--src/tac.c2
-rw-r--r--src/tail.c6
-rw-r--r--src/tr.c2
-rw-r--r--src/tsort.c3
-rw-r--r--src/unexpand.c2
-rw-r--r--src/uniq.c2
-rw-r--r--src/wc.c2
26 files changed, 32 insertions, 40 deletions
diff --git a/src/cat.c b/src/cat.c
index a278a951f..8fe48e648 100644
--- a/src/cat.c
+++ b/src/cat.c
@@ -72,7 +72,7 @@ static int newlines2 = 0;
/* Count of non-fatal error conditions. */
static int exit_status = 0;
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/cksum.c b/src/cksum.c
index 81d745d80..ad389827a 100644
--- a/src/cksum.c
+++ b/src/cksum.c
@@ -260,7 +260,7 @@ cksum (char *file, int print_name)
return 0;
}
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/comm.c b/src/comm.c
index ef27f81dd..f2cf9953e 100644
--- a/src/comm.c
+++ b/src/comm.c
@@ -57,7 +57,7 @@ static struct option const long_options[] =
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/csplit.c b/src/csplit.c
index fe007eb5f..17fca156e 100644
--- a/src/csplit.c
+++ b/src/csplit.c
@@ -123,7 +123,7 @@ static void close_output_file PARAMS ((void));
static void create_output_file PARAMS ((void));
static void delete_all_files PARAMS ((void));
static void save_line_to_file PARAMS ((const struct cstring *line));
-static void usage PARAMS ((int status));
+void usage PARAMS ((int status));
/* The name this program was run with. */
char *program_name;
@@ -1496,7 +1496,7 @@ main (int argc, char **argv)
exit (EXIT_SUCCESS);
}
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/cut.c b/src/cut.c
index 801e8b8e3..e8047c95e 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -187,7 +187,7 @@ static struct option const longopts[] =
{0, 0, 0, 0}
};
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/expand.c b/src/expand.c
index 84f589a93..ecb4590b2 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -98,7 +98,7 @@ static struct option const longopts[] =
{NULL, 0, NULL, 0}
};
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/fmt.c b/src/fmt.c
index f0f7108ee..b944e3641 100644
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -262,7 +262,7 @@ static int next_prefix_indent;
paragraphs chosen by fmt_paragraph(). */
static int last_line_length;
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/fold.c b/src/fold.c
index 14868b343..e51bdde71 100644
--- a/src/fold.c
+++ b/src/fold.c
@@ -55,7 +55,7 @@ static struct option const longopts[] =
{NULL, 0, NULL, 0}
};
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/head.c b/src/head.c
index 474ff8bc5..a698c2dd8 100644
--- a/src/head.c
+++ b/src/head.c
@@ -76,7 +76,7 @@ static struct option const long_options[] =
{NULL, 0, NULL, 0}
};
-static void
+void
usage (int status)
{
if (status != 0)
@@ -342,7 +342,6 @@ main (int argc, char **argv)
}
-
while ((c = getopt_long (argc, argv, "c:n:qv", long_options, NULL)) != -1)
{
switch (c)
diff --git a/src/join.c b/src/join.c
index 72264f378..30c27c551 100644
--- a/src/join.c
+++ b/src/join.c
@@ -127,7 +127,7 @@ static struct line uni_blank;
/* If nonzero, ignore case when comparing join fields. */
static int ignore_case;
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/md5sum.c b/src/md5sum.c
index 5e364b524..480328583 100644
--- a/src/md5sum.c
+++ b/src/md5sum.c
@@ -93,7 +93,7 @@ static const struct option long_options[] =
{ NULL, 0, NULL, 0 }
};
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/nl.c b/src/nl.c
index c0f350018..cd4ce568d 100644
--- a/src/nl.c
+++ b/src/nl.c
@@ -165,7 +165,7 @@ static struct option const longopts[] =
/* Print a usage message and quit. */
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/od.c b/src/od.c
index 71545ecf1..1b4cf6539 100644
--- a/src/od.c
+++ b/src/od.c
@@ -37,7 +37,6 @@ typedef long double LONG_DOUBLE;
typedef double LONG_DOUBLE;
#endif
-
#if HAVE_VALUES_H
# include <values.h>
#endif
@@ -264,7 +263,7 @@ static struct option const long_options[] =
{NULL, 0, NULL, 0}
};
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/paste.c b/src/paste.c
index 4136133c4..21f7a0cb9 100644
--- a/src/paste.c
+++ b/src/paste.c
@@ -399,7 +399,7 @@ paste_serial (int nfiles, char **fnamptr)
return errors;
}
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/pr.c b/src/pr.c
index ed524f93e..c4c6790dc 100644
--- a/src/pr.c
+++ b/src/pr.c
@@ -29,7 +29,6 @@
Improve the printing of control prefixes.
-
Options:
+FIRST_PAGE[:LAST_PAGE]
@@ -270,7 +269,7 @@ static void pad_across_to PARAMS ((int position));
static void add_line_number PARAMS ((COLUMN *p));
static void getoptarg PARAMS ((char *arg, char switch_char, char *character,
int *number));
-static void usage PARAMS ((int status));
+void usage PARAMS ((int status));
static void print_files PARAMS ((int number_of_files, char **av));
static void init_parameters PARAMS ((int number_of_files));
static void init_header PARAMS ((char *filename, int desc));
@@ -2438,7 +2437,7 @@ cleanup (void)
/* Complain, print a usage message, and die. */
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/ptx.c b/src/ptx.c
index b086cb925..215c47531 100644
--- a/src/ptx.c
+++ b/src/ptx.c
@@ -176,7 +176,6 @@ int maximum_word_length;
/* Maximum width of any reference used. */
int reference_max_width;
-
/* Ignore and Only word tables. */
WORD_TABLE ignore_table; /* table of words to ignore */
@@ -269,7 +268,6 @@ size_t number_of_occurs[1]; /* number of used slots in occurs_table */
#define ALLOC_NEW_OCCURS(language) \
BUMP_ALLOC (occurs_table[language], number_of_occurs[language], 9, OCCURS)
-
/* Communication among output routines. */
/* Indicate if special output processing is requested for each character. */
@@ -1810,7 +1808,6 @@ generate_all_output (void)
int occurs_index; /* index of keyword entry being processed */
OCCURS *occurs_cursor; /* current keyword entry being processed */
-
/* The following assignments are useful to provide default values in case
line contexts or references are not used, in which case these variables
would never be computed. */
@@ -1823,7 +1820,6 @@ generate_all_output (void)
head.end = NULL;
head_truncation = 0;
-
/* Loop over all keyword occurrences. */
occurs_cursor = occurs_table[0];
@@ -1867,7 +1863,7 @@ generate_all_output (void)
| Print program identification and options, then exit. |
`------------------------------------------------------*/
-static void
+void
usage (int status)
{
if (status != EXIT_SUCCESS)
@@ -2064,8 +2060,8 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"),
break;
case 10:
- XARGMATCH (&output_format, "--format", optarg,
- format_args, format_vals, usage (1));
+ output_format = XARGMATCH ("--format", optarg,
+ format_args, format_vals);
}
}
diff --git a/src/sort.c b/src/sort.c
index 6e76059df..9636547eb 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -269,7 +269,7 @@ static int have_read_stdin;
/* Lists of key field comparisons to be tried. */
static struct keyfield keyhead;
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/split.c b/src/split.c
index 288ee5ec9..938c5d1df 100644
--- a/src/split.c
+++ b/src/split.c
@@ -77,7 +77,7 @@ static struct option const longopts[] =
{NULL, 0, NULL, 0}
};
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/sum.c b/src/sum.c
index bb97e10a0..2a956c504 100644
--- a/src/sum.c
+++ b/src/sum.c
@@ -51,7 +51,7 @@ static struct option const longopts[] =
{NULL, 0, NULL, 0}
};
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/tac.c b/src/tac.c
index b9841703e..b547296c9 100644
--- a/src/tac.c
+++ b/src/tac.c
@@ -109,7 +109,7 @@ static struct option const longopts[] =
{NULL, 0, NULL, 0}
};
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/tail.c b/src/tail.c
index a8edb5769..90d8d49b4 100644
--- a/src/tail.c
+++ b/src/tail.c
@@ -183,7 +183,7 @@ static struct option const long_options[] =
{NULL, 0, NULL, 0}
};
-static void
+void
usage (int status)
{
if (status != 0)
@@ -1268,8 +1268,8 @@ parse_options (int argc, char **argv,
if (optarg == NULL)
follow_mode = DEFAULT_FOLLOW_MODE;
else
- XARGMATCH (&follow_mode, "--follow", optarg,
- follow_mode_string, follow_mode_map, usage (1));
+ follow_mode = XARGMATCH ("--follow", optarg,
+ follow_mode_string, follow_mode_map);
break;
case CHAR_MAX + 1:
diff --git a/src/tr.c b/src/tr.c
index 88d1700bb..def9a3716 100644
--- a/src/tr.c
+++ b/src/tr.c
@@ -315,7 +315,7 @@ static struct option const long_options[] =
{NULL, 0, NULL, 0}
};
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/tsort.c b/src/tsort.c
index 418532d1b..270632ffe 100644
--- a/src/tsort.c
+++ b/src/tsort.c
@@ -77,7 +77,7 @@ static struct option const long_options[] =
{ NULL, 0, NULL, 0}
};
-static void
+void
usage (int status)
{
if (status != 0)
@@ -446,7 +446,6 @@ tsort (const char *file)
}
}
-
int
main (int argc, char **argv)
{
diff --git a/src/unexpand.c b/src/unexpand.c
index 5c4702494..7768c14cb 100644
--- a/src/unexpand.c
+++ b/src/unexpand.c
@@ -351,7 +351,7 @@ unexpand (void)
}
}
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/uniq.c b/src/uniq.c
index d02790c2e..9514fa10c 100644
--- a/src/uniq.c
+++ b/src/uniq.c
@@ -90,7 +90,7 @@ static struct option const longopts[] =
{NULL, 0, NULL, 0}
};
-static void
+void
usage (int status)
{
if (status != 0)
diff --git a/src/wc.c b/src/wc.c
index 9571fd9da..8e20e9104 100644
--- a/src/wc.c
+++ b/src/wc.c
@@ -71,7 +71,7 @@ static struct option const longopts[] =
{NULL, 0, NULL, 0}
};
-static void
+void
usage (int status)
{
if (status != 0)