summaryrefslogtreecommitdiffstats
path: root/sbin/restore/interactive.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-03-20 22:49:40 +0000
committerimp <imp@FreeBSD.org>2002-03-20 22:49:40 +0000
commit69763106f0fd2b6bc5d1d93ba49d88ca38ea3c56 (patch)
tree07ff12515683ef4e24a284e242c874bd8b92d427 /sbin/restore/interactive.c
parent2e58ec02712d7b8dffd130dacaad2ad7c24c592b (diff)
downloadFreeBSD-src-69763106f0fd2b6bc5d1d93ba49d88ca38ea3c56.zip
FreeBSD-src-69763106f0fd2b6bc5d1d93ba49d88ca38ea3c56.tar.gz
o remove __P
o Use ANSI function definitions o unifdef -D__STDC__
Diffstat (limited to 'sbin/restore/interactive.c')
-rw-r--r--sbin/restore/interactive.c56
1 files changed, 19 insertions, 37 deletions
diff --git a/sbin/restore/interactive.c b/sbin/restore/interactive.c
index e04f48e..54f16e3 100644
--- a/sbin/restore/interactive.c
+++ b/sbin/restore/interactive.c
@@ -81,20 +81,20 @@ struct arglist {
char *cmd; /* the current command */
};
-static char *copynext __P((char *, char *));
-static int fcmp __P((const void *, const void *));
-static void formatf __P((struct afile *, int));
-static void getcmd __P((char *, char *, char *, int, struct arglist *));
-struct dirent *glob_readdir __P((RST_DIR *dirp));
-static int glob_stat __P((const char *, struct stat *));
-static void mkentry __P((char *, struct direct *, struct afile *));
-static void printlist __P((char *, char *));
+static char *copynext(char *, char *);
+static int fcmp(const void *, const void *);
+static void formatf(struct afile *, int);
+static void getcmd(char *, char *, char *, int, struct arglist *);
+struct dirent *glob_readdir(RST_DIR *dirp);
+static int glob_stat(const char *, struct stat *);
+static void mkentry(char *, struct direct *, struct afile *);
+static void printlist(char *, char *);
/*
* Read and execute commands from the terminal.
*/
void
-runcmdshell()
+runcmdshell(void)
{
struct entry *np;
ino_t ino;
@@ -302,10 +302,7 @@ loop:
* eliminate any embedded ".." components.
*/
static void
-getcmd(curdir, cmd, name, size, ap)
- char *curdir, *cmd, *name;
- struct arglist *ap;
- int size;
+getcmd(char *curdir, char *cmd, char *name, int size, struct arglist *ap)
{
char *cp;
static char input[BUFSIZ];
@@ -390,8 +387,7 @@ retnext:
* Strip off the next token of the input.
*/
static char *
-copynext(input, output)
- char *input, *output;
+copynext(char *input, char *output)
{
char *cp, *bp;
char quote;
@@ -440,9 +436,7 @@ copynext(input, output)
* remove any embedded "." and ".." components.
*/
void
-canon(rawname, canonname, len)
- char *rawname, *canonname;
- int len;
+canon(char *rawname, char *canonname, int len)
{
char *cp, *np;
@@ -496,9 +490,7 @@ canon(rawname, canonname, len)
* Do an "ls" style listing of a directory
*/
static void
-printlist(name, basename)
- char *name;
- char *basename;
+printlist(char *name, char *basename)
{
struct afile *fp, *list, *listp;
struct direct *dp;
@@ -580,10 +572,7 @@ printlist(name, basename)
* Read the contents of a directory.
*/
static void
-mkentry(name, dp, fp)
- char *name;
- struct direct *dp;
- struct afile *fp;
+mkentry(char *name, struct direct *dp, struct afile *fp)
{
char *cp;
struct entry *np;
@@ -643,9 +632,7 @@ mkentry(name, dp, fp)
* Print out a pretty listing of a directory
*/
static void
-formatf(list, nentry)
- struct afile *list;
- int nentry;
+formatf(struct afile *list, int nentry)
{
struct afile *fp, *endlist;
int width, bigino, haveprefix, havepostfix;
@@ -716,8 +703,7 @@ formatf(list, nentry)
#undef d_ino
struct dirent *
-glob_readdir(dirp)
- RST_DIR *dirp;
+glob_readdir(RST_DIR *dirp)
{
struct direct *dp;
static struct dirent adirent;
@@ -740,9 +726,7 @@ glob_readdir(dirp)
* Return st_mode information in response to stat or lstat calls
*/
static int
-glob_stat(name, stp)
- const char *name;
- struct stat *stp;
+glob_stat(const char *name, struct stat *stp)
{
struct direct *dp;
@@ -761,8 +745,7 @@ glob_stat(name, stp)
* Comparison routine for qsort.
*/
static int
-fcmp(f1, f2)
- const void *f1, *f2;
+fcmp(const void *f1, const void *f2)
{
return (strcmp(((struct afile *)f1)->fname,
((struct afile *)f2)->fname));
@@ -772,8 +755,7 @@ fcmp(f1, f2)
* respond to interrupts
*/
void
-onintr(signo)
- int signo;
+onintr(int signo)
{
if (command == 'i' && runshell)
longjmp(reset, 1);
OpenPOWER on IntegriCloud