Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

ENTERPRISE UNICODE DETECTOR AND READER

Name: Anonymous 2012-01-12 20:35


#include <stdio.h>

int main(void) {
  char buff[256];
  char c;
  FILE *f;

  f = fopen("filename", "r");
  c = fgetc(f);
  if(c < 0) {
    fclose(f);
    system("type filename > filename.tmp");
    f = fopen("filename.tmp", "r");
  }
  else {
    rewind(f);
  }

  while(fgets(buff, 256, f) != NULL)
    puts(f);

  fclose(f);
 
  return(0);
}

Name: Anonymous 2012-01-13 19:13

>>62
Do you enjoy having an IQ 35 points below average? Do you enjoy talking about languages you have no clue how to use?

What happened in your childhood that made you this way?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List