Subversion Repositories SvarDOS

Compare Revisions

Ignore whitespace Rev 1100 → Rev 1101

/svarcom/tags/svarcom-2022.3/toys/erlev.c
0,0 → 1,7
#include <stdio.h>
#include <stdlib.h>
 
int main(int argc, char **argv) {
int d = atoi(argv[1]);
return(d);
}
/svarcom/tags/svarcom-2022.3/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.3/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.3/toys/readme.txt
0,0 → 1,2
This directory contains tiny applications that are overall not very useful.
Their job is only to help me test SvarCOM.
/svarcom/tags/svarcom-2022.3/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);
}