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