]> git.pld-linux.org Git - packages/vim.git/blame - 7.1.262
- typo
[packages/vim.git] / 7.1.262
CommitLineData
ef75664d
AG
1To: vim-dev@vim.org
2Subject: Patch 7.1.262
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.1.262
11Problem: Can't get the process ID of Vim.
12Solution: Implement getpid().
13Files: src/eval.c, runtime/doc/eval.txt
14
15
16*** ../vim-7.1.261/src/eval.c Wed Feb 20 12:22:59 2008
17--- src/eval.c Wed Feb 20 11:08:21 2008
18***************
19*** 532,537 ****
20--- 532,538 ----
21 static void f_getftype __ARGS((typval_T *argvars, typval_T *rettv));
22 static void f_getline __ARGS((typval_T *argvars, typval_T *rettv));
23 static void f_getmatches __ARGS((typval_T *argvars, typval_T *rettv));
24+ static void f_getpid __ARGS((typval_T *argvars, typval_T *rettv));
25 static void f_getpos __ARGS((typval_T *argvars, typval_T *rettv));
26 static void f_getqflist __ARGS((typval_T *argvars, typval_T *rettv));
27 static void f_getreg __ARGS((typval_T *argvars, typval_T *rettv));
28***************
29*** 7132,7137 ****
30--- 7133,7139 ----
31 {"getline", 1, 2, f_getline},
32 {"getloclist", 1, 1, f_getqflist},
33 {"getmatches", 0, 0, f_getmatches},
34+ {"getpid", 0, 0, f_getpid},
35 {"getpos", 1, 1, f_getpos},
36 {"getqflist", 0, 0, f_getqflist},
37 {"getreg", 0, 2, f_getreg},
38***************
39*** 10371,10376 ****
40--- 10373,10390 ----
41 }
42 }
43 #endif
44+ }
45+
46+ /*
47+ * "getpid()" function
48+ */
49+ /*ARGSUSED*/
50+ static void
51+ f_getpid(argvars, rettv)
52+ typval_T *argvars;
53+ typval_T *rettv;
54+ {
55+ rettv->vval.v_number = mch_get_pid();
56 }
57
58 /*
59*** ../vim-7.1.261/runtime/doc/eval.txt Wed Feb 13 12:41:30 2008
60--- runtime/doc/eval.txt Wed Feb 20 11:10:17 2008
61***************
62*** 1,4 ****
63! *eval.txt* For Vim version 7.1. Last change: 2008 Feb 13
64
65
66 VIM REFERENCE MANUAL by Bram Moolenaar
67--- 1,4 ----
68! *eval.txt* For Vim version 7.1. Last change: 2008 Feb 20
69
70
71 VIM REFERENCE MANUAL by Bram Moolenaar
72***************
73*** 1638,1643 ****
74--- 1638,1644 ----
75 getline( {lnum}, {end}) List lines {lnum} to {end} of current buffer
76 getloclist({nr}) List list of location list items
77 getmatches() List list of current matches
78+ getpid() Number process ID of Vim
79 getpos( {expr}) List position of cursor, mark, etc.
80 getqflist() List list of quickfix items
81 getreg( [{regname} [, 1]]) String contents of register
82***************
83*** 3833,3838 ****
84--- 3837,3846 ----
85 characters. nr2char(0) is a real NUL and terminates the
86 string, thus results in an empty string.
87
88+ *getpid()*
89+ getpid() Return a Number which is the process ID of the Vim process.
90+ On Unix this is a unique number. On MS-DOS it's always zero.
91+
92 *getpos()*
93 getpos({expr}) Get the position for {expr}. For possible values of {expr}
94 see |line()|.
95*** ../vim-7.1.261/src/version.c Wed Feb 20 18:14:25 2008
96--- src/version.c Wed Feb 20 20:04:14 2008
97***************
98*** 668,669 ****
99--- 668,671 ----
100 { /* Add new patch number below this line */
101+ /**/
102+ 262,
103 /**/
104
105--
106Those who live by the sword get shot by those who don't.
107
108 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
109/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
110\\\ download, build and distribute -- http://www.A-A-P.org ///
111 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.173202 seconds and 4 git commands to generate.