Lines Matching refs:csinfo

53 static csinfo_T *   csinfo = NULL;  variable
137 if (csinfo[i].fname == NULL) in get_cscope_name()
397 if (!csinfo[i].fname) in cs_connection()
406 if (strstr(csinfo[i].fname, (char *)dbpath)) in cs_connection()
410 if (strcmp(csinfo[i].fname, (char *)dbpath) == 0) in cs_connection()
414 if (strstr(csinfo[i].fname, (char *)dbpath) in cs_connection()
415 && ((!ppath && !csinfo[i].ppath) in cs_connection()
417 && csinfo[i].ppath in cs_connection()
418 && strstr(csinfo[i].ppath, (char *)ppath)))) in cs_connection()
422 if ((strcmp(csinfo[i].fname, (char *)dbpath) == 0) in cs_connection()
423 && ((!ppath && !csinfo[i].ppath) in cs_connection()
425 && csinfo[i].ppath in cs_connection()
426 && (strcmp(csinfo[i].ppath, (char *)ppath) == 0)))) in cs_connection()
587 csinfo[i].fname); in cs_add_common()
629 if (csinfo[i].fname != NULL) in cs_cnt_connections()
658 if (!fgets(buf, CSREAD_BUFSIZE, csinfo[idx].fr_fp)) in cs_cnt_matches()
660 if (feof(csinfo[idx].fr_fp)) in cs_cnt_matches()
815 switch (csinfo[i].pid = fork()) in cs_create_connection()
869 len = (int)(strlen(prog) + strlen(csinfo[i].fname) + 32); in cs_create_connection()
870 if (csinfo[i].ppath) in cs_create_connection()
883 expand_env((char_u *)csinfo[i].ppath, (char_u *)ppath, MAXPATHL); in cs_create_connection()
888 if (csinfo[i].flags) in cs_create_connection()
889 len += (int)strlen(csinfo[i].flags); in cs_create_connection()
905 (void)sprintf(cmd, "exec %s -dl -f %s", prog, csinfo[i].fname); in cs_create_connection()
908 (void)sprintf(cmd, "%s -dl -f %s", prog, csinfo[i].fname); in cs_create_connection()
910 if (csinfo[i].ppath != NULL) in cs_create_connection()
913 (void)strcat(cmd, csinfo[i].ppath); in cs_create_connection()
915 if (csinfo[i].flags != NULL) in cs_create_connection()
918 (void)strcat(cmd, csinfo[i].flags); in cs_create_connection()
946 if ((csinfo[i].to_fp = fdopen(to_cs[1], "w")) == NULL) in cs_create_connection()
948 if ((csinfo[i].fr_fp = fdopen(from_cs[0], "r")) == NULL) in cs_create_connection()
979 csinfo[i].pid = pi.dwProcessId; in cs_create_connection()
980 csinfo[i].hProc = pi.hProcess; in cs_create_connection()
986 || ((csinfo[i].to_fp = _fdopen(fd, "w")) == NULL)) in cs_create_connection()
990 || ((csinfo[i].fr_fp = _fdopen(fd, "r")) == NULL)) in cs_create_connection()
1143 if (csinfo[i].fname == NULL || csinfo[i].to_fp == NULL) in cs_find_common()
1147 (void)fprintf(csinfo[i].to_fp, "%s\n", cmd); in cs_find_common()
1148 (void)fflush(csinfo[i].to_fp); in cs_find_common()
1279 csinfo[i].fname = NULL; in clear_csinfo()
1280 csinfo[i].ppath = NULL; in clear_csinfo()
1281 csinfo[i].flags = NULL; in clear_csinfo()
1283 csinfo[i].st_dev = (dev_t)0; in clear_csinfo()
1284 csinfo[i].st_ino = (ino_t)0; in clear_csinfo()
1286 csinfo[i].nVolume = 0; in clear_csinfo()
1287 csinfo[i].nIndexHigh = 0; in clear_csinfo()
1288 csinfo[i].nIndexLow = 0; in clear_csinfo()
1290 csinfo[i].pid = 0; in clear_csinfo()
1291 csinfo[i].fr_fp = NULL; in clear_csinfo()
1292 csinfo[i].to_fp = NULL; in clear_csinfo()
1294 csinfo[i].hProc = NULL; in clear_csinfo()
1342 if (csinfo[j].fname != NULL in cs_insert_filelist()
1344 && csinfo[j].st_dev == sb->st_dev && csinfo[j].st_ino == sb->st_ino in cs_insert_filelist()
1347 && ((fullpathcmp((char_u *)csinfo[j].fname, in cs_insert_filelist()
1350 || (csinfo[j].nVolume == bhfi.dwVolumeSerialNumber in cs_insert_filelist()
1351 && csinfo[j].nIndexHigh == bhfi.nFileIndexHigh in cs_insert_filelist()
1352 && csinfo[j].nIndexLow == bhfi.nFileIndexLow)) in cs_insert_filelist()
1361 if (csinfo[j].fname == NULL && i == -1) in cs_insert_filelist()
1374 csinfo = ALLOC_CLEAR_ONE(csinfo_T); in cs_insert_filelist()
1378 csinfo_T *t_csinfo = csinfo; in cs_insert_filelist()
1382 csinfo = vim_realloc(csinfo, sizeof(csinfo_T)*csinfo_size); in cs_insert_filelist()
1383 if (csinfo == NULL) in cs_insert_filelist()
1389 if (csinfo == NULL) in cs_insert_filelist()
1395 if ((csinfo[i].fname = alloc(strlen(fname)+1)) == NULL) in cs_insert_filelist()
1398 (void)strcpy(csinfo[i].fname, (const char *)fname); in cs_insert_filelist()
1402 if ((csinfo[i].ppath = alloc(strlen(ppath) + 1)) == NULL) in cs_insert_filelist()
1404 VIM_CLEAR(csinfo[i].fname); in cs_insert_filelist()
1407 (void)strcpy(csinfo[i].ppath, (const char *)ppath); in cs_insert_filelist()
1409 csinfo[i].ppath = NULL; in cs_insert_filelist()
1413 if ((csinfo[i].flags = alloc(strlen(flags) + 1)) == NULL) in cs_insert_filelist()
1415 VIM_CLEAR(csinfo[i].fname); in cs_insert_filelist()
1416 VIM_CLEAR(csinfo[i].ppath); in cs_insert_filelist()
1419 (void)strcpy(csinfo[i].flags, (const char *)flags); in cs_insert_filelist()
1421 csinfo[i].flags = NULL; in cs_insert_filelist()
1424 csinfo[i].st_dev = sb->st_dev; in cs_insert_filelist()
1425 csinfo[i].st_ino = sb->st_ino; in cs_insert_filelist()
1428 csinfo[i].nVolume = bhfi.dwVolumeSerialNumber; in cs_insert_filelist()
1429 csinfo[i].nIndexLow = bhfi.nFileIndexLow; in cs_insert_filelist()
1430 csinfo[i].nIndexHigh = bhfi.nFileIndexHigh; in cs_insert_filelist()
1491 if (csinfo[i].fname != NULL && strstr(csinfo[i].fname, stok)) in cs_kill()
1496 if ((i != -1) && (i >= csinfo_size || i < -1 || csinfo[i].fname == NULL)) in cs_kill()
1507 if (csinfo[i].fname) in cs_kill()
1508 cs_kill_execute(i, csinfo[i].fname); in cs_kill()
1690 if (fgets(buf, bufsize, csinfo[cnumber].fr_fp) == NULL) in cs_parse_results()
1692 if (feof(csinfo[cnumber].fr_fp)) in cs_parse_results()
1703 while ((ch = getc(csinfo[cnumber].fr_fp)) != EOF && ch != '\n') in cs_parse_results()
2069 while ((ch = getc(csinfo[i].fr_fp)) != EOF && ch != CSCOPE_PROMPT[0]) in cs_read_prompt()
2090 (void)putc('\n', csinfo[i].to_fp); in cs_read_prompt()
2091 (void)fflush(csinfo[i].to_fp); in cs_read_prompt()
2103 ch = getc(csinfo[i].fr_fp); in cs_read_prompt()
2153 if (csinfo[i].to_fp != NULL) in cs_release_csp()
2155 (void)fputs("q\n", csinfo[i].to_fp); in cs_release_csp()
2156 (void)fflush(csinfo[i].to_fp); in cs_release_csp()
2179 pid = waitpid(csinfo[i].pid, &pstat, 0); in cs_release_csp()
2193 pid = waitpid(csinfo[i].pid, &pstat, WNOHANG); in cs_release_csp()
2205 if (pid < 0 && csinfo[i].pid > 1) in cs_release_csp()
2227 if (kill(csinfo[i].pid, 0) != 0) in cs_release_csp()
2238 kill(csinfo[i].pid, SIGKILL); in cs_release_csp()
2239 (void)waitpid(csinfo[i].pid, &pstat, 0); in cs_release_csp()
2244 if (csinfo[i].hProc != NULL) in cs_release_csp()
2247 if (WaitForSingleObject(csinfo[i].hProc, 1000) == WAIT_TIMEOUT) in cs_release_csp()
2248 TerminateProcess(csinfo[i].hProc, 0); in cs_release_csp()
2249 CloseHandle(csinfo[i].hProc); in cs_release_csp()
2253 if (csinfo[i].fr_fp != NULL) in cs_release_csp()
2254 (void)fclose(csinfo[i].fr_fp); in cs_release_csp()
2255 if (csinfo[i].to_fp != NULL) in cs_release_csp()
2256 (void)fclose(csinfo[i].to_fp); in cs_release_csp()
2260 vim_free(csinfo[i].fname); in cs_release_csp()
2261 vim_free(csinfo[i].ppath); in cs_release_csp()
2262 vim_free(csinfo[i].flags); in cs_release_csp()
2296 dblist[i] = csinfo[i].fname; in cs_reset()
2297 pplist[i] = csinfo[i].ppath; in cs_reset()
2298 fllist[i] = csinfo[i].flags; in cs_reset()
2299 if (csinfo[i].fname != NULL) in cs_reset()
2354 if (csinfo[i].ppath != NULL) in cs_resolve_file()
2355 len += (int)strlen(csinfo[i].ppath); in cs_resolve_file()
2356 else if (p_csre && csinfo[i].fname != NULL) in cs_resolve_file()
2363 vim_strncpy(csdir, (char_u *)csinfo[i].fname, in cs_resolve_file()
2364 gettail((char_u *)csinfo[i].fname) in cs_resolve_file()
2365 - (char_u *)csinfo[i].fname); in cs_resolve_file()
2373 if (csinfo[i].ppath != NULL in cs_resolve_file()
2374 && (strncmp(name, csinfo[i].ppath, strlen(csinfo[i].ppath)) != 0) in cs_resolve_file()
2382 (void)sprintf(fullname, "%s/%s", csinfo[i].ppath, name); in cs_resolve_file()
2384 else if (csdir != NULL && csinfo[i].fname != NULL && *csdir != NUL) in cs_resolve_file()
2416 if (csinfo[i].fname == NULL) in cs_show()
2419 if (csinfo[i].ppath != NULL) in cs_show()
2421 i, (long)csinfo[i].pid, csinfo[i].fname, csinfo[i].ppath); in cs_show()
2424 i, (long)csinfo[i].pid, csinfo[i].fname); in cs_show()
2443 vim_free(csinfo); in cs_end()