TurboC2.0 Patched to fix uniquepipe() of popen.c Prereq: 3 *** tcpatlev.h Wed Jul 18 15:39:44 1990 --- tcpatlev.new Wed Jul 18 15:48:16 1990 *************** *** 1,1 **** ! #define TCPATCHLEVEL 3 --- 1,1 ---- ! #define TCPATCHLEVEL 4 *** readme Wed Jul 18 15:39:48 1990 --- readme.new Wed Jul 18 15:46:38 1990 *************** *** 162,164 **** --- 162,185 ---- 177: possibly incorrect assignment .... the message is misleading (see the Turbo C User Manual). + + *** OFFICIAL PATCHLEVEL 12, TurboC2.0 PATCHLEVEL 4 + + From: leefi@microsoft.wa.com (lee fisher) + Subject: re: MSDOS Patch: more patches + Date: Mon Jul 16 13:08:47 1990 + + In the above function uniquepipe() of popen.c, the format for the pipe + name ("pipe%05d.tmp") will generate an invalid file name for DOS. In + the DOS FAT file system, the base filename can only be 8 characters + (with a maximum file name extension of 3 characters), anything greater + than this will be silently truncated by DOS. Thus, pipe00000.tmp is 9.3, + where the DOS max is 8.3, so isn't there a problem where pipe00001 and + pipe00002 will get confused? + + How about %04d instead. I would think that making the assumption that + this implementation of pipes for DOS will only have 9999 pipes at any + given point in time would be better than losing the rightmost digit + in the current implementation. + + (this bug is now fixed) *** popen.c Wed Jul 18 15:40:16 1990 --- popen.new Wed Jul 18 15:47:42 1990 *************** *** 153,159 **** { static char name[ 14 ]; static short int num = 0; ! (void) sprintf( name, "pipe%05d.tmp", num++ ); return( name ); } --- 153,159 ---- { static char name[ 14 ]; static short int num = 0; ! (void) sprintf( name, "pipe%04d.tmp", num++ ); return( name ); }