HOME | DD

brokenjpgs — 385

#char #include #int #named #produce #program #run #these #nchar #it #c #following #argc #latinify #mainint #argvfile #infilefile #cinfilefopenargv1 #rnfopenlatinversion #wwhilefeofinfilec #charfgetcinfileswitchccase #ucvbreakcase #wcvbreakcase #jcibreakcase
Published: 2023-12-11 19:24:18 +0000 UTC; Views: 148; Favourites: 0; Downloads: 1
Redirect to original
Description

to produce these, i run the following c program (i named it latinify):

#include

int main(int argc,char** argv){FILE* infile;FILE* n;char c;infile=fopen(argv[1],"r+");n=fopen("latinversion","w+");while(!feof(infile)){c= (char)fgetc(infile);switch(c){case 'u':c='v';break;case 'U':c='V';break;case 'w':c='v';break;case 'W':c='V';break;case 'j':c='i';break;case 'J':c='I';break;case 'k':c='c';break;case 'K':c='C';break;}fputc(c,n);}return 1;}

with the command: latinify inputfile.jpg;cat inputfile.jpg>outputfile.jpg


it theoretically works on all filetypes but it tends to brick anything that isnt jpg or mp3.


if you want to make your own, go ahead, you dont have to attribute me. this is like first semester c stuff that i made for a joke but kept around and found a use for. use at your own risk, i am not responsible if you accidentally overwrite files you care about.

Related content
Comments: 0