xref: /netbsd-src/crypto/external/bsd/netpgp/dist/bindings/tcl/netpgptcl_wrap.c (revision e5e6e15318df2f9b7d4b0818cbcf07909e9fb6cf)
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 1.3.31
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 /* -----------------------------------------------------------------------------
12  *  This section contains generic SWIG labels for method/variable
13  *  declarations/attributes, and other compiler dependent labels.
14  * ----------------------------------------------------------------------------- */
15 
16 /* template workaround for compilers that cannot correctly implement the C++ standard */
17 #ifndef SWIGTEMPLATEDISAMBIGUATOR
18 # if defined(__SUNPRO_CC)
19 #   if (__SUNPRO_CC <= 0x560)
20 #     define SWIGTEMPLATEDISAMBIGUATOR template
21 #   else
22 #     define SWIGTEMPLATEDISAMBIGUATOR
23 #   endif
24 # else
25 #   define SWIGTEMPLATEDISAMBIGUATOR
26 # endif
27 #endif
28 
29 /* inline attribute */
30 #ifndef SWIGINLINE
31 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
32 #   define SWIGINLINE inline
33 # else
34 #   define SWIGINLINE
35 # endif
36 #endif
37 
38 /* attribute recognised by some compilers to avoid 'unused' warnings */
39 #ifndef SWIGUNUSED
40 # if defined(__GNUC__)
41 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
42 #     define SWIGUNUSED __attribute__ ((__unused__))
43 #   else
44 #     define SWIGUNUSED
45 #   endif
46 # elif defined(__ICC)
47 #   define SWIGUNUSED __attribute__ ((__unused__))
48 # else
49 #   define SWIGUNUSED
50 # endif
51 #endif
52 
53 #ifndef SWIGUNUSEDPARM
54 # ifdef __cplusplus
55 #   define SWIGUNUSEDPARM(p)
56 # else
57 #   define SWIGUNUSEDPARM(p) p SWIGUNUSED
58 # endif
59 #endif
60 
61 /* internal SWIG method */
62 #ifndef SWIGINTERN
63 # define SWIGINTERN static SWIGUNUSED
64 #endif
65 
66 /* internal inline SWIG method */
67 #ifndef SWIGINTERNINLINE
68 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
69 #endif
70 
71 /* exporting methods */
72 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
73 #  ifndef GCC_HASCLASSVISIBILITY
74 #    define GCC_HASCLASSVISIBILITY
75 #  endif
76 #endif
77 
78 #ifndef SWIGEXPORT
79 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
80 #   if defined(STATIC_LINKED)
81 #     define SWIGEXPORT
82 #   else
83 #     define SWIGEXPORT __declspec(dllexport)
84 #   endif
85 # else
86 #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
87 #     define SWIGEXPORT __attribute__ ((visibility("default")))
88 #   else
89 #     define SWIGEXPORT
90 #   endif
91 # endif
92 #endif
93 
94 /* calling conventions for Windows */
95 #ifndef SWIGSTDCALL
96 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
97 #   define SWIGSTDCALL __stdcall
98 # else
99 #   define SWIGSTDCALL
100 # endif
101 #endif
102 
103 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
104 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
105 # define _CRT_SECURE_NO_DEPRECATE
106 #endif
107 
108 
109 #include <stdio.h>
110 #include <tcl.h>
111 #include <errno.h>
112 #include <stdlib.h>
113 #include <stdarg.h>
114 #include <ctype.h>
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 "3"
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 
161 /* Flags for new pointer objects */
162 #define SWIG_POINTER_OWN           0x1
163 
164 
165 /*
166    Flags/methods for returning states.
167 
168    The swig conversion methods, as ConvertPtr, return and integer
169    that tells if the conversion was successful or not. And if not,
170    an error code can be returned (see swigerrors.swg for the codes).
171 
172    Use the following macros/flags to set or process the returning
173    states.
174 
175    In old swig versions, you usually write code as:
176 
177      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
178        // success code
179      } else {
180        //fail code
181      }
182 
183    Now you can be more explicit as:
184 
185     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
186     if (SWIG_IsOK(res)) {
187       // success code
188     } else {
189       // fail code
190     }
191 
192    that seems to be the same, but now you can also do
193 
194     Type *ptr;
195     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
196     if (SWIG_IsOK(res)) {
197       // success code
198       if (SWIG_IsNewObj(res) {
199         ...
200 	delete *ptr;
201       } else {
202         ...
203       }
204     } else {
205       // fail code
206     }
207 
208    I.e., now SWIG_ConvertPtr can return new objects and you can
209    identify the case and take care of the deallocation. Of course that
210    requires also to SWIG_ConvertPtr to return new result values, as
211 
212       int SWIG_ConvertPtr(obj, ptr,...) {
213         if (<obj is ok>) {
214           if (<need new object>) {
215             *ptr = <ptr to new allocated object>;
216             return SWIG_NEWOBJ;
217           } else {
218             *ptr = <ptr to old object>;
219             return SWIG_OLDOBJ;
220           }
221         } else {
222           return SWIG_BADOBJ;
223         }
224       }
225 
226    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
227    more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
228    swig errors code.
229 
230    Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
231    allows to return the 'cast rank', for example, if you have this
232 
233        int food(double)
234        int fooi(int);
235 
236    and you call
237 
238       food(1)   // cast rank '1'  (1 -> 1.0)
239       fooi(1)   // cast rank '0'
240 
241    just use the SWIG_AddCast()/SWIG_CheckState()
242 
243 
244  */
245 #define SWIG_OK                    (0)
246 #define SWIG_ERROR                 (-1)
247 #define SWIG_IsOK(r)               (r >= 0)
248 #define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)
249 
250 /* The CastRankLimit says how many bits are used for the cast rank */
251 #define SWIG_CASTRANKLIMIT         (1 << 8)
252 /* The NewMask denotes the object was created (using new/malloc) */
253 #define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
254 /* The TmpMask is for in/out typemaps that use temporal objects */
255 #define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
256 /* Simple returning values */
257 #define SWIG_BADOBJ                (SWIG_ERROR)
258 #define SWIG_OLDOBJ                (SWIG_OK)
259 #define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
260 #define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
261 /* Check, add and del mask methods */
262 #define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
263 #define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
264 #define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
265 #define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
266 #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
267 #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
268 
269 
270 /* Cast-Rank Mode */
271 #if defined(SWIG_CASTRANK_MODE)
272 #  ifndef SWIG_TypeRank
273 #    define SWIG_TypeRank             unsigned long
274 #  endif
275 #  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
276 #    define SWIG_MAXCASTRANK          (2)
277 #  endif
278 #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
279 #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIG_AddCast(int r)280 SWIGINTERNINLINE int SWIG_AddCast(int r) {
281   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
282 }
SWIG_CheckState(int r)283 SWIGINTERNINLINE int SWIG_CheckState(int r) {
284   return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
285 }
286 #else /* no cast-rank mode */
287 #  define SWIG_AddCast
288 #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
289 #endif
290 
291 
292 
293 
294 #include <string.h>
295 
296 #ifdef __cplusplus
297 extern "C" {
298 #endif
299 
300 typedef void *(*swig_converter_func)(void *);
301 typedef struct swig_type_info *(*swig_dycast_func)(void **);
302 
303 /* Structure to store inforomation on one type */
304 typedef struct swig_type_info {
305   const char             *name;			/* mangled name of this type */
306   const char             *str;			/* human readable name of this type */
307   swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
308   struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
309   void                   *clientdata;		/* language specific type data */
310   int                    owndata;		/* flag if the structure owns the clientdata */
311 } swig_type_info;
312 
313 /* Structure to store a type and conversion function used for casting */
314 typedef struct swig_cast_info {
315   swig_type_info         *type;			/* pointer to type that is equivalent to this type */
316   swig_converter_func     converter;		/* function to cast the void pointers */
317   struct swig_cast_info  *next;			/* pointer to next cast in linked list */
318   struct swig_cast_info  *prev;			/* pointer to the previous cast */
319 } swig_cast_info;
320 
321 /* Structure used to store module information
322  * Each module generates one structure like this, and the runtime collects
323  * all of these structures and stores them in a circularly linked list.*/
324 typedef struct swig_module_info {
325   swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
326   size_t                 size;		        /* Number of types in this module */
327   struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
328   swig_type_info         **type_initial;	/* Array of initially generated type structures */
329   swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
330   void                    *clientdata;		/* Language specific module data */
331 } swig_module_info;
332 
333 /*
334   Compare two type names skipping the space characters, therefore
335   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
336 
337   Return 0 when the two name types are equivalent, as in
338   strncmp, but skipping ' '.
339 */
340 SWIGRUNTIME int
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)341 SWIG_TypeNameComp(const char *f1, const char *l1,
342 		  const char *f2, const char *l2) {
343   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
344     while ((*f1 == ' ') && (f1 != l1)) ++f1;
345     while ((*f2 == ' ') && (f2 != l2)) ++f2;
346     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
347   }
348   return (l1 - f1) - (l2 - f2);
349 }
350 
351 /*
352   Check type equivalence in a name list like <name1>|<name2>|...
353   Return 0 if not equal, 1 if equal
354 */
355 SWIGRUNTIME int
SWIG_TypeEquiv(const char * nb,const char * tb)356 SWIG_TypeEquiv(const char *nb, const char *tb) {
357   int equiv = 0;
358   const char* te = tb + strlen(tb);
359   const char* ne = nb;
360   while (!equiv && *ne) {
361     for (nb = ne; *ne; ++ne) {
362       if (*ne == '|') break;
363     }
364     equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
365     if (*ne) ++ne;
366   }
367   return equiv;
368 }
369 
370 /*
371   Check type equivalence in a name list like <name1>|<name2>|...
372   Return 0 if equal, -1 if nb < tb, 1 if nb > tb
373 */
374 SWIGRUNTIME int
SWIG_TypeCompare(const char * nb,const char * tb)375 SWIG_TypeCompare(const char *nb, const char *tb) {
376   int equiv = 0;
377   const char* te = tb + strlen(tb);
378   const char* ne = nb;
379   while (!equiv && *ne) {
380     for (nb = ne; *ne; ++ne) {
381       if (*ne == '|') break;
382     }
383     equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
384     if (*ne) ++ne;
385   }
386   return equiv;
387 }
388 
389 
390 /* think of this as a c++ template<> or a scheme macro */
391 #define SWIG_TypeCheck_Template(comparison, ty)         \
392   if (ty) {                                             \
393     swig_cast_info *iter = ty->cast;                    \
394     while (iter) {                                      \
395       if (comparison) {                                 \
396         if (iter == ty->cast) return iter;              \
397         /* Move iter to the top of the linked list */   \
398         iter->prev->next = iter->next;                  \
399         if (iter->next)                                 \
400           iter->next->prev = iter->prev;                \
401         iter->next = ty->cast;                          \
402         iter->prev = 0;                                 \
403         if (ty->cast) ty->cast->prev = iter;            \
404         ty->cast = iter;                                \
405         return iter;                                    \
406       }                                                 \
407       iter = iter->next;                                \
408     }                                                   \
409   }                                                     \
410   return 0
411 
412 /*
413   Check the typename
414 */
415 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char * c,swig_type_info * ty)416 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
417   SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
418 }
419 
420 /* Same as previous function, except strcmp is replaced with a pointer comparison */
421 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * into)422 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
423   SWIG_TypeCheck_Template(iter->type == from, into);
424 }
425 
426 /*
427   Cast a pointer up an inheritance hierarchy
428 */
429 SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info * ty,void * ptr)430 SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
431   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
432 }
433 
434 /*
435    Dynamic pointer casting. Down an inheritance hierarchy
436 */
437 SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)438 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
439   swig_type_info *lastty = ty;
440   if (!ty || !ty->dcast) return ty;
441   while (ty && (ty->dcast)) {
442     ty = (*ty->dcast)(ptr);
443     if (ty) lastty = ty;
444   }
445   return lastty;
446 }
447 
448 /*
449   Return the name associated with this type
450 */
451 SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info * ty)452 SWIG_TypeName(const swig_type_info *ty) {
453   return ty->name;
454 }
455 
456 /*
457   Return the pretty name associated with this type,
458   that is an unmangled type name in a form presentable to the user.
459 */
460 SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info * type)461 SWIG_TypePrettyName(const swig_type_info *type) {
462   /* The "str" field contains the equivalent pretty names of the
463      type, separated by vertical-bar characters.  We choose
464      to print the last name, as it is often (?) the most
465      specific. */
466   if (!type) return NULL;
467   if (type->str != NULL) {
468     const char *last_name = type->str;
469     const char *s;
470     for (s = type->str; *s; s++)
471       if (*s == '|') last_name = s+1;
472     return last_name;
473   }
474   else
475     return type->name;
476 }
477 
478 /*
479    Set the clientdata field for a type
480 */
481 SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)482 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
483   swig_cast_info *cast = ti->cast;
484   /* if (ti->clientdata == clientdata) return; */
485   ti->clientdata = clientdata;
486 
487   while (cast) {
488     if (!cast->converter) {
489       swig_type_info *tc = cast->type;
490       if (!tc->clientdata) {
491 	SWIG_TypeClientData(tc, clientdata);
492       }
493     }
494     cast = cast->next;
495   }
496 }
497 SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)498 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
499   SWIG_TypeClientData(ti, clientdata);
500   ti->owndata = 1;
501 }
502 
503 /*
504   Search for a swig_type_info structure only by mangled name
505   Search is a O(log #types)
506 
507   We start searching at module start, and finish searching when start == end.
508   Note: if start == end at the beginning of the function, we go all the way around
509   the circular list.
510 */
511 SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)512 SWIG_MangledTypeQueryModule(swig_module_info *start,
513                             swig_module_info *end,
514 		            const char *name) {
515   swig_module_info *iter = start;
516   do {
517     if (iter->size) {
518       register size_t l = 0;
519       register size_t r = iter->size - 1;
520       do {
521 	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
522 	register size_t i = (l + r) >> 1;
523 	const char *iname = iter->types[i]->name;
524 	if (iname) {
525 	  register int compare = strcmp(name, iname);
526 	  if (compare == 0) {
527 	    return iter->types[i];
528 	  } else if (compare < 0) {
529 	    if (i) {
530 	      r = i - 1;
531 	    } else {
532 	      break;
533 	    }
534 	  } else if (compare > 0) {
535 	    l = i + 1;
536 	  }
537 	} else {
538 	  break; /* should never happen */
539 	}
540       } while (l <= r);
541     }
542     iter = iter->next;
543   } while (iter != end);
544   return 0;
545 }
546 
547 /*
548   Search for a swig_type_info structure for either a mangled name or a human readable name.
549   It first searches the mangled names of the types, which is a O(log #types)
550   If a type is not found it then searches the human readable names, which is O(#types).
551 
552   We start searching at module start, and finish searching when start == end.
553   Note: if start == end at the beginning of the function, we go all the way around
554   the circular list.
555 */
556 SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)557 SWIG_TypeQueryModule(swig_module_info *start,
558                      swig_module_info *end,
559 		     const char *name) {
560   /* STEP 1: Search the name field using binary search */
561   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
562   if (ret) {
563     return ret;
564   } else {
565     /* STEP 2: If the type hasn't been found, do a complete search
566        of the str field (the human readable name) */
567     swig_module_info *iter = start;
568     do {
569       register size_t i = 0;
570       for (; i < iter->size; ++i) {
571 	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
572 	  return iter->types[i];
573       }
574       iter = iter->next;
575     } while (iter != end);
576   }
577 
578   /* neither found a match */
579   return 0;
580 }
581 
582 /*
583    Pack binary data into a string
584 */
585 SWIGRUNTIME char *
SWIG_PackData(char * c,void * ptr,size_t sz)586 SWIG_PackData(char *c, void *ptr, size_t sz) {
587   static const char hex[17] = "0123456789abcdef";
588   register const unsigned char *u = (unsigned char *) ptr;
589   register const unsigned char *eu =  u + sz;
590   for (; u != eu; ++u) {
591     register unsigned char uu = *u;
592     *(c++) = hex[(uu & 0xf0) >> 4];
593     *(c++) = hex[uu & 0xf];
594   }
595   return c;
596 }
597 
598 /*
599    Unpack binary data from a string
600 */
601 SWIGRUNTIME const char *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)602 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
603   register unsigned char *u = (unsigned char *) ptr;
604   register const unsigned char *eu = u + sz;
605   for (; u != eu; ++u) {
606     register char d = *(c++);
607     register unsigned char uu;
608     if ((d >= '0') && (d <= '9'))
609       uu = ((d - '0') << 4);
610     else if ((d >= 'a') && (d <= 'f'))
611       uu = ((d - ('a'-10)) << 4);
612     else
613       return (char *) 0;
614     d = *(c++);
615     if ((d >= '0') && (d <= '9'))
616       uu |= (d - '0');
617     else if ((d >= 'a') && (d <= 'f'))
618       uu |= (d - ('a'-10));
619     else
620       return (char *) 0;
621     *u = uu;
622   }
623   return c;
624 }
625 
626 /*
627    Pack 'void *' into a string buffer.
628 */
629 SWIGRUNTIME char *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)630 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
631   char *r = buff;
632   if ((2*sizeof(void *) + 2) > bsz) return 0;
633   *(r++) = '_';
634   r = SWIG_PackData(r,&ptr,sizeof(void *));
635   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
636   strcpy(r,name);
637   return buff;
638 }
639 
640 SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)641 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
642   if (*c != '_') {
643     if (strcmp(c,"NULL") == 0) {
644       *ptr = (void *) 0;
645       return name;
646     } else {
647       return 0;
648     }
649   }
650   return SWIG_UnpackData(++c,ptr,sizeof(void *));
651 }
652 
653 SWIGRUNTIME char *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)654 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
655   char *r = buff;
656   size_t lname = (name ? strlen(name) : 0);
657   if ((2*sz + 2 + lname) > bsz) return 0;
658   *(r++) = '_';
659   r = SWIG_PackData(r,ptr,sz);
660   if (lname) {
661     strncpy(r,name,lname+1);
662   } else {
663     *r = 0;
664   }
665   return buff;
666 }
667 
668 SWIGRUNTIME const char *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)669 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
670   if (*c != '_') {
671     if (strcmp(c,"NULL") == 0) {
672       memset(ptr,0,sz);
673       return name;
674     } else {
675       return 0;
676     }
677   }
678   return SWIG_UnpackData(++c,ptr,sz);
679 }
680 
681 #ifdef __cplusplus
682 }
683 #endif
684 
685 /*  Errors in SWIG */
686 #define  SWIG_UnknownError    	   -1
687 #define  SWIG_IOError        	   -2
688 #define  SWIG_RuntimeError   	   -3
689 #define  SWIG_IndexError     	   -4
690 #define  SWIG_TypeError      	   -5
691 #define  SWIG_DivisionByZero 	   -6
692 #define  SWIG_OverflowError  	   -7
693 #define  SWIG_SyntaxError    	   -8
694 #define  SWIG_ValueError     	   -9
695 #define  SWIG_SystemError    	   -10
696 #define  SWIG_AttributeError 	   -11
697 #define  SWIG_MemoryError    	   -12
698 #define  SWIG_NullReferenceError   -13
699 
700 
701 
702 /* -----------------------------------------------------------------------------
703  * error manipulation
704  * ----------------------------------------------------------------------------- */
705 
706 SWIGINTERN const char*
SWIG_Tcl_ErrorType(int code)707 SWIG_Tcl_ErrorType(int code) {
708   const char* type = 0;
709   switch(code) {
710   case SWIG_MemoryError:
711     type = "MemoryError";
712     break;
713   case SWIG_IOError:
714     type = "IOError";
715     break;
716   case SWIG_RuntimeError:
717     type = "RuntimeError";
718     break;
719   case SWIG_IndexError:
720     type = "IndexError";
721     break;
722   case SWIG_TypeError:
723     type = "TypeError";
724     break;
725   case SWIG_DivisionByZero:
726     type = "ZeroDivisionError";
727     break;
728   case SWIG_OverflowError:
729     type = "OverflowError";
730     break;
731   case SWIG_SyntaxError:
732     type = "SyntaxError";
733     break;
734   case SWIG_ValueError:
735     type = "ValueError";
736     break;
737   case SWIG_SystemError:
738     type = "SystemError";
739     break;
740   case SWIG_AttributeError:
741     type = "AttributeError";
742     break;
743   default:
744     type = "RuntimeError";
745   }
746   return type;
747 }
748 
749 
750 SWIGINTERN void
SWIG_Tcl_SetErrorObj(Tcl_Interp * interp,const char * ctype,Tcl_Obj * obj)751 SWIG_Tcl_SetErrorObj(Tcl_Interp *interp, const char *ctype, Tcl_Obj *obj)
752 {
753   Tcl_ResetResult(interp);
754   Tcl_SetObjResult(interp, obj);
755   Tcl_SetErrorCode(interp, "SWIG", ctype, NULL);
756 }
757 
758 SWIGINTERN void
SWIG_Tcl_SetErrorMsg(Tcl_Interp * interp,const char * ctype,const char * mesg)759 SWIG_Tcl_SetErrorMsg(Tcl_Interp *interp, const char *ctype, const char *mesg)
760 {
761   Tcl_ResetResult(interp);
762   Tcl_SetErrorCode(interp, "SWIG", ctype, NULL);
763   Tcl_AppendResult(interp, ctype, " ", mesg, NULL);
764   /*
765   Tcl_AddErrorInfo(interp, ctype);
766   Tcl_AddErrorInfo(interp, " ");
767   Tcl_AddErrorInfo(interp, mesg);
768   */
769 }
770 
771 SWIGINTERNINLINE void
SWIG_Tcl_AddErrorMsg(Tcl_Interp * interp,const char * mesg)772 SWIG_Tcl_AddErrorMsg(Tcl_Interp *interp, const char* mesg)
773 {
774   Tcl_AddErrorInfo(interp, mesg);
775 }
776 
777 
778 
779 /* -----------------------------------------------------------------------------
780  * SWIG API. Portion that goes into the runtime
781  * ----------------------------------------------------------------------------- */
782 #ifdef __cplusplus
783 extern "C" {
784 #endif
785 
786 /* -----------------------------------------------------------------------------
787  * Constant declarations
788  * ----------------------------------------------------------------------------- */
789 
790 /* Constant Types */
791 #define SWIG_TCL_POINTER 4
792 #define SWIG_TCL_BINARY  5
793 
794 /* Constant information structure */
795 typedef struct swig_const_info {
796     int type;
797     char *name;
798     long lvalue;
799     double dvalue;
800     void   *pvalue;
801     swig_type_info **ptype;
802 } swig_const_info;
803 
804 typedef int   (*swig_wrapper)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST []);
805 typedef int   (*swig_wrapper_func)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST []);
806 typedef char *(*swig_variable_func)(ClientData, Tcl_Interp *, char *, char *, int);
807 typedef void  (*swig_delete_func)(ClientData);
808 
809 typedef struct swig_method {
810   const char     *name;
811   swig_wrapper   method;
812 } swig_method;
813 
814 typedef struct swig_attribute {
815   const char     *name;
816   swig_wrapper   getmethod;
817   swig_wrapper   setmethod;
818 } swig_attribute;
819 
820 typedef struct swig_class {
821   const char         *name;
822   swig_type_info   **type;
823   swig_wrapper       constructor;
824   void              (*destructor)(void *);
825   swig_method        *methods;
826   swig_attribute     *attributes;
827   struct swig_class **bases;
828   char              **base_names;
829   swig_module_info   *module;
830 } swig_class;
831 
832 typedef struct swig_instance {
833   Tcl_Obj       *thisptr;
834   void          *thisvalue;
835   swig_class   *classptr;
836   int            destroy;
837   Tcl_Command    cmdtok;
838 } swig_instance;
839 
840 /* Structure for command table */
841 typedef struct {
842   const char *name;
843   int       (*wrapper)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST []);
844   ClientData  clientdata;
845 } swig_command_info;
846 
847 /* Structure for variable linking table */
848 typedef struct {
849   const char *name;
850   void *addr;
851   char * (*get)(ClientData, Tcl_Interp *, char *, char *, int);
852   char * (*set)(ClientData, Tcl_Interp *, char *, char *, int);
853 } swig_var_info;
854 
855 
856 /* -----------------------------------------------------------------------------*
857  *  Install a constant object
858  * -----------------------------------------------------------------------------*/
859 
860 static Tcl_HashTable   swigconstTable;
861 static int             swigconstTableinit = 0;
862 
863 SWIGINTERN void
SWIG_Tcl_SetConstantObj(Tcl_Interp * interp,const char * name,Tcl_Obj * obj)864 SWIG_Tcl_SetConstantObj(Tcl_Interp *interp, const char* name, Tcl_Obj *obj) {
865   int newobj;
866   Tcl_ObjSetVar2(interp,Tcl_NewStringObj(name,-1), NULL, obj, TCL_GLOBAL_ONLY);
867   Tcl_SetHashValue(Tcl_CreateHashEntry(&swigconstTable, name, &newobj), (ClientData) obj);
868 }
869 
870 SWIGINTERN Tcl_Obj *
SWIG_Tcl_GetConstantObj(const char * key)871 SWIG_Tcl_GetConstantObj(const char *key) {
872   Tcl_HashEntry *entryPtr;
873   if (!swigconstTableinit) return 0;
874   entryPtr = Tcl_FindHashEntry(&swigconstTable, key);
875   if (entryPtr) {
876     return (Tcl_Obj *) Tcl_GetHashValue(entryPtr);
877   }
878   return 0;
879 }
880 
881 #ifdef __cplusplus
882 }
883 #endif
884 
885 
886 
887 /* -----------------------------------------------------------------------------
888  * See the LICENSE file for information on copyright, usage and redistribution
889  * of SWIG, and the README file for authors - http://www.swig.org/release.html.
890  *
891  * tclrun.swg
892  *
893  * This file contains the runtime support for Tcl modules and includes
894  * code for managing global variables and pointer type checking.
895  * ----------------------------------------------------------------------------- */
896 
897 /* Common SWIG API */
898 
899 /* for raw pointers */
900 #define SWIG_ConvertPtr(oc, ptr, ty, flags)             SWIG_Tcl_ConvertPtr(interp, oc, ptr, ty, flags)
901 #define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Tcl_NewPointerObj(ptr, type, flags)
902 
903 /* for raw packed data */
904 #define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Tcl_ConvertPacked(interp, obj, ptr, sz, ty)
905 #define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Tcl_NewPackedObj(ptr, sz, type)
906 
907 /* for class or struct pointers */
908 #define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_Tcl_ConvertPtr(interp, obj, pptr, type, flags)
909 #define SWIG_NewInstanceObj(thisvalue, type, flags)     SWIG_Tcl_NewInstanceObj(interp, thisvalue, type, flags)
910 
911 /* for C or C++ function pointers */
912 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Tcl_ConvertPtr(interp, obj, pptr, type, 0)
913 #define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Tcl_NewPointerObj(ptr, type, 0)
914 
915 /* for C++ member pointers, ie, member methods */
916 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Tcl_ConvertPacked(interp,obj, ptr, sz, ty)
917 #define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Tcl_NewPackedObj(ptr, sz, type)
918 
919 
920 /* Runtime API */
921 
922 #define SWIG_GetModule(clientdata)                      SWIG_Tcl_GetModule((Tcl_Interp *) (clientdata))
923 #define SWIG_SetModule(clientdata, pointer)          	SWIG_Tcl_SetModule((Tcl_Interp *) (clientdata), pointer)
924 
925 
926 /* Error manipulation */
927 
928 #define SWIG_ErrorType(code)                            SWIG_Tcl_ErrorType(code)
929 #define SWIG_Error(code, msg)            		SWIG_Tcl_SetErrorMsg(interp, SWIG_Tcl_ErrorType(code), msg)
930 #define SWIG_fail                        		goto fail
931 
932 
933 /* Tcl-specific SWIG API */
934 
935 #define SWIG_Acquire(ptr)                               SWIG_Tcl_Acquire(ptr)
936 #define SWIG_MethodCommand                           	SWIG_Tcl_MethodCommand
937 #define SWIG_Disown(ptr)                             	SWIG_Tcl_Disown(ptr)
938 #define SWIG_ConvertPtrFromString(c, ptr, ty, flags) 	SWIG_Tcl_ConvertPtrFromString(interp, c, ptr, ty, flags)
939 #define SWIG_MakePtr(c, ptr, ty, flags)              	SWIG_Tcl_MakePtr(c, ptr, ty, flags)
940 #define SWIG_PointerTypeFromString(c)                	SWIG_Tcl_PointerTypeFromString(c)
941 #define SWIG_GetArgs                                 	SWIG_Tcl_GetArgs
942 #define SWIG_GetConstantObj(key)                     	SWIG_Tcl_GetConstantObj(key)
943 #define SWIG_ObjectConstructor                       	SWIG_Tcl_ObjectConstructor
944 #define SWIG_Thisown(ptr)                            	SWIG_Tcl_Thisown(ptr)
945 #define SWIG_ObjectDelete                            	SWIG_Tcl_ObjectDelete
946 
947 
948 #define SWIG_TCL_DECL_ARGS_2(arg1, arg2)                (Tcl_Interp *interp SWIGUNUSED, arg1, arg2)
949 #define SWIG_TCL_CALL_ARGS_2(arg1, arg2)                (interp, arg1, arg2)
950 /* -----------------------------------------------------------------------------
951  * pointers/data manipulation
952  * ----------------------------------------------------------------------------- */
953 
954 /* For backward compatibility only */
955 #define SWIG_POINTER_EXCEPTION  0
956 #define SWIG_GetConstant        SWIG_GetConstantObj
957 #define SWIG_Tcl_GetConstant    SWIG_Tcl_GetConstantObj
958 
959 
960 #ifdef __cplusplus
961 extern "C" {
962 #if 0
963 } /* cc-mode */
964 #endif
965 #endif
966 
967 /* Object support */
968 
969 SWIGRUNTIME Tcl_HashTable*
SWIG_Tcl_ObjectTable(void)970 SWIG_Tcl_ObjectTable(void) {
971   static Tcl_HashTable  swigobjectTable;
972   static int            swigobjectTableinit = 0;
973   if (!swigobjectTableinit) {
974     Tcl_InitHashTable(&swigobjectTable, TCL_ONE_WORD_KEYS);
975     swigobjectTableinit = 1;
976   }
977   return &swigobjectTable;
978 }
979 
980 /* Acquire ownership of a pointer */
981 SWIGRUNTIME void
SWIG_Tcl_Acquire(void * ptr)982 SWIG_Tcl_Acquire(void *ptr) {
983   int newobj;
984   Tcl_CreateHashEntry(SWIG_Tcl_ObjectTable(), (char *) ptr, &newobj);
985 }
986 
987 SWIGRUNTIME int
SWIG_Tcl_Thisown(void * ptr)988 SWIG_Tcl_Thisown(void *ptr) {
989   if (Tcl_FindHashEntry(SWIG_Tcl_ObjectTable(), (char *) ptr)) {
990     return 1;
991   }
992   return 0;
993 }
994 
995 /* Disown a pointer.  Returns 1 if we owned it to begin with */
996 SWIGRUNTIME int
SWIG_Tcl_Disown(void * ptr)997 SWIG_Tcl_Disown(void *ptr) {
998   Tcl_HashEntry *entryPtr = Tcl_FindHashEntry(SWIG_Tcl_ObjectTable(), (char *) ptr);
999   if (entryPtr) {
1000     Tcl_DeleteHashEntry(entryPtr);
1001     return 1;
1002   }
1003   return 0;
1004 }
1005 
1006 /* Convert a pointer value */
1007 SWIGRUNTIME int
SWIG_Tcl_ConvertPtrFromString(Tcl_Interp * interp,const char * c,void ** ptr,swig_type_info * ty,int flags)1008 SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, const char *c, void **ptr, swig_type_info *ty, int flags) {
1009   swig_cast_info *tc;
1010   /* Pointer values must start with leading underscore */
1011   while (*c != '_') {
1012     *ptr = (void *) 0;
1013     if (strcmp(c,"NULL") == 0) return SWIG_OK;
1014     /* Hmmm. It could be an object name. */
1015     if (Tcl_VarEval(interp,c," cget -this", (char *) NULL) == TCL_OK) {
1016       Tcl_Obj *result = Tcl_GetObjResult(interp);
1017       c = Tcl_GetStringFromObj(result, NULL);
1018       continue;
1019     }
1020     Tcl_ResetResult(interp);
1021     return SWIG_ERROR;
1022   }
1023   c++;
1024   c = SWIG_UnpackData(c,ptr,sizeof(void *));
1025   if (ty) {
1026     tc = c ? SWIG_TypeCheck(c,ty) : 0;
1027     if (!tc) {
1028       return SWIG_ERROR;
1029     }
1030     if (flags & SWIG_POINTER_DISOWN) {
1031       SWIG_Disown((void *) *ptr);
1032     }
1033     *ptr = SWIG_TypeCast(tc,(void *) *ptr);
1034   }
1035   return SWIG_OK;
1036 }
1037 
1038 /* Convert a pointer value */
1039 SWIGRUNTIMEINLINE int
SWIG_Tcl_ConvertPtr(Tcl_Interp * interp,Tcl_Obj * oc,void ** ptr,swig_type_info * ty,int flags)1040 SWIG_Tcl_ConvertPtr(Tcl_Interp *interp, Tcl_Obj *oc, void **ptr, swig_type_info *ty, int flags) {
1041   return SWIG_Tcl_ConvertPtrFromString(interp, Tcl_GetStringFromObj(oc,NULL), ptr, ty, flags);
1042 }
1043 
1044 /* Convert a pointer value */
1045 SWIGRUNTIME char *
SWIG_Tcl_PointerTypeFromString(char * c)1046 SWIG_Tcl_PointerTypeFromString(char *c) {
1047   char d;
1048   /* Pointer values must start with leading underscore. NULL has no type */
1049   if (*c != '_') {
1050     return 0;
1051   }
1052   c++;
1053   /* Extract hex value from pointer */
1054   while ((d = *c)) {
1055     if (!(((d >= '0') && (d <= '9')) || ((d >= 'a') && (d <= 'f')))) break;
1056     c++;
1057   }
1058   return c;
1059 }
1060 
1061 /* Convert a packed value value */
1062 SWIGRUNTIME int
SWIG_Tcl_ConvertPacked(Tcl_Interp * SWIGUNUSEDPARM (interp),Tcl_Obj * obj,void * ptr,int sz,swig_type_info * ty)1063 SWIG_Tcl_ConvertPacked(Tcl_Interp *SWIGUNUSEDPARM(interp) , Tcl_Obj *obj, void *ptr, int sz, swig_type_info *ty) {
1064   swig_cast_info *tc;
1065   const char  *c;
1066 
1067   if (!obj) goto type_error;
1068   c = Tcl_GetStringFromObj(obj,NULL);
1069   /* Pointer values must start with leading underscore */
1070   if (*c != '_') goto type_error;
1071   c++;
1072   c = SWIG_UnpackData(c,ptr,sz);
1073   if (ty) {
1074     tc = SWIG_TypeCheck(c,ty);
1075     if (!tc) goto type_error;
1076   }
1077   return SWIG_OK;
1078 
1079  type_error:
1080 
1081   return SWIG_ERROR;
1082 }
1083 
1084 
1085 /* Take a pointer and convert it to a string */
1086 SWIGRUNTIME void
SWIG_Tcl_MakePtr(char * c,void * ptr,swig_type_info * ty,int flags)1087 SWIG_Tcl_MakePtr(char *c, void *ptr, swig_type_info *ty, int flags) {
1088   if (ptr) {
1089     *(c++) = '_';
1090     c = SWIG_PackData(c,&ptr,sizeof(void *));
1091     strcpy(c,ty->name);
1092   } else {
1093     strcpy(c,(char *)"NULL");
1094   }
1095   flags = 0;
1096 }
1097 
1098 /* Create a new pointer object */
1099 SWIGRUNTIMEINLINE Tcl_Obj *
SWIG_Tcl_NewPointerObj(void * ptr,swig_type_info * type,int flags)1100 SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
1101   Tcl_Obj *robj;
1102   char result[SWIG_BUFFER_SIZE];
1103   SWIG_MakePtr(result,ptr,type,flags);
1104   robj = Tcl_NewStringObj(result,-1);
1105   return robj;
1106 }
1107 
1108 SWIGRUNTIME Tcl_Obj *
SWIG_Tcl_NewPackedObj(void * ptr,int sz,swig_type_info * type)1109 SWIG_Tcl_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
1110   char result[1024];
1111   char *r = result;
1112   if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
1113   *(r++) = '_';
1114   r = SWIG_PackData(r,ptr,sz);
1115   strcpy(r,type->name);
1116   return Tcl_NewStringObj(result,-1);
1117 }
1118 
1119 /* -----------------------------------------------------------------------------*
1120  *  Get type list
1121  * -----------------------------------------------------------------------------*/
1122 
1123 SWIGRUNTIME swig_module_info *
SWIG_Tcl_GetModule(Tcl_Interp * interp)1124 SWIG_Tcl_GetModule(Tcl_Interp *interp) {
1125   const char *data;
1126   swig_module_info *ret = 0;
1127 
1128   /* first check if pointer already created */
1129   data = Tcl_GetVar(interp, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TCL_GLOBAL_ONLY);
1130   if (data) {
1131     SWIG_UnpackData(data, &ret, sizeof(swig_type_info **));
1132   }
1133 
1134   return ret;
1135 }
1136 
1137 SWIGRUNTIME void
SWIG_Tcl_SetModule(Tcl_Interp * interp,swig_module_info * module)1138 SWIG_Tcl_SetModule(Tcl_Interp *interp, swig_module_info *module) {
1139   char buf[SWIG_BUFFER_SIZE];
1140   char *data;
1141 
1142   /* create a new pointer */
1143   data = SWIG_PackData(buf, &module, sizeof(swig_type_info **));
1144   *data = 0;
1145   Tcl_SetVar(interp, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, buf, 0);
1146 }
1147 
1148 /* -----------------------------------------------------------------------------*
1149  *  Object auxiliars
1150  * -----------------------------------------------------------------------------*/
1151 
1152 
1153 SWIGRUNTIME void
SWIG_Tcl_ObjectDelete(ClientData clientData)1154 SWIG_Tcl_ObjectDelete(ClientData clientData) {
1155   swig_instance *si = (swig_instance *) clientData;
1156   if ((si) && (si->destroy) && (SWIG_Disown(si->thisvalue))) {
1157     if (si->classptr->destructor) {
1158       (si->classptr->destructor)(si->thisvalue);
1159     }
1160   }
1161   Tcl_DecrRefCount(si->thisptr);
1162   free(si);
1163 }
1164 
1165 /* Function to invoke object methods given an instance */
1166 SWIGRUNTIME int
SWIG_Tcl_MethodCommand(ClientData clientData,Tcl_Interp * interp,int objc,Tcl_Obj * CONST _objv[])1167 SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST _objv[]) {
1168   char *method,   *attrname;
1169   swig_instance   *inst = (swig_instance *) clientData;
1170   swig_method     *meth;
1171   swig_attribute  *attr;
1172   Tcl_Obj         *oldarg;
1173   Tcl_Obj         **objv;
1174   int              rcode;
1175   swig_class      *cls;
1176   swig_class      *cls_stack[64];
1177   int              cls_stack_bi[64];
1178   int              cls_stack_top = 0;
1179   int              numconf = 2;
1180   int              bi;
1181 
1182   objv = (Tcl_Obj **) _objv;
1183   if (objc < 2) {
1184     Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
1185     return TCL_ERROR;
1186   }
1187   method = Tcl_GetStringFromObj(objv[1],NULL);
1188   if (strcmp(method,"-acquire") == 0) {
1189     inst->destroy = 1;
1190     SWIG_Acquire(inst->thisvalue);
1191     return TCL_OK;
1192   }
1193   if (strcmp(method,"-disown") == 0) {
1194     if (inst->destroy) {
1195       SWIG_Disown(inst->thisvalue);
1196     }
1197     inst->destroy = 0;
1198     return TCL_OK;
1199   }
1200   if (strcmp(method,"-delete") == 0) {
1201     Tcl_DeleteCommandFromToken(interp,inst->cmdtok);
1202     return TCL_OK;
1203   }
1204   cls_stack[cls_stack_top] = inst->classptr;
1205   cls_stack_bi[cls_stack_top] = -1;
1206   cls = inst->classptr;
1207   while (1) {
1208     bi = cls_stack_bi[cls_stack_top];
1209     cls = cls_stack[cls_stack_top];
1210     if (bi != -1) {
1211       if (!cls->bases[bi] && cls->base_names[bi]) {
1212         /* lookup and cache the base class */
1213 	swig_type_info *info = SWIG_TypeQueryModule(cls->module, cls->module, cls->base_names[bi]);
1214 	if (info) cls->bases[bi] = (swig_class *) info->clientdata;
1215       }
1216       cls = cls->bases[bi];
1217       if (cls) {
1218         cls_stack_bi[cls_stack_top]++;
1219         cls_stack_top++;
1220         cls_stack[cls_stack_top] = cls;
1221         cls_stack_bi[cls_stack_top] = -1;
1222         continue;
1223       }
1224     }
1225     if (!cls) {
1226       cls_stack_top--;
1227       if (cls_stack_top < 0) break;
1228       else continue;
1229     }
1230     cls_stack_bi[cls_stack_top]++;
1231 
1232     meth = cls->methods;
1233     /* Check for methods */
1234     while (meth && meth->name) {
1235       if (strcmp(meth->name,method) == 0) {
1236         oldarg = objv[1];
1237         objv[1] = inst->thisptr;
1238         Tcl_IncrRefCount(inst->thisptr);
1239         rcode = (*meth->method)(clientData,interp,objc,objv);
1240         objv[1] = oldarg;
1241         Tcl_DecrRefCount(inst->thisptr);
1242         return rcode;
1243       }
1244       meth++;
1245     }
1246     /* Check class methods for a match */
1247     if (strcmp(method,"cget") == 0) {
1248       if (objc < 3) {
1249         Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
1250         return TCL_ERROR;
1251       }
1252       attrname = Tcl_GetStringFromObj(objv[2],NULL);
1253       attr = cls->attributes;
1254       while (attr && attr->name) {
1255         if ((strcmp(attr->name, attrname) == 0) && (attr->getmethod)) {
1256           oldarg = objv[1];
1257           objv[1] = inst->thisptr;
1258           Tcl_IncrRefCount(inst->thisptr);
1259           rcode = (*attr->getmethod)(clientData,interp,2, objv);
1260           objv[1] = oldarg;
1261           Tcl_DecrRefCount(inst->thisptr);
1262           return rcode;
1263         }
1264         attr++;
1265       }
1266       if (strcmp(attrname, "-this") == 0) {
1267         Tcl_SetObjResult(interp, Tcl_DuplicateObj(inst->thisptr));
1268         return TCL_OK;
1269       }
1270       if (strcmp(attrname, "-thisown") == 0) {
1271         if (SWIG_Thisown(inst->thisvalue)) {
1272           Tcl_SetResult(interp,(char*)"1",TCL_STATIC);
1273         } else {
1274           Tcl_SetResult(interp,(char*)"0",TCL_STATIC);
1275         }
1276         return TCL_OK;
1277       }
1278     } else if (strcmp(method, "configure") == 0) {
1279       int i;
1280       if (objc < 4) {
1281         Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
1282         return TCL_ERROR;
1283       }
1284       i = 2;
1285       while (i < objc) {
1286         attrname = Tcl_GetStringFromObj(objv[i],NULL);
1287         attr = cls->attributes;
1288         while (attr && attr->name) {
1289           if ((strcmp(attr->name, attrname) == 0) && (attr->setmethod)) {
1290             oldarg = objv[i];
1291             objv[i] = inst->thisptr;
1292             Tcl_IncrRefCount(inst->thisptr);
1293             rcode = (*attr->setmethod)(clientData,interp,3, &objv[i-1]);
1294             objv[i] = oldarg;
1295             Tcl_DecrRefCount(inst->thisptr);
1296             if (rcode != TCL_OK) return rcode;
1297             numconf += 2;
1298           }
1299           attr++;
1300         }
1301         i+=2;
1302       }
1303     }
1304   }
1305   if (strcmp(method,"configure") == 0) {
1306     if (numconf >= objc) {
1307       return TCL_OK;
1308     } else {
1309       Tcl_SetResult(interp,(char *) "Invalid attribute name.", TCL_STATIC);
1310       return TCL_ERROR;
1311     }
1312   }
1313   if (strcmp(method,"cget") == 0) {
1314     Tcl_SetResult(interp,(char *) "Invalid attribute name.", TCL_STATIC);
1315     return TCL_ERROR;
1316   }
1317   Tcl_SetResult(interp, (char *) "Invalid method. Must be one of: configure cget -acquire -disown -delete", TCL_STATIC);
1318   cls = inst->classptr;
1319   bi = 0;
1320   while (cls) {
1321     meth = cls->methods;
1322     while (meth && meth->name) {
1323       char *cr = (char *) Tcl_GetStringResult(interp);
1324       int meth_len = strlen(meth->name);
1325       char* where = strchr(cr,':');
1326       while(where) {
1327         where = strstr(where, meth->name);
1328         if(where) {
1329           if(where[-1] == ' ' && (where[meth_len] == ' ' || where[meth_len]==0)) {
1330             break;
1331           } else {
1332             where++;
1333           }
1334         }
1335       }
1336 
1337       if (!where)
1338         Tcl_AppendElement(interp, (char *) meth->name);
1339       meth++;
1340     }
1341     cls = inst->classptr->bases[bi++];
1342   }
1343   return TCL_ERROR;
1344 }
1345 
1346 /* This function takes the current result and turns it into an object command */
1347 SWIGRUNTIME Tcl_Obj *
SWIG_Tcl_NewInstanceObj(Tcl_Interp * interp,void * thisvalue,swig_type_info * type,int flags)1348 SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *type, int flags) {
1349   Tcl_Obj *robj = SWIG_NewPointerObj(thisvalue, type,0);
1350   /* Check to see if this pointer belongs to a class or not */
1351   if ((type->clientdata) && (interp)) {
1352     Tcl_CmdInfo    ci;
1353     char          *name;
1354     name = Tcl_GetStringFromObj(robj,NULL);
1355     if (!Tcl_GetCommandInfo(interp,name, &ci) || (flags)) {
1356       swig_instance *newinst = (swig_instance *) malloc(sizeof(swig_instance));
1357       newinst->thisptr = Tcl_DuplicateObj(robj);
1358       Tcl_IncrRefCount(newinst->thisptr);
1359       newinst->thisvalue = thisvalue;
1360       newinst->classptr = (swig_class *) type->clientdata;
1361       newinst->destroy = flags;
1362       newinst->cmdtok = Tcl_CreateObjCommand(interp, Tcl_GetStringFromObj(robj,NULL), (swig_wrapper_func) SWIG_MethodCommand, (ClientData) newinst, (swig_delete_func) SWIG_ObjectDelete);
1363       if (flags) {
1364         SWIG_Acquire(thisvalue);
1365       }
1366     }
1367   }
1368   return robj;
1369 }
1370 
1371 /* Function to create objects */
1372 SWIGRUNTIME int
SWIG_Tcl_ObjectConstructor(ClientData clientData,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])1373 SWIG_Tcl_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1374   Tcl_Obj          *newObj = 0;
1375   void             *thisvalue = 0;
1376   swig_instance   *newinst = 0;
1377   swig_class      *classptr = (swig_class *) clientData;
1378   swig_wrapper     cons = 0;
1379   char             *name = 0;
1380   int               firstarg = 0;
1381   int               thisarg = 0;
1382   int               destroy = 1;
1383 
1384   if (!classptr) {
1385     Tcl_SetResult(interp, (char *) "swig: internal runtime error. No class object defined.", TCL_STATIC);
1386     return TCL_ERROR;
1387   }
1388   cons = classptr->constructor;
1389   if (objc > 1) {
1390     char *s = Tcl_GetStringFromObj(objv[1],NULL);
1391     if (strcmp(s,"-this") == 0) {
1392       thisarg = 2;
1393       cons = 0;
1394     } else if (strcmp(s,"-args") == 0) {
1395       firstarg = 1;
1396     } else if (objc == 2) {
1397       firstarg = 1;
1398       name = s;
1399     } else if (objc >= 3) {
1400       char *s1;
1401       name = s;
1402       s1 = Tcl_GetStringFromObj(objv[2],NULL);
1403       if (strcmp(s1,"-this") == 0) {
1404 	thisarg = 3;
1405 	cons = 0;
1406       } else {
1407 	firstarg = 1;
1408       }
1409     }
1410   }
1411   if (cons) {
1412     int result;
1413     result = (*cons)(0, interp, objc-firstarg, &objv[firstarg]);
1414     if (result != TCL_OK) {
1415       return result;
1416     }
1417     newObj = Tcl_DuplicateObj(Tcl_GetObjResult(interp));
1418     if (!name) name = Tcl_GetStringFromObj(newObj,NULL);
1419   } else if (thisarg > 0) {
1420     if (thisarg < objc) {
1421       destroy = 0;
1422       newObj = Tcl_DuplicateObj(objv[thisarg]);
1423       if (!name) name = Tcl_GetStringFromObj(newObj,NULL);
1424     } else {
1425       Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
1426       return TCL_ERROR;
1427     }
1428   } else {
1429     Tcl_SetResult(interp, (char *) "No constructor available.", TCL_STATIC);
1430     return TCL_ERROR;
1431   }
1432   if (SWIG_Tcl_ConvertPtr(interp,newObj, (void **) &thisvalue, *(classptr->type), 0) != SWIG_OK) {
1433     Tcl_DecrRefCount(newObj);
1434     return TCL_ERROR;
1435   }
1436   newinst = (swig_instance *) malloc(sizeof(swig_instance));
1437   newinst->thisptr = newObj;
1438   Tcl_IncrRefCount(newObj);
1439   newinst->thisvalue = thisvalue;
1440   newinst->classptr = classptr;
1441   newinst->destroy = destroy;
1442   if (destroy) {
1443     SWIG_Acquire(thisvalue);
1444   }
1445   newinst->cmdtok = Tcl_CreateObjCommand(interp,name, (swig_wrapper) SWIG_MethodCommand, (ClientData) newinst, (swig_delete_func) SWIG_ObjectDelete);
1446   return TCL_OK;
1447 }
1448 
1449 /* -----------------------------------------------------------------------------*
1450  *   Get arguments
1451  * -----------------------------------------------------------------------------*/
1452 SWIGRUNTIME int
SWIG_Tcl_GetArgs(Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[],const char * fmt,...)1453 SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char *fmt, ...) {
1454   int        argno = 0, opt = 0;
1455   long       tempi;
1456   double     tempd;
1457   const char *c;
1458   va_list    ap;
1459   void      *vptr;
1460   Tcl_Obj   *obj = 0;
1461   swig_type_info *ty;
1462 
1463   va_start(ap,fmt);
1464   for (c = fmt; (*c && (*c != ':') && (*c != ';')); c++,argno++) {
1465     if (*c == '|') {
1466       opt = 1;
1467       c++;
1468     }
1469     if (argno >= (objc-1)) {
1470       if (!opt) {
1471         Tcl_SetResult(interp, (char *) "Wrong number of arguments ", TCL_STATIC);
1472         goto argerror;
1473       } else {
1474         va_end(ap);
1475         return TCL_OK;
1476       }
1477     }
1478 
1479     vptr = va_arg(ap,void *);
1480     if (vptr) {
1481       if (isupper(*c)) {
1482         obj = SWIG_Tcl_GetConstantObj(Tcl_GetStringFromObj(objv[argno+1],0));
1483         if (!obj) obj = objv[argno+1];
1484       } else {
1485         obj = objv[argno+1];
1486       }
1487       switch(*c) {
1488       case 'i': case 'I':
1489       case 'l': case 'L':
1490       case 'h': case 'H':
1491       case 'b': case 'B':
1492         if (Tcl_GetLongFromObj(interp,obj,&tempi) != TCL_OK) goto argerror;
1493         if ((*c == 'i') || (*c == 'I')) *((int *)vptr) = (int)tempi;
1494         else if ((*c == 'l') || (*c == 'L')) *((long *)vptr) = (long)tempi;
1495         else if ((*c == 'h') || (*c == 'H')) *((short*)vptr) = (short)tempi;
1496         else if ((*c == 'b') || (*c == 'B')) *((unsigned char *)vptr) = (unsigned char)tempi;
1497         break;
1498       case 'f': case 'F':
1499       case 'd': case 'D':
1500         if (Tcl_GetDoubleFromObj(interp,obj,&tempd) != TCL_OK) goto argerror;
1501         if ((*c == 'f') || (*c == 'F')) *((float *) vptr) = (float)tempd;
1502         else if ((*c == 'd') || (*c == 'D')) *((double*) vptr) = tempd;
1503         break;
1504       case 's': case 'S':
1505         if (*(c+1) == '#') {
1506           int *vlptr = (int *) va_arg(ap, void *);
1507           *((char **) vptr) = Tcl_GetStringFromObj(obj, vlptr);
1508           c++;
1509         } else {
1510           *((char **)vptr) = Tcl_GetStringFromObj(obj,NULL);
1511         }
1512         break;
1513       case 'c': case 'C':
1514         *((char *)vptr) = *(Tcl_GetStringFromObj(obj,NULL));
1515         break;
1516       case 'p': case 'P':
1517         ty = (swig_type_info *) va_arg(ap, void *);
1518         if (SWIG_Tcl_ConvertPtr(interp, obj, (void **) vptr, ty, 0) != SWIG_OK) goto argerror;
1519         break;
1520       case 'o': case 'O':
1521         *((Tcl_Obj **)vptr) = objv[argno+1];
1522         break;
1523       default:
1524         break;
1525       }
1526     }
1527   }
1528 
1529   if ((*c != ';') && ((objc-1) > argno)) {
1530     Tcl_SetResult(interp, (char *) "Wrong # args.", TCL_STATIC);
1531     goto argerror;
1532   }
1533   va_end(ap);
1534   return TCL_OK;
1535 
1536  argerror:
1537   {
1538     char temp[32];
1539     sprintf(temp,"%d", argno+1);
1540     c = strchr(fmt,':');
1541     if (!c) c = strchr(fmt,';');
1542     if (!c) c = (char *)"";
1543     Tcl_AppendResult(interp,c," argument ", temp, NULL);
1544     va_end(ap);
1545     return TCL_ERROR;
1546   }
1547 }
1548 
1549 #ifdef __cplusplus
1550 #if 0
1551 { /* cc-mode */
1552 #endif
1553 }
1554 #endif
1555 
1556 
1557 
1558 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1559 
1560 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1561 
1562 
1563 
1564 /* -------- TYPES TABLE (BEGIN) -------- */
1565 
1566 #define SWIGTYPE_p_char swig_types[0]
1567 #define SWIGTYPE_p_netpgp_t swig_types[1]
1568 #define SWIGTYPE_p_p_char swig_types[2]
1569 #define SWIGTYPE_p_void swig_types[3]
1570 static swig_type_info *swig_types[5];
1571 static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0};
1572 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1573 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1574 
1575 /* -------- TYPES TABLE (END) -------- */
1576 
1577 #define SWIG_init    Netpgptcl_Init
1578 #define SWIG_name    "netpgptcl"
1579 #define SWIG_prefix  ""
1580 #define SWIG_version "0.0"
1581 
1582 #define SWIGVERSION 0x010331
1583 #define SWIG_VERSION SWIGVERSION
1584 
1585 
1586 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
1587 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1588 
1589 
1590 
1591 #ifdef __cplusplus
1592 extern "C" {
1593 #endif
1594 #ifdef MAC_TCL
1595 #pragma export on
1596 #endif
1597 SWIGEXPORT int SWIG_init(Tcl_Interp *);
1598 #ifdef MAC_TCL
1599 #pragma export off
1600 #endif
1601 #ifdef __cplusplus
1602 }
1603 #endif
1604 
1605 
1606 
1607 #include <netpgp.h>
1608 
1609 
1610 
1611 
1612 #include <limits.h>
1613 #ifndef LLONG_MIN
1614 # define LLONG_MIN	LONG_LONG_MIN
1615 #endif
1616 #ifndef LLONG_MAX
1617 # define LLONG_MAX	LONG_LONG_MAX
1618 #endif
1619 #ifndef ULLONG_MAX
1620 # define ULLONG_MAX	ULONG_LONG_MAX
1621 #endif
1622 
1623 
1624 SWIGINTERN int
SWIG_TCL_DECL_ARGS_2(Tcl_Obj * obj,unsigned long * val)1625 SWIG_AsVal_unsigned_SS_long SWIG_TCL_DECL_ARGS_2(Tcl_Obj *obj, unsigned long *val) {
1626   long v;
1627   if (Tcl_GetLongFromObj(0,obj, &v) == TCL_OK) {
1628     if (v >= 0) {
1629       if (val) *val = (unsigned long) v;
1630       return SWIG_OK;
1631     }
1632     /* If v is negative, then this could be a negative number, or an
1633        unsigned value which doesn't fit in a signed long, so try to
1634        get it as a string so we can distinguish these cases. */
1635   }
1636   {
1637     int len = 0;
1638     const char *nptr = Tcl_GetStringFromObj(obj, &len);
1639     if (nptr && len > 0) {
1640       char *endptr;
1641       unsigned long v;
1642       if (*nptr == '-') return SWIG_OverflowError;
1643       v = strtoul(nptr, &endptr,0);
1644       if (errno == ERANGE) {
1645 	errno = 0;
1646 	return SWIG_OverflowError;
1647       } else {
1648 	if (*endptr == '\0') {
1649 	  if (val) *val = v;
1650 	  return SWIG_OK;
1651 	}
1652       }
1653     }
1654   }
1655 
1656   return SWIG_TypeError;
1657 }
1658 
1659 
1660 SWIGINTERN int
SWIG_TCL_DECL_ARGS_2(Tcl_Obj * obj,unsigned int * val)1661 SWIG_AsVal_unsigned_SS_int SWIG_TCL_DECL_ARGS_2(Tcl_Obj * obj, unsigned int *val)
1662 {
1663   unsigned long v;
1664   int res = SWIG_AsVal_unsigned_SS_long SWIG_TCL_CALL_ARGS_2(obj, &v);
1665   if (SWIG_IsOK(res)) {
1666     if ((v > UINT_MAX)) {
1667       return SWIG_OverflowError;
1668     } else {
1669       if (val) *val = (unsigned int)(v);
1670     }
1671   }
1672   return res;
1673 }
1674 
1675 
1676 SWIGINTERNINLINE Tcl_Obj*
SWIG_From_long(long value)1677 SWIG_From_long  (long value)
1678 {
1679   if (((long) INT_MIN <= value) && (value <= (long) INT_MAX)) {
1680     return Tcl_NewIntObj((int)(value));
1681   } else {
1682     return Tcl_NewLongObj(value);
1683   }
1684 }
1685 
1686 
1687 #include <stdio.h>
1688 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
1689 # ifndef snprintf
1690 #  define snprintf _snprintf
1691 # endif
1692 #endif
1693 
1694 
1695 SWIGINTERNINLINE Tcl_Obj*
SWIG_From_unsigned_SS_long(unsigned long value)1696 SWIG_From_unsigned_SS_long  (unsigned long value)
1697 {
1698   if (value < (unsigned long) LONG_MAX) {
1699     return SWIG_From_long  ((long)(value));
1700   } else {
1701     char temp[256];
1702     sprintf(temp, "%lu", value);
1703     return Tcl_NewStringObj(temp,-1);
1704   }
1705 }
1706 
1707 
1708 SWIGINTERNINLINE Tcl_Obj *
SWIG_From_unsigned_SS_int(unsigned int value)1709 SWIG_From_unsigned_SS_int  (unsigned int value)
1710 {
1711   return SWIG_From_unsigned_SS_long  (value);
1712 }
1713 
1714 
1715 SWIGINTERNINLINE Tcl_Obj *
SWIG_From_int(int value)1716 SWIG_From_int  (int value)
1717 {
1718   return SWIG_From_long  (value);
1719 }
1720 
1721 
1722 SWIGINTERN int
SWIG_AsCharPtrAndSize(Tcl_Obj * obj,char ** cptr,size_t * psize,int * alloc)1723 SWIG_AsCharPtrAndSize(Tcl_Obj *obj, char** cptr, size_t* psize, int *alloc)
1724 {
1725   int len = 0;
1726   char *cstr = Tcl_GetStringFromObj(obj, &len);
1727   if (cstr) {
1728     if (cptr)  *cptr = cstr;
1729     if (psize) *psize = len + 1;
1730     if (alloc) *alloc = SWIG_OLDOBJ;
1731     return SWIG_OK;
1732   }
1733   return SWIG_TypeError;
1734 }
1735 
1736 
1737 
1738 
1739 
1740 SWIGINTERNINLINE Tcl_Obj *
SWIG_FromCharPtrAndSize(const char * carray,size_t size)1741 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
1742 {
1743   return (size < INT_MAX) ? Tcl_NewStringObj(carray, (int)(size)) : NULL;
1744 }
1745 
1746 
1747 SWIGINTERNINLINE Tcl_Obj *
SWIG_FromCharPtr(const char * cptr)1748 SWIG_FromCharPtr(const char *cptr)
1749 {
1750   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
1751 }
1752 
1753 
1754 SWIGINTERN int
SWIG_TCL_DECL_ARGS_2(Tcl_Obj * obj,long * val)1755 SWIG_AsVal_long SWIG_TCL_DECL_ARGS_2(Tcl_Obj *obj, long* val)
1756 {
1757   long v;
1758   if (Tcl_GetLongFromObj(0,obj, &v) == TCL_OK) {
1759     if (val) *val = (long) v;
1760     return SWIG_OK;
1761   }
1762   return SWIG_TypeError;
1763 }
1764 
1765 
1766 SWIGINTERN int
SWIG_TCL_DECL_ARGS_2(Tcl_Obj * obj,int * val)1767 SWIG_AsVal_int SWIG_TCL_DECL_ARGS_2(Tcl_Obj * obj, int *val)
1768 {
1769   long v;
1770   int res = SWIG_AsVal_long SWIG_TCL_CALL_ARGS_2(obj, &v);
1771   if (SWIG_IsOK(res)) {
1772     if ((v < INT_MIN || v > INT_MAX)) {
1773       return SWIG_OverflowError;
1774     } else {
1775       if (val) *val = (int)(v);
1776     }
1777   }
1778   return res;
1779 }
1780 
1781 
1782 SWIGINTERNINLINE int
SWIG_TCL_DECL_ARGS_2(Tcl_Obj * obj,size_t * val)1783 SWIG_AsVal_size_t SWIG_TCL_DECL_ARGS_2(Tcl_Obj * obj, size_t *val)
1784 {
1785   unsigned long v;
1786   int res = SWIG_AsVal_unsigned_SS_long SWIG_TCL_CALL_ARGS_2(obj, val ? &v : 0);
1787   if (SWIG_IsOK(res) && val) *val = (size_t)(v);
1788   return res;
1789 }
1790 
1791 #ifdef __cplusplus
1792 extern "C" {
1793 #endif
1794 SWIGINTERN int
_wrap_netpgp_t_c_set(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])1795 _wrap_netpgp_t_c_set(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1796   netpgp_t *arg1 = (netpgp_t *) 0 ;
1797   unsigned int arg2 ;
1798   void *argp1 = 0 ;
1799   int res1 = 0 ;
1800   unsigned int val2 ;
1801   int ecode2 = 0 ;
1802 
1803   if (SWIG_GetArgs(interp, objc, objv,"oo:netpgp_t_c_set self c ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
1804   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
1805   if (!SWIG_IsOK(res1)) {
1806     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_c_set" "', argument " "1"" of type '" "netpgp_t *""'");
1807   }
1808   arg1 = (netpgp_t *)(argp1);
1809   ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
1810   if (!SWIG_IsOK(ecode2)) {
1811     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "netpgp_t_c_set" "', argument " "2"" of type '" "unsigned int""'");
1812   }
1813   arg2 = (unsigned int)(val2);
1814   if (arg1) (arg1)->c = arg2;
1815 
1816 
1817   return TCL_OK;
1818 fail:
1819   return TCL_ERROR;
1820 }
1821 
1822 
1823 SWIGINTERN int
_wrap_netpgp_t_c_get(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])1824 _wrap_netpgp_t_c_get(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1825   netpgp_t *arg1 = (netpgp_t *) 0 ;
1826   unsigned int result;
1827   void *argp1 = 0 ;
1828   int res1 = 0 ;
1829 
1830   if (SWIG_GetArgs(interp, objc, objv,"o:netpgp_t_c_get self ",(void *)0) == TCL_ERROR) SWIG_fail;
1831   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
1832   if (!SWIG_IsOK(res1)) {
1833     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_c_get" "', argument " "1"" of type '" "netpgp_t *""'");
1834   }
1835   arg1 = (netpgp_t *)(argp1);
1836   result = (unsigned int) ((arg1)->c);
1837   Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int((unsigned int)(result)));
1838   return TCL_OK;
1839 fail:
1840   return TCL_ERROR;
1841 }
1842 
1843 
1844 SWIGINTERN int
_wrap_netpgp_t_size_set(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])1845 _wrap_netpgp_t_size_set(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1846   netpgp_t *arg1 = (netpgp_t *) 0 ;
1847   unsigned int arg2 ;
1848   void *argp1 = 0 ;
1849   int res1 = 0 ;
1850   unsigned int val2 ;
1851   int ecode2 = 0 ;
1852 
1853   if (SWIG_GetArgs(interp, objc, objv,"oo:netpgp_t_size_set self size ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
1854   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
1855   if (!SWIG_IsOK(res1)) {
1856     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_size_set" "', argument " "1"" of type '" "netpgp_t *""'");
1857   }
1858   arg1 = (netpgp_t *)(argp1);
1859   ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
1860   if (!SWIG_IsOK(ecode2)) {
1861     SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "netpgp_t_size_set" "', argument " "2"" of type '" "unsigned int""'");
1862   }
1863   arg2 = (unsigned int)(val2);
1864   if (arg1) (arg1)->size = arg2;
1865 
1866 
1867   return TCL_OK;
1868 fail:
1869   return TCL_ERROR;
1870 }
1871 
1872 
1873 SWIGINTERN int
_wrap_netpgp_t_size_get(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])1874 _wrap_netpgp_t_size_get(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1875   netpgp_t *arg1 = (netpgp_t *) 0 ;
1876   unsigned int result;
1877   void *argp1 = 0 ;
1878   int res1 = 0 ;
1879 
1880   if (SWIG_GetArgs(interp, objc, objv,"o:netpgp_t_size_get self ",(void *)0) == TCL_ERROR) SWIG_fail;
1881   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
1882   if (!SWIG_IsOK(res1)) {
1883     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_size_get" "', argument " "1"" of type '" "netpgp_t *""'");
1884   }
1885   arg1 = (netpgp_t *)(argp1);
1886   result = (unsigned int) ((arg1)->size);
1887   Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int((unsigned int)(result)));
1888   return TCL_OK;
1889 fail:
1890   return TCL_ERROR;
1891 }
1892 
1893 
1894 SWIGINTERN int
_wrap_netpgp_t_name_set(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])1895 _wrap_netpgp_t_name_set(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1896   netpgp_t *arg1 = (netpgp_t *) 0 ;
1897   char **arg2 = (char **) 0 ;
1898   void *argp1 = 0 ;
1899   int res1 = 0 ;
1900   void *argp2 = 0 ;
1901   int res2 = 0 ;
1902 
1903   if (SWIG_GetArgs(interp, objc, objv,"oo:netpgp_t_name_set self name ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
1904   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
1905   if (!SWIG_IsOK(res1)) {
1906     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_name_set" "', argument " "1"" of type '" "netpgp_t *""'");
1907   }
1908   arg1 = (netpgp_t *)(argp1);
1909   res2 = SWIG_ConvertPtr(objv[2], &argp2,SWIGTYPE_p_p_char, 0 |  0 );
1910   if (!SWIG_IsOK(res2)) {
1911     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_t_name_set" "', argument " "2"" of type '" "char **""'");
1912   }
1913   arg2 = (char **)(argp2);
1914   if (arg1) (arg1)->name = arg2;
1915 
1916 
1917   return TCL_OK;
1918 fail:
1919   return TCL_ERROR;
1920 }
1921 
1922 
1923 SWIGINTERN int
_wrap_netpgp_t_name_get(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])1924 _wrap_netpgp_t_name_get(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1925   netpgp_t *arg1 = (netpgp_t *) 0 ;
1926   char **result = 0 ;
1927   void *argp1 = 0 ;
1928   int res1 = 0 ;
1929 
1930   if (SWIG_GetArgs(interp, objc, objv,"o:netpgp_t_name_get self ",(void *)0) == TCL_ERROR) SWIG_fail;
1931   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
1932   if (!SWIG_IsOK(res1)) {
1933     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_name_get" "', argument " "1"" of type '" "netpgp_t *""'");
1934   }
1935   arg1 = (netpgp_t *)(argp1);
1936   result = (char **) ((arg1)->name);
1937   Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_p_char,0));
1938   return TCL_OK;
1939 fail:
1940   return TCL_ERROR;
1941 }
1942 
1943 
1944 SWIGINTERN int
_wrap_netpgp_t_value_set(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])1945 _wrap_netpgp_t_value_set(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1946   netpgp_t *arg1 = (netpgp_t *) 0 ;
1947   char **arg2 = (char **) 0 ;
1948   void *argp1 = 0 ;
1949   int res1 = 0 ;
1950   void *argp2 = 0 ;
1951   int res2 = 0 ;
1952 
1953   if (SWIG_GetArgs(interp, objc, objv,"oo:netpgp_t_value_set self value ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
1954   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
1955   if (!SWIG_IsOK(res1)) {
1956     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_value_set" "', argument " "1"" of type '" "netpgp_t *""'");
1957   }
1958   arg1 = (netpgp_t *)(argp1);
1959   res2 = SWIG_ConvertPtr(objv[2], &argp2,SWIGTYPE_p_p_char, 0 |  0 );
1960   if (!SWIG_IsOK(res2)) {
1961     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_t_value_set" "', argument " "2"" of type '" "char **""'");
1962   }
1963   arg2 = (char **)(argp2);
1964   if (arg1) (arg1)->value = arg2;
1965 
1966 
1967   return TCL_OK;
1968 fail:
1969   return TCL_ERROR;
1970 }
1971 
1972 
1973 SWIGINTERN int
_wrap_netpgp_t_value_get(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])1974 _wrap_netpgp_t_value_get(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1975   netpgp_t *arg1 = (netpgp_t *) 0 ;
1976   char **result = 0 ;
1977   void *argp1 = 0 ;
1978   int res1 = 0 ;
1979 
1980   if (SWIG_GetArgs(interp, objc, objv,"o:netpgp_t_value_get self ",(void *)0) == TCL_ERROR) SWIG_fail;
1981   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
1982   if (!SWIG_IsOK(res1)) {
1983     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_value_get" "', argument " "1"" of type '" "netpgp_t *""'");
1984   }
1985   arg1 = (netpgp_t *)(argp1);
1986   result = (char **) ((arg1)->value);
1987   Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_p_char,0));
1988   return TCL_OK;
1989 fail:
1990   return TCL_ERROR;
1991 }
1992 
1993 
1994 SWIGINTERN int
_wrap_netpgp_t_pubring_set(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])1995 _wrap_netpgp_t_pubring_set(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1996   netpgp_t *arg1 = (netpgp_t *) 0 ;
1997   void *arg2 = (void *) 0 ;
1998   void *argp1 = 0 ;
1999   int res1 = 0 ;
2000   int res2 ;
2001 
2002   if (SWIG_GetArgs(interp, objc, objv,"oo:netpgp_t_pubring_set self pubring ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2003   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2004   if (!SWIG_IsOK(res1)) {
2005     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_pubring_set" "', argument " "1"" of type '" "netpgp_t *""'");
2006   }
2007   arg1 = (netpgp_t *)(argp1);
2008   res2 = SWIG_ConvertPtr(objv[2],SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
2009   if (!SWIG_IsOK(res2)) {
2010     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_t_pubring_set" "', argument " "2"" of type '" "void *""'");
2011   }
2012   if (arg1) (arg1)->pubring = arg2;
2013 
2014 
2015   return TCL_OK;
2016 fail:
2017   return TCL_ERROR;
2018 }
2019 
2020 
2021 SWIGINTERN int
_wrap_netpgp_t_pubring_get(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2022 _wrap_netpgp_t_pubring_get(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2023   netpgp_t *arg1 = (netpgp_t *) 0 ;
2024   void *result = 0 ;
2025   void *argp1 = 0 ;
2026   int res1 = 0 ;
2027 
2028   if (SWIG_GetArgs(interp, objc, objv,"o:netpgp_t_pubring_get self ",(void *)0) == TCL_ERROR) SWIG_fail;
2029   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2030   if (!SWIG_IsOK(res1)) {
2031     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_pubring_get" "', argument " "1"" of type '" "netpgp_t *""'");
2032   }
2033   arg1 = (netpgp_t *)(argp1);
2034   result = (void *) ((arg1)->pubring);
2035   Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_void,0));
2036   return TCL_OK;
2037 fail:
2038   return TCL_ERROR;
2039 }
2040 
2041 
2042 SWIGINTERN int
_wrap_netpgp_t_secring_set(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2043 _wrap_netpgp_t_secring_set(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2044   netpgp_t *arg1 = (netpgp_t *) 0 ;
2045   void *arg2 = (void *) 0 ;
2046   void *argp1 = 0 ;
2047   int res1 = 0 ;
2048   int res2 ;
2049 
2050   if (SWIG_GetArgs(interp, objc, objv,"oo:netpgp_t_secring_set self secring ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2051   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2052   if (!SWIG_IsOK(res1)) {
2053     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_secring_set" "', argument " "1"" of type '" "netpgp_t *""'");
2054   }
2055   arg1 = (netpgp_t *)(argp1);
2056   res2 = SWIG_ConvertPtr(objv[2],SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
2057   if (!SWIG_IsOK(res2)) {
2058     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_t_secring_set" "', argument " "2"" of type '" "void *""'");
2059   }
2060   if (arg1) (arg1)->secring = arg2;
2061 
2062 
2063   return TCL_OK;
2064 fail:
2065   return TCL_ERROR;
2066 }
2067 
2068 
2069 SWIGINTERN int
_wrap_netpgp_t_secring_get(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2070 _wrap_netpgp_t_secring_get(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2071   netpgp_t *arg1 = (netpgp_t *) 0 ;
2072   void *result = 0 ;
2073   void *argp1 = 0 ;
2074   int res1 = 0 ;
2075 
2076   if (SWIG_GetArgs(interp, objc, objv,"o:netpgp_t_secring_get self ",(void *)0) == TCL_ERROR) SWIG_fail;
2077   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2078   if (!SWIG_IsOK(res1)) {
2079     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_secring_get" "', argument " "1"" of type '" "netpgp_t *""'");
2080   }
2081   arg1 = (netpgp_t *)(argp1);
2082   result = (void *) ((arg1)->secring);
2083   Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_void,0));
2084   return TCL_OK;
2085 fail:
2086   return TCL_ERROR;
2087 }
2088 
2089 
2090 SWIGINTERN int
_wrap_netpgp_t_io_set(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2091 _wrap_netpgp_t_io_set(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2092   netpgp_t *arg1 = (netpgp_t *) 0 ;
2093   void *arg2 = (void *) 0 ;
2094   void *argp1 = 0 ;
2095   int res1 = 0 ;
2096   int res2 ;
2097 
2098   if (SWIG_GetArgs(interp, objc, objv,"oo:netpgp_t_io_set self io ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2099   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2100   if (!SWIG_IsOK(res1)) {
2101     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_io_set" "', argument " "1"" of type '" "netpgp_t *""'");
2102   }
2103   arg1 = (netpgp_t *)(argp1);
2104   res2 = SWIG_ConvertPtr(objv[2],SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
2105   if (!SWIG_IsOK(res2)) {
2106     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_t_io_set" "', argument " "2"" of type '" "void *""'");
2107   }
2108   if (arg1) (arg1)->io = arg2;
2109 
2110 
2111   return TCL_OK;
2112 fail:
2113   return TCL_ERROR;
2114 }
2115 
2116 
2117 SWIGINTERN int
_wrap_netpgp_t_io_get(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2118 _wrap_netpgp_t_io_get(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2119   netpgp_t *arg1 = (netpgp_t *) 0 ;
2120   void *result = 0 ;
2121   void *argp1 = 0 ;
2122   int res1 = 0 ;
2123 
2124   if (SWIG_GetArgs(interp, objc, objv,"o:netpgp_t_io_get self ",(void *)0) == TCL_ERROR) SWIG_fail;
2125   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2126   if (!SWIG_IsOK(res1)) {
2127     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_io_get" "', argument " "1"" of type '" "netpgp_t *""'");
2128   }
2129   arg1 = (netpgp_t *)(argp1);
2130   result = (void *) ((arg1)->io);
2131   Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_void,0));
2132   return TCL_OK;
2133 fail:
2134   return TCL_ERROR;
2135 }
2136 
2137 
2138 SWIGINTERN int
_wrap_netpgp_t_passfp_set(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2139 _wrap_netpgp_t_passfp_set(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2140   netpgp_t *arg1 = (netpgp_t *) 0 ;
2141   void *arg2 = (void *) 0 ;
2142   void *argp1 = 0 ;
2143   int res1 = 0 ;
2144   int res2 ;
2145 
2146   if (SWIG_GetArgs(interp, objc, objv,"oo:netpgp_t_passfp_set self passfp ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2147   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2148   if (!SWIG_IsOK(res1)) {
2149     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_passfp_set" "', argument " "1"" of type '" "netpgp_t *""'");
2150   }
2151   arg1 = (netpgp_t *)(argp1);
2152   res2 = SWIG_ConvertPtr(objv[2],SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
2153   if (!SWIG_IsOK(res2)) {
2154     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_t_passfp_set" "', argument " "2"" of type '" "void *""'");
2155   }
2156   if (arg1) (arg1)->passfp = arg2;
2157 
2158 
2159   return TCL_OK;
2160 fail:
2161   return TCL_ERROR;
2162 }
2163 
2164 
2165 SWIGINTERN int
_wrap_netpgp_t_passfp_get(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2166 _wrap_netpgp_t_passfp_get(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2167   netpgp_t *arg1 = (netpgp_t *) 0 ;
2168   void *result = 0 ;
2169   void *argp1 = 0 ;
2170   int res1 = 0 ;
2171 
2172   if (SWIG_GetArgs(interp, objc, objv,"o:netpgp_t_passfp_get self ",(void *)0) == TCL_ERROR) SWIG_fail;
2173   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2174   if (!SWIG_IsOK(res1)) {
2175     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_t_passfp_get" "', argument " "1"" of type '" "netpgp_t *""'");
2176   }
2177   arg1 = (netpgp_t *)(argp1);
2178   result = (void *) ((arg1)->passfp);
2179   Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_void,0));
2180   return TCL_OK;
2181 fail:
2182   return TCL_ERROR;
2183 }
2184 
2185 
2186 SWIGINTERN int
_wrap_new_netpgp_t(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2187 _wrap_new_netpgp_t(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2188   netpgp_t *result = 0 ;
2189 
2190   if (SWIG_GetArgs(interp, objc, objv,":new_netpgp_t ") == TCL_ERROR) SWIG_fail;
2191   result = (netpgp_t *)(netpgp_t *) calloc(1, sizeof(netpgp_t));
2192   Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_netpgp_t,0));
2193   return TCL_OK;
2194 fail:
2195   return TCL_ERROR;
2196 }
2197 
2198 
2199 SWIGINTERN int
_wrap_delete_netpgp_t(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2200 _wrap_delete_netpgp_t(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2201   netpgp_t *arg1 = (netpgp_t *) 0 ;
2202   void *argp1 = 0 ;
2203   int res1 = 0 ;
2204 
2205   if (SWIG_GetArgs(interp, objc, objv,"o:delete_netpgp_t self ",(void *)0) == TCL_ERROR) SWIG_fail;
2206   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, SWIG_POINTER_DISOWN |  0 );
2207   if (!SWIG_IsOK(res1)) {
2208     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_netpgp_t" "', argument " "1"" of type '" "netpgp_t *""'");
2209   }
2210   arg1 = (netpgp_t *)(argp1);
2211   free((char *) arg1);
2212 
2213 
2214   return TCL_OK;
2215 fail:
2216   return TCL_ERROR;
2217 }
2218 
2219 
swig_delete_netpgp_t(void * obj)2220 SWIGINTERN void swig_delete_netpgp_t(void *obj) {
2221 netpgp_t *arg1 = (netpgp_t *) obj;
2222 free((char *) arg1);
2223 }
2224 static swig_method swig_netpgp_t_methods[] = {
2225     {0,0}
2226 };
2227 static swig_attribute swig_netpgp_t_attributes[] = {
2228     { "-c",_wrap_netpgp_t_c_get, _wrap_netpgp_t_c_set},
2229     { "-size",_wrap_netpgp_t_size_get, _wrap_netpgp_t_size_set},
2230     { "-name",_wrap_netpgp_t_name_get, _wrap_netpgp_t_name_set},
2231     { "-value",_wrap_netpgp_t_value_get, _wrap_netpgp_t_value_set},
2232     { "-pubring",_wrap_netpgp_t_pubring_get, _wrap_netpgp_t_pubring_set},
2233     { "-secring",_wrap_netpgp_t_secring_get, _wrap_netpgp_t_secring_set},
2234     { "-io",_wrap_netpgp_t_io_get, _wrap_netpgp_t_io_set},
2235     { "-passfp",_wrap_netpgp_t_passfp_get, _wrap_netpgp_t_passfp_set},
2236     {0,0,0}
2237 };
2238 static swig_class *swig_netpgp_t_bases[] = {0};
2239 static char *swig_netpgp_t_base_names[] = {0};
2240 static swig_class _wrap_class_netpgp_t = { "netpgp_t", &SWIGTYPE_p_netpgp_t,_wrap_new_netpgp_t, swig_delete_netpgp_t, swig_netpgp_t_methods, swig_netpgp_t_attributes, swig_netpgp_t_bases,swig_netpgp_t_base_names, &swig_module };
2241 SWIGINTERN int
_wrap_netpgp_init(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2242 _wrap_netpgp_init(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2243   netpgp_t *arg1 = (netpgp_t *) 0 ;
2244   int result;
2245   void *argp1 = 0 ;
2246   int res1 = 0 ;
2247 
2248   if (SWIG_GetArgs(interp, objc, objv,"o:netpgp_init netpgp_t * ",(void *)0) == TCL_ERROR) SWIG_fail;
2249   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2250   if (!SWIG_IsOK(res1)) {
2251     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_init" "', argument " "1"" of type '" "netpgp_t *""'");
2252   }
2253   arg1 = (netpgp_t *)(argp1);
2254   result = (int)netpgp_init(arg1);
2255   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2256   return TCL_OK;
2257 fail:
2258   return TCL_ERROR;
2259 }
2260 
2261 
2262 SWIGINTERN int
_wrap_netpgp_end(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2263 _wrap_netpgp_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2264   netpgp_t *arg1 = (netpgp_t *) 0 ;
2265   int result;
2266   void *argp1 = 0 ;
2267   int res1 = 0 ;
2268 
2269   if (SWIG_GetArgs(interp, objc, objv,"o:netpgp_end netpgp_t * ",(void *)0) == TCL_ERROR) SWIG_fail;
2270   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2271   if (!SWIG_IsOK(res1)) {
2272     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_end" "', argument " "1"" of type '" "netpgp_t *""'");
2273   }
2274   arg1 = (netpgp_t *)(argp1);
2275   result = (int)netpgp_end(arg1);
2276   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2277   return TCL_OK;
2278 fail:
2279   return TCL_ERROR;
2280 }
2281 
2282 
2283 SWIGINTERN int
_wrap_netpgp_set_debug(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2284 _wrap_netpgp_set_debug(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2285   char *arg1 = (char *) 0 ;
2286   int result;
2287   int res1 ;
2288   char *buf1 = 0 ;
2289   int alloc1 = 0 ;
2290 
2291   if (SWIG_GetArgs(interp, objc, objv,"o:netpgp_set_debug char const * ",(void *)0) == TCL_ERROR) SWIG_fail;
2292   res1 = SWIG_AsCharPtrAndSize(objv[1], &buf1, NULL, &alloc1);
2293   if (!SWIG_IsOK(res1)) {
2294     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_set_debug" "', argument " "1"" of type '" "char const *""'");
2295   }
2296   arg1 = (char *)(buf1);
2297   result = (int)netpgp_set_debug((char const *)arg1);
2298   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2299   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2300   return TCL_OK;
2301 fail:
2302   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2303   return TCL_ERROR;
2304 }
2305 
2306 
2307 SWIGINTERN int
_wrap_netpgp_get_debug(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2308 _wrap_netpgp_get_debug(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2309   char *arg1 = (char *) 0 ;
2310   int result;
2311   int res1 ;
2312   char *buf1 = 0 ;
2313   int alloc1 = 0 ;
2314 
2315   if (SWIG_GetArgs(interp, objc, objv,"o:netpgp_get_debug char const * ",(void *)0) == TCL_ERROR) SWIG_fail;
2316   res1 = SWIG_AsCharPtrAndSize(objv[1], &buf1, NULL, &alloc1);
2317   if (!SWIG_IsOK(res1)) {
2318     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_get_debug" "', argument " "1"" of type '" "char const *""'");
2319   }
2320   arg1 = (char *)(buf1);
2321   result = (int)netpgp_get_debug((char const *)arg1);
2322   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2323   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2324   return TCL_OK;
2325 fail:
2326   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2327   return TCL_ERROR;
2328 }
2329 
2330 
2331 SWIGINTERN int
_wrap_netpgp_get_info(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2332 _wrap_netpgp_get_info(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2333   char *arg1 = (char *) 0 ;
2334   char *result = 0 ;
2335   int res1 ;
2336   char *buf1 = 0 ;
2337   int alloc1 = 0 ;
2338 
2339   if (SWIG_GetArgs(interp, objc, objv,"o:netpgp_get_info char const * ",(void *)0) == TCL_ERROR) SWIG_fail;
2340   res1 = SWIG_AsCharPtrAndSize(objv[1], &buf1, NULL, &alloc1);
2341   if (!SWIG_IsOK(res1)) {
2342     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_get_info" "', argument " "1"" of type '" "char const *""'");
2343   }
2344   arg1 = (char *)(buf1);
2345   result = (char *)netpgp_get_info((char const *)arg1);
2346   Tcl_SetObjResult(interp,SWIG_FromCharPtr((const char *)result));
2347   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2348   return TCL_OK;
2349 fail:
2350   if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2351   return TCL_ERROR;
2352 }
2353 
2354 
2355 SWIGINTERN int
_wrap_netpgp_list_packets(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2356 _wrap_netpgp_list_packets(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2357   netpgp_t *arg1 = (netpgp_t *) 0 ;
2358   char *arg2 = (char *) 0 ;
2359   int arg3 ;
2360   char *arg4 = (char *) 0 ;
2361   int result;
2362   void *argp1 = 0 ;
2363   int res1 = 0 ;
2364   int res2 ;
2365   char *buf2 = 0 ;
2366   int alloc2 = 0 ;
2367   int val3 ;
2368   int ecode3 = 0 ;
2369   int res4 ;
2370   char *buf4 = 0 ;
2371   int alloc4 = 0 ;
2372 
2373   if (SWIG_GetArgs(interp, objc, objv,"oooo:netpgp_list_packets netpgp_t * char * int char * ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2374   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2375   if (!SWIG_IsOK(res1)) {
2376     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_list_packets" "', argument " "1"" of type '" "netpgp_t *""'");
2377   }
2378   arg1 = (netpgp_t *)(argp1);
2379   res2 = SWIG_AsCharPtrAndSize(objv[2], &buf2, NULL, &alloc2);
2380   if (!SWIG_IsOK(res2)) {
2381     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_list_packets" "', argument " "2"" of type '" "char *""'");
2382   }
2383   arg2 = (char *)(buf2);
2384   ecode3 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
2385   if (!SWIG_IsOK(ecode3)) {
2386     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "netpgp_list_packets" "', argument " "3"" of type '" "int""'");
2387   }
2388   arg3 = (int)(val3);
2389   res4 = SWIG_AsCharPtrAndSize(objv[4], &buf4, NULL, &alloc4);
2390   if (!SWIG_IsOK(res4)) {
2391     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "netpgp_list_packets" "', argument " "4"" of type '" "char *""'");
2392   }
2393   arg4 = (char *)(buf4);
2394   result = (int)netpgp_list_packets(arg1,arg2,arg3,arg4);
2395   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2396   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2397   if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2398   return TCL_OK;
2399 fail:
2400   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2401   if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2402   return TCL_ERROR;
2403 }
2404 
2405 
2406 SWIGINTERN int
_wrap_netpgp_setvar(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2407 _wrap_netpgp_setvar(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2408   netpgp_t *arg1 = (netpgp_t *) 0 ;
2409   char *arg2 = (char *) 0 ;
2410   char *arg3 = (char *) 0 ;
2411   int result;
2412   void *argp1 = 0 ;
2413   int res1 = 0 ;
2414   int res2 ;
2415   char *buf2 = 0 ;
2416   int alloc2 = 0 ;
2417   int res3 ;
2418   char *buf3 = 0 ;
2419   int alloc3 = 0 ;
2420 
2421   if (SWIG_GetArgs(interp, objc, objv,"ooo:netpgp_setvar netpgp_t * char const * char const * ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2422   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2423   if (!SWIG_IsOK(res1)) {
2424     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_setvar" "', argument " "1"" of type '" "netpgp_t *""'");
2425   }
2426   arg1 = (netpgp_t *)(argp1);
2427   res2 = SWIG_AsCharPtrAndSize(objv[2], &buf2, NULL, &alloc2);
2428   if (!SWIG_IsOK(res2)) {
2429     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_setvar" "', argument " "2"" of type '" "char const *""'");
2430   }
2431   arg2 = (char *)(buf2);
2432   res3 = SWIG_AsCharPtrAndSize(objv[3], &buf3, NULL, &alloc3);
2433   if (!SWIG_IsOK(res3)) {
2434     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_setvar" "', argument " "3"" of type '" "char const *""'");
2435   }
2436   arg3 = (char *)(buf3);
2437   result = (int)netpgp_setvar(arg1,(char const *)arg2,(char const *)arg3);
2438   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2439   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2440   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2441   return TCL_OK;
2442 fail:
2443   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2444   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2445   return TCL_ERROR;
2446 }
2447 
2448 
2449 SWIGINTERN int
_wrap_netpgp_getvar(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2450 _wrap_netpgp_getvar(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2451   netpgp_t *arg1 = (netpgp_t *) 0 ;
2452   char *arg2 = (char *) 0 ;
2453   char *result = 0 ;
2454   void *argp1 = 0 ;
2455   int res1 = 0 ;
2456   int res2 ;
2457   char *buf2 = 0 ;
2458   int alloc2 = 0 ;
2459 
2460   if (SWIG_GetArgs(interp, objc, objv,"oo:netpgp_getvar netpgp_t * char const * ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2461   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2462   if (!SWIG_IsOK(res1)) {
2463     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_getvar" "', argument " "1"" of type '" "netpgp_t *""'");
2464   }
2465   arg1 = (netpgp_t *)(argp1);
2466   res2 = SWIG_AsCharPtrAndSize(objv[2], &buf2, NULL, &alloc2);
2467   if (!SWIG_IsOK(res2)) {
2468     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_getvar" "', argument " "2"" of type '" "char const *""'");
2469   }
2470   arg2 = (char *)(buf2);
2471   result = (char *)netpgp_getvar(arg1,(char const *)arg2);
2472   Tcl_SetObjResult(interp,SWIG_FromCharPtr((const char *)result));
2473   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2474   return TCL_OK;
2475 fail:
2476   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2477   return TCL_ERROR;
2478 }
2479 
2480 
2481 SWIGINTERN int
_wrap_netpgp_list_keys(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2482 _wrap_netpgp_list_keys(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2483   netpgp_t *arg1 = (netpgp_t *) 0 ;
2484   int result;
2485   void *argp1 = 0 ;
2486   int res1 = 0 ;
2487 
2488   if (SWIG_GetArgs(interp, objc, objv,"o:netpgp_list_keys netpgp_t * ",(void *)0) == TCL_ERROR) SWIG_fail;
2489   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2490   if (!SWIG_IsOK(res1)) {
2491     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_list_keys" "', argument " "1"" of type '" "netpgp_t *""'");
2492   }
2493   arg1 = (netpgp_t *)(argp1);
2494   result = (int)netpgp_list_keys(arg1);
2495   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2496   return TCL_OK;
2497 fail:
2498   return TCL_ERROR;
2499 }
2500 
2501 
2502 SWIGINTERN int
_wrap_netpgp_list_sigs(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2503 _wrap_netpgp_list_sigs(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2504   netpgp_t *arg1 = (netpgp_t *) 0 ;
2505   char *arg2 = (char *) 0 ;
2506   int result;
2507   void *argp1 = 0 ;
2508   int res1 = 0 ;
2509   int res2 ;
2510   char *buf2 = 0 ;
2511   int alloc2 = 0 ;
2512 
2513   if (SWIG_GetArgs(interp, objc, objv,"oo:netpgp_list_sigs netpgp_t * char const * ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2514   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2515   if (!SWIG_IsOK(res1)) {
2516     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_list_sigs" "', argument " "1"" of type '" "netpgp_t *""'");
2517   }
2518   arg1 = (netpgp_t *)(argp1);
2519   res2 = SWIG_AsCharPtrAndSize(objv[2], &buf2, NULL, &alloc2);
2520   if (!SWIG_IsOK(res2)) {
2521     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_list_sigs" "', argument " "2"" of type '" "char const *""'");
2522   }
2523   arg2 = (char *)(buf2);
2524   result = (int)netpgp_list_sigs(arg1,(char const *)arg2);
2525   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2526   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2527   return TCL_OK;
2528 fail:
2529   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2530   return TCL_ERROR;
2531 }
2532 
2533 
2534 SWIGINTERN int
_wrap_netpgp_find_key(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2535 _wrap_netpgp_find_key(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2536   netpgp_t *arg1 = (netpgp_t *) 0 ;
2537   char *arg2 = (char *) 0 ;
2538   int result;
2539   void *argp1 = 0 ;
2540   int res1 = 0 ;
2541   int res2 ;
2542   char *buf2 = 0 ;
2543   int alloc2 = 0 ;
2544 
2545   if (SWIG_GetArgs(interp, objc, objv,"oo:netpgp_find_key netpgp_t * char * ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2546   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2547   if (!SWIG_IsOK(res1)) {
2548     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_find_key" "', argument " "1"" of type '" "netpgp_t *""'");
2549   }
2550   arg1 = (netpgp_t *)(argp1);
2551   res2 = SWIG_AsCharPtrAndSize(objv[2], &buf2, NULL, &alloc2);
2552   if (!SWIG_IsOK(res2)) {
2553     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_find_key" "', argument " "2"" of type '" "char *""'");
2554   }
2555   arg2 = (char *)(buf2);
2556   result = (int)netpgp_find_key(arg1,arg2);
2557   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2558   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2559   return TCL_OK;
2560 fail:
2561   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2562   return TCL_ERROR;
2563 }
2564 
2565 
2566 SWIGINTERN int
_wrap_netpgp_get_key(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2567 _wrap_netpgp_get_key(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2568   netpgp_t *arg1 = (netpgp_t *) 0 ;
2569   char *arg2 = (char *) 0 ;
2570   char *result = 0 ;
2571   void *argp1 = 0 ;
2572   int res1 = 0 ;
2573   int res2 ;
2574   char *buf2 = 0 ;
2575   int alloc2 = 0 ;
2576 
2577   if (SWIG_GetArgs(interp, objc, objv,"oo:netpgp_get_key netpgp_t * char const * ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2578   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2579   if (!SWIG_IsOK(res1)) {
2580     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_get_key" "', argument " "1"" of type '" "netpgp_t *""'");
2581   }
2582   arg1 = (netpgp_t *)(argp1);
2583   res2 = SWIG_AsCharPtrAndSize(objv[2], &buf2, NULL, &alloc2);
2584   if (!SWIG_IsOK(res2)) {
2585     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_get_key" "', argument " "2"" of type '" "char const *""'");
2586   }
2587   arg2 = (char *)(buf2);
2588   result = (char *)netpgp_get_key(arg1,(char const *)arg2);
2589   Tcl_SetObjResult(interp,SWIG_FromCharPtr((const char *)result));
2590   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2591   return TCL_OK;
2592 fail:
2593   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2594   return TCL_ERROR;
2595 }
2596 
2597 
2598 SWIGINTERN int
_wrap_netpgp_export_key(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2599 _wrap_netpgp_export_key(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2600   netpgp_t *arg1 = (netpgp_t *) 0 ;
2601   char *arg2 = (char *) 0 ;
2602   int result;
2603   void *argp1 = 0 ;
2604   int res1 = 0 ;
2605   int res2 ;
2606   char *buf2 = 0 ;
2607   int alloc2 = 0 ;
2608 
2609   if (SWIG_GetArgs(interp, objc, objv,"oo:netpgp_export_key netpgp_t * char * ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2610   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2611   if (!SWIG_IsOK(res1)) {
2612     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_export_key" "', argument " "1"" of type '" "netpgp_t *""'");
2613   }
2614   arg1 = (netpgp_t *)(argp1);
2615   res2 = SWIG_AsCharPtrAndSize(objv[2], &buf2, NULL, &alloc2);
2616   if (!SWIG_IsOK(res2)) {
2617     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_export_key" "', argument " "2"" of type '" "char *""'");
2618   }
2619   arg2 = (char *)(buf2);
2620   result = (int)netpgp_export_key(arg1,arg2);
2621   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2622   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2623   return TCL_OK;
2624 fail:
2625   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2626   return TCL_ERROR;
2627 }
2628 
2629 
2630 SWIGINTERN int
_wrap_netpgp_import_key(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2631 _wrap_netpgp_import_key(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2632   netpgp_t *arg1 = (netpgp_t *) 0 ;
2633   char *arg2 = (char *) 0 ;
2634   int result;
2635   void *argp1 = 0 ;
2636   int res1 = 0 ;
2637   int res2 ;
2638   char *buf2 = 0 ;
2639   int alloc2 = 0 ;
2640 
2641   if (SWIG_GetArgs(interp, objc, objv,"oo:netpgp_import_key netpgp_t * char * ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2642   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2643   if (!SWIG_IsOK(res1)) {
2644     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_import_key" "', argument " "1"" of type '" "netpgp_t *""'");
2645   }
2646   arg1 = (netpgp_t *)(argp1);
2647   res2 = SWIG_AsCharPtrAndSize(objv[2], &buf2, NULL, &alloc2);
2648   if (!SWIG_IsOK(res2)) {
2649     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_import_key" "', argument " "2"" of type '" "char *""'");
2650   }
2651   arg2 = (char *)(buf2);
2652   result = (int)netpgp_import_key(arg1,arg2);
2653   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2654   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2655   return TCL_OK;
2656 fail:
2657   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2658   return TCL_ERROR;
2659 }
2660 
2661 
2662 SWIGINTERN int
_wrap_netpgp_generate_key(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2663 _wrap_netpgp_generate_key(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2664   netpgp_t *arg1 = (netpgp_t *) 0 ;
2665   char *arg2 = (char *) 0 ;
2666   int arg3 ;
2667   int result;
2668   void *argp1 = 0 ;
2669   int res1 = 0 ;
2670   int res2 ;
2671   char *buf2 = 0 ;
2672   int alloc2 = 0 ;
2673   int val3 ;
2674   int ecode3 = 0 ;
2675 
2676   if (SWIG_GetArgs(interp, objc, objv,"ooo:netpgp_generate_key netpgp_t * char * int ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2677   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2678   if (!SWIG_IsOK(res1)) {
2679     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_generate_key" "', argument " "1"" of type '" "netpgp_t *""'");
2680   }
2681   arg1 = (netpgp_t *)(argp1);
2682   res2 = SWIG_AsCharPtrAndSize(objv[2], &buf2, NULL, &alloc2);
2683   if (!SWIG_IsOK(res2)) {
2684     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_generate_key" "', argument " "2"" of type '" "char *""'");
2685   }
2686   arg2 = (char *)(buf2);
2687   ecode3 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
2688   if (!SWIG_IsOK(ecode3)) {
2689     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "netpgp_generate_key" "', argument " "3"" of type '" "int""'");
2690   }
2691   arg3 = (int)(val3);
2692   result = (int)netpgp_generate_key(arg1,arg2,arg3);
2693   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2694   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2695   return TCL_OK;
2696 fail:
2697   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2698   return TCL_ERROR;
2699 }
2700 
2701 
2702 SWIGINTERN int
_wrap_netpgp_encrypt_file(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2703 _wrap_netpgp_encrypt_file(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2704   netpgp_t *arg1 = (netpgp_t *) 0 ;
2705   char *arg2 = (char *) 0 ;
2706   char *arg3 = (char *) 0 ;
2707   char *arg4 = (char *) 0 ;
2708   int arg5 ;
2709   int result;
2710   void *argp1 = 0 ;
2711   int res1 = 0 ;
2712   int res2 ;
2713   char *buf2 = 0 ;
2714   int alloc2 = 0 ;
2715   int res3 ;
2716   char *buf3 = 0 ;
2717   int alloc3 = 0 ;
2718   int res4 ;
2719   char *buf4 = 0 ;
2720   int alloc4 = 0 ;
2721   int val5 ;
2722   int ecode5 = 0 ;
2723 
2724   if (SWIG_GetArgs(interp, objc, objv,"ooooo:netpgp_encrypt_file netpgp_t * char const * char const * char * int ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2725   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2726   if (!SWIG_IsOK(res1)) {
2727     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_encrypt_file" "', argument " "1"" of type '" "netpgp_t *""'");
2728   }
2729   arg1 = (netpgp_t *)(argp1);
2730   res2 = SWIG_AsCharPtrAndSize(objv[2], &buf2, NULL, &alloc2);
2731   if (!SWIG_IsOK(res2)) {
2732     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_encrypt_file" "', argument " "2"" of type '" "char const *""'");
2733   }
2734   arg2 = (char *)(buf2);
2735   res3 = SWIG_AsCharPtrAndSize(objv[3], &buf3, NULL, &alloc3);
2736   if (!SWIG_IsOK(res3)) {
2737     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_encrypt_file" "', argument " "3"" of type '" "char const *""'");
2738   }
2739   arg3 = (char *)(buf3);
2740   res4 = SWIG_AsCharPtrAndSize(objv[4], &buf4, NULL, &alloc4);
2741   if (!SWIG_IsOK(res4)) {
2742     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "netpgp_encrypt_file" "', argument " "4"" of type '" "char *""'");
2743   }
2744   arg4 = (char *)(buf4);
2745   ecode5 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[5], &val5);
2746   if (!SWIG_IsOK(ecode5)) {
2747     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "netpgp_encrypt_file" "', argument " "5"" of type '" "int""'");
2748   }
2749   arg5 = (int)(val5);
2750   result = (int)netpgp_encrypt_file(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
2751   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2752   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2753   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2754   if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2755   return TCL_OK;
2756 fail:
2757   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2758   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2759   if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2760   return TCL_ERROR;
2761 }
2762 
2763 
2764 SWIGINTERN int
_wrap_netpgp_decrypt_file(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2765 _wrap_netpgp_decrypt_file(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2766   netpgp_t *arg1 = (netpgp_t *) 0 ;
2767   char *arg2 = (char *) 0 ;
2768   char *arg3 = (char *) 0 ;
2769   int arg4 ;
2770   int result;
2771   void *argp1 = 0 ;
2772   int res1 = 0 ;
2773   int res2 ;
2774   char *buf2 = 0 ;
2775   int alloc2 = 0 ;
2776   int res3 ;
2777   char *buf3 = 0 ;
2778   int alloc3 = 0 ;
2779   int val4 ;
2780   int ecode4 = 0 ;
2781 
2782   if (SWIG_GetArgs(interp, objc, objv,"oooo:netpgp_decrypt_file netpgp_t * char const * char * int ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2783   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2784   if (!SWIG_IsOK(res1)) {
2785     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_decrypt_file" "', argument " "1"" of type '" "netpgp_t *""'");
2786   }
2787   arg1 = (netpgp_t *)(argp1);
2788   res2 = SWIG_AsCharPtrAndSize(objv[2], &buf2, NULL, &alloc2);
2789   if (!SWIG_IsOK(res2)) {
2790     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_decrypt_file" "', argument " "2"" of type '" "char const *""'");
2791   }
2792   arg2 = (char *)(buf2);
2793   res3 = SWIG_AsCharPtrAndSize(objv[3], &buf3, NULL, &alloc3);
2794   if (!SWIG_IsOK(res3)) {
2795     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_decrypt_file" "', argument " "3"" of type '" "char *""'");
2796   }
2797   arg3 = (char *)(buf3);
2798   ecode4 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[4], &val4);
2799   if (!SWIG_IsOK(ecode4)) {
2800     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_decrypt_file" "', argument " "4"" of type '" "int""'");
2801   }
2802   arg4 = (int)(val4);
2803   result = (int)netpgp_decrypt_file(arg1,(char const *)arg2,arg3,arg4);
2804   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2805   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2806   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2807   return TCL_OK;
2808 fail:
2809   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2810   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2811   return TCL_ERROR;
2812 }
2813 
2814 
2815 SWIGINTERN int
_wrap_netpgp_sign_file(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2816 _wrap_netpgp_sign_file(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2817   netpgp_t *arg1 = (netpgp_t *) 0 ;
2818   char *arg2 = (char *) 0 ;
2819   char *arg3 = (char *) 0 ;
2820   char *arg4 = (char *) 0 ;
2821   int arg5 ;
2822   int arg6 ;
2823   int arg7 ;
2824   int result;
2825   void *argp1 = 0 ;
2826   int res1 = 0 ;
2827   int res2 ;
2828   char *buf2 = 0 ;
2829   int alloc2 = 0 ;
2830   int res3 ;
2831   char *buf3 = 0 ;
2832   int alloc3 = 0 ;
2833   int res4 ;
2834   char *buf4 = 0 ;
2835   int alloc4 = 0 ;
2836   int val5 ;
2837   int ecode5 = 0 ;
2838   int val6 ;
2839   int ecode6 = 0 ;
2840   int val7 ;
2841   int ecode7 = 0 ;
2842 
2843   if (SWIG_GetArgs(interp, objc, objv,"ooooooo:netpgp_sign_file netpgp_t * char const * char const * char * int int int ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2844   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2845   if (!SWIG_IsOK(res1)) {
2846     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_sign_file" "', argument " "1"" of type '" "netpgp_t *""'");
2847   }
2848   arg1 = (netpgp_t *)(argp1);
2849   res2 = SWIG_AsCharPtrAndSize(objv[2], &buf2, NULL, &alloc2);
2850   if (!SWIG_IsOK(res2)) {
2851     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_sign_file" "', argument " "2"" of type '" "char const *""'");
2852   }
2853   arg2 = (char *)(buf2);
2854   res3 = SWIG_AsCharPtrAndSize(objv[3], &buf3, NULL, &alloc3);
2855   if (!SWIG_IsOK(res3)) {
2856     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_sign_file" "', argument " "3"" of type '" "char const *""'");
2857   }
2858   arg3 = (char *)(buf3);
2859   res4 = SWIG_AsCharPtrAndSize(objv[4], &buf4, NULL, &alloc4);
2860   if (!SWIG_IsOK(res4)) {
2861     SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "netpgp_sign_file" "', argument " "4"" of type '" "char *""'");
2862   }
2863   arg4 = (char *)(buf4);
2864   ecode5 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[5], &val5);
2865   if (!SWIG_IsOK(ecode5)) {
2866     SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "netpgp_sign_file" "', argument " "5"" of type '" "int""'");
2867   }
2868   arg5 = (int)(val5);
2869   ecode6 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[6], &val6);
2870   if (!SWIG_IsOK(ecode6)) {
2871     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "netpgp_sign_file" "', argument " "6"" of type '" "int""'");
2872   }
2873   arg6 = (int)(val6);
2874   ecode7 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[7], &val7);
2875   if (!SWIG_IsOK(ecode7)) {
2876     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "netpgp_sign_file" "', argument " "7"" of type '" "int""'");
2877   }
2878   arg7 = (int)(val7);
2879   result = (int)netpgp_sign_file(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7);
2880   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2881   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2882   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2883   if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2884   return TCL_OK;
2885 fail:
2886   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2887   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2888   if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2889   return TCL_ERROR;
2890 }
2891 
2892 
2893 SWIGINTERN int
_wrap_netpgp_verify_file(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2894 _wrap_netpgp_verify_file(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2895   netpgp_t *arg1 = (netpgp_t *) 0 ;
2896   char *arg2 = (char *) 0 ;
2897   char *arg3 = (char *) 0 ;
2898   int arg4 ;
2899   int result;
2900   void *argp1 = 0 ;
2901   int res1 = 0 ;
2902   int res2 ;
2903   char *buf2 = 0 ;
2904   int alloc2 = 0 ;
2905   int res3 ;
2906   char *buf3 = 0 ;
2907   int alloc3 = 0 ;
2908   int val4 ;
2909   int ecode4 = 0 ;
2910 
2911   if (SWIG_GetArgs(interp, objc, objv,"oooo:netpgp_verify_file netpgp_t * char const * char const * int ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2912   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2913   if (!SWIG_IsOK(res1)) {
2914     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_verify_file" "', argument " "1"" of type '" "netpgp_t *""'");
2915   }
2916   arg1 = (netpgp_t *)(argp1);
2917   res2 = SWIG_AsCharPtrAndSize(objv[2], &buf2, NULL, &alloc2);
2918   if (!SWIG_IsOK(res2)) {
2919     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_verify_file" "', argument " "2"" of type '" "char const *""'");
2920   }
2921   arg2 = (char *)(buf2);
2922   res3 = SWIG_AsCharPtrAndSize(objv[3], &buf3, NULL, &alloc3);
2923   if (!SWIG_IsOK(res3)) {
2924     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_verify_file" "', argument " "3"" of type '" "char const *""'");
2925   }
2926   arg3 = (char *)(buf3);
2927   ecode4 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[4], &val4);
2928   if (!SWIG_IsOK(ecode4)) {
2929     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_verify_file" "', argument " "4"" of type '" "int""'");
2930   }
2931   arg4 = (int)(val4);
2932   result = (int)netpgp_verify_file(arg1,(char const *)arg2,(char const *)arg3,arg4);
2933   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
2934   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2935   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2936   return TCL_OK;
2937 fail:
2938   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2939   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2940   return TCL_ERROR;
2941 }
2942 
2943 
2944 SWIGINTERN int
_wrap_netpgp_sign_memory(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])2945 _wrap_netpgp_sign_memory(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
2946   netpgp_t *arg1 = (netpgp_t *) 0 ;
2947   char *arg2 = (char *) 0 ;
2948   char *arg3 = (char *) 0 ;
2949   size_t arg4 ;
2950   char *arg5 = (char *) 0 ;
2951   size_t arg6 ;
2952   unsigned int arg7 ;
2953   unsigned int arg8 ;
2954   int result;
2955   void *argp1 = 0 ;
2956   int res1 = 0 ;
2957   int res2 ;
2958   char *buf2 = 0 ;
2959   int alloc2 = 0 ;
2960   int res3 ;
2961   char *buf3 = 0 ;
2962   int alloc3 = 0 ;
2963   size_t val4 ;
2964   int ecode4 = 0 ;
2965   int res5 ;
2966   char *buf5 = 0 ;
2967   int alloc5 = 0 ;
2968   size_t val6 ;
2969   int ecode6 = 0 ;
2970   unsigned int val7 ;
2971   int ecode7 = 0 ;
2972   unsigned int val8 ;
2973   int ecode8 = 0 ;
2974 
2975   if (SWIG_GetArgs(interp, objc, objv,"oooooooo:netpgp_sign_memory netpgp_t * char const * char * size_t char * size_t unsigned int const unsigned int const ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
2976   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
2977   if (!SWIG_IsOK(res1)) {
2978     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_sign_memory" "', argument " "1"" of type '" "netpgp_t *""'");
2979   }
2980   arg1 = (netpgp_t *)(argp1);
2981   res2 = SWIG_AsCharPtrAndSize(objv[2], &buf2, NULL, &alloc2);
2982   if (!SWIG_IsOK(res2)) {
2983     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_sign_memory" "', argument " "2"" of type '" "char const *""'");
2984   }
2985   arg2 = (char *)(buf2);
2986   res3 = SWIG_AsCharPtrAndSize(objv[3], &buf3, NULL, &alloc3);
2987   if (!SWIG_IsOK(res3)) {
2988     SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "netpgp_sign_memory" "', argument " "3"" of type '" "char *""'");
2989   }
2990   arg3 = (char *)(buf3);
2991   ecode4 = SWIG_AsVal_size_t SWIG_TCL_CALL_ARGS_2(objv[4], &val4);
2992   if (!SWIG_IsOK(ecode4)) {
2993     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_sign_memory" "', argument " "4"" of type '" "size_t""'");
2994   }
2995   arg4 = (size_t)(val4);
2996   res5 = SWIG_AsCharPtrAndSize(objv[5], &buf5, NULL, &alloc5);
2997   if (!SWIG_IsOK(res5)) {
2998     SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "netpgp_sign_memory" "', argument " "5"" of type '" "char *""'");
2999   }
3000   arg5 = (char *)(buf5);
3001   ecode6 = SWIG_AsVal_size_t SWIG_TCL_CALL_ARGS_2(objv[6], &val6);
3002   if (!SWIG_IsOK(ecode6)) {
3003     SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "netpgp_sign_memory" "', argument " "6"" of type '" "size_t""'");
3004   }
3005   arg6 = (size_t)(val6);
3006   ecode7 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[7], &val7);
3007   if (!SWIG_IsOK(ecode7)) {
3008     SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "netpgp_sign_memory" "', argument " "7"" of type '" "unsigned int""'");
3009   }
3010   arg7 = (unsigned int)(val7);
3011   ecode8 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[8], &val8);
3012   if (!SWIG_IsOK(ecode8)) {
3013     SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "netpgp_sign_memory" "', argument " "8"" of type '" "unsigned int""'");
3014   }
3015   arg8 = (unsigned int)(val8);
3016   result = (int)netpgp_sign_memory(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
3017   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
3018   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3019   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3020   if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
3021   return TCL_OK;
3022 fail:
3023   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
3024   if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
3025   if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
3026   return TCL_ERROR;
3027 }
3028 
3029 
3030 SWIGINTERN int
_wrap_netpgp_verify_memory(ClientData clientData SWIGUNUSED,Tcl_Interp * interp,int objc,Tcl_Obj * CONST objv[])3031 _wrap_netpgp_verify_memory(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
3032   netpgp_t *arg1 = (netpgp_t *) 0 ;
3033   void *arg2 = (void *) 0 ;
3034   size_t arg3 ;
3035   int arg4 ;
3036   int result;
3037   void *argp1 = 0 ;
3038   int res1 = 0 ;
3039   int res2 ;
3040   size_t val3 ;
3041   int ecode3 = 0 ;
3042   int val4 ;
3043   int ecode4 = 0 ;
3044 
3045   if (SWIG_GetArgs(interp, objc, objv,"oooo:netpgp_verify_memory netpgp_t * void const * size_t const int const ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
3046   res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_netpgp_t, 0 |  0 );
3047   if (!SWIG_IsOK(res1)) {
3048     SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "netpgp_verify_memory" "', argument " "1"" of type '" "netpgp_t *""'");
3049   }
3050   arg1 = (netpgp_t *)(argp1);
3051   res2 = SWIG_ConvertPtr(objv[2],SWIG_as_voidptrptr(&arg2), 0, 0);
3052   if (!SWIG_IsOK(res2)) {
3053     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "netpgp_verify_memory" "', argument " "2"" of type '" "void const *""'");
3054   }
3055   ecode3 = SWIG_AsVal_size_t SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
3056   if (!SWIG_IsOK(ecode3)) {
3057     SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "netpgp_verify_memory" "', argument " "3"" of type '" "size_t""'");
3058   }
3059   arg3 = (size_t)(val3);
3060   ecode4 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[4], &val4);
3061   if (!SWIG_IsOK(ecode4)) {
3062     SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "netpgp_verify_memory" "', argument " "4"" of type '" "int""'");
3063   }
3064   arg4 = (int)(val4);
3065   result = (int)netpgp_verify_memory(arg1,(void const *)arg2,arg3,arg4);
3066   Tcl_SetObjResult(interp,SWIG_From_int((int)(result)));
3067   return TCL_OK;
3068 fail:
3069   return TCL_ERROR;
3070 }
3071 
3072 
3073 
3074 static swig_command_info swig_commands[] = {
3075     { SWIG_prefix "netpgp_t_c_set", (swig_wrapper_func) _wrap_netpgp_t_c_set, NULL},
3076     { SWIG_prefix "netpgp_t_c_get", (swig_wrapper_func) _wrap_netpgp_t_c_get, NULL},
3077     { SWIG_prefix "netpgp_t_size_set", (swig_wrapper_func) _wrap_netpgp_t_size_set, NULL},
3078     { SWIG_prefix "netpgp_t_size_get", (swig_wrapper_func) _wrap_netpgp_t_size_get, NULL},
3079     { SWIG_prefix "netpgp_t_name_set", (swig_wrapper_func) _wrap_netpgp_t_name_set, NULL},
3080     { SWIG_prefix "netpgp_t_name_get", (swig_wrapper_func) _wrap_netpgp_t_name_get, NULL},
3081     { SWIG_prefix "netpgp_t_value_set", (swig_wrapper_func) _wrap_netpgp_t_value_set, NULL},
3082     { SWIG_prefix "netpgp_t_value_get", (swig_wrapper_func) _wrap_netpgp_t_value_get, NULL},
3083     { SWIG_prefix "netpgp_t_pubring_set", (swig_wrapper_func) _wrap_netpgp_t_pubring_set, NULL},
3084     { SWIG_prefix "netpgp_t_pubring_get", (swig_wrapper_func) _wrap_netpgp_t_pubring_get, NULL},
3085     { SWIG_prefix "netpgp_t_secring_set", (swig_wrapper_func) _wrap_netpgp_t_secring_set, NULL},
3086     { SWIG_prefix "netpgp_t_secring_get", (swig_wrapper_func) _wrap_netpgp_t_secring_get, NULL},
3087     { SWIG_prefix "netpgp_t_io_set", (swig_wrapper_func) _wrap_netpgp_t_io_set, NULL},
3088     { SWIG_prefix "netpgp_t_io_get", (swig_wrapper_func) _wrap_netpgp_t_io_get, NULL},
3089     { SWIG_prefix "netpgp_t_passfp_set", (swig_wrapper_func) _wrap_netpgp_t_passfp_set, NULL},
3090     { SWIG_prefix "netpgp_t_passfp_get", (swig_wrapper_func) _wrap_netpgp_t_passfp_get, NULL},
3091     { SWIG_prefix "new_netpgp_t", (swig_wrapper_func) _wrap_new_netpgp_t, NULL},
3092     { SWIG_prefix "delete_netpgp_t", (swig_wrapper_func) _wrap_delete_netpgp_t, NULL},
3093     { SWIG_prefix "netpgp_t", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_netpgp_t},
3094     { SWIG_prefix "netpgp_init", (swig_wrapper_func) _wrap_netpgp_init, NULL},
3095     { SWIG_prefix "netpgp_end", (swig_wrapper_func) _wrap_netpgp_end, NULL},
3096     { SWIG_prefix "netpgp_set_debug", (swig_wrapper_func) _wrap_netpgp_set_debug, NULL},
3097     { SWIG_prefix "netpgp_get_debug", (swig_wrapper_func) _wrap_netpgp_get_debug, NULL},
3098     { SWIG_prefix "netpgp_get_info", (swig_wrapper_func) _wrap_netpgp_get_info, NULL},
3099     { SWIG_prefix "netpgp_list_packets", (swig_wrapper_func) _wrap_netpgp_list_packets, NULL},
3100     { SWIG_prefix "netpgp_setvar", (swig_wrapper_func) _wrap_netpgp_setvar, NULL},
3101     { SWIG_prefix "netpgp_getvar", (swig_wrapper_func) _wrap_netpgp_getvar, NULL},
3102     { SWIG_prefix "netpgp_list_keys", (swig_wrapper_func) _wrap_netpgp_list_keys, NULL},
3103     { SWIG_prefix "netpgp_list_sigs", (swig_wrapper_func) _wrap_netpgp_list_sigs, NULL},
3104     { SWIG_prefix "netpgp_find_key", (swig_wrapper_func) _wrap_netpgp_find_key, NULL},
3105     { SWIG_prefix "netpgp_get_key", (swig_wrapper_func) _wrap_netpgp_get_key, NULL},
3106     { SWIG_prefix "netpgp_export_key", (swig_wrapper_func) _wrap_netpgp_export_key, NULL},
3107     { SWIG_prefix "netpgp_import_key", (swig_wrapper_func) _wrap_netpgp_import_key, NULL},
3108     { SWIG_prefix "netpgp_generate_key", (swig_wrapper_func) _wrap_netpgp_generate_key, NULL},
3109     { SWIG_prefix "netpgp_encrypt_file", (swig_wrapper_func) _wrap_netpgp_encrypt_file, NULL},
3110     { SWIG_prefix "netpgp_decrypt_file", (swig_wrapper_func) _wrap_netpgp_decrypt_file, NULL},
3111     { SWIG_prefix "netpgp_sign_file", (swig_wrapper_func) _wrap_netpgp_sign_file, NULL},
3112     { SWIG_prefix "netpgp_verify_file", (swig_wrapper_func) _wrap_netpgp_verify_file, NULL},
3113     { SWIG_prefix "netpgp_sign_memory", (swig_wrapper_func) _wrap_netpgp_sign_memory, NULL},
3114     { SWIG_prefix "netpgp_verify_memory", (swig_wrapper_func) _wrap_netpgp_verify_memory, NULL},
3115     {0, 0, 0}
3116 };
3117 
3118 static swig_var_info swig_variables[] = {
3119     {0,0,0,0}
3120 };
3121 
3122 static swig_const_info swig_constants[] = {
3123     {0,0,0,0,0,0}
3124 };
3125 
3126 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3127 
3128 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
3129 static swig_type_info _swigt__p_netpgp_t = {"_p_netpgp_t", "struct netpgp_t *|netpgp_t *", 0, 0, (void*)&_wrap_class_netpgp_t, 0};
3130 static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
3131 static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
3132 
3133 static swig_type_info *swig_type_initial[] = {
3134   &_swigt__p_char,
3135   &_swigt__p_netpgp_t,
3136   &_swigt__p_p_char,
3137   &_swigt__p_void,
3138 };
3139 
3140 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
3141 static swig_cast_info _swigc__p_netpgp_t[] = {  {&_swigt__p_netpgp_t, 0, 0, 0},{0, 0, 0, 0}};
3142 static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
3143 static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
3144 
3145 static swig_cast_info *swig_cast_initial[] = {
3146   _swigc__p_char,
3147   _swigc__p_netpgp_t,
3148   _swigc__p_p_char,
3149   _swigc__p_void,
3150 };
3151 
3152 
3153 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3154 
3155 #ifdef __cplusplus
3156 }
3157 #endif
3158 /* -----------------------------------------------------------------------------
3159  * Type initialization:
3160  * This problem is tough by the requirement that no dynamic
3161  * memory is used. Also, since swig_type_info structures store pointers to
3162  * swig_cast_info structures and swig_cast_info structures store pointers back
3163  * to swig_type_info structures, we need some lookup code at initialization.
3164  * The idea is that swig generates all the structures that are needed.
3165  * The runtime then collects these partially filled structures.
3166  * The SWIG_InitializeModule function takes these initial arrays out of
3167  * swig_module, and does all the lookup, filling in the swig_module.types
3168  * array with the correct data and linking the correct swig_cast_info
3169  * structures together.
3170  *
3171  * The generated swig_type_info structures are assigned staticly to an initial
3172  * array. We just loop through that array, and handle each type individually.
3173  * First we lookup if this type has been already loaded, and if so, use the
3174  * loaded structure instead of the generated one. Then we have to fill in the
3175  * cast linked list. The cast data is initially stored in something like a
3176  * two-dimensional array. Each row corresponds to a type (there are the same
3177  * number of rows as there are in the swig_type_initial array). Each entry in
3178  * a column is one of the swig_cast_info structures for that type.
3179  * The cast_initial array is actually an array of arrays, because each row has
3180  * a variable number of columns. So to actually build the cast linked list,
3181  * we find the array of casts associated with the type, and loop through it
3182  * adding the casts to the list. The one last trick we need to do is making
3183  * sure the type pointer in the swig_cast_info struct is correct.
3184  *
3185  * First off, we lookup the cast->type name to see if it is already loaded.
3186  * There are three cases to handle:
3187  *  1) If the cast->type has already been loaded AND the type we are adding
3188  *     casting info to has not been loaded (it is in this module), THEN we
3189  *     replace the cast->type pointer with the type pointer that has already
3190  *     been loaded.
3191  *  2) If BOTH types (the one we are adding casting info to, and the
3192  *     cast->type) are loaded, THEN the cast info has already been loaded by
3193  *     the previous module so we just ignore it.
3194  *  3) Finally, if cast->type has not already been loaded, then we add that
3195  *     swig_cast_info to the linked list (because the cast->type) pointer will
3196  *     be correct.
3197  * ----------------------------------------------------------------------------- */
3198 
3199 #ifdef __cplusplus
3200 extern "C" {
3201 #if 0
3202 } /* c-mode */
3203 #endif
3204 #endif
3205 
3206 #if 0
3207 #define SWIGRUNTIME_DEBUG
3208 #endif
3209 
3210 
3211 SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)3212 SWIG_InitializeModule(void *clientdata) {
3213   size_t i;
3214   swig_module_info *module_head, *iter;
3215   int found;
3216 
3217   clientdata = clientdata;
3218 
3219   /* check to see if the circular list has been setup, if not, set it up */
3220   if (swig_module.next==0) {
3221     /* Initialize the swig_module */
3222     swig_module.type_initial = swig_type_initial;
3223     swig_module.cast_initial = swig_cast_initial;
3224     swig_module.next = &swig_module;
3225   }
3226 
3227   /* Try and load any already created modules */
3228   module_head = SWIG_GetModule(clientdata);
3229   if (!module_head) {
3230     /* This is the first module loaded for this interpreter */
3231     /* so set the swig module into the interpreter */
3232     SWIG_SetModule(clientdata, &swig_module);
3233     module_head = &swig_module;
3234   } else {
3235     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
3236     found=0;
3237     iter=module_head;
3238     do {
3239       if (iter==&swig_module) {
3240         found=1;
3241         break;
3242       }
3243       iter=iter->next;
3244     } while (iter!= module_head);
3245 
3246     /* if the is found in the list, then all is done and we may leave */
3247     if (found) return;
3248     /* otherwise we must add out module into the list */
3249     swig_module.next = module_head->next;
3250     module_head->next = &swig_module;
3251   }
3252 
3253   /* Now work on filling in swig_module.types */
3254 #ifdef SWIGRUNTIME_DEBUG
3255   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
3256 #endif
3257   for (i = 0; i < swig_module.size; ++i) {
3258     swig_type_info *type = 0;
3259     swig_type_info *ret;
3260     swig_cast_info *cast;
3261 
3262 #ifdef SWIGRUNTIME_DEBUG
3263     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3264 #endif
3265 
3266     /* if there is another module already loaded */
3267     if (swig_module.next != &swig_module) {
3268       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
3269     }
3270     if (type) {
3271       /* Overwrite clientdata field */
3272 #ifdef SWIGRUNTIME_DEBUG
3273       printf("SWIG_InitializeModule: found type %s\n", type->name);
3274 #endif
3275       if (swig_module.type_initial[i]->clientdata) {
3276         type->clientdata = swig_module.type_initial[i]->clientdata;
3277 #ifdef SWIGRUNTIME_DEBUG
3278         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
3279 #endif
3280       }
3281     } else {
3282       type = swig_module.type_initial[i];
3283     }
3284 
3285     /* Insert casting types */
3286     cast = swig_module.cast_initial[i];
3287     while (cast->type) {
3288       /* Don't need to add information already in the list */
3289       ret = 0;
3290 #ifdef SWIGRUNTIME_DEBUG
3291       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
3292 #endif
3293       if (swig_module.next != &swig_module) {
3294         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
3295 #ifdef SWIGRUNTIME_DEBUG
3296         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
3297 #endif
3298       }
3299       if (ret) {
3300         if (type == swig_module.type_initial[i]) {
3301 #ifdef SWIGRUNTIME_DEBUG
3302           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
3303 #endif
3304           cast->type = ret;
3305           ret = 0;
3306         } else {
3307           /* Check for casting already in the list */
3308           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
3309 #ifdef SWIGRUNTIME_DEBUG
3310           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
3311 #endif
3312           if (!ocast) ret = 0;
3313         }
3314       }
3315 
3316       if (!ret) {
3317 #ifdef SWIGRUNTIME_DEBUG
3318         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
3319 #endif
3320         if (type->cast) {
3321           type->cast->prev = cast;
3322           cast->next = type->cast;
3323         }
3324         type->cast = cast;
3325       }
3326       cast++;
3327     }
3328     /* Set entry in modules->types array equal to the type */
3329     swig_module.types[i] = type;
3330   }
3331   swig_module.types[i] = 0;
3332 
3333 #ifdef SWIGRUNTIME_DEBUG
3334   printf("**** SWIG_InitializeModule: Cast List ******\n");
3335   for (i = 0; i < swig_module.size; ++i) {
3336     int j = 0;
3337     swig_cast_info *cast = swig_module.cast_initial[i];
3338     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3339     while (cast->type) {
3340       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
3341       cast++;
3342       ++j;
3343     }
3344     printf("---- Total casts: %d\n",j);
3345   }
3346   printf("**** SWIG_InitializeModule: Cast List ******\n");
3347 #endif
3348 }
3349 
3350 /* This function will propagate the clientdata field of type to
3351 * any new swig_type_info structures that have been added into the list
3352 * of equivalent types.  It is like calling
3353 * SWIG_TypeClientData(type, clientdata) a second time.
3354 */
3355 SWIGRUNTIME void
SWIG_PropagateClientData(void)3356 SWIG_PropagateClientData(void) {
3357   size_t i;
3358   swig_cast_info *equiv;
3359   static int init_run = 0;
3360 
3361   if (init_run) return;
3362   init_run = 1;
3363 
3364   for (i = 0; i < swig_module.size; i++) {
3365     if (swig_module.types[i]->clientdata) {
3366       equiv = swig_module.types[i]->cast;
3367       while (equiv) {
3368         if (!equiv->converter) {
3369           if (equiv->type && !equiv->type->clientdata)
3370           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
3371         }
3372         equiv = equiv->next;
3373       }
3374     }
3375   }
3376 }
3377 
3378 #ifdef __cplusplus
3379 #if 0
3380 {
3381   /* c-mode */
3382 #endif
3383 }
3384 #endif
3385 
3386 
3387 #ifdef __cplusplus
3388 extern "C" {
3389 #endif
3390 
3391   /* -----------------------------------------------------------------------------
3392    * constants/methods manipulation
3393    * ----------------------------------------------------------------------------- */
3394 
3395   /* Install Constants */
3396 
3397   SWIGINTERN void
SWIG_Tcl_InstallConstants(Tcl_Interp * interp,swig_const_info constants[])3398   SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
3399     int i;
3400     Tcl_Obj *obj;
3401 
3402     if (!swigconstTableinit) {
3403       Tcl_InitHashTable(&swigconstTable, TCL_STRING_KEYS);
3404       swigconstTableinit = 1;
3405     }
3406     for (i = 0; constants[i].type; i++) {
3407       switch(constants[i].type) {
3408       case SWIG_TCL_POINTER:
3409         obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
3410         break;
3411       case SWIG_TCL_BINARY:
3412         obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
3413         break;
3414       default:
3415         obj = 0;
3416         break;
3417       }
3418       if (obj) {
3419         SWIG_Tcl_SetConstantObj(interp, constants[i].name, obj);
3420       }
3421     }
3422   }
3423 
3424 #ifdef __cplusplus
3425 }
3426 #endif
3427 
3428 /* -----------------------------------------------------------------------------*
3429  *  Partial Init method
3430  * -----------------------------------------------------------------------------*/
3431 
SWIG_init(Tcl_Interp * interp)3432 SWIGEXPORT int SWIG_init(Tcl_Interp *interp) {
3433   int i;
3434   if (interp == 0) return TCL_ERROR;
3435 #ifdef USE_TCL_STUBS
3436   if (Tcl_InitStubs(interp, (char*)"8.1", 0) == NULL) {
3437     return TCL_ERROR;
3438   }
3439 #endif
3440   Tcl_PkgProvide(interp, (char*)SWIG_name, (char*)SWIG_version);
3441 
3442 #ifdef SWIG_namespace
3443   Tcl_Eval(interp, "namespace eval " SWIG_namespace " { }");
3444 #endif
3445 
3446   SWIG_InitializeModule((void *) interp);
3447   SWIG_PropagateClientData();
3448 
3449   for (i = 0; swig_commands[i].name; i++) {
3450     Tcl_CreateObjCommand(interp, (char *) swig_commands[i].name, (swig_wrapper_func) swig_commands[i].wrapper,
3451       swig_commands[i].clientdata, NULL);
3452   }
3453   for (i = 0; swig_variables[i].name; i++) {
3454     Tcl_SetVar(interp, (char *) swig_variables[i].name, (char *) "", TCL_GLOBAL_ONLY);
3455     Tcl_TraceVar(interp, (char *) swig_variables[i].name, TCL_TRACE_READS | TCL_GLOBAL_ONLY,
3456       (Tcl_VarTraceProc *) swig_variables[i].get, (ClientData) swig_variables[i].addr);
3457     Tcl_TraceVar(interp, (char *) swig_variables[i].name, TCL_TRACE_WRITES | TCL_GLOBAL_ONLY,
3458       (Tcl_VarTraceProc *) swig_variables[i].set, (ClientData) swig_variables[i].addr);
3459   }
3460 
3461   SWIG_Tcl_InstallConstants(interp, swig_constants);
3462 
3463 
3464   return TCL_OK;
3465 }
Netpgptcl_SafeInit(Tcl_Interp * interp)3466 SWIGEXPORT int Netpgptcl_SafeInit(Tcl_Interp *interp) {
3467   return SWIG_init(interp);
3468 }
3469 
3470