Message-Id: <
199312091710.SAA00967@strider.st.dsi.unimi.it>
Subject: /bin/stty willnot "undef" cchars
Description:
running /bin/stty to change a cchar from its value to <undef>
willnot work, and will set that cchar's value to "u".
Repeat-By:
$ stty discard undef
$ stty -a
...
cchars: discard = u ; dsusp = ^O; eof = ^D; eol = <undef>;
#endif /* not lint */
#include <sys/types.h>
#endif /* not lint */
#include <sys/types.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
if (!arg)
err("option requires an argument -- %s\n%s", name, usage);
if (!arg)
err("option requires an argument -- %s\n%s", name, usage);
-#define CHK(s) (*name == s[0] && !strcmp(name, s))
- if (CHK("undef") || CHK("<undef>"))
+#define CHK(s) (*arg == s[0] && !strcmp(arg, s))
+ if (CHK("undef") || CHK("<undef>"))
ip->t.c_cc[cp->sub] = _POSIX_VDISABLE;
else if (arg[0] == '^')
ip->t.c_cc[cp->sub] = (arg[1] == '?') ? 0177 :
ip->t.c_cc[cp->sub] = _POSIX_VDISABLE;
else if (arg[0] == '^')
ip->t.c_cc[cp->sub] = (arg[1] == '?') ? 0177 :