comparison src/if_cscope.c @ 1880:e5602d92da8c v7.2.177

updated for version 7.2-177
author vimboss
date Sat, 16 May 2009 15:31:32 +0000
parents 6ed4a82fcfc6
children 3f661e42f262
comparison
equal deleted inserted replaced
1879:e8eeeff19eae 1880:e5602d92da8c
81 N_("Kill a connection"), "kill #", 0 }, 81 N_("Kill a connection"), "kill #", 0 },
82 { "reset", cs_reset, 82 { "reset", cs_reset,
83 N_("Reinit all connections"), "reset", 0 }, 83 N_("Reinit all connections"), "reset", 0 },
84 { "show", cs_show, 84 { "show", cs_show,
85 N_("Show connections"), "show", 0 }, 85 N_("Show connections"), "show", 0 },
86 { NULL } 86 { NULL, NULL, NULL, NULL, 0 }
87 }; 87 };
88 88
89 static void 89 static void
90 cs_usage_msg(x) 90 cs_usage_msg(x)
91 csid_e x; 91 csid_e x;
105 105
106 /* 106 /*
107 * Function given to ExpandGeneric() to obtain the cscope command 107 * Function given to ExpandGeneric() to obtain the cscope command
108 * expansion. 108 * expansion.
109 */ 109 */
110 /*ARGSUSED*/
111 char_u * 110 char_u *
112 get_cscope_name(xp, idx) 111 get_cscope_name(xp, idx)
113 expand_T *xp; 112 expand_T *xp UNUSED;
114 int idx; 113 int idx;
115 { 114 {
116 int current_idx; 115 int current_idx;
117 int i; 116 int i;
118 117
494 * add cscope database or a directory name (to look for cscope.out) 493 * add cscope database or a directory name (to look for cscope.out)
495 * to the cscope connection list 494 * to the cscope connection list
496 * 495 *
497 * MAXPATHL 256 496 * MAXPATHL 256
498 */ 497 */
499 /* ARGSUSED */
500 static int 498 static int
501 cs_add(eap) 499 cs_add(eap)
502 exarg_T *eap; 500 exarg_T *eap UNUSED;
503 { 501 {
504 char *fname, *ppath, *flags = NULL; 502 char *fname, *ppath, *flags = NULL;
505 503
506 if ((fname = strtok((char *)NULL, (const char *)" ")) == NULL) 504 if ((fname = strtok((char *)NULL, (const char *)" ")) == NULL)
507 { 505 {
1290 /* 1288 /*
1291 * PRIVATE: cs_help 1289 * PRIVATE: cs_help
1292 * 1290 *
1293 * print help 1291 * print help
1294 */ 1292 */
1295 /* ARGSUSED */
1296 static int 1293 static int
1297 cs_help(eap) 1294 cs_help(eap)
1298 exarg_T *eap; 1295 exarg_T *eap UNUSED;
1299 { 1296 {
1300 cscmd_T *cmdp = cs_cmds; 1297 cscmd_T *cmdp = cs_cmds;
1301 1298
1302 (void)MSG_PUTS(_("cscope commands:\n")); 1299 (void)MSG_PUTS(_("cscope commands:\n"));
1303 while (cmdp->name != NULL) 1300 while (cmdp->name != NULL)
1397 /* 1394 /*
1398 * PRIVATE: cs_insert_filelist 1395 * PRIVATE: cs_insert_filelist
1399 * 1396 *
1400 * insert a new cscope database filename into the filelist 1397 * insert a new cscope database filename into the filelist
1401 */ 1398 */
1402 /*ARGSUSED*/
1403 static int 1399 static int
1404 cs_insert_filelist(fname, ppath, flags, sb) 1400 cs_insert_filelist(fname, ppath, flags, sb)
1405 char *fname; 1401 char *fname;
1406 char *ppath; 1402 char *ppath;
1407 char *flags; 1403 char *flags;
1408 struct stat *sb; 1404 struct stat *sb UNUSED;
1409 { 1405 {
1410 short i, j; 1406 short i, j;
1411 #ifndef UNIX 1407 #ifndef UNIX
1412 HANDLE hFile; 1408 HANDLE hFile;
1413 BY_HANDLE_FILE_INFORMATION bhfi; 1409 BY_HANDLE_FILE_INFORMATION bhfi;
1559 /* 1555 /*
1560 * PRIVATE: cs_kill 1556 * PRIVATE: cs_kill
1561 * 1557 *
1562 * nuke em 1558 * nuke em
1563 */ 1559 */
1564 /* ARGSUSED */
1565 static int 1560 static int
1566 cs_kill(eap) 1561 cs_kill(eap)
1567 exarg_T *eap; 1562 exarg_T *eap UNUSED;
1568 { 1563 {
1569 char *stok; 1564 char *stok;
1570 short i; 1565 short i;
1571 1566
1572 if ((stok = strtok((char *)NULL, (const char *)" ")) == NULL) 1567 if ((stok = strtok((char *)NULL, (const char *)" ")) == NULL)
2239 2234
2240 #if defined(UNIX) && defined(SIGALRM) 2235 #if defined(UNIX) && defined(SIGALRM)
2241 /* 2236 /*
2242 * Used to catch and ignore SIGALRM below. 2237 * Used to catch and ignore SIGALRM below.
2243 */ 2238 */
2244 /* ARGSUSED */
2245 static RETSIGTYPE 2239 static RETSIGTYPE
2246 sig_handler SIGDEFARG(sigarg) 2240 sig_handler SIGDEFARG(sigarg)
2247 { 2241 {
2248 /* do nothing */ 2242 /* do nothing */
2249 SIGRETURN; 2243 SIGRETURN;
2379 /* 2373 /*
2380 * PRIVATE: cs_reset 2374 * PRIVATE: cs_reset
2381 * 2375 *
2382 * calls cs_kill on all cscope connections then reinits 2376 * calls cs_kill on all cscope connections then reinits
2383 */ 2377 */
2384 /* ARGSUSED */
2385 static int 2378 static int
2386 cs_reset(eap) 2379 cs_reset(eap)
2387 exarg_T *eap; 2380 exarg_T *eap UNUSED;
2388 { 2381 {
2389 char **dblist = NULL, **pplist = NULL, **fllist = NULL; 2382 char **dblist = NULL, **pplist = NULL, **fllist = NULL;
2390 int i; 2383 int i;
2391 char buf[20]; /* for sprintf " (#%d)" */ 2384 char buf[20]; /* for sprintf " (#%d)" */
2392 2385
2495 /* 2488 /*
2496 * PRIVATE: cs_show 2489 * PRIVATE: cs_show
2497 * 2490 *
2498 * show all cscope connections 2491 * show all cscope connections
2499 */ 2492 */
2500 /* ARGSUSED */
2501 static int 2493 static int
2502 cs_show(eap) 2494 cs_show(eap)
2503 exarg_T *eap; 2495 exarg_T *eap UNUSED;
2504 { 2496 {
2505 short i; 2497 short i;
2506 if (cs_cnt_connections() == 0) 2498 if (cs_cnt_connections() == 0)
2507 MSG_PUTS(_("no cscope connections\n")); 2499 MSG_PUTS(_("no cscope connections\n"));
2508 else 2500 else