annotate src/if_cscope.h @ 9052:3a6b66c02d6d v7.4.1811

commit https://github.com/vim/vim/commit/3266c85a44a637862b0ed6e531680c6ab2897ab5 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Apr 30 18:07:05 2016 +0200 patch 7.4.1811 Problem: Netbeans channel gets garbage collected. Solution: Set reference in nb_channel.
author Christian Brabandt <cb@256bit.org>
date Sat, 30 Apr 2016 18:15:06 +0200
parents fa1e3fa56104
children 67d1f619bb26
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 /* vi:set ts=8 sts=4 sw=4:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 * CSCOPE support for Vim added by Andy Kahn <kahn@zk3.dec.com>
148
72aefd4c1e0d updated for version 7.0046
vimboss
parents: 132
diff changeset
4 * Ported to Win32 by Sergey Khorev <sergey.khorev@gmail.com>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 * The basic idea/structure of cscope for Vim was borrowed from Nvi.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 * There might be a few lines of code that look similar to what Nvi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 * has. If this is a problem and requires inclusion of the annoying
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 * BSD license, then sue me; I'm not worth much anyway.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 #if defined(FEAT_CSCOPE) || defined(PROTO)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
8277
fa1e3fa56104 commit https://github.com/vim/vim/commit/9e24f0c5c1b1097295d0619d95da66e6b2d83ac9
Christian Brabandt <cb@256bit.org>
parents: 7807
diff changeset
14 #if defined (WIN32)
fa1e3fa56104 commit https://github.com/vim/vim/commit/9e24f0c5c1b1097295d0619d95da66e6b2d83ac9
Christian Brabandt <cb@256bit.org>
parents: 7807
diff changeset
15 # ifndef WIN32_LEAN_AND_MEAN
fa1e3fa56104 commit https://github.com/vim/vim/commit/9e24f0c5c1b1097295d0619d95da66e6b2d83ac9
Christian Brabandt <cb@256bit.org>
parents: 7807
diff changeset
16 # define WIN32_LEAN_AND_MEAN
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 # endif
8277
fa1e3fa56104 commit https://github.com/vim/vim/commit/9e24f0c5c1b1097295d0619d95da66e6b2d83ac9
Christian Brabandt <cb@256bit.org>
parents: 7807
diff changeset
18 # include <windows.h>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 #define CSCOPE_SUCCESS 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 #define CSCOPE_FAILURE -1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 #define CSCOPE_DBFILE "cscope.out"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 #define CSCOPE_PROMPT ">> "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 * s 0name Find this C symbol
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 * g 1name Find this definition
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 * d 2name Find functions called by this function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 * c 3name Find functions calling this function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 * t 4string find text string (cscope 12.9)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 * t 4name Find assignments to (cscope 13.3)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 * 5pattern change pattern -- NOT USED
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 * e 6pattern Find this egrep pattern
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 * f 7name Find this file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 * i 8name Find files #including this file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 typedef struct {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 char * name;
7807
1a5d34492798 commit https://github.com/vim/vim/commit/d99df423c559d85c17779b3685426c489554908c
Christian Brabandt <cb@256bit.org>
parents: 1931
diff changeset
42 int (*func)(exarg_T *eap);
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 char * help;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 char * usage;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 int cansplit; /* if supports splitting window */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 } cscmd_T;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 typedef struct csi {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 char * fname; /* cscope db name */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 char * ppath; /* path to prepend (the -P option) */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 char * flags; /* additional cscope flags/options (e.g, -p2) */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 #if defined(UNIX)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 pid_t pid; /* PID of the connected cscope process. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 dev_t st_dev; /* ID of dev containing cscope db */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 ino_t st_ino; /* inode number of cscope db */
132
d6009de12681 updated for version 7.0044
vimboss
parents: 7
diff changeset
56 #else
d6009de12681 updated for version 7.0044
vimboss
parents: 7
diff changeset
57 # if defined(WIN32)
1385
d0cf8c843186 updated for version 7.1-100
vimboss
parents: 378
diff changeset
58 DWORD pid; /* PID of the connected cscope process. */
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 HANDLE hProc; /* cscope process handle */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 DWORD nVolume; /* Volume serial number, instead of st_dev */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 DWORD nIndexHigh; /* st_ino has no meaning in the Windows */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 DWORD nIndexLow;
132
d6009de12681 updated for version 7.0044
vimboss
parents: 7
diff changeset
63 # endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 FILE * fr_fp; /* from cscope: FILE. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 FILE * to_fp; /* to cscope: FILE. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 } csinfo_T;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 typedef enum { Add, Find, Help, Kill, Reset, Show } csid_e;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 typedef enum {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 Store,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 Get,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 Free,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 Print
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 } mcmd_e;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 #endif /* FEAT_CSCOPE */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 /* the end */