Subject: Re: UNC path syntax
From: [email-masked] ("Mikey")

5 Apr 1997 00:23:53 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Original-To: "Jim Balter" <[email-masked]>
Original-Cc: "cygnus" <[email-masked]>
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
Original-Sender: [email-masked]

I hate to be the bad news man, but this patch really messes up find.exe,
Sorry ;^).

> *** path.cc.orig	Sun Mar 23 02:15:12 1997
> --- path.cc	Sun Mar 23 03:15:33 1997
> ***************
> *** 208,214 ****
>   
>     /* The rule is :'s can't appear in [our] posix path names so this is
a safe
>        test; if ':' is present it already be in win32 form.  */
> !   if (strchr (src_path, ':') != NULL)
>       {
>         debug_printf ("conv_to_win32_path: %s already win32\n",
src_path);
>         if (win32_path != NULL)
> --- 208,216 ----
>   
>     /* The rule is :'s can't appear in [our] posix path names so this is
a safe
>        test; if ':' is present it already be in win32 form.  */
> !   // JQB: hack in test for \\ as well
> !   if (strchr (src_path, ':') != NULL ||
> !       src_path[0] == '\\' && src_path[1] == '\\')
>       {
>         debug_printf ("conv_to_win32_path: %s already win32\n",
src_path);
>         if (win32_path != NULL)
> ***************
> *** 305,313 ****
>   	{
>   	  int j = mount[i].devicelen;
>   	  memcpy (p, mount[i].device, j);
> ! 	  if (pathbuf[mount[i].pathlen] != '/')
>   	    p[j++] = '\\';
> ! 	  strcpy (p + j, pathbuf + mount[i].pathlen);
>   	  backslashify (p, p, trailing_slash_p);
>   	}
>         if (win32_path != NULL && ! got_rel_p && win32_path != p)
> --- 307,321 ----
>   	{
>   	  int j = mount[i].devicelen;
>   	  memcpy (p, mount[i].device, j);
> ! 
> ! 	  // JQB: add test for empty tail, so, for instance,
> ! 	  // \\.\tape0 doesn't turn into \\.\tape0\,
> ! 	  // which win32 doesn't like.  Still turn a: into a:\ though.
> ! 	  char *tail = pathbuf + mount[i].pathlen;
> ! 	  if ((*tail || tail[-1] == ':') && *tail != '/')
>   	    p[j++] = '\\';
> ! 	  strcpy (p + j, tail);
> ! 
>   	  backslashify (p, p, trailing_slash_p);
>   	}
>         if (win32_path != NULL && ! got_rel_p && win32_path != p)
> 
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".