Skip to content

Commit

Permalink
remove __P
Browse files Browse the repository at this point in the history
  • Loading branch information
bsdimp committed Mar 22, 2002
1 parent 9f60923 commit f1bb2cd
Show file tree
Hide file tree
Showing 74 changed files with 389 additions and 421 deletions.
4 changes: 2 additions & 2 deletions bin/chflags/chflags.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>

int main __P((int, char *[]));
void usage __P((void));
int main(int, char *[]);
void usage(void);

int
main(argc, argv)
Expand Down
6 changes: 3 additions & 3 deletions usr.bin/ar/ar.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ CHDR chdr;
u_int options;
char *archive, *posarg, *posname;
const char *envtmp;
static void badoptions __P((const char *));
static void usage __P((void));
static void badoptions(const char *);
static void usage(void);

/*
* main --
Expand All @@ -85,7 +85,7 @@ main(argc, argv)
{
int c;
char *p;
int (*fcall) __P((char **)) = NULL;
int (*fcall)(char **) = NULL;

(void) setlocale(LC_TIME, "");;

Expand Down
12 changes: 6 additions & 6 deletions usr.bin/ar/archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ typedef struct {

struct stat;

void close_archive __P((int));
void copy_ar __P((CF *, off_t));
int get_arobj __P((int));
int open_archive __P((int));
void put_arobj __P((CF *, struct stat *));
void skip_arobj __P((int));
void close_archive(int);
void copy_ar(CF *, off_t);
int get_arobj(int);
int open_archive(int);
void put_arobj(CF *, struct stat *);
void skip_arobj(int);
26 changes: 13 additions & 13 deletions usr.bin/ar/extern.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@
* $FreeBSD$
*/

int append __P((char **));
void badfmt __P((void));
int compare __P((char *));
int contents __P((char **));
int delete __P((char **));
void error __P((const char *));
int extract __P((char **));
char *files __P((char **argv));
int move __P((char **));
void orphans __P((char **argv));
int print __P((char **));
int replace __P((char **));
int tmp __P((void));
int append(char **);
void badfmt(void);
int compare(char *);
int contents(char **);
int delete(char **);
void error(const char *);
int extract(char **);
char *files(char **argv);
int move(char **);
void orphans(char **argv);
int print(char **);
int replace(char **);
int tmp(void);

extern char *archive;
extern char *posarg, *posname; /* positioning file name */
Expand Down
2 changes: 1 addition & 1 deletion usr.bin/banner/banner.c
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ char print[DWIDTH];
int debug, i, j, linen, max, nchars, pc, term, trace, x, y;
int width = DWIDTH; /* -w option: scrunch letters to 80 columns */

static void usage __P((void));
static void usage(void);

int
main(int argc, char *argv[])
Expand Down
4 changes: 2 additions & 2 deletions usr.bin/basename/basename.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>

int main __P((int, char **));
void usage __P((void));
int main(int, char **);
void usage(void);

int
main(argc, argv)
Expand Down
2 changes: 1 addition & 1 deletion usr.bin/biff/biff.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <unistd.h>

static void usage __P((void));
static void usage(void);

int
main(argc, argv)
Expand Down
30 changes: 15 additions & 15 deletions usr.bin/calendar/calendar.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,21 @@ extern struct tm *tp;
extern const char *calendarFile;
extern char *optarg;

void cal __P((void));
void closecal __P((FILE *));
int getday __P((char *));
int getdayvar __P((char *));
int getfield __P((char *, char **, int *));
int getmonth __P((char *));
int geteaster __P((char *, int));
int getpaskha __P((char *, int));
int easter __P((int));
int isnow __P((char *, int *, int *, int *));
FILE *opencal __P((void));
void settime __P((time_t));
time_t Mktime __P((char *));
void usage __P((void));
void setnnames __P((void));
void cal(void);
void closecal(FILE *);
int getday(char *);
int getdayvar(char *);
int getfield(char *, char **, int *);
int getmonth(char *);
int geteaster(char *, int);
int getpaskha(char *, int);
int easter(int);
int isnow(char *, int *, int *, int *);
FILE *opencal(void);
void settime(time_t);
time_t Mktime(char *);
void usage(void);
void setnnames(void);

#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)

Expand Down
6 changes: 3 additions & 3 deletions usr.bin/cap_mkdb/cap_mkdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>

void db_build __P((char **));
void dounlink __P((void));
void usage __P((void));
void db_build(char **);
void dounlink(void);
void usage(void);

DB *capdbp;
int verbose;
Expand Down
96 changes: 34 additions & 62 deletions usr.bin/chat/chat.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,7 @@ static const char rcsid[] =
#define SIGTYPE void
#endif

#undef __P
#undef __V

#ifdef __STDC__
#include <stdarg.h>
#define __V(x) x
#define __P(x) x
#else
#include <varargs.h>
#define __V(x) (va_alist) va_dcl
#define __P(x) ()
#define const
#endif

#ifndef O_NONBLOCK
#define O_NONBLOCK O_NDELAY
Expand Down Expand Up @@ -198,38 +186,38 @@ int clear_report_next = 0;

int say_next = 0, hup_next = 0;

void *dup_mem __P((void *b, size_t c));
void *copy_of __P((char *s));
static void usage __P((void));
void logf __P((const char *fmt, ...));
void fatal __P((int code, const char *fmt, ...));
SIGTYPE sigalrm __P((int signo));
SIGTYPE sigint __P((int signo));
SIGTYPE sigterm __P((int signo));
SIGTYPE sighup __P((int signo));
void unalarm __P((void));
void init __P((void));
void set_tty_parameters __P((void));
void echo_stderr __P((int));
void break_sequence __P((void));
void terminate __P((int status));
void do_file __P((char *chat_file));
int get_string __P((register char *string));
int put_string __P((register char *s));
int write_char __P((int c));
int put_char __P((int c));
int get_char __P((void));
void chat_send __P((register char *s));
char *character __P((int c));
void chat_expect __P((register char *s));
char *clean __P((register char *s, int sending));
void break_sequence __P((void));
void terminate __P((int status));
void pack_array __P((char **array, int end));
char *expect_strtok __P((char *, char *));
int vfmtmsg __P((char *, int, const char *, va_list)); /* vsprintf++ */

int main __P((int, char *[]));
void *dup_mem(void *b, size_t c);
void *copy_of(char *s);
static void usage(void);
void logf(const char *fmt, ...);
void fatal(int code, const char *fmt, ...);
SIGTYPE sigalrm(int signo);
SIGTYPE sigint(int signo);
SIGTYPE sigterm(int signo);
SIGTYPE sighup(int signo);
void unalarm(void);
void init(void);
void set_tty_parameters(void);
void echo_stderr(int);
void break_sequence(void);
void terminate(int status);
void do_file(char *chat_file);
int get_string(register char *string);
int put_string(register char *s);
int write_char(int c);
int put_char(int c);
int get_char(void);
void chat_send(register char *s);
char *character(int c);
void chat_expect(register char *s);
char *clean(register char *s, int sending);
void break_sequence(void);
void terminate(int status);
void pack_array(char **array, int end);
char *expect_strtok(char *, char *);
int vfmtmsg(char *, int, const char *, va_list); /* vsprintf++ */

int main(int, char *[]);

void *dup_mem(b, c)
void *b;
Expand Down Expand Up @@ -464,18 +452,11 @@ char line[1024];
/*
* Send a message to syslog and/or stderr.
*/
void logf __V((const char *fmt, ...))
void logf(const char *fmt, ...)
{
va_list args;

#ifdef __STDC__
va_start(args, fmt);
#else
char *fmt;
va_start(args);
fmt = va_arg(args, char *);
#endif

vfmtmsg(line, sizeof(line), fmt, args);
if (to_log)
syslog(LOG_INFO, "%s", line);
Expand All @@ -487,20 +468,11 @@ void logf __V((const char *fmt, ...))
* Print an error message and terminate.
*/

void fatal __V((int code, const char *fmt, ...))
void fatal(int code, const char *fmt, ...)
{
va_list args;

#ifdef __STDC__
va_start(args, fmt);
#else
int code;
char *fmt;
va_start(args);
code = va_arg(args, int);
fmt = va_arg(args, char *);
#endif

vfmtmsg(line, sizeof(line), fmt, args);
if (to_log)
syslog(LOG_ERR, "%s", line);
Expand Down
24 changes: 12 additions & 12 deletions usr.bin/checknr/checknr.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ __FBSDID("$FreeBSD$");
#define MAXBR 100 /* Max number of bracket pairs known */
#define MAXCMDS 500 /* Max number of commands known */

void addcmd __P((char *));
void addmac __P((const char *));
int binsrch __P((const char *));
void checkknown __P((char *));
void chkcmd __P((char *, char *));
void complain __P((int));
int eq __P((const char *, const char *));
void nomatch __P((char *));
void pe __P((int));
void process __P((FILE *));
void prop __P((int));
static void usage __P((void));
void addcmd(char *);
void addmac(const char *);
int binsrch(const char *);
void checkknown(char *);
void chkcmd(char *, char *);
void complain(int);
int eq(const char *, const char *);
void nomatch(char *);
void pe(int);
void process(FILE *);
void prop(int);
static void usage(void);

/*
* The stack on which we remember what we've seen so far.
Expand Down
4 changes: 2 additions & 2 deletions usr.bin/chflags/chflags.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>

int main __P((int, char *[]));
void usage __P((void));
int main(int, char *[]);
void usage(void);

int
main(argc, argv)
Expand Down
4 changes: 2 additions & 2 deletions usr.bin/chpass/chpass.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ int yp_errno = YP_TRUE;
char *tempname;
uid_t uid;

void baduser __P((void));
void usage __P((void));
void baduser(void);
void usage(void);

int
main(argc, argv)
Expand Down
35 changes: 18 additions & 17 deletions usr.bin/chpass/chpass.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* SUCH DAMAGE.
*
* @(#)chpass.h 8.4 (Berkeley) 4/2/94
* $FreeBSD$
*/

struct passwd;
Expand All @@ -52,20 +53,20 @@ typedef struct _entry {
extern ENTRY list[];
extern uid_t uid;

int atot __P((char *, time_t *));
void display __P((int, struct passwd *));
void edit __P((struct passwd *));
char *ok_shell __P((char *));
int p_change __P((char *, struct passwd *, ENTRY *));
int p_class __P((char *, struct passwd *, ENTRY *));
int p_expire __P((char *, struct passwd *, ENTRY *));
int p_gecos __P((char *, struct passwd *, ENTRY *));
int p_gid __P((char *, struct passwd *, ENTRY *));
int p_hdir __P((char *, struct passwd *, ENTRY *));
int p_login __P((char *, struct passwd *, ENTRY *));
int p_login __P((char *, struct passwd *, ENTRY *));
int p_passwd __P((char *, struct passwd *, ENTRY *));
int p_shell __P((char *, struct passwd *, ENTRY *));
int p_uid __P((char *, struct passwd *, ENTRY *));
char *ttoa __P((time_t));
int verify __P((struct passwd *));
int atot(char *, time_t *);
void display(int, struct passwd *);
void edit(struct passwd *);
char *ok_shell(char *);
int p_change(char *, struct passwd *, ENTRY *);
int p_class(char *, struct passwd *, ENTRY *);
int p_expire(char *, struct passwd *, ENTRY *);
int p_gecos(char *, struct passwd *, ENTRY *);
int p_gid(char *, struct passwd *, ENTRY *);
int p_hdir(char *, struct passwd *, ENTRY *);
int p_login(char *, struct passwd *, ENTRY *);
int p_login(char *, struct passwd *, ENTRY *);
int p_passwd(char *, struct passwd *, ENTRY *);
int p_shell(char *, struct passwd *, ENTRY *);
int p_uid(char *, struct passwd *, ENTRY *);
char *ttoa(time_t);
int verify(struct passwd *);
2 changes: 1 addition & 1 deletion usr.bin/chpass/pw_copy.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
* $FreeBSD$
*/

void pw_copy __P((int, int, struct passwd *, struct passwd *));
void pw_copy(int, int, struct passwd *, struct passwd *);
Loading

0 comments on commit f1bb2cd

Please sign in to comment.