Merge branch 'undpugetopt'

remotes/1696625325996769446/tmp_refs/heads/master
silverwizard 5 years ago
commit 3a3278f95b
  1. 10
      undpu.c

@ -57,10 +57,12 @@ int main (int argc, char **argv){
return EXIT_FAILURE; return EXIT_FAILURE;
} }
} }
strlcpy(output,argv[1],strlen(argv[1])-4); if(!out){
if((joe = fopen(output,"w"))==NULL){ strlcpy(output,argv[0],strlen(argv[0])-4);
fputs("Ummm, the output file doesn't work.\n",stderr); if((joe = fopen(output,"w"))==NULL){
return EXIT_FAILURE; fputs("Ummm, the output file doesn't work.\n",stderr);
return EXIT_FAILURE;
}
} }
while((thing=fgetc(bob))!=EOF){ while((thing=fgetc(bob))!=EOF){
fputc(thing,joe); fputc(thing,joe);

Loading…
Cancel
Save