Date: Wed, 14 Jul 93 21:11:34 MDT From: gunter AT statsun DOT stat DOT ColoState DOT EDU (Gunter Hartel) To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: rewind() Heloo Does the rewind() function in stdio work properly? The following piece works under MS but fails to reset the file pointer under DJGPP. Am I taking something for granted somewhere? My compile command is: gcc -m486 -lm -lc -lpc test.c The program is: #include FILE *input; float temp; main() { printf("EOF = %d\n",EOF); input = fopen( "junk", "r"); while (fscanf(input,"%f \n",&temp)!=EOF) {printf("ONE %f \n",temp);} rewind(input); while (fscanf(input,"%f \n",&temp)!=EOF) {printf("TWO %f \n",temp);} } Any help is appreciated. Until then I'll just close and reopen. Gunter