Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/wsconsctl Kill __P(), ANSIfy, remove main() prototype; ...
details: https://anonhg.NetBSD.org/src/rev/96a498e4fe47
branches: trunk
changeset: 573110:96a498e4fe47
user: xtraeme <xtraeme%NetBSD.org@localhost>
date: Wed Jan 19 20:37:52 2005 +0000
description:
Kill __P(), ANSIfy, remove main() prototype; WARNS=2
diffstat:
sbin/wsconsctl/Makefile | 3 ++-
sbin/wsconsctl/display.c | 5 ++---
sbin/wsconsctl/keyboard.c | 8 +++-----
sbin/wsconsctl/keysym.c | 39 ++++++++++++++-------------------------
sbin/wsconsctl/map_parse.y | 10 ++++------
sbin/wsconsctl/map_scan.l | 5 ++---
sbin/wsconsctl/mouse.c | 8 +++-----
sbin/wsconsctl/util.c | 44 +++++++++++++-------------------------------
sbin/wsconsctl/wsconsctl.c | 16 ++++++----------
sbin/wsconsctl/wsconsctl.h | 40 ++++++++++++++++++++--------------------
10 files changed, 69 insertions(+), 109 deletions(-)
diffs (truncated from 450 to 300 lines):
diff -r 1c020edfe450 -r 96a498e4fe47 sbin/wsconsctl/Makefile
--- a/sbin/wsconsctl/Makefile Wed Jan 19 20:19:04 2005 +0000
+++ b/sbin/wsconsctl/Makefile Wed Jan 19 20:37:52 2005 +0000
@@ -1,5 +1,6 @@
-# $NetBSD: Makefile,v 1.10 2003/10/21 10:01:20 lukem Exp $
+# $NetBSD: Makefile,v 1.11 2005/01/19 20:37:52 xtraeme Exp $
+WARNS= 2
PROG= wsconsctl
SRCS= display.c keyboard.c keysym.c map_parse.y map_scan.l \
mouse.c util.c wsconsctl.c
diff -r 1c020edfe450 -r 96a498e4fe47 sbin/wsconsctl/display.c
--- a/sbin/wsconsctl/display.c Wed Jan 19 20:19:04 2005 +0000
+++ b/sbin/wsconsctl/display.c Wed Jan 19 20:37:52 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: display.c,v 1.8 2004/07/30 15:22:42 jmmv Exp $ */
+/* $NetBSD: display.c,v 1.9 2005/01/19 20:37:52 xtraeme Exp $ */
/*-
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -73,8 +73,7 @@
sizeof(display_field_tab[0]);
void
-display_get_values(fd)
- int fd;
+display_get_values(int fd)
{
if (field_by_value(&dpytype)->flags & FLG_GET)
if (ioctl(fd, WSDISPLAYIO_GTYPE, &dpytype) < 0)
diff -r 1c020edfe450 -r 96a498e4fe47 sbin/wsconsctl/keyboard.c
--- a/sbin/wsconsctl/keyboard.c Wed Jan 19 20:19:04 2005 +0000
+++ b/sbin/wsconsctl/keyboard.c Wed Jan 19 20:37:52 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: keyboard.c,v 1.6 2004/07/30 15:22:42 jmmv Exp $ */
+/* $NetBSD: keyboard.c,v 1.7 2005/01/19 20:37:52 xtraeme Exp $ */
/*-
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -82,8 +82,7 @@
sizeof(keyboard_field_tab[0]);
void
-keyboard_get_values(fd)
- int fd;
+keyboard_get_values(int fd)
{
if (field_by_value(&kbtype)->flags & FLG_GET)
if (ioctl(fd, WSKBDIO_GTYPE, &kbtype) < 0)
@@ -163,8 +162,7 @@
}
void
-keyboard_put_values(fd)
- int fd;
+keyboard_put_values(int fd)
{
bell.which = 0;
if (field_by_value(&bell.pitch)->flags & FLG_SET)
diff -r 1c020edfe450 -r 96a498e4fe47 sbin/wsconsctl/keysym.c
--- a/sbin/wsconsctl/keysym.c Wed Jan 19 20:19:04 2005 +0000
+++ b/sbin/wsconsctl/keysym.c Wed Jan 19 20:37:52 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: keysym.c,v 1.4 2000/07/03 03:38:02 matt Exp $ */
+/* $NetBSD: keysym.c,v 1.5 2005/01/19 20:37:52 xtraeme Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -87,47 +87,39 @@
0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0x00, /* f */
};
-static int qcmp_name __P((const void *, const void *));
-static int qcmp_ksym __P((const void *, const void *));
-static int bcmp_name __P((const void *, const void *));
-static int bcmp_ksym __P((const void *, const void *));
+static int qcmp_name(const void *, const void *);
+static int qcmp_ksym(const void *, const void *);
+static int bcmp_name(const void *, const void *);
+static int bcmp_ksym(const void *, const void *);
-static void sort_ksym_tab __P((void));
+static void sort_ksym_tab(void);
static int
-qcmp_name(a, b)
- const void *a;
- const void *b;
+qcmp_name(const void *a, const void *b)
{
return(strcmp(((struct ksym *) a)->name, ((struct ksym *) b)->name));
}
static int
-qcmp_ksym(a, b)
- const void *a;
- const void *b;
+qcmp_ksym(const void *a, const void *b)
{
return(((struct ksym *) b)->value - ((struct ksym *) a)->value);
}
static int
-bcmp_name(a, b)
- const void *a;
- const void *b;
+bcmp_name(const void *a, const void *b)
{
return(strcmp((char *) a, ((struct ksym *) b)->name));
}
static int
-bcmp_ksym(a, b)
- const void *a;
- const void *b;
+bcmp_ksym(const void *a, const void *b)
{
return(((struct ksym *) b)->value - *((int *) a));
}
static void
-sort_ksym_tab()
+sort_ksym_tab(void)
{
int i;
@@ -141,8 +133,7 @@
}
char *
-ksym2name(k)
- int k;
+ksym2name(int k)
{
static char tmp[20];
struct ksym *r;
@@ -162,8 +153,7 @@
}
int
-name2ksym(n)
- char *n;
+name2ksym(char *n)
{
int res;
struct ksym *r;
@@ -183,8 +173,7 @@
}
keysym_t
-ksym_upcase(ksym)
- keysym_t ksym;
+ksym_upcase(keysym_t ksym)
{
if (ksym >= KS_f1 && ksym <= KS_f20)
return(KS_F1 - KS_f1 + ksym);
diff -r 1c020edfe450 -r 96a498e4fe47 sbin/wsconsctl/map_parse.y
--- a/sbin/wsconsctl/map_parse.y Wed Jan 19 20:19:04 2005 +0000
+++ b/sbin/wsconsctl/map_parse.y Wed Jan 19 20:37:52 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: map_parse.y,v 1.3 2004/06/27 02:09:47 itohy Exp $ */
+/* $NetBSD: map_parse.y,v 1.4 2005/01/19 20:37:52 xtraeme Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -66,11 +66,10 @@
struct wskbd_map_data newkbmap; /* used in util.c */
static struct wscons_keymap *cur_mp;
-static int ksym_lookup __P((keysym_t));
+static int ksym_lookup(keysym_t);
static int
-ksym_lookup(ksym)
- keysym_t ksym;
+ksym_lookup(keysym_t ksym)
{
int i;
struct wscons_keymap *mp;
@@ -198,8 +197,7 @@
%%
void
-yyerror(msg)
- char *msg;
+yyerror(char *msg)
{
errx(1, "parse: %s", msg);
}
diff -r 1c020edfe450 -r 96a498e4fe47 sbin/wsconsctl/map_scan.l
--- a/sbin/wsconsctl/map_scan.l Wed Jan 19 20:19:04 2005 +0000
+++ b/sbin/wsconsctl/map_scan.l Wed Jan 19 20:37:52 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: map_scan.l,v 1.1 1998/12/28 14:01:17 hannken Exp $ */
+/* $NetBSD: map_scan.l,v 1.2 2005/01/19 20:37:52 xtraeme Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -47,8 +47,7 @@
#define yywrap() 1
void
-map_scan_setinput(str)
- char *str;
+map_scan_setinput(char *str)
{
yy_scan_string(str);
}
diff -r 1c020edfe450 -r 96a498e4fe47 sbin/wsconsctl/mouse.c
--- a/sbin/wsconsctl/mouse.c Wed Jan 19 20:19:04 2005 +0000
+++ b/sbin/wsconsctl/mouse.c Wed Jan 19 20:37:52 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mouse.c,v 1.3 1999/11/15 13:47:30 ad Exp $ */
+/* $NetBSD: mouse.c,v 1.4 2005/01/19 20:37:52 xtraeme Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -56,8 +56,7 @@
sizeof(mouse_field_tab[0]);
void
-mouse_get_values(fd)
- int fd;
+mouse_get_values(int fd)
{
if (field_by_value(&mstype)->flags & FLG_GET)
if (ioctl(fd, WSMOUSEIO_GTYPE, &mstype) < 0)
@@ -65,8 +64,7 @@
}
void
-mouse_put_values(fd)
- int fd;
+mouse_put_values(int fd)
{
int tmp;
diff -r 1c020edfe450 -r 96a498e4fe47 sbin/wsconsctl/util.c
--- a/sbin/wsconsctl/util.c Wed Jan 19 20:19:04 2005 +0000
+++ b/sbin/wsconsctl/util.c Wed Jan 19 20:37:52 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.20 2004/07/30 11:08:03 jmmv Exp $ */
+/* $NetBSD: util.c,v 1.21 2005/01/19 20:37:52 xtraeme Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -164,22 +164,19 @@
static struct field *field_tab;
static int field_tab_len;
-static char *int2name __P((int, int, struct nameint *, int));
-static int name2int __P((char *, struct nameint *, int));
-static void print_kmap __P((struct wskbd_map_data *));
+static char *int2name(int, int, struct nameint *, int);
+static int name2int(char *, struct nameint *, int);
+static void print_kmap(struct wskbd_map_data *);
void
-field_setup(ftab, len)
- struct field *ftab;
- int len;
+field_setup(struct field *ftab, int len)
{
field_tab = ftab;
field_tab_len = len;
}
struct field *
-field_by_name(name)
- char *name;
+field_by_name(char *name)
{
int i;
@@ -191,8 +188,7 @@
}
struct field *
-field_by_value(addr)
- void *addr;
+field_by_value(void *addr)
{
int i;
@@ -204,8 +200,7 @@
}
void
-field_disable_by_value(addr)
- void *addr;
+field_disable_by_value(void *addr)
{
struct field *f;
@@ -214,11 +209,7 @@
}
static char *
-int2name(val, uflag, tab, len)
- int val;
Home |
Main Index |
Thread Index |
Old Index