summaryrefslogtreecommitdiff
path: root/sys/arch/i386/isa/pcvt/Util/userkeys
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-12-21 22:23:53 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-12-21 22:23:53 +0000
commitc60e06beeb20521a15bacc5c672aa1b865b06a67 (patch)
treef2cc3a0e68a020f5e59132403d4a16547626359f /sys/arch/i386/isa/pcvt/Util/userkeys
parentf2d04b4c3d006dcc05c58dab6068fed44f01098a (diff)
-Wall madness.
Diffstat (limited to 'sys/arch/i386/isa/pcvt/Util/userkeys')
-rw-r--r--sys/arch/i386/isa/pcvt/Util/userkeys/vt220keys.c62
1 files changed, 35 insertions, 27 deletions
diff --git a/sys/arch/i386/isa/pcvt/Util/userkeys/vt220keys.c b/sys/arch/i386/isa/pcvt/Util/userkeys/vt220keys.c
index dfde51a2691..bca5a787ae8 100644
--- a/sys/arch/i386/isa/pcvt/Util/userkeys/vt220keys.c
+++ b/sys/arch/i386/isa/pcvt/Util/userkeys/vt220keys.c
@@ -26,8 +26,10 @@
*/
-#include <stdio.h>
#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
/*
* The default toupper() macro is stupid, will toupper anything
@@ -46,30 +48,36 @@ struct keynames {
char *name ;
char *string ;
} keys[] = {
- "F6", "17",
- "F7", "18",
- "F8", "19",
- "F9", "20",
- "F10", "21",
- "F11", "23",
- "ESC", "23",
- "F12", "24",
- "BS", "24",
- "F13", "25",
- "LF", "25",
- "F14", "26",
- "HELP", "28",
- "DO", "29",
- "F17", "31",
- "F18", "32",
- "F19", "33",
- "F20", "34",
- NULL, NULL
+ { "F6", "17" },
+ { "F7", "18" },
+ { "F8", "19" },
+ { "F9", "20" },
+ { "F10", "21" },
+ { "F11", "23" },
+ { "ESC", "23" },
+ { "F12", "24" },
+ { "BS", "24" },
+ { "F13", "25" },
+ { "LF", "25" },
+ { "F14", "26" },
+ { "HELP", "28" },
+ { "DO", "29" },
+ { "F17", "31" },
+ { "F18", "32" },
+ { "F19", "33" },
+ { "F20", "34" },
+ { NULL, NULL }
};
char prog[BUFSIZ];
-main(argc,argv)
+void usage __P((void));
+void clearkeys __P((void));
+void getinit __P((void));
+void dokey __P((char *, char *));
+void lockkeys __P((void));
+
+int main(argc,argv)
int argc;
char *argv[];
{
@@ -142,12 +150,12 @@ main(argc,argv)
* for each pair, who cares, really.
*/
-dokey(nm,val) char *nm, *val;
+void dokey(nm,val) char *nm, *val;
{
register char *scr;
register struct keynames *kp;
- for(scr = nm; *scr = toupper(*scr); scr++)
+ for(scr = nm; (*scr = toupper(*scr)); scr++)
;
for(kp = keys; kp->name != NULL; kp++)
if(strcmp(nm,kp->name) == 0) {
@@ -163,7 +171,7 @@ dokey(nm,val) char *nm, *val;
/****************************************************************************/
-clearkeys()
+void clearkeys()
{
printf("%cP0;1|%c\\",ESC,ESC);
fflush(stdout);
@@ -171,7 +179,7 @@ clearkeys()
/****************************************************************************/
-lockkeys()
+void lockkeys()
{
printf("%cP1;0|%c\\",ESC,ESC);
fflush(stdout);
@@ -179,7 +187,7 @@ lockkeys()
/****************************************************************************/
-usage()
+void usage()
{
int i;
@@ -219,7 +227,7 @@ usage()
#include <sys/types.h>
#include <sys/stat.h>
-getinit()
+void getinit()
{
char *home; /* user's home directory */
char path[BUFSIZ]; /* full path name of init file */