Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/ttyflags Kill __P(), ANSIfy, remove main() prototype; W...



details:   https://anonhg.NetBSD.org/src/rev/900803442a5b
branches:  trunk
changeset: 573114:900803442a5b
user:      xtraeme <xtraeme%NetBSD.org@localhost>
date:      Wed Jan 19 20:48:13 2005 +0000

description:
Kill __P(), ANSIfy, remove main() prototype; WARNS=3

diffstat:

 sbin/ttyflags/Makefile   |   3 ++-
 sbin/ttyflags/ttyflags.c |  27 +++++++++++----------------
 2 files changed, 13 insertions(+), 17 deletions(-)

diffs (94 lines):

diff -r 7c8f876fd6c2 -r 900803442a5b sbin/ttyflags/Makefile
--- a/sbin/ttyflags/Makefile    Wed Jan 19 20:46:16 2005 +0000
+++ b/sbin/ttyflags/Makefile    Wed Jan 19 20:48:13 2005 +0000
@@ -1,5 +1,6 @@
-#      $NetBSD: Makefile,v 1.3 1995/03/18 15:01:20 cgd Exp $
+#      $NetBSD: Makefile,v 1.4 2005/01/19 20:48:13 xtraeme Exp $
 
+WARNS= 3
 PROG=  ttyflags
 MAN=   ttyflags.8
 
diff -r 7c8f876fd6c2 -r 900803442a5b sbin/ttyflags/ttyflags.c
--- a/sbin/ttyflags/ttyflags.c  Wed Jan 19 20:46:16 2005 +0000
+++ b/sbin/ttyflags/ttyflags.c  Wed Jan 19 20:48:13 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ttyflags.c,v 1.14 2003/07/12 14:33:55 itojun Exp $ */
+/* $NetBSD: ttyflags.c,v 1.15 2005/01/19 20:48:13 xtraeme Exp $ */
 
 /*
  * Copyright (c) 1994 Christopher G. Demetriou
@@ -41,7 +41,7 @@
 #endif /* not lint */
 
 #ifndef lint
-__RCSID("$NetBSD: ttyflags.c,v 1.14 2003/07/12 14:33:55 itojun Exp $");
+__RCSID("$NetBSD: ttyflags.c,v 1.15 2005/01/19 20:48:13 xtraeme Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -59,11 +59,10 @@
 #include <ttyent.h>
 #include <unistd.h>
 
-int change_all __P((void));
-int change_ttyflags __P((struct ttyent *));
-int change_ttys __P((char **));
-int main __P((int, char *[]));
-void usage __P((void));
+int change_all(void);
+int change_ttyflags(struct ttyent *);
+int change_ttys(char **);
+void usage(void);
 
 int nflag, vflag;
 
@@ -73,9 +72,7 @@
  * the flags of the ttys specified on the command line.
  */
 int
-main(argc, argv)
-       int argc;
-       char *argv[];
+main(int argc, char *argv[])
 {
        int aflag, ch, rval;
 
@@ -121,7 +118,7 @@
  * Change all /etc/ttys entries' flags.
  */
 int
-change_all()
+change_all(void)
 {
        struct ttyent *tep;
        int rval;
@@ -137,8 +134,7 @@
  * Change the specified ttys' flags.
  */
 int
-change_ttys(ttylist)
-       char **ttylist;
+change_ttys(char **ttylist)
 {
        struct ttyent *tep;
        int rval;
@@ -165,8 +161,7 @@
  * open the device, and change the flags.
  */
 int
-change_ttyflags(tep)
-       struct ttyent *tep;
+change_ttyflags(struct ttyent *tep)
 {
        int fd, flags, rval, st, sep;
        char path[PATH_MAX];
@@ -244,7 +239,7 @@
  * Print usage information when a bogus set of arguments is given.
  */
 void
-usage()
+usage(void)
 {
        (void)fprintf(stderr, "usage: ttyflags [-v] [-a | tty ... ]\n");
        exit(1);



Home | Main Index | Thread Index | Old Index