1 // Test file to show bug in 1.27 2 3 #include <stdio.h> 4 #include <stdlib.h> 5 #include <string.h> 6 main()7int main() 8 { 9 FILE *f; 10 char buf[1024], *s; 11 int first; 12 13 first = 1; 14 while(fgets(buf, sizeof(buf), stdin) != 0) { 15 if(first == 0) { 16 printf("\n"); 17 } 18 s = buf; 19 while(*s != '\0') { 20 if(*s == '\n' || *s == '\r') { 21 *s = '\0'; 22 break; 23 } 24 s++; 25 } 26 printf("%s", buf); 27 first = 0; 28 } 29 } 30 31 /* end with spaces and no \n or \r */ 32