Mercurial > vim
annotate src/if_cscope.h @ 20889:27401f09fe9b v8.2.0996
patch 8.2.0996: using "aucmdwin" in win_gettype() is not ideal
Commit: https://github.com/vim/vim/commit/40a019f157c549dcdc17c33f082975485567bb06
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 17 21:41:35 2020 +0200
patch 8.2.0996: using "aucmdwin" in win_gettype() is not ideal
Problem: Using "aucmdwin" in win_gettype() is not ideal.
Solution: Rename to "autocmd".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 17 Jun 2020 21:45:03 +0200 |
parents | 6e3dc2d630c2 |
children |
rev | line source |
---|---|
10042
4aead6a9b7a9
commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents:
10023
diff
changeset
|
1 /* vi:set ts=8 sts=4 sw=4 noet: |
7 | 2 * |
3 * CSCOPE support for Vim added by Andy Kahn <kahn@zk3.dec.com> | |
148 | 4 * Ported to Win32 by Sergey Khorev <sergey.khorev@gmail.com> |
7 | 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 | |
15868
7fad90423bd2
patch 8.1.0941: macros for MS-Windows are inconsistent
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
14 #if defined (MSWIN) |
8277
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 | 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 | 19 #endif |
20 | |
21 #define CSCOPE_SUCCESS 0 | |
22 #define CSCOPE_FAILURE -1 | |
23 | |
24 #define CSCOPE_DBFILE "cscope.out" | |
25 #define CSCOPE_PROMPT ">> " | |
26 | |
27 /* | |
10023
67d1f619bb26
commit https://github.com/vim/vim/commit/f4145d8e990a72bdfea9db3110a7e42a0ff4240c
Christian Brabandt <cb@256bit.org>
parents:
8277
diff
changeset
|
28 * See ":help cscope-find" for the possible queries. |
7 | 29 */ |
30 | |
31 typedef struct { | |
32 char * name; | |
7807
1a5d34492798
commit https://github.com/vim/vim/commit/d99df423c559d85c17779b3685426c489554908c
Christian Brabandt <cb@256bit.org>
parents:
1931
diff
changeset
|
33 int (*func)(exarg_T *eap); |
7 | 34 char * help; |
35 char * usage; | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
36 int cansplit; // if supports splitting window |
7 | 37 } cscmd_T; |
38 | |
39 typedef struct csi { | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
40 char * fname; // cscope db name |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
41 char * ppath; // path to prepend (the -P option) |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
42 char * flags; // additional cscope flags/options (e.g, -p2) |
7 | 43 #if defined(UNIX) |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
44 pid_t pid; // PID of the connected cscope process. |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
45 dev_t st_dev; // ID of dev containing cscope db |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
46 ino_t st_ino; // inode number of cscope db |
132 | 47 #else |
15868
7fad90423bd2
patch 8.1.0941: macros for MS-Windows are inconsistent
Bram Moolenaar <Bram@vim.org>
parents:
10042
diff
changeset
|
48 # if defined(MSWIN) |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
49 DWORD pid; // PID of the connected cscope process. |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
50 HANDLE hProc; // cscope process handle |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
51 DWORD nVolume; // Volume serial number, instead of st_dev |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
52 DWORD nIndexHigh; // st_ino has no meaning in the Windows |
7 | 53 DWORD nIndexLow; |
132 | 54 # endif |
7 | 55 #endif |
56 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
57 FILE * fr_fp; // from cscope: FILE. |
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
58 FILE * to_fp; // to cscope: FILE. |
7 | 59 } csinfo_T; |
60 | |
61 typedef enum { Add, Find, Help, Kill, Reset, Show } csid_e; | |
62 | |
63 typedef enum { | |
64 Store, | |
65 Get, | |
66 Free, | |
67 Print | |
68 } mcmd_e; | |
69 | |
70 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
15868
diff
changeset
|
71 #endif // FEAT_CSCOPE |