Message-Id: <199905091945.TAA123402@out1.ibm.net> From: "Mark E." To: djgpp-workers AT delorie DOT com Date: Sun, 9 May 1999 15:46:33 -0400 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: RE: v2.03: wrapping up X-mailer: Pegasus Mail for Win32 (v3.01d) Reply-To: djgpp-workers AT delorie DOT com Eli, I'm not sure if I've found a problem or not. Here's a case that produces gibberish at the end of the output string when FOO doesn't exist: /dev/env/FOO~c:/djgpp I'll admit this case is illegal according to the docs, but I don't think it's nice that it produces garbage at the end either. Here's one way to keep garbage from appearing at the tail: *** putpath.c.eli Sun May 9 15:31:18 1999 --- putpath.c Sun May 9 15:32:52 1999 *************** _put_path2(const char *path, int offset) *** 107,116 **** /* if the rest of path begins with a slash, remove the trailing slash in the transfer buffer */ ! if ((p[1] == '/' || p[1] == '\\') && o-1 >= __tb+offset ! && ((c = _farnspeekb(o-1)) == '/' || c == '\\')) ! o--; ! path = p + 1; } else if (p[5]) path = p + 5; --- 107,121 ---- /* if the rest of path begins with a slash, remove the trailing slash in the transfer buffer */ ! if (*p) ! { ! if ((p[1] == '/' || p[1] == '\\') && o-1 >= __tb+offset ! && ((c = _farnspeekb(o-1)) == '/' || c == '\\')) ! o--; ! path = p + 1; ! } ! else ! path = p; } else if (p[5]) path = p + 5; I missed the debate over the delimiter change while working on changing my email address, but if it isn't too late I would suggest " as a possible delimiter, as in: /dev/env/DJDIR"c:/djgpp"/include Mark --- Mark Elbrecht, snowball3 AT bigfoot DOT com http://snowball.frogspace.net/