/svarcom/tags/svarcom-2022.0/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/tags/svarcom-2022.0/toys/makefile |
0,0 → 1,13 |
|
CFLAGS = -0 -mt -wx -lr -we -ox |
|
all: erlev.com upcase.com hackz.com |
|
erlev.com: erlev.c |
*wcl $(CFLAGS) $< |
|
upcase.com: upcase.c |
*wcl $(CFLAGS) $< |
|
hackz.com: hackz.c |
*wcl $(CFLAGS) $< |
/svarcom/tags/svarcom-2022.0/toys/upcase.c |
0,0 → 1,16 |
/* |
* reads stdin and writes to stdout after upcasing |
*/ |
|
#include <stdio.h> |
|
int main(void) { |
int c; |
|
while ((c = getchar()) != EOF) { |
if ((c >= 'a') && (c <= 'z')) c -= ('a' - 'A'); |
putchar(c); |
} |
|
return(0); |
} |