Changeset 7929 for trunk/Ohana/src/opihi/lib.shell/gprint.c
- Timestamp:
- Jul 18, 2006, 6:58:54 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/lib.shell/gprint.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.shell/gprint.c
r7917 r7929 77 77 return (&streams[i]); 78 78 } 79 fprintf ( STDERR, "programming error: gprintInit not called for thread\n");79 fprintf (stderr, "programming error: gprintInit not called for thread\n"); 80 80 abort (); 81 81 } … … 90 90 if (stream[0].file != NULL) { 91 91 fflush (stream[0].file); 92 if (stream[0].file != stdout) fclose (stream[0].file); 92 if (stream[0].file == stdout) goto skip_close; 93 if (stream[0].file == stderr) goto skip_close; 94 fclose (stream[0].file); 95 96 skip_close: 93 97 stream[0].file = NULL; 94 98 } … … 146 150 stream[0].file = fopen (filename, "a"); 147 151 if (stream[0].file == NULL) { 148 fprintf ( STDERR, "cannot open file %s\n", filename);152 fprintf (stderr, "cannot open file %s\n", filename); 149 153 stream[0].file = (dest == GP_LOG) ? stdout : stderr; 150 154 }
Note:
See TracChangeset
for help on using the changeset viewer.
