34 #define STRING_LENGTH 1024 55 if (input == NULL || temp == NULL)
57 printf (
"clear_comments.c: clear_comments () the input ");
58 printf (
"database filename or temporary file name is null.\n");
63 FILE *input_fp, *temp_fp;
70 if ((input_fp = fopen (input,
"r")) == NULL)
72 printf (
"clear_comments.c: clear_comments () open database file error.\n");
78 if ((temp_fp = fopen (temp,
"w")) == NULL)
80 printf (
"clear_comments.c: clear_comments () open temporary file error.\n");
90 while (temp_line[i] !=
'\n')
92 if (temp_line[i] ==
'#') {j++;}
96 if (j == 0 && strlen(temp_line) != 1)
98 fprintf (temp_fp,
"%s", temp_line);