ANSIify function definitions to avoid a warning.

This commit is contained in:
dwmalone 2002-07-28 15:50:38 +00:00
parent 39f15130f8
commit 391a69a94d
9 changed files with 31 additions and 54 deletions

View File

@ -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 @@ func_entry()
* 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,

View File

@ -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;

View File

@ -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;

View File

@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
* just look for (def or (DEF
*/
void
l_entries()
l_entries(void)
{
int special;
char *cp;

View File

@ -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)

View File

@ -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)

View File

@ -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;

View File

@ -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");

View File

@ -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;