proto.h
来自「db.* (pronounced dee-be star) is an adva」· C头文件 代码 · 共 498 行 · 第 1/2 页
H
498 行
/*************************************************************************** * * * db.* * * open source database kernel * * * * Copyright (c) 2000 Centura Software Corporation. All rights reserved. * * * * Use of this software, whether in source code format, or in executable, * * binary object code form, is governed by the CENTURA OPEN SOURCE LICENSE * * which is fully described in the LICENSE.TXT file, included within this * * distribution of source code files. * * * * Except as provided herein, the contents of this file are subject to the * * Centura Open Source Public License Version 1.0 (the "License"); you may * * not use this file except in compliance with the License. A copy of the * * License will be provided to you by Club ITTIA. * * * * Software distributed under the License is distributed on an "AS IS" * * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * * License for the specific language governing rights and limitations * * under the License. * * * * The Original Code is db.linux version 1.0, released February 29, 2000. * * * * The Initial Developer of the Original Code is Centura Software * * Corporation. Portions created by Centura Software Corporation are * * Copyright (C) 1984-2000 Centura Software Corporation. All Rights * * Reserved. * * * * This file contains modifications to the Original Code made by ITTIA. * * This file may only be used in accordance with the ITTIA DB.* V.2 * * License Agreement which is available at WWW.ITTIA.COM. * * * **************************************************************************/#ifndef PROTO_H#define PROTO_H/* From dberr.c */void EXTERNAL_FCN dberr_msg(DB_TCHAR *, int, DB_TASK *);#ifdef DBERR_EX#define DBERR_FILE __FILE__#define DBERR_LINE __LINE__#else#define DBERR_FILE NULL#define DBERR_LINE 0#endifint EXTERNAL_FCN _dberr(int, char *, int, DB_TASK *);void EXTERNAL_FCN flush_dberr(DB_TASK *);#define dberr(n) _dberr(n, DBERR_FILE, DBERR_LINE, task)/* From alloc.c: *//* From dberr.c: */void INTERNAL_FCN dbautorec(DB_TASK *);/* From dblfcns.c: */int INTERNAL_FCN initdbt(const DB_TCHAR *, DB_TASK *);int INTERNAL_FCN alloc_table(void **, size_t, size_t, DB_TASK *);int INTERNAL_FCN free_table(void **, int, int, int, size_t, DB_TASK *);int INTERNAL_FCN recovery_check(DB_TASK *);/* From lockfcns.c: */int INTERNAL_FCN free_dblocks(int, DB_TASK *);void INTERNAL_FCN termfree(int, DB_TASK *);int INTERNAL_FCN neterr(void);int INTERNAL_FCN dupid_check(void);#ifdef DBSTAT/* From dbstat.c: */void sync_MEM_STATS(MEM_STATS *, MEM_STATS *);void sync_CACHE_STATS(CACHE_STATS *, CACHE_STATS *);void INTERNAL_FCN STAT_mem_alloc(PAGE_TABLE *cache, size_t size);void INTERNAL_FCN STAT_lookups(FILE_NO fno, DB_TASK *);void INTERNAL_FCN STAT_hits(FILE_NO fno, DB_TASK *);void INTERNAL_FCN STAT_pages(FILE_NO fno, short num, DB_TASK *);void INTERNAL_FCN STAT_file_open(FILE_NO fno, DB_TASK *);void INTERNAL_FCN STAT_pz_read(FILE_NO fno, size_t amt, DB_TASK *);void INTERNAL_FCN STAT_pz_write(FILE_NO fno, size_t amt, DB_TASK *);void INTERNAL_FCN STAT_pg_read(FILE_NO fno, size_t amt, DB_TASK *);void INTERNAL_FCN STAT_pg_write(FILE_NO fno, size_t amt, DB_TASK *);void INTERNAL_FCN STAT_rlb_read(FILE_NO fno, size_t amt, DB_TASK *);void INTERNAL_FCN STAT_rlb_write(FILE_NO fno, size_t amt, DB_TASK *);void INTERNAL_FCN STAT_new_page(FILE_NO fno, DB_TASK *);void INTERNAL_FCN STAT_log_open(DB_TASK *);void INTERNAL_FCN STAT_log_read(size_t amt, DB_TASK *);void INTERNAL_FCN STAT_log_write(size_t amt, DB_TASK *);void INTERNAL_FCN STAT_taf_open(DB_TASK *);void INTERNAL_FCN STAT_taf_read(size_t amt, DB_TASK *);void INTERNAL_FCN STAT_taf_write(size_t amt, DB_TASK *);void INTERNAL_FCN STAT_dbl_open(DB_TASK *);void INTERNAL_FCN STAT_dbl_read(size_t amt, DB_TASK *);void INTERNAL_FCN STAT_dbl_write(size_t amt, DB_TASK *);void INTERNAL_FCN STAT_max_open(int num, DB_TASK *);void INTERNAL_FCN STAT_trbegin(DB_TASK *);void INTERNAL_FCN STAT_trend(DB_TASK *);void INTERNAL_FCN STAT_trabort(DB_TASK *);void INTERNAL_FCN STAT_lock(FILE_NO fno, int type, DB_TASK *);/* Constants for use by STAT_lock() - they are offsets into the LOCK_STATS structure*/#define STAT_LOCK_r 0 /* r = read lock */#define STAT_LOCK_w 1 /* w = write lock */#define STAT_LOCK_x 2 /* x = exclusive lock */#define STAT_LOCK_R 3 /* R = record lock bit */#define STAT_LOCK_r2w 4#define STAT_LOCK_r2x 5#define STAT_LOCK_r2R 6#define STAT_LOCK_w2r 7#define STAT_LOCK_x2r 8#define STAT_LOCK_R2r 9#define STAT_FREE_r 10#define STAT_FREE_w 11#define STAT_FREE_x 12#define STAT_FREE_R 13#else#define sync_MEM_STATS(a, b) /**/#define sync_CACHE_STATS(a, b) /**/#define STAT_mem_alloc(a, b) /**/#define STAT_lookups(a, b) /**/#define STAT_hits(a, b) /**/#define STAT_pages(a, b, c) /**/#define STAT_file_open(a, b) /**/#define STAT_pz_read(a, b, c) /**/#define STAT_pz_write(a, b, c) /**/#define STAT_pg_read(a, b, c) /**/#define STAT_pg_write(a, b, c) /**/#define STAT_rlb_read(a, b, c) /**/#define STAT_rlb_write(a, b, c) /**/#define STAT_new_page(a, b) /**/#define STAT_log_open(a) /**/#define STAT_log_read(a, b) /**/#define STAT_log_write(a, b) /**/#define STAT_taf_open(a) /**/#define STAT_taf_read(a, b) /**/#define STAT_taf_write(a, b) /**/#define STAT_dbl_open(a) /**/#define STAT_dbl_read(a, b) /**/#define STAT_dbl_write(a, b) /**/#define STAT_max_open(a, b) /**/#define STAT_trbegin(a) /**/#define STAT_trend(a) /**/#define STAT_trabort(a) /**/#define STAT_lock(a, b, c) /**/#define STAT_send_msg(a, b, c, d) /**/#define STAT_recv_msg(a, b, c, d) /**/#endif /* DBSTAT *//* From dio.c: */int EXTERNAL_FCN dio_open(FILE_NO, DB_TASK *);int INTERNAL_FCN dio_closelru(DB_TASK *);int EXTERNAL_FCN dio_close(FILE_NO, DB_TASK *);int INTERNAL_FCN dio_init(DB_TASK *);void INTERNAL_FCN dio_free(int, DB_TASK *);int EXTERNAL_FCN dio_clear(int, DB_TASK *);int INTERNAL_FCN dio_clrfile(FILE_NO, DB_TASK *);int INTERNAL_FCN dio_clrpage(PAGE_ENTRY *, DB_TASK *);void INTERNAL_FCN dio_ixclear(DB_TASK *);int EXTERNAL_FCN dio_flush(DB_TASK *);int EXTERNAL_FCN dio_get(FILE_NO, F_ADDR, char **, int, DB_TASK *);int INTERNAL_FCN dio_touch(FILE_NO, F_ADDR, int, DB_TASK *);int EXTERNAL_FCN dio_unget(FILE_NO, F_ADDR, int, DB_TASK *);int EXTERNAL_FCN dio_read(DB_ADDR, char **, int, DB_TASK *);int EXTERNAL_FCN dio_write(DB_ADDR, int, DB_TASK *);int EXTERNAL_FCN dio_release(DB_ADDR, int, DB_TASK *);int INTERNAL_FCN dio_rrlb(DB_ADDR, short *, DB_TASK *);int INTERNAL_FCN dio_wrlb(DB_ADDR, short, DB_TASK *);int INTERNAL_FCN dio_findpg(FILE_NO, F_ADDR, PAGE_ENTRY**, PAGE_ENTRY**, DB_TASK *);int EXTERNAL_FCN dio_getpg(FILE_NO, F_ADDR, short, PAGE_ENTRY**, PAGE_ENTRY**, DB_TASK *);int INTERNAL_FCN dio_out(PAGE_ENTRY *, DB_TASK *);int INTERNAL_FCN dio_in(PAGE_ENTRY *, DB_TASK *);DB_ULONG INTERNAL_FCN dio_pzsetts(FILE_NO, DB_TASK *);DB_ULONG INTERNAL_FCN dio_pzgetts(FILE_NO, DB_TASK *);int EXTERNAL_FCN dio_pzinit(DB_TASK *);int EXTERNAL_FCN dio_pzread(FILE_NO, DB_TASK *);int EXTERNAL_FCN dio_pzalloc(FILE_NO, F_ADDR *, DB_TASK *);int EXTERNAL_FCN dio_pzdel(FILE_NO, F_ADDR, DB_TASK *);F_ADDR EXTERNAL_FCN dio_pznext(FILE_NO, DB_TASK *);F_ADDR INTERNAL_FCN dio_pages(FILE_NO, DB_TASK *);void INTERNAL_FCN dio_pzclr(DB_TASK *);#ifdef DB_DEBUGint INTERNAL_FCN dio_pzcheck(FILE_NO, DB_TASK *);off_t INTERNAL_FCN dio_filesize(FILE_NO, DB_TASK *);#endif /* DB_DEBUG */int EXTERNAL_FCN dio_readfile(FILE_NO, off_t, void *, size_t, DB_ULONG, int *, DB_TASK *);int EXTERNAL_FCN dio_writefile(FILE_NO, off_t, void *, size_t, DB_ULONG, DB_TASK *);#ifdef DB_DEBUGint INTERNAL_FCN check_cache(DB_TCHAR *, DB_TASK *);#endif /* DB_DEBUG *//* From inifile.c */int INTERNAL_FCN initFromIniFile(DB_TASK *);/* From inittab.c: */int INTERNAL_FCN inittab(DB_TASK *, const SG *, const DB_SCHEMA *);int EXTERNAL_FCN alloc_dict(DB_TASK *, const SG *);/* From keyfcns.c: */int EXTERNAL_FCN key_open(DB_TASK *);void INTERNAL_FCN key_close(int, DB_TASK *);int EXTERNAL_FCN key_init(int, DB_TASK *);int INTERNAL_FCN key_reset(FILE_NO, DB_TASK *);int EXTERNAL_FCN key_locpos(const char *, DB_ADDR *, DB_TASK *);int EXTERNAL_FCN key_scan(int, DB_ADDR *, DB_TASK *);int EXTERNAL_FCN key_boundary(int, DB_ADDR *, DB_TASK *);int EXTERNAL_FCN key_insert(int, const char *, DB_ADDR, DB_TASK *);int INTERNAL_FCN key_delete(int, const char *, DB_ADDR, DB_TASK *);int EXTERNAL_FCN key_bldcom(int, char *, char *, int, DB_TASK *);void INTERNAL_FCN key_cmpcpy(char *, char *, short);void INTERNAL_FCN key_acpy(char *, char *, short);void INTERNAL_FCN key_wacpy(wchar_t *, wchar_t *, short);/* From libfcns.c: */int INTERNAL_FCN nset_check(int, int *, SET_ENTRY **, DB_TASK *);int INTERNAL_FCN nfld_check(long, int *, int *, RECORD_ENTRY **, FIELD_ENTRY **, DB_TASK *);int INTERNAL_FCN nrec_check(int, int *, RECORD_ENTRY **, DB_TASK *);int EXTERNAL_FCN fldcmp(FIELD_ENTRY *, const char *, const char *, DB_TASK *);int INTERNAL_FCN SHORTcmp(const char *, const char *);int EXTERNAL_FCN ADDRcmp(const DB_ADDR *, const DB_ADDR *);int INTERNAL_FCN null_dba(const DB_ADDR);int INTERNAL_FCN check_dba(DB_ADDR, DB_TASK *);int INTERNAL_FCN ctblcmp(const unsigned char *, const unsigned char *, int, DB_TASK *);DB_TCHAR *INTERNAL_FCN vstrnzcpy(DB_TCHAR *, const DB_TCHAR *, size_t);/* From makenew.c: */int INTERNAL_FCN sk_free(DB_TASK *);/* From opens.c: */PSP_FH EXTERNAL_FCN open_b(const DB_TCHAR *, unsigned int, unsigned short, DB_TASK *);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?