* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)gfmt.c 8.2 (Berkeley) %G%";
static void gerr
__P((char *));
register struct cchar
*cp
;
(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
)
(void)printf("%s=%x:", cp
->name
, tp
->c_cc
[cp
->sub
]);
(void)printf("ispeed=%d:ospeed=%d\n", cfgetispeed(tp
), cfgetospeed(tp
));
register struct termios
*tp
;
#define CHK(s) (*p == s[0] && !strcmp(p, s))
if (!(s
= strchr(s
, ':')))
if (!(ep
= strchr(p
, '=')))
(void)sscanf(ep
, "%lx", &tmp
);
tp
->c_cc
[VDISCARD
] = tmp
;
(void)sscanf(ep
, "%ld", &tmp
);
(void)sscanf(ep
, "%ld", &tmp
);
tp
->c_cc
[VREPRINT
] = tmp
;
(void)sscanf(ep
, "%ld", &tmp
);
(void)sscanf(ep
, "%ld", &tmp
);
errx(1, "illegal gfmt1 option -- %s", s
);
errx(1, "illegal gfmt1 option");