| Next | ![]() |
4 |
This spring will be the 25th anniversary of my involvement with Unix
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 | ![]() |
Copyright © 2011 M. J. Dominus |