db.star.h

来自「db.* (pronounced dee-be star) is an adva」· C头文件 代码 · 共 414 行 · 第 1/2 页

H
414
字号
/*************************************************************************** *                                                                         * * 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 DB_STAR_H#define DB_STAR_H#include "psp.h"#define MULTI_TAFFILE/*    Unicode Definitions:    UNICODE    Defining this symbol causes all db.*'s internal string handling,    e.g. filenames, user id, lock manager name etc, to be done with    widechar strings.    On Unix systems there is not much point in defining UNICODE,    as all disk I/O and network protocol functions take single-byte    character strings as arguments. Thus db.* must convert any Unicode    strings to single-byte strings before calling these functions.    Unicode strings require more memory (on Unix, four times as much)    as single-byte strings.    UNICODE_DATA    Defining this symbol enables support for widechar data fields.    Support for Unicode fields does not require db.* library to be    compiled with UNICODE defined (i.e. Unicode fields can still be    handled even if internal string manipulation is ANSI / ascii).*/#ifdef QNX#if defined(__UNICODE__) || defined(_UNICODE)#define UNICODE#endif#endif /* QNX *//* ======================================================================== *//* Status Codes                                                             *//* ======================================================================== *//*    User errors*/#define S_USER_FIRST       -1    /* first user err */#define S_DBOPEN           -1    /* database not opened */#define S_INVSET           -2    /* invalid set */#define S_INVREC           -3    /* invalid record */#define S_INVDB            -4    /* invalid database */#define S_INVFLD           -5    /* invalid field name */#define S_INVADDR          -6    /* invalid db_address */#define S_NOCR             -7    /* no current record */#define S_NOCO             -8    /* set has no current owner */#define S_NOCM             -9    /* set has no current member */#define S_KEYREQD          -10   /* key value required */#define S_BADTYPE          -11   /* invalid lock type */#define S_HASMEM           -12   /* record is owner of non-empty set(s) */#define S_ISMEM            -13   /* record is member of set(s) */#define S_ISOWNED          -14   /* member already owned */#define S_ISCOMKEY         -15   /* field is a compound key */#define S_NOTCON           -16   /* record not connected to set */#define S_NOTKEY           -17   /* field is not a valid key */#define S_INVOWN           -18   /* record not legal owner of set */#define S_INVMEM           -19   /* record not legal member of set */#define S_SETPAGES         -20   /* error in d_setpages (database open or bad param) */#define S_INCOMPAT         -21   /* incompatible dictionary file */#define S_DELSYS           -22   /* illegal attempt to delete system record */#define S_NOTFREE          -23   /* attempt to lock previously locked rec or set */#define S_NOTLOCKED        -24   /* attempt to access unlocked record or set */#define S_TRANSID          -25   /* transaction id not be supplied */#define S_TRACTIVE         -26   /* transaction already active */#define S_TRNOTACT         -27   /* transaction not currently active */#define S_BADPATH          -28   /* the directory string is invalid */#define S_TRFREE           -29   /* attempt to free a lock inside a transaction */#define S_RECOVERY         -30   /* Auto-recovery is about to occur */#define S_NOTRANS          -31   /* attempted update outside of transaction */#define S_EXCLUSIVE        -32   /* functions requires exclusive db access */#define S_STATIC           -33   /* Attempted to write lock a static file */#define S_USERID           -34   /* No user id exists */#define S_NAMELEN          -35   /* database file/path name too long */#define S_RENAME           -36   /* invalid file number passed to d_renfile */#define S_NOTOPTKEY        -37   /* field is not an optional key */#define S_BADFIELD         -38   /* field not defined in current record type */#define S_COMKEY           -39   /* record/field has/in a compound key */#define S_INVNUM           -40   /* invalid record or set number */#define S_TIMESTAMP        -41   /* record or set not timestamped */#define S_BADUSERID        -42   /* invalid user id - not alphanumeric *//* -43 */#define S_INVENCRYPT       -44   /* Invalid encryption key *//* -45 */#define S_NOTYPE           -46   /* No current record type */#define S_INVSORT          -47   /* Invalid country table sort string */#define S_DBCLOSE          -48   /* database not closed */#define S_INVPTR           -49   /* invalid pointer */#define S_INVID            -50   /* invalid internal ID */#define S_INVLOCK          -51   /* invalid lockmgr communication type */#define S_INVTASK          -52   /* invalid task id */#define S_NOLOCKCOMM       -53   /* must call d_lockcomm() before d_open() */#define S_NOTIMPLEMENTED   -54  #define S_USER_LAST        -54   /* last user error *//*    System errors*/#define S_SYSTEM_FIRST     -900  /* first system error */#define S_NOSPACE          -900  /* out of disk space */#define S_SYSERR           -901  /* system error */#define S_FAULT            -902  /* page fault -- too many locked pages */#define S_NOWORK           -903  /* cannot access dbQuery dictionary */#define S_NOMEMORY         -904  /* unable to allocate sufficient memory */#define S_NOFILE           -905  /* unable to locate a file */#define S_DBLACCESS        -906  /* unable to open lfg, taf, dbl or log file */#define S_DBLERR           -907  /* TAF or DBL I/O error */#define S_BADLOCKS         -908  /* inconsistent database locks */#define S_RECLIMIT         -909  /* file record limit reached */#define S_KEYERR           -910  /* key file inconsistency detected *//* -911 */#define S_FSEEK            -912  /* Bad seek on database file */#define S_LOGIO            -913  /* error reading/writing log file */#define S_BADREAD          -914  /* Bad read on database/overflow file */#define S_NETSYNC          -915  /* Network synchronization error */#define S_DEBUG            -916  /* Debugging check interrupt */#define S_NETERR           -917  /* Network communications error *//* -918 */#define S_BADWRITE         -919  /* Bad write on database/overflow file */#define S_NOLOCKMGR        -920  /* Unable to open lockmgr session */#define S_DUPUSERID        -921  /* DBUSERID is already used by someone else */#define S_LMBUSY           -922  /* The lock manager table(s) are full */#define S_DISCARDED        -923  /* attempt to lock discarded memory *//* -924 */#define S_LMCERROR         -925  /* Network layer error code *//* -926 *//* -927 *//* -928 *//* -929 *//* -930 *//* -931 *//* -932 *//* -933 *//* -934 */#define S_TAFCREATE        -935  /* failed to create taf file  *//* -936 *//* -937 *//* -938 */#define S_READONLY         -939  /* d_on_opt(READONLY), unable to update file */#define S_EACCESS          -940  /* sharing violation, file in use *//* -941 *//* -942 */#define S_RECFAIL          -943  /* automatic recovery failed */#define S_TAFSYNC          -944  /* TAF file not consistant with LMC */#define S_TAFLOCK          -945  /* Failed to lock taf file *//* -946 */#define S_REENTER          -947  /* db.* entered re-entrantly */#define S_SYSTEM_LAST      -947  /* last system error *//*    Internal system errors*/#define S_INTERNAL_FIRST   -9001 /* first internal error *//* -9001 *//* -9002 */#define SYS_BADTREE        -9003 /* b-tree malformed */#define SYS_KEYEXIST       -9004 /* key value already exists *//* -9005 */#define SYS_LOCKARRAY      -9006 /* lock packet array exceeded *//* -9007 */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?