⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rootlib.h

📁 roots--一个轻量级的内存数据库系统。基于Hash Map的table设计。快速轻巧。
💻 H
字号:
/*
Copyright (c) 2003, Dan Kranz and Arnold Rom
All rights reserved.

Redistribution and use in source and binary forms, with or
without modification, are permitted provided that the following
conditions are met:

    * Redistributions of source code must retain the above
      copyright notice, this list of conditions and the following
      disclaimer.

    * Redistributions in binary form must reproduce the above
      copyright notice, this list of conditions and the following
      disclaimer in the documentation and/or other materials
      provided with the distribution.

    * The names of its contributors may not be used to endorse or
      promote products derived from this software without specific
      prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/*---------------------------------------------------------------------*/
/* Roots functions */
/*---------------------------------------------------------------------*/

extern int armrCompare(const void *el, const void *e2, size_t count, short type);
extern char *basename(const char *s);
extern void blkgen(void *block, long *cpl, long *bflds,
                   long *first, unsigned short *lnextl,
                   void *oblock, long *ocpl, long *online,
                   long *oflds, long *nf);
extern int BuildTableAndMap(BlockCplNline *buf, long *field,
                            DataBase *trgbas, short *tmaps, long bfis);
extern void bunpac(void *block, long *fields, long *array, long *nf);
extern void bunpacArray(void *block, long *fields, long *array,
                        long *nf);
extern void chcbd(long *array, void *block, long *fields, long *nf);
extern long chcdbf(void *block, long *fields, long *array, long *nf);
extern void chfld(void *block, long *cpl, long *fields, long *nf,
                  BYTE *c);
extern void chmove(void *source, long *sfld, void *dest, long *dfld,
                   long *nf);
extern void chsort(void *block, long *cpl, long *nline, long *sorti,
                   long *fields, long *nf);
extern void chtab(void *table, long *cpl, long *nline, void *string,
                  long *field, long *index);
extern void chtabf(void *table, long *cpl, long *nline, void *string,
                   long *field, long *index);
extern void clcbdr(double *darray, void *string, long *fields, long *nf,
                   long *pright, long *lblank);
extern long clcdbr(void *string, long *fields, double *darray, long *nf);
extern void comlst(long *nline, long *first, unsigned short *lnextl,
                   long *other);
extern void conlst(long *afirst, long *bfirst, unsigned short *lnextl);
extern void countl(long *first, unsigned short *lnextl, long *nline);
extern char* dat4cat(void *dest, long bin);
extern void date(long *day, long *month, long *year);
extern void delent(void *block, long *cpl, long *nline,
                   long *first, unsigned short *lnextl);
extern void FindRootsFile(char *path, char *fname);
extern void getime();
extern long grpcum(void *block, long *cpl, long *numfld,
                   unsigned short *lfrstg, unsigned short *lnextl,
                   long *ngroup, long *array);
extern long grplcm(void *block, long *cpl, long *numfld,
                   unsigned short *lfrstg, unsigned short *lnextl,
                   long *ngroup, double *array);
extern void idxmap(BYTE *block, long *cpl, long *xfld, long *first,
                   unsigned short *lnextl, unsigned short *map);
extern void idxone(BYTE *block, long *cpl, long *xfld, long *first,
                   unsigned short *lnextl, void *string);
extern void idxoneArray(void *block, long *cpl, long *xfld,
                        long *first, unsigned short *lnextl,
                        void *string);
extern void inxlst(BYTE *block, long *cpl, long *field,
                   long *first, unsigned short *lnextl,
                   unsigned short *lfrstg);
extern void inxlstArray(void *block, long *cpl, long *field,
                        long *first, unsigned short *lnextl,
                        unsigned short *lfrstg);
extern void laybit(void *string, long *bpl, long *fields, long *nf);
extern void layout(void *block, long *cpl, long *fields,
                   long *ftype, long *nf, BYTE *delim);
extern void lgmap(BYTE *block, long *cpl, long *nline, long *field,
                  long *rank);
extern void lgmove(void *source, long *scpl, long *sfld, void *dest,
                   long *dcpl, long *dfld, long *nline, BYTE *pad);
extern void list1(long *sorti, long *nline, long *first,
                  unsigned short *lnextl);
extern void locase(void *string, long *cpl);
extern void maplst(long *first, unsigned short *lnextl, long *lmapr,
                   long *nline);
extern void maptrn(void *block, long *cpl, long *field, long *first,
                   unsigned short *lnextl, unsigned short *map);
extern void mcolct(void *block, long *cpl, long *fields, long *nf,
                   long *first, unsigned short *lnextl,
                   unsigned short *lfrstg, long *ngroup);
extern int memoryCompare(const void *el, const void *e2, size_t count, short type);
extern void minmax(void *arg_block, long *cpl, long *field,
                   long *first, unsigned short *lnextl,
                   long *min, long *max);
extern BOOL mrsort(void *arg_block, long *cpl, long *nline,
                   long *sorti, long *fields, short *types, long *nf,
                   int (*compare)(const void *el, const void *e2,
                                  size_t count, short type));
extern void pacbin(long *array, BYTE *block, long *fields, long *nf);
extern void pacbinArray(long *array, void *block, long *fields,
                        long *nf);
extern void paclst(long *value, BYTE *block,
                   long *cpl, long *field, long *first,
                   unsigned short *lnextl);
extern void paclstArray(long *value, void *block, long *cpl, long *field,
                        long *first, unsigned short *lnextl);
extern void pacrel(double *darray, void *block, long *fields, long *nf);
extern void pcrlst(double *rvalue, void *block, long *cpl, long *field,
                   long *first, unsigned short *lnextl);
extern int ReadBlockFile(char *fn, BlockCplNline *file, long newcpl);
extern long ReadVirtualPrune(DataBase *db, long seq,
                             BlockCplNline *usernote);
extern void rgrprn(void *block, long *cpl, long *field, double *drange,
                   long *first, unsigned short *lnextl, long *match);
extern void rngprn(BYTE *block, long *cpl, long *field, long *range,
                   long *first, unsigned short *lnextl, long *match);
extern void rngprnArray(void *block, long *cpl, long *field, long *range,
                        long *first, unsigned short *lnextl, long *match);
extern void RootsError(char *fmt, ...);
extern void RootsMsgFlag(int onoff);
extern void RootsSOS(char *fmt, ...);
extern void runpac(void *block, long *fields, double *darray, long *nf);
extern void seqlst(long *nline, long *first, unsigned short *lnextl);
extern void seqmap(long *nline, unsigned short *map);
extern void setime();
extern void setone(void *block, long *fields, long *nf);
extern void setzer(void *block, long *fields, long *nf);
extern void slash(void *string, long *fields, long *nf);
extern void srmove(long *sorti, void *block, long *cpl, long *nline);
extern void strech(void *block, long *cpl, long *nline,
                   long *cplDelta, BYTE *pad);
extern void strprn(BYTE *block, long *cpl, long *field, void *string,
                   long *first, unsigned short *lnextl, long *match);
extern void strprnArray(void *block, long *cpl, long *field, void *string,
                        long *first, unsigned short *lnextl, long *match);
extern void sysenv();
extern int tableCompare(const void *s1, const void *s2, size_t len, short type);
extern void tablst(BYTE *block, long *cpl, long *field,
                   unsigned short *map, long *first,
                   unsigned short *lnextl, unsigned short *lfrstg,
                   unsigned short *llastg);
extern void tablstArray(void *block, long *cpl, long *field,
                        unsigned short *map, long *first,
                        unsigned short *lnextl, unsigned short *lfrstg,
                        unsigned short *llastg);
extern void txtprn(void *block, long *cpl, long *field, void *text,
                   long *tfield, long *first, unsigned short *lnextl,
                   long *match);
extern void upcase(void *string, long *cpl);
extern long WriteVirtualPrune(DataBase db, long seq, BYTE *bitmap,
                              BlockCplNline usernote);
extern void wsday(long *day, long *month, long *year, long *weekday,
                  long *serial);
extern void zerout(void *block, long *cpl);

⌨️ 快捷键说明

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