int mutt_hcache_delete(header_cache_t *h, const char *filename, size_t(*keylen) (const char *fn)) { char path[_POSIX_PATH_MAX]; int ksize; if (!h) return -1; strncpy(path, h->folder, sizeof (path)); safe_strcat(path, sizeof (path), filename); ksize = strlen(h->folder) + keylen(path + strlen(h->folder)); return vlout(h->db, path, ksize); }
int db_delete(void *vhandle, const dbv_t *token) { int ret; dbh_t *handle = vhandle; VILLA *dbp; dbp = handle->dbp; ret = vlout(dbp, token->data, token->leng); if (ret == 0) { print_error(__FILE__, __LINE__, "(qdbm) vlout('%.*s'), err: %d, %s", CLAMP_INT_MAX(token->leng), (char *)token->data, dpecode, dperrmsg(dpecode)); exit(EX_ERROR); } ret = ret ^ 1; /* ok is 1 in qdbm and 0 in bogofilter */ return ret; /* 0 if ok */ }
void JsonDb::Transaction::Delete(ValueKey key) { vlout(db.get(), (char const *)&key, sizeof(ValueKey)); // std::cout << "Delete: key=" << key << std::endl; }