SCIP Doxygen Documentation
Loading...
Searching...
No Matches
xmldef.h
Go to the documentation of this file.
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2
/* */
3
/* This file is part of the program and library */
4
/* SCIP --- Solving Constraint Integer Programs */
5
/* */
6
/* Copyright (c) 2002-2025 Zuse Institute Berlin (ZIB) */
7
/* */
8
/* Licensed under the Apache License, Version 2.0 (the "License"); */
9
/* you may not use this file except in compliance with the License. */
10
/* You may obtain a copy of the License at */
11
/* */
12
/* http://www.apache.org/licenses/LICENSE-2.0 */
13
/* */
14
/* Unless required by applicable law or agreed to in writing, software */
15
/* distributed under the License is distributed on an "AS IS" BASIS, */
16
/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17
/* See the License for the specific language governing permissions and */
18
/* limitations under the License. */
19
/* */
20
/* You should have received a copy of the Apache-2.0 license */
21
/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
22
/* */
23
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24
25
/**@file xmldef.h
26
* @brief definitions for XML parsing
27
* @author Thorsten Koch
28
* @author Marc Pfetsch
29
*/
30
31
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32
33
#ifndef __SCIP_XMLDEF_H__
34
#define __SCIP_XMLDEF_H__
35
36
#ifdef __cplusplus
37
extern
"C"
{
38
#endif
39
40
41
#ifndef XML_Bool
42
#define XML_Bool unsigned int
/**< type used for boolean values */
43
#endif
44
45
#ifndef TRUE
46
#define TRUE 1
/**< boolean value TRUE */
47
#define FALSE 0
/**< boolean value FALSE */
48
#endif
49
50
51
#ifdef SCIP_WITH_ZLIB
52
#define WITH_GZFILEOP
53
#include <zlib-ng.h>
54
55
#define FOPEN(file, mode) zng_gzopen(file, mode)
56
#define FCLOSE(fp) zng_gzclose(fp)
57
#define FGETS(buf, len, fp) zng_gzgets(fp, buf, len)
/*lint !e755 */
58
#define FREAD(buf, len, fp) zng_gzread(fp, buf, len)
59
#define FPTYPE gzFile
60
#else
61
#define FOPEN(file, mode) fopen(file, mode)
62
#define FCLOSE(fp) fclose(fp)
63
#define FGETS(buf, len, fp) fgets(buf, len, fp)
/*lint !e755 */
64
#define FREAD(buf, len, fp) fread(buf, 1, len, fp)
65
#define FPTYPE FILE*
66
#endif
/* SCIP_WITH_ZLIB */
67
68
69
#ifndef ALLOC_ABORT
70
#define ALLOC_ABORT(x) do \
71
{ \
72
if( NULL == (x) ) \
73
{ \
74
printf("[%s:%d] No memory in function call\n", __FILE__, __LINE__); \
75
abort(); \
76
} \
77
} \
78
while( FALSE )
79
#endif
80
81
#ifndef ALLOC_FALSE
82
#define ALLOC_FALSE(x) do \
83
{ \
84
if( NULL == (x) ) \
85
{ \
86
printf("[%s:%d] No memory in function call\n", __FILE__, __LINE__); \
87
return FALSE; \
88
} \
89
} \
90
while( FALSE )
91
#endif
92
93
#ifdef XML_DEBUG
94
#define debug(x) x
95
#define debugMessage printf("[%s:%d] debug: ", __FILE__, __LINE__); printf
96
#define debugPrintf printf
97
#else
98
#define debug(x)
/**/
99
#define debugMessage while( FALSE ) printf
100
#define debugPrintf while( FALSE ) printf
101
#endif
102
103
#ifndef infoMessage
104
#define infoMessage printf
105
#endif
106
107
#ifdef __cplusplus
108
}
109
#endif
110
111
#endif
xml
xmldef.h
© 2002-2025 by Zuse Institute Berlin (ZIB),
Imprint
Generated by
1.13.2