4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: Using ":scscope find" with 'cscopequickfix' does not always split
12 the window. (Gary Johnson)
13 Win32: ":cscope add" could make the script that contains it
14 read-only until the corresponding ":cscope kill".
15 Errors during ":cscope add" may not be handled properly.
16 Solution: When using the quickfix window may need to split the window.
17 Avoid file handle inheritance for the script.
18 Check for a failed connection and/or process. (Sergey Khorev)
19 Files: src/ex_cmds2.c, src/if_cscope.c
22 *** ../vim-6.2.015/src/ex_cmds2.c Thu May 29 11:26:29 2003
23 --- src/ex_cmds2.c Thu Jun 19 23:42:05 2003
27 * ex_cmds2.c: some more functions for command line commands
30 + #if defined(WIN32) && defined(FEAT_CSCOPE)
36 + #if defined(WIN32) && defined(FEAT_CSCOPE)
42 static void cmd_source __ARGS((char_u *fname, exarg_T *eap));
46 #define SCRIPT_INO(id) (((struct scriptstuff *)script_names.ga_data)[(id) - 1].ino)
49 + #if defined(WIN32) && defined(FEAT_CSCOPE)
50 + static FILE *fopen_noinh_readbin __ARGS((char *filename));
53 + * Special function to open a file without handle inheritance.
56 + fopen_noinh_readbin(filename)
59 + int fd_tmp = open(filename, O_RDONLY | O_BINARY | O_NOINHERIT);
63 + return fdopen(fd_tmp, READBIN);
69 * do_source: Read the file "fname" and execute its lines as EX commands.
77 + #if defined(WIN32) && defined(FEAT_CSCOPE)
78 + cookie.fp = fopen_noinh_readbin((char *)fname_exp);
80 cookie.fp = mch_fopen((char *)fname_exp, READBIN);
82 if (cookie.fp == NULL && check_other)
91 + #if defined(WIN32) && defined(FEAT_CSCOPE)
92 + cookie.fp = fopen_noinh_readbin((char *)fname_exp);
94 cookie.fp = mch_fopen((char *)fname_exp, READBIN);
99 *** ../vim-6.2.015/src/if_cscope.c Tue Jun 3 20:40:22 2003
100 --- src/if_cscope.c Sun Jun 22 17:10:23 2003
105 if (cs_create_connection(i) == CSCOPE_FAILURE
106 || cs_read_prompt(i) == CSCOPE_FAILURE)
108 + cs_release_csp(i, TRUE);
118 /* '-' starts a new error list */
119 if (qf_init(tmp, (char_u *)"%f%*\\t%l%*\\t%m", *qfpos == '-') > 0)
121 + # ifdef FEAT_WINDOWS
122 + if (postponed_split != 0)
124 + win_split(postponed_split > 0 ? postponed_split : 0, 0);
125 + # ifdef FEAT_SCROLLBIND
126 + curwin->w_p_scb = FALSE;
128 + postponed_split = 0;
131 qf_jump(0, 0, forceit);
141 ! if (s > path && *s == '/'
143 ! || s > path && *s == '\\'
151 ! if ((s > path && *s == '/')
153 ! || (s > path && *s == '\\')
160 * Trying to exit normally (not sure whether it is fit to UNIX cscope
162 ! (void)fputs("q\n", csinfo[i].to_fp);
163 ! (void)fflush(csinfo[i].to_fp);
164 /* give cscope chance to exit normally */
165 ! if (WaitForSingleObject(csinfo[i].hProc, 1000) == WAIT_TIMEOUT)
166 TerminateProcess(csinfo[i].hProc, 0);
171 * Trying to exit normally (not sure whether it is fit to UNIX cscope
173 ! if (csinfo[i].to_fp != NULL)
175 ! (void)fputs("q\n", csinfo[i].to_fp);
176 ! (void)fflush(csinfo[i].to_fp);
178 /* give cscope chance to exit normally */
179 ! if (csinfo[i].hProc > 0
180 ! && WaitForSingleObject(csinfo[i].hProc, 1000) == WAIT_TIMEOUT)
181 TerminateProcess(csinfo[i].hProc, 0);
184 *** ../vim-6.2.015/src/version.c Mon Jun 30 22:18:22 2003
185 --- src/version.c Mon Jun 30 22:25:27 2003
189 { /* Add new patch number below this line */
195 hundred-and-one symptoms of being an internet addict:
196 264. You turn to the teletext page "surfing report" and are surprised that it
197 is about sizes of waves and a weather forecast for seaside resorts.
199 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
200 /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
201 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
202 \\\ Help AIDS victims, buy at Amazon -- http://ICCF.nl/click1.html ///