catacomb.c, util.c: Export `modname' and set it in main entry point.
[pyke] / catacomb-python.h
1 /* -*-c-*-
2 *
3 * Definitions for Catacomb bindings
4 *
5 * (c) 2004 Straylight/Edgeware
6 */
7
8 /*----- Licensing notice --------------------------------------------------*
9 *
10 * This file is part of the Python interface to Catacomb.
11 *
12 * Catacomb/Python is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * Catacomb/Python is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with Catacomb/Python; if not, write to the Free Software Foundation,
24 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 */
26
27 #ifndef CATACOMB_PYTHON_H
28 #define CATACOMB_PYTHON_H
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 /*----- Header files ------------------------------------------------------*/
35
36 #define PY_SSIZE_T_CLEAN
37
38 #include <Python.h>
39 #include <longintrepr.h>
40 #include <structmember.h>
41
42 #include <mLib/darray.h>
43 #include <mLib/dstr.h>
44 #include <mLib/macros.h>
45 #include <mLib/quis.h>
46 #include <mLib/unihash.h>
47
48 #include <catacomb/buf.h>
49 #include <catacomb/ct.h>
50
51 #include <catacomb/grand.h>
52 #include <catacomb/rand.h>
53 #include <catacomb/noise.h>
54 #include <catacomb/bbs.h>
55 #include <catacomb/mprand.h>
56 #include <catacomb/lcrand.h>
57 #include <catacomb/fibrand.h>
58 #include <catacomb/dsarand.h>
59 #include <catacomb/sslprf.h>
60 #include <catacomb/tlsprf.h>
61 #include <catacomb/blkc.h>
62
63 #include <catacomb/gcipher.h>
64 #include <catacomb/gaead.h>
65 #include <catacomb/ghash.h>
66 #include <catacomb/gmac.h>
67 #include <catacomb/md5.h>
68 #include <catacomb/md5-hmac.h>
69 #include <catacomb/poly1305.h>
70 #include <catacomb/sha.h>
71 #include <catacomb/sha-mgf.h>
72 #include <catacomb/sha-hmac.h>
73 #include <catacomb/keccak1600.h>
74 #include <catacomb/sha3.h>
75
76 #include <catacomb/mp.h>
77 #include <catacomb/mpint.h>
78 #include <catacomb/mpmul.h>
79 #include <catacomb/mpcrt.h>
80 #include <catacomb/mpmont.h>
81 #include <catacomb/mpbarrett.h>
82 #include <catacomb/mpreduce.h>
83 #include <catacomb/mp-fibonacci.h>
84
85 #include <catacomb/pgen.h>
86 #include <catacomb/pfilt.h>
87 #include <catacomb/strongprime.h>
88 #include <catacomb/limlee.h>
89 #include <catacomb/dh.h>
90 #include <catacomb/ptab.h>
91 #include <catacomb/bintab.h>
92 #include <catacomb/dsa.h>
93 #include <catacomb/x25519.h>
94 #include <catacomb/x448.h>
95 #include <catacomb/ed25519.h>
96 #include <catacomb/ed448.h>
97
98 #include <catacomb/gf.h>
99 #include <catacomb/gfreduce.h>
100 #include <catacomb/gfn.h>
101
102 #include <catacomb/field.h>
103 #include <catacomb/field-guts.h>
104
105 #include <catacomb/ec.h>
106 #include <catacomb/ec-raw.h>
107 #include <catacomb/ectab.h>
108
109 #include <catacomb/group.h>
110 #include <catacomb/group-guts.h>
111
112 #include <catacomb/gdsa.h>
113 #include <catacomb/gkcdsa.h>
114 #include <catacomb/rsa.h>
115
116 #include <catacomb/key.h>
117 #include <catacomb/passphrase.h>
118 #include <catacomb/pixie.h>
119
120 #include <catacomb/share.h>
121 #include <catacomb/gfshare.h>
122
123 /*----- Other preliminaries -----------------------------------------------*/
124
125 #define GOBBLE_SEMI extern int notexist
126 #if defined(__GNUC__) && defined(__ELF__)
127 # define PRIVATE_SYMBOLS _Pragma("GCC visibility push(hidden)") GOBBLE_SEMI
128 # define PUBLIC_SYMBOLS _Pragma("GCC visibility pop") GOBBLE_SEMI
129 # define EXPORT __attribute__((__visibility__("default")))
130 #else
131 # define PRIVATE_SYMBOLS GOBBLE_SEMI
132 # define PUBLIC_SYMBOLS GOBBLE_SEMI
133 # define EXPORT
134 #endif
135
136 PRIVATE_SYMBOLS;
137
138 /*----- Utility macros ----------------------------------------------------*/
139
140 #define RETURN_OBJ(obj) do { Py_INCREF(obj); return (obj); } while (0)
141 #define RETURN_NONE RETURN_OBJ(Py_None)
142 #define RETURN_NOTIMPL RETURN_OBJ(Py_NotImplemented)
143 #define RETURN_TRUE RETURN_OBJ(Py_True)
144 #define RETURN_FALSE RETURN_OBJ(Py_False)
145 #define RETURN_ME RETURN_OBJ(me)
146
147 #define EXCERR(exc, str) do { \
148 PyErr_SetString(exc, str); \
149 goto end; \
150 } while (0)
151 #define VALERR(str) EXCERR(PyExc_ValueError, str)
152 #define OVFERR(str) EXCERR(PyExc_OverflowError, str)
153 #define TYERR(str) EXCERR(PyExc_TypeError, str)
154 #define IXERR(str) EXCERR(PyExc_IndexError, str)
155 #define ZDIVERR(str) EXCERR(PyExc_ZeroDivisionError, str)
156 #define SYSERR(str) EXCERR(PyExc_SystemError, str)
157 #define NIERR(str) EXCERR(PyExc_NotImplementedError, str)
158 #define INDEXERR(idx) do { \
159 PyErr_SetObject(PyExc_KeyError, idx); \
160 goto end; \
161 } while (0)
162 #define OSERR(name) do { \
163 PyErr_SetFromErrnoWithFilename(PyExc_OSError, name); \
164 goto end; \
165 } while (0)
166 #define PGENERR(exc) do { pgenerr(exc); goto end; } while (0)
167
168 #define CONVFUNC(ty, cty, ext) \
169 int conv##ty(PyObject *o, void *p) \
170 { \
171 if (!PyObject_TypeCheck(o, ty##_pytype)) \
172 TYERR("wanted a " #ty); \
173 *(cty *)p = ext(o); \
174 return (1); \
175 end: \
176 return (0); \
177 }
178
179 #define root_pytype 0
180 #define type_pytype &PyType_Type
181 #define INITTYPE_META(ty, base, meta) do { \
182 ty##_pytype_skel.tp_base = base##_pytype; \
183 ty##_pytype = inittype(&ty##_pytype_skel, meta##_pytype); \
184 } while (0)
185 #define INITTYPE(ty, base) INITTYPE_META(ty, base, type)
186
187 extern PyObject *home_module;
188 extern PyObject *modname;
189
190 #define INSERT(name, ob) do { \
191 PyObject *_o = (PyObject *)(ob); \
192 Py_INCREF(_o); \
193 PyModule_AddObject(mod, name, _o); \
194 } while (0)
195
196 #define INSEXC(name, var, base, meth) \
197 INSERT(name, var = mkexc(mod, base, name, meth))
198
199 #define METH(func, doc) \
200 { #func, METHNAME(func), METH_VARARGS, doc },
201 #define KWMETH(func, doc) \
202 { #func, (PyCFunction)METHNAME(func), \
203 METH_VARARGS | METH_KEYWORDS, doc },
204
205 #define GET(func, doc) \
206 { #func, GETSETNAME(get, func), 0, doc },
207 #define GETSET(func, doc) \
208 { #func, GETSETNAME(get, func), GETSETNAME(set, func), doc },
209
210 #define MEMBER(name, ty, f, doc) \
211 { #name, ty, offsetof(MEMBERSTRUCT, name), f, doc },
212
213 #define MODULES(_) \
214 _(util) \
215 _(bytestring) _(buffer) \
216 _(rand) _(algorithms) _(pubkey) _(pgen) \
217 _(mp) _(field) _(ec) _(group) \
218 _(passphrase) _(share) _(key)
219 #define DOMODINIT(m) m##_pyinit();
220 #define DOMODINSERT(m) m##_pyinsert(mod);
221 #define INIT_MODULES do { MODULES(DOMODINIT) } while (0)
222 #define INSERT_MODULES do { MODULES(DOMODINSERT) } while (0)
223
224 #define DO(m) \
225 extern void m##_pyinit(void); \
226 extern void m##_pyinsert(PyObject *);
227 MODULES(DO)
228 #undef DO
229
230 #define FREEOBJ(obj) \
231 (((PyObject *)(obj))->ob_type->tp_free((PyObject *)(obj)))
232
233 #define GEN(func, base) \
234 static PyObject *func(void) \
235 { \
236 PyObject *d = PyDict_New(); \
237 PyObject *o; \
238 int i; \
239 \
240 for (i = 0; g##base##tab[i]; i++) { \
241 o = gc##base##_pywrap((/*unconst*/ gc##base *)g##base##tab[i]); \
242 PyDict_SetItemString(d, \
243 (/*unconst*/ char *)g##base##tab[i]->name, \
244 o); \
245 Py_DECREF(o); \
246 } \
247 return (d); \
248 }
249
250 #define KWLIST (/*unconst*/ char **)kwlist
251
252 struct nameval { const char *name; unsigned f; unsigned long value; };
253 #define CF_SIGNED 1u
254 extern void setconstants(PyObject *, const struct nameval *);
255
256 extern PyObject *mexp_common(PyObject *, PyObject *, size_t,
257 PyObject *(*id)(PyObject *),
258 int (*fill)(void *, PyObject *,
259 PyObject *, PyObject *),
260 PyObject *(*exp)(PyObject *, void *, int),
261 void (*drop)(void *));
262
263 extern int convulong(PyObject *, void *);
264 #define DECL_CONVU_(n) extern int convu##n(PyObject *, void *);
265 DOUINTSZ(DECL_CONVU_)
266 extern int convmpw(PyObject *, void *);
267 extern int convuint(PyObject *, void *);
268 extern int convk64(PyObject *, void *);
269 extern int convszt(PyObject *, void *);
270 extern int convbool(PyObject *, void *);
271 extern PyObject *abstract_pynew(PyTypeObject *, PyObject *, PyObject *);
272 extern PyObject *getbool(int);
273 extern PyObject *getulong(unsigned long);
274 extern PyObject *getk64(kludge64);
275 extern void *newtype(PyTypeObject *, const PyTypeObject *, const char *);
276
277 struct excinfo { PyObject *ty, *val, *tb; };
278 #define EXCINFO_INIT { 0, 0, 0 }
279
280 extern PyObject *mkexc(PyObject *, PyObject *, const char *, PyMethodDef *);
281 #define INIT_EXCINFO(exc) do { \
282 struct excinfo *_exc = (exc); _exc->ty = _exc->val = _exc->tb = 0; \
283 } while (0)
284 #define RELEASE_EXCINFO(exc) do { \
285 struct excinfo *_exc = (exc); \
286 Py_XDECREF(_exc->ty); _exc->ty = 0; \
287 Py_XDECREF(_exc->val); _exc->val = 0; \
288 Py_XDECREF(_exc->tb); _exc->tb = 0; \
289 } while (0)
290 #define STASH_EXCINFO(exc) do { \
291 struct excinfo *_exc = (exc); \
292 PyErr_Fetch(&_exc->ty, &_exc->val, &_exc->tb); \
293 PyErr_NormalizeException(&_exc->ty, &_exc->val, &_exc->tb); \
294 } while (0)
295 #define RESTORE_EXCINFO(exc) do { \
296 struct excinfo *_exc = (exc); \
297 PyErr_Restore(_exc->ty, _exc->val, _exc->tb); \
298 _exc->ty = _exc->val = _exc->tb = 0; \
299 } while (0)
300 extern void report_lost_exception(struct excinfo *, const char *, ...);
301 extern void report_lost_exception_v(struct excinfo *, const char *, va_list);
302 extern void stash_exception(struct excinfo *, const char *, ...);
303 extern void restore_exception(struct excinfo *, const char *, ...);
304
305 extern void typeready(PyTypeObject *);
306 extern PyTypeObject *inittype(PyTypeObject *, PyTypeObject *);
307 extern void addmethods(const PyMethodDef *);
308 extern PyMethodDef *donemethods(void);
309
310 /*----- Mapping methods ---------------------------------------------------*/
311
312 #define GMAP_METH(func, doc) { #func, gmapmeth_##func, METH_VARARGS, doc },
313 #define GMAP_KWMETH(func, doc) \
314 { #func, (PyCFunction)gmapmeth_##func, METH_VARARGS|METH_KEYWORDS, doc },
315 #define GMAP_METHDECL(func, doc) \
316 extern PyObject *gmapmeth_##func(PyObject *, PyObject *);
317 #define GMAP_KWMETHDECL(func, doc) \
318 extern PyObject *gmapmeth_##func(PyObject *, PyObject *, PyObject *);
319
320 #define GMAP_DOROMETHODS(METH, KWMETH) \
321 METH (has_key, "D.has_key(KEY) -> BOOL") \
322 METH (keys, "D.keys() -> LIST") \
323 METH (values, "D.values() -> LIST") \
324 METH (items, "D.items() -> LIST") \
325 METH (iterkeys, "D.iterkeys() -> ITER") \
326 METH (itervalues, "D.itervalues() -> ITER") \
327 METH (iteritems, "D.iteritems() -> ITER") \
328 KWMETH(get, "D.get(KEY, [default = None]) -> VALUE") \
329
330 #define GMAP_DOMETHODS(METH, KWMETH) \
331 GMAP_DOROMETHODS(METH, KWMETH) \
332 METH (clear, "D.clear()") \
333 KWMETH(setdefault, "D.setdefault(K, [default = None]) -> VALUE") \
334 KWMETH(pop, "D.pop(KEY, [default = <error>]) -> VALUE") \
335 METH (popitem, "D.popitem() -> (KEY, VALUE)") \
336 METH (update, "D.update(MAP)")
337
338 GMAP_DOMETHODS(GMAP_METHDECL, GMAP_KWMETHDECL)
339 #define GMAP_ROMETHODS GMAP_DOROMETHODS(GMAP_METH, GMAP_KWMETH)
340 #define GMAP_METHODS GMAP_DOMETHODS(GMAP_METH, GMAP_KWMETH)
341 extern Py_ssize_t gmap_pysize(PyObject *);
342 extern PySequenceMethods gmap_pysequence;
343 extern PyMethodDef gmap_pymethods[];
344
345 /*----- Bytestrings -------------------------------------------------------*/
346
347 PyObject *bytestring_pywrap(const void *, size_t);
348 PyObject *bytestring_pywrapbuf(buf *);
349
350 /*----- Multiprecision arithmetic -----------------------------------------*/
351
352 typedef struct mp_pyobj {
353 PyObject_HEAD
354 mp *x;
355 } mp_pyobj;
356
357 extern PyTypeObject *mp_pytype;
358 extern PyTypeObject *gf_pytype;
359 #define MP_X(o) (((mp_pyobj *)(o))->x)
360 #define MP_PYCHECK(o) PyObject_TypeCheck((o), mp_pytype)
361 #define GF_PYCHECK(o) PyObject_TypeCheck((o), gf_pytype)
362
363 extern mp *mp_frompylong(PyObject *);
364 extern PyObject *mp_topylong(mp *);
365 extern mp *tomp(PyObject *);
366 extern mp *getmp(PyObject *);
367 extern int convmp(PyObject *, void *);
368 extern mp *getgf(PyObject *);
369 extern int convgf(PyObject *, void *);
370 extern PyObject *mp_pywrap(mp *);
371 extern PyObject *gf_pywrap(mp *);
372 extern long mphash(mp *);
373 extern mp *mp_frompyobject(PyObject *, int);
374 extern PyObject *mp_topystring(mp *, int,
375 const char *, const char *, const char *);
376 extern int mp_tolong_checked(mp *, long *, int);
377
378 /*----- Abstract fields ---------------------------------------------------*/
379
380 typedef struct field_pyobj {
381 PyHeapTypeObject ty;
382 field *f;
383 } field_pyobj;
384
385 extern PyTypeObject *field_pytype;
386 extern PyTypeObject *primefield_pytype;
387 extern PyTypeObject *niceprimefield_pytype;
388 extern PyTypeObject *binfield_pytype;
389 extern PyTypeObject *binpolyfield_pytype;
390 extern PyTypeObject *binnormfield_pytype;
391 #define FIELD_PYCHECK(o) PyObject_TypeCheck((o), field_pytype)
392 #define FIELD_F(o) (((field_pyobj *)(o))->f)
393 extern PyObject *field_pywrap(field *);
394 extern field *field_copy(field *);
395
396 typedef struct fe_pyobj {
397 PyObject_HEAD
398 field *f;
399 mp *x;
400 } fe_pyobj;
401
402 extern PyTypeObject *fe_pytype;
403 #define FE_PYCHECK(o) PyObject_TypeCheck((o), fe_pytype)
404 #define FE_F(o) (((fe_pyobj *)(o))->f)
405 #define FE_FOBJ(o) ((PyObject *)(o)->ob_type)
406 #define FE_X(o) (((fe_pyobj *)(o))->x)
407 extern PyObject *fe_pywrap(PyObject *, mp *);
408
409 /*----- Elliptic curves ---------------------------------------------------*/
410
411 typedef struct eccurve_pyobj {
412 PyHeapTypeObject ty;
413 ec_curve *c;
414 PyObject *fobj;
415 } eccurve_pyobj;
416
417 extern PyTypeObject *eccurve_pytype;
418 extern PyTypeObject *ecprimecurve_pytype;
419 extern PyTypeObject *ecprimeprojcurve_pytype;
420 extern PyTypeObject *ecbincurve_pytype;
421 extern PyTypeObject *ecbinprojcurve_pytype;
422 #define ECCURVE_PYCHECK(o) PyObject_TypeCheck((o), eccurve_pytype)
423 #define ECCURVE_C(o) (((eccurve_pyobj *)(o))->c)
424 #define ECCURVE_FOBJ(o) (((eccurve_pyobj *)(o))->fobj)
425 extern PyObject *eccurve_pywrap(PyObject *, ec_curve *);
426 extern ec_curve *eccurve_copy(ec_curve *);
427
428 typedef struct ecpt_pyobj {
429 PyObject_HEAD
430 ec_curve *c;
431 ec p;
432 } ecpt_pyobj;
433
434 extern PyTypeObject *ecpt_pytype, *ecptcurve_pytype;
435 #define ECPT_PYCHECK(o) PyObject_TypeCheck((o), ecpt_pytype)
436 #define ECPTCURVE_PYCHECK(o) PyObject_TypeCheck((o), ecptcurve_pytype)
437 #define ECPT_C(o) (((ecpt_pyobj *)(o))->c)
438 #define ECPT_COBJ(o) ((PyObject *)(o)->ob_type)
439 #define ECPT_FOBJ(o) ECCURVE_FOBJ(ECPT_COBJ((o)))
440 #define ECPT_P(o) (&((ecpt_pyobj *)(o))->p)
441 extern PyObject *ecpt_pywrap(PyObject *, ec *);
442 extern PyObject *ecpt_pywrapout(void *, ec *);
443 extern int toecpt(ec_curve *, ec *, PyObject *);
444 extern int getecpt(ec_curve *, ec *, PyObject *);
445 extern void getecptout(ec *, PyObject *);
446 extern int convecpt(PyObject *, void *);
447
448 typedef struct ecinfo_pyobj {
449 PyObject_HEAD
450 ec_info ei;
451 PyObject *cobj;
452 } ecinfo_pyobj;
453
454 extern PyTypeObject *ecinfo_pytype;
455 #define ECINFO_PYCHECK(o) PyObject_TypeCheck((o), ecinfo_pytype)
456 #define ECINFO_EI(o) (&((ecinfo_pyobj *)(o))->ei)
457 #define ECINFO_COBJ(o) (((ecinfo_pyobj *)(o))->cobj)
458 extern void ecinfo_copy(ec_info *, const ec_info *);
459 extern PyObject *ecinfo_pywrap(ec_info *);
460
461 /*----- Cyclic groups -----------------------------------------------------*/
462
463 typedef struct ge_pyobj {
464 PyObject_HEAD
465 ge *x;
466 group *g;
467 } ge_pyobj;
468
469 extern PyTypeObject *ge_pytype;
470 #define GE_PYCHECK(o) PyObject_TypeCheck((o), ge_pytype)
471 #define GE_X(o) (((ge_pyobj *)(o))->x)
472 #define GE_G(o) (((ge_pyobj *)(o))->g)
473 #define GE_GOBJ(o) ((PyObject *)(group_pyobj *)(o)->ob_type)
474 extern PyObject *ge_pywrap(PyObject *, ge *);
475
476 typedef struct group_pyobj {
477 PyHeapTypeObject ty;
478 group *g;
479 } group_pyobj;
480
481 extern PyTypeObject *group_pytype;
482 #define GROUP_G(o) (((group_pyobj *)(o))->g)
483 extern PyObject *group_pywrap(group *);
484 extern group *group_copy(group *);
485
486 /*----- Random number generators ------------------------------------------*/
487
488 #define f_freeme 1u
489
490 typedef struct grand_pyobj {
491 PyObject_HEAD
492 unsigned f;
493 grand *r;
494 } grand_pyobj;
495
496 extern PyTypeObject *grand_pytype;
497 extern PyObject *rand_pyobj;
498 #define GRAND_PYCHECK(o) PyObject_TypeCheck((o), grand_pytype)
499 #define GRAND_F(o) (((grand_pyobj *)(o))->f)
500 #define GRAND_R(o) (((grand_pyobj *)(o))->r)
501 extern PyObject *grand_pywrap(grand *, unsigned);
502 extern int convgrand(PyObject *, void *);
503
504 /*----- Symmetric cryptography --------------------------------------------*/
505
506 extern PyObject *keysz_pywrap(const octet *);
507
508 extern int convgccipher(PyObject *, void *);
509 extern PyObject *gccipher_pywrap(gccipher *);
510
511 typedef struct gchash_pyobj {
512 PyHeapTypeObject ty;
513 gchash *ch;
514 } gchash_pyobj;
515
516 extern PyTypeObject *gchash_pytype;
517 extern PyObject *sha_pyobj, *has160_pyobj;
518 #define GCHASH_PYCHECK(o) PyObject_TypeCheck((o), gchash_pytype)
519 #define GCHASH_CH(o) (((gchash_pyobj *)(o))->ch)
520 extern PyObject *ghash_pywrap(PyObject *, ghash *);
521 extern int convgchash(PyObject *, void *);
522 extern int convghash(PyObject *, void *);
523
524 extern int convgcmac(PyObject *, void *);
525
526 /*----- Key generation ----------------------------------------------------*/
527
528 typedef struct pfilt_pyobj {
529 PyObject_HEAD
530 pfilt f;
531 int st;
532 } pfilt_pyobj;
533
534 extern PyTypeObject *pfilt_pytype;
535 #define PFILT_PYCHECK(o) PyObject_TypeCheck(o, pfilt_pytype)
536 #define PFILT_F(o) (&((pfilt_pyobj *)(o))->f)
537 #define PFILT_ST(o) (((pfilt_pyobj *)(o))->st)
538
539 typedef struct { pgen_proc *proc; void *ctx; } pgev;
540 #define PGEV_HEAD PyObject_HEAD pgev pg;
541
542 typedef struct pgev_pyobj {
543 PGEV_HEAD
544 } pgev_pyobj;
545
546 extern PyTypeObject *pgev_pytype;
547 #define PGEV_PYCHECK(o) PyObject_TypeCheck(o, pgev_pytype)
548 #define PGEV_PG(o) (&((pgev_pyobj *)(o))->pg)
549
550 typedef struct pypgev {
551 pgev ev;
552 PyObject *obj;
553 struct excinfo *exc;
554 } pypgev;
555
556 extern int convpgev(PyObject *, void *);
557 extern void droppgev(pypgev *);
558 extern void pgenerr(struct excinfo *exc);
559
560 /*----- That's all, folks -------------------------------------------------*/
561
562 #ifdef __cplusplus
563 }
564 #endif
565
566 #endif