summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2002-07-28 15:50:38 +0000
committerdwmalone <dwmalone@FreeBSD.org>2002-07-28 15:50:38 +0000
commit391a69a94dec4efb0008e3563a26d371d1f5e856 (patch)
tree8e29fe08965664418f6eba8ec0af45ce3e3a1136 /usr.bin
parent39f15130f8db0280fcc7ab01016155b08ce1bdd9 (diff)
downloadFreeBSD-src-391a69a94dec4efb0008e3563a26d371d1f5e856.zip
FreeBSD-src-391a69a94dec4efb0008e3563a26d371d1f5e856.tar.gz
ANSIify function definitions to avoid a warning.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ctags/C.c18
-rw-r--r--usr.bin/ctags/ctags.c11
-rw-r--r--usr.bin/ctags/fortran.c5
-rw-r--r--usr.bin/ctags/lisp.c2
-rw-r--r--usr.bin/ctags/print.c5
-rw-r--r--usr.bin/ctags/tree.c11
-rw-r--r--usr.bin/ctags/yacc.c4
-rw-r--r--usr.bin/dirname/dirname.c6
-rw-r--r--usr.bin/du/du.c23
9 files changed, 31 insertions, 54 deletions
diff --git a/usr.bin/ctags/C.c b/usr.bin/ctags/C.c
index c275b9f..c13e835 100644
--- a/usr.bin/ctags/C.c
+++ b/usr.bin/ctags/C.c
@@ -56,7 +56,7 @@ static int str_entry(int);
* read .c and .h files and call appropriate routines
*/
void
-c_entries()
+c_entries(void)
{
int c; /* current character */
int level; /* brace level */
@@ -259,7 +259,7 @@ c_entries()
* handle a function reference
*/
static int
-func_entry()
+func_entry(void)
{
int c; /* current character */
int level = 0; /* for matching '()' */
@@ -323,7 +323,7 @@ fnd:
* handle a line starting with a '#'
*/
static void
-hash_entry()
+hash_entry(void)
{
int c; /* character read */
int curline; /* line started on */
@@ -389,8 +389,7 @@ skip: if (c == '\n') { /* get rid of rest of define */
* handle a struct, union or enum entry
*/
static int
-str_entry(c)
- int c; /* current character */
+str_entry(int c) /* c is current character */
{
int curline; /* line started on */
char *sp; /* buffer pointer */
@@ -439,8 +438,7 @@ str_entry(c)
* skip over comment
*/
void
-skip_comment(t)
- int t; /* comment character */
+skip_comment(int t) /* t is comment character */
{
int c; /* character read */
int star; /* '*' flag */
@@ -471,8 +469,7 @@ skip_comment(t)
* skip to the end of a string or character constant.
*/
void
-skip_string(key)
- int key;
+skip_string(int key)
{
int c,
skip;
@@ -497,8 +494,7 @@ skip_string(key)
* skip to next char "key"
*/
int
-skip_key(key)
- int key;
+skip_key(int key)
{
int c,
skip,
diff --git a/usr.bin/ctags/ctags.c b/usr.bin/ctags/ctags.c
index 08de5aa..f92428f 100644
--- a/usr.bin/ctags/ctags.c
+++ b/usr.bin/ctags/ctags.c
@@ -86,9 +86,7 @@ void find_entries(char *);
static void usage(void);
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
static const char *outfile = "tags"; /* output file */
int aflag; /* -a: append to tags */
@@ -197,7 +195,7 @@ main(argc, argv)
}
static void
-usage()
+usage(void)
{
(void)fprintf(stderr, "usage: ctags [-BFTaduwvx] [-f tagsfile] file ...\n");
exit(1);
@@ -214,7 +212,7 @@ usage()
* the string CWHITE, else NO.
*/
void
-init()
+init(void)
{
int i;
const unsigned char *sp;
@@ -246,8 +244,7 @@ init()
* which searches the file.
*/
void
-find_entries(file)
- char *file;
+find_entries(char *file)
{
char *cp;
diff --git a/usr.bin/ctags/fortran.c b/usr.bin/ctags/fortran.c
index 6142845..ef6c45f 100644
--- a/usr.bin/ctags/fortran.c
+++ b/usr.bin/ctags/fortran.c
@@ -140,8 +140,7 @@ PF_funcs()
* do case-independent strcmp
*/
int
-cicmp(cp)
- const char *cp;
+cicmp(const char *cp)
{
int len;
char *bp;
@@ -157,7 +156,7 @@ cicmp(cp)
}
static void
-takeprec()
+takeprec(void)
{
for (; isspace(*lbp); ++lbp)
continue;
diff --git a/usr.bin/ctags/lisp.c b/usr.bin/ctags/lisp.c
index 9c94a69..3ac47df 100644
--- a/usr.bin/ctags/lisp.c
+++ b/usr.bin/ctags/lisp.c
@@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
* just look for (def or (DEF
*/
void
-l_entries()
+l_entries(void)
{
int special;
char *cp;
diff --git a/usr.bin/ctags/print.c b/usr.bin/ctags/print.c
index be64dca..a31ff93 100644
--- a/usr.bin/ctags/print.c
+++ b/usr.bin/ctags/print.c
@@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
* prepare it for printing.
*/
void
-getline()
+getline(void)
{
long saveftell;
int c;
@@ -98,8 +98,7 @@ getline()
* write out the tags
*/
void
-put_entries(node)
- NODE *node;
+put_entries(NODE *node)
{
if (node->left)
diff --git a/usr.bin/ctags/tree.c b/usr.bin/ctags/tree.c
index 77a5778..6c42f32 100644
--- a/usr.bin/ctags/tree.c
+++ b/usr.bin/ctags/tree.c
@@ -56,9 +56,7 @@ static void free_tree(NODE *);
* enter a new node in the tree
*/
void
-pfnote(name, ln)
- const char *name;
- int ln;
+pfnote(const char *name, int ln)
{
NODE *np;
char *fp;
@@ -98,9 +96,7 @@ pfnote(name, ln)
}
static void
-add_node(node, cur_node)
- NODE *node,
- *cur_node;
+add_node(NODE *node, NODE *cur_node)
{
int dif;
@@ -128,8 +124,7 @@ add_node(node, cur_node)
}
static void
-free_tree(node)
- NODE *node;
+free_tree(NODE *node)
{
while (node) {
if (node->right)
diff --git a/usr.bin/ctags/yacc.c b/usr.bin/ctags/yacc.c
index 9a1d946..e0e0dab 100644
--- a/usr.bin/ctags/yacc.c
+++ b/usr.bin/ctags/yacc.c
@@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$");
* find the yacc tags and put them in.
*/
void
-y_entries()
+y_entries(void)
{
int c;
char *sp;
@@ -123,7 +123,7 @@ y_entries()
* throw away lines up to the next "\n%%\n"
*/
void
-toss_yysec()
+toss_yysec(void)
{
int c; /* read character */
int state;
diff --git a/usr.bin/dirname/dirname.c b/usr.bin/dirname/dirname.c
index 67719cf..dc18ed2 100644
--- a/usr.bin/dirname/dirname.c
+++ b/usr.bin/dirname/dirname.c
@@ -52,9 +52,7 @@ __FBSDID("$FreeBSD$");
void usage(void);
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
char *p;
int ch;
@@ -78,7 +76,7 @@ main(argc, argv)
}
void
-usage()
+usage(void)
{
(void)fprintf(stderr, "usage: dirname path\n");
diff --git a/usr.bin/du/du.c b/usr.bin/du/du.c
index d6cbb4f..ef05fc7 100644
--- a/usr.bin/du/du.c
+++ b/usr.bin/du/du.c
@@ -104,9 +104,7 @@ void ignoreclean(void);
int ignorep(FTSENT *);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
FTS *fts;
FTSENT *p;
@@ -317,8 +315,7 @@ typedef struct _ID {
int
-linkchk(p)
- FTSENT *p;
+linkchk(FTSENT *p)
{
static ID *files;
static int maxfiles, nfiles;
@@ -349,8 +346,7 @@ linkchk(p)
*
*/
unit_t
-unit_adjust(val)
- double *val;
+unit_adjust(double *val)
{
double abval;
unit_t unit;
@@ -371,8 +367,7 @@ unit_adjust(val)
}
void
-prthumanval(bytes)
- double bytes;
+prthumanval(double bytes)
{
unit_t unit;
@@ -388,7 +383,7 @@ prthumanval(bytes)
}
static void
-usage()
+usage(void)
{
(void)fprintf(stderr,
"usage: du [-H | -L | -P] [-a | -s | -d depth] [-c] [-h | -k] [-x] [-I mask] [file ...]\n");
@@ -396,8 +391,7 @@ usage()
}
void
-ignoreadd(mask)
- const char *mask;
+ignoreadd(const char *mask)
{
struct ignentry *ign;
@@ -411,7 +405,7 @@ ignoreadd(mask)
}
void
-ignoreclean()
+ignoreclean(void)
{
struct ignentry *ign;
@@ -424,8 +418,7 @@ ignoreclean()
}
int
-ignorep(ent)
- FTSENT *ent;
+ignorep(FTSENT *ent)
{
struct ignentry *ign;
OpenPOWER on IntegriCloud