bump product version to 5.0.4.1
[LibreOffice.git] / rsc / source / rscpp / cppdef.h
blob3cf30cf1d1b648475e991c13ca4a72f8889265aa
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_RSC_SOURCE_RSCPP_CPPDEF_H
21 #define INCLUDED_RSC_SOURCE_RSCPP_CPPDEF_H
24 * This redundant definition of TRUE and FALSE works around
25 * a limitation of Decus C.
27 #ifndef TRUE
28 #define TRUE 1
29 #define FALSE 0
30 #endif
33 * Define the HOST operating system. This is needed so that
34 * cpp can use appropriate filename conventions.
36 #define SYS_UNKNOWN 0
37 #define SYS_UNIX 1
39 #ifndef HOST
40 #ifdef unix
41 #define HOST SYS_UNIX
42 #else
43 #endif
44 #endif
46 #ifndef HOST
47 #define HOST SYS_UNKNOWN
48 #endif
51 * We assume that the target is the same as the host system
53 #ifndef TARGET
54 #define TARGET HOST
55 #endif
58 * In order to predefine machine-dependent constants,
59 * several strings are defined here:
61 * MACHINE defines the target cpu (by name)
62 * SYSTEM defines the target operating system
63 * COMPILER defines the target compiler
65 * The above may be #defined as "" if they are not wanted.
66 * They should not be #defined as NULL.
68 * LINE_PREFIX defines the # output line prefix, if not "line"
69 * This should be defined as "" if cpp is to replace
70 * the "standard" C pre-processor.
72 * FILE_LOCAL marks functions which are referenced only in the
73 * file they reside. Some C compilers allow these
74 * to be marked "static" even though they are referenced
75 * by "extern" statements elsewhere.
77 * OK_DATE Predefines the compilation date if set TRUE.
78 * Not permitted by the Nov. 12, 1984 Draft Standard.
80 * S_CHAR etc. Define the sizeof the basic TARGET machine word types.
81 * By default, sizes are set to the values for the HOST
82 * computer. If this is inappropriate, see the code in
83 * cpp3.c for details on what to change. Also, if you
84 * have a machine where sizeof (signed int) differs from
85 * sizeof (unsigned int), you will have to edit code and
86 * tables in cpp3.c (and extend the -S option definition.)
88 * CPP_LIBRARY May be defined if you have a site-specific include directory
89 * which is to be searched *before* the operating-system
90 * specific directories.
93 #if TARGET == SYS_UNIX
94 #define SYSTEM "unix"
95 #endif
98 * defaults
101 #ifndef MSG_PREFIX
102 #define MSG_PREFIX "cpp: "
103 #endif
105 #ifndef LINE_PREFIX
106 #define LINE_PREFIX ""
107 #endif
110 * RECURSION_LIMIT may be set to -1 to disable the macro recursion test.
112 #ifndef RECURSION_LIMIT
113 #define RECURSION_LIMIT 1000
114 #endif
117 * BITS_CHAR may be defined to set the number of bits per character.
118 * it is needed only for multi-byte character constants.
120 #ifndef BITS_CHAR
121 #define BITS_CHAR 8
122 #endif
125 * OK_DATE may be enabled to predefine today's date as a string
126 * at the start of each compilation. This is apparently not permitted
127 * by the Draft Ansi Standard.
129 #ifndef OK_DATE
130 #define OK_DATE TRUE
131 #endif
134 * The following definitions are used to allocate memory for
135 * work buffers. In general, they should not be modified
136 * by implementors.
138 * PAR_MAC The maximum number of #define parameters (31 per Standard)
139 * Note: we need another one for strings.
140 * IDMAX The longest identifier, 31 per Ansi Standard
141 * NBUFF Input buffer size
142 * NWORK Work buffer size -- the longest macro
143 * must fit here after expansion.
144 * NEXP The nesting depth of #if expressions
145 * NINCLUDE The number of directories that may be specified
146 * on a per-system basis, or by the -I option.
147 * BLK_NEST The number of nested #if's permitted.
148 * NFWORK FileNameWorkBuffer (added by erAck, was NWORK)
151 #ifndef IDMAX
152 #define IDMAX 127
153 #endif
154 #ifdef SOLAR
155 #define PAR_MAC (253 + 1)
156 #else
157 #define PAR_MAC (31 + 1)
158 #endif
159 /* NWORK wg. grooossen Makros in *.src erhoeht,
160 da wir bald 10 Sprachen haben werden gleich ordentlich reingehauen.. */
161 #define NWORK 128000
162 #define NBUFF NWORK
163 #define NFWORK 1024
164 #define NEXP 128
165 #define NINCLUDE 100
166 #define NPARMWORK (NWORK * 2)
167 #define BLK_NEST 32
170 #ifndef ALERT
171 #define ALERT '\007' /* '\a' is "Bell" */
172 #endif
174 #ifndef VT
175 #define VT '\013' /* Vertical Tab CTRL/K */
176 #endif
179 #ifndef FILE_LOCAL
180 #define FILE_LOCAL /* Others are global */
181 #endif
183 #endif // INCLUDED_RSC_SOURCE_RSCPP_CPPDEF_H
185 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */