Skip to content
Newer
Older
100644 128 lines (110 sloc) 2.48 KB
759ae2c Initial restoration.
Darren Hiebert authored Nov 2, 2001
1 /*
2 * $Id$
3 *
270e2e4 Removed CYGWIN environment header file.
Darren Hiebert authored Apr 1, 2003
4 * Copyright (c) 1998-2003, Darren Hiebert
759ae2c Initial restoration.
Darren Hiebert authored Nov 2, 2001
5 *
6 * This source code is released for free distribution under the terms of the
7 * GNU General Public License.
8 *
9 * Provides the general (non-ctags-specific) environment assumed by all.
10 */
11 #ifndef _GENERAL_H
12 #define _GENERAL_H
13
14 /*
15 * INCLUDE FILES
16 */
69717d1 Cleaned up defines.
Darren Hiebert authored Mar 29, 2003
17 #if defined (HAVE_CONFIG_H)
759ae2c Initial restoration.
Darren Hiebert authored Nov 2, 2001
18 # include <config.h>
69717d1 Cleaned up defines.
Darren Hiebert authored Mar 29, 2003
19 #elif defined (AMIGA)
9f86105 Moved non-configure-script environment configurations into separate f…
Darren Hiebert authored Mar 8, 2002
20 # include "e_amiga.h"
69717d1 Cleaned up defines.
Darren Hiebert authored Mar 29, 2003
21 #elif defined (DJGPP)
9f86105 Moved non-configure-script environment configurations into separate f…
Darren Hiebert authored Mar 8, 2002
22 # include "e_djgpp.h"
69717d1 Cleaned up defines.
Darren Hiebert authored Mar 29, 2003
23 #elif defined (macintosh)
9f86105 Moved non-configure-script environment configurations into separate f…
Darren Hiebert authored Mar 8, 2002
24 # include "e_mac.h"
69717d1 Cleaned up defines.
Darren Hiebert authored Mar 29, 2003
25 #elif defined (MSDOS) || defined (WIN32)
9f86105 Moved non-configure-script environment configurations into separate f…
Darren Hiebert authored Mar 8, 2002
26 # include "e_msoft.h"
69717d1 Cleaned up defines.
Darren Hiebert authored Mar 29, 2003
27 #elif defined (OS2)
9f86105 Moved non-configure-script environment configurations into separate f…
Darren Hiebert authored Mar 8, 2002
28 # include "e_os2.h"
69717d1 Cleaned up defines.
Darren Hiebert authored Mar 29, 2003
29 #elif defined (QDOS)
9f86105 Moved non-configure-script environment configurations into separate f…
Darren Hiebert authored Mar 8, 2002
30 # include "e_qdos.h"
69717d1 Cleaned up defines.
Darren Hiebert authored Mar 29, 2003
31 #elif defined (RISCOS)
9f86105 Moved non-configure-script environment configurations into separate f…
Darren Hiebert authored Mar 8, 2002
32 # include "e_riscos.h"
69717d1 Cleaned up defines.
Darren Hiebert authored Mar 29, 2003
33 #elif defined (__vms) || defined (VMS)
9f86105 Moved non-configure-script environment configurations into separate f…
Darren Hiebert authored Mar 8, 2002
34 # include "e_vms.h"
69717d1 Cleaned up defines.
Darren Hiebert authored Mar 29, 2003
35 # ifndef VMS
36 # define VMS 1
37 # endif
759ae2c Initial restoration.
Darren Hiebert authored Nov 2, 2001
38 #endif
39
40
9f86105 Moved non-configure-script environment configurations into separate f…
Darren Hiebert authored Mar 8, 2002
41 /*
42 * MACROS
43 */
44
45 /* Define standard error destination
46 */
47 #ifndef errout
48 # define errout stderr
49 #endif
50
759ae2c Initial restoration.
Darren Hiebert authored Nov 2, 2001
51 /* Define regex if supported */
402a1c3 Removed test of obsolete macro.
Darren Hiebert authored Feb 24, 2002
52 #if (defined (HAVE_REGCOMP) && !defined (REGCOMP_BROKEN))
759ae2c Initial restoration.
Darren Hiebert authored Nov 2, 2001
53 # define HAVE_REGEX 1
54 #endif
55
9f86105 Moved non-configure-script environment configurations into separate f…
Darren Hiebert authored Mar 8, 2002
56 /* This is a helpful internal feature of later versions (> 2.7) of GCC
57 * to prevent warnings about unused variables.
58 */
550fdcd Enabled Gnu warning suppression macros for GCC on Mac OS X.
Darren Hiebert authored May 3, 2007
59 #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) && !defined (__GNUG__)
edf593f Reformatted code for independence of tab stop setting.
Darren Hiebert authored May 30, 2006
60 # define __unused__ __attribute__((unused))
9f86105 Moved non-configure-script environment configurations into separate f…
Darren Hiebert authored Mar 8, 2002
61 # define __printf__(s,f) __attribute__((format (printf, s, f)))
62 #else
63 # define __unused__
64 # define __printf__(s,f)
65 #endif
66
759ae2c Initial restoration.
Darren Hiebert authored Nov 2, 2001
67 /*
2071a37 Fixed portability problems discovered on Win32.
Darren Hiebert authored Jul 11, 2002
68 * Portability macros
69 */
70 #if !defined(HAVE_STRCASECMP) && !defined(strcasecmp)
71 # ifdef HAVE_STRICMP
72 # define strcasecmp(s1,s2) stricmp(s1,s2)
73 # else
74 # define strcasecmp(s1,s2) struppercmp(s1,s2)
75 # endif
76 #endif
77
78 #if !defined(HAVE_STRNCASECMP) && !defined(strncasecmp)
79 # ifdef HAVE_STRNICMP
80 # define strncasecmp(s1,s2,n) strnicmp(s1,s2,n)
81 # else
82 # define strncasecmp(s1,s2,n) strnuppercmp(s1,s2,n)
83 # endif
84 #endif
85
86 /*
759ae2c Initial restoration.
Darren Hiebert authored Nov 2, 2001
87 * DATA DECLARATIONS
88 */
89
90 #undef FALSE
91 #undef TRUE
92 #ifdef VAXC
93 typedef enum { FALSE, TRUE } booleanType;
94 typedef int boolean;
95 #else
2c30eb5 Made code compilable by a C++ compiler.
Darren Hiebert authored Dec 16, 2001
96 # ifdef __cplusplus
97 typedef bool boolean;
98 #define FALSE false
99 #define TRUE true
100 # else
759ae2c Initial restoration.
Darren Hiebert authored Nov 2, 2001
101 typedef enum { FALSE, TRUE } boolean;
2c30eb5 Made code compilable by a C++ compiler.
Darren Hiebert authored Dec 16, 2001
102 # endif
759ae2c Initial restoration.
Darren Hiebert authored Nov 2, 2001
103 #endif
104
105 #if ! defined (HAVE_FGETPOS) && ! defined (fpos_t)
106 # define fpos_t long
107 #endif
108
109 /*
110 * FUNCTION PROTOTYPES
111 */
112
113 #if defined (NEED_PROTO_REMOVE) && defined (HAVE_REMOVE)
114 extern int remove (const char *);
115 #endif
116
117 #if defined (NEED_PROTO_UNLINK) && ! defined (HAVE_REMOVE)
118 extern void *unlink (const char *);
119 #endif
120
121 #ifdef NEED_PROTO_GETENV
122 extern char *getenv (const char *);
123 #endif
124
edf593f Reformatted code for independence of tab stop setting.
Darren Hiebert authored May 30, 2006
125 #endif /* _GENERAL_H */
759ae2c Initial restoration.
Darren Hiebert authored Nov 2, 2001
126
edf593f Reformatted code for independence of tab stop setting.
Darren Hiebert authored May 30, 2006
127 /* vi:set tabstop=4 shiftwidth=4: */
Something went wrong with that request. Please try again.