PostgreSQL Source Code: src/interfaces/ecpg/test/expected/preproc-init.c Source File (original) (raw)
1
2
6
7#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))
8
9#line 1 "init.pgc"
10
11#line 1 "sqlca.h"
12#ifndef POSTGRES_SQLCA_H
13#define POSTGRES_SQLCA_H
14
15#ifndef PGDLLIMPORT
16#if defined(WIN32) || defined(__CYGWIN__)
17#define PGDLLIMPORT __declspec (dllimport)
18#else
19#define PGDLLIMPORT
20#endif
21#endif
22
23#define SQLERRMC_LEN 150
24
25#ifdef __cplusplus
26extern "C"
27{
28#endif
29
31{
35 struct
36 {
42
43
44
45
46
47
48
49
51
52
53
54
55
56
57
58
59
60
61
62
63
65};
66
68
69#ifndef POSTGRES_ECPG_INTERNAL
70#define sqlca (*ECPGget_sqlca())
71#endif
72
73#ifdef __cplusplus
74}
75#endif
76
77#endif
78
79#line 1 "init.pgc"
80
81
84
86{
88 return 2;
89}
90
91static int
93{
95 return x;
96}
97
98static int
100{
101 printf("in fc (%s)\n", x);
102 return *x;
103}
104
105static int fd(const char *x,int i)
106{
107 printf("in fd (%s, %d)\n", x, i);
109}
110
112{
113 printf("in fe (%d)\n", (int) x);
114 return (int)x;
115}
116
118{
119 if (!notice)
120 notice = "-empty-";
121 printf("in sqlnotice (%s, %d)\n", notice, trans);
122}
123
124
125
126#define YES 1
127
128#ifdef _cplusplus
129namespace N
130{
131 static const int i=2;
132};
133#endif
134
136{
137 struct sa x = { 14 },*y = &x;
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152#line 60 "init.pgc"
153 int a = ( int ) 2 ;
154
155#line 61 "init.pgc"
156 int b = 2 + 2 ;
157
158#line 62 "init.pgc"
159 int b2 = ( 14 * 7 ) ;
160
161#line 63 "init.pgc"
163
164#line 64 "init.pgc"
165 int g = fb ( 2 ) ;
166
167#line 65 "init.pgc"
168 int i = 3 ^ 1 ;
169
170#line 66 "init.pgc"
171 int j = 1 ? 1 : 2 ;
172
173#line 68 "init.pgc"
175
176#line 69 "init.pgc"
177 int c = 10 >> 2 ;
178
179#line 70 "init.pgc"
180 bool h = 2 || 1 ;
181
182#line 71 "init.pgc"
183 long iay ;
184
185#line 72 "init.pgc"
186
187
188 int f=fa();
189
190#ifdef _cplusplus
191
192
193
194#line 78 "init.pgc"
195 int k = N : : i ;
196
197#line 79 "init.pgc"
198
199#endif
200
202
203 printf("%d %d %d %d %d %d %d %d %d %d %d\n", a, b, b2, c, d, e, f, g, h, i, j);
204 iay = 0;
205 printf("%ld\n", iay);
206
207#line 87 "init.pgc"
208
210#line 88 "init.pgc"
211
212if (sqlca.sqlcode < 0) fa ( );}
213#line 88 "init.pgc"
214
215
216#line 89 "init.pgc"
217
219#line 90 "init.pgc"
220
221if (sqlca.sqlcode < 0) fb ( 20 );}
222#line 90 "init.pgc"
223
224
225#line 91 "init.pgc"
226
228#line 92 "init.pgc"
229
230if (sqlca.sqlcode < 0) fc ( "50" );}
231#line 92 "init.pgc"
232
233
234#line 93 "init.pgc"
235
237#line 94 "init.pgc"
238
239if (sqlca.sqlcode < 0) fd ( "50" , 1 );}
240#line 94 "init.pgc"
241
242
243#line 95 "init.pgc"
244
246#line 96 "init.pgc"
247
249#line 96 "init.pgc"
250
251
252#line 97 "init.pgc"
253
255#line 98 "init.pgc"
256
258#line 98 "init.pgc"
259
260 return 0;
261}
bool ECPGdo(const int lineno, const int compat, const int force_indicator, const char *connection_name, const bool questionmarks, const int st, const char *query,...)
static void sqlnotice(const char *notice, short trans)
struct sqlca_t * ECPGget_sqlca(void)
static int fd(const char *x, int i)
static int fc(const char *x)
struct sqlca_t::@168 sqlerrm
char sqlerrmc[SQLERRMC_LEN]
static zic_t trans[TZ_MAX_LEAPS]