Karsten Hopp e7ac7a
To: vim_dev@googlegroups.com
Karsten Hopp e7ac7a
Subject: Patch 7.3.263
Karsten Hopp e7ac7a
Fcc: outbox
Karsten Hopp e7ac7a
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp e7ac7a
Mime-Version: 1.0
Karsten Hopp e7ac7a
Content-Type: text/plain; charset=UTF-8
Karsten Hopp e7ac7a
Content-Transfer-Encoding: 8bit
Karsten Hopp e7ac7a
------------
Karsten Hopp e7ac7a
Karsten Hopp e7ac7a
Patch 7.3.263
Karsten Hopp e7ac7a
Problem:    Perl and Tcl have a few code style problems.
Karsten Hopp e7ac7a
Solution:   Clean it up.  (Elias Diem)
Karsten Hopp e7ac7a
Files:	    src/if_perl.xs, src/if_tcl.c
Karsten Hopp e7ac7a
Karsten Hopp e7ac7a
Karsten Hopp e7ac7a
*** ../vim-7.3.262/src/if_perl.xs	2010-10-23 14:02:48.000000000 +0200
Karsten Hopp e7ac7a
--- src/if_perl.xs	2011-07-27 14:11:03.000000000 +0200
Karsten Hopp e7ac7a
***************
Karsten Hopp e7ac7a
*** 755,761 ****
Karsten Hopp e7ac7a
  #ifdef HAVE_SANDBOX
Karsten Hopp e7ac7a
      if (sandbox)
Karsten Hopp e7ac7a
      {
Karsten Hopp e7ac7a
! 	safe = perl_get_sv( "VIM::safe", FALSE );
Karsten Hopp e7ac7a
  # ifndef MAKE_TEST  /* avoid a warning for unreachable code */
Karsten Hopp e7ac7a
  	if (safe == NULL || !SvTRUE(safe))
Karsten Hopp e7ac7a
  	    EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module"));
Karsten Hopp e7ac7a
--- 755,761 ----
Karsten Hopp e7ac7a
  #ifdef HAVE_SANDBOX
Karsten Hopp e7ac7a
      if (sandbox)
Karsten Hopp e7ac7a
      {
Karsten Hopp e7ac7a
! 	safe = perl_get_sv("VIM::safe", FALSE);
Karsten Hopp e7ac7a
  # ifndef MAKE_TEST  /* avoid a warning for unreachable code */
Karsten Hopp e7ac7a
  	if (safe == NULL || !SvTRUE(safe))
Karsten Hopp e7ac7a
  	    EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module"));
Karsten Hopp e7ac7a
***************
Karsten Hopp e7ac7a
*** 1108,1114 ****
Karsten Hopp e7ac7a
      VIWIN win
Karsten Hopp e7ac7a
  
Karsten Hopp e7ac7a
      PPCODE:
Karsten Hopp e7ac7a
!     if(items == 1)
Karsten Hopp e7ac7a
      {
Karsten Hopp e7ac7a
        EXTEND(sp, 2);
Karsten Hopp e7ac7a
        if (!win_valid(win))
Karsten Hopp e7ac7a
--- 1108,1114 ----
Karsten Hopp e7ac7a
      VIWIN win
Karsten Hopp e7ac7a
  
Karsten Hopp e7ac7a
      PPCODE:
Karsten Hopp e7ac7a
!     if (items == 1)
Karsten Hopp e7ac7a
      {
Karsten Hopp e7ac7a
        EXTEND(sp, 2);
Karsten Hopp e7ac7a
        if (!win_valid(win))
Karsten Hopp e7ac7a
***************
Karsten Hopp e7ac7a
*** 1116,1122 ****
Karsten Hopp e7ac7a
        PUSHs(sv_2mortal(newSViv(win->w_cursor.lnum)));
Karsten Hopp e7ac7a
        PUSHs(sv_2mortal(newSViv(win->w_cursor.col)));
Karsten Hopp e7ac7a
      }
Karsten Hopp e7ac7a
!     else if(items == 3)
Karsten Hopp e7ac7a
      {
Karsten Hopp e7ac7a
        int lnum, col;
Karsten Hopp e7ac7a
  
Karsten Hopp e7ac7a
--- 1116,1122 ----
Karsten Hopp e7ac7a
        PUSHs(sv_2mortal(newSViv(win->w_cursor.lnum)));
Karsten Hopp e7ac7a
        PUSHs(sv_2mortal(newSViv(win->w_cursor.col)));
Karsten Hopp e7ac7a
      }
Karsten Hopp e7ac7a
!     else if (items == 3)
Karsten Hopp e7ac7a
      {
Karsten Hopp e7ac7a
        int lnum, col;
Karsten Hopp e7ac7a
  
Karsten Hopp e7ac7a
***************
Karsten Hopp e7ac7a
*** 1249,1257 ****
Karsten Hopp e7ac7a
  	{
Karsten Hopp e7ac7a
  	    lnum = SvIV(ST(1));
Karsten Hopp e7ac7a
  	    count = 1 + SvIV(ST(2)) - lnum;
Karsten Hopp e7ac7a
! 	    if(count == 0)
Karsten Hopp e7ac7a
  		count = 1;
Karsten Hopp e7ac7a
! 	    if(count < 0)
Karsten Hopp e7ac7a
  	    {
Karsten Hopp e7ac7a
  		lnum -= count;
Karsten Hopp e7ac7a
  		count = -count;
Karsten Hopp e7ac7a
--- 1249,1257 ----
Karsten Hopp e7ac7a
  	{
Karsten Hopp e7ac7a
  	    lnum = SvIV(ST(1));
Karsten Hopp e7ac7a
  	    count = 1 + SvIV(ST(2)) - lnum;
Karsten Hopp e7ac7a
! 	    if (count == 0)
Karsten Hopp e7ac7a
  		count = 1;
Karsten Hopp e7ac7a
! 	    if (count < 0)
Karsten Hopp e7ac7a
  	    {
Karsten Hopp e7ac7a
  		lnum -= count;
Karsten Hopp e7ac7a
  		count = -count;
Karsten Hopp e7ac7a
*** ../vim-7.3.262/src/if_tcl.c	2010-12-17 20:23:56.000000000 +0100
Karsten Hopp e7ac7a
--- src/if_tcl.c	2011-07-27 14:11:03.000000000 +0200
Karsten Hopp e7ac7a
***************
Karsten Hopp e7ac7a
*** 1884,1897 ****
Karsten Hopp e7ac7a
  {
Karsten Hopp e7ac7a
      int newerr = OK;
Karsten Hopp e7ac7a
  
Karsten Hopp e7ac7a
!     if (error == TCL_EXIT )
Karsten Hopp e7ac7a
      {
Karsten Hopp e7ac7a
  	int retval;
Karsten Hopp e7ac7a
  	char buf[50];
Karsten Hopp e7ac7a
  	Tcl_Obj *robj;
Karsten Hopp e7ac7a
  
Karsten Hopp e7ac7a
  	robj = Tcl_GetObjResult(tclinfo.interp);
Karsten Hopp e7ac7a
! 	if( Tcl_GetIntFromObj(tclinfo.interp, robj, &retval) != TCL_OK )
Karsten Hopp e7ac7a
  	{
Karsten Hopp e7ac7a
  	    EMSG(_("E281: TCL ERROR: exit code is not int!? Please report this to vim-dev@vim.org"));
Karsten Hopp e7ac7a
  	    newerr = FAIL;
Karsten Hopp e7ac7a
--- 1884,1897 ----
Karsten Hopp e7ac7a
  {
Karsten Hopp e7ac7a
      int newerr = OK;
Karsten Hopp e7ac7a
  
Karsten Hopp e7ac7a
!     if (error == TCL_EXIT)
Karsten Hopp e7ac7a
      {
Karsten Hopp e7ac7a
  	int retval;
Karsten Hopp e7ac7a
  	char buf[50];
Karsten Hopp e7ac7a
  	Tcl_Obj *robj;
Karsten Hopp e7ac7a
  
Karsten Hopp e7ac7a
  	robj = Tcl_GetObjResult(tclinfo.interp);
Karsten Hopp e7ac7a
! 	if (Tcl_GetIntFromObj(tclinfo.interp, robj, &retval) != TCL_OK)
Karsten Hopp e7ac7a
  	{
Karsten Hopp e7ac7a
  	    EMSG(_("E281: TCL ERROR: exit code is not int!? Please report this to vim-dev@vim.org"));
Karsten Hopp e7ac7a
  	    newerr = FAIL;
Karsten Hopp e7ac7a
***************
Karsten Hopp e7ac7a
*** 1900,1906 ****
Karsten Hopp e7ac7a
  	{
Karsten Hopp e7ac7a
  	    sprintf(buf, _("E572: exit code %d"), retval);
Karsten Hopp e7ac7a
  	    tclerrmsg(buf);
Karsten Hopp e7ac7a
! 	    if (retval == 0 )
Karsten Hopp e7ac7a
  	    {
Karsten Hopp e7ac7a
  		did_emsg = 0;
Karsten Hopp e7ac7a
  		newerr = OK;
Karsten Hopp e7ac7a
--- 1900,1906 ----
Karsten Hopp e7ac7a
  	{
Karsten Hopp e7ac7a
  	    sprintf(buf, _("E572: exit code %d"), retval);
Karsten Hopp e7ac7a
  	    tclerrmsg(buf);
Karsten Hopp e7ac7a
! 	    if (retval == 0)
Karsten Hopp e7ac7a
  	    {
Karsten Hopp e7ac7a
  		did_emsg = 0;
Karsten Hopp e7ac7a
  		newerr = OK;
Karsten Hopp e7ac7a
*** ../vim-7.3.262/src/version.c	2011-07-27 14:09:05.000000000 +0200
Karsten Hopp e7ac7a
--- src/version.c	2011-07-27 14:12:05.000000000 +0200
Karsten Hopp e7ac7a
***************
Karsten Hopp e7ac7a
*** 711,712 ****
Karsten Hopp e7ac7a
--- 711,714 ----
Karsten Hopp e7ac7a
  {   /* Add new patch number below this line */
Karsten Hopp e7ac7a
+ /**/
Karsten Hopp e7ac7a
+     263,
Karsten Hopp e7ac7a
  /**/
Karsten Hopp e7ac7a
Karsten Hopp e7ac7a
-- 
Karsten Hopp e7ac7a
DEAD PERSON:  I don't want to go in the cart!
Karsten Hopp e7ac7a
CUSTOMER:     Oh, don't be such a baby.
Karsten Hopp e7ac7a
MORTICIAN:    I can't take him...
Karsten Hopp e7ac7a
DEAD PERSON:  I feel fine!
Karsten Hopp e7ac7a
CUSTOMER:     Oh, do us a favor...
Karsten Hopp e7ac7a
MORTICIAN:    I can't.
Karsten Hopp e7ac7a
                                  The Quest for the Holy Grail (Monty Python)
Karsten Hopp e7ac7a
Karsten Hopp e7ac7a
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp e7ac7a
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp e7ac7a
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp e7ac7a
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///