Karsten Hopp 81c285
To: vim-dev@vim.org
Karsten Hopp 81c285
Subject: Patch 7.2.232
Karsten Hopp 81c285
Fcc: outbox
Karsten Hopp 81c285
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 81c285
Mime-Version: 1.0
Karsten Hopp 81c285
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 81c285
Content-Transfer-Encoding: 8bit
Karsten Hopp 81c285
------------
Karsten Hopp 81c285
Karsten Hopp 81c285
Patch 7.2.232
Karsten Hopp 81c285
Problem:    Cannot debug problems with being in a wrong directory.
Karsten Hopp 81c285
Solution:   When 'verbose' is 5 or higher report directory changes.
Karsten Hopp 81c285
Files:	    src/os_unix.c, src/os_unix.h, src/proto/os_unix.pro
Karsten Hopp 81c285
Karsten Hopp 81c285
Karsten Hopp 81c285
*** ../vim-7.2.231/src/os_unix.c	2009-07-14 12:20:28.000000000 +0200
Karsten Hopp 81c285
--- src/os_unix.c	2009-07-14 17:13:15.000000000 +0200
Karsten Hopp 81c285
***************
Karsten Hopp 81c285
*** 319,324 ****
Karsten Hopp 81c285
--- 319,341 ----
Karsten Hopp 81c285
      {-1,	    "Unknown!", FALSE}
Karsten Hopp 81c285
  };
Karsten Hopp 81c285
  
Karsten Hopp 81c285
+     int
Karsten Hopp 81c285
+ mch_chdir(path)
Karsten Hopp 81c285
+     char *path;
Karsten Hopp 81c285
+ {
Karsten Hopp 81c285
+     if (p_verbose >= 5)
Karsten Hopp 81c285
+     {
Karsten Hopp 81c285
+ 	verbose_enter();
Karsten Hopp 81c285
+ 	smsg((char_u *)"chdir(%s)", path);
Karsten Hopp 81c285
+ 	verbose_leave();
Karsten Hopp 81c285
+     }
Karsten Hopp 81c285
+ # ifdef VMS
Karsten Hopp 81c285
+     return chdir(vms_fixfilename(path));
Karsten Hopp 81c285
+ # else
Karsten Hopp 81c285
+     return chdir(path);
Karsten Hopp 81c285
+ # endif
Karsten Hopp 81c285
+ }
Karsten Hopp 81c285
+ 
Karsten Hopp 81c285
  /*
Karsten Hopp 81c285
   * Write s[len] to the screen.
Karsten Hopp 81c285
   */
Karsten Hopp 81c285
***************
Karsten Hopp 81c285
*** 2424,2429 ****
Karsten Hopp 81c285
--- 2441,2452 ----
Karsten Hopp 81c285
  #ifdef HAVE_FCHDIR
Karsten Hopp 81c285
  	    if (fd >= 0)
Karsten Hopp 81c285
  	    {
Karsten Hopp 81c285
+ 		if (p_verbose >= 5)
Karsten Hopp 81c285
+ 		{
Karsten Hopp 81c285
+ 		    verbose_enter();
Karsten Hopp 81c285
+ 		    MSG("fchdir() to previous dir");
Karsten Hopp 81c285
+ 		    verbose_leave();
Karsten Hopp 81c285
+ 		}
Karsten Hopp 81c285
  		l = fchdir(fd);
Karsten Hopp 81c285
  		close(fd);
Karsten Hopp 81c285
  	    }
Karsten Hopp 81c285
*** ../vim-7.2.231/src/os_unix.h	2009-05-16 16:36:25.000000000 +0200
Karsten Hopp 81c285
--- src/os_unix.h	2009-07-14 16:55:05.000000000 +0200
Karsten Hopp 81c285
***************
Karsten Hopp 81c285
*** 482,492 ****
Karsten Hopp 81c285
  # else
Karsten Hopp 81c285
  int mch_rename __ARGS((const char *src, const char *dest));
Karsten Hopp 81c285
  # endif
Karsten Hopp 81c285
- # ifdef VMS
Karsten Hopp 81c285
- #  define mch_chdir(s) chdir(vms_fixfilename(s))
Karsten Hopp 81c285
- # else
Karsten Hopp 81c285
- #  define mch_chdir(s) chdir(s)
Karsten Hopp 81c285
- # endif
Karsten Hopp 81c285
  # ifndef VMS
Karsten Hopp 81c285
  #  ifdef __MVS__
Karsten Hopp 81c285
    /* on OS390 Unix getenv() doesn't return a pointer to persistent
Karsten Hopp 81c285
--- 482,487 ----
Karsten Hopp 81c285
*** ../vim-7.2.231/src/proto/os_unix.pro	2008-06-24 23:58:57.000000000 +0200
Karsten Hopp 81c285
--- src/proto/os_unix.pro	2009-07-14 16:58:08.000000000 +0200
Karsten Hopp 81c285
***************
Karsten Hopp 81c285
*** 1,4 ****
Karsten Hopp 81c285
--- 1,5 ----
Karsten Hopp 81c285
  /* os_unix.c */
Karsten Hopp 81c285
+ int mch_chdir __ARGS((char *path));
Karsten Hopp 81c285
  void mch_write __ARGS((char_u *s, int len));
Karsten Hopp 81c285
  int mch_inchar __ARGS((char_u *buf, int maxlen, long wtime, int tb_change_cnt));
Karsten Hopp 81c285
  int mch_char_avail __ARGS((void));
Karsten Hopp 81c285
*** ../vim-7.2.231/src/version.c	2009-07-14 16:05:14.000000000 +0200
Karsten Hopp 81c285
--- src/version.c	2009-07-14 17:37:15.000000000 +0200
Karsten Hopp 81c285
***************
Karsten Hopp 81c285
*** 678,679 ****
Karsten Hopp 81c285
--- 678,681 ----
Karsten Hopp 81c285
  {   /* Add new patch number below this line */
Karsten Hopp 81c285
+ /**/
Karsten Hopp 81c285
+     232,
Karsten Hopp 81c285
  /**/
Karsten Hopp 81c285
Karsten Hopp 81c285
-- 
Karsten Hopp 81c285
From "know your smileys":
Karsten Hopp 81c285
 O:-)	Saint
Karsten Hopp 81c285
Karsten Hopp 81c285
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 81c285
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 81c285
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 81c285
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///