summaryrefslogtreecommitdiffstats
path: root/usr.bin/tn3270/ascii
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>1997-08-18 07:21:48 +0000
committercharnier <charnier@FreeBSD.org>1997-08-18 07:21:48 +0000
commit51f10d4b16b75176c9598bb67c022f222f671ff9 (patch)
tree64f52d64cc315cbf413c0ee7118a1a4c9bd2b9ef /usr.bin/tn3270/ascii
parent6fbe0aac6da1c5f7425829dcc7e22593a28f923c (diff)
downloadFreeBSD-src-51f10d4b16b75176c9598bb67c022f222f671ff9.zip
FreeBSD-src-51f10d4b16b75176c9598bb67c022f222f671ff9.tar.gz
Add usage. Use /usr/share/misc/map3270 instead of /etc/map3270.
Diffstat (limited to 'usr.bin/tn3270/ascii')
-rw-r--r--usr.bin/tn3270/ascii/default.map2
-rw-r--r--usr.bin/tn3270/ascii/map3270.c4
-rw-r--r--usr.bin/tn3270/ascii/mset.c26
3 files changed, 20 insertions, 12 deletions
diff --git a/usr.bin/tn3270/ascii/default.map b/usr.bin/tn3270/ascii/default.map
index a4cf6e1..f4ea6fd 100644
--- a/usr.bin/tn3270/ascii/default.map
+++ b/usr.bin/tn3270/ascii/default.map
@@ -35,7 +35,7 @@
/* default.map3270: This file is the system default for the key sequence
* if neither the user's TERM nor "unknown" are found in either of
- * MAP3270 or /etc/map3270.
+ * MAP3270 or /usr/share/misc/map3270.
*
*
*/
diff --git a/usr.bin/tn3270/ascii/map3270.c b/usr.bin/tn3270/ascii/map3270.c
index 9ae1b2a..f076d16 100644
--- a/usr.bin/tn3270/ascii/map3270.c
+++ b/usr.bin/tn3270/ascii/map3270.c
@@ -907,7 +907,7 @@ int (*translator)(); /* Translates ascii string to integer */
GotIt = Position(environPointer, keybdPointer);
}
if (!GotIt) {
- GotIt = Position("/etc/map3270", keybdPointer);
+ GotIt = Position("/usr/share/misc/map3270", keybdPointer);
}
}
if (!GotIt) {
@@ -915,7 +915,7 @@ int (*translator)(); /* Translates ascii string to integer */
GotIt = Position(environPointer, "unknown");
}
if (!GotIt) {
- GotIt = Position("/etc/map3270", keybdPointer);
+ GotIt = Position("/usr/share/misc/map3270", keybdPointer);
}
}
if (!GotIt) {
diff --git a/usr.bin/tn3270/ascii/mset.c b/usr.bin/tn3270/ascii/mset.c
index b87a1ec..a26852d 100644
--- a/usr.bin/tn3270/ascii/mset.c
+++ b/usr.bin/tn3270/ascii/mset.c
@@ -32,13 +32,17 @@
*/
#ifndef lint
-static char copyright[] =
+static const char copyright[] =
"@(#) Copyright (c) 1988, 1993\n\
The Regents of the University of California. All rights reserved.\n";
#endif /* not lint */
#ifndef lint
+#if 0
static char sccsid[] = "@(#)mset.c 8.1 (Berkeley) 6/6/93";
+#endif
+static const char rcsid[] =
+ "$Id$";
#endif /* not lint */
/*
@@ -76,6 +80,8 @@ static char array[5000]; /* lot's of room */
static int toshell = 0; /* export to shell */
static int numbchars = 0; /* number of chars in envir. var */
+static void usage __P((void));
+
static int
MyStrcmp(str1, str2)
char *str1, *str2;
@@ -348,7 +354,6 @@ char *argv[];
{
state *head;
char *keybdPointer = (char *) 0;
- char *commandName = argv[0];
extern char *getenv();
int picky = 0;
@@ -358,9 +363,7 @@ char *argv[];
} else if (!strcmp(argv[1], "-shell")) {
toshell++;
} else {
- fprintf(stderr, "usage: %s [-picky] [-shell] [keyboardname]\n",
- commandName);
- exit(1);
+ usage();
/*NOTREACHED*/
}
argv++;
@@ -369,10 +372,8 @@ char *argv[];
if (argc == 2) {
keybdPointer = argv[1];
} else if (argc > 2) {
- fprintf(stderr, "usage: %s [-picky] [-shell] [keyboardname]\n",
- commandName);
- exit(1);
- /*NOTREACHED*/
+ usage();
+ /*NOTREACHED*/
}
head = InitControl(keybdPointer, picky, ascii_to_index);
if (!head) {
@@ -408,3 +409,10 @@ char *argv[];
}
return(0);
}
+
+static void
+usage()
+{
+ fprintf(stderr, "usage: mset [-picky] [-shell] [keyboardname]");
+ exit(1);
+}
OpenPOWER on IntegriCloud