/[MITgcm]/MITgcm/tools/cyrus-imapd-makedepend/def.h
ViewVC logotype

Contents of /MITgcm/tools/cyrus-imapd-makedepend/def.h

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download)
Thu May 6 14:50:09 2004 UTC (19 years, 10 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, mitgcm_mapl_00, checkpoint53d_post, checkpoint58u_post, checkpoint58w_post, checkpoint54a_pre, checkpoint57m_post, checkpoint55c_post, checkpoint54e_post, checkpoint57s_post, checkpoint54a_post, checkpoint53c_post, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint60, checkpoint61, checkpoint57b_post, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint55h_post, checkpoint58n_post, checkpoint53b_post, checkpoint58x_post, checkpoint57g_pre, checkpoint54b_post, checkpoint53b_pre, checkpoint55b_post, checkpoint58t_post, checkpoint58h_post, checkpoint54d_post, checkpoint56c_post, checkpoint57y_pre, checkpoint55, checkpoint53a_post, checkpoint57f_pre, checkpoint57a_post, checkpoint54, checkpoint58q_post, checkpoint54f_post, checkpoint57v_post, checkpoint59q, checkpoint59p, checkpoint55g_post, checkpoint59r, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint58f_post, checkpoint53g_post, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint57c_post, checkpoint58y_post, checkpoint55e_post, checkpoint58k_post, checkpoint58v_post, checkpoint53f_post, checkpoint55a_post, checkpoint53d_pre, checkpoint54c_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint57j_post, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post, checkpoint55d_post
Changes since 1.3: +2 -2 lines
File MIME type: text/plain
 o increase MAXFILES to 8192 so that we don't fail for some of the
   verification tests on "slough.mit.edu"

1 /* $XConsortium: def.h,v 1.25 94/04/17 20:10:33 gildea Exp $ */
2
3 /*
4 * Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
16 * distribution.
17 *
18 * 3. The name "Carnegie Mellon University" must not be used to
19 * endorse or promote products derived from this software without
20 * prior written permission. For permission or any other legal
21 * details, please contact
22 * Office of Technology Transfer
23 * Carnegie Mellon University
24 * 5000 Forbes Avenue
25 * Pittsburgh, PA 15213-3890
26 * (412) 268-4387, fax: (412) 268-7395
27 * tech-transfer@andrew.cmu.edu
28 *
29 * 4. Redistributions of any form whatsoever must retain the following
30 * acknowledgment:
31 * "This product includes software developed by Computing Services
32 * at Carnegie Mellon University (http://www.cmu.edu/computing/)."
33 *
34 * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
35 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
36 * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
37 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
38 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
39 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
40 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
41 *
42 */
43 /*
44
45 Copyright (c) 1993, 1994 X Consortium
46
47 Permission is hereby granted, free of charge, to any person obtaining a copy
48 of this software and associated documentation files (the "Software"), to deal
49 in the Software without restriction, including without limitation the rights
50 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
51 copies of the Software, and to permit persons to whom the Software is
52 furnished to do so, subject to the following conditions:
53
54 The above copyright notice and this permission notice shall be included in
55 all copies or substantial portions of the Software.
56
57 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
58 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
59 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
60 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
61 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
62 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
63
64 Except as contained in this notice, the name of the X Consortium shall not be
65 used in advertising or otherwise to promote the sale, use or other dealings
66 in this Software without prior written authorization from the X Consortium.
67
68 */
69
70 #include <stdio.h>
71 #include <ctype.h>
72 #include <sys/types.h>
73 #include <fcntl.h>
74 #include <sys/stat.h>
75
76 /* === EH3 ===
77 #define MAXDEFINES 512
78 #define MAXFILES 512
79 === EH3 === */
80 #define MAXDEFINES 8192
81 #define MAXFILES 8192
82 /* === EH3 === */
83 #define MAXDIRS 256
84 #define SYMTABINC 10 /* must be > 1 for define() to work right */
85 #define TRUE 1
86 #define FALSE 0
87
88 /* the following must match the directives table in main.c */
89 #define IF 0
90 #define IFDEF 1
91 #define IFNDEF 2
92 #define ELSE 3
93 #define ENDIF 4
94 #define DEFINE 5
95 #define UNDEF 6
96 #define INCLUDE 7
97 #define LINE 8
98 #define PRAGMA 9
99 #define ERROR 10
100 #define IDENT 11
101 #define SCCS 12
102 #define ELIF 13
103 #define EJECT 14
104 #define IFFALSE 15 /* pseudo value --- never matched */
105 #define ELIFFALSE 16 /* pseudo value --- never matched */
106 #define INCLUDEDOT 17 /* pseudo value --- never matched */
107 #define IFGUESSFALSE 18 /* pseudo value --- never matched */
108 #define ELIFGUESSFALSE 19 /* pseudo value --- never matched */
109
110 #ifdef DEBUG
111 extern int _debugmask;
112 /*
113 * debug levels are:
114 *
115 * 0 show ifn*(def)*,endif
116 * 1 trace defined/!defined
117 * 2 show #include
118 * 3 show #include SYMBOL
119 * 4-6 unused
120 */
121 #define debug(level,arg) { if (_debugmask & (1 << level)) warning arg; }
122 #else
123 #define debug(level,arg) /**/
124 #endif /* DEBUG */
125
126 typedef unsigned char boolean;
127
128 struct symtab {
129 char *s_name;
130 char *s_value;
131 };
132
133 struct inclist {
134 char *i_incstring; /* string from #include line */
135 char *i_file; /* path name of the include file */
136 struct inclist **i_list; /* list of files it itself includes */
137 int i_listlen; /* length of i_list */
138 struct symtab *i_defs; /* symbol table for this file */
139 int i_ndefs; /* current # defines */
140 int i_deflen; /* amount of space in table */
141 boolean i_defchecked; /* whether defines have been checked */
142 boolean i_notified; /* whether we have revealed includes */
143 boolean i_marked; /* whether it's in the makefile */
144 boolean i_searched; /* whether we have read this */
145 boolean i_included_sym; /* whether #include SYMBOL was found */
146 /* Can't use i_list if TRUE */
147 };
148
149 struct filepointer {
150 char *f_p;
151 char *f_base;
152 char *f_end;
153 long f_len;
154 long f_line;
155 };
156
157 #ifndef NO_STDLIB_H /* X_NOT_STDC_ENV */
158 #include <stdlib.h>
159 #if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */
160 char *malloc(), *realloc();
161 #endif /* macII */
162 #else
163 char *malloc();
164 char *realloc();
165 #endif
166
167 char *copy();
168 char *base_name();
169 char *getline();
170 struct symtab *slookup();
171 struct symtab *isdefined();
172 struct symtab *fdefined();
173 struct filepointer *getfile();
174 struct inclist *newinclude();
175 struct inclist *inc_path();
176
177 #ifdef HAVE_STDARG_H /* NeedVarargsPrototypes */
178 extern fatalerr(char *, ...);
179 extern warning(char *, ...);
180 extern warning1(char *, ...);
181 #endif

  ViewVC Help
Powered by ViewVC 1.1.22