Message-Id: <199904302147.VAA11210@out2.ibm.net> From: "Mark E." To: djgpp-workers AT delorie DOT com Date: Fri, 30 Apr 1999 17:48:12 -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 > One question unrelated to your changes: Shouldn't \dev\null be > equivalent to /dev/null? I more I think about it, the more I think this is correct since in every other place, we treat '/' and '\' the same. Here's a patch that makes this the case for \dev\ too: *** src/libc/dos/io/putpath.c.orig Thu Oct 29 05:24:44 1998 --- src/libc/dos/io/putpath.c Thu Apr 29 18:05:02 1999 *************** *** 8,13 **** --- 8,20 ---- #include #include + static inline + int + is_dir_separator(char ch) + { + return (ch == '\\') || (ch == '/'); + } + void _put_path(const char *path) { *************** _put_path2(const char *path, int offset) *** 31,37 **** if (p[0] && p[1] == ':') p += 2; ! if (strncmp(p, "/dev/", 5) == 0) { if (strcmp(p+5, "null") == 0) path = "nul"; --- 38,46 ---- if (p[0] && p[1] == ':') p += 2; ! if (is_dir_separator(*p) ! && strncmp(p+1, "dev", 3) == 0 ! && is_dir_separator(*(p+4))) { if (strcmp(p+5, "null") == 0) path = "nul"; *************** _put_path2(const char *path, int offset) *** 39,45 **** path = "con"; else if (((p[5] >= 'a' && p[5] <= 'z') || (p[5] >= 'A' && p[5] <= 'Z')) ! && (p[6] == '/' || p[6] == '\\' || p[6] == '\0')) { /* map /dev/a/ to a:/ */ _farnspokeb(o++, p[5]); --- 48,54 ---- path = "con"; else if (((p[5] >= 'a' && p[5] <= 'z') || (p[5] >= 'A' && p[5] <= 'Z')) ! && (is_dir_separator(p[6]) || p[6] == '\0')) { /* map /dev/a/ to a:/ */ _farnspokeb(o++, p[5]); --- Mark Elbrecht, snowball3 AT bigfoot DOT com http://snowball.frogspace.net/