/svarcom/trunk/toys/hackz.c |
---|
0,0 → 1,41 |
/* |
* reads stdin and writes to stdout after hacker-like conversion |
*/ |
#include <stdio.h> |
int main(void) { |
int c; |
while ((c = getchar()) != EOF) { |
switch (c) { |
case 'o': |
case 'O': |
c = '0'; |
break; |
case 'i': |
case 'I': |
c = '1'; |
break; |
case 'A': |
c = '4'; |
break; |
case 'a': |
c = '@'; |
break; |
case 'S': |
c = '$'; |
break; |
case 'e': |
case 'E': |
c = '3'; |
break; |
case '0': |
c = 'o'; |
break; |
} |
putchar(c); |
} |
return(0); |
} |
/svarcom/trunk/toys/makefile |
---|
1,10 → 1,13 |
CFLAGS = -0 -mt -wx -lr -we -ox |
all: erlev.com upcase.com |
all: erlev.com upcase.com hackz.com |
erlev.com: erlev.c |
*wcl $(CFLAGS) erlev.c |
*wcl $(CFLAGS) $< |
upcase.com: upcase.c |
*wcl $(CFLAGS) $< |
hackz.com: hackz.c |
*wcl $(CFLAGS) $< |