summaryrefslogtreecommitdiff
path: root/src/expand.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1992-11-08 20:19:58 +0000
committerJim Meyering <jim@meyering.net>1992-11-08 20:19:58 +0000
commit925487607cfed5d4e68ffa375bc17941934dba07 (patch)
treed9333d9e8759a18b2ea1b3550319491cce519cb0 /src/expand.c
parent40d0a06450310c7abc8b393f130fa76de682313d (diff)
downloadcoreutils-925487607cfed5d4e68ffa375bc17941934dba07.tar.xz
Declared lots of external functions and variables static.
Made several statically-initialized arrays `const'
Diffstat (limited to 'src/expand.c')
-rw-r--r--src/expand.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/expand.c b/src/expand.c
index 8e471379e..c45f2fc60 100644
--- a/src/expand.c
+++ b/src/expand.c
@@ -61,48 +61,48 @@ char *xmalloc ();
char *xrealloc ();
void error ();
-FILE *next_file ();
-void add_tabstop ();
-void expand ();
-void parse_tabstops ();
-void usage ();
-void validate_tabstops ();
+static FILE *next_file ();
+static void add_tabstop ();
+static void expand ();
+static void parse_tabstops ();
+static void usage ();
+static void validate_tabstops ();
/* If nonzero, convert blanks even after nonblank characters have been
read on the line. */
-int convert_entire_line;
+static int convert_entire_line;
/* If nonzero, the size of all tab stops. If zero, use `tab_list' instead. */
-int tab_size;
+static int tab_size;
/* Array of the explicit column numbers of the tab stops;
after `tab_list' is exhausted, each additional tab is replaced
by a space. The first column is column 0. */
-int *tab_list;
+static int *tab_list;
/* The index of the first invalid element of `tab_list',
where the next element can be added. */
-int first_free_tab;
+static int first_free_tab;
/* Null-terminated array of input filenames. */
-char **file_list;
+static char **file_list;
/* Default for `file_list' if no files are given on the command line. */
-char *stdin_argv[] =
+static char *stdin_argv[] =
{
"-", NULL
};
/* Nonzero if we have ever read standard input. */
-int have_read_stdin;
+static int have_read_stdin;
/* Status to return to the system. */
-int exit_status;
+static int exit_status;
/* The name this program was run with. */
char *program_name;
-struct option longopts[] =
+static struct option const longopts[] =
{
{"tabs", 1, NULL, 't'},
{"initial", 0, NULL, 'i'},
@@ -178,7 +178,7 @@ main (argc, argv)
/* Add the comma or blank separated list of tabstops STOPS
to the list of tabstops. */
-void
+static void
parse_tabstops (stops)
char *stops;
{
@@ -207,7 +207,7 @@ parse_tabstops (stops)
/* Add tab stop TABVAL to the end of `tab_list', except
if TABVAL is -1, do nothing. */
-void
+static void
add_tabstop (tabval)
int tabval;
{
@@ -221,7 +221,7 @@ add_tabstop (tabval)
/* Check that the list of tabstops TABS, with ENTRIES entries,
contains only nonzero, ascending values. */
-void
+static void
validate_tabstops (tabs, entries)
int *tabs;
int entries;
@@ -242,7 +242,7 @@ validate_tabstops (tabs, entries)
/* Change tabs to spaces, writing to stdout.
Read each file in `file_list', in order. */
-void
+static void
expand ()
{
FILE *fp; /* Input stream. */
@@ -323,7 +323,7 @@ expand ()
Open a filename of `-' as the standard input.
Return NULL if there are no more input files. */
-FILE *
+static FILE *
next_file (fp)
FILE *fp;
{
@@ -366,7 +366,7 @@ next_file (fp)
return NULL;
}
-void
+static void
usage ()
{
fprintf (stderr, "\