/*This programm converts 928 character set to 437gr.In order to execute it you must compile it with gcc . */ #include #include void main(int argc, char *argv[]) { int i,c; FILE * fp; FILE * fp1; if (argc!=3) { printf("\n\n928 to 437gr Converter *Version 1.1* by Spiros Ioannou\n"); printf("Syntax:9282437 infile outfile (infile must be different than outfile)\n\n");} else if (strcmp(argv[1],argv[2])==0) {printf("INFILE SHOULD BE DIFFERENT FROM OUTFILE");} else if ((fp=fopen(*++argv,"r")) == NULL) {printf("I cannot open %s \n",argv[0]); } else { fp1=fopen(*++argv,"w"); while ((c=getc(fp)) != EOF) { if (193<=c&&c<=209) c=c-65; else if (211<=c&&c<=217) c=c-66; else if (225<=c&&c<=241) c=c-73; else if (244<=c&&c<=248) c=c-73; else if (c==242) c=170; else if (c==243) c=169; else if (c==249) c=224; else if (c==250) c=228; else if (c==251) c=232; else if (c==252) c=230; else if (c==253) c=231; else if (c==254) c=233; else if (c==162) c=234; else if (c==184) c=235; else if (c==185) c=236; else if (c==186) c=237; else if (c==188) c=238; else if (c==190) c=239; else if (c==191) c=240; else if (c==222) c=227; else if (c==218) c=136; else if (c==219) c=147; else if (c==220) c=225; else if (c==221) c=226; else if (c==223) c=229; putc(c,fp1); } fclose(fp);fclose(fp1); }; }