Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members

general.h

00001 /*
00002 *   $Id: general_8h-source.html,v 1.11 2004/05/02 16:58:47 heicom Exp $
00003 *
00004 *   Copyright (c) 1998-2003, Darren Hiebert
00005 *
00006 *   This source code is released for free distribution under the terms of the
00007 *   GNU General Public License.
00008 *
00009 *   Provides the general (non-ctags-specific) environment assumed by all.
00010 */
00011 #ifndef _GENERAL_H
00012 #define _GENERAL_H
00013 
00014 /*
00015 *   INCLUDE FILES
00016 */
00017 #if defined (HAVE_CONFIG_H)
00018 # include <config.h>
00019 #elif defined (AMIGA)
00020 # include "e_amiga.h"
00021 #elif defined (DJGPP)
00022 # include "e_djgpp.h"
00023 #elif defined (macintosh)
00024 # include "e_mac.h"
00025 #elif defined (MSDOS) || defined (WIN32)
00026 # include "e_msoft.h"
00027 #elif defined (OS2)
00028 # include "e_os2.h"
00029 #elif defined (QDOS)
00030 # include "e_qdos.h"
00031 #elif defined (RISCOS)
00032 # include "e_riscos.h"
00033 #elif defined (__vms) || defined (VMS)
00034 # include "e_vms.h"
00035 # ifndef VMS
00036 #  define VMS 1
00037 # endif
00038 #endif
00039 
00040 
00041 /*
00042 *   MACROS
00043 */
00044 
00045 /* Define standard error destination
00046  */
00047 #ifndef errout
00048 # define errout stderr
00049 #endif
00050 
00051 /* Define regex if supported */
00052 #if (defined (HAVE_REGCOMP) && !defined (REGCOMP_BROKEN))
00053 # define HAVE_REGEX 1
00054 #endif
00055 
00056 /*  This is a helpful internal feature of later versions (> 2.7) of GCC
00057  *  to prevent warnings about unused variables.
00058  */
00059 #if (__GNUC__ > 2  ||  (__GNUC__ == 2  &&  __GNUC_MINOR__ >= 7)) && !(defined (__APPLE_CC__) || defined (__GNUG__))
00060 # define __unused__ __attribute__((unused))
00061 # define __printf__(s,f)  __attribute__((format (printf, s, f)))
00062 #else
00063 # define __unused__
00064 # define __printf__(s,f)
00065 #endif
00066 
00067 /*
00068  *  Portability macros
00069  */
00070 #if !defined(HAVE_STRCASECMP) && !defined(strcasecmp)
00071 # ifdef HAVE_STRICMP
00072 #  define strcasecmp(s1,s2) stricmp(s1,s2)
00073 # else
00074 #  define strcasecmp(s1,s2) struppercmp(s1,s2)
00075 # endif
00076 #endif
00077 
00078 #if !defined(HAVE_STRNCASECMP) && !defined(strncasecmp)
00079 # ifdef HAVE_STRNICMP
00080 #  define strncasecmp(s1,s2,n) strnicmp(s1,s2,n)
00081 # else
00082 #  define strncasecmp(s1,s2,n) strnuppercmp(s1,s2,n)
00083 # endif
00084 #endif
00085 
00086 /*
00087 *   DATA DECLARATIONS
00088 */
00089 
00090 #undef FALSE
00091 #undef TRUE
00092 #ifdef VAXC
00093 typedef enum { FALSE, TRUE } booleanType;
00094 typedef int boolean;
00095 #else
00096 # ifdef __cplusplus
00097 typedef bool boolean;
00098 #define FALSE false
00099 #define TRUE true
00100 # else
00101 typedef enum { FALSE, TRUE } boolean;
00102 # endif
00103 #endif
00104 
00105 #if ! defined (HAVE_FGETPOS) && ! defined (fpos_t)
00106 # define fpos_t long
00107 #endif
00108 
00109 /*
00110 *   FUNCTION PROTOTYPES
00111 */
00112 
00113 #if defined (NEED_PROTO_REMOVE) && defined (HAVE_REMOVE)
00114 extern int remove (const char *);
00115 #endif
00116 
00117 #if defined (NEED_PROTO_UNLINK) && ! defined (HAVE_REMOVE)
00118 extern void *unlink (const char *);
00119 #endif
00120 
00121 #ifdef NEED_PROTO_GETENV
00122 extern char *getenv (const char *);
00123 #endif
00124 
00125 #endif  /* _GENERAL_H */
00126 
00127 /* vi:set tabstop=8 shiftwidth=4: */

Generated on Sun May 2 20:02:57 2004 by doxygen 1.3.2