home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / c / c-tools-.000 / c-tools- / c-tools-0.4 / examples / tst / obscure.unreadable < prev   
Encoding:
Text File  |  1995-08-13  |  676 b   |  22 lines

  1. /* output of `obscure -u -w 40 stripcr.c obscure.unreadable' */
  2. #include <string.h>
  3. #include <stdio.h>
  4. #include <ctype.h>
  5. #include <assert.h>
  6. int main(int q0,char**q1){FILE*q2=stdin,
  7. *q3=stdout;int q4;if(q0>1){if(!strcmp(q1
  8. [1],"-h")||q0>3){fprintf(stderr,
  9. "\
  10. %s: remove carriage returns from input file\n\
  11. usage: %s [input] [[output]]\n"
  12. ,q1[0],q1[0]);exit(0);}else{if(strcmp(q1
  13. [1],"-")!=0&&(q2=fopen(q1[1],"rb"))==
  14. NULL){fprintf(stderr,
  15. "%s: no such file\n",q1[1]);exit(1);}}if
  16. (q0==3){if((q3=fopen(q1[2],"wb"))==NULL)
  17. {fprintf(stderr,
  18. "%s: cannot open output file\n",q1[2]);
  19. exit(1);}}}while((q4=fgetc(q2))!=EOF)if(
  20. q4!=0x0d)fputc(q4,q3);fclose(q2);fclose(
  21. q3);return 0;}
  22.