ex= 1;
}
-static void perr(label) char *label;
+static void perr(char *label)
{
fprintf(stderr, "%s: %s: %s\n", arg0, label, strerror(errno));
ex= 1;
}
-static void perrx(label) char *label;
+static void perrx(char *label)
{
perr(label);
exit(1);
/* Support for per achitecture hidden files. */
static int transparent= 0;
-static void isvisible(name) char *name;
+static void isvisible(char *name)
{
char *p= name + strlen(name);
#define isvisible(name) ((void) 0)
#endif
-static void isbackup(slave) int slave;
+static void isbackup(int slave)
{
if ((filemodes= open(BACKUP, slave ? O_RDONLY : O_RDWR)) >= 0)
backup= 1;
static char *Slinkpath=nil; /* Either nil or Slnkpth. */
static struct stat Sst; /* Slave's stat(2). */
-static char *addpath(p, n) char *p, *n;
+static char *addpath(char *p, char *n)
/* Add a name to the path, return pointer to end. */
{
if (p - path + 1 + strlen(n) > PATH_MAX) {
static struct entry *E= nil; /* File being processed. */
-static void setpath(e) struct entry *e;
+static void setpath(struct entry *e)
/* Set path leading to e. */
{
static char *pend;
}
}
-static void sort(ae) struct entry **ae;
+static void sort(struct entry **ae)
/* This is either a stable mergesort, or thermal noise, I'm no longer sure.
* It must be called like this: if (L!=nil && L->next!=nil) sort(&L);
*/
return name;
}
-static void setstat(ino, stp) ino_t ino; struct stat *stp;
+static void setstat(ino_t ino, struct stat *stp)
/* Set backup status info, we know that backup is true. */
{
struct mode md;
) perrx(BACKUP);
}
-static int getstat(name, stp) char *name; struct stat *stp;
+static int getstat(char *name, struct stat *stp)
/* Get status information of file name, skipping some files. Backup info
* is inserted as needed.
*/
buckn= 0;
}
-static void inform(a) enum answers a;
+static void inform(enum answers a)
/* Slave replies to master. */
{
DPRINTF("%s: inform(%s)\n", ANSWERS[(int) a - (int) PATH]);
#define wwrite(buf, n) (memcpy(buckp, (buf), (n)), buckp+= (n), buckn+= (n))
-static void sendnum(n) long n;
+static void sendnum(long n)
/* Send number from least to most significant byte. */
{
#if BYTE_ORDER == LITTLE_ENDIAN
#endif
}
-static void send(buf, n) char *buf; int n;
+static void send(char *buf, int n)
/* Slave sends size and contents of buf. */
{
sendnum((long) n);
if (n > 0) wwrite(buf, (size_t) n);
}
-static void sendstat(stp) struct stat *stp;
+static void sendstat(struct stat *stp)
{
sendnum((long) stp->st_mode);
sendnum((long) stp->st_uid);
} while (state != die);
}
-static int execute(argv) char **argv;
+static int execute(char **argv)
/* Execute a command and return its success or failure. */
{
int pid, r, status;
return status == 0;
}
-static int removedir(dir) char *dir;
+static int removedir(char *dir)
/* Remove a directory and its contents. */
{
static char *argv[] = { "rm", "-r", nil, nil };
return execute(argv);
}
-static void order(o) enum orders o;
+static void order(enum orders o)
/* Master tells slave what to do. */
{
char c= (char) o;
if (write(chan[1], &c, 1) != 1) perrx("order()");
}
-static void rread(buf, n) char *buf; int n;
+static void rread(char *buf, int n)
/* Master gets buf of size n from slave, doing multiple reads if needed. */
{
int r;
#endif
}
-static int receive(buf, max) char *buf; int max;
+static int receive(char *buf, int max)
/* Master get's data from slave, by first reading size, then data. */
{
int n;
return n;
}
-static void recstat(stp) struct stat *stp;
+static void recstat(struct stat *stp)
{
stp->st_mode= recnum();
stp->st_uid= recnum();
return c;
}
-static int ask(def) int def;
+static int ask(int def)
/* Ask for a yes or no, anything else means choose def. */
{
int y, c;
return y == 'y' || y == 'Y';
}
-static void setmodes(silent) int silent;
+static void setmodes(int silent)
{
struct stat st;
int change= 0;
static int busy= 0;
-static void bail_out(sig) int sig;
+static void bail_out(int sig)
{
signal(sig, SIG_IGN);
exit(sig);
}
-static int makenode(name, mode, addr, size)
- char *name; int mode; dev_t addr; off_t size;
+static int makenode(char *name, int mode, dev_t addr, off_t size)
{
int r;
return r;
}
-static void add(update) int update;
+static void add(int update)
/* Add Spath to the filesystem. */
{
int f, n;
setmodes(1);
}
-static int delete(update) int update;
+static int delete(int update)
/* Delete path. */
{
int forced_update= force && update;
#define P_EXIT 1 /* Make sure process doesn't return. */
#define P_SHADOW 2 /* Always use exec on 68000. */
-static void startprocess(proc, machine, path, p_flags)
- void (*proc)(); char *machine, *path; int p_flags;
+static void startprocess(void (*proc)(), char *machine, char *path,
+ int p_flags)
{
char *argv[10], **argp= argv;
char flags[10], *pfl= flags;
perrx(argv[0]);
}
-void splitcolon(path, amach, adir) char *path, **amach, **adir;
+void splitcolon(char *path, char **amach, char **adir)
{
char *dir= path;
exit(1);
}
-int main(argc, argv) int argc; char **argv;
+int main(int argc, char **argv)
{
char *s_mach, *s_dir;
char *m_mach, *m_dir;