diff options
author | brian <brian@FreeBSD.org> | 1997-11-22 03:37:54 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-11-22 03:37:54 +0000 |
commit | a7f001c816c9390acda1c72f889fd110f8d75563 (patch) | |
tree | 876d508224fb0bc9435a2e3b83f73719b56ad0b6 /usr.sbin/ppp/command.h | |
parent | 13d351d26116b6bf544f619e0de396a53d47ccd1 (diff) | |
download | FreeBSD-src-a7f001c816c9390acda1c72f889fd110f8d75563.zip FreeBSD-src-a7f001c816c9390acda1c72f889fd110f8d75563.tar.gz |
Fix prototypes.
Remove extraneous decls.
Add ``const'' to several places.
Allow ``make NOALIAS=1'' to remove IP aliasing.
Merge with OpenBSD - only the Makefiles vary.
We can now survive a compile with
-Wall -Wbad-function-cast -Wcast-align -Wcast-qual
-Winline -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wpointer-arith -Wredundant-decls
-Wshadow -Wstrict-prototypes -Wwrite-strings -Wchar-subscripts
(although the Makefile just contains -Wall).
Diffstat (limited to 'usr.sbin/ppp/command.h')
-rw-r--r-- | usr.sbin/ppp/command.h | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/usr.sbin/ppp/command.h b/usr.sbin/ppp/command.h index 16954ee..e83114d 100644 --- a/usr.sbin/ppp/command.h +++ b/usr.sbin/ppp/command.h @@ -15,19 +15,28 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: command.h,v 1.10 1997/11/11 22:58:10 brian Exp $ + * $Id: command.h,v 1.11 1997/11/13 14:43:15 brian Exp $ * * TODO: */ +struct cmdtab; + +struct cmdargs { + struct cmdtab const *cmd; + int argc; + char const *const *argv; + const void *data; +}; + struct cmdtab { - char *name; - char *alias; - int (*func) (); + const char *name; + const char *alias; + int (*func) (struct cmdargs const *); u_char lauth; - char *helpmes; - char *syntax; - void *args; + const char *helpmes; + const char *syntax; + const void *args; }; #define VAR_AUTHKEY 0 @@ -45,9 +54,9 @@ struct cmdtab { extern struct in_addr ifnetmask; extern int aft_cmd; -extern int SetVariable(struct cmdtab const *, int, char **, int); +extern int SetVariable(struct cmdargs const *); extern void Prompt(void); extern int IsInteractive(int); extern void InterpretCommand(char *, int, int *, char ***); -extern void RunCommand(int, char **, const char *label); +extern void RunCommand(int, char const *const *, const char *label); extern void DecodeCommand(char *, int, const char *label); |