npc(1): commenting
This commit is contained in:
parent
fd1ed79329
commit
49031102f2
@ -30,11 +30,8 @@ int usage(char *s) {
|
|||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
int c;
|
int c;
|
||||||
char showend;
|
char showend = 0; /* print a dollar sign before each newline */
|
||||||
char showtab;
|
char showtab = 0; /* prints tab characters in caret notation */
|
||||||
|
|
||||||
showend = 0;
|
|
||||||
showtab = 0;
|
|
||||||
|
|
||||||
if (argc > 0) {
|
if (argc > 0) {
|
||||||
while ((c = getopt(argc, argv, "et")) != -1) {
|
while ((c = getopt(argc, argv, "et")) != -1) {
|
||||||
@ -52,7 +49,7 @@ int main(int argc, char *argv[]) {
|
|||||||
if ((c & 0x80) != 0) { fputs("M-", stdout); }
|
if ((c & 0x80) != 0) { fputs("M-", stdout); }
|
||||||
|
|
||||||
switch (c ^ 0x80) { /* 0b 1000 0000 */
|
switch (c ^ 0x80) { /* 0b 1000 0000 */
|
||||||
case 0x7f: fputs("^?", stdout); break;
|
case 0x7f: fputs("^?", stdout); break; /* delete character */
|
||||||
case '\n': if (showend) { putc('$', stdout); }
|
case '\n': if (showend) { putc('$', stdout); }
|
||||||
default:
|
default:
|
||||||
if (c >= ' ' || c == '\n' || (!showtab && c == '\t')) {
|
if (c >= ' ' || c == '\n' || (!showtab && c == '\t')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user