c9dcf76
To: vim-dev@vim.org
c9dcf76
Subject: Patch 7.0.132
c9dcf76
Fcc: outbox
c9dcf76
From: Bram Moolenaar <Bram@moolenaar.net>
c9dcf76
Mime-Version: 1.0
c9dcf76
Content-Type: text/plain; charset=ISO-8859-1
c9dcf76
Content-Transfer-Encoding: 8bit
c9dcf76
------------
c9dcf76
c9dcf76
Patch 7.0.132 (after 7.0.130)
c9dcf76
Problem:    Win32: Crash when Vim reads from stdin.
c9dcf76
Solution:   Only use mch_nodetype() when there is a file name.
c9dcf76
Files:	    src/fileio.c
c9dcf76
c9dcf76
c9dcf76
*** ../vim-7.0.131/src/fileio.c	Tue Oct 10 18:43:50 2006
c9dcf76
--- src/fileio.c	Thu Oct 12 20:50:35 2006
c9dcf76
***************
c9dcf76
*** 416,435 ****
c9dcf76
  	    msg_scroll = msg_save;
c9dcf76
  	    return FAIL;
c9dcf76
  	}
c9dcf76
-     }
c9dcf76
- #endif
c9dcf76
  
c9dcf76
! #if defined(MSDOS) || defined(MSWIN) || defined(OS2)
c9dcf76
!     /*
c9dcf76
!      * MS-Windows allows opening a device, but we will probably get stuck
c9dcf76
!      * trying to read it.
c9dcf76
!      */
c9dcf76
!     if (!p_odev && mch_nodetype(fname) == NODE_WRITABLE)
c9dcf76
!     {
c9dcf76
! 	filemess(curbuf, fname, (char_u *)_("is a device (disabled with 'opendevice' option"), 0);
c9dcf76
! 	msg_end();
c9dcf76
! 	msg_scroll = msg_save;
c9dcf76
! 	return FAIL;
c9dcf76
      }
c9dcf76
  #endif
c9dcf76
  
c9dcf76
--- 416,435 ----
c9dcf76
  	    msg_scroll = msg_save;
c9dcf76
  	    return FAIL;
c9dcf76
  	}
c9dcf76
  
c9dcf76
! # if defined(MSDOS) || defined(MSWIN) || defined(OS2)
c9dcf76
! 	/*
c9dcf76
! 	 * MS-Windows allows opening a device, but we will probably get stuck
c9dcf76
! 	 * trying to read it.
c9dcf76
! 	 */
c9dcf76
! 	if (!p_odev && mch_nodetype(fname) == NODE_WRITABLE)
c9dcf76
! 	{
c9dcf76
! 	    filemess(curbuf, fname, (char_u *)_("is a device (disabled with 'opendevice' option"), 0);
c9dcf76
! 	    msg_end();
c9dcf76
! 	    msg_scroll = msg_save;
c9dcf76
! 	    return FAIL;
c9dcf76
! 	}
c9dcf76
! # endif
c9dcf76
      }
c9dcf76
  #endif
c9dcf76
  
c9dcf76
*** ../vim-7.0.131/src/version.c	Tue Oct 10 21:56:37 2006
c9dcf76
--- src/version.c	Thu Oct 12 21:13:34 2006
c9dcf76
***************
c9dcf76
*** 668,669 ****
c9dcf76
--- 668,671 ----
c9dcf76
  {   /* Add new patch number below this line */
c9dcf76
+ /**/
c9dcf76
+     132,
c9dcf76
  /**/
c9dcf76
c9dcf76
-- 
c9dcf76
hundred-and-one symptoms of being an internet addict:
c9dcf76
31. You code your homework in HTML and give your instructor the URL.
c9dcf76
c9dcf76
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
c9dcf76
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
c9dcf76
\\\        download, build and distribute -- http://www.A-A-P.org        ///
c9dcf76
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///