1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
|
/*
* Copyright (C) 1999-2001, Ian Main <imain@stemwinder.org>.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject
* to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#ifndef __ROY_H__
#define __ROY_H__
#include <stdio.h>
#include <string.h>
#include <roy/roy-config.h>
/* ANSI includes */
#include <stdlib.h>
#include <ctype.h>
#include <limits.h>
#ifdef RTHREAD_USING_PTHREADS
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#endif /* HAVE_PTHREAD_H */
#endif /* RTHREAD_USING_PTHREADS */
#ifdef RTHREAD_USING_PTH
#include <pth.h>
#endif /* RTHREAD_USING_PTH */
#ifdef HAVE_ERRNO_H
#include <errno.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif /* HAVE_UNISTD_H */
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
/*
* RCHUNK_ENABLED enables recylcing of memory chunks for speed.
* However, it's good to leave disabled if you wish to use gdb
* etc to look for memory related problems.
*/
#define RCHUNK_ENABLED 1
#if (SIZEOF_CHAR == 1)
typedef char rint8;
typedef unsigned char ruint8;
#elif (SIZEOF_SHORT_INT == 1)
typedef short int rint8;
typedef unsigned short int ruint8;
#endif
#if (SIZEOF_CHAR == 2)
typedef char rint16;
typedef unsigned char ruint16;
#elif (SIZEOF_SHORT_INT == 2)
typedef short int rint16;
typedef unsigned short int ruint16;
#elif (SIZEOF_INT == 2)
typedef int rint16;
typedef unsigned int ruint16;
#endif
#if (SIZEOF_INT == 4)
typedef int rint32;
typedef unsigned int ruint32;
#elif (SIZEOF_SHORT_INT == 4)
typedef short int rint32;
typedef unsigned short int ruint32;
#else
typedef long rint32;
typedef unsigned long ruint32;
#endif
#define RFOREACH_CLOSE } while (0)
#ifndef RMIN
#define RMIN(a,b) ((a)<(b)?(a):(b))
#endif
#ifndef RMAX
#define RMAX(a,b) ((a)<(b)?(b):(a))
#endif
#include <roy/rmem.h>
#include <roy/rthread.h>
#include <roy/rflag.h>
#include <roy/rlist.h>
#include <roy/rbucket.h>
#include <roy/rbuf.h>
#include <roy/rbuf_gzip.h>
#include <roy/rlist_of.h>
#include <roy/rchunk.h>
#include <roy/rhash.h>
#include <roy/rbhash.h>
#include <roy/rdebug.h>
#include <roy/rarray.h>
#include <roy/rstr.h>
#include <roy/rxp.h>
#include <roy/rargv.h>
#include <roy/rinit.h>
#include <roy/rcleanup.h>
#include <roy/rmisc.h>
#include <roy/rmain.h>
#include <roy/rtherml.h>
#include <roy/rmdbg.h>
#include <roy/rmdbg_interfaces.h>
#endif /* __ROY_H__ */
|