Mercurial > vim
comparison src/if_perl.xs @ 2982:a56259157c93 v7.3.263
updated for version 7.3.263
Problem: Perl and Tcl have a few code style problems.
Solution: Clean it up. (Elias Diem)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 27 Jul 2011 14:15:46 +0200 |
parents | fa5dee44df3f |
children | 22550986c713 |
comparison
equal
deleted
inserted
replaced
2981:65ab2bb3ff47 | 2982:a56259157c93 |
---|---|
753 } | 753 } |
754 | 754 |
755 #ifdef HAVE_SANDBOX | 755 #ifdef HAVE_SANDBOX |
756 if (sandbox) | 756 if (sandbox) |
757 { | 757 { |
758 safe = perl_get_sv( "VIM::safe", FALSE ); | 758 safe = perl_get_sv("VIM::safe", FALSE); |
759 # ifndef MAKE_TEST /* avoid a warning for unreachable code */ | 759 # ifndef MAKE_TEST /* avoid a warning for unreachable code */ |
760 if (safe == NULL || !SvTRUE(safe)) | 760 if (safe == NULL || !SvTRUE(safe)) |
761 EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module")); | 761 EMSG(_("E299: Perl evaluation forbidden in sandbox without the Safe module")); |
762 else | 762 else |
763 # endif | 763 # endif |
1106 void | 1106 void |
1107 Cursor(win, ...) | 1107 Cursor(win, ...) |
1108 VIWIN win | 1108 VIWIN win |
1109 | 1109 |
1110 PPCODE: | 1110 PPCODE: |
1111 if(items == 1) | 1111 if (items == 1) |
1112 { | 1112 { |
1113 EXTEND(sp, 2); | 1113 EXTEND(sp, 2); |
1114 if (!win_valid(win)) | 1114 if (!win_valid(win)) |
1115 win = curwin; | 1115 win = curwin; |
1116 PUSHs(sv_2mortal(newSViv(win->w_cursor.lnum))); | 1116 PUSHs(sv_2mortal(newSViv(win->w_cursor.lnum))); |
1117 PUSHs(sv_2mortal(newSViv(win->w_cursor.col))); | 1117 PUSHs(sv_2mortal(newSViv(win->w_cursor.col))); |
1118 } | 1118 } |
1119 else if(items == 3) | 1119 else if (items == 3) |
1120 { | 1120 { |
1121 int lnum, col; | 1121 int lnum, col; |
1122 | 1122 |
1123 if (!win_valid(win)) | 1123 if (!win_valid(win)) |
1124 win = curwin; | 1124 win = curwin; |
1247 } | 1247 } |
1248 else if (items == 3) | 1248 else if (items == 3) |
1249 { | 1249 { |
1250 lnum = SvIV(ST(1)); | 1250 lnum = SvIV(ST(1)); |
1251 count = 1 + SvIV(ST(2)) - lnum; | 1251 count = 1 + SvIV(ST(2)) - lnum; |
1252 if(count == 0) | 1252 if (count == 0) |
1253 count = 1; | 1253 count = 1; |
1254 if(count < 0) | 1254 if (count < 0) |
1255 { | 1255 { |
1256 lnum -= count; | 1256 lnum -= count; |
1257 count = -count; | 1257 count = -count; |
1258 } | 1258 } |
1259 } | 1259 } |