SCCS-vsn: bin/stty/cchar.c 5.4
SCCS-vsn: bin/stty/extern.h 5.4
SCCS-vsn: bin/stty/gfmt.c 5.4
SCCS-vsn: bin/stty/key.c 5.3
SCCS-vsn: bin/stty/modes.c 5.4
SCCS-vsn: bin/stty/print.c 5.4
SCCS-vsn: bin/stty/stty.h 5.3
-static char sccsid[] = "@(#)cchar.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)cchar.c 5.4 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#endif /* not lint */
#include <sys/types.h>
"stop", VSTOP, CSTOP,
"susp", VSUSP, CSUSP,
"werase", VWERASE, CWERASE,
"stop", VSTOP, CSTOP,
"susp", VSUSP, CSUSP,
"werase", VWERASE, CWERASE,
};
struct cchar cchars2[] = {
};
struct cchar cchars2[] = {
"rprnt", VREPRINT, CREPRINT,
"xoff", VSTOP, CSTOP,
"xon", VSTART, CSTART,
"rprnt", VREPRINT, CREPRINT,
"xoff", VSTOP, CSTOP,
"xon", VSTART, CSTART,
tmp.name = name;
if (!(cp = (struct cchar *)bsearch(&tmp, cchars1,
tmp.name = name;
if (!(cp = (struct cchar *)bsearch(&tmp, cchars1,
- sizeof(cchars1)/sizeof(struct cchar), sizeof(struct cchar),
+ sizeof(cchars1)/sizeof(struct cchar) - 1, sizeof(struct cchar),
c_cchar)) && !(cp = (struct cchar *)bsearch(&tmp, cchars1,
c_cchar)) && !(cp = (struct cchar *)bsearch(&tmp, cchars1,
- sizeof(cchars1)/sizeof(struct cchar), sizeof(struct cchar),
+ sizeof(cchars1)/sizeof(struct cchar) - 1, sizeof(struct cchar),
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)extern.h 5.3 (Berkeley) %G%
+ * @(#)extern.h 5.4 (Berkeley) %G%
__END_DECLS
extern struct cchar cchars1[], cchars2[];
__END_DECLS
extern struct cchar cchars1[], cchars2[];
-extern struct modes cmodes[], imodes[], lmodes[], omodes[];
-static char sccsid[] = "@(#)gfmt.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)gfmt.c 5.4 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#endif /* not lint */
#include <sys/types.h>
(void)printf("gfmt1:cflag=%x:iflag=%x:lflag=%x:oflag=%x:",
tp->c_cflag, tp->c_iflag, tp->c_lflag, tp->c_oflag);
(void)printf("gfmt1:cflag=%x:iflag=%x:lflag=%x:oflag=%x:",
tp->c_cflag, tp->c_iflag, tp->c_lflag, tp->c_oflag);
- for (cp = cchars1; *cp->name; ++cp)
+ for (cp = cchars1; cp->name; ++cp)
(void)printf("%s=%x:", cp->name, tp->c_cc[cp->sub]);
(void)printf("ispeed=%d:ospeed=%d\n", cfgetispeed(tp), cfgetospeed(tp));
}
(void)printf("%s=%x:", cp->name, tp->c_cc[cp->sub]);
(void)printf("ispeed=%d:ospeed=%d\n", cfgetispeed(tp), cfgetospeed(tp));
}
-static char sccsid[] = "@(#)key.c 5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)key.c 5.3 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#endif /* not lint */
#include <sys/types.h>
void f_tty __P((struct info *));
__END_DECLS
void f_tty __P((struct info *));
__END_DECLS
-static struct key keys[] = {
+static struct key {
+ char *name; /* name */
+ void (*f) __P((struct info *)); /* function */
+#define F_NEEDARG 0x01 /* needs an argument */
+#define F_OFFOK 0x02 /* can turn off */
+ int flags;
+} keys[] = {
"all", f_all, 0,
"cbreak", f_cbreak, F_OFFOK,
"cols", f_columns, F_NEEDARG,
"all", f_all, 0,
"cbreak", f_cbreak, F_OFFOK,
"cols", f_columns, F_NEEDARG,
-static char sccsid[] = "@(#)modes.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)modes.c 5.4 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#endif /* not lint */
#include <sys/types.h>
#include <string.h>
#include "stty.h"
#include <string.h>
#include "stty.h"
+struct modes {
+ char *name;
+ long set;
+ long unset;
+};
+
/*
* The code in optlist() depends on minus options following regular
* options, i.e. "foo" must immediately precede "-foo".
/*
* The code in optlist() depends on minus options following regular
* options, i.e. "foo" must immediately precede "-foo".
-static char sccsid[] = "@(#)print.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)print.c 5.4 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#endif /* not lint */
#include <sys/types.h>
cc = tp->c_cc;
if (fmt == POSIX) {
binit("cchars");
cc = tp->c_cc;
if (fmt == POSIX) {
binit("cchars");
- for (p = cchars1; *p->name; ++p) {
+ for (p = cchars1; p->name; ++p) {
(void)snprintf(buf1, sizeof(buf1), "%s = %s;",
p->name, ccval(cc[p->sub]));
bput(buf1);
(void)snprintf(buf1, sizeof(buf1), "%s = %s;",
p->name, ccval(cc[p->sub]));
bput(buf1);
binit(NULL);
} else {
binit(NULL);
binit(NULL);
} else {
binit(NULL);
- for (p = cchars1, cnt = 0; *p->name; ++p) {
+ for (p = cchars1, cnt = 0; p->name; ++p) {
if (fmt != BSD && cc[p->sub] == p->def)
continue;
#define WD "%-8s"
if (fmt != BSD && cc[p->sub] == p->def)
continue;
#define WD "%-8s"
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)stty.h 5.2 (Berkeley) %G%
+ * @(#)stty.h 5.3 (Berkeley) %G%
*/
#include <sys/ioctl.h>
*/
#include <sys/ioctl.h>
struct winsize win; /* window info */
};
struct winsize win; /* window info */
};
-struct key {
- char *name; /* name */
- void (*f) __P((struct info *)); /* function */
-#define F_NEEDARG 0x01 /* needs an argument */
-#define F_OFFOK 0x02 /* can turn off */
- int flags;
-};
-
-struct modes {
- char *name;
- long set;
- long unset;
-};
-
struct cchar {
char *name;
int sub;
struct cchar {
char *name;
int sub;