dbop 221 global/global.c DBOP *dbop; dbop 239 global/global.c dbop = dbop_open(makepath(dbpath, dbname(GTAGS), NULL), 0, 0, 0); dbop 240 global/global.c if (dbop == NULL) dbop 242 global/global.c if (dbop_getoption(dbop, COMPLINEKEY)) dbop 244 global/global.c tagline = dbop_first(dbop, tag, NULL, 0); dbop 247 global/global.c for (; tagline; tagline = dbop_next(dbop)) { dbop 302 global/global.c dbop_close(dbop); dbop 316 global/global.c dbop = dbop_open(makepath(libdbpath, dbname(GTAGS), NULL), 0, 0, 0); dbop 317 global/global.c if (dbop == NULL) dbop 319 global/global.c tagline = dbop_first(dbop, tag, NULL, 0); dbop 320 global/global.c dbop_close(dbop); dbop 971 global/global.c DBOP *dbop = dbop_open(NULL, 1, 0600, DBOP_RAW); dbop 977 global/global.c if (dbop == NULL) dbop 992 global/global.c dbop_put(dbop, path + 1, ""); dbop 997 global/global.c dbop_put(dbop, p, ""); dbop 1003 global/global.c dbop_put(dbop, p, ""); dbop 1008 global/global.c for (path = dbop_first(dbop, NULL, NULL, DBOP_KEY); path != NULL; path = dbop_next(dbop)) { dbop 1012 global/global.c dbop_close(dbop); dbop 1265 global/global.c (user_specified) ? NULL : gp->dbop->lastdat); dbop 1344 global/global.c convert_put_using(cv, "path", path, 1, " ", gp->dbop->lastdat); dbop 1382 global/global.c DBOP *dbop; dbop 1423 global/global.c if (dbop_get(data->dbop, key) != NULL) { dbop 1476 global/global.c data.dbop = dbop_open(makepath(dbpath, dbname(GTAGS), NULL), 0, 0, 0); dbop 1477 global/global.c if (data.dbop == NULL) dbop 1480 global/global.c data.dbop = NULL; dbop 1540 global/global.c if (data.dbop != NULL) dbop 1541 global/global.c dbop_close(data.dbop); dbop 325 gtags/gtags.c DBOP *dbop = NULL; dbop 331 gtags/gtags.c if ((dbop = dbop_open(dump_target, 0, 0, DBOP_RAW)) == NULL) dbop 336 gtags/gtags.c if (dbop_get(dbop, NEXTKEY)) dbop 338 gtags/gtags.c for (dat = dbop_first(dbop, NULL, NULL, 0); dat != NULL; dat = dbop_next(dbop)) { dbop 339 gtags/gtags.c const char *flag = is_gpath ? dbop_getflag(dbop) : ""; dbop 342 gtags/gtags.c printf("%s\t%s\t%s\n", dbop->lastkey, dat, flag); dbop 344 gtags/gtags.c printf("%s\t%s\n", dbop->lastkey, dat); dbop 346 gtags/gtags.c dbop_close(dbop); dbop 47 htags/path2url.c DBOP *dbop; dbop 53 htags/path2url.c dbop = dbop_open(makepath(dbpath, dbname(GPATH), NULL), 0, 0, 0); dbop 54 htags/path2url.c if (dbop == NULL) dbop 56 htags/path2url.c for (path = dbop_first(dbop, "./", NULL, DBOP_PREFIX | DBOP_KEY); path; path = dbop_next(dbop)) { dbop 57 htags/path2url.c const char *no = dbop_lastdat(dbop, NULL); dbop 65 htags/path2url.c dbop_close(dbop); dbop 43 libutil/assoc.c assoc->dbop = dbop_open(NULL, 1, 0600, 0); dbop 44 libutil/assoc.c if (assoc->dbop == NULL) dbop 46 libutil/assoc.c assoc->dbop->put_errmsg = "cannot write to temporary file.\nYou can specify the directory for the temporary file using environment variable 'TMPDIR'."; dbop 59 libutil/assoc.c if (assoc->dbop == NULL) dbop 61 libutil/assoc.c dbop_close(assoc->dbop); dbop 74 libutil/assoc.c if (assoc->dbop == NULL) dbop 76 libutil/assoc.c dbop_put(assoc->dbop, name, value); dbop 89 libutil/assoc.c if (assoc->dbop == NULL) dbop 91 libutil/assoc.c dbop_put_withlen(assoc->dbop, name, value, len); dbop 103 libutil/assoc.c if (assoc->dbop == NULL) dbop 105 libutil/assoc.c return dbop_get(assoc->dbop, name); dbop 25 libutil/assoc.h DBOP *dbop; dbop 88 libutil/dbop.c start_sort_process(DBOP *dbop) { dbop 92 libutil/dbop.c terminate_sort_process(DBOP *dbop) { dbop 106 libutil/dbop.c start_sort_process(DBOP *dbop) { dbop 155 libutil/dbop.c dbop->pid = pi.hProcess; dbop 156 libutil/dbop.c dbop->sortout = fdopen(_open_osfhandle((long)opipe[1], _O_WRONLY), "w"); dbop 157 libutil/dbop.c dbop->sortin = fdopen(_open_osfhandle((long)ipipe[0], _O_RDONLY), "r"); dbop 158 libutil/dbop.c if (dbop->sortout == NULL || dbop->sortin == NULL) dbop 162 libutil/dbop.c terminate_sort_process(DBOP *dbop) { dbop 163 libutil/dbop.c WaitForSingleObject(dbop->pid, INFINITE); dbop 164 libutil/dbop.c CloseHandle(dbop->pid); dbop 183 libutil/dbop.c start_sort_process(DBOP *dbop) { dbop 207 libutil/dbop.c dbop->pid = fork(); dbop 208 libutil/dbop.c if (dbop->pid == 0) { dbop 222 libutil/dbop.c } else if (dbop->pid < 0) dbop 229 libutil/dbop.c dbop->sortout = fdopen(opipe[1], "w"); dbop 230 libutil/dbop.c dbop->sortin = fdopen(ipipe[0], "r"); dbop 231 libutil/dbop.c if (dbop->sortout == NULL || dbop->sortin == NULL) dbop 235 libutil/dbop.c terminate_sort_process(DBOP *dbop) { dbop 236 libutil/dbop.c while (waitpid(dbop->pid, NULL, 0) < 0 && errno == EINTR) dbop 259 libutil/dbop.c DBOP *dbop; dbop 301 libutil/dbop.c dbop = (DBOP *)check_calloc(sizeof(DBOP), 1); dbop 303 libutil/dbop.c dbop->dbname[0] = '\0'; dbop 305 libutil/dbop.c strlimcpy(dbop->dbname, path, sizeof(dbop->dbname)); dbop 306 libutil/dbop.c dbop->db = db; dbop 307 libutil/dbop.c dbop->openflags = flags; dbop 308 libutil/dbop.c dbop->perm = (mode == 1) ? perm : 0; dbop 309 libutil/dbop.c dbop->lastdat = NULL; dbop 310 libutil/dbop.c dbop->lastsize = 0; dbop 311 libutil/dbop.c dbop->sortout = NULL; dbop 312 libutil/dbop.c dbop->sortin = NULL; dbop 316 libutil/dbop.c if (mode != 0 && dbop->openflags & DBOP_SORTED_WRITE) dbop 317 libutil/dbop.c start_sort_process(dbop); dbop 318 libutil/dbop.c return dbop; dbop 328 libutil/dbop.c dbop_get(DBOP *dbop, const char *name) dbop 330 libutil/dbop.c DB *db = dbop->db; dbop 338 libutil/dbop.c dbop->lastdat = (char *)dat.data; dbop 339 libutil/dbop.c dbop->lastsize = dat.size; dbop 358 libutil/dbop.c dbop_put(DBOP *dbop, const char *name, const char *data) dbop 360 libutil/dbop.c DB *db = dbop->db; dbop 370 libutil/dbop.c if (dbop->sortout != NULL) { dbop 371 libutil/dbop.c fputs(name, dbop->sortout); dbop 372 libutil/dbop.c putc(SORT_SEP, dbop->sortout); dbop 373 libutil/dbop.c fputs(data, dbop->sortout); dbop 374 libutil/dbop.c putc('\n', dbop->sortout); dbop 388 libutil/dbop.c die(dbop->put_errmsg ? dbop->put_errmsg : "dbop_put failed."); dbop 402 libutil/dbop.c dbop_put_withlen(DBOP *dbop, const char *name, const char *data, int length) dbop 404 libutil/dbop.c DB *db = dbop->db; dbop 424 libutil/dbop.c die(dbop->put_errmsg ? dbop->put_errmsg : "dbop_put_withlen failed."); dbop 434 libutil/dbop.c dbop_delete(DBOP *dbop, const char *path) dbop 436 libutil/dbop.c DB *db = dbop->db; dbop 457 libutil/dbop.c dbop_update(DBOP *dbop, const char *key, const char *dat) dbop 459 libutil/dbop.c dbop_put(dbop, key, dat); dbop 475 libutil/dbop.c dbop_first(DBOP *dbop, const char *name, regex_t *preg, int flags) dbop 477 libutil/dbop.c DB *db = dbop->db; dbop 481 libutil/dbop.c dbop->preg = preg; dbop 487 libutil/dbop.c strlimcpy(dbop->key, name, sizeof(dbop->key)); dbop 495 libutil/dbop.c dbop->keylen = key.size; dbop 500 libutil/dbop.c if (strncmp((char *)key.data, dbop->key, dbop->keylen)) dbop 503 libutil/dbop.c if (strcmp((char *)key.data, dbop->key)) dbop 511 libutil/dbop.c dbop->keylen = dbop->key[0] = 0; dbop 516 libutil/dbop.c if (ismeta(key.data) && !(dbop->openflags & DBOP_RAW)) dbop 523 libutil/dbop.c dbop->lastdat = (char *)dat.data; dbop 524 libutil/dbop.c dbop->lastsize = dat.size; dbop 525 libutil/dbop.c dbop->lastkey = (char *)key.data; dbop 526 libutil/dbop.c dbop->lastkeysize = key.size; dbop 535 libutil/dbop.c dbop->ioflags = flags; dbop 537 libutil/dbop.c strlimcpy(dbop->prev, (char *)key.data, sizeof(dbop->prev)); dbop 551 libutil/dbop.c dbop_next(DBOP *dbop) dbop 553 libutil/dbop.c DB *db = dbop->db; dbop 554 libutil/dbop.c int flags = dbop->ioflags; dbop 558 libutil/dbop.c if (dbop->unread) { dbop 559 libutil/dbop.c dbop->unread = 0; dbop 560 libutil/dbop.c return dbop->lastdat; dbop 565 libutil/dbop.c if (!(dbop->openflags & DBOP_RAW)) { dbop 572 libutil/dbop.c if (!strcmp(dbop->prev, (char *)key.data)) dbop 576 libutil/dbop.c strlimcpy(dbop->prev, (char *)key.data, sizeof(dbop->prev)); dbop 578 libutil/dbop.c dbop->lastdat = (char *)dat.data; dbop 579 libutil/dbop.c dbop->lastsize = dat.size; dbop 580 libutil/dbop.c dbop->lastkey = (char *)key.data; dbop 581 libutil/dbop.c dbop->lastkeysize = key.size; dbop 583 libutil/dbop.c if (strncmp((char *)key.data, dbop->key, dbop->keylen)) dbop 585 libutil/dbop.c } else if (dbop->keylen) { dbop 586 libutil/dbop.c if (strcmp((char *)key.data, dbop->key)) dbop 589 libutil/dbop.c if (dbop->preg && regexec(dbop->preg, (char *)key.data, 0, 0, 0) != 0) dbop 605 libutil/dbop.c dbop_unread(DBOP *dbop) dbop 607 libutil/dbop.c dbop->unread = 1; dbop 617 libutil/dbop.c dbop_lastdat(DBOP *dbop, int *size) dbop 620 libutil/dbop.c *size = dbop->lastsize; dbop 621 libutil/dbop.c return dbop->lastdat; dbop 627 libutil/dbop.c dbop_getflag(DBOP *dbop) dbop 630 libutil/dbop.c const char *dat = dbop_lastdat(dbop, &size); dbop 648 libutil/dbop.c dbop_getoption(DBOP *dbop, const char *key) dbop 653 libutil/dbop.c if ((p = dbop_get(dbop, key)) == NULL) dbop 655 libutil/dbop.c if (dbop->lastsize <= strlen(key)) dbop 666 libutil/dbop.c dbop_putoption(DBOP *dbop, const char *key, const char *string) dbop 674 libutil/dbop.c dbop_put(dbop, key, buf); dbop 680 libutil/dbop.c dbop_getversion(DBOP *dbop) dbop 685 libutil/dbop.c if ((p = dbop_getoption(dbop, VERSIONKEY)) != NULL) dbop 693 libutil/dbop.c dbop_putversion(DBOP *dbop, int version) dbop 698 libutil/dbop.c dbop_putoption(dbop, VERSIONKEY, number); dbop 706 libutil/dbop.c dbop_close(DBOP *dbop) dbop 708 libutil/dbop.c DB *db = dbop->db; dbop 713 libutil/dbop.c if (dbop->sortout != NULL) { dbop 724 libutil/dbop.c fclose(dbop->sortout); dbop 725 libutil/dbop.c dbop->sortout = NULL; dbop 729 libutil/dbop.c while (strbuf_fgets(sb, dbop->sortin, STRBUF_NOCRLF)) { dbop 735 libutil/dbop.c dbop_put(dbop, strbuf_value(sb), p); dbop 737 libutil/dbop.c fclose(dbop->sortin); dbop 739 libutil/dbop.c terminate_sort_process(dbop); dbop 747 libutil/dbop.c (void)db->close(db, dbop->dbname[0] == '\0' ? 1 : 0); dbop 749 libutil/dbop.c if (dbop->dbname[0] != '\0') { dbop 750 libutil/dbop.c if (dbop->perm && chmod(dbop->dbname, dbop->perm) < 0) dbop 753 libutil/dbop.c (void)free(dbop); dbop 33 libutil/defined.c static DBOP *dbop = NULL; dbop 42 libutil/defined.c if (dbop == NULL) { dbop 50 libutil/defined.c dbop = dbop_open(makepath(dbpath, "GTAGS", NULL), 0, 0, 0); dbop 51 libutil/defined.c if (dbop == NULL) dbop 54 libutil/defined.c if (dbop_get(dbop, name)) dbop 43 libutil/gpathop.c static DBOP *dbop; dbop 120 libutil/gpathop.c dbop = dbop_open(makepath(dbpath, dbname(GPATH), NULL), mode, 0644, 0); dbop 121 libutil/gpathop.c if (dbop == NULL) dbop 124 libutil/gpathop.c dbop_putversion(dbop, create_version); dbop 129 libutil/gpathop.c const char *path = dbop_get(dbop, NEXTKEY); dbop 134 libutil/gpathop.c format_version = dbop_getversion(dbop); dbop 160 libutil/gpathop.c if (dbop_get(dbop, path) != NULL) dbop 173 libutil/gpathop.c dbop_put_withlen(dbop, path, strbuf_value(sb), strbuf_getlen(sb)); dbop 181 libutil/gpathop.c dbop_put_withlen(dbop, fid, strbuf_value(sb), strbuf_getlen(sb)); dbop 195 libutil/gpathop.c const char *fid = dbop_get(dbop, path); dbop 198 libutil/gpathop.c const char *flag = dbop_getflag(dbop); dbop 216 libutil/gpathop.c const char *path = dbop_get(dbop, fid); dbop 219 libutil/gpathop.c const char *flag = dbop_getflag(dbop); dbop 237 libutil/gpathop.c fid = dbop_get(dbop, path); dbop 240 libutil/gpathop.c dbop_delete(dbop, fid); dbop 241 libutil/gpathop.c dbop_delete(dbop, path); dbop 266 libutil/gpathop.c dbop_close(dbop); dbop 271 libutil/gpathop.c dbop_update(dbop, NEXTKEY, fid); dbop 273 libutil/gpathop.c dbop_close(dbop); dbop 305 libutil/gpathop.c gfind->dbop = dbop_open(makepath(dbpath, dbname(GPATH), NULL), 0, 0, 0); dbop 306 libutil/gpathop.c if (gfind->dbop == NULL) dbop 314 libutil/gpathop.c gfind->version = dbop_getversion(gfind->dbop); dbop 338 libutil/gpathop.c gfind->path = dbop_first(gfind->dbop, gfind->prefix, NULL, DBOP_KEY | DBOP_PREFIX); dbop 340 libutil/gpathop.c gfind->path = dbop_next(gfind->dbop); dbop 350 libutil/gpathop.c flag = dbop_getflag(gfind->dbop); dbop 363 libutil/gpathop.c dbop_close(gfind->dbop); dbop 41 libutil/gpathop.h DBOP *dbop; dbop 274 libutil/gtagsop.c int defined = is_defined_in_GTAGS(gtop, gtop->dbop->lastkey); \ dbop 361 libutil/gtagsop.c gtop->dbop = dbop_open(tagfile, dbmode, 0644, DBOP_DUP|DBOP_SORTED_WRITE); dbop 362 libutil/gtagsop.c if (gtop->dbop == NULL) { dbop 374 libutil/gtagsop.c format_version = dbop_getversion(gtop->dbop); dbop 399 libutil/gtagsop.c dbop_putoption(gtop->dbop, COMPACTKEY, NULL); dbop 401 libutil/gtagsop.c dbop_putoption(gtop->dbop, COMPRESSKEY, DEFAULT_ABBREVIATION); dbop 405 libutil/gtagsop.c dbop_putoption(gtop->dbop, COMPLINEKEY, NULL); dbop 407 libutil/gtagsop.c dbop_putoption(gtop->dbop, COMPNAMEKEY, NULL); dbop 408 libutil/gtagsop.c dbop_putversion(gtop->dbop, gtop->format_version); dbop 420 libutil/gtagsop.c gtop->format_version = dbop_getversion(gtop->dbop); dbop 426 libutil/gtagsop.c if (dbop_getoption(gtop->dbop, COMPACTKEY) != NULL) dbop 428 libutil/gtagsop.c if ((p = dbop_getoption(gtop->dbop, COMPRESSKEY)) != NULL) { dbop 432 libutil/gtagsop.c if (dbop_getoption(gtop->dbop, COMPLINEKEY) != NULL) dbop 434 libutil/gtagsop.c if (dbop_getoption(gtop->dbop, COMPNAMEKEY) != NULL) dbop 516 libutil/gtagsop.c dbop_put(gtop->dbop, key, strbuf_value(gtop->sb)); dbop 544 libutil/gtagsop.c for (tagline = dbop_first(gtop->dbop, NULL, NULL, 0); tagline; tagline = dbop_next(gtop->dbop)) { dbop 553 libutil/gtagsop.c dbop_delete(gtop->dbop, NULL); dbop 658 libutil/gtagsop.c for (tagline = dbop_first(gtop->dbop, key, preg, dbflags); dbop 660 libutil/gtagsop.c tagline = dbop_next(gtop->dbop)) dbop 702 libutil/gtagsop.c for (gtop->gtp.tag = dbop_first(gtop->dbop, key, preg, dbflags); dbop 704 libutil/gtagsop.c gtop->gtp.tag = dbop_next(gtop->dbop)) dbop 723 libutil/gtagsop.c tagline = dbop_first(gtop->dbop, key, preg, dbflags); dbop 729 libutil/gtagsop.c dbop_unread(gtop->dbop); dbop 753 libutil/gtagsop.c for (gtop->gtp.tag = dbop_next(gtop->dbop); dbop 755 libutil/gtagsop.c gtop->gtp.tag = dbop_next(gtop->dbop)) dbop 800 libutil/gtagsop.c dbop_close(gtop->dbop); dbop 898 libutil/gtagsop.c dbop_put(gtop->dbop, key, strbuf_value(gtop->sb)); dbop 922 libutil/gtagsop.c dbop_put(gtop->dbop, key, strbuf_value(gtop->sb)); dbop 929 libutil/gtagsop.c dbop_put(gtop->dbop, key, strbuf_value(gtop->sb)); dbop 966 libutil/gtagsop.c while ((tagline = dbop_next(gtop->dbop)) != NULL) { dbop 974 libutil/gtagsop.c strlimcpy(gtop->cur_tagname, gtop->dbop->lastkey, sizeof(gtop->cur_tagname)); dbop 975 libutil/gtagsop.c } else if (strcmp(gtop->cur_tagname, gtop->dbop->lastkey) != 0) { dbop 979 libutil/gtagsop.c dbop_unread(gtop->dbop); dbop 100 libutil/gtagsop.h DBOP *dbop; /**< descripter of #DBOP */