1 /*********************************************************************** 2 * * 3 * This software is part of the ast package * 4 * Copyright (c) 2003-2011 AT&T Intellectual Property * 5 * and is licensed under the * 6 * Eclipse Public License, Version 1.0 * 7 * by AT&T Intellectual Property * 8 * * 9 * A copy of the License is available at * 10 * http://www.eclipse.org/org/documents/epl-v10.html * 11 * (with md5 checksum b35adb5213ca9657e911e9befb180842) * 12 * * 13 * Information and Software Systems Research * 14 * AT&T Research * 15 * Florham Park NJ * 16 * * 17 * Phong Vo <kpv@research.att.com> * 18 * * 19 ***********************************************************************/ 20 #ifndef _VCHDR_H 21 #define _VCHDR_H 1 22 23 #if _PACKAGE_ast 24 #include <ast.h> 25 #endif 26 27 #define _VCODEX_PRIVATE \ 28 Vcbuffer_t* list; /* allocated buffers */ \ 29 unsigned int busy; /* total buffer size */ \ 30 unsigned int nbuf; /* number of buffers */ 31 32 #include "vcodex.h" 33 34 #ifdef VMFL 35 #include <vmalloc.h> 36 #endif 37 38 #include <ctype.h> 39 #include <stdlib.h> 40 #include <string.h> 41 42 #if _sys_times 43 #include <sys/times.h> 44 #endif 45 #if _hdr_unistd 46 #include <unistd.h> 47 #endif 48 #if __STD_C 49 #include <stdarg.h> 50 #else 51 #include <varargs.h> 52 #endif 53 54 #if !_PACKAGE_ast && _WIN32 /* to do binary I/O on Windows */ 55 #include <fcntl.h> 56 #include <io.h> 57 #ifndef _O_BINARY 58 #define _O_BINARY 0x8000 59 #endif 60 #ifndef O_BINARY 61 #define O_BINARY _O_BINARY 62 #endif 63 #endif /*!_PACKAGE_ast && _WIN32*/ 64 65 #include <debug.h> 66 67 #ifndef NIL 68 #define NIL(type) ((type)0) 69 #endif 70 71 #ifndef reg 72 #define reg register 73 #endif 74 75 #ifdef isblank 76 #undef isblank 77 #endif 78 #define isblank(c) ((c) == ' ' || (c) == '\t') 79 80 #define TYPECAST(tp,p) ((tp)((unsigned long)(p))) 81 82 #define RL_ESC 255 /* default escape character */ 83 #define RL_ZERO 254 /* (0,RL_ZERO) codes 0-runs */ 84 #define RL_ONE 253 /* (1,RL_ONE) codes 1-runs */ 85 86 _BEGIN_EXTERNS_ 87 extern ssize_t _vcrle2coder _ARG_((Vcodex_t*, ssize_t, 88 Vcchar_t*, ssize_t, 89 Vcchar_t*, ssize_t, 90 Vcchar_t**, ssize_t)); 91 92 extern Vcmtarg_t* _vcmtarg _ARG_((Vcmtarg_t*, char*, char*, ssize_t)); 93 94 extern Void_t* memcpy _ARG_((Void_t*, const Void_t*, size_t)); 95 extern Void_t* malloc _ARG_((size_t)); 96 extern Void_t* realloc _ARG_((Void_t*, size_t)); 97 extern Void_t* calloc _ARG_((size_t, size_t)); 98 extern void free _ARG_((Void_t*)); 99 _END_EXTERNS_ 100 101 #endif /*_VCHDR_H*/ 102