summaryrefslogtreecommitdiffstats
path: root/sbin/fsdb/fsdb.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-03-21 13:10:52 +0000
committerimp <imp@FreeBSD.org>2002-03-21 13:10:52 +0000
commit611240d8bc587f7f5915144254d2e6b3bd93d782 (patch)
tree3e13d718c267505bb9b3d399078f639dcce5db19 /sbin/fsdb/fsdb.c
parent6932067f77abdb8f67f1d4d9a2bb43eed71767c2 (diff)
downloadFreeBSD-src-611240d8bc587f7f5915144254d2e6b3bd93d782.zip
FreeBSD-src-611240d8bc587f7f5915144254d2e6b3bd93d782.tar.gz
o __P removal.
o ansi function definitions. o main prototype removal o unifdef __STDC__
Diffstat (limited to 'sbin/fsdb/fsdb.c')
-rw-r--r--sbin/fsdb/fsdb.c45
1 files changed, 16 insertions, 29 deletions
diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c
index ce96e21..8ee5a69 100644
--- a/sbin/fsdb/fsdb.c
+++ b/sbin/fsdb/fsdb.c
@@ -49,11 +49,11 @@ static const char rcsid[] =
#include "fsdb.h"
#include "fsck.h"
-static void usage __P((void));
-int cmdloop __P((void));
+static void usage(void) __dead2;
+int cmdloop(void);
static void
-usage()
+usage(void)
{
fprintf(stderr, "usage: fsdb [-d] [-f] [-r] fsname\n");
exit(1);
@@ -69,9 +69,7 @@ char nflag;
* the file system.
*/
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int ch, rval;
char *fsys = NULL;
@@ -117,10 +115,8 @@ main(argc, argv)
exit(rval);
}
-#define CMDFUNC(func) int func __P((int argc, char *argv[]))
-#define CMDFUNCSTART(func) int func(argc, argv) \
- int argc; \
- char *argv[];
+#define CMDFUNC(func) int func(int argc, char *argv[])
+#define CMDFUNCSTART(func) int func(int argc, char *argv[])
CMDFUNC(helpfn);
CMDFUNC(focus); /* focus on inode */
@@ -186,9 +182,7 @@ struct cmdtable cmds[] = {
};
int
-helpfn(argc, argv)
- int argc;
- char *argv[];
+helpfn(int argc, char *argv[])
{
struct cmdtable *cmdtp;
@@ -202,8 +196,7 @@ helpfn(argc, argv)
}
char *
-prompt(el)
- EditLine *el;
+prompt(EditLine *el)
{
static char pstring[64];
snprintf(pstring, sizeof(pstring), "fsdb (inum: %d)> ", curinum);
@@ -212,7 +205,7 @@ prompt(el)
int
-cmdloop()
+cmdloop(void)
{
char *line;
const char *elline;
@@ -392,8 +385,7 @@ const char *typename[] = {
int slot;
int
-scannames(idesc)
- struct inodesc *idesc;
+scannames(struct inodesc *idesc)
{
struct direct *dirp = idesc->id_dirp;
@@ -419,12 +411,11 @@ CMDFUNCSTART(ls)
return 0;
}
-int findino __P((struct inodesc *idesc)); /* from fsck */
-static int dolookup __P((char *name));
+int findino(struct inodesc *idesc); /* from fsck */
+static int dolookup(char *name);
static int
-dolookup(name)
- char *name;
+dolookup(char *name)
{
struct inodesc idesc;
@@ -514,8 +505,7 @@ CMDFUNCSTART(rm)
long slotcount, desired;
int
-chinumfunc(idesc)
- struct inodesc *idesc;
+chinumfunc(struct inodesc *idesc)
{
struct direct *dirp = idesc->id_dirp;
@@ -558,8 +548,7 @@ CMDFUNCSTART(chinum)
}
int
-chnamefunc(idesc)
- struct inodesc *idesc;
+chnamefunc(struct inodesc *idesc)
{
struct direct *dirp = idesc->id_dirp;
struct direct testdir;
@@ -822,9 +811,7 @@ CMDFUNCSTART(chgroup)
}
int
-dotime(name, rts)
- char *name;
- struct timespec *rts;
+dotime(char *name, struct timespec *rts)
{
char *p, *val;
struct tm t;
OpenPOWER on IntegriCloud