Line data Source code
1 : /* ----------------------------------------------------------------------------
2 : * This file was automatically generated by SWIG (https://www.swig.org).
3 : * Version 4.4.0
4 : *
5 : * Do not make changes to this file unless you know what you are doing - modify
6 : * the SWIG interface file instead.
7 : * ----------------------------------------------------------------------------- */
8 :
9 :
10 : #define SWIG_VERSION 0x040400
11 : #define SWIGGUILE
12 : #define SWIG_GUILE_INIT_STATIC static
13 : SWIG_GUILE_INIT_STATIC void
14 : SWIG_init (void);
15 :
16 : /* -----------------------------------------------------------------------------
17 : * This section contains generic SWIG labels for method/variable
18 : * declarations/attributes, and other compiler dependent labels.
19 : * ----------------------------------------------------------------------------- */
20 :
21 : /* template workaround for compilers that cannot correctly implement the C++ standard */
22 : #ifndef SWIGTEMPLATEDISAMBIGUATOR
23 : # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
24 : # define SWIGTEMPLATEDISAMBIGUATOR template
25 : # elif defined(__HP_aCC)
26 : /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
27 : /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
28 : # define SWIGTEMPLATEDISAMBIGUATOR template
29 : # else
30 : # define SWIGTEMPLATEDISAMBIGUATOR
31 : # endif
32 : #endif
33 :
34 : /* inline attribute */
35 : #ifndef SWIGINLINE
36 : # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
37 : # define SWIGINLINE inline
38 : # else
39 : # define SWIGINLINE
40 : # endif
41 : #endif
42 :
43 : /* attribute recognised by some compilers to avoid 'unused' warnings */
44 : #ifndef SWIGUNUSED
45 : # if defined(__GNUC__)
46 : # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
47 : # define SWIGUNUSED __attribute__ ((__unused__))
48 : # else
49 : # define SWIGUNUSED
50 : # endif
51 : # elif defined(__ICC)
52 : # define SWIGUNUSED __attribute__ ((__unused__))
53 : # else
54 : # define SWIGUNUSED
55 : # endif
56 : #endif
57 :
58 : #ifndef SWIG_MSC_UNSUPPRESS_4505
59 : # if defined(_MSC_VER)
60 : # pragma warning(disable : 4505) /* unreferenced local function has been removed */
61 : # endif
62 : #endif
63 :
64 : #ifndef SWIGUNUSEDPARM
65 : # ifdef __cplusplus
66 : # define SWIGUNUSEDPARM(p)
67 : # else
68 : # define SWIGUNUSEDPARM(p) p SWIGUNUSED
69 : # endif
70 : #endif
71 :
72 : /* internal SWIG method */
73 : #ifndef SWIGINTERN
74 : # define SWIGINTERN static SWIGUNUSED
75 : #endif
76 :
77 : /* internal inline SWIG method */
78 : #ifndef SWIGINTERNINLINE
79 : # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
80 : #endif
81 :
82 : /* exporting methods */
83 : #if defined(__GNUC__)
84 : # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
85 : # ifndef GCC_HASCLASSVISIBILITY
86 : # define GCC_HASCLASSVISIBILITY
87 : # endif
88 : # endif
89 : #endif
90 :
91 : #ifndef SWIGEXPORT
92 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
93 : # if defined(STATIC_LINKED)
94 : # define SWIGEXPORT
95 : # else
96 : # define SWIGEXPORT __declspec(dllexport)
97 : # endif
98 : # else
99 : # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
100 : # define SWIGEXPORT __attribute__ ((visibility("default")))
101 : # else
102 : # define SWIGEXPORT
103 : # endif
104 : # endif
105 : #endif
106 :
107 : /* calling conventions for Windows */
108 : #ifndef SWIGSTDCALL
109 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
110 : # define SWIGSTDCALL __stdcall
111 : # else
112 : # define SWIGSTDCALL
113 : # endif
114 : #endif
115 :
116 : /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
117 : #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
118 : # define _CRT_SECURE_NO_DEPRECATE
119 : #endif
120 :
121 : /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
122 : #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
123 : # define _SCL_SECURE_NO_DEPRECATE
124 : #endif
125 :
126 : /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
127 : #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
128 : # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
129 : #endif
130 :
131 : /* Intel's compiler complains if a variable which was never initialised is
132 : * cast to void, which is a common idiom which we use to indicate that we
133 : * are aware a variable isn't used. So we just silence that warning.
134 : * See: https://github.com/swig/swig/issues/192 for more discussion.
135 : */
136 : #ifdef __INTEL_COMPILER
137 : # pragma warning disable 592
138 : #endif
139 :
140 : #if defined(__cplusplus) && __cplusplus >=201103L
141 : # define SWIG_NOEXCEPT noexcept
142 : #else
143 : # define SWIG_NOEXCEPT throw()
144 : #endif
145 :
146 : /* -----------------------------------------------------------------------------
147 : * swigcompat.swg
148 : *
149 : * Macros to provide support compatibility with older C and C++ standards.
150 : *
151 : * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard.
152 : * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option.
153 : * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus.
154 : * ----------------------------------------------------------------------------- */
155 :
156 : /* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
157 : * if you're missing it.
158 : */
159 : #if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
160 : (defined __cplusplus && __cplusplus >= 201103L) || \
161 : defined SWIG_HAVE_SNPRINTF) && \
162 : !defined SWIG_NO_SNPRINTF
163 : # define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
164 : # define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
165 : #else
166 : /* Fallback versions ignore the buffer size, but most of our uses either have a
167 : * fixed maximum possible size or dynamically allocate a buffer that's large
168 : * enough.
169 : */
170 : # define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
171 : # define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
172 : #endif
173 :
174 : /* -----------------------------------------------------------------------------
175 : * swigrun.swg
176 : *
177 : * This file contains generic C API SWIG runtime support for pointer
178 : * type checking.
179 : * ----------------------------------------------------------------------------- */
180 :
181 : /* This should only be incremented when either the layout of swig_type_info changes,
182 : or for whatever reason, the runtime changes incompatibly */
183 : #define SWIG_RUNTIME_VERSION "5"
184 :
185 : /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
186 : #ifdef SWIG_TYPE_TABLE
187 : # define SWIG_QUOTE_STRING(x) #x
188 : # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
189 : # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
190 : #else
191 : # define SWIG_TYPE_TABLE_NAME
192 : #endif
193 :
194 : /*
195 : You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
196 : creating a static or dynamic library from the SWIG runtime code.
197 : In 99.9% of the cases, SWIG just needs to declare them as 'static'.
198 :
199 : But only do this if strictly necessary, ie, if you have problems
200 : with your compiler or suchlike.
201 : */
202 :
203 : #ifndef SWIGRUNTIME
204 : # define SWIGRUNTIME SWIGINTERN
205 : #endif
206 :
207 : #ifndef SWIGRUNTIMEINLINE
208 : # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
209 : #endif
210 :
211 : /* Generic buffer size */
212 : #ifndef SWIG_BUFFER_SIZE
213 : # define SWIG_BUFFER_SIZE 1024
214 : #endif
215 :
216 : /* Flags for pointer conversions */
217 : #define SWIG_POINTER_DISOWN 0x1
218 : #define SWIG_CAST_NEW_MEMORY 0x2
219 : #define SWIG_POINTER_NO_NULL 0x4
220 : #define SWIG_POINTER_CLEAR 0x8
221 : #define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
222 :
223 : /* Flags for new pointer objects */
224 : #define SWIG_POINTER_OWN 0x1
225 :
226 :
227 : /*
228 : Flags/methods for returning states.
229 :
230 : The SWIG conversion methods, as ConvertPtr, return an integer
231 : that tells if the conversion was successful or not. And if not,
232 : an error code can be returned (see swigerrors.swg for the codes).
233 :
234 : Use the following macros/flags to set or process the returning
235 : states.
236 :
237 : In old versions of SWIG, code such as the following was usually written:
238 :
239 : if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
240 : // success code
241 : } else {
242 : //fail code
243 : }
244 :
245 : Now you can be more explicit:
246 :
247 : int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
248 : if (SWIG_IsOK(res)) {
249 : // success code
250 : } else {
251 : // fail code
252 : }
253 :
254 : which is the same really, but now you can also do
255 :
256 : Type *ptr;
257 : int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
258 : if (SWIG_IsOK(res)) {
259 : // success code
260 : if (SWIG_IsNewObj(res) {
261 : ...
262 : delete *ptr;
263 : } else {
264 : ...
265 : }
266 : } else {
267 : // fail code
268 : }
269 :
270 : I.e., now SWIG_ConvertPtr can return new objects and you can
271 : identify the case and take care of the deallocation. Of course that
272 : also requires SWIG_ConvertPtr to return new result values, such as
273 :
274 : int SWIG_ConvertPtr(obj, ptr,...) {
275 : if (<obj is ok>) {
276 : if (<need new object>) {
277 : *ptr = <ptr to new allocated object>;
278 : return SWIG_NEWOBJ;
279 : } else {
280 : *ptr = <ptr to old object>;
281 : return SWIG_OLDOBJ;
282 : }
283 : } else {
284 : return SWIG_BADOBJ;
285 : }
286 : }
287 :
288 : Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
289 : more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
290 : SWIG errors code.
291 :
292 : Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
293 : allows returning the 'cast rank', for example, if you have this
294 :
295 : int food(double)
296 : int fooi(int);
297 :
298 : and you call
299 :
300 : food(1) // cast rank '1' (1 -> 1.0)
301 : fooi(1) // cast rank '0'
302 :
303 : just use the SWIG_AddCast()/SWIG_CheckState()
304 : */
305 :
306 : #define SWIG_OK (0)
307 : /* Runtime errors are < 0 */
308 : #define SWIG_ERROR (-1)
309 : /* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
310 : /* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
311 : /* Errors < -200 are generic runtime specific errors */
312 : #define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
313 :
314 : #define SWIG_IsOK(r) (r >= 0)
315 : #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
316 :
317 : /* The CastRankLimit says how many bits are used for the cast rank */
318 : #define SWIG_CASTRANKLIMIT (1 << 8)
319 : /* The NewMask denotes the object was created (using new/malloc) */
320 : #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
321 : /* The TmpMask is for in/out typemaps that use temporary objects */
322 : #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
323 : /* Simple returning values */
324 : #define SWIG_BADOBJ (SWIG_ERROR)
325 : #define SWIG_OLDOBJ (SWIG_OK)
326 : #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
327 : #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
328 : /* Check, add and del object mask methods */
329 : #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
330 : #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
331 : #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
332 : #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
333 : #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
334 : #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
335 :
336 : /* Cast-Rank Mode */
337 : #if defined(SWIG_CASTRANK_MODE)
338 : # ifndef SWIG_TypeRank
339 : # define SWIG_TypeRank unsigned long
340 : # endif
341 : # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
342 : # define SWIG_MAXCASTRANK (2)
343 : # endif
344 : # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
345 : # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
346 : SWIGINTERNINLINE int SWIG_AddCast(int r) {
347 : return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
348 : }
349 : SWIGINTERNINLINE int SWIG_CheckState(int r) {
350 : return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
351 : }
352 : #else /* no cast-rank mode */
353 : # define SWIG_AddCast(r) (r)
354 : # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
355 : #endif
356 :
357 :
358 : #include <string.h>
359 :
360 : #ifdef __cplusplus
361 : extern "C" {
362 : #endif
363 :
364 : typedef void *(*swig_converter_func)(void *, int *);
365 : typedef struct swig_type_info *(*swig_dycast_func)(void **);
366 :
367 : /* Structure to store information on one type */
368 : typedef struct swig_type_info {
369 : const char *name; /* mangled name of this type */
370 : const char *str; /* human readable name of this type */
371 : swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
372 : struct swig_cast_info *cast; /* linked list of types that can cast into this type */
373 : void *clientdata; /* language specific type data */
374 : int owndata; /* flag if the structure owns the clientdata */
375 : } swig_type_info;
376 :
377 : /* Structure to store a type and conversion function used for casting */
378 : typedef struct swig_cast_info {
379 : swig_type_info *type; /* pointer to type that is equivalent to this type */
380 : swig_converter_func converter; /* function to cast the void pointers */
381 : struct swig_cast_info *next; /* pointer to next array of casts | pointer to cast hashed by value */
382 : unsigned int value; /* index of the last valid element in the array | typename hash value */
383 : } swig_cast_info;
384 :
385 : /* Structure used to store module information
386 : * Each module generates one structure like this, and the runtime collects
387 : * all of these structures and stores them in a circularly linked list.*/
388 : typedef struct swig_module_info {
389 : swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
390 : size_t size; /* Number of types in this module */
391 : struct swig_module_info *next; /* Pointer to next element in circularly linked list */
392 : swig_type_info **type_initial; /* Array of initially generated type structures */
393 : swig_cast_info **cast_initial; /* Array of initially generated casting structures */
394 : void *clientdata; /* Language specific module data */
395 : } swig_module_info;
396 :
397 : /*
398 : Compare two type names skipping the space characters, therefore
399 : "char*" == "char *" and "Class<int>" == "Class<int >", etc.
400 :
401 : Return 0 when the two name types are equivalent, as in
402 : strncmp, but skipping ' '.
403 : */
404 : SWIGRUNTIME int
405 0 : SWIG_TypeNameComp(const char *f1, const char *l1,
406 : const char *f2, const char *l2) {
407 0 : for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
408 0 : while ((*f1 == ' ') && (f1 != l1)) ++f1;
409 0 : while ((*f2 == ' ') && (f2 != l2)) ++f2;
410 0 : if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
411 : }
412 0 : return (int)((l1 - f1) - (l2 - f2));
413 : }
414 :
415 : /*
416 : Check type equivalence in a name list like <name1>|<name2>|...
417 : Return 0 if equal, -1 if nb < tb, 1 if nb > tb
418 : */
419 : SWIGRUNTIME int
420 0 : SWIG_TypeCmp(const char *nb, const char *tb) {
421 0 : int equiv = 1;
422 0 : const char* te = tb + strlen(tb);
423 0 : const char* ne = nb;
424 0 : while (equiv != 0 && *ne) {
425 0 : for (nb = ne; *ne; ++ne) {
426 0 : if (*ne == '|') break;
427 : }
428 0 : equiv = SWIG_TypeNameComp(nb, ne, tb, te);
429 0 : if (*ne) ++ne;
430 : }
431 0 : return equiv;
432 : }
433 :
434 : /*
435 : Check type equivalence in a name list like <name1>|<name2>|...
436 : Return 0 if not equal, 1 if equal
437 : */
438 : SWIGRUNTIME int
439 0 : SWIG_TypeEquiv(const char *nb, const char *tb) {
440 0 : return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
441 : }
442 :
443 : /*
444 : * Hash function for type name strings, based on maRushPrime1Hash (http://amsoftware.narod.ru/algo2.html)
445 : */
446 0 : SWIGRUNTIME unsigned int SWIG_Hash(const char *str, unsigned int len) {
447 0 : const unsigned char *data = (const unsigned char *)str;
448 0 : unsigned int hash = len, i = 0, k;
449 0 : int rem = (int)len;
450 :
451 0 : while (rem >= (int)sizeof(unsigned int)) {
452 0 : k = *(unsigned int *)data;
453 0 : k += i++;
454 0 : hash ^= k;
455 0 : hash *= 171717;
456 0 : data += sizeof(unsigned int);
457 0 : rem -= sizeof(unsigned int);
458 : }
459 :
460 0 : switch (rem) {
461 0 : case 3: k = (unsigned int)(data[2]) << 16;
462 0 : k |= (unsigned int)(data[1]) << 8;
463 0 : k |= (unsigned int)(data[0]);
464 0 : k += i++;
465 0 : hash ^= k;
466 0 : hash *= 171717;
467 0 : break;
468 0 : case 2: k = (unsigned int)(data[1]) << 8;
469 0 : k |= (unsigned int)(data[0]);
470 0 : k += i++;
471 0 : hash ^= k;
472 0 : hash *= 171717;
473 0 : break;
474 0 : case 1: k = (unsigned int)(data[0]);
475 0 : k += i++;
476 0 : hash ^= k;
477 0 : hash *= 171717;
478 0 : break;
479 : }
480 0 : return hash;
481 : }
482 :
483 : /*
484 : Check the typename
485 : */
486 : SWIGRUNTIME swig_cast_info *
487 42 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
488 : static const unsigned int scan_threshold = 4;
489 42 : if (ty) {
490 42 : swig_cast_info *head = ty->cast;
491 42 : unsigned int hash_value = 0;
492 42 : int hashed = 0;
493 :
494 42 : while (head) {
495 :
496 42 : if (strcmp(head->type->name, c) == 0) {
497 42 : return head;
498 : }
499 :
500 0 : if (head->value) {
501 : swig_cast_info *iter;
502 0 : swig_cast_info *last = head + head->value;
503 0 : swig_cast_info *first = head + 1;
504 0 : int search = 1;
505 :
506 0 : if (!hashed) {
507 0 : if (head->value < scan_threshold) {
508 0 : for (iter = first; iter <= last; iter++) {
509 0 : if (strcmp(iter->type->name, c) == 0) {
510 0 : return iter;
511 : }
512 : }
513 0 : search = 0;
514 : } else {
515 0 : hashed = 1;
516 0 : hash_value = SWIG_Hash(c, (unsigned int)strlen(c));
517 : }
518 : }
519 :
520 0 : if (search) {
521 : /* Binary search over sorted <'next'|'value'> pairs */
522 : do {
523 0 : iter = first + ((last - first) >> 1);
524 0 : if (iter->value < hash_value) {
525 0 : first = iter + 1;
526 0 : } else if (iter->value == hash_value) {
527 :
528 0 : if (strcmp(iter->next->type->name, c) == 0) {
529 0 : return iter->next;
530 : }
531 :
532 : /* Hash collision check */
533 0 : for (last = iter + 1; last->next && last->value == hash_value; last++) {
534 0 : if (strcmp(last->next->type->name, c) == 0) {
535 0 : return last->next;
536 : }
537 : }
538 0 : for (first = iter - 1; first != head && first->value == hash_value; first--) {
539 0 : if (strcmp(first->next->type->name, c) == 0) {
540 0 : return first->next;
541 : }
542 : }
543 0 : break;
544 : } else
545 0 : last = iter - 1;
546 0 : } while (first <= last);
547 : }
548 : }
549 0 : head = head->next;
550 : }
551 : }
552 0 : return 0;
553 : }
554 :
555 : /*
556 : Check the type by type address
557 : */
558 : SWIGRUNTIME swig_cast_info *
559 0 : SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) {
560 0 : if (ty) {
561 0 : swig_cast_info *head = ty->cast;
562 0 : while (head) {
563 0 : if (head->type == from) {
564 0 : return head;
565 : }
566 :
567 0 : if (head->value) {
568 : swig_cast_info *iter;
569 0 : swig_cast_info *last = head + head->value;
570 0 : swig_cast_info *first = head + 1;
571 :
572 : /* Binary search over sorted array of casts */
573 : do {
574 0 : iter = first + ((last - first) >> 1);
575 0 : if (iter->type < from) {
576 0 : first = iter + 1;
577 0 : } else if (iter->type == from) {
578 0 : return iter;
579 : } else
580 0 : last = iter - 1;
581 0 : } while (first <= last);
582 : }
583 0 : head = head->next;
584 : }
585 : }
586 0 : return 0;
587 : }
588 :
589 : /*
590 : Cast a pointer up an inheritance hierarchy
591 : */
592 : SWIGRUNTIMEINLINE void *
593 0 : SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
594 0 : return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
595 : }
596 :
597 : /*
598 : Dynamic pointer casting. Down an inheritance hierarchy
599 : */
600 : SWIGRUNTIME swig_type_info *
601 0 : SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
602 0 : swig_type_info *lastty = ty;
603 0 : if (!ty || !ty->dcast) return ty;
604 0 : while (ty && (ty->dcast)) {
605 0 : ty = (*ty->dcast)(ptr);
606 0 : if (ty) lastty = ty;
607 : }
608 0 : return lastty;
609 : }
610 :
611 : /*
612 : Return the name associated with this type
613 : */
614 : SWIGRUNTIMEINLINE const char *
615 : SWIG_TypeName(const swig_type_info *ty) {
616 : return ty->name;
617 : }
618 :
619 : /*
620 : Return the pretty name associated with this type,
621 : that is an unmangled type name in a form presentable to the user.
622 : */
623 : SWIGRUNTIME const char *
624 0 : SWIG_TypePrettyName(const swig_type_info *type) {
625 : /* The "str" field contains the equivalent pretty names of the
626 : type, separated by vertical-bar characters. Choose the last
627 : name. It should be the most specific; a fully resolved name
628 : but not necessarily with default template parameters expanded. */
629 0 : if (!type) return NULL;
630 0 : if (type->str != NULL) {
631 0 : const char *last_name = type->str;
632 : const char *s;
633 0 : for (s = type->str; *s; s++)
634 0 : if (*s == '|') last_name = s+1;
635 0 : return last_name;
636 : }
637 : else
638 0 : return type->name;
639 : }
640 :
641 : /*
642 : Set the clientdata field for a type
643 : */
644 : SWIGRUNTIME void
645 0 : SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
646 0 : swig_cast_info *head = ti->cast;
647 : /* if (ti->clientdata == clientdata) return; */
648 0 : ti->clientdata = clientdata;
649 :
650 0 : while (head) {
651 : swig_cast_info *cast;
652 0 : for (cast = head; (cast - head) <= head->value; cast++) {
653 0 : if (!cast->converter) {
654 0 : swig_type_info *tc = cast->type;
655 0 : if (!tc->clientdata) {
656 0 : SWIG_TypeClientData(tc, clientdata);
657 : }
658 : }
659 : }
660 0 : head = head->next;
661 : }
662 0 : }
663 :
664 : SWIGRUNTIME void
665 0 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
666 0 : SWIG_TypeClientData(ti, clientdata);
667 0 : ti->owndata = 1;
668 0 : }
669 :
670 : /*
671 : Search for a swig_type_info structure only by mangled name
672 : Search is a O(log #types)
673 :
674 : We start searching at module start, and finish searching when start == end.
675 : Note: if start == end at the beginning of the function, we go all the way around
676 : the circular list.
677 : */
678 : SWIGRUNTIME swig_type_info *
679 126 : SWIG_MangledTypeQueryModule(swig_module_info *start,
680 : swig_module_info *end,
681 : const char *name) {
682 126 : swig_module_info *iter = start;
683 : do {
684 210 : if (iter->size) {
685 210 : size_t l = 0;
686 210 : size_t r = iter->size - 1;
687 : do {
688 : /* since l+r >= 0, we can (>> 1) instead (/ 2) */
689 1118 : size_t i = (l + r) >> 1;
690 1118 : const char *iname = iter->types[i]->name;
691 1118 : if (iname) {
692 1118 : int compare = strcmp(name, iname);
693 1118 : if (compare == 0) {
694 84 : return iter->types[i];
695 1034 : } else if (compare < 0) {
696 450 : if (i) {
697 450 : r = i - 1;
698 : } else {
699 0 : break;
700 : }
701 584 : } else if (compare > 0) {
702 584 : l = i + 1;
703 : }
704 : } else {
705 0 : break; /* should never happen */
706 : }
707 1034 : } while (l <= r);
708 : }
709 126 : iter = iter->next;
710 126 : } while (iter != end);
711 42 : return 0;
712 : }
713 :
714 : /*
715 : Search for a swig_type_info structure for either a mangled name or a human readable name.
716 : It first searches the mangled names of the types, which is a O(log #types)
717 : If a type is not found it then searches the human readable names, which is O(#types).
718 :
719 : We start searching at module start, and finish searching when start == end.
720 : Note: if start == end at the beginning of the function, we go all the way around
721 : the circular list.
722 : */
723 : SWIGRUNTIME swig_type_info *
724 0 : SWIG_TypeQueryModule(swig_module_info *start,
725 : swig_module_info *end,
726 : const char *name) {
727 : /* STEP 1: Search the name field using binary search */
728 0 : swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
729 0 : if (ret) {
730 0 : return ret;
731 : } else {
732 : /* STEP 2: If the type hasn't been found, do a complete search
733 : of the str field (the human readable name) */
734 0 : swig_module_info *iter = start;
735 : do {
736 0 : size_t i = 0;
737 0 : for (; i < iter->size; ++i) {
738 0 : if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
739 0 : return iter->types[i];
740 : }
741 0 : iter = iter->next;
742 0 : } while (iter != end);
743 : }
744 :
745 : /* neither found a match */
746 0 : return 0;
747 : }
748 :
749 : /*
750 : Pack binary data into a string
751 : */
752 : SWIGRUNTIME char *
753 0 : SWIG_PackData(char *c, void *ptr, size_t sz) {
754 : static const char hex[17] = "0123456789abcdef";
755 0 : const unsigned char *u = (unsigned char *) ptr;
756 0 : const unsigned char *eu = u + sz;
757 0 : for (; u != eu; ++u) {
758 0 : unsigned char uu = *u;
759 0 : *(c++) = hex[(uu & 0xf0) >> 4];
760 0 : *(c++) = hex[uu & 0xf];
761 : }
762 0 : return c;
763 : }
764 :
765 : /*
766 : Unpack binary data from a string
767 : */
768 : SWIGRUNTIME const char *
769 0 : SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
770 0 : unsigned char *u = (unsigned char *) ptr;
771 0 : const unsigned char *eu = u + sz;
772 0 : for (; u != eu; ++u) {
773 0 : char d = *(c++);
774 : unsigned char uu;
775 0 : if ((d >= '0') && (d <= '9'))
776 0 : uu = (unsigned char)((d - '0') << 4);
777 0 : else if ((d >= 'a') && (d <= 'f'))
778 0 : uu = (unsigned char)((d - ('a'-10)) << 4);
779 : else
780 0 : return (char *) 0;
781 0 : d = *(c++);
782 0 : if ((d >= '0') && (d <= '9'))
783 0 : uu |= (unsigned char)(d - '0');
784 0 : else if ((d >= 'a') && (d <= 'f'))
785 0 : uu |= (unsigned char)(d - ('a'-10));
786 : else
787 0 : return (char *) 0;
788 0 : *u = uu;
789 : }
790 0 : return c;
791 : }
792 :
793 : /*
794 : Pack 'void *' into a string buffer.
795 : */
796 : SWIGRUNTIME char *
797 0 : SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
798 0 : char *r = buff;
799 0 : if ((2*sizeof(void *) + 2) > bsz) return 0;
800 0 : *(r++) = '_';
801 0 : r = SWIG_PackData(r,&ptr,sizeof(void *));
802 0 : if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
803 0 : strcpy(r,name);
804 0 : return buff;
805 : }
806 :
807 : SWIGRUNTIME const char *
808 0 : SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
809 0 : if (*c != '_') {
810 0 : if (strcmp(c,"NULL") == 0) {
811 0 : *ptr = (void *) 0;
812 0 : return name;
813 : } else {
814 0 : return 0;
815 : }
816 : }
817 0 : return SWIG_UnpackData(++c,ptr,sizeof(void *));
818 : }
819 :
820 : SWIGRUNTIME char *
821 0 : SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
822 0 : char *r = buff;
823 0 : size_t lname = (name ? strlen(name) : 0);
824 0 : if ((2*sz + 2 + lname) > bsz) return 0;
825 0 : *(r++) = '_';
826 0 : r = SWIG_PackData(r,ptr,sz);
827 0 : if (lname) {
828 0 : strncpy(r,name,lname+1);
829 : } else {
830 0 : *r = 0;
831 : }
832 0 : return buff;
833 : }
834 :
835 : SWIGRUNTIME const char *
836 0 : SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
837 0 : if (*c != '_') {
838 0 : if (strcmp(c,"NULL") == 0) {
839 0 : memset(ptr,0,sz);
840 0 : return name;
841 : } else {
842 0 : return 0;
843 : }
844 : }
845 0 : return SWIG_UnpackData(++c,ptr,sz);
846 : }
847 :
848 : #ifdef __cplusplus
849 : }
850 : #endif
851 :
852 : /* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
853 : #define SWIG_UnknownError -1
854 : #define SWIG_IOError -2
855 : #define SWIG_RuntimeError -3
856 : #define SWIG_IndexError -4
857 : #define SWIG_TypeError -5
858 : #define SWIG_DivisionByZero -6
859 : #define SWIG_OverflowError -7
860 : #define SWIG_SyntaxError -8
861 : #define SWIG_ValueError -9
862 : #define SWIG_SystemError -10
863 : #define SWIG_AttributeError -11
864 : #define SWIG_MemoryError -12
865 : #define SWIG_NullReferenceError -13
866 :
867 :
868 : /* -----------------------------------------------------------------------------
869 : * guile_scm_run.swg
870 : * ----------------------------------------------------------------------------- */
871 :
872 : #if __GNUC__ >= 10
873 : #if defined(__cplusplus)
874 : #pragma GCC diagnostic ignored "-Wvolatile" /* For 'volatile SCM *' in at least Guile 3.0 and earlier */
875 : #endif
876 : #endif
877 :
878 : #include <libguile.h>
879 : #include <stdio.h>
880 : #include <string.h>
881 : #include <stdlib.h>
882 : #include <assert.h>
883 :
884 : #ifdef __cplusplus
885 : extern "C" {
886 : #endif
887 :
888 :
889 : /* In the code below, use guile 2.0 compatible functions where possible.
890 : Functions that don't exist in older versions will be mapped to
891 : a deprecated equivalent for those versions only */
892 : #if defined (SCM_MAJOR_VERSION) && (SCM_MAJOR_VERSION < 2)
893 :
894 : static SCM
895 : scm_module_variable (SCM module, SCM sym)
896 : {
897 : return scm_sym2var (sym, scm_module_lookup_closure (module), SCM_BOOL_F);
898 : }
899 :
900 : #define scm_to_utf8_string scm_to_locale_string
901 : #define scm_from_utf8_string scm_from_locale_string
902 : #endif
903 :
904 : #if SCM_MAJOR_VERSION >= 2
905 : /* scm_c_define_gsubr takes a different parameter type depending on the guile version */
906 :
907 : typedef scm_t_subr swig_guile_proc;
908 : #else
909 : typedef SCM (*swig_guile_proc)();
910 : #endif
911 : typedef SCM (*guile_destructor)(SCM);
912 :
913 : typedef struct swig_guile_clientdata {
914 : guile_destructor destroy;
915 : SCM goops_class;
916 : } swig_guile_clientdata;
917 :
918 : #define SWIG_scm2str(s) \
919 : SWIG_Guile_scm2newstr(s, NULL)
920 : #define SWIG_str02scm(str) \
921 : str ? scm_from_utf8_string(str) : SCM_BOOL_F
922 : # define SWIG_malloc(size) \
923 : scm_malloc(size)
924 : # define SWIG_free(mem) \
925 : free(mem)
926 : #define SWIG_ConvertPtr(s, result, type, flags) \
927 : SWIG_Guile_ConvertPtr(s, result, type, flags)
928 : #define SWIG_MustGetPtr(s, type, argnum, flags) \
929 : SWIG_Guile_MustGetPtr(s, type, argnum, flags, FUNC_NAME)
930 : #define SWIG_NewPointerObj(ptr, type, owner) \
931 : SWIG_Guile_NewPointerObj((void*)ptr, type, owner)
932 : #define SWIG_PointerAddress(object) \
933 : SWIG_Guile_PointerAddress(object)
934 : #define SWIG_PointerType(object) \
935 : SWIG_Guile_PointerType(object)
936 : #define SWIG_IsPointerOfType(object, type) \
937 : SWIG_Guile_IsPointerOfType(object, type)
938 : #define SWIG_IsPointer(object) \
939 : SWIG_Guile_IsPointer(object)
940 : #define SWIG_contract_assert(expr, msg) \
941 : do { \
942 : if (!(expr)) \
943 : scm_error(scm_from_locale_symbol("swig-contract-assertion-failed"), \
944 : FUNC_NAME, msg, SCM_EOL, SCM_BOOL_F); \
945 : } while (0)
946 :
947 : /* for C++ member pointers, ie, member methods */
948 : #define SWIG_ConvertMember(obj, ptr, sz, ty) \
949 : SWIG_Guile_ConvertMember(obj, ptr, sz, ty, FUNC_NAME)
950 : #define SWIG_NewMemberObj(ptr, sz, type) \
951 : SWIG_Guile_NewMemberObj(ptr, sz, type, FUNC_NAME)
952 :
953 : /* Runtime API */
954 : static swig_module_info *SWIG_Guile_GetModule(void *SWIGUNUSEDPARM(clientdata));
955 : #define SWIG_GetModule(clientdata) SWIG_Guile_GetModule(clientdata)
956 : #define SWIG_SetModule(clientdata, pointer) SWIG_Guile_SetModule(pointer)
957 :
958 : SWIGINTERN char *
959 0 : SWIG_Guile_scm2newstr(SCM str, size_t *len) {
960 : #define FUNC_NAME "SWIG_Guile_scm2newstr"
961 0 : SCM_ASSERT (scm_is_string(str), str, 1, FUNC_NAME);
962 :
963 0 : return scm_to_utf8_stringn(str, len);
964 : #undef FUNC_NAME
965 : }
966 :
967 : static int swig_initialized = 0;
968 : static scm_t_bits swig_tag = 0;
969 : static scm_t_bits swig_collectable_tag = 0;
970 : static scm_t_bits swig_finalized_tag = 0;
971 : static scm_t_bits swig_destroyed_tag = 0;
972 : static scm_t_bits swig_member_function_tag = 0;
973 : static SCM swig_make_func = SCM_EOL;
974 : static SCM swig_keyword = SCM_EOL;
975 : static SCM swig_symbol = SCM_EOL;
976 :
977 : #define SWIG_Guile_GetSmob(x) \
978 : ( !scm_is_null(x) && SCM_INSTANCEP(x) && scm_is_true(scm_slot_exists_p(x, swig_symbol)) \
979 : ? scm_slot_ref(x, swig_symbol) : (x) )
980 :
981 : SWIGINTERN void SWIG_Guile_MarkPointerNoncollectable(SCM s);
982 :
983 : SWIGINTERN SCM
984 0 : SWIG_Guile_NewPointerObj(void *ptr, swig_type_info *type, int owner)
985 : {
986 0 : if (ptr == NULL)
987 0 : return SCM_EOL;
988 : else {
989 : SCM smob;
990 0 : swig_guile_clientdata *cdata = (swig_guile_clientdata *) type->clientdata;
991 0 : if (owner)
992 0 : SCM_NEWSMOB2(smob, swig_collectable_tag, ptr, (void *) type);
993 : else
994 0 : SCM_NEWSMOB2(smob, swig_tag, ptr, (void *) type);
995 :
996 0 : if (!cdata || scm_is_null(cdata->goops_class) || swig_make_func == SCM_EOL ) {
997 0 : return smob;
998 : } else {
999 : /* the scm_make() C function only handles the creation of gf,
1000 : methods and classes (no instances) the (make ...) function is
1001 : later redefined in goops.scm. So we need to call that
1002 : Scheme function. */
1003 0 : return scm_apply(swig_make_func,
1004 : scm_list_3(cdata->goops_class,
1005 : swig_keyword,
1006 : smob),
1007 : SCM_EOL);
1008 : }
1009 : }
1010 : }
1011 :
1012 : SWIGINTERN unsigned long
1013 0 : SWIG_Guile_PointerAddress(SCM object)
1014 : {
1015 0 : SCM smob = SWIG_Guile_GetSmob(object);
1016 0 : if (scm_is_null(smob)) return 0;
1017 0 : else if (SCM_SMOB_PREDICATE(swig_tag, smob)
1018 0 : || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
1019 0 : || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) {
1020 0 : return (unsigned long) (void *) SCM_CELL_WORD_1(smob);
1021 : }
1022 0 : else scm_wrong_type_arg("SWIG-Guile-PointerAddress", 1, object);
1023 : }
1024 :
1025 : SWIGINTERN swig_type_info *
1026 0 : SWIG_Guile_PointerType(SCM object)
1027 : {
1028 0 : SCM smob = SWIG_Guile_GetSmob(object);
1029 0 : if (scm_is_null(smob)) return NULL;
1030 0 : else if (SCM_SMOB_PREDICATE(swig_tag, smob)
1031 0 : || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
1032 0 : || SCM_SMOB_PREDICATE(swig_destroyed_tag, smob)) {
1033 0 : return (swig_type_info *) SCM_CELL_WORD_2(smob);
1034 : }
1035 0 : else scm_wrong_type_arg("SWIG-Guile-PointerType", 1, object);
1036 : }
1037 :
1038 : SWIGINTERN int
1039 0 : SWIG_Guile_IsValidSmob(SCM smob)
1040 : {
1041 : /* We do not accept smobs representing destroyed pointers, but we have to
1042 : allow finalized smobs because Guile >= 2.0.12 sets all smob instances
1043 : to the 'finalized' type before calling their 'free' function. This change
1044 : was introduced to Guile in commit 8dff3af087c6eaa83ae0d72aa8b22aef5c65d65d */
1045 0 : return SCM_SMOB_PREDICATE(swig_tag, smob)
1046 0 : || SCM_SMOB_PREDICATE(swig_collectable_tag, smob)
1047 0 : || SCM_SMOB_PREDICATE(swig_finalized_tag, smob);
1048 : }
1049 :
1050 : SWIGINTERN int
1051 0 : SWIG_Guile_ConvertPtr(SCM s, void **result, swig_type_info *type, int flags)
1052 : {
1053 : swig_cast_info *cast;
1054 : swig_type_info *from;
1055 0 : SCM smob = SWIG_Guile_GetSmob(s);
1056 0 : int ret = SWIG_ERROR;
1057 :
1058 0 : if (scm_is_null(smob)) {
1059 0 : *result = NULL;
1060 0 : return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
1061 : #if SCM_MAJOR_VERSION >= 2
1062 0 : } else if (SCM_POINTER_P(s)) {
1063 0 : *result = SCM_POINTER_VALUE(s);
1064 0 : return SWIG_OK;
1065 : #endif /* if SCM_MAJOR_VERSION >= 2 */
1066 0 : } else if (SWIG_Guile_IsValidSmob(smob)) {
1067 0 : from = (swig_type_info *) SCM_CELL_WORD_2(smob);
1068 0 : if (!from) return SWIG_ERROR;
1069 :
1070 0 : if ((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) {
1071 0 : if ((SCM_CELL_TYPE(smob) == swig_collectable_tag && SCM_CELL_WORD_1(smob) == 0) || SCM_CELL_TYPE(smob) == swig_tag) {
1072 0 : return SWIG_ERROR_RELEASE_NOT_OWNED;
1073 : }
1074 : }
1075 :
1076 0 : if (type) {
1077 0 : cast = SWIG_TypeCheckStruct(from, type);
1078 0 : if (cast) {
1079 0 : int newmemory = 0;
1080 0 : *result = SWIG_TypeCast(cast, (void *) SCM_CELL_WORD_1(smob), &newmemory);
1081 0 : assert(!newmemory); /* newmemory handling not yet implemented */
1082 0 : ret = SWIG_OK;
1083 : } else {
1084 0 : return SWIG_ERROR;
1085 : }
1086 : } else {
1087 0 : *result = (void *) SCM_CELL_WORD_1(smob);
1088 0 : ret = SWIG_OK;
1089 : }
1090 :
1091 0 : if (flags & SWIG_POINTER_DISOWN) {
1092 0 : SWIG_Guile_MarkPointerNoncollectable(smob);
1093 : }
1094 0 : if (flags & SWIG_POINTER_CLEAR) {
1095 0 : SCM_SET_CELL_WORD_1(smob, 0);
1096 : }
1097 : }
1098 0 : return ret;
1099 : }
1100 :
1101 : SWIGINTERNINLINE void *
1102 0 : SWIG_Guile_MustGetPtr (SCM s, swig_type_info *type,
1103 : int argnum, int flags, const char *func_name)
1104 : {
1105 : void *result;
1106 0 : int res = SWIG_Guile_ConvertPtr(s, &result, type, flags);
1107 0 : if (!SWIG_IsOK(res)) {
1108 : /* type mismatch */
1109 0 : scm_wrong_type_arg(func_name, argnum, s);
1110 : }
1111 0 : return result;
1112 : }
1113 :
1114 : SWIGINTERNINLINE int
1115 : SWIG_Guile_IsPointerOfType (SCM s, swig_type_info *type)
1116 : {
1117 : void *result;
1118 : if (SWIG_Guile_ConvertPtr(s, &result, type, 0)) {
1119 : /* type mismatch */
1120 : return 0;
1121 : }
1122 : else return 1;
1123 : }
1124 :
1125 : SWIGINTERNINLINE int
1126 : SWIG_Guile_IsPointer (SCM s)
1127 : {
1128 : /* module might not be initialized yet, so initialize it */
1129 : SWIG_GetModule(0);
1130 : return SWIG_Guile_IsPointerOfType (s, NULL);
1131 : }
1132 :
1133 : /* Mark a pointer object non-collectable */
1134 : SWIGINTERN void
1135 0 : SWIG_Guile_MarkPointerNoncollectable(SCM s)
1136 : {
1137 0 : SCM smob = SWIG_Guile_GetSmob(s);
1138 0 : if (!scm_is_null(smob)) {
1139 0 : if (SWIG_Guile_IsValidSmob(smob)) {
1140 0 : SCM_SET_CELL_TYPE(smob, swig_tag);
1141 : }
1142 0 : else scm_wrong_type_arg(NULL, 0, s);
1143 : }
1144 0 : }
1145 :
1146 : /* Mark a pointer object destroyed */
1147 : SWIGINTERN void
1148 0 : SWIG_Guile_MarkPointerDestroyed(SCM s)
1149 : {
1150 0 : SCM smob = SWIG_Guile_GetSmob(s);
1151 0 : if (!scm_is_null(smob)) {
1152 0 : if (SWIG_Guile_IsValidSmob(smob)) {
1153 0 : SCM_SET_CELL_TYPE(smob, swig_destroyed_tag);
1154 : }
1155 0 : else scm_wrong_type_arg(NULL, 0, s);
1156 : }
1157 0 : }
1158 :
1159 : /* Member functions */
1160 :
1161 : SWIGINTERN SCM
1162 0 : SWIG_Guile_NewMemberObj(void *ptr, size_t sz, swig_type_info *type,
1163 : const char *func_name)
1164 : {
1165 : SCM smob;
1166 0 : void *copy = malloc(sz);
1167 0 : memcpy(copy, ptr, sz);
1168 0 : SCM_NEWSMOB2(smob, swig_member_function_tag, copy, (void *) type);
1169 0 : return smob;
1170 : }
1171 :
1172 : SWIGINTERN int
1173 0 : SWIG_Guile_ConvertMember(SCM smob, void *ptr, size_t sz, swig_type_info *type,
1174 : const char *func_name)
1175 : {
1176 : swig_cast_info *cast;
1177 : swig_type_info *from;
1178 :
1179 0 : if (SCM_SMOB_PREDICATE(swig_member_function_tag, smob)) {
1180 0 : from = (swig_type_info *) SCM_CELL_WORD_2(smob);
1181 0 : if (!from) return SWIG_ERROR;
1182 0 : if (type) {
1183 0 : cast = SWIG_TypeCheckStruct(from, type);
1184 0 : if (!cast) return SWIG_ERROR;
1185 : }
1186 0 : memcpy(ptr, (void *) SCM_CELL_WORD_1(smob), sz);
1187 0 : return SWIG_OK;
1188 : }
1189 0 : return SWIG_ERROR;
1190 : }
1191 :
1192 :
1193 : /* Init */
1194 :
1195 : SWIGINTERN int
1196 0 : print_swig_aux (SCM swig_smob, SCM port, scm_print_state *pstate,
1197 : const char *attribute)
1198 : {
1199 : swig_type_info *type;
1200 :
1201 0 : type = (swig_type_info *) SCM_CELL_WORD_2(swig_smob);
1202 0 : if (type) {
1203 0 : scm_puts("#<", port);
1204 0 : scm_puts(attribute, port);
1205 0 : scm_puts("swig-pointer ", port);
1206 0 : scm_puts(SWIG_TypePrettyName(type), port);
1207 0 : scm_puts(" ", port);
1208 0 : scm_intprint((long) SCM_CELL_WORD_1(swig_smob), 16, port);
1209 0 : scm_puts(">", port);
1210 : /* non-zero means success */
1211 0 : return 1;
1212 : } else {
1213 0 : return 0;
1214 : }
1215 : }
1216 :
1217 :
1218 : SWIGINTERN int
1219 0 : print_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
1220 : {
1221 0 : return print_swig_aux(swig_smob, port, pstate, "");
1222 : }
1223 :
1224 : SWIGINTERN int
1225 0 : print_collectable_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
1226 : {
1227 0 : return print_swig_aux(swig_smob, port, pstate, "collectable-");
1228 : }
1229 :
1230 : SWIGINTERN int
1231 0 : print_destroyed_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
1232 : {
1233 0 : return print_swig_aux(swig_smob, port, pstate, "destroyed-");
1234 : }
1235 :
1236 : SWIGINTERN int
1237 0 : print_member_function_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
1238 : {
1239 : swig_type_info *type;
1240 0 : type = (swig_type_info *) SCM_CELL_WORD_2(swig_smob);
1241 0 : if (type) {
1242 0 : scm_puts("#<", port);
1243 0 : scm_puts("swig-member-function-pointer ", port);
1244 0 : scm_puts(SWIG_TypePrettyName(type), port);
1245 0 : scm_puts(" >", port);
1246 : /* non-zero means success */
1247 0 : return 1;
1248 : } else {
1249 0 : return 0;
1250 : }
1251 : }
1252 :
1253 : SWIGINTERN SCM
1254 0 : equalp_swig (SCM A, SCM B)
1255 : {
1256 0 : if (SCM_CELL_WORD_0(A) == SCM_CELL_WORD_0(B) && SCM_CELL_WORD_1(A) == SCM_CELL_WORD_1(B)
1257 0 : && SCM_CELL_WORD_2(A) == SCM_CELL_WORD_2(B))
1258 0 : return SCM_BOOL_T;
1259 0 : else return SCM_BOOL_F;
1260 : }
1261 :
1262 : SWIGINTERN size_t
1263 0 : free_swig(SCM A)
1264 : {
1265 0 : swig_type_info *type = (swig_type_info *) SCM_CELL_WORD_2(A);
1266 0 : if (type) {
1267 0 : if (type->clientdata && ((swig_guile_clientdata *)type->clientdata)->destroy)
1268 0 : ((swig_guile_clientdata *)type->clientdata)->destroy(A);
1269 : }
1270 0 : return 0;
1271 : }
1272 :
1273 : SWIGINTERN size_t
1274 0 : free_swig_member_function(SCM A)
1275 : {
1276 0 : free((swig_type_info *) SCM_CELL_WORD_1(A));
1277 0 : return 0;
1278 : }
1279 :
1280 : SWIGINTERN int
1281 12 : ensure_smob_tag(SCM swig_module,
1282 : scm_t_bits *tag_variable,
1283 : const char *smob_name,
1284 : const char *scheme_variable_name)
1285 : {
1286 12 : SCM variable = scm_module_variable(swig_module,
1287 : scm_from_locale_symbol(scheme_variable_name));
1288 12 : if (scm_is_false(variable)) {
1289 0 : *tag_variable = scm_make_smob_type(scheme_variable_name, 0);
1290 0 : scm_c_module_define(swig_module, scheme_variable_name,
1291 : scm_from_ulong(*tag_variable));
1292 0 : return 1;
1293 : }
1294 : else {
1295 12 : *tag_variable = scm_to_ulong(SCM_VARIABLE_REF(variable));
1296 12 : return 0;
1297 : }
1298 : }
1299 :
1300 : SWIGINTERN SCM
1301 24 : SWIG_Guile_Init ()
1302 : {
1303 : static SCM swig_module;
1304 :
1305 24 : if (swig_initialized) return swig_module;
1306 3 : swig_initialized = 1;
1307 :
1308 3 : swig_module = scm_c_resolve_module("Swig swigrun");
1309 3 : if (ensure_smob_tag(swig_module, &swig_tag,
1310 : "swig-pointer", "swig-pointer-tag")) {
1311 0 : scm_set_smob_print(swig_tag, print_swig);
1312 0 : scm_set_smob_equalp(swig_tag, equalp_swig);
1313 : }
1314 3 : if (ensure_smob_tag(swig_module, &swig_collectable_tag,
1315 : "collectable-swig-pointer", "collectable-swig-pointer-tag")) {
1316 0 : scm_set_smob_print(swig_collectable_tag, print_collectable_swig);
1317 0 : scm_set_smob_equalp(swig_collectable_tag, equalp_swig);
1318 0 : scm_set_smob_free(swig_collectable_tag, free_swig);
1319 : /* For Guile >= 2.0.12. See libguile/smob.c:clear_smobnum */
1320 0 : swig_finalized_tag = swig_collectable_tag & ~0xff00;
1321 : }
1322 3 : if (ensure_smob_tag(swig_module, &swig_destroyed_tag,
1323 : "destroyed-swig-pointer", "destroyed-swig-pointer-tag")) {
1324 0 : scm_set_smob_print(swig_destroyed_tag, print_destroyed_swig);
1325 0 : scm_set_smob_equalp(swig_destroyed_tag, equalp_swig);
1326 : }
1327 3 : if (ensure_smob_tag(swig_module, &swig_member_function_tag,
1328 : "swig-member-function-pointer", "swig-member-function-pointer-tag")) {
1329 0 : scm_set_smob_print(swig_member_function_tag, print_member_function_swig);
1330 0 : scm_set_smob_free(swig_member_function_tag, free_swig_member_function);
1331 : }
1332 3 : swig_make_func = scm_permanent_object(
1333 : scm_variable_ref(scm_c_module_lookup(scm_c_resolve_module("oop goops"), "make")));
1334 3 : swig_keyword = scm_permanent_object(scm_from_locale_keyword("init-smob"));
1335 3 : swig_symbol = scm_permanent_object(scm_from_locale_symbol("swig-smob"));
1336 : #ifdef SWIG_INIT_RUNTIME_MODULE
1337 : SWIG_INIT_RUNTIME_MODULE
1338 : #endif
1339 :
1340 3 : return swig_module;
1341 : }
1342 :
1343 : SWIGINTERN swig_module_info *
1344 24 : SWIG_Guile_GetModule(void *SWIGUNUSEDPARM(clientdata))
1345 : {
1346 24 : SCM module = SWIG_Guile_Init();
1347 24 : SCM variable = scm_module_variable(module, scm_from_locale_symbol("swig-type-list-address" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME));
1348 24 : if (scm_is_false(variable)) {
1349 0 : return NULL;
1350 : } else {
1351 24 : return (swig_module_info *) scm_to_ulong(SCM_VARIABLE_REF(variable));
1352 : }
1353 : }
1354 :
1355 : SWIGINTERN void
1356 0 : SWIG_Guile_SetModule(swig_module_info *swig_module)
1357 : {
1358 0 : SCM module = SWIG_Guile_Init();
1359 0 : scm_module_define(module,
1360 : scm_from_locale_symbol("swig-type-list-address" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME),
1361 : scm_from_ulong((unsigned long) swig_module));
1362 0 : }
1363 :
1364 : SWIGINTERN int
1365 0 : SWIG_Guile_GetArgs (SCM *dest, SCM rest,
1366 : int reqargs, int optargs,
1367 : const char *procname)
1368 : {
1369 : int i;
1370 0 : int num_args_passed = 0;
1371 0 : for (i = 0; i<reqargs; i++) {
1372 0 : if (!scm_is_pair(rest))
1373 0 : scm_wrong_num_args(scm_from_utf8_string(procname ? procname : "unknown procedure"));
1374 0 : *dest++ = SCM_CAR(rest);
1375 0 : rest = SCM_CDR(rest);
1376 0 : num_args_passed++;
1377 : }
1378 0 : for (i = 0; i<optargs && scm_is_pair(rest); i++) {
1379 0 : *dest++ = SCM_CAR(rest);
1380 0 : rest = SCM_CDR(rest);
1381 0 : num_args_passed++;
1382 : }
1383 0 : for (; i<optargs; i++)
1384 0 : *dest++ = SCM_UNDEFINED;
1385 0 : if (!scm_is_null(rest))
1386 0 : scm_wrong_num_args(scm_from_utf8_string(procname ? procname : "unknown procedure"));
1387 0 : return num_args_passed;
1388 : }
1389 :
1390 : #ifdef __cplusplus
1391 : }
1392 : #endif
1393 :
1394 :
1395 :
1396 : #define GUILE_MAYBE_VALUES \
1397 : if (gswig_list_p) gswig_result = scm_values(gswig_result);
1398 :
1399 : #define GUILE_MAYBE_VECTOR \
1400 : if (gswig_list_p) gswig_result = scm_vector(gswig_result);
1401 :
1402 : #define SWIG_APPEND_VALUE(object) \
1403 : if (gswig_result == SCM_UNSPECIFIED) \
1404 : gswig_result = object; \
1405 : else { \
1406 : if (!gswig_list_p) { \
1407 : gswig_list_p = 1; \
1408 : gswig_result = scm_list_n(gswig_result, object, SCM_UNDEFINED); \
1409 : } \
1410 : else \
1411 : gswig_result = scm_append(scm_list_n(gswig_result, scm_list_n(object, SCM_UNDEFINED), SCM_UNDEFINED)); \
1412 : }
1413 :
1414 :
1415 :
1416 : /* -------- TYPES TABLE (BEGIN) -------- */
1417 :
1418 : #define SWIGTYPE_p_GncMainWindow swig_types[0]
1419 : #define SWIGTYPE_p_GtkLabel swig_types[1]
1420 : #define SWIGTYPE_p_GtkProgressBar swig_types[2]
1421 : #define SWIGTYPE_p_GtkTextView swig_types[3]
1422 : #define SWIGTYPE_p_GtkWidget swig_types[4]
1423 : #define SWIGTYPE_p__GNCProgressDialog swig_types[5]
1424 : #define SWIGTYPE_p_char swig_types[6]
1425 : #define SWIGTYPE_p_double swig_types[7]
1426 : #define SWIGTYPE_p_f_p_void__gboolean swig_types[8]
1427 : #define SWIGTYPE_p_float swig_types[9]
1428 : #define SWIGTYPE_p_gboolean swig_types[10]
1429 : #define SWIGTYPE_p_gint64 swig_types[11]
1430 : #define SWIGTYPE_p_int swig_types[12]
1431 : #define SWIGTYPE_p_long_long swig_types[13]
1432 : #define SWIGTYPE_p_short swig_types[14]
1433 : #define SWIGTYPE_p_signed_char swig_types[15]
1434 : #define SWIGTYPE_p_unsigned_char swig_types[16]
1435 : #define SWIGTYPE_p_unsigned_int swig_types[17]
1436 : #define SWIGTYPE_p_unsigned_long swig_types[18]
1437 : #define SWIGTYPE_p_unsigned_long_long swig_types[19]
1438 : #define SWIGTYPE_p_unsigned_short swig_types[20]
1439 : static swig_type_info *swig_types[22];
1440 : static swig_module_info swig_module = {swig_types, 21, 0, 0, 0, 0};
1441 : #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1442 : #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1443 :
1444 : /* -------- TYPES TABLE (END) -------- */
1445 :
1446 :
1447 : /* Includes the header in the wrapper code */
1448 : #include <config.h>
1449 : #include <gtk/gtk.h>
1450 : #include <dialog-progress.h>
1451 : #include <config.h>
1452 : #include <gtk/gtk.h>
1453 : #include <gnc-plugin-page-report.h>
1454 : #include <dialog-custom-report.h>
1455 :
1456 :
1457 : #include "guile-mappings.h"
1458 :
1459 : SCM scm_init_sw_gnome_module (void);
1460 :
1461 : static SCM
1462 0 : _wrap_gnc_progress_dialog_new (SCM s_0, SCM s_1)
1463 : {
1464 : #define FUNC_NAME "gnc-progress-dialog-new"
1465 0 : GtkWidget *arg1 = 0 ;
1466 : gboolean arg2 ;
1467 : SCM gswig_result;
1468 0 : SWIGUNUSED int gswig_list_p = 0;
1469 0 : GNCProgressDialog *result = 0 ;
1470 :
1471 : {
1472 0 : arg1 = (GtkWidget *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_GtkWidget, 1, 0);
1473 : }
1474 0 : arg2 = scm_is_true(s_1) ? TRUE : FALSE;
1475 0 : result = (GNCProgressDialog *)gnc_progress_dialog_new(arg1,arg2);
1476 : {
1477 0 : gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p__GNCProgressDialog, 0);
1478 : }
1479 :
1480 :
1481 0 : return gswig_result;
1482 : #undef FUNC_NAME
1483 : }
1484 :
1485 :
1486 : static SCM
1487 0 : _wrap_gnc_progress_dialog_custom (SCM s_0, SCM s_1, SCM s_2, SCM s_3, SCM s_4)
1488 : {
1489 : #define FUNC_NAME "gnc-progress-dialog-custom"
1490 0 : GtkLabel *arg1 = 0 ;
1491 0 : GtkLabel *arg2 = 0 ;
1492 0 : GtkProgressBar *arg3 = 0 ;
1493 0 : GtkLabel *arg4 = 0 ;
1494 0 : GtkTextView *arg5 = 0 ;
1495 : SCM gswig_result;
1496 0 : SWIGUNUSED int gswig_list_p = 0;
1497 0 : GNCProgressDialog *result = 0 ;
1498 :
1499 : {
1500 0 : arg1 = (GtkLabel *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_GtkLabel, 1, 0);
1501 : }
1502 : {
1503 0 : arg2 = (GtkLabel *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_GtkLabel, 2, 0);
1504 : }
1505 : {
1506 0 : arg3 = (GtkProgressBar *)SWIG_MustGetPtr(s_2, SWIGTYPE_p_GtkProgressBar, 3, 0);
1507 : }
1508 : {
1509 0 : arg4 = (GtkLabel *)SWIG_MustGetPtr(s_3, SWIGTYPE_p_GtkLabel, 4, 0);
1510 : }
1511 : {
1512 0 : arg5 = (GtkTextView *)SWIG_MustGetPtr(s_4, SWIGTYPE_p_GtkTextView, 5, 0);
1513 : }
1514 0 : result = (GNCProgressDialog *)gnc_progress_dialog_custom(arg1,arg2,arg3,arg4,arg5);
1515 : {
1516 0 : gswig_result = SWIG_NewPointerObj (result, SWIGTYPE_p__GNCProgressDialog, 0);
1517 : }
1518 :
1519 :
1520 :
1521 :
1522 :
1523 :
1524 0 : return gswig_result;
1525 : #undef FUNC_NAME
1526 : }
1527 :
1528 :
1529 : static SCM
1530 0 : _wrap_gnc_progress_dialog_set_title (SCM s_0, SCM s_1)
1531 : {
1532 : #define FUNC_NAME "gnc-progress-dialog-set-title"
1533 0 : GNCProgressDialog *arg1 = 0 ;
1534 0 : char *arg2 = 0 ;
1535 0 : int must_free2 = 0 ;
1536 : SCM gswig_result;
1537 0 : SWIGUNUSED int gswig_list_p = 0;
1538 :
1539 : {
1540 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1541 : }
1542 : {
1543 0 : arg2 = (char *)SWIG_scm2str(s_1);
1544 0 : must_free2 = 1;
1545 : }
1546 0 : gnc_progress_dialog_set_title(arg1,(char const *)arg2);
1547 0 : gswig_result = SCM_UNSPECIFIED;
1548 :
1549 0 : if (must_free2) SWIG_free(arg2);
1550 :
1551 0 : return gswig_result;
1552 : #undef FUNC_NAME
1553 : }
1554 :
1555 :
1556 : static SCM
1557 0 : _wrap_gnc_progress_dialog_set_primary (SCM s_0, SCM s_1)
1558 : {
1559 : #define FUNC_NAME "gnc-progress-dialog-set-primary"
1560 0 : GNCProgressDialog *arg1 = 0 ;
1561 0 : gchar *arg2 = 0 ;
1562 0 : int must_free2 = 0 ;
1563 : SCM gswig_result;
1564 0 : SWIGUNUSED int gswig_list_p = 0;
1565 :
1566 : {
1567 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1568 : }
1569 : {
1570 0 : arg2 = (gchar *)SWIG_scm2str(s_1);
1571 0 : must_free2 = 1;
1572 : }
1573 0 : gnc_progress_dialog_set_primary(arg1,(char const *)arg2);
1574 0 : gswig_result = SCM_UNSPECIFIED;
1575 :
1576 0 : if (must_free2) SWIG_free(arg2);
1577 :
1578 0 : return gswig_result;
1579 : #undef FUNC_NAME
1580 : }
1581 :
1582 :
1583 : static SCM
1584 0 : _wrap_gnc_progress_dialog_set_heading (SCM s_0, SCM s_1)
1585 : {
1586 : #define FUNC_NAME "gnc-progress-dialog-set-heading"
1587 0 : GNCProgressDialog *arg1 = 0 ;
1588 0 : char *arg2 = 0 ;
1589 0 : int must_free2 = 0 ;
1590 : SCM gswig_result;
1591 0 : SWIGUNUSED int gswig_list_p = 0;
1592 :
1593 : {
1594 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1595 : }
1596 : {
1597 0 : arg2 = (char *)SWIG_scm2str(s_1);
1598 0 : must_free2 = 1;
1599 : }
1600 0 : gnc_progress_dialog_set_heading(arg1,(char const *)arg2);
1601 0 : gswig_result = SCM_UNSPECIFIED;
1602 :
1603 0 : if (must_free2) SWIG_free(arg2);
1604 :
1605 0 : return gswig_result;
1606 : #undef FUNC_NAME
1607 : }
1608 :
1609 :
1610 : static SCM
1611 0 : _wrap_gnc_progress_dialog_set_secondary (SCM s_0, SCM s_1)
1612 : {
1613 : #define FUNC_NAME "gnc-progress-dialog-set-secondary"
1614 0 : GNCProgressDialog *arg1 = 0 ;
1615 0 : gchar *arg2 = 0 ;
1616 0 : int must_free2 = 0 ;
1617 : SCM gswig_result;
1618 0 : SWIGUNUSED int gswig_list_p = 0;
1619 :
1620 : {
1621 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1622 : }
1623 : {
1624 0 : arg2 = (gchar *)SWIG_scm2str(s_1);
1625 0 : must_free2 = 1;
1626 : }
1627 0 : gnc_progress_dialog_set_secondary(arg1,(char const *)arg2);
1628 0 : gswig_result = SCM_UNSPECIFIED;
1629 :
1630 0 : if (must_free2) SWIG_free(arg2);
1631 :
1632 0 : return gswig_result;
1633 : #undef FUNC_NAME
1634 : }
1635 :
1636 :
1637 : static SCM
1638 0 : _wrap_gnc_progress_dialog_set_sub (SCM s_0, SCM s_1)
1639 : {
1640 : #define FUNC_NAME "gnc-progress-dialog-set-sub"
1641 0 : GNCProgressDialog *arg1 = 0 ;
1642 0 : gchar *arg2 = 0 ;
1643 0 : int must_free2 = 0 ;
1644 : SCM gswig_result;
1645 0 : SWIGUNUSED int gswig_list_p = 0;
1646 :
1647 : {
1648 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1649 : }
1650 : {
1651 0 : arg2 = (gchar *)SWIG_scm2str(s_1);
1652 0 : must_free2 = 1;
1653 : }
1654 0 : gnc_progress_dialog_set_sub(arg1,(char const *)arg2);
1655 0 : gswig_result = SCM_UNSPECIFIED;
1656 :
1657 0 : if (must_free2) SWIG_free(arg2);
1658 :
1659 0 : return gswig_result;
1660 : #undef FUNC_NAME
1661 : }
1662 :
1663 :
1664 : static SCM
1665 0 : _wrap_gnc_progress_dialog_reset_log (SCM s_0)
1666 : {
1667 : #define FUNC_NAME "gnc-progress-dialog-reset-log"
1668 0 : GNCProgressDialog *arg1 = 0 ;
1669 : SCM gswig_result;
1670 0 : SWIGUNUSED int gswig_list_p = 0;
1671 :
1672 : {
1673 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1674 : }
1675 0 : gnc_progress_dialog_reset_log(arg1);
1676 0 : gswig_result = SCM_UNSPECIFIED;
1677 :
1678 :
1679 0 : return gswig_result;
1680 : #undef FUNC_NAME
1681 : }
1682 :
1683 :
1684 : static SCM
1685 0 : _wrap_gnc_progress_dialog_append_log (SCM s_0, SCM s_1)
1686 : {
1687 : #define FUNC_NAME "gnc-progress-dialog-append-log"
1688 0 : GNCProgressDialog *arg1 = 0 ;
1689 0 : gchar *arg2 = 0 ;
1690 0 : int must_free2 = 0 ;
1691 : SCM gswig_result;
1692 0 : SWIGUNUSED int gswig_list_p = 0;
1693 :
1694 : {
1695 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1696 : }
1697 : {
1698 0 : arg2 = (gchar *)SWIG_scm2str(s_1);
1699 0 : must_free2 = 1;
1700 : }
1701 0 : gnc_progress_dialog_append_log(arg1,(char const *)arg2);
1702 0 : gswig_result = SCM_UNSPECIFIED;
1703 :
1704 0 : if (must_free2) SWIG_free(arg2);
1705 :
1706 0 : return gswig_result;
1707 : #undef FUNC_NAME
1708 : }
1709 :
1710 :
1711 : static SCM
1712 0 : _wrap_gnc_progress_dialog_pause (SCM s_0)
1713 : {
1714 : #define FUNC_NAME "gnc-progress-dialog-pause"
1715 0 : GNCProgressDialog *arg1 = 0 ;
1716 : SCM gswig_result;
1717 0 : SWIGUNUSED int gswig_list_p = 0;
1718 :
1719 : {
1720 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1721 : }
1722 0 : gnc_progress_dialog_pause(arg1);
1723 0 : gswig_result = SCM_UNSPECIFIED;
1724 :
1725 :
1726 0 : return gswig_result;
1727 : #undef FUNC_NAME
1728 : }
1729 :
1730 :
1731 : static SCM
1732 0 : _wrap_gnc_progress_dialog_resume (SCM s_0)
1733 : {
1734 : #define FUNC_NAME "gnc-progress-dialog-resume"
1735 0 : GNCProgressDialog *arg1 = 0 ;
1736 : SCM gswig_result;
1737 0 : SWIGUNUSED int gswig_list_p = 0;
1738 :
1739 : {
1740 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1741 : }
1742 0 : gnc_progress_dialog_resume(arg1);
1743 0 : gswig_result = SCM_UNSPECIFIED;
1744 :
1745 :
1746 0 : return gswig_result;
1747 : #undef FUNC_NAME
1748 : }
1749 :
1750 :
1751 : static SCM
1752 0 : _wrap_gnc_progress_dialog_set_cancel_func (SCM s_0, SCM s_1, SCM s_2)
1753 : {
1754 : #define FUNC_NAME "gnc-progress-dialog-set-cancel-func"
1755 0 : GNCProgressDialog *arg1 = 0 ;
1756 0 : GNCProgressCancelFunc arg2 = 0 ;
1757 0 : gpointer arg3 = 0 ;
1758 : SCM gswig_result;
1759 0 : SWIGUNUSED int gswig_list_p = 0;
1760 :
1761 : {
1762 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1763 : }
1764 : {
1765 0 : arg2 = (GNCProgressCancelFunc)SWIG_MustGetPtr(s_1, SWIGTYPE_p_f_p_void__gboolean, 2, 0);
1766 : }
1767 : {
1768 0 : arg3 = (gpointer)SWIG_MustGetPtr(s_2, NULL, 3, 0);
1769 : }
1770 0 : gnc_progress_dialog_set_cancel_func(arg1,arg2,arg3);
1771 0 : gswig_result = SCM_UNSPECIFIED;
1772 :
1773 :
1774 :
1775 :
1776 0 : return gswig_result;
1777 : #undef FUNC_NAME
1778 : }
1779 :
1780 :
1781 : static SCM
1782 0 : _wrap_gnc_progress_dialog_set_cancel_scm_func (SCM s_0, SCM s_1)
1783 : {
1784 : #define FUNC_NAME "gnc-progress-dialog-set-cancel-scm-func"
1785 0 : GNCProgressDialog *arg1 = 0 ;
1786 : SCM arg2 ;
1787 : SCM gswig_result;
1788 0 : SWIGUNUSED int gswig_list_p = 0;
1789 :
1790 : {
1791 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1792 : }
1793 0 : arg2=s_1;
1794 0 : gnc_progress_dialog_set_cancel_scm_func(arg1,arg2);
1795 0 : gswig_result = SCM_UNSPECIFIED;
1796 :
1797 :
1798 0 : return gswig_result;
1799 : #undef FUNC_NAME
1800 : }
1801 :
1802 :
1803 : static SCM
1804 0 : _wrap_gnc_progress_dialog_set_value (SCM s_0, SCM s_1)
1805 : {
1806 : #define FUNC_NAME "gnc-progress-dialog-set-value"
1807 0 : GNCProgressDialog *arg1 = 0 ;
1808 : gdouble arg2 ;
1809 : SCM gswig_result;
1810 0 : SWIGUNUSED int gswig_list_p = 0;
1811 :
1812 : {
1813 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1814 : }
1815 : {
1816 0 : arg2 = (gdouble) scm_to_double(s_1);
1817 : }
1818 0 : gnc_progress_dialog_set_value(arg1,arg2);
1819 0 : gswig_result = SCM_UNSPECIFIED;
1820 :
1821 :
1822 0 : return gswig_result;
1823 : #undef FUNC_NAME
1824 : }
1825 :
1826 :
1827 : static SCM
1828 0 : _wrap_gnc_progress_dialog_push (SCM s_0, SCM s_1)
1829 : {
1830 : #define FUNC_NAME "gnc-progress-dialog-push"
1831 0 : GNCProgressDialog *arg1 = 0 ;
1832 : gdouble arg2 ;
1833 : SCM gswig_result;
1834 0 : SWIGUNUSED int gswig_list_p = 0;
1835 : guint result;
1836 :
1837 : {
1838 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1839 : }
1840 : {
1841 0 : arg2 = (gdouble) scm_to_double(s_1);
1842 : }
1843 0 : result = (guint)gnc_progress_dialog_push(arg1,arg2);
1844 : {
1845 0 : gswig_result = scm_from_ulong(result);
1846 : }
1847 :
1848 :
1849 0 : return gswig_result;
1850 : #undef FUNC_NAME
1851 : }
1852 :
1853 :
1854 : static SCM
1855 0 : _wrap_gnc_progress_dialog_pop (SCM s_0)
1856 : {
1857 : #define FUNC_NAME "gnc-progress-dialog-pop"
1858 0 : GNCProgressDialog *arg1 = 0 ;
1859 : SCM gswig_result;
1860 0 : SWIGUNUSED int gswig_list_p = 0;
1861 : guint result;
1862 :
1863 : {
1864 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1865 : }
1866 0 : result = (guint)gnc_progress_dialog_pop(arg1);
1867 : {
1868 0 : gswig_result = scm_from_ulong(result);
1869 : }
1870 :
1871 :
1872 0 : return gswig_result;
1873 : #undef FUNC_NAME
1874 : }
1875 :
1876 :
1877 : static SCM
1878 0 : _wrap_gnc_progress_dialog_pop_full (SCM s_0)
1879 : {
1880 : #define FUNC_NAME "gnc-progress-dialog-pop-full"
1881 0 : GNCProgressDialog *arg1 = 0 ;
1882 : SCM gswig_result;
1883 0 : SWIGUNUSED int gswig_list_p = 0;
1884 : guint result;
1885 :
1886 : {
1887 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1888 : }
1889 0 : result = (guint)gnc_progress_dialog_pop_full(arg1);
1890 : {
1891 0 : gswig_result = scm_from_ulong(result);
1892 : }
1893 :
1894 :
1895 0 : return gswig_result;
1896 : #undef FUNC_NAME
1897 : }
1898 :
1899 :
1900 : static SCM
1901 0 : _wrap_gnc_progress_dialog_reset_value (SCM s_0)
1902 : {
1903 : #define FUNC_NAME "gnc-progress-dialog-reset-value"
1904 0 : GNCProgressDialog *arg1 = 0 ;
1905 : SCM gswig_result;
1906 0 : SWIGUNUSED int gswig_list_p = 0;
1907 :
1908 : {
1909 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1910 : }
1911 0 : gnc_progress_dialog_reset_value(arg1);
1912 0 : gswig_result = SCM_UNSPECIFIED;
1913 :
1914 :
1915 0 : return gswig_result;
1916 : #undef FUNC_NAME
1917 : }
1918 :
1919 :
1920 : static SCM
1921 0 : _wrap_gnc_progress_dialog_update (SCM s_0)
1922 : {
1923 : #define FUNC_NAME "gnc-progress-dialog-update"
1924 0 : GNCProgressDialog *arg1 = 0 ;
1925 : SCM gswig_result;
1926 0 : SWIGUNUSED int gswig_list_p = 0;
1927 :
1928 : {
1929 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1930 : }
1931 0 : gnc_progress_dialog_update(arg1);
1932 0 : gswig_result = SCM_UNSPECIFIED;
1933 :
1934 :
1935 0 : return gswig_result;
1936 : #undef FUNC_NAME
1937 : }
1938 :
1939 :
1940 : static SCM
1941 0 : _wrap_gnc_progress_dialog_finish (SCM s_0)
1942 : {
1943 : #define FUNC_NAME "gnc-progress-dialog-finish"
1944 0 : GNCProgressDialog *arg1 = 0 ;
1945 : SCM gswig_result;
1946 0 : SWIGUNUSED int gswig_list_p = 0;
1947 :
1948 : {
1949 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1950 : }
1951 0 : gnc_progress_dialog_finish(arg1);
1952 0 : gswig_result = SCM_UNSPECIFIED;
1953 :
1954 :
1955 0 : return gswig_result;
1956 : #undef FUNC_NAME
1957 : }
1958 :
1959 :
1960 : static SCM
1961 0 : _wrap_gnc_progress_dialog_destroy (SCM s_0)
1962 : {
1963 : #define FUNC_NAME "gnc-progress-dialog-destroy"
1964 0 : GNCProgressDialog *arg1 = 0 ;
1965 : SCM gswig_result;
1966 0 : SWIGUNUSED int gswig_list_p = 0;
1967 :
1968 : {
1969 0 : arg1 = (GNCProgressDialog *)SWIG_MustGetPtr(s_0, SWIGTYPE_p__GNCProgressDialog, 1, 0);
1970 : }
1971 0 : gnc_progress_dialog_destroy(arg1);
1972 0 : gswig_result = SCM_UNSPECIFIED;
1973 :
1974 :
1975 0 : return gswig_result;
1976 : #undef FUNC_NAME
1977 : }
1978 :
1979 :
1980 : static SCM
1981 0 : _wrap_gnc_main_window_open_report (SCM s_0, SCM s_1)
1982 : {
1983 : #define FUNC_NAME "gnc-main-window-open-report"
1984 : int arg1 ;
1985 0 : GncMainWindow *arg2 = 0 ;
1986 : SCM gswig_result;
1987 0 : SWIGUNUSED int gswig_list_p = 0;
1988 :
1989 : {
1990 0 : arg1 = (int) scm_to_int(s_0);
1991 : }
1992 : {
1993 0 : arg2 = (GncMainWindow *)SWIG_MustGetPtr(s_1, SWIGTYPE_p_GncMainWindow, 2, 0);
1994 : }
1995 0 : gnc_main_window_open_report(arg1,arg2);
1996 0 : gswig_result = SCM_UNSPECIFIED;
1997 :
1998 :
1999 0 : return gswig_result;
2000 : #undef FUNC_NAME
2001 : }
2002 :
2003 :
2004 : static SCM
2005 0 : _wrap_gnc_ui_custom_report (SCM s_0)
2006 : {
2007 : #define FUNC_NAME "gnc-ui-custom-report"
2008 0 : GncMainWindow *arg1 = 0 ;
2009 : SCM gswig_result;
2010 0 : SWIGUNUSED int gswig_list_p = 0;
2011 :
2012 : {
2013 0 : arg1 = (GncMainWindow *)SWIG_MustGetPtr(s_0, SWIGTYPE_p_GncMainWindow, 1, 0);
2014 : }
2015 0 : gnc_ui_custom_report(arg1);
2016 0 : gswig_result = SCM_UNSPECIFIED;
2017 :
2018 :
2019 0 : return gswig_result;
2020 : #undef FUNC_NAME
2021 : }
2022 :
2023 :
2024 : #ifdef __cplusplus
2025 : extern "C" {
2026 : #endif
2027 :
2028 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
2029 :
2030 : static swig_type_info _swigt__p_GncMainWindow = {"_p_GncMainWindow", "GncMainWindow *", 0, 0, (void*)0, 0};
2031 : static swig_type_info _swigt__p_GtkLabel = {"_p_GtkLabel", "GtkLabel *", 0, 0, (void*)0, 0};
2032 : static swig_type_info _swigt__p_GtkProgressBar = {"_p_GtkProgressBar", "GtkProgressBar *", 0, 0, (void*)0, 0};
2033 : static swig_type_info _swigt__p_GtkTextView = {"_p_GtkTextView", "GtkTextView *", 0, 0, (void*)0, 0};
2034 : static swig_type_info _swigt__p_GtkWidget = {"_p_GtkWidget", "GtkWidget *", 0, 0, (void*)0, 0};
2035 : static swig_type_info _swigt__p__GNCProgressDialog = {"_p__GNCProgressDialog", "GNCProgressDialog *|struct _GNCProgressDialog *", 0, 0, (void*)0, 0};
2036 : static swig_type_info _swigt__p_char = {"_p_char", "gchar *|char *", 0, 0, (void*)0, 0};
2037 : static swig_type_info _swigt__p_double = {"_p_double", "gdouble *|double *", 0, 0, (void*)0, 0};
2038 : static swig_type_info _swigt__p_f_p_void__gboolean = {"_p_f_p_void__gboolean", "GNCProgressCancelFunc|gboolean (*)(void *)", 0, 0, (void*)0, 0};
2039 : static swig_type_info _swigt__p_float = {"_p_float", "gfloat *|float *", 0, 0, (void*)0, 0};
2040 : static swig_type_info _swigt__p_gboolean = {"_p_gboolean", "gboolean *", 0, 0, (void*)0, 0};
2041 : static swig_type_info _swigt__p_gint64 = {"_p_gint64", "time64 *|gint64 *", 0, 0, (void*)0, 0};
2042 : static swig_type_info _swigt__p_int = {"_p_int", "gint *|int32_t *|int_fast16_t *|int_fast32_t *|int_least32_t *|intptr_t *|int *", 0, 0, (void*)0, 0};
2043 : static swig_type_info _swigt__p_long_long = {"_p_long_long", "int64_t *|int_fast64_t *|int_least64_t *|intmax_t *|long long *", 0, 0, (void*)0, 0};
2044 : static swig_type_info _swigt__p_short = {"_p_short", "int16_t *|int_least16_t *|short *", 0, 0, (void*)0, 0};
2045 : static swig_type_info _swigt__p_signed_char = {"_p_signed_char", "int8_t *|int_fast8_t *|int_least8_t *|signed char *", 0, 0, (void*)0, 0};
2046 : static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "uint8_t *|uint_fast8_t *|uint_least8_t *|unsigned char *", 0, 0, (void*)0, 0};
2047 : static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "guint *|uint32_t *|uint_fast16_t *|uint_fast32_t *|uint_least32_t *|uintptr_t *|unsigned int *", 0, 0, (void*)0, 0};
2048 : static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "SCM *|unsigned long *", 0, 0, (void*)0, 0};
2049 : static swig_type_info _swigt__p_unsigned_long_long = {"_p_unsigned_long_long", "uint64_t *|uint_fast64_t *|uint_least64_t *|uintmax_t *|unsigned long long *", 0, 0, (void*)0, 0};
2050 : static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "uint16_t *|uint_least16_t *|unsigned short *", 0, 0, (void*)0, 0};
2051 :
2052 : static swig_type_info *swig_type_initial[] = {
2053 : &_swigt__p_GncMainWindow,
2054 : &_swigt__p_GtkLabel,
2055 : &_swigt__p_GtkProgressBar,
2056 : &_swigt__p_GtkTextView,
2057 : &_swigt__p_GtkWidget,
2058 : &_swigt__p__GNCProgressDialog,
2059 : &_swigt__p_char,
2060 : &_swigt__p_double,
2061 : &_swigt__p_f_p_void__gboolean,
2062 : &_swigt__p_float,
2063 : &_swigt__p_gboolean,
2064 : &_swigt__p_gint64,
2065 : &_swigt__p_int,
2066 : &_swigt__p_long_long,
2067 : &_swigt__p_short,
2068 : &_swigt__p_signed_char,
2069 : &_swigt__p_unsigned_char,
2070 : &_swigt__p_unsigned_int,
2071 : &_swigt__p_unsigned_long,
2072 : &_swigt__p_unsigned_long_long,
2073 : &_swigt__p_unsigned_short,
2074 : };
2075 :
2076 : static swig_cast_info _swigc__p_GncMainWindow[] = { {&_swigt__p_GncMainWindow, 0, 0, 0},{0, 0, 0, 0}};
2077 : static swig_cast_info _swigc__p_GtkLabel[] = { {&_swigt__p_GtkLabel, 0, 0, 0},{0, 0, 0, 0}};
2078 : static swig_cast_info _swigc__p_GtkProgressBar[] = { {&_swigt__p_GtkProgressBar, 0, 0, 0},{0, 0, 0, 0}};
2079 : static swig_cast_info _swigc__p_GtkTextView[] = { {&_swigt__p_GtkTextView, 0, 0, 0},{0, 0, 0, 0}};
2080 : static swig_cast_info _swigc__p_GtkWidget[] = { {&_swigt__p_GtkWidget, 0, 0, 0},{0, 0, 0, 0}};
2081 : static swig_cast_info _swigc__p__GNCProgressDialog[] = { {&_swigt__p__GNCProgressDialog, 0, 0, 0},{0, 0, 0, 0}};
2082 : static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
2083 : static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
2084 : static swig_cast_info _swigc__p_f_p_void__gboolean[] = { {&_swigt__p_f_p_void__gboolean, 0, 0, 0},{0, 0, 0, 0}};
2085 : static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
2086 : static swig_cast_info _swigc__p_gboolean[] = { {&_swigt__p_gboolean, 0, 0, 0},{0, 0, 0, 0}};
2087 : static swig_cast_info _swigc__p_gint64[] = { {&_swigt__p_gint64, 0, 0, 0},{0, 0, 0, 0}};
2088 : static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
2089 : static swig_cast_info _swigc__p_long_long[] = { {&_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}};
2090 : static swig_cast_info _swigc__p_short[] = { {&_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}};
2091 : static swig_cast_info _swigc__p_signed_char[] = { {&_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}};
2092 : static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
2093 : static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
2094 : static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
2095 : static swig_cast_info _swigc__p_unsigned_long_long[] = { {&_swigt__p_unsigned_long_long, 0, 0, 0},{0, 0, 0, 0}};
2096 : static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
2097 :
2098 : static swig_cast_info *swig_cast_initial[] = {
2099 : _swigc__p_GncMainWindow,
2100 : _swigc__p_GtkLabel,
2101 : _swigc__p_GtkProgressBar,
2102 : _swigc__p_GtkTextView,
2103 : _swigc__p_GtkWidget,
2104 : _swigc__p__GNCProgressDialog,
2105 : _swigc__p_char,
2106 : _swigc__p_double,
2107 : _swigc__p_f_p_void__gboolean,
2108 : _swigc__p_float,
2109 : _swigc__p_gboolean,
2110 : _swigc__p_gint64,
2111 : _swigc__p_int,
2112 : _swigc__p_long_long,
2113 : _swigc__p_short,
2114 : _swigc__p_signed_char,
2115 : _swigc__p_unsigned_char,
2116 : _swigc__p_unsigned_int,
2117 : _swigc__p_unsigned_long,
2118 : _swigc__p_unsigned_long_long,
2119 : _swigc__p_unsigned_short,
2120 : };
2121 :
2122 :
2123 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
2124 :
2125 : /* -----------------------------------------------------------------------------
2126 : * Type initialization:
2127 : * This problem is made tough by the requirement that no dynamic
2128 : * memory is used. Also, since swig_type_info structures store pointers to
2129 : * swig_cast_info structures and swig_cast_info structures store pointers back
2130 : * to swig_type_info structures, we need some lookup code at initialization.
2131 : * The idea is that swig generates all the structures that are needed.
2132 : * The runtime then collects these partially filled structures.
2133 : * The SWIG_InitializeModule function takes these initial arrays out of
2134 : * swig_module, and does all the lookup, filling in the swig_module.types
2135 : * array with the correct data and linking the correct swig_cast_info
2136 : * structures together.
2137 : *
2138 : * The generated swig_type_info structures are assigned statically to an initial
2139 : * array. We just loop through that array, and handle each type individually.
2140 : * First we lookup if this type has been already loaded, and if so, use the
2141 : * loaded structure instead of the generated one. Then we have to fill in the
2142 : * cast dependencies. The cast data is initially stored in something like a
2143 : * two-dimensional array. Each row corresponds to a type (there are the same
2144 : * number of rows as there are in the swig_type_initial array). Each entry in
2145 : * a column is one of the swig_cast_info structures for that type.
2146 : * The cast_initial array is actually an array of arrays, because each row has
2147 : * a variable number of columns.
2148 : *
2149 : * We loop through the cast[] array associated with the type and mark casts
2150 : * which have not been defined in previously loaded modules by assigning
2151 : * cast pointer value to cast->next. We also hash cast->type->name string
2152 : * and store the value in the cast->value field. If we encounter swig_cast_info
2153 : * structure that represents a cast to self we move it to the beginning
2154 : * of the cast array. One trick we need to do is making sure the type pointer
2155 : * in the swig_cast_info struct is correct.
2156 : *
2157 : * First off, we lookup the cast->type name to see if it is already loaded.
2158 : * There are three cases to handle:
2159 : * 1) If the cast->type has already been loaded AND the type we are adding
2160 : * casting info to has not been loaded (it is in this module), THEN we
2161 : * replace the cast->type pointer with the type pointer that has already
2162 : * been loaded.
2163 : * 2) If BOTH types (the one we are adding casting info to, and the
2164 : * cast->type) are loaded, THEN the cast info has already been loaded by
2165 : * the previous module so we just ignore it.
2166 : * 3) Finally, if cast->type has not already been loaded, then we add that
2167 : * swig_cast_info to the list (because the cast->type) pointer will
2168 : * be correct.
2169 : *
2170 : * Once the cast array has been set up AND it does have new casts that need
2171 : * to be added we sort non-self cast entries to move filtered out entries
2172 : * to the end of the array and to arrange the rest in the increasing order
2173 : * of their type pointer values. We store the index of the last added entry
2174 : * in the cast->value field of the entry[0] (overwriting the name hash). Then
2175 : * we sort <next|value> fields of the remaining entries to arrange hash values
2176 : * in the increasing order. This way cast->next->type->name field matches
2177 : * the cast->value hash.
2178 : *
2179 : * Example:
2180 : * Array of casts for type stored at 0x5000, cast to type stored at 0x3000
2181 : * has already been loaded
2182 : *
2183 : * After sweep-and-hash: After sort-by-type: After sort-by-hash:
2184 : * ________________ ________________ ________________
2185 : * | | | | | |
2186 : * Entry | type = 0x5000 | | type = 0x5000 | | type = 0x5000 |
2187 : * 0 | | | | | |
2188 : * | next = Entry0 | | next = Entry0 | | next = Entry0 |
2189 : * | value = 1212 | | value = 3 | | value = 3 |
2190 : * | | | | | |
2191 : * |================| |================| |================|
2192 : * | | | | | |
2193 : * Entry | type = 0x2000 | | type = 0x1000 | | type = 0x1000 |
2194 : * 1 | | | | | |
2195 : * | next = Entry1 | | next = Entry1 | | next = Entry3 |
2196 : * | value = 3434 | | value = 4545 | | value = 2323 |
2197 : * |________________| |________________| |________________|
2198 : * | | | | | |
2199 : * Entry | type = 0x3000 | | type = 0x2000 | | type = 0x2000 |
2200 : * 2 | | | | | |
2201 : * | next = 0 | | next = Entry2 | | next = Entry2 |
2202 : * | value = 0 | | value = 3434 | | value = 3434 |
2203 : * |________________| |________________| |________________|
2204 : * | | | | | |
2205 : * Entry | type = 0x1000 | | type = 0x4000 | | type = 0x4000 |
2206 : * 3 | | | | | |
2207 : * | next = Entry3 | | next = Entry3 | | next = Entry1 |
2208 : * | value = 4545 | | value = 2323 | | value = 4545 |
2209 : * |________________| |________________| |________________|
2210 : * | | | | | |
2211 : * Entry | type = 0x4000 | | type = 0x3000 | | type = 0x3000 |
2212 : * 4 | | | | | |
2213 : * | next = Entry4 | | next = 0 | | next = 0 |
2214 : * | value = 2323 | | value = 0 | | value = 0 |
2215 : * |________________| |________________| |________________|
2216 : *
2217 : * Once the cast array has been initialized, we use cast[0]->next field to link
2218 : * it into the list of cast arrays for the type.
2219 : * ____ ____ ____
2220 : * type->cast->|next|->|next|->|next|->0
2221 : * |----| |----| |----|
2222 : * |----| |----| |----|
2223 : * |----| |----| |----|
2224 : *
2225 : * Subsequent cast resolution works as follows:
2226 : *
2227 : * 1. Check whether the type matches the first entry in the current cast array.
2228 : * 2. If not, then do a binary search over the (0:cast->value] interval using
2229 : * either type address or the hash value of the type name.
2230 : * 3. If not found, then move over to the next cast array (cast[0]->next).
2231 : *
2232 : * ----------------------------------------------------------------------------- */
2233 :
2234 : #ifdef __cplusplus
2235 : extern "C" {
2236 : #if 0
2237 : } /* c-mode */
2238 : #endif
2239 : #endif
2240 :
2241 : #if 0
2242 : #define SWIGRUNTIME_DEBUG
2243 : #endif
2244 :
2245 : #ifndef SWIG_INIT_CLIENT_DATA_TYPE
2246 : #define SWIG_INIT_CLIENT_DATA_TYPE void *
2247 : #endif
2248 :
2249 : /*
2250 : * Sort function that puts cast entries with nonzero 'next' at the front
2251 : * of the array while ordering them by addresses of their 'type' structs.
2252 : */
2253 0 : SWIGINTERN int SWIG_CastCmpStruct(const void *pa, const void *pb) {
2254 0 : swig_cast_info *pca = (swig_cast_info *)pa;
2255 0 : swig_cast_info *pcb = (swig_cast_info *)pb;
2256 0 : if (pca->type < pcb->type)
2257 0 : return (pca->next || pcb->next == 0) ? -1 : 1;
2258 0 : if (pca->type > pcb->type)
2259 0 : return (pcb->next || pca->next == 0) ? 1 : -1;
2260 0 : return 0;
2261 : }
2262 :
2263 : /*
2264 : * Shell-sort 'next' and 'value' field pairs to order them by 'value'.
2265 : */
2266 0 : SWIGINTERN void SWIG_CastHashSort(swig_cast_info *cast, int size) {
2267 0 : const int hmax = size/9;
2268 : int h, i;
2269 0 : for(h = 1; h <= hmax; h = 3*h+1);
2270 0 : for(; h > 0; h /= 3)
2271 : {
2272 0 : for(i = h; i < size; ++i)
2273 : {
2274 0 : swig_cast_info *p = cast[i].next;
2275 0 : unsigned int hash = cast[i].value;
2276 0 : int j = i;
2277 0 : while(j >= h && hash < cast[j-h].value)
2278 : {
2279 0 : cast[j].next = cast[j-h].next;
2280 0 : cast[j].value = cast[j-h].value;
2281 0 : j -= h;
2282 : }
2283 0 : cast[j].next = p;
2284 0 : cast[j].value = hash;
2285 : }
2286 : }
2287 0 : }
2288 :
2289 : SWIGRUNTIME void
2290 24 : SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) {
2291 : size_t i;
2292 : swig_module_info *module_head, *iter;
2293 : int init;
2294 :
2295 : /* check to see if the circular list has been setup, if not, set it up */
2296 24 : if (swig_module.next==0) {
2297 : /* Initialize the swig_module */
2298 3 : swig_module.type_initial = swig_type_initial;
2299 3 : swig_module.cast_initial = swig_cast_initial;
2300 3 : swig_module.next = &swig_module;
2301 3 : init = 1;
2302 : } else {
2303 21 : init = 0;
2304 : }
2305 :
2306 : /* Try and load any already created modules */
2307 24 : module_head = SWIG_GetModule(clientdata);
2308 24 : if (!module_head) {
2309 : /* This is the first module loaded for this interpreter */
2310 : /* so set the swig module into the interpreter */
2311 0 : SWIG_SetModule(clientdata, &swig_module);
2312 : } else {
2313 : /* the interpreter has loaded a SWIG module, but has it loaded this one? */
2314 24 : iter=module_head;
2315 : do {
2316 51 : if (iter==&swig_module) {
2317 : /* Our module is already in the list, so there's nothing more to do. */
2318 21 : return;
2319 : }
2320 30 : iter=iter->next;
2321 30 : } while (iter!= module_head);
2322 :
2323 : /* otherwise we must add our module into the list */
2324 3 : swig_module.next = module_head->next;
2325 3 : module_head->next = &swig_module;
2326 : }
2327 :
2328 : /* When multiple interpreters are used, a module could have already been initialized in
2329 : a different interpreter, but not yet have a pointer in this interpreter.
2330 : In this case, we do not want to continue adding types... everything should be
2331 : set up already */
2332 3 : if (init == 0) return;
2333 :
2334 : /* Now work on filling in swig_module.types */
2335 : #ifdef SWIGRUNTIME_DEBUG
2336 : printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
2337 : #endif
2338 66 : for (i = 0; i < swig_module.size; ++i) {
2339 63 : swig_type_info *type = 0;
2340 : swig_type_info *target_type;
2341 : swig_cast_info *cast, *first;
2342 63 : int num_mapped = 0;
2343 :
2344 : #ifdef SWIGRUNTIME_DEBUG
2345 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
2346 : #endif
2347 :
2348 : /* if there is another module already loaded */
2349 63 : if (swig_module.next != &swig_module) {
2350 63 : type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
2351 : }
2352 63 : if (type) {
2353 : /* Overwrite clientdata field */
2354 : #ifdef SWIGRUNTIME_DEBUG
2355 : printf("SWIG_InitializeModule: found type %s\n", type->name);
2356 : #endif
2357 42 : if (swig_module.type_initial[i]->clientdata) {
2358 0 : type->clientdata = swig_module.type_initial[i]->clientdata;
2359 : #ifdef SWIGRUNTIME_DEBUG
2360 : printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
2361 : #endif
2362 : }
2363 : } else {
2364 21 : type = swig_module.type_initial[i];
2365 : }
2366 :
2367 : /* Insert casting types */
2368 63 : cast = first = swig_module.cast_initial[i];
2369 126 : while (cast->type) {
2370 : /* Don't need to add information already in the list */
2371 63 : target_type = 0;
2372 : #ifdef SWIGRUNTIME_DEBUG
2373 : printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
2374 : #endif
2375 63 : if (swig_module.next != &swig_module) {
2376 63 : target_type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
2377 63 : if (target_type) {
2378 : /* Target type already defined in another module */
2379 : #ifdef SWIGRUNTIME_DEBUG
2380 : printf("SWIG_InitializeModule: found cast %s\n", target_type->name);
2381 : #endif
2382 42 : if (type == swig_module.type_initial[i]) {
2383 : #ifdef SWIGRUNTIME_DEBUG
2384 : printf("SWIG_InitializeModule: skip old type %s\n", target_type->name);
2385 : #endif
2386 0 : cast->type = target_type;
2387 0 : target_type = 0;
2388 : } else {
2389 : /* Check if this cast is already in the list */
2390 42 : swig_cast_info *ocast = SWIG_TypeCheck(target_type->name, type);
2391 : #ifdef SWIGRUNTIME_DEBUG
2392 : if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", target_type->name);
2393 : #endif
2394 42 : if (!ocast) target_type = 0;
2395 : }
2396 : }
2397 : }
2398 :
2399 63 : if (!target_type) {
2400 : #ifdef SWIGRUNTIME_DEBUG
2401 : printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
2402 : #endif
2403 : /* Set inclusion mark for sorting */
2404 21 : cast->next = cast;
2405 21 : num_mapped++;
2406 :
2407 21 : if (type == cast->type) {
2408 : #ifdef SWIGRUNTIME_DEBUG
2409 : printf("%s : self cast at pos [%li]\n", type->name, cast - first);
2410 : #endif
2411 21 : if (cast - first) {
2412 : /* Move cast to itself to the first entry in the array */
2413 :
2414 0 : swig_cast_info tmp = *cast;
2415 0 : *cast = *first;
2416 0 : *first = tmp;
2417 : }
2418 21 : first++;
2419 :
2420 : } else {
2421 0 : cast->value = SWIG_Hash(cast->type->name, (unsigned int)strlen(cast->type->name));
2422 : }
2423 : }
2424 63 : cast++;
2425 : }
2426 :
2427 63 : if (num_mapped) {
2428 21 : if (cast - first) {
2429 : swig_cast_info *tmp;
2430 :
2431 : /* Sort casts by type address for binary search in SWIG_TypeCheckStruct */
2432 0 : qsort(first, cast - first, sizeof(swig_cast_info), SWIG_CastCmpStruct);
2433 :
2434 : /* Remap back links for added entries */
2435 0 : cast = swig_module.cast_initial[i] + num_mapped;
2436 0 : for (tmp = first; tmp < cast; tmp++) {
2437 0 : tmp->next = tmp;
2438 : }
2439 : }
2440 :
2441 : /* Set the value field of the first entry to the index of the last added entry */
2442 21 : cast = swig_module.cast_initial[i];
2443 21 : cast->value = num_mapped - 1;
2444 :
2445 21 : num_mapped -= (int)(first - cast);
2446 21 : if (num_mapped > 1) {
2447 : /* Sort <'next','value'> pairs by 'value' for binary search in SWIG_TypeCheck */
2448 :
2449 0 : SWIG_CastHashSort(first, num_mapped);
2450 : }
2451 :
2452 21 : first = type->cast;
2453 21 : if (first) {
2454 : /* Link the current set into the list of cast arrays */
2455 0 : cast->next = first->next;
2456 0 : first->next = cast;
2457 : } else {
2458 21 : cast->next = 0;
2459 21 : type->cast = cast;
2460 : }
2461 : }
2462 :
2463 : /* Set entry in modules->types array equal to the type */
2464 63 : swig_module.types[i] = type;
2465 : }
2466 3 : swig_module.types[i] = 0;
2467 :
2468 : #ifdef SWIGRUNTIME_DEBUG
2469 : printf("**** SWIG_InitializeModule: Cast List ******\n");
2470 : for (i = 0; i < swig_module.size; ++i) {
2471 : int j = 0;
2472 : swig_cast_info *cast = swig_module.cast_initial[i];
2473 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
2474 : while (cast->type) {
2475 : printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
2476 : cast++;
2477 : ++j;
2478 : }
2479 : printf("---- Total casts: %d\n",j);
2480 : }
2481 : printf("**** SWIG_InitializeModule: Cast List ******\n");
2482 : #endif
2483 : }
2484 :
2485 : /* This function will propagate the clientdata field of type to
2486 : * any new swig_type_info structures that have been added into the list
2487 : * of equivalent types. It is like calling
2488 : * SWIG_TypeClientData(type, clientdata) a second time.
2489 : */
2490 : SWIGRUNTIME void
2491 24 : SWIG_PropagateClientData(void) {
2492 : size_t i;
2493 : static int init_run = 0;
2494 :
2495 24 : if (init_run) return;
2496 3 : init_run = 1;
2497 :
2498 66 : for (i = 0; i < swig_module.size; i++) {
2499 63 : if (swig_module.types[i]->clientdata) {
2500 : swig_cast_info *head, *cast;
2501 0 : head = swig_module.types[i]->cast;
2502 0 : while (head) {
2503 0 : for (cast = head; (cast - head) <= head->value; cast++) {
2504 0 : if (!cast->converter) {
2505 0 : if (cast->type && !cast->type->clientdata)
2506 0 : SWIG_TypeClientData(cast->type, swig_module.types[i]->clientdata);
2507 : }
2508 : }
2509 0 : head = head->next;
2510 : }
2511 : }
2512 : }
2513 : }
2514 :
2515 : #ifdef __cplusplus
2516 : #if 0
2517 : {
2518 : /* c-mode */
2519 : #endif
2520 : }
2521 : #endif
2522 :
2523 :
2524 : SWIG_GUILE_INIT_STATIC void
2525 24 : SWIG_init(void)
2526 : {
2527 24 : SWIG_InitializeModule(0);
2528 24 : SWIG_PropagateClientData();
2529 :
2530 24 : scm_c_define_gsubr("gnc-progress-dialog-new", 2, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_new);
2531 24 : scm_c_define_gsubr("gnc-progress-dialog-custom", 5, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_custom);
2532 24 : scm_c_define_gsubr("gnc-progress-dialog-set-title", 2, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_set_title);
2533 24 : scm_c_define_gsubr("gnc-progress-dialog-set-primary", 2, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_set_primary);
2534 24 : scm_c_define_gsubr("gnc-progress-dialog-set-heading", 2, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_set_heading);
2535 24 : scm_c_define_gsubr("gnc-progress-dialog-set-secondary", 2, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_set_secondary);
2536 24 : scm_c_define_gsubr("gnc-progress-dialog-set-sub", 2, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_set_sub);
2537 24 : scm_c_define_gsubr("gnc-progress-dialog-reset-log", 1, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_reset_log);
2538 24 : scm_c_define_gsubr("gnc-progress-dialog-append-log", 2, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_append_log);
2539 24 : scm_c_define_gsubr("gnc-progress-dialog-pause", 1, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_pause);
2540 24 : scm_c_define_gsubr("gnc-progress-dialog-resume", 1, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_resume);
2541 24 : scm_c_define_gsubr("gnc-progress-dialog-set-cancel-func", 3, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_set_cancel_func);
2542 24 : scm_c_define_gsubr("gnc-progress-dialog-set-cancel-scm-func", 2, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_set_cancel_scm_func);
2543 24 : scm_c_define_gsubr("gnc-progress-dialog-set-value", 2, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_set_value);
2544 24 : scm_c_define_gsubr("gnc-progress-dialog-push", 2, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_push);
2545 24 : scm_c_define_gsubr("gnc-progress-dialog-pop", 1, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_pop);
2546 24 : scm_c_define_gsubr("gnc-progress-dialog-pop-full", 1, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_pop_full);
2547 24 : scm_c_define_gsubr("gnc-progress-dialog-reset-value", 1, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_reset_value);
2548 24 : scm_c_define_gsubr("gnc-progress-dialog-update", 1, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_update);
2549 24 : scm_c_define_gsubr("gnc-progress-dialog-finish", 1, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_finish);
2550 24 : scm_c_define_gsubr("gnc-progress-dialog-destroy", 1, 0, 0, (swig_guile_proc) _wrap_gnc_progress_dialog_destroy);
2551 24 : scm_c_define_gsubr("gnc-main-window-open-report", 2, 0, 0, (swig_guile_proc) _wrap_gnc_main_window_open_report);
2552 24 : scm_c_define_gsubr("gnc-ui-custom-report", 1, 0, 0, (swig_guile_proc) _wrap_gnc_ui_custom_report);
2553 24 : }
2554 :
2555 : #ifdef __cplusplus
2556 : }
2557 : #endif
2558 :
2559 : /* Linkage: module */
2560 24 : static void SWIG_init_helper(void *data)
2561 : {
2562 24 : SWIG_init();
2563 24 : scm_c_export("gnc-progress-dialog-new", "gnc-progress-dialog-custom", "gnc-progress-dialog-set-title", "gnc-progress-dialog-set-primary", "gnc-progress-dialog-set-heading", "gnc-progress-dialog-set-secondary", "gnc-progress-dialog-set-sub", "gnc-progress-dialog-reset-log", "gnc-progress-dialog-append-log", "gnc-progress-dialog-pause", "gnc-progress-dialog-resume", "gnc-progress-dialog-set-cancel-func", "gnc-progress-dialog-set-cancel-scm-func", "gnc-progress-dialog-set-value", "gnc-progress-dialog-push", "gnc-progress-dialog-pop", "gnc-progress-dialog-pop-full", "gnc-progress-dialog-reset-value", "gnc-progress-dialog-update", "gnc-progress-dialog-finish", "gnc-progress-dialog-destroy", "gnc-main-window-open-report", "gnc-ui-custom-report", NULL);
2564 24 : }
2565 :
2566 : SCM
2567 24 : scm_init_sw_gnome_module (void)
2568 : {
2569 24 : scm_c_define_module("sw_gnome",
2570 : SWIG_init_helper, NULL);
2571 24 : return SCM_UNSPECIFIED;
2572 : }
2573 :
|