|
Karsten Hopp |
ccc437 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
ccc437 |
Subject: Patch 7.3.377
|
|
Karsten Hopp |
ccc437 |
Fcc: outbox
|
|
Karsten Hopp |
ccc437 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
ccc437 |
Mime-Version: 1.0
|
|
Karsten Hopp |
ccc437 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
ccc437 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
ccc437 |
------------
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
Patch 7.3.377
|
|
Karsten Hopp |
ccc437 |
Problem: No support for bitwise AND, OR, XOR and invert.
|
|
Karsten Hopp |
ccc437 |
Solution: Add and(), or(), invert() and xor() functions.
|
|
Karsten Hopp |
ccc437 |
Files: src/eval.c, src/testdir/test49.in, src/testdir/test65.in,
|
|
Karsten Hopp |
ccc437 |
src/testdir/test65.ok, runtime/doc/eval.txt
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
*** ../vim-7.3.376/src/eval.c 2011-11-30 15:19:25.000000000 +0100
|
|
Karsten Hopp |
ccc437 |
--- src/eval.c 2011-12-11 13:49:31.000000000 +0100
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 474,479 ****
|
|
Karsten Hopp |
ccc437 |
--- 474,480 ----
|
|
Karsten Hopp |
ccc437 |
static void f_acos __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
#endif
|
|
Karsten Hopp |
ccc437 |
static void f_add __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
+ static void f_and __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
static void f_append __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
static void f_argc __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
static void f_argidx __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 602,607 ****
|
|
Karsten Hopp |
ccc437 |
--- 603,609 ----
|
|
Karsten Hopp |
ccc437 |
static void f_inputsave __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
static void f_inputsecret __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
static void f_insert __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
+ static void f_invert __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
static void f_isdirectory __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
static void f_islocked __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
static void f_items __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 640,645 ****
|
|
Karsten Hopp |
ccc437 |
--- 642,648 ----
|
|
Karsten Hopp |
ccc437 |
#endif
|
|
Karsten Hopp |
ccc437 |
static void f_nextnonblank __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
static void f_nr2char __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
+ static void f_or __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
static void f_pathshorten __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
#ifdef FEAT_FLOAT
|
|
Karsten Hopp |
ccc437 |
static void f_pow __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 751,756 ****
|
|
Karsten Hopp |
ccc437 |
--- 754,760 ----
|
|
Karsten Hopp |
ccc437 |
static void f_winsaveview __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
static void f_winwidth __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
static void f_writefile __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
+ static void f_xor __ARGS((typval_T *argvars, typval_T *rettv));
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
static int list2fpos __ARGS((typval_T *arg, pos_T *posp, int *fnump));
|
|
Karsten Hopp |
ccc437 |
static pos_T *var2fpos __ARGS((typval_T *varp, int dollar_lnum, int *fnum));
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 7715,7720 ****
|
|
Karsten Hopp |
ccc437 |
--- 7719,7725 ----
|
|
Karsten Hopp |
ccc437 |
{"acos", 1, 1, f_acos}, /* WJMc */
|
|
Karsten Hopp |
ccc437 |
#endif
|
|
Karsten Hopp |
ccc437 |
{"add", 2, 2, f_add},
|
|
Karsten Hopp |
ccc437 |
+ {"and", 2, 2, f_and},
|
|
Karsten Hopp |
ccc437 |
{"append", 2, 2, f_append},
|
|
Karsten Hopp |
ccc437 |
{"argc", 0, 0, f_argc},
|
|
Karsten Hopp |
ccc437 |
{"argidx", 0, 0, f_argidx},
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 7850,7855 ****
|
|
Karsten Hopp |
ccc437 |
--- 7855,7861 ----
|
|
Karsten Hopp |
ccc437 |
{"inputsave", 0, 0, f_inputsave},
|
|
Karsten Hopp |
ccc437 |
{"inputsecret", 1, 2, f_inputsecret},
|
|
Karsten Hopp |
ccc437 |
{"insert", 2, 3, f_insert},
|
|
Karsten Hopp |
ccc437 |
+ {"invert", 1, 1, f_invert},
|
|
Karsten Hopp |
ccc437 |
{"isdirectory", 1, 1, f_isdirectory},
|
|
Karsten Hopp |
ccc437 |
{"islocked", 1, 1, f_islocked},
|
|
Karsten Hopp |
ccc437 |
{"items", 1, 1, f_items},
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 7888,7893 ****
|
|
Karsten Hopp |
ccc437 |
--- 7894,7900 ----
|
|
Karsten Hopp |
ccc437 |
#endif
|
|
Karsten Hopp |
ccc437 |
{"nextnonblank", 1, 1, f_nextnonblank},
|
|
Karsten Hopp |
ccc437 |
{"nr2char", 1, 1, f_nr2char},
|
|
Karsten Hopp |
ccc437 |
+ {"or", 2, 2, f_or},
|
|
Karsten Hopp |
ccc437 |
{"pathshorten", 1, 1, f_pathshorten},
|
|
Karsten Hopp |
ccc437 |
#ifdef FEAT_FLOAT
|
|
Karsten Hopp |
ccc437 |
{"pow", 2, 2, f_pow},
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 7999,8004 ****
|
|
Karsten Hopp |
ccc437 |
--- 8006,8012 ----
|
|
Karsten Hopp |
ccc437 |
{"winsaveview", 0, 0, f_winsaveview},
|
|
Karsten Hopp |
ccc437 |
{"winwidth", 1, 1, f_winwidth},
|
|
Karsten Hopp |
ccc437 |
{"writefile", 2, 3, f_writefile},
|
|
Karsten Hopp |
ccc437 |
+ {"xor", 2, 2, f_xor},
|
|
Karsten Hopp |
ccc437 |
};
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
#if defined(FEAT_CMDL_COMPL) || defined(PROTO)
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 8572,8577 ****
|
|
Karsten Hopp |
ccc437 |
--- 8580,8597 ----
|
|
Karsten Hopp |
ccc437 |
}
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
/*
|
|
Karsten Hopp |
ccc437 |
+ * "and(expr, expr)" function
|
|
Karsten Hopp |
ccc437 |
+ */
|
|
Karsten Hopp |
ccc437 |
+ static void
|
|
Karsten Hopp |
ccc437 |
+ f_and(argvars, rettv)
|
|
Karsten Hopp |
ccc437 |
+ typval_T *argvars;
|
|
Karsten Hopp |
ccc437 |
+ typval_T *rettv;
|
|
Karsten Hopp |
ccc437 |
+ {
|
|
Karsten Hopp |
ccc437 |
+ rettv->vval.v_number = get_tv_number_chk(&argvars[0], NULL)
|
|
Karsten Hopp |
ccc437 |
+ & get_tv_number_chk(&argvars[1], NULL);
|
|
Karsten Hopp |
ccc437 |
+ }
|
|
Karsten Hopp |
ccc437 |
+
|
|
Karsten Hopp |
ccc437 |
+ /*
|
|
Karsten Hopp |
ccc437 |
* "append(lnum, string/list)" function
|
|
Karsten Hopp |
ccc437 |
*/
|
|
Karsten Hopp |
ccc437 |
static void
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 12958,12963 ****
|
|
Karsten Hopp |
ccc437 |
--- 12978,12994 ----
|
|
Karsten Hopp |
ccc437 |
}
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
/*
|
|
Karsten Hopp |
ccc437 |
+ * "invert(expr)" function
|
|
Karsten Hopp |
ccc437 |
+ */
|
|
Karsten Hopp |
ccc437 |
+ static void
|
|
Karsten Hopp |
ccc437 |
+ f_invert(argvars, rettv)
|
|
Karsten Hopp |
ccc437 |
+ typval_T *argvars;
|
|
Karsten Hopp |
ccc437 |
+ typval_T *rettv;
|
|
Karsten Hopp |
ccc437 |
+ {
|
|
Karsten Hopp |
ccc437 |
+ rettv->vval.v_number = ~get_tv_number_chk(&argvars[0], NULL);
|
|
Karsten Hopp |
ccc437 |
+ }
|
|
Karsten Hopp |
ccc437 |
+
|
|
Karsten Hopp |
ccc437 |
+ /*
|
|
Karsten Hopp |
ccc437 |
* "isdirectory()" function
|
|
Karsten Hopp |
ccc437 |
*/
|
|
Karsten Hopp |
ccc437 |
static void
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 14108,14113 ****
|
|
Karsten Hopp |
ccc437 |
--- 14139,14156 ----
|
|
Karsten Hopp |
ccc437 |
}
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
/*
|
|
Karsten Hopp |
ccc437 |
+ * "or(expr, expr)" function
|
|
Karsten Hopp |
ccc437 |
+ */
|
|
Karsten Hopp |
ccc437 |
+ static void
|
|
Karsten Hopp |
ccc437 |
+ f_or(argvars, rettv)
|
|
Karsten Hopp |
ccc437 |
+ typval_T *argvars;
|
|
Karsten Hopp |
ccc437 |
+ typval_T *rettv;
|
|
Karsten Hopp |
ccc437 |
+ {
|
|
Karsten Hopp |
ccc437 |
+ rettv->vval.v_number = get_tv_number_chk(&argvars[0], NULL)
|
|
Karsten Hopp |
ccc437 |
+ | get_tv_number_chk(&argvars[1], NULL);
|
|
Karsten Hopp |
ccc437 |
+ }
|
|
Karsten Hopp |
ccc437 |
+
|
|
Karsten Hopp |
ccc437 |
+ /*
|
|
Karsten Hopp |
ccc437 |
* "pathshorten()" function
|
|
Karsten Hopp |
ccc437 |
*/
|
|
Karsten Hopp |
ccc437 |
static void
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 18394,18399 ****
|
|
Karsten Hopp |
ccc437 |
--- 18437,18455 ----
|
|
Karsten Hopp |
ccc437 |
}
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
/*
|
|
Karsten Hopp |
ccc437 |
+ * "xor(expr, expr)" function
|
|
Karsten Hopp |
ccc437 |
+ */
|
|
Karsten Hopp |
ccc437 |
+ static void
|
|
Karsten Hopp |
ccc437 |
+ f_xor(argvars, rettv)
|
|
Karsten Hopp |
ccc437 |
+ typval_T *argvars;
|
|
Karsten Hopp |
ccc437 |
+ typval_T *rettv;
|
|
Karsten Hopp |
ccc437 |
+ {
|
|
Karsten Hopp |
ccc437 |
+ rettv->vval.v_number = get_tv_number_chk(&argvars[0], NULL)
|
|
Karsten Hopp |
ccc437 |
+ ^ get_tv_number_chk(&argvars[1], NULL);
|
|
Karsten Hopp |
ccc437 |
+ }
|
|
Karsten Hopp |
ccc437 |
+
|
|
Karsten Hopp |
ccc437 |
+
|
|
Karsten Hopp |
ccc437 |
+ /*
|
|
Karsten Hopp |
ccc437 |
* Translate a String variable into a position.
|
|
Karsten Hopp |
ccc437 |
* Returns NULL when there is an error.
|
|
Karsten Hopp |
ccc437 |
*/
|
|
Karsten Hopp |
ccc437 |
*** ../vim-7.3.376/src/testdir/test65.in 2010-08-15 21:57:29.000000000 +0200
|
|
Karsten Hopp |
ccc437 |
--- src/testdir/test65.in 2011-12-11 13:55:06.000000000 +0100
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 1,4 ****
|
|
Karsten Hopp |
ccc437 |
! Test for floating point.
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
STARTTEST
|
|
Karsten Hopp |
ccc437 |
:so small.vim
|
|
Karsten Hopp |
ccc437 |
--- 1,4 ----
|
|
Karsten Hopp |
ccc437 |
! Test for floating point and logical operators.
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
STARTTEST
|
|
Karsten Hopp |
ccc437 |
:so small.vim
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 72,77 ****
|
|
Karsten Hopp |
ccc437 |
--- 72,94 ----
|
|
Karsten Hopp |
ccc437 |
:$put ='float2nr'
|
|
Karsten Hopp |
ccc437 |
:$put =float2nr(123.456)
|
|
Karsten Hopp |
ccc437 |
:$put =float2nr(-123.456)
|
|
Karsten Hopp |
ccc437 |
+ :$put ='AND'
|
|
Karsten Hopp |
ccc437 |
+ :$put =and(127, 127)
|
|
Karsten Hopp |
ccc437 |
+ :$put =and(127, 16)
|
|
Karsten Hopp |
ccc437 |
+ :$put =and(127, 128)
|
|
Karsten Hopp |
ccc437 |
+ :$put ='OR'
|
|
Karsten Hopp |
ccc437 |
+ :$put =or(16, 7)
|
|
Karsten Hopp |
ccc437 |
+ :$put =or(8, 7)
|
|
Karsten Hopp |
ccc437 |
+ :$put =or(0, 123)
|
|
Karsten Hopp |
ccc437 |
+ :$put ='XOR'
|
|
Karsten Hopp |
ccc437 |
+ :$put =xor(127, 127)
|
|
Karsten Hopp |
ccc437 |
+ :$put =xor(127, 16)
|
|
Karsten Hopp |
ccc437 |
+ :$put =xor(127, 128)
|
|
Karsten Hopp |
ccc437 |
+ :$put ='invert'
|
|
Karsten Hopp |
ccc437 |
+ :$put =and(invert(127), 65535)
|
|
Karsten Hopp |
ccc437 |
+ :$put =and(invert(16), 65535)
|
|
Karsten Hopp |
ccc437 |
+ :$put =and(invert(128), 65535)
|
|
Karsten Hopp |
ccc437 |
+ :$put =invert(1.0)
|
|
Karsten Hopp |
ccc437 |
:/^Results/,$wq! test.out
|
|
Karsten Hopp |
ccc437 |
ENDTEST
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
*** ../vim-7.3.376/src/testdir/test65.ok 2010-08-15 21:57:29.000000000 +0200
|
|
Karsten Hopp |
ccc437 |
--- src/testdir/test65.ok 2011-12-11 13:55:30.000000000 +0100
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 54,56 ****
|
|
Karsten Hopp |
ccc437 |
--- 54,73 ----
|
|
Karsten Hopp |
ccc437 |
float2nr
|
|
Karsten Hopp |
ccc437 |
123
|
|
Karsten Hopp |
ccc437 |
-123
|
|
Karsten Hopp |
ccc437 |
+ AND
|
|
Karsten Hopp |
ccc437 |
+ 127
|
|
Karsten Hopp |
ccc437 |
+ 16
|
|
Karsten Hopp |
ccc437 |
+ 0
|
|
Karsten Hopp |
ccc437 |
+ OR
|
|
Karsten Hopp |
ccc437 |
+ 23
|
|
Karsten Hopp |
ccc437 |
+ 15
|
|
Karsten Hopp |
ccc437 |
+ 123
|
|
Karsten Hopp |
ccc437 |
+ XOR
|
|
Karsten Hopp |
ccc437 |
+ 0
|
|
Karsten Hopp |
ccc437 |
+ 111
|
|
Karsten Hopp |
ccc437 |
+ 255
|
|
Karsten Hopp |
ccc437 |
+ invert
|
|
Karsten Hopp |
ccc437 |
+ 65408
|
|
Karsten Hopp |
ccc437 |
+ 65519
|
|
Karsten Hopp |
ccc437 |
+ 65407
|
|
Karsten Hopp |
ccc437 |
+ 0
|
|
Karsten Hopp |
ccc437 |
*** ../vim-7.3.376/runtime/doc/eval.txt 2011-06-19 02:55:32.000000000 +0200
|
|
Karsten Hopp |
ccc437 |
--- runtime/doc/eval.txt 2011-12-14 15:28:23.000000000 +0100
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 798,808 ****
|
|
Karsten Hopp |
ccc437 |
For |Lists| only "+" is possible and then both expr6 must be a list. The
|
|
Karsten Hopp |
ccc437 |
result is a new list with the two lists Concatenated.
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
! expr7 * expr7 .. number multiplication *expr-star*
|
|
Karsten Hopp |
ccc437 |
! expr7 / expr7 .. number division *expr-/*
|
|
Karsten Hopp |
ccc437 |
! expr7 % expr7 .. number modulo *expr-%*
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
For all, except ".", Strings are converted to Numbers.
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
Note the difference between "+" and ".":
|
|
Karsten Hopp |
ccc437 |
"123" + "456" = 579
|
|
Karsten Hopp |
ccc437 |
--- 800,811 ----
|
|
Karsten Hopp |
ccc437 |
For |Lists| only "+" is possible and then both expr6 must be a list. The
|
|
Karsten Hopp |
ccc437 |
result is a new list with the two lists Concatenated.
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
! expr7 * expr7 .. Number multiplication *expr-star*
|
|
Karsten Hopp |
ccc437 |
! expr7 / expr7 .. Number division *expr-/*
|
|
Karsten Hopp |
ccc437 |
! expr7 % expr7 .. Number modulo *expr-%*
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
For all, except ".", Strings are converted to Numbers.
|
|
Karsten Hopp |
ccc437 |
+ For bitwise operators see |and()|, |or()| and |xor()|.
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
Note the difference between "+" and ".":
|
|
Karsten Hopp |
ccc437 |
"123" + "456" = 579
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 1679,1684 ****
|
|
Karsten Hopp |
ccc437 |
--- 1688,1694 ----
|
|
Karsten Hopp |
ccc437 |
abs( {expr}) Float or Number absolute value of {expr}
|
|
Karsten Hopp |
ccc437 |
acos( {expr}) Float arc cosine of {expr}
|
|
Karsten Hopp |
ccc437 |
add( {list}, {item}) List append {item} to |List| {list}
|
|
Karsten Hopp |
ccc437 |
+ and( {expr}, {expr}) Number bitwise AND
|
|
Karsten Hopp |
ccc437 |
append( {lnum}, {string}) Number append {string} below line {lnum}
|
|
Karsten Hopp |
ccc437 |
append( {lnum}, {list}) Number append lines {list} below line {lnum}
|
|
Karsten Hopp |
ccc437 |
argc() Number number of files in the argument list
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 1817,1822 ****
|
|
Karsten Hopp |
ccc437 |
--- 1827,1833 ----
|
|
Karsten Hopp |
ccc437 |
inputsave() Number save and clear typeahead
|
|
Karsten Hopp |
ccc437 |
inputsecret( {prompt} [, {text}]) String like input() but hiding the text
|
|
Karsten Hopp |
ccc437 |
insert( {list}, {item} [, {idx}]) List insert {item} in {list} [before {idx}]
|
|
Karsten Hopp |
ccc437 |
+ invert( {expr}) Number bitwise invert
|
|
Karsten Hopp |
ccc437 |
isdirectory( {directory}) Number TRUE if {directory} is a directory
|
|
Karsten Hopp |
ccc437 |
islocked( {expr}) Number TRUE if {expr} is locked
|
|
Karsten Hopp |
ccc437 |
items( {dict}) List key-value pairs in {dict}
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 1856,1861 ****
|
|
Karsten Hopp |
ccc437 |
--- 1868,1874 ----
|
|
Karsten Hopp |
ccc437 |
mzeval( {expr}) any evaluate |MzScheme| expression
|
|
Karsten Hopp |
ccc437 |
nextnonblank( {lnum}) Number line nr of non-blank line >= {lnum}
|
|
Karsten Hopp |
ccc437 |
nr2char( {expr}) String single char with ASCII value {expr}
|
|
Karsten Hopp |
ccc437 |
+ or( {expr}, {expr}) Number bitwise OR
|
|
Karsten Hopp |
ccc437 |
pathshorten( {expr}) String shorten directory names in a path
|
|
Karsten Hopp |
ccc437 |
pow( {x}, {y}) Float {x} to the power of {y}
|
|
Karsten Hopp |
ccc437 |
prevnonblank( {lnum}) Number line nr of non-blank line <= {lnum}
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 1978,1983 ****
|
|
Karsten Hopp |
ccc437 |
--- 1992,1998 ----
|
|
Karsten Hopp |
ccc437 |
winwidth( {nr}) Number width of window {nr}
|
|
Karsten Hopp |
ccc437 |
writefile( {list}, {fname} [, {binary}])
|
|
Karsten Hopp |
ccc437 |
Number write list of lines to file {fname}
|
|
Karsten Hopp |
ccc437 |
+ xor( {expr}, {expr}) Number bitwise XOR
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
abs({expr}) *abs()*
|
|
Karsten Hopp |
ccc437 |
Return the absolute value of {expr}. When {expr} evaluates to
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 2017,2022 ****
|
|
Karsten Hopp |
ccc437 |
--- 2032,2044 ----
|
|
Karsten Hopp |
ccc437 |
Use |insert()| to add an item at another position.
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
+ and({expr}, {expr}) *and()*
|
|
Karsten Hopp |
ccc437 |
+ Bitwise AND on the two arguments. The arguments are converted
|
|
Karsten Hopp |
ccc437 |
+ to a number. A List, Dict or Float argument causes an error.
|
|
Karsten Hopp |
ccc437 |
+ Example: >
|
|
Karsten Hopp |
ccc437 |
+ :let flag = and(bits, 0x80)
|
|
Karsten Hopp |
ccc437 |
+
|
|
Karsten Hopp |
ccc437 |
+
|
|
Karsten Hopp |
ccc437 |
append({lnum}, {expr}) *append()*
|
|
Karsten Hopp |
ccc437 |
When {expr} is a |List|: Append each item of the |List| as a
|
|
Karsten Hopp |
ccc437 |
text line below line {lnum} in the current buffer.
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 3770,3775 ****
|
|
Karsten Hopp |
ccc437 |
--- 3798,3808 ----
|
|
Karsten Hopp |
ccc437 |
Note that when {item} is a |List| it is inserted as a single
|
|
Karsten Hopp |
ccc437 |
item. Use |extend()| to concatenate |Lists|.
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
+ invert({expr}) *invert()*
|
|
Karsten Hopp |
ccc437 |
+ Bitwise invert. The argument is converted to a number. A
|
|
Karsten Hopp |
ccc437 |
+ List, Dict or Float argument causes an error. Example: >
|
|
Karsten Hopp |
ccc437 |
+ :let bits = invert(bits)
|
|
Karsten Hopp |
ccc437 |
+
|
|
Karsten Hopp |
ccc437 |
isdirectory({directory}) *isdirectory()*
|
|
Karsten Hopp |
ccc437 |
The result is a Number, which is non-zero when a directory
|
|
Karsten Hopp |
ccc437 |
with the name {directory} exists. If {directory} doesn't
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 4334,4339 ****
|
|
Karsten Hopp |
ccc437 |
--- 4368,4380 ----
|
|
Karsten Hopp |
ccc437 |
call setpos('.', save_cursor)
|
|
Karsten Hopp |
ccc437 |
< Also see |setpos()|.
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
+ or({expr}, {expr}) *or()*
|
|
Karsten Hopp |
ccc437 |
+ Bitwise OR on the two arguments. The arguments are converted
|
|
Karsten Hopp |
ccc437 |
+ to a number. A List, Dict or Float argument causes an error.
|
|
Karsten Hopp |
ccc437 |
+ Example: >
|
|
Karsten Hopp |
ccc437 |
+ :let bits = or(bits, 0x80)
|
|
Karsten Hopp |
ccc437 |
+
|
|
Karsten Hopp |
ccc437 |
+
|
|
Karsten Hopp |
ccc437 |
pathshorten({expr}) *pathshorten()*
|
|
Karsten Hopp |
ccc437 |
Shorten directory names in the path {expr} and return the
|
|
Karsten Hopp |
ccc437 |
result. The tail, the file name, is kept as-is. The other
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 6097,6103 ****
|
|
Karsten Hopp |
ccc437 |
To copy a file byte for byte: >
|
|
Karsten Hopp |
ccc437 |
:let fl = readfile("foo", "b")
|
|
Karsten Hopp |
ccc437 |
:call writefile(fl, "foocopy", "b")
|
|
Karsten Hopp |
ccc437 |
! <
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
*feature-list*
|
|
Karsten Hopp |
ccc437 |
There are three types of features:
|
|
Karsten Hopp |
ccc437 |
--- 6149,6163 ----
|
|
Karsten Hopp |
ccc437 |
To copy a file byte for byte: >
|
|
Karsten Hopp |
ccc437 |
:let fl = readfile("foo", "b")
|
|
Karsten Hopp |
ccc437 |
:call writefile(fl, "foocopy", "b")
|
|
Karsten Hopp |
ccc437 |
!
|
|
Karsten Hopp |
ccc437 |
!
|
|
Karsten Hopp |
ccc437 |
! xor({expr}, {expr}) *xor()*
|
|
Karsten Hopp |
ccc437 |
! Bitwise XOR on the two arguments. The arguments are converted
|
|
Karsten Hopp |
ccc437 |
! to a number. A List, Dict or Float argument causes an error.
|
|
Karsten Hopp |
ccc437 |
! Example: >
|
|
Karsten Hopp |
ccc437 |
! :let bits = xor(bits, 0x80)
|
|
Karsten Hopp |
ccc437 |
!
|
|
Karsten Hopp |
ccc437 |
!
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
*feature-list*
|
|
Karsten Hopp |
ccc437 |
There are three types of features:
|
|
Karsten Hopp |
ccc437 |
*** ../vim-7.3.376/src/version.c 2011-12-14 15:23:53.000000000 +0100
|
|
Karsten Hopp |
ccc437 |
--- src/version.c 2011-12-14 15:28:39.000000000 +0100
|
|
Karsten Hopp |
ccc437 |
***************
|
|
Karsten Hopp |
ccc437 |
*** 716,717 ****
|
|
Karsten Hopp |
ccc437 |
--- 716,719 ----
|
|
Karsten Hopp |
ccc437 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
ccc437 |
+ /**/
|
|
Karsten Hopp |
ccc437 |
+ 377,
|
|
Karsten Hopp |
ccc437 |
/**/
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
--
|
|
Karsten Hopp |
ccc437 |
DINGO: Wicked wicked Zoot ... she is a bad person and she must pay the
|
|
Karsten Hopp |
ccc437 |
penalty. And here in Castle Anthrax, we have but one punishment
|
|
Karsten Hopp |
ccc437 |
... you must tie her down on a bed ... and spank her. Come!
|
|
Karsten Hopp |
ccc437 |
GIRLS: A spanking! A spanking!
|
|
Karsten Hopp |
ccc437 |
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
|
|
Karsten Hopp |
ccc437 |
|
|
Karsten Hopp |
ccc437 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
ccc437 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
ccc437 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
ccc437 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|