Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 88 lines (74 sloc) 2.393 kb
e5c6ef7 updated for version 7.0001
vimboss authored
1 /* vi:set ts=8 sts=4 sw=4:
2 *
3 * CSCOPE support for Vim added by Andy Kahn <kahn@zk3.dec.com>
e99ed37 updated for version 7.0046
vimboss authored
4 * Ported to Win32 by Sergey Khorev <sergey.khorev@gmail.com>
e5c6ef7 updated for version 7.0001
vimboss authored
5 *
6 * The basic idea/structure of cscope for Vim was borrowed from Nvi.
7 * There might be a few lines of code that look similar to what Nvi
8 * has. If this is a problem and requires inclusion of the annoying
9 * BSD license, then sue me; I'm not worth much anyway.
10 */
11
12 #if defined(FEAT_CSCOPE) || defined(PROTO)
13
14 #if defined(UNIX)
d7a2dda updated for version 7.0044
vimboss authored
15 # include <sys/types.h> /* pid_t */
16 # include <sys/stat.h> /* dev_t, ino_t */
17 #else
18 # if defined (WIN32)
19 # ifndef WIN32_LEAN_AND_MEAN
20 # define WIN32_LEAN_AND_MEAN
21 # endif
22 # include <windows.h>
e5c6ef7 updated for version 7.0001
vimboss authored
23 # endif
24 #endif
25
26 #define CSCOPE_SUCCESS 0
27 #define CSCOPE_FAILURE -1
28
29 #define CSCOPE_DBFILE "cscope.out"
30 #define CSCOPE_PROMPT ">> "
31
32 /*
33 * s 0name Find this C symbol
34 * g 1name Find this definition
35 * d 2name Find functions called by this function
36 * c 3name Find functions calling this function
37 * t 4string find text string (cscope 12.9)
38 * t 4name Find assignments to (cscope 13.3)
39 * 5pattern change pattern -- NOT USED
40 * e 6pattern Find this egrep pattern
41 * f 7name Find this file
42 * i 8name Find files #including this file
43 */
44
45 typedef struct {
46 char * name;
47 int (*func) __ARGS((exarg_T *eap));
48 char * help;
49 char * usage;
50 int cansplit; /* if supports splitting window */
51 } cscmd_T;
52
53 typedef struct csi {
54 char * fname; /* cscope db name */
55 char * ppath; /* path to prepend (the -P option) */
56 char * flags; /* additional cscope flags/options (e.g, -p2) */
57 #if defined(UNIX)
58 pid_t pid; /* PID of the connected cscope process. */
59 dev_t st_dev; /* ID of dev containing cscope db */
60 ino_t st_ino; /* inode number of cscope db */
d7a2dda updated for version 7.0044
vimboss authored
61 #else
62 # if defined(WIN32)
1340bab updated for version 7.1-100
vimboss authored
63 DWORD pid; /* PID of the connected cscope process. */
e5c6ef7 updated for version 7.0001
vimboss authored
64 HANDLE hProc; /* cscope process handle */
65 DWORD nVolume; /* Volume serial number, instead of st_dev */
66 DWORD nIndexHigh; /* st_ino has no meaning in the Windows */
67 DWORD nIndexLow;
d7a2dda updated for version 7.0044
vimboss authored
68 # endif
e5c6ef7 updated for version 7.0001
vimboss authored
69 #endif
70
71 FILE * fr_fp; /* from cscope: FILE. */
72 FILE * to_fp; /* to cscope: FILE. */
73 } csinfo_T;
74
75 typedef enum { Add, Find, Help, Kill, Reset, Show } csid_e;
76
77 typedef enum {
78 Store,
79 Get,
80 Free,
81 Print
82 } mcmd_e;
83
84
85 #endif /* FEAT_CSCOPE */
86
87 /* the end */
Something went wrong with that request. Please try again.