Doxygen Source Code Documentation
general.h
Go to the documentation of this file.00001 /*===========================================================================* 00002 * general.h * 00003 * * 00004 * very general stuff * 00005 * * 00006 *===========================================================================*/ 00007 00008 /* 00009 * Copyright (c) 1995 The Regents of the University of California. 00010 * All rights reserved. 00011 * 00012 * Permission to use, copy, modify, and distribute this software and its 00013 * documentation for any purpose, without fee, and without written agreement is 00014 * hereby granted, provided that the above copyright notice and the following 00015 * two paragraphs appear in all copies of this software. 00016 * 00017 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR 00018 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT 00019 * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF 00020 * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00021 * 00022 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 00023 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 00024 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS 00025 * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO 00026 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 00027 */ 00028 00029 /* 00030 * $Header: /misc/elrond0/share/cvs/AFNI/src/mpeg_encodedir/headers/general.h,v 1.5 2004/04/02 15:12:41 rwcox Exp $ 00031 * $Log: general.h,v $ 00032 * Revision 1.5 2004/04/02 15:12:41 rwcox 00033 * Cput 00034 * 00035 * Revision 1.4 2004/02/05 21:32:23 rwcox 00036 * Cput 00037 * 00038 * Revision 1.3 2003/12/23 13:50:08 rwcox 00039 * Cput 00040 * 00041 * Revision 1.2 2003/12/03 14:46:15 rwcox 00042 * Cput 00043 * 00044 * Revision 1.1 2001/12/17 18:25:44 rwcox 00045 * Cadd 00046 * 00047 * Revision 1.7 1995/08/04 23:34:13 smoot 00048 * jpeg5 changed the silly HAVE_BOOLEAN define.... 00049 * 00050 * Revision 1.6 1995/01/19 23:54:49 eyhung 00051 * Changed copyrights 00052 * 00053 * Revision 1.5 1994/11/12 02:12:48 keving 00054 * nothing 00055 * 00056 * Revision 1.4 1993/07/22 22:24:23 keving 00057 * nothing 00058 * 00059 * Revision 1.3 1993/07/09 00:17:23 keving 00060 * nothing 00061 * 00062 * Revision 1.2 1993/06/03 21:08:53 keving 00063 * nothing 00064 * 00065 * Revision 1.1 1993/02/22 22:39:19 keving 00066 * nothing 00067 * 00068 */ 00069 00070 00071 #ifndef GENERAL_INCLUDED 00072 #define GENERAL_INCLUDED 00073 00074 00075 /* prototypes for library procedures 00076 * 00077 * if your /usr/include headers do not have these, then pass -DMISSING_PROTOS 00078 * to your compiler 00079 * 00080 */ 00081 #ifdef MISSING_PROTOS 00082 int fprintf(); 00083 int fwrite(); 00084 int fread(); 00085 int fflush(); 00086 int fclose(); 00087 00088 int sscanf(); 00089 int bzero(); 00090 int bcopy(); 00091 int system(); 00092 int time(); 00093 int perror(); 00094 00095 int socket(); 00096 int bind(); 00097 int listen(); 00098 int accept(); 00099 int connect(); 00100 int close(); 00101 int read(); 00102 int write(); 00103 00104 int pclose(); 00105 00106 #endif 00107 00108 00109 /*===========* 00110 * CONSTANTS * 00111 *===========*/ 00112 00113 #ifndef NULL 00114 #define NULL 0 00115 #endif 00116 00117 #ifndef TRUE 00118 #define TRUE 1 00119 #define FALSE 0 00120 #endif 00121 00122 #define SPACE ' ' 00123 #define TAB '\t' 00124 #define SEMICOLON ';' 00125 #define NULL_CHAR '\0' 00126 #define NEWLINE '\n' 00127 00128 00129 /*==================* 00130 * TYPE DEFINITIONS * 00131 *==================*/ 00132 00133 typedef int boolean; 00134 /* this is for JPEG stuff */ 00135 #define BOOLEAN_DEFINED 00136 #define HAVE_BOOLEAN 00137 00138 typedef unsigned char uint8; 00139 typedef char int8; 00140 typedef unsigned short uint16; 00141 typedef short int16; 00142 00143 /* LONG_32 should only be defined iff 00144 * 1) long's are 32 bits and 00145 * 2) int's are not 00146 */ 00147 #ifdef LONG_32 00148 typedef unsigned long uint32; 00149 typedef long int32; 00150 #else 00151 typedef unsigned int uint32; 00152 typedef int int32; 00153 #endif 00154 00155 00156 /*========* 00157 * MACROS * 00158 *========*/ 00159 00160 #undef max 00161 #define max(a,b) ((a) > (b) ? (a) : (b)) 00162 #undef min 00163 #define min(a,b) ((a) < (b) ? (a) : (b)) 00164 #undef abs 00165 #define abs(a) ((a) >= 0 ? (a) : -(a)) 00166 00167 00168 #endif