annotate src/if_cscope.h @ 7877:7fbd2de703a9 v7.4.1235

commit https://github.com/vim/vim/commit/11e0afa00a8e6c0aa1d50f760b5d5cb62dade038 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 1 22:41:00 2016 +0100 patch 7.4.1235 Problem: Missing change to eval.c. Solution: Include that change.
author Christian Brabandt <cb@256bit.org>
date Mon, 01 Feb 2016 22:45:06 +0100
parents 1a5d34492798
children fa1e3fa56104
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 #if defined(UNIX)
132
d6009de12681 updated for version 7.0044
vimboss
parents: 7
diff changeset
15 # include <sys/types.h> /* pid_t */
d6009de12681 updated for version 7.0044
vimboss
parents: 7
diff changeset
16 # include <sys/stat.h> /* dev_t, ino_t */
d6009de12681 updated for version 7.0044
vimboss
parents: 7
diff changeset
17 #else
d6009de12681 updated for version 7.0044
vimboss
parents: 7
diff changeset
18 # if defined (WIN32)
d6009de12681 updated for version 7.0044
vimboss
parents: 7
diff changeset
19 # ifndef WIN32_LEAN_AND_MEAN
d6009de12681 updated for version 7.0044
vimboss
parents: 7
diff changeset
20 # define WIN32_LEAN_AND_MEAN
d6009de12681 updated for version 7.0044
vimboss
parents: 7
diff changeset
21 # endif
d6009de12681 updated for version 7.0044
vimboss
parents: 7
diff changeset
22 # include <windows.h>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 #define CSCOPE_SUCCESS 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 #define CSCOPE_FAILURE -1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 #define CSCOPE_DBFILE "cscope.out"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 #define CSCOPE_PROMPT ">> "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 * s 0name Find this C symbol
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 * g 1name Find this definition
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 * d 2name Find functions called by this function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 * c 3name Find functions calling this function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 * t 4string find text string (cscope 12.9)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 * t 4name Find assignments to (cscope 13.3)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 * 5pattern change pattern -- NOT USED
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 * e 6pattern Find this egrep pattern
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 * f 7name Find this file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 * i 8name Find files #including this file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 typedef struct {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 char * name;
7807
1a5d34492798 commit https://github.com/vim/vim/commit/d99df423c559d85c17779b3685426c489554908c
Christian Brabandt <cb@256bit.org>
parents: 1931
diff changeset
47 int (*func)(exarg_T *eap);
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 char * help;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 char * usage;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 int cansplit; /* if supports splitting window */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 } cscmd_T;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 typedef struct csi {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 char * fname; /* cscope db name */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 char * ppath; /* path to prepend (the -P option) */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 char * flags; /* additional cscope flags/options (e.g, -p2) */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 #if defined(UNIX)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 pid_t pid; /* PID of the connected cscope process. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 dev_t st_dev; /* ID of dev containing cscope db */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 ino_t st_ino; /* inode number of cscope db */
132
d6009de12681 updated for version 7.0044
vimboss
parents: 7
diff changeset
61 #else
d6009de12681 updated for version 7.0044
vimboss
parents: 7
diff changeset
62 # if defined(WIN32)
1385
d0cf8c843186 updated for version 7.1-100
vimboss
parents: 378
diff changeset
63 DWORD pid; /* PID of the connected cscope process. */
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 HANDLE hProc; /* cscope process handle */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 DWORD nVolume; /* Volume serial number, instead of st_dev */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 DWORD nIndexHigh; /* st_ino has no meaning in the Windows */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 DWORD nIndexLow;
132
d6009de12681 updated for version 7.0044
vimboss
parents: 7
diff changeset
68 # endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 FILE * fr_fp; /* from cscope: FILE. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 FILE * to_fp; /* to cscope: FILE. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 } csinfo_T;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 typedef enum { Add, Find, Help, Kill, Reset, Show } csid_e;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 typedef enum {
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 Store,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 Get,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 Free,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 Print
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 } mcmd_e;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 #endif /* FEAT_CSCOPE */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 /* the end */