Imported Upstream version 2.6.1
[debian/amanda] / perl / Amanda / Logfile.c
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 1.3.35
4  * 
5  * This file is not intended to be easily readable and contains a number of 
6  * coding conventions designed to improve portability and efficiency. Do not make
7  * changes to this file unless you know what you are doing--modify the SWIG 
8  * interface file instead. 
9  * ----------------------------------------------------------------------------- */
10
11 #define SWIGPERL
12 #define SWIG_CASTRANK_MODE
13 /* -----------------------------------------------------------------------------
14  *  This section contains generic SWIG labels for method/variable
15  *  declarations/attributes, and other compiler dependent labels.
16  * ----------------------------------------------------------------------------- */
17
18 /* template workaround for compilers that cannot correctly implement the C++ standard */
19 #ifndef SWIGTEMPLATEDISAMBIGUATOR
20 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
21 #  define SWIGTEMPLATEDISAMBIGUATOR template
22 # elif defined(__HP_aCC)
23 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
24 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
25 #  define SWIGTEMPLATEDISAMBIGUATOR template
26 # else
27 #  define SWIGTEMPLATEDISAMBIGUATOR
28 # endif
29 #endif
30
31 /* inline attribute */
32 #ifndef SWIGINLINE
33 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
34 #   define SWIGINLINE inline
35 # else
36 #   define SWIGINLINE
37 # endif
38 #endif
39
40 /* attribute recognised by some compilers to avoid 'unused' warnings */
41 #ifndef SWIGUNUSED
42 # if defined(__GNUC__)
43 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
44 #     define SWIGUNUSED __attribute__ ((__unused__)) 
45 #   else
46 #     define SWIGUNUSED
47 #   endif
48 # elif defined(__ICC)
49 #   define SWIGUNUSED __attribute__ ((__unused__)) 
50 # else
51 #   define SWIGUNUSED 
52 # endif
53 #endif
54
55 #ifndef SWIGUNUSEDPARM
56 # ifdef __cplusplus
57 #   define SWIGUNUSEDPARM(p)
58 # else
59 #   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
60 # endif
61 #endif
62
63 /* internal SWIG method */
64 #ifndef SWIGINTERN
65 # define SWIGINTERN static SWIGUNUSED
66 #endif
67
68 /* internal inline SWIG method */
69 #ifndef SWIGINTERNINLINE
70 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
71 #endif
72
73 /* exporting methods */
74 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
75 #  ifndef GCC_HASCLASSVISIBILITY
76 #    define GCC_HASCLASSVISIBILITY
77 #  endif
78 #endif
79
80 #ifndef SWIGEXPORT
81 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
82 #   if defined(STATIC_LINKED)
83 #     define SWIGEXPORT
84 #   else
85 #     define SWIGEXPORT __declspec(dllexport)
86 #   endif
87 # else
88 #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
89 #     define SWIGEXPORT __attribute__ ((visibility("default")))
90 #   else
91 #     define SWIGEXPORT
92 #   endif
93 # endif
94 #endif
95
96 /* calling conventions for Windows */
97 #ifndef SWIGSTDCALL
98 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
99 #   define SWIGSTDCALL __stdcall
100 # else
101 #   define SWIGSTDCALL
102 # endif 
103 #endif
104
105 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
106 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
107 # define _CRT_SECURE_NO_DEPRECATE
108 #endif
109
110 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
111 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
112 # define _SCL_SECURE_NO_DEPRECATE
113 #endif
114
115
116 /* -----------------------------------------------------------------------------
117  * swigrun.swg
118  *
119  * This file contains generic CAPI SWIG runtime support for pointer
120  * type checking.
121  * ----------------------------------------------------------------------------- */
122
123 /* This should only be incremented when either the layout of swig_type_info changes,
124    or for whatever reason, the runtime changes incompatibly */
125 #define SWIG_RUNTIME_VERSION "4"
126
127 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
128 #ifdef SWIG_TYPE_TABLE
129 # define SWIG_QUOTE_STRING(x) #x
130 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
131 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
132 #else
133 # define SWIG_TYPE_TABLE_NAME
134 #endif
135
136 /*
137   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
138   creating a static or dynamic library from the swig runtime code.
139   In 99.9% of the cases, swig just needs to declare them as 'static'.
140   
141   But only do this if is strictly necessary, ie, if you have problems
142   with your compiler or so.
143 */
144
145 #ifndef SWIGRUNTIME
146 # define SWIGRUNTIME SWIGINTERN
147 #endif
148
149 #ifndef SWIGRUNTIMEINLINE
150 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
151 #endif
152
153 /*  Generic buffer size */
154 #ifndef SWIG_BUFFER_SIZE
155 # define SWIG_BUFFER_SIZE 1024
156 #endif
157
158 /* Flags for pointer conversions */
159 #define SWIG_POINTER_DISOWN        0x1
160 #define SWIG_CAST_NEW_MEMORY       0x2
161
162 /* Flags for new pointer objects */
163 #define SWIG_POINTER_OWN           0x1
164
165
166 /* 
167    Flags/methods for returning states.
168    
169    The swig conversion methods, as ConvertPtr, return and integer 
170    that tells if the conversion was successful or not. And if not,
171    an error code can be returned (see swigerrors.swg for the codes).
172    
173    Use the following macros/flags to set or process the returning
174    states.
175    
176    In old swig versions, you usually write code as:
177
178      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
179        // success code
180      } else {
181        //fail code
182      }
183
184    Now you can be more explicit as:
185
186     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
187     if (SWIG_IsOK(res)) {
188       // success code
189     } else {
190       // fail code
191     }
192
193    that seems to be the same, but now you can also do
194
195     Type *ptr;
196     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
197     if (SWIG_IsOK(res)) {
198       // success code
199       if (SWIG_IsNewObj(res) {
200         ...
201         delete *ptr;
202       } else {
203         ...
204       }
205     } else {
206       // fail code
207     }
208     
209    I.e., now SWIG_ConvertPtr can return new objects and you can
210    identify the case and take care of the deallocation. Of course that
211    requires also to SWIG_ConvertPtr to return new result values, as
212
213       int SWIG_ConvertPtr(obj, ptr,...) {         
214         if (<obj is ok>) {                             
215           if (<need new object>) {                     
216             *ptr = <ptr to new allocated object>; 
217             return SWIG_NEWOBJ;                
218           } else {                                     
219             *ptr = <ptr to old object>;        
220             return SWIG_OLDOBJ;                
221           }                                    
222         } else {                                       
223           return SWIG_BADOBJ;                  
224         }                                              
225       }
226
227    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
228    more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
229    swig errors code.
230
231    Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
232    allows to return the 'cast rank', for example, if you have this
233
234        int food(double)
235        int fooi(int);
236
237    and you call
238  
239       food(1)   // cast rank '1'  (1 -> 1.0)
240       fooi(1)   // cast rank '0'
241
242    just use the SWIG_AddCast()/SWIG_CheckState()
243
244
245  */
246 #define SWIG_OK                    (0) 
247 #define SWIG_ERROR                 (-1)
248 #define SWIG_IsOK(r)               (r >= 0)
249 #define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
250
251 /* The CastRankLimit says how many bits are used for the cast rank */
252 #define SWIG_CASTRANKLIMIT         (1 << 8)
253 /* The NewMask denotes the object was created (using new/malloc) */
254 #define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
255 /* The TmpMask is for in/out typemaps that use temporal objects */
256 #define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
257 /* Simple returning values */
258 #define SWIG_BADOBJ                (SWIG_ERROR)
259 #define SWIG_OLDOBJ                (SWIG_OK)
260 #define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
261 #define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
262 /* Check, add and del mask methods */
263 #define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
264 #define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
265 #define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
266 #define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
267 #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
268 #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
269
270
271 /* Cast-Rank Mode */
272 #if defined(SWIG_CASTRANK_MODE)
273 #  ifndef SWIG_TypeRank
274 #    define SWIG_TypeRank             unsigned long
275 #  endif
276 #  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
277 #    define SWIG_MAXCASTRANK          (2)
278 #  endif
279 #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
280 #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
281 SWIGINTERNINLINE int SWIG_AddCast(int r) { 
282   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
283 }
284 SWIGINTERNINLINE int SWIG_CheckState(int r) { 
285   return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
286 }
287 #else /* no cast-rank mode */
288 #  define SWIG_AddCast
289 #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
290 #endif
291
292
293
294
295 #include <string.h>
296
297 #ifdef __cplusplus
298 extern "C" {
299 #endif
300
301 typedef void *(*swig_converter_func)(void *, int *);
302 typedef struct swig_type_info *(*swig_dycast_func)(void **);
303
304 /* Structure to store information on one type */
305 typedef struct swig_type_info {
306   const char             *name;                 /* mangled name of this type */
307   const char             *str;                  /* human readable name of this type */
308   swig_dycast_func        dcast;                /* dynamic cast function down a hierarchy */
309   struct swig_cast_info  *cast;                 /* linked list of types that can cast into this type */
310   void                   *clientdata;           /* language specific type data */
311   int                    owndata;               /* flag if the structure owns the clientdata */
312 } swig_type_info;
313
314 /* Structure to store a type and conversion function used for casting */
315 typedef struct swig_cast_info {
316   swig_type_info         *type;                 /* pointer to type that is equivalent to this type */
317   swig_converter_func     converter;            /* function to cast the void pointers */
318   struct swig_cast_info  *next;                 /* pointer to next cast in linked list */
319   struct swig_cast_info  *prev;                 /* pointer to the previous cast */
320 } swig_cast_info;
321
322 /* Structure used to store module information
323  * Each module generates one structure like this, and the runtime collects
324  * all of these structures and stores them in a circularly linked list.*/
325 typedef struct swig_module_info {
326   swig_type_info         **types;               /* Array of pointers to swig_type_info structures that are in this module */
327   size_t                 size;                  /* Number of types in this module */
328   struct swig_module_info *next;                /* Pointer to next element in circularly linked list */
329   swig_type_info         **type_initial;        /* Array of initially generated type structures */
330   swig_cast_info         **cast_initial;        /* Array of initially generated casting structures */
331   void                    *clientdata;          /* Language specific module data */
332 } swig_module_info;
333
334 /* 
335   Compare two type names skipping the space characters, therefore
336   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
337
338   Return 0 when the two name types are equivalent, as in
339   strncmp, but skipping ' '.
340 */
341 SWIGRUNTIME int
342 SWIG_TypeNameComp(const char *f1, const char *l1,
343                   const char *f2, const char *l2) {
344   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
345     while ((*f1 == ' ') && (f1 != l1)) ++f1;
346     while ((*f2 == ' ') && (f2 != l2)) ++f2;
347     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
348   }
349   return (int)((l1 - f1) - (l2 - f2));
350 }
351
352 /*
353   Check type equivalence in a name list like <name1>|<name2>|...
354   Return 0 if not equal, 1 if equal
355 */
356 SWIGRUNTIME int
357 SWIG_TypeEquiv(const char *nb, const char *tb) {
358   int equiv = 0;
359   const char* te = tb + strlen(tb);
360   const char* ne = nb;
361   while (!equiv && *ne) {
362     for (nb = ne; *ne; ++ne) {
363       if (*ne == '|') break;
364     }
365     equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
366     if (*ne) ++ne;
367   }
368   return equiv;
369 }
370
371 /*
372   Check type equivalence in a name list like <name1>|<name2>|...
373   Return 0 if equal, -1 if nb < tb, 1 if nb > tb
374 */
375 SWIGRUNTIME int
376 SWIG_TypeCompare(const char *nb, const char *tb) {
377   int equiv = 0;
378   const char* te = tb + strlen(tb);
379   const char* ne = nb;
380   while (!equiv && *ne) {
381     for (nb = ne; *ne; ++ne) {
382       if (*ne == '|') break;
383     }
384     equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
385     if (*ne) ++ne;
386   }
387   return equiv;
388 }
389
390
391 /* think of this as a c++ template<> or a scheme macro */
392 #define SWIG_TypeCheck_Template(comparison, ty)         \
393   if (ty) {                                             \
394     swig_cast_info *iter = ty->cast;                    \
395     while (iter) {                                      \
396       if (comparison) {                                 \
397         if (iter == ty->cast) return iter;              \
398         /* Move iter to the top of the linked list */   \
399         iter->prev->next = iter->next;                  \
400         if (iter->next)                                 \
401           iter->next->prev = iter->prev;                \
402         iter->next = ty->cast;                          \
403         iter->prev = 0;                                 \
404         if (ty->cast) ty->cast->prev = iter;            \
405         ty->cast = iter;                                \
406         return iter;                                    \
407       }                                                 \
408       iter = iter->next;                                \
409     }                                                   \
410   }                                                     \
411   return 0
412
413 /*
414   Check the typename
415 */
416 SWIGRUNTIME swig_cast_info *
417 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
418   SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
419 }
420
421 /* Same as previous function, except strcmp is replaced with a pointer comparison */
422 SWIGRUNTIME swig_cast_info *
423 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
424   SWIG_TypeCheck_Template(iter->type == from, into);
425 }
426
427 /*
428   Cast a pointer up an inheritance hierarchy
429 */
430 SWIGRUNTIMEINLINE void *
431 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
432   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
433 }
434
435 /* 
436    Dynamic pointer casting. Down an inheritance hierarchy
437 */
438 SWIGRUNTIME swig_type_info *
439 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
440   swig_type_info *lastty = ty;
441   if (!ty || !ty->dcast) return ty;
442   while (ty && (ty->dcast)) {
443     ty = (*ty->dcast)(ptr);
444     if (ty) lastty = ty;
445   }
446   return lastty;
447 }
448
449 /*
450   Return the name associated with this type
451 */
452 SWIGRUNTIMEINLINE const char *
453 SWIG_TypeName(const swig_type_info *ty) {
454   return ty->name;
455 }
456
457 /*
458   Return the pretty name associated with this type,
459   that is an unmangled type name in a form presentable to the user.
460 */
461 SWIGRUNTIME const char *
462 SWIG_TypePrettyName(const swig_type_info *type) {
463   /* The "str" field contains the equivalent pretty names of the
464      type, separated by vertical-bar characters.  We choose
465      to print the last name, as it is often (?) the most
466      specific. */
467   if (!type) return NULL;
468   if (type->str != NULL) {
469     const char *last_name = type->str;
470     const char *s;
471     for (s = type->str; *s; s++)
472       if (*s == '|') last_name = s+1;
473     return last_name;
474   }
475   else
476     return type->name;
477 }
478
479 /* 
480    Set the clientdata field for a type
481 */
482 SWIGRUNTIME void
483 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
484   swig_cast_info *cast = ti->cast;
485   /* if (ti->clientdata == clientdata) return; */
486   ti->clientdata = clientdata;
487   
488   while (cast) {
489     if (!cast->converter) {
490       swig_type_info *tc = cast->type;
491       if (!tc->clientdata) {
492         SWIG_TypeClientData(tc, clientdata);
493       }
494     }    
495     cast = cast->next;
496   }
497 }
498 SWIGRUNTIME void
499 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
500   SWIG_TypeClientData(ti, clientdata);
501   ti->owndata = 1;
502 }
503   
504 /*
505   Search for a swig_type_info structure only by mangled name
506   Search is a O(log #types)
507   
508   We start searching at module start, and finish searching when start == end.  
509   Note: if start == end at the beginning of the function, we go all the way around
510   the circular list.
511 */
512 SWIGRUNTIME swig_type_info *
513 SWIG_MangledTypeQueryModule(swig_module_info *start, 
514                             swig_module_info *end, 
515                             const char *name) {
516   swig_module_info *iter = start;
517   do {
518     if (iter->size) {
519       register size_t l = 0;
520       register size_t r = iter->size - 1;
521       do {
522         /* since l+r >= 0, we can (>> 1) instead (/ 2) */
523         register size_t i = (l + r) >> 1; 
524         const char *iname = iter->types[i]->name;
525         if (iname) {
526           register int compare = strcmp(name, iname);
527           if (compare == 0) {       
528             return iter->types[i];
529           } else if (compare < 0) {
530             if (i) {
531               r = i - 1;
532             } else {
533               break;
534             }
535           } else if (compare > 0) {
536             l = i + 1;
537           }
538         } else {
539           break; /* should never happen */
540         }
541       } while (l <= r);
542     }
543     iter = iter->next;
544   } while (iter != end);
545   return 0;
546 }
547
548 /*
549   Search for a swig_type_info structure for either a mangled name or a human readable name.
550   It first searches the mangled names of the types, which is a O(log #types)
551   If a type is not found it then searches the human readable names, which is O(#types).
552   
553   We start searching at module start, and finish searching when start == end.  
554   Note: if start == end at the beginning of the function, we go all the way around
555   the circular list.
556 */
557 SWIGRUNTIME swig_type_info *
558 SWIG_TypeQueryModule(swig_module_info *start, 
559                      swig_module_info *end, 
560                      const char *name) {
561   /* STEP 1: Search the name field using binary search */
562   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
563   if (ret) {
564     return ret;
565   } else {
566     /* STEP 2: If the type hasn't been found, do a complete search
567        of the str field (the human readable name) */
568     swig_module_info *iter = start;
569     do {
570       register size_t i = 0;
571       for (; i < iter->size; ++i) {
572         if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
573           return iter->types[i];
574       }
575       iter = iter->next;
576     } while (iter != end);
577   }
578   
579   /* neither found a match */
580   return 0;
581 }
582
583 /* 
584    Pack binary data into a string
585 */
586 SWIGRUNTIME char *
587 SWIG_PackData(char *c, void *ptr, size_t sz) {
588   static const char hex[17] = "0123456789abcdef";
589   register const unsigned char *u = (unsigned char *) ptr;
590   register const unsigned char *eu =  u + sz;
591   for (; u != eu; ++u) {
592     register unsigned char uu = *u;
593     *(c++) = hex[(uu & 0xf0) >> 4];
594     *(c++) = hex[uu & 0xf];
595   }
596   return c;
597 }
598
599 /* 
600    Unpack binary data from a string
601 */
602 SWIGRUNTIME const char *
603 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
604   register unsigned char *u = (unsigned char *) ptr;
605   register const unsigned char *eu = u + sz;
606   for (; u != eu; ++u) {
607     register char d = *(c++);
608     register unsigned char uu;
609     if ((d >= '0') && (d <= '9'))
610       uu = ((d - '0') << 4);
611     else if ((d >= 'a') && (d <= 'f'))
612       uu = ((d - ('a'-10)) << 4);
613     else 
614       return (char *) 0;
615     d = *(c++);
616     if ((d >= '0') && (d <= '9'))
617       uu |= (d - '0');
618     else if ((d >= 'a') && (d <= 'f'))
619       uu |= (d - ('a'-10));
620     else 
621       return (char *) 0;
622     *u = uu;
623   }
624   return c;
625 }
626
627 /* 
628    Pack 'void *' into a string buffer.
629 */
630 SWIGRUNTIME char *
631 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
632   char *r = buff;
633   if ((2*sizeof(void *) + 2) > bsz) return 0;
634   *(r++) = '_';
635   r = SWIG_PackData(r,&ptr,sizeof(void *));
636   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
637   strcpy(r,name);
638   return buff;
639 }
640
641 SWIGRUNTIME const char *
642 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
643   if (*c != '_') {
644     if (strcmp(c,"NULL") == 0) {
645       *ptr = (void *) 0;
646       return name;
647     } else {
648       return 0;
649     }
650   }
651   return SWIG_UnpackData(++c,ptr,sizeof(void *));
652 }
653
654 SWIGRUNTIME char *
655 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
656   char *r = buff;
657   size_t lname = (name ? strlen(name) : 0);
658   if ((2*sz + 2 + lname) > bsz) return 0;
659   *(r++) = '_';
660   r = SWIG_PackData(r,ptr,sz);
661   if (lname) {
662     strncpy(r,name,lname+1);
663   } else {
664     *r = 0;
665   }
666   return buff;
667 }
668
669 SWIGRUNTIME const char *
670 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
671   if (*c != '_') {
672     if (strcmp(c,"NULL") == 0) {
673       memset(ptr,0,sz);
674       return name;
675     } else {
676       return 0;
677     }
678   }
679   return SWIG_UnpackData(++c,ptr,sz);
680 }
681
682 #ifdef __cplusplus
683 }
684 #endif
685
686 /*  Errors in SWIG */
687 #define  SWIG_UnknownError         -1 
688 #define  SWIG_IOError              -2 
689 #define  SWIG_RuntimeError         -3 
690 #define  SWIG_IndexError           -4 
691 #define  SWIG_TypeError            -5 
692 #define  SWIG_DivisionByZero       -6 
693 #define  SWIG_OverflowError        -7 
694 #define  SWIG_SyntaxError          -8 
695 #define  SWIG_ValueError           -9 
696 #define  SWIG_SystemError          -10
697 #define  SWIG_AttributeError       -11
698 #define  SWIG_MemoryError          -12 
699 #define  SWIG_NullReferenceError   -13
700
701
702
703 #ifdef __cplusplus
704 /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
705 #include <math.h>
706 #include <stdlib.h>
707 extern "C" {
708 #endif
709 #include "EXTERN.h"
710 #include "perl.h"
711 #include "XSUB.h"
712
713 /* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
714
715 /* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
716 #ifndef PERL_REVISION
717 #  if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
718 #    define PERL_PATCHLEVEL_H_IMPLICIT
719 #    include <patchlevel.h>
720 #  endif
721 #  if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
722 #    include <could_not_find_Perl_patchlevel.h>
723 #  endif
724 #  ifndef PERL_REVISION
725 #    define PERL_REVISION       (5)
726 #    define PERL_VERSION        PATCHLEVEL
727 #    define PERL_SUBVERSION     SUBVERSION
728 #  endif
729 #endif
730
731 #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
732 #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
733 #endif
734
735 #ifndef SvIOK_UV
736 # define SvIOK_UV(sv)       (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
737 #endif
738
739 #ifndef SvUOK
740 # define SvUOK(sv)           SvIOK_UV(sv)
741 #endif
742
743 #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
744 #  define PL_sv_undef               sv_undef
745 #  define PL_na                     na
746 #  define PL_errgv                  errgv
747 #  define PL_sv_no                  sv_no
748 #  define PL_sv_yes                 sv_yes
749 #  define PL_markstack_ptr          markstack_ptr
750 #endif
751
752 #ifndef IVSIZE
753 #  ifdef LONGSIZE
754 #    define IVSIZE LONGSIZE
755 #  else
756 #    define IVSIZE 4 /* A bold guess, but the best we can make. */
757 #  endif
758 #endif
759
760 #ifndef INT2PTR
761 #  if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
762 #    define PTRV                  UV
763 #    define INT2PTR(any,d)        (any)(d)
764 #  else
765 #    if PTRSIZE == LONGSIZE
766 #      define PTRV                unsigned long
767 #    else
768 #      define PTRV                unsigned
769 #    endif
770 #    define INT2PTR(any,d)        (any)(PTRV)(d)
771 #  endif
772
773 #  define NUM2PTR(any,d)  (any)(PTRV)(d)
774 #  define PTR2IV(p)       INT2PTR(IV,p)
775 #  define PTR2UV(p)       INT2PTR(UV,p)
776 #  define PTR2NV(p)       NUM2PTR(NV,p)
777
778 #  if PTRSIZE == LONGSIZE
779 #    define PTR2ul(p)     (unsigned long)(p)
780 #  else
781 #    define PTR2ul(p)     INT2PTR(unsigned long,p)
782 #  endif
783 #endif /* !INT2PTR */
784
785 #ifndef SvPV_nolen
786 # define SvPV_nolen(x) SvPV(x,PL_na)
787 #endif
788
789 #ifndef get_sv
790 #  define get_sv perl_get_sv
791 #endif
792
793 #ifndef ERRSV
794 #  define ERRSV get_sv("@",FALSE)
795 #endif
796
797 #ifndef pTHX_
798 #define pTHX_
799 #endif   
800
801 #include <string.h>
802 #ifdef __cplusplus
803 }
804 #endif
805
806 /* -----------------------------------------------------------------------------
807  * error manipulation
808  * ----------------------------------------------------------------------------- */
809
810 SWIGINTERN const char*
811 SWIG_Perl_ErrorType(int code) {
812   const char* type = 0;
813   switch(code) {
814   case SWIG_MemoryError:
815     type = "MemoryError";
816     break;
817   case SWIG_IOError:
818     type = "IOError";
819     break;
820   case SWIG_RuntimeError:
821     type = "RuntimeError";
822     break;
823   case SWIG_IndexError:
824     type = "IndexError";
825     break;
826   case SWIG_TypeError:
827     type = "TypeError";
828     break;
829   case SWIG_DivisionByZero:
830     type = "ZeroDivisionError";
831     break;
832   case SWIG_OverflowError:
833     type = "OverflowError";
834     break;
835   case SWIG_SyntaxError:
836     type = "SyntaxError";
837     break;
838   case SWIG_ValueError:
839     type = "ValueError";
840     break;
841   case SWIG_SystemError:
842     type = "SystemError";
843     break;
844   case SWIG_AttributeError:
845     type = "AttributeError";
846     break;
847   default:
848     type = "RuntimeError";
849   }
850   return type;
851 }
852
853
854
855
856 /* -----------------------------------------------------------------------------
857  * perlrun.swg
858  *
859  * This file contains the runtime support for Perl modules
860  * and includes code for managing global variables and pointer
861  * type checking.
862  * ----------------------------------------------------------------------------- */
863
864 #ifdef PERL_OBJECT
865 #define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
866 #define SWIG_PERL_OBJECT_CALL pPerl,
867 #else
868 #define SWIG_PERL_OBJECT_DECL
869 #define SWIG_PERL_OBJECT_CALL
870 #endif
871
872 /* Common SWIG API */
873
874 /* for raw pointers */
875 #define SWIG_ConvertPtr(obj, pp, type, flags)           SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
876 #define SWIG_NewPointerObj(p, type, flags)              SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)
877
878 /* for raw packed data */
879 #define SWIG_ConvertPacked(obj, p, s, type)             SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
880 #define SWIG_NewPackedObj(p, s, type)                   SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type)
881
882 /* for class or struct pointers */
883 #define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
884 #define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
885
886 /* for C or C++ function pointers */
887 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_ConvertPtr(obj, pptr, type, 0)
888 #define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_NewPointerObj(ptr, type, 0)
889
890 /* for C++ member pointers, ie, member methods */
891 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_ConvertPacked(obj, ptr, sz, ty)
892 #define SWIG_NewMemberObj(ptr, sz, type)                SWIG_NewPackedObj(ptr, sz, type)
893
894
895 /* Runtime API */
896
897 #define SWIG_GetModule(clientdata)                      SWIG_Perl_GetModule()
898 #define SWIG_SetModule(clientdata, pointer)             SWIG_Perl_SetModule(pointer)
899
900
901 /* Error manipulation */
902
903 #define SWIG_ErrorType(code)                            SWIG_Perl_ErrorType(code)               
904 #define SWIG_Error(code, msg)                           sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg)
905 #define SWIG_fail                                       goto fail                                                   
906
907 /* Perl-specific SWIG API */
908
909 #define SWIG_MakePtr(sv, ptr, type, flags)              SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
910 #define SWIG_MakePackedObj(sv, p, s, type)              SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
911 #define SWIG_SetError(str)                              SWIG_Error(SWIG_RuntimeError, str)
912
913
914 #define SWIG_PERL_DECL_ARGS_1(arg1)                     (SWIG_PERL_OBJECT_DECL arg1)
915 #define SWIG_PERL_CALL_ARGS_1(arg1)                     (SWIG_PERL_OBJECT_CALL arg1)
916 #define SWIG_PERL_DECL_ARGS_2(arg1, arg2)               (SWIG_PERL_OBJECT_DECL arg1, arg2)
917 #define SWIG_PERL_CALL_ARGS_2(arg1, arg2)               (SWIG_PERL_OBJECT_CALL arg1, arg2)
918
919 /* -----------------------------------------------------------------------------
920  * pointers/data manipulation
921  * ----------------------------------------------------------------------------- */
922
923 /* For backward compatibility only */
924 #define SWIG_POINTER_EXCEPTION  0
925
926 #ifdef __cplusplus
927 extern "C" {
928 #endif
929
930 #define SWIG_OWNER   SWIG_POINTER_OWN
931 #define SWIG_SHADOW  SWIG_OWNER << 1
932
933 #define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL
934
935 /* SWIG Perl macros */
936
937 /* Macro to declare an XS function */
938 #ifndef XSPROTO
939 #   define XSPROTO(name) void name(pTHX_ CV* cv)
940 #endif
941
942 /* Macro to call an XS function */
943 #ifdef PERL_OBJECT 
944 #  define SWIG_CALLXS(_name) _name(cv,pPerl) 
945 #else 
946 #  ifndef MULTIPLICITY 
947 #    define SWIG_CALLXS(_name) _name(cv) 
948 #  else 
949 #    define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) 
950 #  endif 
951 #endif 
952
953 #ifdef PERL_OBJECT
954 #define MAGIC_PPERL  CPerlObj *pPerl = (CPerlObj *) this;
955
956 #ifdef __cplusplus
957 extern "C" {
958 #endif
959 typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
960 #ifdef __cplusplus
961 }
962 #endif
963
964 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
965 #define SWIGCLASS_STATIC
966
967 #else /* PERL_OBJECT */
968
969 #define MAGIC_PPERL
970 #define SWIGCLASS_STATIC static SWIGUNUSED
971
972 #ifndef MULTIPLICITY
973 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
974
975 #ifdef __cplusplus
976 extern "C" {
977 #endif
978 typedef int (*SwigMagicFunc)(SV *, MAGIC *);
979 #ifdef __cplusplus
980 }
981 #endif
982
983 #else /* MULTIPLICITY */
984
985 #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
986
987 #ifdef __cplusplus
988 extern "C" {
989 #endif
990 typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
991 #ifdef __cplusplus
992 }
993 #endif
994
995 #endif /* MULTIPLICITY */
996 #endif /* PERL_OBJECT */
997
998 /* Workaround for bug in perl 5.6.x croak and earlier */
999 #if (PERL_VERSION < 8)
1000 #  ifdef PERL_OBJECT
1001 #    define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
1002 static void SWIG_Perl_croak_null(CPerlObj *pPerl)
1003 #  else
1004 static void SWIG_croak_null()
1005 #  endif
1006 {
1007   SV *err=ERRSV;
1008 #  if (PERL_VERSION < 6)
1009   croak("%_", err);
1010 #  else
1011   if (SvOK(err) && !SvROK(err)) croak("%_", err);
1012   croak(Nullch);
1013 #  endif
1014 }
1015 #else
1016 #  define SWIG_croak_null() croak(Nullch)
1017 #endif
1018
1019
1020 /* 
1021    Define how strict is the cast between strings and integers/doubles
1022    when overloading between these types occurs.
1023    
1024    The default is making it as strict as possible by using SWIG_AddCast
1025    when needed.
1026    
1027    You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
1028    disable the SWIG_AddCast, making the casting between string and
1029    numbers less strict.
1030
1031    In the end, we try to solve the overloading between strings and
1032    numerical types in the more natural way, but if you can avoid it,
1033    well, avoid it using %rename, for example.
1034 */
1035 #ifndef SWIG_PERL_NO_STRICT_STR2NUM
1036 # ifndef SWIG_PERL_STRICT_STR2NUM
1037 #  define SWIG_PERL_STRICT_STR2NUM
1038 # endif
1039 #endif
1040 #ifdef SWIG_PERL_STRICT_STR2NUM
1041 /* string takes precedence */
1042 #define SWIG_Str2NumCast(x) SWIG_AddCast(x)  
1043 #else
1044 /* number takes precedence */
1045 #define SWIG_Str2NumCast(x) x
1046 #endif
1047
1048
1049
1050 #include <stdlib.h>
1051
1052 SWIGRUNTIME const char *
1053 SWIG_Perl_TypeProxyName(const swig_type_info *type) {
1054   if (!type) return NULL;
1055   if (type->clientdata != NULL) {
1056     return (const char*) type->clientdata;
1057   } 
1058   else {
1059     return type->name;
1060   }
1061 }
1062
1063 SWIGRUNTIME swig_cast_info *
1064 SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
1065   SWIG_TypeCheck_Template(( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) 
1066                             || (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0))), ty);
1067 }
1068
1069
1070 /* Function for getting a pointer value */
1071
1072 SWIGRUNTIME int
1073 SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
1074   swig_cast_info *tc;
1075   void *voidptr = (void *)0;
1076   SV *tsv = 0;
1077   /* If magical, apply more magic */
1078   if (SvGMAGICAL(sv))
1079     mg_get(sv);
1080
1081   /* Check to see if this is an object */
1082   if (sv_isobject(sv)) {
1083     IV tmp = 0;
1084     tsv = (SV*) SvRV(sv);
1085     if ((SvTYPE(tsv) == SVt_PVHV)) {
1086       MAGIC *mg;
1087       if (SvMAGICAL(tsv)) {
1088         mg = mg_find(tsv,'P');
1089         if (mg) {
1090           sv = mg->mg_obj;
1091           if (sv_isobject(sv)) {
1092             tsv = (SV*)SvRV(sv);
1093             tmp = SvIV(tsv);
1094           }
1095         }
1096       } else {
1097         return SWIG_ERROR;
1098       }
1099     } else {
1100       tmp = SvIV(tsv);
1101     }
1102     voidptr = INT2PTR(void *,tmp);
1103   } else if (! SvOK(sv)) {            /* Check for undef */
1104     *(ptr) = (void *) 0;
1105     return SWIG_OK;
1106   } else if (SvTYPE(sv) == SVt_RV) {  /* Check for NULL pointer */
1107     if (!SvROK(sv)) {
1108       *(ptr) = (void *) 0;
1109       return SWIG_OK;
1110     } else {
1111       return SWIG_ERROR;
1112     }
1113   } else {                            /* Don't know what it is */
1114     return SWIG_ERROR;
1115   }
1116   if (_t) {
1117     /* Now see if the types match */
1118     char *_c = HvNAME(SvSTASH(SvRV(sv)));
1119     tc = SWIG_TypeProxyCheck(_c,_t);
1120     if (!tc) {
1121       return SWIG_ERROR;
1122     }
1123     {
1124       int newmemory = 0;
1125       *ptr = SWIG_TypeCast(tc,voidptr,&newmemory);
1126       assert(!newmemory); /* newmemory handling not yet implemented */
1127     }
1128   } else {
1129     *ptr = voidptr;
1130   }
1131
1132   /* 
1133    *  DISOWN implementation: we need a perl guru to check this one.
1134    */
1135   if (tsv && (flags & SWIG_POINTER_DISOWN)) {
1136     /* 
1137      *  almost copy paste code from below SWIG_POINTER_OWN setting
1138      */
1139     SV *obj = sv;
1140     HV *stash = SvSTASH(SvRV(obj));
1141     GV *gv = *(GV**) hv_fetch(stash, "OWNER", 5, TRUE);
1142     if (isGV(gv)) {
1143       HV *hv = GvHVn(gv);
1144       /*
1145        * To set ownership (see below), a newSViv(1) entry is added. 
1146        * Hence, to remove ownership, we delete the entry.
1147        */
1148       if (hv_exists_ent(hv, obj, 0)) {
1149         hv_delete_ent(hv, obj, 0, 0);
1150       }
1151     }
1152   }
1153   return SWIG_OK;
1154 }
1155
1156 SWIGRUNTIME void
1157 SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
1158   if (ptr && (flags & SWIG_SHADOW)) {
1159     SV *self;
1160     SV *obj=newSV(0);
1161     HV *hash=newHV();
1162     HV *stash;
1163     sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr);
1164     stash=SvSTASH(SvRV(obj));
1165     if (flags & SWIG_POINTER_OWN) {
1166       HV *hv;
1167       GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
1168       if (!isGV(gv))
1169         gv_init(gv, stash, "OWNER", 5, FALSE);
1170       hv=GvHVn(gv);
1171       hv_store_ent(hv, obj, newSViv(1), 0);
1172     }
1173     sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
1174     SvREFCNT_dec(obj);
1175     self=newRV_noinc((SV *)hash);
1176     sv_setsv(sv, self);
1177     SvREFCNT_dec((SV *)self);
1178     sv_bless(sv, stash);
1179   }
1180   else {
1181     sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr);
1182   }
1183 }
1184
1185 SWIGRUNTIMEINLINE SV *
1186 SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
1187   SV *result = sv_newmortal();
1188   SWIG_MakePtr(result, ptr, t, flags);
1189   return result;
1190 }
1191
1192 SWIGRUNTIME void
1193 SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
1194   char result[1024];
1195   char *r = result;
1196   if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return;
1197   *(r++) = '_';
1198   r = SWIG_PackData(r,ptr,sz);
1199   strcpy(r,SWIG_Perl_TypeProxyName(type));
1200   sv_setpv(sv, result);
1201 }
1202
1203 SWIGRUNTIME SV *
1204 SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) {
1205   SV *result = sv_newmortal();
1206   SWIG_Perl_MakePackedObj(result, ptr, sz, type);
1207   return result;
1208 }
1209
1210 /* Convert a packed value value */
1211 SWIGRUNTIME int
1212 SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) {
1213   swig_cast_info *tc;
1214   const char  *c = 0;
1215
1216   if ((!obj) || (!SvOK(obj))) return SWIG_ERROR;
1217   c = SvPV_nolen(obj);
1218   /* Pointer values must start with leading underscore */
1219   if (*c != '_') return SWIG_ERROR;
1220   c++;
1221   c = SWIG_UnpackData(c,ptr,sz);
1222   if (ty) {
1223     tc = SWIG_TypeCheck(c,ty);
1224     if (!tc) return SWIG_ERROR;
1225   }
1226   return SWIG_OK;
1227 }
1228
1229
1230 /* Macros for low-level exception handling */
1231 #define SWIG_croak(x)    { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }
1232
1233
1234 typedef XSPROTO(SwigPerlWrapper);
1235 typedef SwigPerlWrapper *SwigPerlWrapperPtr;
1236
1237 /* Structure for command table */
1238 typedef struct {
1239   const char         *name;
1240   SwigPerlWrapperPtr  wrapper;
1241 } swig_command_info;
1242
1243 /* Information for constant table */
1244
1245 #define SWIG_INT     1
1246 #define SWIG_FLOAT   2
1247 #define SWIG_STRING  3
1248 #define SWIG_POINTER 4
1249 #define SWIG_BINARY  5
1250
1251 /* Constant information structure */
1252 typedef struct swig_constant_info {
1253     int              type;
1254     const char      *name;
1255     long             lvalue;
1256     double           dvalue;
1257     void            *pvalue;
1258     swig_type_info **ptype;
1259 } swig_constant_info;
1260
1261
1262 /* Structure for variable table */
1263 typedef struct {
1264   const char   *name;
1265   SwigMagicFunc   set;
1266   SwigMagicFunc   get;
1267   swig_type_info  **type;
1268 } swig_variable_info;
1269
1270 /* Magic variable code */
1271 #ifndef PERL_OBJECT
1272 #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
1273   #ifndef MULTIPLICITY
1274      SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) 
1275   #else
1276      SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) 
1277   #endif
1278 #else
1279 #  define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
1280 SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) 
1281 #endif
1282 {
1283   MAGIC *mg;
1284   sv_magic(sv,sv,'U',(char *) name,strlen(name));
1285   mg = mg_find(sv,'U');
1286   mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
1287   mg->mg_virtual->svt_get = (SwigMagicFunc) get;
1288   mg->mg_virtual->svt_set = (SwigMagicFunc) set;
1289   mg->mg_virtual->svt_len = 0;
1290   mg->mg_virtual->svt_clear = 0;
1291   mg->mg_virtual->svt_free = 0;
1292 }
1293
1294
1295 SWIGRUNTIME swig_module_info *
1296 SWIG_Perl_GetModule(void) {
1297   static void *type_pointer = (void *)0;
1298   SV *pointer;
1299
1300   /* first check if pointer already created */
1301   if (!type_pointer) {
1302     pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI);
1303     if (pointer && SvOK(pointer)) {
1304       type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
1305     }
1306   }
1307
1308   return (swig_module_info *) type_pointer;
1309 }
1310
1311 SWIGRUNTIME void
1312 SWIG_Perl_SetModule(swig_module_info *module) {
1313   SV *pointer;
1314
1315   /* create a new pointer */
1316   pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI);
1317   sv_setiv(pointer, PTR2IV(module));
1318 }
1319
1320 #ifdef __cplusplus
1321 }
1322 #endif
1323
1324 /* Workaround perl5 global namespace pollution. Note that undefining library
1325  * functions like fopen will not solve the problem on all platforms as fopen
1326  * might be a macro on Windows but not necessarily on other operating systems. */
1327 #ifdef do_open
1328   #undef do_open
1329 #endif
1330 #ifdef do_close
1331   #undef do_close
1332 #endif
1333 #ifdef scalar
1334   #undef scalar
1335 #endif
1336 #ifdef list
1337   #undef list
1338 #endif
1339 #ifdef apply
1340   #undef apply
1341 #endif
1342 #ifdef convert
1343   #undef convert
1344 #endif
1345 #ifdef Error
1346   #undef Error
1347 #endif
1348 #ifdef form
1349   #undef form
1350 #endif
1351 #ifdef vform
1352   #undef vform
1353 #endif
1354 #ifdef LABEL
1355   #undef LABEL
1356 #endif
1357 #ifdef METHOD
1358   #undef METHOD
1359 #endif
1360 #ifdef Move
1361   #undef Move
1362 #endif
1363 #ifdef yylex
1364   #undef yylex
1365 #endif
1366 #ifdef yyparse
1367   #undef yyparse
1368 #endif
1369 #ifdef yyerror
1370   #undef yyerror
1371 #endif
1372 #ifdef invert
1373   #undef invert
1374 #endif
1375 #ifdef ref
1376   #undef ref
1377 #endif
1378 #ifdef read
1379   #undef read
1380 #endif
1381 #ifdef write
1382   #undef write
1383 #endif
1384 #ifdef eof
1385   #undef eof
1386 #endif
1387 #ifdef bool
1388   #undef bool
1389 #endif
1390 #ifdef close
1391   #undef close
1392 #endif
1393 #ifdef rewind
1394   #undef rewind
1395 #endif
1396 #ifdef free
1397   #undef free
1398 #endif
1399 #ifdef malloc
1400   #undef malloc
1401 #endif
1402 #ifdef calloc
1403   #undef calloc
1404 #endif
1405 #ifdef Stat
1406   #undef Stat
1407 #endif
1408 #ifdef check
1409   #undef check
1410 #endif
1411 #ifdef seekdir
1412   #undef seekdir
1413 #endif
1414 #ifdef open
1415   #undef open
1416 #endif
1417
1418
1419
1420 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
1421
1422 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
1423
1424
1425
1426   #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) 
1427
1428
1429 /* -------- TYPES TABLE (BEGIN) -------- */
1430
1431 #define SWIGTYPE_p_FILE swig_types[0]
1432 #define SWIGTYPE_p_GSList swig_types[1]
1433 #define SWIGTYPE_p_char swig_types[2]
1434 #define SWIGTYPE_p_double swig_types[3]
1435 #define SWIGTYPE_p_dumpspec_t swig_types[4]
1436 #define SWIGTYPE_p_find_result_t swig_types[5]
1437 #define SWIGTYPE_p_float swig_types[6]
1438 #define SWIGTYPE_p_int swig_types[7]
1439 #define SWIGTYPE_p_unsigned_char swig_types[8]
1440 static swig_type_info *swig_types[10];
1441 static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0};
1442 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1443 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1444
1445 /* -------- TYPES TABLE (END) -------- */
1446
1447 #define SWIG_init    boot_Amanda__Logfile
1448
1449 #define SWIG_name   "Amanda::Logfilec::boot_Amanda__Logfile"
1450 #define SWIG_prefix "Amanda::Logfilec::"
1451
1452 #define SWIGVERSION 0x010335 
1453 #define SWIG_VERSION SWIGVERSION
1454
1455
1456 #define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
1457 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 
1458
1459
1460 #ifdef __cplusplus
1461 extern "C"
1462 #endif
1463 #ifndef PERL_OBJECT
1464 #ifndef MULTIPLICITY
1465 SWIGEXPORT void SWIG_init (CV* cv);
1466 #else
1467 SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
1468 #endif
1469 #else
1470 SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
1471 #endif
1472
1473
1474 #include "amglue.h"
1475
1476
1477 #include "amglue.h"
1478
1479
1480 #include "amglue.h"
1481
1482
1483 #include "cmdline.h"
1484
1485
1486 typedef GSList amglue_dumpspec_list;
1487
1488
1489 #include <glib.h>
1490 #include "logfile.h"
1491 #include "find.h"
1492 #include "diskfile.h" /* for the gross hack, below */
1493
1494
1495 SWIGINTERNINLINE SV *
1496 SWIG_From_long  SWIG_PERL_DECL_ARGS_1(long value)
1497 {    
1498   SV *obj = sv_newmortal();
1499   sv_setiv(obj, (IV) value);
1500   return obj;
1501 }
1502
1503
1504 SWIGINTERNINLINE SV *
1505 SWIG_From_int  SWIG_PERL_DECL_ARGS_1(int value)
1506 {    
1507   return SWIG_From_long  SWIG_PERL_CALL_ARGS_1(value);
1508 }
1509
1510
1511 /* open_ and close_logfile are both simple wrappers around fopen/fclose. */
1512 typedef FILE loghandle;
1513
1514 loghandle *open_logfile(char *filename) {
1515     return fopen(filename, "r");
1516 }
1517
1518
1519 SWIGINTERN swig_type_info*
1520 SWIG_pchar_descriptor(void)
1521 {
1522   static int init = 0;
1523   static swig_type_info* info = 0;
1524   if (!init) {
1525     info = SWIG_TypeQuery("_p_char");
1526     init = 1;
1527   }
1528   return info;
1529 }
1530
1531
1532 SWIGINTERN int
1533 SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
1534 {
1535   if (SvPOK(obj)) {
1536     STRLEN len = 0;
1537     char *cstr = SvPV(obj, len); 
1538     size_t size = len + 1;
1539     if (cptr)  {
1540       if (alloc) {
1541         if (*alloc == SWIG_NEWOBJ) {
1542           *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
1543         } else {
1544           *cptr = cstr;
1545           *alloc = SWIG_OLDOBJ;
1546         }
1547       }
1548     }
1549     if (psize) *psize = size;
1550     return SWIG_OK;
1551   } else {
1552     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1553     if (pchar_descriptor) {
1554       char* vptr = 0; 
1555       if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) {
1556         if (cptr) *cptr = vptr;
1557         if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
1558         if (alloc) *alloc = SWIG_OLDOBJ;
1559         return SWIG_OK;
1560       }
1561     }
1562   }
1563   return SWIG_TypeError;
1564 }
1565
1566
1567
1568
1569
1570 void close_logfile(loghandle *logfile) {
1571     if (logfile) fclose(logfile);
1572 }
1573
1574
1575 typedef int LOGLINE_RETURN;
1576
1577 SWIGINTERN void delete_find_result_t(find_result_t *self){
1578             find_result_t *selfp = self;
1579             free_find_result(&selfp);
1580         }
1581
1582 SWIGINTERNINLINE SV *
1583 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
1584 {
1585   SV *obj = sv_newmortal();
1586   if (carray) {
1587     sv_setpvn(obj, carray, size);
1588   } else {
1589     sv_setsv(obj, &PL_sv_undef);
1590   }
1591   return obj;
1592 }
1593
1594
1595 SWIGINTERNINLINE SV * 
1596 SWIG_FromCharPtr(const char *cptr)
1597
1598   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
1599 }
1600
1601
1602 SWIGINTERNINLINE SV *
1603 SWIG_From_double  SWIG_PERL_DECL_ARGS_1(double value)
1604 {    
1605   SV *obj = sv_newmortal();
1606   sv_setnv(obj, value);
1607   return obj;
1608 }
1609
1610
1611 find_result_t *search_logfile_wrap(char *label, char *datestamp, 
1612                                    char *logfile, int add_missing_disks) {
1613     find_result_t *rv = NULL;
1614
1615     /* We use a static variable to collect any unrecognized disks */
1616     static disklist_t unrecognized_disks = { NULL, NULL };
1617
1618     search_logfile(&rv, label, datestamp, logfile, 
1619         add_missing_disks? &unrecognized_disks : NULL);
1620
1621     return rv;
1622 }
1623
1624
1625 #include <limits.h>
1626 #if !defined(SWIG_NO_LLONG_MAX)
1627 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1628 #   define LLONG_MAX __LONG_LONG_MAX__
1629 #   define LLONG_MIN (-LLONG_MAX - 1LL)
1630 #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1631 # endif
1632 #endif
1633
1634
1635 SWIGINTERN int
1636 SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val)
1637 {
1638   if (SvNIOK(obj)) {
1639     if (val) *val = SvNV(obj);
1640     return SWIG_OK;
1641   } else if (SvIOK(obj)) {
1642     if (val) *val = (double) SvIV(obj);
1643     return SWIG_AddCast(SWIG_OK);
1644   } else {
1645     const char *nptr = SvPV_nolen(obj);
1646     if (nptr) {
1647       char *endptr;
1648       double v = strtod(nptr, &endptr);
1649       if (errno == ERANGE) {
1650         errno = 0;
1651         return SWIG_OverflowError;
1652       } else {
1653         if (*endptr == '\0') {
1654           if (val) *val = v;
1655           return SWIG_Str2NumCast(SWIG_OK);
1656         }
1657       }
1658     }
1659   }
1660   return SWIG_TypeError;
1661 }
1662
1663
1664 #include <float.h>
1665
1666
1667 #include <math.h>
1668
1669
1670 SWIGINTERNINLINE int
1671 SWIG_CanCastAsInteger(double *d, double min, double max) {
1672   double x = *d;
1673   if ((min <= x && x <= max)) {
1674    double fx = floor(x);
1675    double cx = ceil(x);
1676    double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
1677    if ((errno == EDOM) || (errno == ERANGE)) {
1678      errno = 0;
1679    } else {
1680      double summ, reps, diff;
1681      if (rd < x) {
1682        diff = x - rd;
1683      } else if (rd > x) {
1684        diff = rd - x;
1685      } else {
1686        return 1;
1687      }
1688      summ = rd + x;
1689      reps = diff/summ;
1690      if (reps < 8*DBL_EPSILON) {
1691        *d = rd;
1692        return 1;
1693      }
1694    }
1695   }
1696   return 0;
1697 }
1698
1699
1700 SWIGINTERN int
1701 SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
1702 {
1703   if (SvIOK(obj)) {
1704     if (val) *val = SvIV(obj);
1705     return SWIG_OK;
1706   } else {
1707     int dispatch = 0;
1708     const char *nptr = SvPV_nolen(obj);
1709     if (nptr) {
1710       char *endptr;
1711       long v;
1712       errno = 0;
1713       v = strtol(nptr, &endptr,0);
1714       if (errno == ERANGE) {
1715         errno = 0;
1716         return SWIG_OverflowError;
1717       } else {
1718         if (*endptr == '\0') {
1719           if (val) *val = v;
1720           return SWIG_Str2NumCast(SWIG_OK);
1721         }
1722       }
1723     }
1724     if (!dispatch) {
1725       double d;
1726       int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
1727       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
1728         if (val) *val = (long)(d);
1729         return res;
1730       }
1731     }
1732   }
1733   return SWIG_TypeError;
1734 }
1735
1736
1737 SWIGINTERN int
1738 SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
1739 {
1740   long v;
1741   int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
1742   if (SWIG_IsOK(res)) {
1743     if ((v < INT_MIN || v > INT_MAX)) {
1744       return SWIG_OverflowError;
1745     } else {
1746       if (val) *val = (int)(v);
1747     }
1748   }  
1749   return res;
1750 }
1751
1752 #ifdef __cplusplus
1753 extern "C" {
1754 #endif
1755
1756 #ifdef PERL_OBJECT
1757 #define MAGIC_CLASS _wrap_Amanda::Logfile_var::
1758 class _wrap_Amanda::Logfile_var : public CPerlObj {
1759 public:
1760 #else
1761 #define MAGIC_CLASS
1762 #endif
1763 SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
1764     MAGIC_PPERL
1765     croak("Value is read-only.");
1766     return 0;
1767 }
1768
1769
1770 #ifdef PERL_OBJECT
1771 };
1772 #endif
1773
1774 #ifdef __cplusplus
1775 }
1776 #endif
1777
1778 #ifdef __cplusplus
1779 extern "C" {
1780 #endif
1781 XS(_wrap_open_logfile) {
1782   {
1783     char *arg1 = (char *) 0 ;
1784     loghandle *result = 0 ;
1785     int res1 ;
1786     char *buf1 = 0 ;
1787     int alloc1 = 0 ;
1788     int argvi = 0;
1789     dXSARGS;
1790     
1791     if ((items < 1) || (items > 1)) {
1792       SWIG_croak("Usage: open_logfile(filename);");
1793     }
1794     res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
1795     if (!SWIG_IsOK(res1)) {
1796       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "open_logfile" "', argument " "1"" of type '" "char *""'");
1797     }
1798     arg1 = (char *)(buf1);
1799     result = (loghandle *)open_logfile(arg1);
1800     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FILE, 0 | 0); argvi++ ;
1801     if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
1802     XSRETURN(argvi);
1803   fail:
1804     if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
1805     SWIG_croak_null();
1806   }
1807 }
1808
1809
1810 XS(_wrap_close_logfile) {
1811   {
1812     loghandle *arg1 = (loghandle *) 0 ;
1813     void *argp1 = 0 ;
1814     int res1 = 0 ;
1815     int argvi = 0;
1816     dXSARGS;
1817     
1818     if ((items < 1) || (items > 1)) {
1819       SWIG_croak("Usage: close_logfile(logfile);");
1820     }
1821     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FILE, 0 |  0 );
1822     if (!SWIG_IsOK(res1)) {
1823       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "close_logfile" "', argument " "1"" of type '" "loghandle *""'"); 
1824     }
1825     arg1 = (loghandle *)(argp1);
1826     close_logfile(arg1);
1827     
1828     
1829     XSRETURN(argvi);
1830   fail:
1831     
1832     SWIG_croak_null();
1833   }
1834 }
1835
1836
1837 XS(_wrap_get_logline) {
1838   {
1839     FILE *arg1 = (FILE *) 0 ;
1840     LOGLINE_RETURN result;
1841     void *argp1 = 0 ;
1842     int res1 = 0 ;
1843     int argvi = 0;
1844     dXSARGS;
1845     
1846     if ((items < 1) || (items > 1)) {
1847       SWIG_croak("Usage: get_logline(logfile);");
1848     }
1849     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_FILE, 0 |  0 );
1850     if (!SWIG_IsOK(res1)) {
1851       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_logline" "', argument " "1"" of type '" "FILE *""'"); 
1852     }
1853     arg1 = (FILE *)(argp1);
1854     result = get_logline(arg1);
1855     {
1856       if (result != 0) {
1857         EXTEND(SP, 3);
1858         ST(argvi) = sv_2mortal(newSViv(curlog));
1859         argvi++;
1860         ST(argvi) = sv_2mortal(newSViv(curprog));
1861         argvi++;
1862         ST(argvi) = sv_2mortal(newSVpv(curstr, 0));
1863         argvi++;
1864       }
1865       /* otherwise (end of logfile) return an empty list */
1866     }
1867     
1868     XSRETURN(argvi);
1869   fail:
1870     
1871     SWIG_croak_null();
1872   }
1873 }
1874
1875
1876 XS(_wrap_delete_find_result_t) {
1877   {
1878     find_result_t *arg1 = (find_result_t *) 0 ;
1879     void *argp1 = 0 ;
1880     int res1 = 0 ;
1881     int argvi = 0;
1882     dXSARGS;
1883     
1884     if ((items < 1) || (items > 1)) {
1885       SWIG_croak("Usage: delete_find_result_t(self);");
1886     }
1887     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_find_result_t, SWIG_POINTER_DISOWN |  0 );
1888     if (!SWIG_IsOK(res1)) {
1889       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_find_result_t" "', argument " "1"" of type '" "find_result_t *""'"); 
1890     }
1891     arg1 = (find_result_t *)(argp1);
1892     delete_find_result_t(arg1);
1893     
1894     
1895     
1896     XSRETURN(argvi);
1897   fail:
1898     
1899     SWIG_croak_null();
1900   }
1901 }
1902
1903
1904 XS(_wrap_find_result_t_timestamp_get) {
1905   {
1906     find_result_t *arg1 = (find_result_t *) 0 ;
1907     char *result = 0 ;
1908     void *argp1 = 0 ;
1909     int res1 = 0 ;
1910     int argvi = 0;
1911     dXSARGS;
1912     
1913     if ((items < 1) || (items > 1)) {
1914       SWIG_croak("Usage: find_result_t_timestamp_get(self);");
1915     }
1916     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_find_result_t, 0 |  0 );
1917     if (!SWIG_IsOK(res1)) {
1918       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "find_result_t_timestamp_get" "', argument " "1"" of type '" "find_result_t *""'"); 
1919     }
1920     arg1 = (find_result_t *)(argp1);
1921     result = (char *) ((arg1)->timestamp);
1922     ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
1923     
1924     XSRETURN(argvi);
1925   fail:
1926     
1927     SWIG_croak_null();
1928   }
1929 }
1930
1931
1932 XS(_wrap_find_result_t_hostname_get) {
1933   {
1934     find_result_t *arg1 = (find_result_t *) 0 ;
1935     char *result = 0 ;
1936     void *argp1 = 0 ;
1937     int res1 = 0 ;
1938     int argvi = 0;
1939     dXSARGS;
1940     
1941     if ((items < 1) || (items > 1)) {
1942       SWIG_croak("Usage: find_result_t_hostname_get(self);");
1943     }
1944     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_find_result_t, 0 |  0 );
1945     if (!SWIG_IsOK(res1)) {
1946       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "find_result_t_hostname_get" "', argument " "1"" of type '" "find_result_t *""'"); 
1947     }
1948     arg1 = (find_result_t *)(argp1);
1949     result = (char *) ((arg1)->hostname);
1950     ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
1951     
1952     XSRETURN(argvi);
1953   fail:
1954     
1955     SWIG_croak_null();
1956   }
1957 }
1958
1959
1960 XS(_wrap_find_result_t_diskname_get) {
1961   {
1962     find_result_t *arg1 = (find_result_t *) 0 ;
1963     char *result = 0 ;
1964     void *argp1 = 0 ;
1965     int res1 = 0 ;
1966     int argvi = 0;
1967     dXSARGS;
1968     
1969     if ((items < 1) || (items > 1)) {
1970       SWIG_croak("Usage: find_result_t_diskname_get(self);");
1971     }
1972     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_find_result_t, 0 |  0 );
1973     if (!SWIG_IsOK(res1)) {
1974       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "find_result_t_diskname_get" "', argument " "1"" of type '" "find_result_t *""'"); 
1975     }
1976     arg1 = (find_result_t *)(argp1);
1977     result = (char *) ((arg1)->diskname);
1978     ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
1979     
1980     XSRETURN(argvi);
1981   fail:
1982     
1983     SWIG_croak_null();
1984   }
1985 }
1986
1987
1988 XS(_wrap_find_result_t_level_get) {
1989   {
1990     find_result_t *arg1 = (find_result_t *) 0 ;
1991     int result;
1992     void *argp1 = 0 ;
1993     int res1 = 0 ;
1994     int argvi = 0;
1995     dXSARGS;
1996     
1997     if ((items < 1) || (items > 1)) {
1998       SWIG_croak("Usage: find_result_t_level_get(self);");
1999     }
2000     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_find_result_t, 0 |  0 );
2001     if (!SWIG_IsOK(res1)) {
2002       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "find_result_t_level_get" "', argument " "1"" of type '" "find_result_t *""'"); 
2003     }
2004     arg1 = (find_result_t *)(argp1);
2005     result = (int) ((arg1)->level);
2006     {
2007       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2008       argvi++;
2009     }
2010     
2011     XSRETURN(argvi);
2012   fail:
2013     
2014     SWIG_croak_null();
2015   }
2016 }
2017
2018
2019 XS(_wrap_find_result_t_label_get) {
2020   {
2021     find_result_t *arg1 = (find_result_t *) 0 ;
2022     char *result = 0 ;
2023     void *argp1 = 0 ;
2024     int res1 = 0 ;
2025     int argvi = 0;
2026     dXSARGS;
2027     
2028     if ((items < 1) || (items > 1)) {
2029       SWIG_croak("Usage: find_result_t_label_get(self);");
2030     }
2031     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_find_result_t, 0 |  0 );
2032     if (!SWIG_IsOK(res1)) {
2033       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "find_result_t_label_get" "', argument " "1"" of type '" "find_result_t *""'"); 
2034     }
2035     arg1 = (find_result_t *)(argp1);
2036     result = (char *) ((arg1)->label);
2037     ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2038     
2039     XSRETURN(argvi);
2040   fail:
2041     
2042     SWIG_croak_null();
2043   }
2044 }
2045
2046
2047 XS(_wrap_find_result_t_filenum_get) {
2048   {
2049     find_result_t *arg1 = (find_result_t *) 0 ;
2050     off_t result;
2051     void *argp1 = 0 ;
2052     int res1 = 0 ;
2053     int argvi = 0;
2054     dXSARGS;
2055     
2056     if ((items < 1) || (items > 1)) {
2057       SWIG_croak("Usage: find_result_t_filenum_get(self);");
2058     }
2059     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_find_result_t, 0 |  0 );
2060     if (!SWIG_IsOK(res1)) {
2061       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "find_result_t_filenum_get" "', argument " "1"" of type '" "find_result_t *""'"); 
2062     }
2063     arg1 = (find_result_t *)(argp1);
2064     result =  ((arg1)->filenum);
2065     {
2066       ST(argvi) = sv_2mortal(amglue_newSVu64(result));
2067       argvi++;
2068     }
2069     
2070     XSRETURN(argvi);
2071   fail:
2072     
2073     SWIG_croak_null();
2074   }
2075 }
2076
2077
2078 XS(_wrap_find_result_t_status_get) {
2079   {
2080     find_result_t *arg1 = (find_result_t *) 0 ;
2081     char *result = 0 ;
2082     void *argp1 = 0 ;
2083     int res1 = 0 ;
2084     int argvi = 0;
2085     dXSARGS;
2086     
2087     if ((items < 1) || (items > 1)) {
2088       SWIG_croak("Usage: find_result_t_status_get(self);");
2089     }
2090     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_find_result_t, 0 |  0 );
2091     if (!SWIG_IsOK(res1)) {
2092       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "find_result_t_status_get" "', argument " "1"" of type '" "find_result_t *""'"); 
2093     }
2094     arg1 = (find_result_t *)(argp1);
2095     result = (char *) ((arg1)->status);
2096     ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2097     
2098     XSRETURN(argvi);
2099   fail:
2100     
2101     SWIG_croak_null();
2102   }
2103 }
2104
2105
2106 XS(_wrap_find_result_t_partnum_get) {
2107   {
2108     find_result_t *arg1 = (find_result_t *) 0 ;
2109     char *result = 0 ;
2110     void *argp1 = 0 ;
2111     int res1 = 0 ;
2112     int argvi = 0;
2113     dXSARGS;
2114     
2115     if ((items < 1) || (items > 1)) {
2116       SWIG_croak("Usage: find_result_t_partnum_get(self);");
2117     }
2118     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_find_result_t, 0 |  0 );
2119     if (!SWIG_IsOK(res1)) {
2120       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "find_result_t_partnum_get" "', argument " "1"" of type '" "find_result_t *""'"); 
2121     }
2122     arg1 = (find_result_t *)(argp1);
2123     result = (char *) ((arg1)->partnum);
2124     ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2125     
2126     XSRETURN(argvi);
2127   fail:
2128     
2129     SWIG_croak_null();
2130   }
2131 }
2132
2133
2134 XS(_wrap_find_result_t_sec_get) {
2135   {
2136     find_result_t *arg1 = (find_result_t *) 0 ;
2137     double result;
2138     void *argp1 = 0 ;
2139     int res1 = 0 ;
2140     int argvi = 0;
2141     dXSARGS;
2142     
2143     if ((items < 1) || (items > 1)) {
2144       SWIG_croak("Usage: find_result_t_sec_get(self);");
2145     }
2146     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_find_result_t, 0 |  0 );
2147     if (!SWIG_IsOK(res1)) {
2148       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "find_result_t_sec_get" "', argument " "1"" of type '" "find_result_t *""'"); 
2149     }
2150     arg1 = (find_result_t *)(argp1);
2151     result = (double) ((arg1)->sec);
2152     ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1((double)(result)); argvi++ ;
2153     
2154     XSRETURN(argvi);
2155   fail:
2156     
2157     SWIG_croak_null();
2158   }
2159 }
2160
2161
2162 XS(_wrap_find_result_t_kb_get) {
2163   {
2164     find_result_t *arg1 = (find_result_t *) 0 ;
2165     size_t result;
2166     void *argp1 = 0 ;
2167     int res1 = 0 ;
2168     int argvi = 0;
2169     dXSARGS;
2170     
2171     if ((items < 1) || (items > 1)) {
2172       SWIG_croak("Usage: find_result_t_kb_get(self);");
2173     }
2174     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_find_result_t, 0 |  0 );
2175     if (!SWIG_IsOK(res1)) {
2176       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "find_result_t_kb_get" "', argument " "1"" of type '" "find_result_t *""'"); 
2177     }
2178     arg1 = (find_result_t *)(argp1);
2179     result =  ((arg1)->kb);
2180     {
2181       ST(argvi) = sv_2mortal(amglue_newSVu64(result));
2182       argvi++;
2183     }
2184     
2185     XSRETURN(argvi);
2186   fail:
2187     
2188     SWIG_croak_null();
2189   }
2190 }
2191
2192
2193 XS(_wrap_new_find_result_t) {
2194   {
2195     find_result_t *result = 0 ;
2196     int argvi = 0;
2197     dXSARGS;
2198     
2199     if ((items < 0) || (items > 0)) {
2200       SWIG_croak("Usage: new_find_result_t();");
2201     }
2202     result = (find_result_t *)calloc(1, sizeof(find_result_t));
2203     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_find_result_t, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
2204     XSRETURN(argvi);
2205   fail:
2206     SWIG_croak_null();
2207   }
2208 }
2209
2210
2211 XS(_wrap_find_log) {
2212   {
2213     char **result = 0 ;
2214     int argvi = 0;
2215     dXSARGS;
2216     
2217     if ((items < 0) || (items > 0)) {
2218       SWIG_croak("Usage: find_log();");
2219     }
2220     result = (char **)find_log();
2221     {
2222       char **iter;
2223       int len, i;
2224       
2225       /* measure the length of the array and make sure perl has enough room */
2226       for (len=0, iter=result; *iter; iter++) len++;
2227       EXTEND(SP, len);
2228       
2229       /* now copy it to the perl stack */
2230       for (i=0, iter=result; *iter; iter++, i++) {
2231         ST(argvi) = sv_2mortal(newSVpv(*iter, 0));
2232         argvi++;
2233       }
2234     }
2235     XSRETURN(argvi);
2236   fail:
2237     SWIG_croak_null();
2238   }
2239 }
2240
2241
2242 XS(_wrap_search_logfile) {
2243   {
2244     char *arg1 = (char *) 0 ;
2245     char *arg2 = (char *) 0 ;
2246     char *arg3 = (char *) 0 ;
2247     int arg4 ;
2248     find_result_t *result = 0 ;
2249     int res1 ;
2250     char *buf1 = 0 ;
2251     int alloc1 = 0 ;
2252     int res2 ;
2253     char *buf2 = 0 ;
2254     int alloc2 = 0 ;
2255     int res3 ;
2256     char *buf3 = 0 ;
2257     int alloc3 = 0 ;
2258     int argvi = 0;
2259     dXSARGS;
2260     
2261     if ((items < 4) || (items > 4)) {
2262       SWIG_croak("Usage: search_logfile(label,datestamp,logfile,add_missing_disks);");
2263     }
2264     res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
2265     if (!SWIG_IsOK(res1)) {
2266       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "search_logfile" "', argument " "1"" of type '" "char *""'");
2267     }
2268     arg1 = (char *)(buf1);
2269     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2270     if (!SWIG_IsOK(res2)) {
2271       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "search_logfile" "', argument " "2"" of type '" "char *""'");
2272     }
2273     arg2 = (char *)(buf2);
2274     res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
2275     if (!SWIG_IsOK(res3)) {
2276       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "search_logfile" "', argument " "3"" of type '" "char *""'");
2277     }
2278     arg3 = (char *)(buf3);
2279     {
2280       if (sizeof(signed int) == 1) {
2281         arg4 = amglue_SvI8(ST(3));
2282       } else if (sizeof(signed int) == 2) {
2283         arg4 = amglue_SvI16(ST(3));
2284       } else if (sizeof(signed int) == 4) {
2285         arg4 = amglue_SvI32(ST(3));
2286       } else if (sizeof(signed int) == 8) {
2287         arg4 = amglue_SvI64(ST(3));
2288       } else {
2289         g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
2290       }
2291     }
2292     result = (find_result_t *)search_logfile_wrap(arg1,arg2,arg3,arg4);
2293     {
2294       find_result_t *iter;
2295       int len;
2296       
2297       /* measure the list and make room on the perl stack */
2298       for (len=0, iter=result; iter; iter=iter->next) len++;
2299       EXTEND(SP, len);
2300       
2301       iter = result;
2302       while (iter) {
2303         find_result_t *next;
2304         /* Let SWIG take ownership of the object */
2305         ST(argvi) = SWIG_NewPointerObj(iter, SWIGTYPE_p_find_result_t, SWIG_OWNER | SWIG_SHADOW);
2306         argvi++;
2307         
2308         /* null out the 'next' field */
2309         next = iter->next;
2310         iter->next = NULL;
2311         iter = next;
2312       }
2313     }
2314     if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2315     if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2316     if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2317     
2318     XSRETURN(argvi);
2319   fail:
2320     if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2321     if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2322     if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2323     
2324     SWIG_croak_null();
2325   }
2326 }
2327
2328
2329 XS(_wrap_dumps_match) {
2330   {
2331     find_result_t *arg1 = (find_result_t *) 0 ;
2332     char *arg2 = (char *) 0 ;
2333     char *arg3 = (char *) 0 ;
2334     char *arg4 = (char *) 0 ;
2335     char *arg5 = (char *) 0 ;
2336     int arg6 ;
2337     find_result_t *result = 0 ;
2338     int res2 ;
2339     char *buf2 = 0 ;
2340     int alloc2 = 0 ;
2341     int res3 ;
2342     char *buf3 = 0 ;
2343     int alloc3 = 0 ;
2344     int res4 ;
2345     char *buf4 = 0 ;
2346     int alloc4 = 0 ;
2347     int res5 ;
2348     char *buf5 = 0 ;
2349     int alloc5 = 0 ;
2350     int argvi = 0;
2351     dXSARGS;
2352     
2353     if ((items < 6) || (items > 6)) {
2354       SWIG_croak("Usage: dumps_match(output_find,hostname,diskname,datestamp,level,ok);");
2355     }
2356     {
2357       AV *av;
2358       I32 len, i;
2359       find_result_t *head = NULL, *tail = NULL;
2360       
2361       if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) {
2362         SWIG_exception(SWIG_TypeError, "expected an arrayref of find_result_t's");
2363       }
2364       
2365       av = (AV *)SvRV(ST(0));
2366       len = av_len(av) + 1;
2367       
2368       for (i = 0; i < len; i++) {
2369         SV **val = av_fetch(av, i, 0);
2370         find_result_t *r;
2371         
2372         if (!val || SWIG_ConvertPtr(*val, (void **)&r, SWIGTYPE_p_find_result_t, 0) == -1) {
2373           SWIG_exception(SWIG_TypeError, "array member is not a find_result_t");
2374         }
2375         
2376         if (!head) {
2377           head = tail = r;
2378         } else {
2379           tail->next = r;
2380           tail = r;
2381         }
2382         
2383         tail->next = NULL;
2384       }
2385       
2386       /* point to the head of that list */
2387       arg1 = head;
2388     }
2389     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2390     if (!SWIG_IsOK(res2)) {
2391       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dumps_match" "', argument " "2"" of type '" "char *""'");
2392     }
2393     arg2 = (char *)(buf2);
2394     res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
2395     if (!SWIG_IsOK(res3)) {
2396       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dumps_match" "', argument " "3"" of type '" "char *""'");
2397     }
2398     arg3 = (char *)(buf3);
2399     res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
2400     if (!SWIG_IsOK(res4)) {
2401       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dumps_match" "', argument " "4"" of type '" "char *""'");
2402     }
2403     arg4 = (char *)(buf4);
2404     res5 = SWIG_AsCharPtrAndSize(ST(4), &buf5, NULL, &alloc5);
2405     if (!SWIG_IsOK(res5)) {
2406       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dumps_match" "', argument " "5"" of type '" "char *""'");
2407     }
2408     arg5 = (char *)(buf5);
2409     {
2410       if (sizeof(signed int) == 1) {
2411         arg6 = amglue_SvI8(ST(5));
2412       } else if (sizeof(signed int) == 2) {
2413         arg6 = amglue_SvI16(ST(5));
2414       } else if (sizeof(signed int) == 4) {
2415         arg6 = amglue_SvI32(ST(5));
2416       } else if (sizeof(signed int) == 8) {
2417         arg6 = amglue_SvI64(ST(5));
2418       } else {
2419         g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
2420       }
2421     }
2422     result = (find_result_t *)dumps_match(arg1,arg2,arg3,arg4,arg5,arg6);
2423     {
2424       find_result_t *iter;
2425       int len;
2426       
2427       /* measure the list and make room on the perl stack */
2428       for (len=0, iter=result; iter; iter=iter->next) len++;
2429       EXTEND(SP, len);
2430       
2431       iter = result;
2432       while (iter) {
2433         find_result_t *next;
2434         /* Let SWIG take ownership of the object */
2435         ST(argvi) = SWIG_NewPointerObj(iter, SWIGTYPE_p_find_result_t, SWIG_OWNER | SWIG_SHADOW);
2436         argvi++;
2437         
2438         /* null out the 'next' field */
2439         next = iter->next;
2440         iter->next = NULL;
2441         iter = next;
2442       }
2443     }
2444     {
2445       find_result_t *iter = arg1, *next;
2446       
2447       /* undo all the links we added earlier */
2448       while (iter) {
2449         next = iter->next;
2450         iter->next = NULL;
2451         iter = next;
2452       }
2453     }
2454     if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2455     if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2456     if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2457     if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
2458     
2459     XSRETURN(argvi);
2460   fail:
2461     {
2462       find_result_t *iter = arg1, *next;
2463       
2464       /* undo all the links we added earlier */
2465       while (iter) {
2466         next = iter->next;
2467         iter->next = NULL;
2468         iter = next;
2469       }
2470     }
2471     if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2472     if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2473     if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2474     if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
2475     
2476     SWIG_croak_null();
2477   }
2478 }
2479
2480
2481 XS(_wrap_dumps_match_dumpspecs) {
2482   {
2483     find_result_t *arg1 = (find_result_t *) 0 ;
2484     amglue_dumpspec_list *arg2 = (amglue_dumpspec_list *) 0 ;
2485     gboolean arg3 ;
2486     find_result_t *result = 0 ;
2487     int argvi = 0;
2488     dXSARGS;
2489     
2490     if ((items < 3) || (items > 3)) {
2491       SWIG_croak("Usage: dumps_match_dumpspecs(output_find,dumpspecs,ok);");
2492     }
2493     {
2494       AV *av;
2495       I32 len, i;
2496       find_result_t *head = NULL, *tail = NULL;
2497       
2498       if (!SvROK(ST(0)) || SvTYPE(SvRV(ST(0))) != SVt_PVAV) {
2499         SWIG_exception(SWIG_TypeError, "expected an arrayref of find_result_t's");
2500       }
2501       
2502       av = (AV *)SvRV(ST(0));
2503       len = av_len(av) + 1;
2504       
2505       for (i = 0; i < len; i++) {
2506         SV **val = av_fetch(av, i, 0);
2507         find_result_t *r;
2508         
2509         if (!val || SWIG_ConvertPtr(*val, (void **)&r, SWIGTYPE_p_find_result_t, 0) == -1) {
2510           SWIG_exception(SWIG_TypeError, "array member is not a find_result_t");
2511         }
2512         
2513         if (!head) {
2514           head = tail = r;
2515         } else {
2516           tail->next = r;
2517           tail = r;
2518         }
2519         
2520         tail->next = NULL;
2521       }
2522       
2523       /* point to the head of that list */
2524       arg1 = head;
2525     }
2526     {
2527       AV *av;
2528       int len;
2529       int i;
2530       
2531       if (!SvROK(ST(1)) || SvTYPE(SvRV(ST(1))) != SVt_PVAV) {
2532         SWIG_exception_fail(SWIG_TypeError, "Expected an arrayref of dumpspecs");
2533       }
2534       av = (AV *)SvRV(ST(1));
2535       
2536       len = av_len(av)+1;
2537       arg2 = NULL;
2538       for (i = 0; i < len; i++) {
2539         dumpspec_t *ds = NULL;
2540         SV **elt = av_fetch(av, i, 0);
2541         if (elt)
2542         SWIG_ConvertPtr(*elt, (void **)&ds, SWIGTYPE_p_dumpspec_t, 0);
2543         if (!ds)
2544         SWIG_exception_fail(SWIG_TypeError, "Expected an arrayref of dumpspecs");
2545         arg2 = g_slist_append(arg2, ds);
2546       }
2547     }
2548     {
2549       if (sizeof(signed int) == 1) {
2550         arg3 = amglue_SvI8(ST(2));
2551       } else if (sizeof(signed int) == 2) {
2552         arg3 = amglue_SvI16(ST(2));
2553       } else if (sizeof(signed int) == 4) {
2554         arg3 = amglue_SvI32(ST(2));
2555       } else if (sizeof(signed int) == 8) {
2556         arg3 = amglue_SvI64(ST(2));
2557       } else {
2558         g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
2559       }
2560     }
2561     result = (find_result_t *)dumps_match_dumpspecs(arg1,arg2,arg3);
2562     {
2563       find_result_t *iter;
2564       int len;
2565       
2566       /* measure the list and make room on the perl stack */
2567       for (len=0, iter=result; iter; iter=iter->next) len++;
2568       EXTEND(SP, len);
2569       
2570       iter = result;
2571       while (iter) {
2572         find_result_t *next;
2573         /* Let SWIG take ownership of the object */
2574         ST(argvi) = SWIG_NewPointerObj(iter, SWIGTYPE_p_find_result_t, SWIG_OWNER | SWIG_SHADOW);
2575         argvi++;
2576         
2577         /* null out the 'next' field */
2578         next = iter->next;
2579         iter->next = NULL;
2580         iter = next;
2581       }
2582     }
2583     {
2584       find_result_t *iter = arg1, *next;
2585       
2586       /* undo all the links we added earlier */
2587       while (iter) {
2588         next = iter->next;
2589         iter->next = NULL;
2590         iter = next;
2591       }
2592     }
2593     {
2594       /* Free the GSList, but not its contents (which are still owned by SWIG) */
2595       g_slist_free(arg2);
2596     }
2597     
2598     XSRETURN(argvi);
2599   fail:
2600     {
2601       find_result_t *iter = arg1, *next;
2602       
2603       /* undo all the links we added earlier */
2604       while (iter) {
2605         next = iter->next;
2606         iter->next = NULL;
2607         iter = next;
2608       }
2609     }
2610     {
2611       /* Free the GSList, but not its contents (which are still owned by SWIG) */
2612       g_slist_free(arg2);
2613     }
2614     
2615     SWIG_croak_null();
2616   }
2617 }
2618
2619
2620
2621 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
2622
2623 static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *|loghandle *", 0, 0, (void*)0, 0};
2624 static swig_type_info _swigt__p_GSList = {"_p_GSList", "amglue_dumpspec_list *|GSList *", 0, 0, (void*)0, 0};
2625 static swig_type_info _swigt__p_char = {"_p_char", "gchar *|char *", 0, 0, (void*)0, 0};
2626 static swig_type_info _swigt__p_double = {"_p_double", "double *|gdouble *", 0, 0, (void*)0, 0};
2627 static swig_type_info _swigt__p_dumpspec_t = {"_p_dumpspec_t", "struct dumpspec_t *|dumpspec_t *", 0, 0, (void*)"Amanda::Cmdline::dumpspec_t", 0};
2628 static swig_type_info _swigt__p_find_result_t = {"_p_find_result_t", "find_result_t *", 0, 0, (void*)"Amanda::Logfile::find_result_t", 0};
2629 static swig_type_info _swigt__p_float = {"_p_float", "float *|gfloat *", 0, 0, (void*)0, 0};
2630 static swig_type_info _swigt__p_int = {"_p_int", "int *|logtype_t *|program_t *|gboolean *|cmdline_parse_dumpspecs_flags *", 0, 0, (void*)0, 0};
2631 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "guchar *|unsigned char *", 0, 0, (void*)0, 0};
2632
2633 static swig_type_info *swig_type_initial[] = {
2634   &_swigt__p_FILE,
2635   &_swigt__p_GSList,
2636   &_swigt__p_char,
2637   &_swigt__p_double,
2638   &_swigt__p_dumpspec_t,
2639   &_swigt__p_find_result_t,
2640   &_swigt__p_float,
2641   &_swigt__p_int,
2642   &_swigt__p_unsigned_char,
2643 };
2644
2645 static swig_cast_info _swigc__p_FILE[] = {  {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}};
2646 static swig_cast_info _swigc__p_GSList[] = {  {&_swigt__p_GSList, 0, 0, 0},{0, 0, 0, 0}};
2647 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
2648 static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
2649 static swig_cast_info _swigc__p_dumpspec_t[] = {  {&_swigt__p_dumpspec_t, 0, 0, 0},{0, 0, 0, 0}};
2650 static swig_cast_info _swigc__p_find_result_t[] = {  {&_swigt__p_find_result_t, 0, 0, 0},{0, 0, 0, 0}};
2651 static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
2652 static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
2653 static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
2654
2655 static swig_cast_info *swig_cast_initial[] = {
2656   _swigc__p_FILE,
2657   _swigc__p_GSList,
2658   _swigc__p_char,
2659   _swigc__p_double,
2660   _swigc__p_dumpspec_t,
2661   _swigc__p_find_result_t,
2662   _swigc__p_float,
2663   _swigc__p_int,
2664   _swigc__p_unsigned_char,
2665 };
2666
2667
2668 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
2669
2670 static swig_constant_info swig_constants[] = {
2671 {0,0,0,0,0,0}
2672 };
2673 #ifdef __cplusplus
2674 }
2675 #endif
2676 static swig_variable_info swig_variables[] = {
2677 {0,0,0,0}
2678 };
2679 static swig_command_info swig_commands[] = {
2680 {"Amanda::Logfilec::open_logfile", _wrap_open_logfile},
2681 {"Amanda::Logfilec::close_logfile", _wrap_close_logfile},
2682 {"Amanda::Logfilec::get_logline", _wrap_get_logline},
2683 {"Amanda::Logfilec::delete_find_result_t", _wrap_delete_find_result_t},
2684 {"Amanda::Logfilec::find_result_t_timestamp_get", _wrap_find_result_t_timestamp_get},
2685 {"Amanda::Logfilec::find_result_t_hostname_get", _wrap_find_result_t_hostname_get},
2686 {"Amanda::Logfilec::find_result_t_diskname_get", _wrap_find_result_t_diskname_get},
2687 {"Amanda::Logfilec::find_result_t_level_get", _wrap_find_result_t_level_get},
2688 {"Amanda::Logfilec::find_result_t_label_get", _wrap_find_result_t_label_get},
2689 {"Amanda::Logfilec::find_result_t_filenum_get", _wrap_find_result_t_filenum_get},
2690 {"Amanda::Logfilec::find_result_t_status_get", _wrap_find_result_t_status_get},
2691 {"Amanda::Logfilec::find_result_t_partnum_get", _wrap_find_result_t_partnum_get},
2692 {"Amanda::Logfilec::find_result_t_sec_get", _wrap_find_result_t_sec_get},
2693 {"Amanda::Logfilec::find_result_t_kb_get", _wrap_find_result_t_kb_get},
2694 {"Amanda::Logfilec::new_find_result_t", _wrap_new_find_result_t},
2695 {"Amanda::Logfilec::find_log", _wrap_find_log},
2696 {"Amanda::Logfilec::search_logfile", _wrap_search_logfile},
2697 {"Amanda::Logfilec::dumps_match", _wrap_dumps_match},
2698 {"Amanda::Logfilec::dumps_match_dumpspecs", _wrap_dumps_match_dumpspecs},
2699 {0,0}
2700 };
2701 /* -----------------------------------------------------------------------------
2702  * Type initialization:
2703  * This problem is tough by the requirement that no dynamic 
2704  * memory is used. Also, since swig_type_info structures store pointers to 
2705  * swig_cast_info structures and swig_cast_info structures store pointers back
2706  * to swig_type_info structures, we need some lookup code at initialization. 
2707  * The idea is that swig generates all the structures that are needed. 
2708  * The runtime then collects these partially filled structures. 
2709  * The SWIG_InitializeModule function takes these initial arrays out of 
2710  * swig_module, and does all the lookup, filling in the swig_module.types
2711  * array with the correct data and linking the correct swig_cast_info
2712  * structures together.
2713  *
2714  * The generated swig_type_info structures are assigned staticly to an initial 
2715  * array. We just loop through that array, and handle each type individually.
2716  * First we lookup if this type has been already loaded, and if so, use the
2717  * loaded structure instead of the generated one. Then we have to fill in the
2718  * cast linked list. The cast data is initially stored in something like a
2719  * two-dimensional array. Each row corresponds to a type (there are the same
2720  * number of rows as there are in the swig_type_initial array). Each entry in
2721  * a column is one of the swig_cast_info structures for that type.
2722  * The cast_initial array is actually an array of arrays, because each row has
2723  * a variable number of columns. So to actually build the cast linked list,
2724  * we find the array of casts associated with the type, and loop through it 
2725  * adding the casts to the list. The one last trick we need to do is making
2726  * sure the type pointer in the swig_cast_info struct is correct.
2727  *
2728  * First off, we lookup the cast->type name to see if it is already loaded. 
2729  * There are three cases to handle:
2730  *  1) If the cast->type has already been loaded AND the type we are adding
2731  *     casting info to has not been loaded (it is in this module), THEN we
2732  *     replace the cast->type pointer with the type pointer that has already
2733  *     been loaded.
2734  *  2) If BOTH types (the one we are adding casting info to, and the 
2735  *     cast->type) are loaded, THEN the cast info has already been loaded by
2736  *     the previous module so we just ignore it.
2737  *  3) Finally, if cast->type has not already been loaded, then we add that
2738  *     swig_cast_info to the linked list (because the cast->type) pointer will
2739  *     be correct.
2740  * ----------------------------------------------------------------------------- */
2741
2742 #ifdef __cplusplus
2743 extern "C" {
2744 #if 0
2745 } /* c-mode */
2746 #endif
2747 #endif
2748
2749 #if 0
2750 #define SWIGRUNTIME_DEBUG
2751 #endif
2752
2753
2754 SWIGRUNTIME void
2755 SWIG_InitializeModule(void *clientdata) {
2756   size_t i;
2757   swig_module_info *module_head, *iter;
2758   int found, init;
2759   
2760   clientdata = clientdata;
2761   
2762   /* check to see if the circular list has been setup, if not, set it up */
2763   if (swig_module.next==0) {
2764     /* Initialize the swig_module */
2765     swig_module.type_initial = swig_type_initial;
2766     swig_module.cast_initial = swig_cast_initial;
2767     swig_module.next = &swig_module;
2768     init = 1;
2769   } else {
2770     init = 0;
2771   }
2772   
2773   /* Try and load any already created modules */
2774   module_head = SWIG_GetModule(clientdata);
2775   if (!module_head) {
2776     /* This is the first module loaded for this interpreter */
2777     /* so set the swig module into the interpreter */
2778     SWIG_SetModule(clientdata, &swig_module);
2779     module_head = &swig_module;
2780   } else {
2781     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
2782     found=0;
2783     iter=module_head;
2784     do {
2785       if (iter==&swig_module) {
2786         found=1;
2787         break;
2788       }
2789       iter=iter->next;
2790     } while (iter!= module_head);
2791     
2792     /* if the is found in the list, then all is done and we may leave */
2793     if (found) return;
2794     /* otherwise we must add out module into the list */
2795     swig_module.next = module_head->next;
2796     module_head->next = &swig_module;
2797   }
2798   
2799   /* When multiple interpeters are used, a module could have already been initialized in
2800        a different interpreter, but not yet have a pointer in this interpreter.
2801        In this case, we do not want to continue adding types... everything should be
2802        set up already */
2803   if (init == 0) return;
2804   
2805   /* Now work on filling in swig_module.types */
2806 #ifdef SWIGRUNTIME_DEBUG
2807   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
2808 #endif
2809   for (i = 0; i < swig_module.size; ++i) {
2810     swig_type_info *type = 0;
2811     swig_type_info *ret;
2812     swig_cast_info *cast;
2813     
2814 #ifdef SWIGRUNTIME_DEBUG
2815     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
2816 #endif
2817     
2818     /* if there is another module already loaded */
2819     if (swig_module.next != &swig_module) {
2820       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
2821     }
2822     if (type) {
2823       /* Overwrite clientdata field */
2824 #ifdef SWIGRUNTIME_DEBUG
2825       printf("SWIG_InitializeModule: found type %s\n", type->name);
2826 #endif
2827       if (swig_module.type_initial[i]->clientdata) {
2828         type->clientdata = swig_module.type_initial[i]->clientdata;
2829 #ifdef SWIGRUNTIME_DEBUG
2830         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
2831 #endif
2832       }
2833     } else {
2834       type = swig_module.type_initial[i];
2835     }
2836     
2837     /* Insert casting types */
2838     cast = swig_module.cast_initial[i];
2839     while (cast->type) {
2840       /* Don't need to add information already in the list */
2841       ret = 0;
2842 #ifdef SWIGRUNTIME_DEBUG
2843       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
2844 #endif
2845       if (swig_module.next != &swig_module) {
2846         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
2847 #ifdef SWIGRUNTIME_DEBUG
2848         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
2849 #endif
2850       }
2851       if (ret) {
2852         if (type == swig_module.type_initial[i]) {
2853 #ifdef SWIGRUNTIME_DEBUG
2854           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
2855 #endif
2856           cast->type = ret;
2857           ret = 0;
2858         } else {
2859           /* Check for casting already in the list */
2860           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
2861 #ifdef SWIGRUNTIME_DEBUG
2862           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
2863 #endif
2864           if (!ocast) ret = 0;
2865         }
2866       }
2867       
2868       if (!ret) {
2869 #ifdef SWIGRUNTIME_DEBUG
2870         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
2871 #endif
2872         if (type->cast) {
2873           type->cast->prev = cast;
2874           cast->next = type->cast;
2875         }
2876         type->cast = cast;
2877       }
2878       cast++;
2879     }
2880     /* Set entry in modules->types array equal to the type */
2881     swig_module.types[i] = type;
2882   }
2883   swig_module.types[i] = 0;
2884   
2885 #ifdef SWIGRUNTIME_DEBUG
2886   printf("**** SWIG_InitializeModule: Cast List ******\n");
2887   for (i = 0; i < swig_module.size; ++i) {
2888     int j = 0;
2889     swig_cast_info *cast = swig_module.cast_initial[i];
2890     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
2891     while (cast->type) {
2892       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
2893       cast++;
2894       ++j;
2895     }
2896     printf("---- Total casts: %d\n",j);
2897   }
2898   printf("**** SWIG_InitializeModule: Cast List ******\n");
2899 #endif
2900 }
2901
2902 /* This function will propagate the clientdata field of type to
2903 * any new swig_type_info structures that have been added into the list
2904 * of equivalent types.  It is like calling
2905 * SWIG_TypeClientData(type, clientdata) a second time.
2906 */
2907 SWIGRUNTIME void
2908 SWIG_PropagateClientData(void) {
2909   size_t i;
2910   swig_cast_info *equiv;
2911   static int init_run = 0;
2912   
2913   if (init_run) return;
2914   init_run = 1;
2915   
2916   for (i = 0; i < swig_module.size; i++) {
2917     if (swig_module.types[i]->clientdata) {
2918       equiv = swig_module.types[i]->cast;
2919       while (equiv) {
2920         if (!equiv->converter) {
2921           if (equiv->type && !equiv->type->clientdata)
2922           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
2923         }
2924         equiv = equiv->next;
2925       }
2926     }
2927   }
2928 }
2929
2930 #ifdef __cplusplus
2931 #if 0
2932 {
2933   /* c-mode */
2934 #endif
2935 }
2936 #endif
2937
2938
2939
2940 #ifdef __cplusplus
2941 extern "C"
2942 #endif
2943
2944 XS(SWIG_init) {
2945   dXSARGS;
2946   int i;
2947   
2948   SWIG_InitializeModule(0);
2949   
2950   /* Install commands */
2951   for (i = 0; swig_commands[i].name; i++) {
2952     newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__);
2953   }
2954   
2955   /* Install variables */
2956   for (i = 0; swig_variables[i].name; i++) {
2957     SV *sv;
2958     sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI);
2959     if (swig_variables[i].type) {
2960       SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
2961     } else {
2962       sv_setiv(sv,(IV) 0);
2963     }
2964     swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get); 
2965   }
2966   
2967   /* Install constant */
2968   for (i = 0; swig_constants[i].type; i++) {
2969     SV *sv;
2970     sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI);
2971     switch(swig_constants[i].type) {
2972     case SWIG_INT:
2973       sv_setiv(sv, (IV) swig_constants[i].lvalue);
2974       break;
2975     case SWIG_FLOAT:
2976       sv_setnv(sv, (double) swig_constants[i].dvalue);
2977       break;
2978     case SWIG_STRING:
2979       sv_setpv(sv, (char *) swig_constants[i].pvalue);
2980       break;
2981     case SWIG_POINTER:
2982       SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
2983       break;
2984     case SWIG_BINARY:
2985       SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
2986       break;
2987     default:
2988       break;
2989     }
2990     SvREADONLY_on(sv);
2991   }
2992   
2993   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
2994     SV *sv = get_sv((char*) SWIG_prefix "L_BOGUS", TRUE | 0x2 | GV_ADDMULTI);
2995     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_BOGUS)));
2996     SvREADONLY_on(sv);
2997   } while(0) /*@SWIG@*/;
2998   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
2999     SV *sv = get_sv((char*) SWIG_prefix "L_FATAL", TRUE | 0x2 | GV_ADDMULTI);
3000     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_FATAL)));
3001     SvREADONLY_on(sv);
3002   } while(0) /*@SWIG@*/;
3003   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3004     SV *sv = get_sv((char*) SWIG_prefix "L_ERROR", TRUE | 0x2 | GV_ADDMULTI);
3005     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_ERROR)));
3006     SvREADONLY_on(sv);
3007   } while(0) /*@SWIG@*/;
3008   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3009     SV *sv = get_sv((char*) SWIG_prefix "L_WARNING", TRUE | 0x2 | GV_ADDMULTI);
3010     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_WARNING)));
3011     SvREADONLY_on(sv);
3012   } while(0) /*@SWIG@*/;
3013   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3014     SV *sv = get_sv((char*) SWIG_prefix "L_INFO", TRUE | 0x2 | GV_ADDMULTI);
3015     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_INFO)));
3016     SvREADONLY_on(sv);
3017   } while(0) /*@SWIG@*/;
3018   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3019     SV *sv = get_sv((char*) SWIG_prefix "L_SUMMARY", TRUE | 0x2 | GV_ADDMULTI);
3020     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_SUMMARY)));
3021     SvREADONLY_on(sv);
3022   } while(0) /*@SWIG@*/;
3023   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3024     SV *sv = get_sv((char*) SWIG_prefix "L_START", TRUE | 0x2 | GV_ADDMULTI);
3025     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_START)));
3026     SvREADONLY_on(sv);
3027   } while(0) /*@SWIG@*/;
3028   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3029     SV *sv = get_sv((char*) SWIG_prefix "L_FINISH", TRUE | 0x2 | GV_ADDMULTI);
3030     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_FINISH)));
3031     SvREADONLY_on(sv);
3032   } while(0) /*@SWIG@*/;
3033   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3034     SV *sv = get_sv((char*) SWIG_prefix "L_DISK", TRUE | 0x2 | GV_ADDMULTI);
3035     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_DISK)));
3036     SvREADONLY_on(sv);
3037   } while(0) /*@SWIG@*/;
3038   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3039     SV *sv = get_sv((char*) SWIG_prefix "L_DONE", TRUE | 0x2 | GV_ADDMULTI);
3040     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_DONE)));
3041     SvREADONLY_on(sv);
3042   } while(0) /*@SWIG@*/;
3043   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3044     SV *sv = get_sv((char*) SWIG_prefix "L_PART", TRUE | 0x2 | GV_ADDMULTI);
3045     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_PART)));
3046     SvREADONLY_on(sv);
3047   } while(0) /*@SWIG@*/;
3048   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3049     SV *sv = get_sv((char*) SWIG_prefix "L_PARTPARTIAL", TRUE | 0x2 | GV_ADDMULTI);
3050     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_PARTPARTIAL)));
3051     SvREADONLY_on(sv);
3052   } while(0) /*@SWIG@*/;
3053   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3054     SV *sv = get_sv((char*) SWIG_prefix "L_SUCCESS", TRUE | 0x2 | GV_ADDMULTI);
3055     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_SUCCESS)));
3056     SvREADONLY_on(sv);
3057   } while(0) /*@SWIG@*/;
3058   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3059     SV *sv = get_sv((char*) SWIG_prefix "L_PARTIAL", TRUE | 0x2 | GV_ADDMULTI);
3060     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_PARTIAL)));
3061     SvREADONLY_on(sv);
3062   } while(0) /*@SWIG@*/;
3063   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3064     SV *sv = get_sv((char*) SWIG_prefix "L_FAIL", TRUE | 0x2 | GV_ADDMULTI);
3065     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_FAIL)));
3066     SvREADONLY_on(sv);
3067   } while(0) /*@SWIG@*/;
3068   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3069     SV *sv = get_sv((char*) SWIG_prefix "L_STRANGE", TRUE | 0x2 | GV_ADDMULTI);
3070     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_STRANGE)));
3071     SvREADONLY_on(sv);
3072   } while(0) /*@SWIG@*/;
3073   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3074     SV *sv = get_sv((char*) SWIG_prefix "L_CHUNK", TRUE | 0x2 | GV_ADDMULTI);
3075     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_CHUNK)));
3076     SvREADONLY_on(sv);
3077   } while(0) /*@SWIG@*/;
3078   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3079     SV *sv = get_sv((char*) SWIG_prefix "L_CHUNKSUCCESS", TRUE | 0x2 | GV_ADDMULTI);
3080     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_CHUNKSUCCESS)));
3081     SvREADONLY_on(sv);
3082   } while(0) /*@SWIG@*/;
3083   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3084     SV *sv = get_sv((char*) SWIG_prefix "L_STATS", TRUE | 0x2 | GV_ADDMULTI);
3085     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_STATS)));
3086     SvREADONLY_on(sv);
3087   } while(0) /*@SWIG@*/;
3088   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3089     SV *sv = get_sv((char*) SWIG_prefix "L_MARKER", TRUE | 0x2 | GV_ADDMULTI);
3090     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_MARKER)));
3091     SvREADONLY_on(sv);
3092   } while(0) /*@SWIG@*/;
3093   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3094     SV *sv = get_sv((char*) SWIG_prefix "L_CONT", TRUE | 0x2 | GV_ADDMULTI);
3095     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(L_CONT)));
3096     SvREADONLY_on(sv);
3097   } while(0) /*@SWIG@*/;
3098   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3099     SV *sv = get_sv((char*) SWIG_prefix "P_UNKNOWN", TRUE | 0x2 | GV_ADDMULTI);
3100     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(P_UNKNOWN)));
3101     SvREADONLY_on(sv);
3102   } while(0) /*@SWIG@*/;
3103   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3104     SV *sv = get_sv((char*) SWIG_prefix "P_PLANNER", TRUE | 0x2 | GV_ADDMULTI);
3105     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(P_PLANNER)));
3106     SvREADONLY_on(sv);
3107   } while(0) /*@SWIG@*/;
3108   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3109     SV *sv = get_sv((char*) SWIG_prefix "P_DRIVER", TRUE | 0x2 | GV_ADDMULTI);
3110     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(P_DRIVER)));
3111     SvREADONLY_on(sv);
3112   } while(0) /*@SWIG@*/;
3113   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3114     SV *sv = get_sv((char*) SWIG_prefix "P_REPORTER", TRUE | 0x2 | GV_ADDMULTI);
3115     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(P_REPORTER)));
3116     SvREADONLY_on(sv);
3117   } while(0) /*@SWIG@*/;
3118   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3119     SV *sv = get_sv((char*) SWIG_prefix "P_DUMPER", TRUE | 0x2 | GV_ADDMULTI);
3120     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(P_DUMPER)));
3121     SvREADONLY_on(sv);
3122   } while(0) /*@SWIG@*/;
3123   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3124     SV *sv = get_sv((char*) SWIG_prefix "P_CHUNKER", TRUE | 0x2 | GV_ADDMULTI);
3125     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(P_CHUNKER)));
3126     SvREADONLY_on(sv);
3127   } while(0) /*@SWIG@*/;
3128   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3129     SV *sv = get_sv((char*) SWIG_prefix "P_TAPER", TRUE | 0x2 | GV_ADDMULTI);
3130     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(P_TAPER)));
3131     SvREADONLY_on(sv);
3132   } while(0) /*@SWIG@*/;
3133   /*@SWIG:/usr/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3134     SV *sv = get_sv((char*) SWIG_prefix "P_AMFLUSH", TRUE | 0x2 | GV_ADDMULTI);
3135     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(P_AMFLUSH)));
3136     SvREADONLY_on(sv);
3137   } while(0) /*@SWIG@*/;
3138   SWIG_TypeClientData(SWIGTYPE_p_find_result_t, (void*) "Amanda::Logfile::find_result_t");
3139   ST(0) = &PL_sv_yes;
3140   XSRETURN(1);
3141 }
3142