📄 util.h
字号:
/** * Copyright (C) 2005-2007 Christoph Rupp (chris@crupp.de). * All rights reserved. See file LICENSE for licence and copyright * information. * * utility functions * */#ifndef HAM_UTIL_H__#define HAM_UTIL_H__#ifdef __cplusplusextern "C" {#endif #include <ham/hamsterdb.h>#include "db.h"#include "keys.h"/** * copy a key * returns 0 if memory can not be allocated, or a pointer to @a dest. * uses ham_malloc() - memory in dest->key has to be freed by the caller */extern ham_key_t *util_copy_key(ham_db_t *db, const ham_key_t *source, ham_key_t *dest);/** * same as above, but copies a internal int_key_t structure */extern ham_key_t *util_copy_key_int2pub(ham_db_t *db, const int_key_t *source, ham_key_t *dest);/** * read a record */extern ham_status_tutil_read_record(ham_db_t *db, ham_record_t *record, ham_u32_t flags);/** * read a key */extern ham_status_tutil_read_key(ham_db_t *db, int_key_t *source, ham_key_t *dest, ham_u32_t flags);#ifdef __cplusplus} // extern "C"#endif #endif /* HAM_UTIL_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -