Loading ...
Sorry, an error occurred while loading the content.

808[patch] Re: patchmode truncates filename

Expand Messages
  • R. Edward Ralston
    Nov 13, 2002
    • 0 Attachment
      The following patch fixes a problem with 'patchmode'
      truncating long filenames on MacOSX built
      with the Carbon GUI.

      This patch is against vim 6.1.255


      ###### snip ######
      diff -C3 -r src.orig/os_mac.h src/os_mac.h
      *** src.orig/os_mac.h Sat Mar 9 10:17:30 2002
      --- src/os_mac.h Wed Nov 13 09:01:52 2002
      ***************
      *** 310,318 ****
      */
      #define CMDBUFFSIZE 1024 /* size of the command processing buffer */

      ! #define MAXPATHL 256 /* Limited by the Pascal Strings */
      !
      ! #define BASENAMELEN (32-5-1) /* length of base of filename */

      #ifndef DFLT_MAXMEM
      # define DFLT_MAXMEM 512 /* use up to 512 Kbyte for buffer */
      --- 310,322 ----
      */
      #define CMDBUFFSIZE 1024 /* size of the command processing buffer */

      ! #if defined(MACOS_X_UNIX)
      ! # define MAXPATHL 1024
      ! # define BASENAMELEN (MAXNAMLEN - 5) /* length of base of filename */
      ! #else
      ! # define MAXPATHL 256 /* Limited by the Pascal Strings */
      ! # define BASENAMELEN (32-5-1) /* length of base of filename */
      ! #endif

      #ifndef DFLT_MAXMEM
      # define DFLT_MAXMEM 512 /* use up to 512 Kbyte for buffer */
      ###### snip ######



      On 2002-11-05 11:29:59, R. Edward Ralston <eralston@...> wrote:
      > "patchmode" appears to be munging long filenames.
      >
      > In your shell do:
      >
      > touch ABCDEFGHIJKLMNOPQRSTUVWXYZ.txt
      >
      > then
      >
      > vim -u NONE -U NONE ABCDEFGHIJKLMNOPQRSTUVWXYZ.txt
      >
      > once there, type some text, then
      >
      > :set patchmode=.originalfile
      > :wq
      >
      > I then have the two files
      >
      > ABCDEFGHIJKLMNOPQRSTUVWXYZ.txt
      > ABCDEFGHIJKLMNOPQRSTUVWXYZ.originalfile
      >
      > in the current directory.
      > Shouln't that instead be
      >
      > ABCDEFGHIJKLMNOPQRSTUVWXYZ.txt.originalfile
      >
      > ???
      >
      > Thanks.
      >


      --
      do daemons dream of electric sleep()?
      R. Edward Ralston <eralston@...>
    • Show all 9 messages in this topic