[xiph-cvs] cvs commit: vorbis-tools/vorbiscomment vcomment.c
Jack Moffitt
jack at xiph.org
Mon Dec 31 17:39:54 PST 2001
jack 01/12/31 17:39:54
Modified: vorbiscomment vcomment.c
Log:
Don't close stdin and stdout. This is fatal on win32.
Revision Changes Path
1.15 +3 -5 vorbis-tools/vorbiscomment/vcomment.c
Index: vcomment.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/vorbiscomment/vcomment.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- vcomment.c 2001/10/02 03:03:44 1.14
+++ vcomment.c 2002/01/01 01:39:52 1.15
@@ -474,11 +474,9 @@
void close_files(param_t *p)
{
- /* FIXME: should handle stdin/out */
-
- if (p->in != NULL) fclose(p->in);
- if (p->out != NULL) fclose(p->out);
- if (p->com != NULL) fclose(p->com);
+ if (p->in != NULL && p->in != stdin) fclose(p->in);
+ if (p->out != NULL && p->out != stdout) fclose(p->out);
+ if (p->com != NULL && p->com != stdout && p->com != stdin) fclose(p->com);
if(p->tempoutfile)
rename(p->outfilename, p->infilename);
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list