www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/12/18/15:36:57

Date: Thu, 19 Dec 1996 09:32:55 +0000
From: Bill Currie <billc AT blackmagic DOT tait DOT co DOT nz>
Subject: fnsplit patch
To: djgpp-workers AT delorie DOT com
Reply-to: billc AT blackmagic DOT tait DOT co DOT nz
Message-id: <32B90BC7.5A55@blackmagic.tait.co.nz>
Organization: Tait Electronics NZ
MIME-version: 1.0

This is a multi-part message in MIME format.

--------------49352B2161DA
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

This patch allows fnsplit to work properly on file names that begin with
'.'s.  Files like '.emacs' would come out as 'emacs'.  This was caused
by the remainder of the name overwriting the leading dots.

Bill
-- 
Leave others their otherness.

--------------49352B2161DA
Content-Type: text/plain; charset=us-ascii; name="FNSPLIT.DIF"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="FNSPLIT.DIF"

*** src/libc/dos/dir/fnsplit.c	Thu Jul 25 23:12:04 1996
--- /source/ed/fnsplit.c	Thu Dec 12 10:22:16 1996
***************
*** 69,74 ****
--- 69,78 ----
        len = pp - pe;
        strncpy(name, pe, len);
        name[len] = '\0';
+       /* advance name over '.'s so they don't get scragged later on when the
+        * rest of the name (if any) is copied (for files like .emacs). - WJC
+        */
+       name+=len;
      }
    }
  

--------------49352B2161DA--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019