Next | 4 |
I have been involved with Unix for almost exactly 30 years
In those days I was very ignorant:
/* Take a man page and strip out the _^H's. */
#include <stdio.h> #define CTLH 8 /* Code for a control-H */ main() { char c; int ulflag = 0; /* set this if I just read an underline character */ while ((c= getchar()) != EOF) { if (ulflag == 1) { ulflag = 0; if (c != CTLH) printf("_%c",c); } else { if (c == '_') ulflag = 1; else printf("%c",c); } } }
Next | Next |