1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
11 /* -----------------------------------------------------------------------------
12 * This section contains generic SWIG labels for method/variable
13 * declarations/attributes, and other compiler dependent labels.
14 * ----------------------------------------------------------------------------- */
16 /* template workaround for compilers that cannot correctly implement the C++ standard */
17 #ifndef SWIGTEMPLATEDISAMBIGUATOR
18 # if defined(__SUNPRO_CC)
19 # if (__SUNPRO_CC <= 0x560)
20 # define SWIGTEMPLATEDISAMBIGUATOR template
22 # define SWIGTEMPLATEDISAMBIGUATOR
25 # define SWIGTEMPLATEDISAMBIGUATOR
29 /* inline attribute */
31 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
32 # define SWIGINLINE inline
38 /* attribute recognised by some compilers to avoid 'unused' warnings */
40 # if defined(__GNUC__)
41 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
42 # define SWIGUNUSED __attribute__ ((__unused__))
47 # define SWIGUNUSED __attribute__ ((__unused__))
53 #ifndef SWIGUNUSEDPARM
55 # define SWIGUNUSEDPARM(p)
57 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
61 /* internal SWIG method */
63 # define SWIGINTERN static SWIGUNUSED
66 /* internal inline SWIG method */
67 #ifndef SWIGINTERNINLINE
68 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
71 /* exporting methods */
72 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
73 # ifndef GCC_HASCLASSVISIBILITY
74 # define GCC_HASCLASSVISIBILITY
79 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
80 # if defined(STATIC_LINKED)
83 # define SWIGEXPORT __declspec(dllexport)
86 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
87 # define SWIGEXPORT __attribute__ ((visibility("default")))
94 /* calling conventions for Windows */
96 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
97 # define SWIGSTDCALL __stdcall
103 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
104 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
105 # define _CRT_SECURE_NO_DEPRECATE
116 /* -----------------------------------------------------------------------------
119 * This file contains generic CAPI SWIG runtime support for pointer
121 * ----------------------------------------------------------------------------- */
123 /* This should only be incremented when either the layout of swig_type_info changes,
124 or for whatever reason, the runtime changes incompatibly */
125 #define SWIG_RUNTIME_VERSION "3"
127 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
128 #ifdef SWIG_TYPE_TABLE
129 # define SWIG_QUOTE_STRING(x) #x
130 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
131 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
133 # define SWIG_TYPE_TABLE_NAME
137 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
138 creating a static or dynamic library from the swig runtime code.
139 In 99.9% of the cases, swig just needs to declare them as 'static'.
141 But only do this if is strictly necessary, ie, if you have problems
142 with your compiler or so.
146 # define SWIGRUNTIME SWIGINTERN
149 #ifndef SWIGRUNTIMEINLINE
150 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
153 /* Generic buffer size */
154 #ifndef SWIG_BUFFER_SIZE
155 # define SWIG_BUFFER_SIZE 1024
158 /* Flags for pointer conversions */
159 #define SWIG_POINTER_DISOWN 0x1
161 /* Flags for new pointer objects */
162 #define SWIG_POINTER_OWN 0x1
166 Flags/methods for returning states.
168 The swig conversion methods, as ConvertPtr, return and integer
169 that tells if the conversion was successful or not. And if not,
170 an error code can be returned (see swigerrors.swg for the codes).
172 Use the following macros/flags to set or process the returning
175 In old swig versions, you usually write code as:
177 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
183 Now you can be more explicit as:
185 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
186 if (SWIG_IsOK(res)) {
192 that seems to be the same, but now you can also do
195 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
196 if (SWIG_IsOK(res)) {
198 if (SWIG_IsNewObj(res) {
208 I.e., now SWIG_ConvertPtr can return new objects and you can
209 identify the case and take care of the deallocation. Of course that
210 requires also to SWIG_ConvertPtr to return new result values, as
212 int SWIG_ConvertPtr(obj, ptr,...) {
214 if (<need new object>) {
215 *ptr = <ptr to new allocated object>;
218 *ptr = <ptr to old object>;
226 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
227 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
230 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
231 allows to return the 'cast rank', for example, if you have this
238 food(1) // cast rank '1' (1 -> 1.0)
239 fooi(1) // cast rank '0'
241 just use the SWIG_AddCast()/SWIG_CheckState()
246 #define SWIG_ERROR (-1)
247 #define SWIG_IsOK(r) (r >= 0)
248 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
250 /* The CastRankLimit says how many bits are used for the cast rank */
251 #define SWIG_CASTRANKLIMIT (1 << 8)
252 /* The NewMask denotes the object was created (using new/malloc) */
253 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
254 /* The TmpMask is for in/out typemaps that use temporal objects */
255 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
256 /* Simple returning values */
257 #define SWIG_BADOBJ (SWIG_ERROR)
258 #define SWIG_OLDOBJ (SWIG_OK)
259 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
260 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
261 /* Check, add and del mask methods */
262 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
263 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
264 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
265 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
266 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
267 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
271 #if defined(SWIG_CASTRANK_MODE)
272 # ifndef SWIG_TypeRank
273 # define SWIG_TypeRank unsigned long
275 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
276 # define SWIG_MAXCASTRANK (2)
278 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
279 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
280 SWIGINTERNINLINE
int SWIG_AddCast(int r
) {
281 return SWIG_IsOK(r
) ? ((SWIG_CastRank(r
) < SWIG_MAXCASTRANK
) ? (r
+ 1) : SWIG_ERROR
) : r
;
283 SWIGINTERNINLINE
int SWIG_CheckState(int r
) {
284 return SWIG_IsOK(r
) ? SWIG_CastRank(r
) + 1 : 0;
286 #else /* no cast-rank mode */
287 # define SWIG_AddCast
288 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
300 typedef void *(*swig_converter_func
)(void *);
301 typedef struct swig_type_info
*(*swig_dycast_func
)(void **);
303 /* Structure to store inforomation on one type */
304 typedef struct swig_type_info
{
305 const char *name
; /* mangled name of this type */
306 const char *str
; /* human readable name of this type */
307 swig_dycast_func dcast
; /* dynamic cast function down a hierarchy */
308 struct swig_cast_info
*cast
; /* linked list of types that can cast into this type */
309 void *clientdata
; /* language specific type data */
310 int owndata
; /* flag if the structure owns the clientdata */
313 /* Structure to store a type and conversion function used for casting */
314 typedef struct swig_cast_info
{
315 swig_type_info
*type
; /* pointer to type that is equivalent to this type */
316 swig_converter_func converter
; /* function to cast the void pointers */
317 struct swig_cast_info
*next
; /* pointer to next cast in linked list */
318 struct swig_cast_info
*prev
; /* pointer to the previous cast */
321 /* Structure used to store module information
322 * Each module generates one structure like this, and the runtime collects
323 * all of these structures and stores them in a circularly linked list.*/
324 typedef struct swig_module_info
{
325 swig_type_info
**types
; /* Array of pointers to swig_type_info structures that are in this module */
326 size_t size
; /* Number of types in this module */
327 struct swig_module_info
*next
; /* Pointer to next element in circularly linked list */
328 swig_type_info
**type_initial
; /* Array of initially generated type structures */
329 swig_cast_info
**cast_initial
; /* Array of initially generated casting structures */
330 void *clientdata
; /* Language specific module data */
334 Compare two type names skipping the space characters, therefore
335 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
337 Return 0 when the two name types are equivalent, as in
338 strncmp, but skipping ' '.
341 SWIG_TypeNameComp(const char *f1
, const char *l1
,
342 const char *f2
, const char *l2
) {
343 for (;(f1
!= l1
) && (f2
!= l2
); ++f1
, ++f2
) {
344 while ((*f1
== ' ') && (f1
!= l1
)) ++f1
;
345 while ((*f2
== ' ') && (f2
!= l2
)) ++f2
;
346 if (*f1
!= *f2
) return (*f1
> *f2
) ? 1 : -1;
348 return (l1
- f1
) - (l2
- f2
);
352 Check type equivalence in a name list like <name1>|<name2>|...
353 Return 0 if not equal, 1 if equal
356 SWIG_TypeEquiv(const char *nb
, const char *tb
) {
358 const char* te
= tb
+ strlen(tb
);
360 while (!equiv
&& *ne
) {
361 for (nb
= ne
; *ne
; ++ne
) {
362 if (*ne
== '|') break;
364 equiv
= (SWIG_TypeNameComp(nb
, ne
, tb
, te
) == 0) ? 1 : 0;
371 Check type equivalence in a name list like <name1>|<name2>|...
372 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
375 SWIG_TypeCompare(const char *nb
, const char *tb
) {
377 const char* te
= tb
+ strlen(tb
);
379 while (!equiv
&& *ne
) {
380 for (nb
= ne
; *ne
; ++ne
) {
381 if (*ne
== '|') break;
383 equiv
= (SWIG_TypeNameComp(nb
, ne
, tb
, te
) == 0) ? 1 : 0;
390 /* think of this as a c++ template<> or a scheme macro */
391 #define SWIG_TypeCheck_Template(comparison, ty) \
393 swig_cast_info *iter = ty->cast; \
396 if (iter == ty->cast) return iter; \
397 /* Move iter to the top of the linked list */ \
398 iter->prev->next = iter->next; \
400 iter->next->prev = iter->prev; \
401 iter->next = ty->cast; \
403 if (ty->cast) ty->cast->prev = iter; \
415 SWIGRUNTIME swig_cast_info
*
416 SWIG_TypeCheck(const char *c
, swig_type_info
*ty
) {
417 SWIG_TypeCheck_Template(strcmp(iter
->type
->name
, c
) == 0, ty
);
420 /* Same as previous function, except strcmp is replaced with a pointer comparison */
421 SWIGRUNTIME swig_cast_info
*
422 SWIG_TypeCheckStruct(swig_type_info
*from
, swig_type_info
*into
) {
423 SWIG_TypeCheck_Template(iter
->type
== from
, into
);
427 Cast a pointer up an inheritance hierarchy
429 SWIGRUNTIMEINLINE
void *
430 SWIG_TypeCast(swig_cast_info
*ty
, void *ptr
) {
431 return ((!ty
) || (!ty
->converter
)) ? ptr
: (*ty
->converter
)(ptr
);
435 Dynamic pointer casting. Down an inheritance hierarchy
437 SWIGRUNTIME swig_type_info
*
438 SWIG_TypeDynamicCast(swig_type_info
*ty
, void **ptr
) {
439 swig_type_info
*lastty
= ty
;
440 if (!ty
|| !ty
->dcast
) return ty
;
441 while (ty
&& (ty
->dcast
)) {
442 ty
= (*ty
->dcast
)(ptr
);
449 Return the name associated with this type
451 SWIGRUNTIMEINLINE
const char *
452 SWIG_TypeName(const swig_type_info
*ty
) {
457 Return the pretty name associated with this type,
458 that is an unmangled type name in a form presentable to the user.
460 SWIGRUNTIME
const char *
461 SWIG_TypePrettyName(const swig_type_info
*type
) {
462 /* The "str" field contains the equivalent pretty names of the
463 type, separated by vertical-bar characters. We choose
464 to print the last name, as it is often (?) the most
466 if (!type
) return NULL
;
467 if (type
->str
!= NULL
) {
468 const char *last_name
= type
->str
;
470 for (s
= type
->str
; *s
; s
++)
471 if (*s
== '|') last_name
= s
+1;
479 Set the clientdata field for a type
482 SWIG_TypeClientData(swig_type_info
*ti
, void *clientdata
) {
483 swig_cast_info
*cast
= ti
->cast
;
484 /* if (ti->clientdata == clientdata) return; */
485 ti
->clientdata
= clientdata
;
488 if (!cast
->converter
) {
489 swig_type_info
*tc
= cast
->type
;
490 if (!tc
->clientdata
) {
491 SWIG_TypeClientData(tc
, clientdata
);
498 SWIG_TypeNewClientData(swig_type_info
*ti
, void *clientdata
) {
499 SWIG_TypeClientData(ti
, clientdata
);
504 Search for a swig_type_info structure only by mangled name
505 Search is a O(log #types)
507 We start searching at module start, and finish searching when start == end.
508 Note: if start == end at the beginning of the function, we go all the way around
511 SWIGRUNTIME swig_type_info
*
512 SWIG_MangledTypeQueryModule(swig_module_info
*start
,
513 swig_module_info
*end
,
515 swig_module_info
*iter
= start
;
518 register size_t l
= 0;
519 register size_t r
= iter
->size
- 1;
521 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
522 register size_t i
= (l
+ r
) >> 1;
523 const char *iname
= iter
->types
[i
]->name
;
525 register int compare
= strcmp(name
, iname
);
527 return iter
->types
[i
];
528 } else if (compare
< 0) {
534 } else if (compare
> 0) {
538 break; /* should never happen */
543 } while (iter
!= end
);
548 Search for a swig_type_info structure for either a mangled name or a human readable name.
549 It first searches the mangled names of the types, which is a O(log #types)
550 If a type is not found it then searches the human readable names, which is O(#types).
552 We start searching at module start, and finish searching when start == end.
553 Note: if start == end at the beginning of the function, we go all the way around
556 SWIGRUNTIME swig_type_info
*
557 SWIG_TypeQueryModule(swig_module_info
*start
,
558 swig_module_info
*end
,
560 /* STEP 1: Search the name field using binary search */
561 swig_type_info
*ret
= SWIG_MangledTypeQueryModule(start
, end
, name
);
565 /* STEP 2: If the type hasn't been found, do a complete search
566 of the str field (the human readable name) */
567 swig_module_info
*iter
= start
;
569 register size_t i
= 0;
570 for (; i
< iter
->size
; ++i
) {
571 if (iter
->types
[i
]->str
&& (SWIG_TypeEquiv(iter
->types
[i
]->str
, name
)))
572 return iter
->types
[i
];
575 } while (iter
!= end
);
578 /* neither found a match */
583 Pack binary data into a string
586 SWIG_PackData(char *c
, void *ptr
, size_t sz
) {
587 static const char hex
[17] = "0123456789abcdef";
588 register const unsigned char *u
= (unsigned char *) ptr
;
589 register const unsigned char *eu
= u
+ sz
;
590 for (; u
!= eu
; ++u
) {
591 register unsigned char uu
= *u
;
592 *(c
++) = hex
[(uu
& 0xf0) >> 4];
593 *(c
++) = hex
[uu
& 0xf];
599 Unpack binary data from a string
601 SWIGRUNTIME
const char *
602 SWIG_UnpackData(const char *c
, void *ptr
, size_t sz
) {
603 register unsigned char *u
= (unsigned char *) ptr
;
604 register const unsigned char *eu
= u
+ sz
;
605 for (; u
!= eu
; ++u
) {
606 register char d
= *(c
++);
607 register unsigned char uu
;
608 if ((d
>= '0') && (d
<= '9'))
609 uu
= ((d
- '0') << 4);
610 else if ((d
>= 'a') && (d
<= 'f'))
611 uu
= ((d
- ('a'-10)) << 4);
615 if ((d
>= '0') && (d
<= '9'))
617 else if ((d
>= 'a') && (d
<= 'f'))
618 uu
|= (d
- ('a'-10));
627 Pack 'void *' into a string buffer.
630 SWIG_PackVoidPtr(char *buff
, void *ptr
, const char *name
, size_t bsz
) {
632 if ((2*sizeof(void *) + 2) > bsz
) return 0;
634 r
= SWIG_PackData(r
,&ptr
,sizeof(void *));
635 if (strlen(name
) + 1 > (bsz
- (r
- buff
))) return 0;
640 SWIGRUNTIME
const char *
641 SWIG_UnpackVoidPtr(const char *c
, void **ptr
, const char *name
) {
643 if (strcmp(c
,"NULL") == 0) {
650 return SWIG_UnpackData(++c
,ptr
,sizeof(void *));
654 SWIG_PackDataName(char *buff
, void *ptr
, size_t sz
, const char *name
, size_t bsz
) {
656 size_t lname
= (name
? strlen(name
) : 0);
657 if ((2*sz
+ 2 + lname
) > bsz
) return 0;
659 r
= SWIG_PackData(r
,ptr
,sz
);
661 strncpy(r
,name
,lname
+1);
668 SWIGRUNTIME
const char *
669 SWIG_UnpackDataName(const char *c
, void *ptr
, size_t sz
, const char *name
) {
671 if (strcmp(c
,"NULL") == 0) {
678 return SWIG_UnpackData(++c
,ptr
,sz
);
686 #define SWIG_UnknownError -1
687 #define SWIG_IOError -2
688 #define SWIG_RuntimeError -3
689 #define SWIG_IndexError -4
690 #define SWIG_TypeError -5
691 #define SWIG_DivisionByZero -6
692 #define SWIG_OverflowError -7
693 #define SWIG_SyntaxError -8
694 #define SWIG_ValueError -9
695 #define SWIG_SystemError -10
696 #define SWIG_AttributeError -11
697 #define SWIG_MemoryError -12
698 #define SWIG_NullReferenceError -13
702 /* -----------------------------------------------------------------------------
704 * ----------------------------------------------------------------------------- */
706 SWIGINTERN
const char*
707 SWIG_Tcl_ErrorType(int code
) {
708 const char* type
= 0;
710 case SWIG_MemoryError
:
711 type
= "MemoryError";
716 case SWIG_RuntimeError
:
717 type
= "RuntimeError";
719 case SWIG_IndexError
:
725 case SWIG_DivisionByZero
:
726 type
= "ZeroDivisionError";
728 case SWIG_OverflowError
:
729 type
= "OverflowError";
731 case SWIG_SyntaxError
:
732 type
= "SyntaxError";
734 case SWIG_ValueError
:
737 case SWIG_SystemError
:
738 type
= "SystemError";
740 case SWIG_AttributeError
:
741 type
= "AttributeError";
744 type
= "RuntimeError";
751 SWIG_Tcl_SetErrorObj(Tcl_Interp
*interp
, const char *ctype
, Tcl_Obj
*obj
)
753 Tcl_ResetResult(interp
);
754 Tcl_SetObjResult(interp
, obj
);
755 Tcl_SetErrorCode(interp
, "SWIG", ctype
, NULL
);
759 SWIG_Tcl_SetErrorMsg(Tcl_Interp
*interp
, const char *ctype
, const char *mesg
)
761 Tcl_ResetResult(interp
);
762 Tcl_SetErrorCode(interp
, "SWIG", ctype
, NULL
);
763 Tcl_AppendResult(interp
, ctype
, " ", mesg
, NULL
);
765 Tcl_AddErrorInfo(interp, ctype);
766 Tcl_AddErrorInfo(interp, " ");
767 Tcl_AddErrorInfo(interp, mesg);
771 SWIGINTERNINLINE
void
772 SWIG_Tcl_AddErrorMsg(Tcl_Interp
*interp
, const char* mesg
)
774 Tcl_AddErrorInfo(interp
, mesg
);
779 /* -----------------------------------------------------------------------------
780 * SWIG API. Portion that goes into the runtime
781 * ----------------------------------------------------------------------------- */
786 /* -----------------------------------------------------------------------------
787 * Constant declarations
788 * ----------------------------------------------------------------------------- */
791 #define SWIG_TCL_POINTER 4
792 #define SWIG_TCL_BINARY 5
794 /* Constant information structure */
795 typedef struct swig_const_info
{
801 swig_type_info
**ptype
;
804 typedef int (*swig_wrapper
)(ClientData
, Tcl_Interp
*, int, Tcl_Obj
*CONST
[]);
805 typedef int (*swig_wrapper_func
)(ClientData
, Tcl_Interp
*, int, Tcl_Obj
*CONST
[]);
806 typedef char *(*swig_variable_func
)(ClientData
, Tcl_Interp
*, char *, char *, int);
807 typedef void (*swig_delete_func
)(ClientData
);
809 typedef struct swig_method
{
814 typedef struct swig_attribute
{
816 swig_wrapper getmethod
;
817 swig_wrapper setmethod
;
820 typedef struct swig_class
{
822 swig_type_info
**type
;
823 swig_wrapper constructor
;
824 void (*destructor
)(void *);
825 swig_method
*methods
;
826 swig_attribute
*attributes
;
827 struct swig_class
**bases
;
829 swig_module_info
*module
;
832 typedef struct swig_instance
{
835 swig_class
*classptr
;
840 /* Structure for command table */
843 int (*wrapper
)(ClientData
, Tcl_Interp
*, int, Tcl_Obj
*CONST
[]);
844 ClientData clientdata
;
847 /* Structure for variable linking table */
851 char * (*get
)(ClientData
, Tcl_Interp
*, char *, char *, int);
852 char * (*set
)(ClientData
, Tcl_Interp
*, char *, char *, int);
856 /* -----------------------------------------------------------------------------*
857 * Install a constant object
858 * -----------------------------------------------------------------------------*/
860 static Tcl_HashTable swigconstTable
;
861 static int swigconstTableinit
= 0;
864 SWIG_Tcl_SetConstantObj(Tcl_Interp
*interp
, const char* name
, Tcl_Obj
*obj
) {
866 Tcl_ObjSetVar2(interp
,Tcl_NewStringObj(name
,-1), NULL
, obj
, TCL_GLOBAL_ONLY
);
867 Tcl_SetHashValue(Tcl_CreateHashEntry(&swigconstTable
, name
, &newobj
), (ClientData
) obj
);
871 SWIG_Tcl_GetConstantObj(const char *key
) {
872 Tcl_HashEntry
*entryPtr
;
873 if (!swigconstTableinit
) return 0;
874 entryPtr
= Tcl_FindHashEntry(&swigconstTable
, key
);
876 return (Tcl_Obj
*) Tcl_GetHashValue(entryPtr
);
887 /* -----------------------------------------------------------------------------
888 * See the LICENSE file for information on copyright, usage and redistribution
889 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
893 * This file contains the runtime support for Tcl modules and includes
894 * code for managing global variables and pointer type checking.
895 * ----------------------------------------------------------------------------- */
897 /* Common SWIG API */
899 /* for raw pointers */
900 #define SWIG_ConvertPtr(oc, ptr, ty, flags) SWIG_Tcl_ConvertPtr(interp, oc, ptr, ty, flags)
901 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Tcl_NewPointerObj(ptr, type, flags)
903 /* for raw packed data */
904 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Tcl_ConvertPacked(interp, obj, ptr, sz, ty)
905 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Tcl_NewPackedObj(ptr, sz, type)
907 /* for class or struct pointers */
908 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_Tcl_ConvertPtr(interp, obj, pptr, type, flags)
909 #define SWIG_NewInstanceObj(thisvalue, type, flags) SWIG_Tcl_NewInstanceObj(interp, thisvalue, type, flags)
911 /* for C or C++ function pointers */
912 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Tcl_ConvertPtr(interp, obj, pptr, type, 0)
913 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Tcl_NewPointerObj(ptr, type, 0)
915 /* for C++ member pointers, ie, member methods */
916 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Tcl_ConvertPacked(interp,obj, ptr, sz, ty)
917 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Tcl_NewPackedObj(ptr, sz, type)
922 #define SWIG_GetModule(clientdata) SWIG_Tcl_GetModule((Tcl_Interp *) (clientdata))
923 #define SWIG_SetModule(clientdata, pointer) SWIG_Tcl_SetModule((Tcl_Interp *) (clientdata), pointer)
926 /* Error manipulation */
928 #define SWIG_ErrorType(code) SWIG_Tcl_ErrorType(code)
929 #define SWIG_Error(code, msg) SWIG_Tcl_SetErrorMsg(interp, SWIG_Tcl_ErrorType(code), msg)
930 #define SWIG_fail goto fail
933 /* Tcl-specific SWIG API */
935 #define SWIG_Acquire(ptr) SWIG_Tcl_Acquire(ptr)
936 #define SWIG_MethodCommand SWIG_Tcl_MethodCommand
937 #define SWIG_Disown(ptr) SWIG_Tcl_Disown(ptr)
938 #define SWIG_ConvertPtrFromString(c, ptr, ty, flags) SWIG_Tcl_ConvertPtrFromString(interp, c, ptr, ty, flags)
939 #define SWIG_MakePtr(c, ptr, ty, flags) SWIG_Tcl_MakePtr(c, ptr, ty, flags)
940 #define SWIG_PointerTypeFromString(c) SWIG_Tcl_PointerTypeFromString(c)
941 #define SWIG_GetArgs SWIG_Tcl_GetArgs
942 #define SWIG_GetConstantObj(key) SWIG_Tcl_GetConstantObj(key)
943 #define SWIG_ObjectConstructor SWIG_Tcl_ObjectConstructor
944 #define SWIG_Thisown(ptr) SWIG_Tcl_Thisown(ptr)
945 #define SWIG_ObjectDelete SWIG_Tcl_ObjectDelete
948 #define SWIG_TCL_DECL_ARGS_2(arg1, arg2) (Tcl_Interp *interp SWIGUNUSED, arg1, arg2)
949 #define SWIG_TCL_CALL_ARGS_2(arg1, arg2) (interp, arg1, arg2)
950 /* -----------------------------------------------------------------------------
951 * pointers/data manipulation
952 * ----------------------------------------------------------------------------- */
954 /* For backward compatibility only */
955 #define SWIG_POINTER_EXCEPTION 0
956 #define SWIG_GetConstant SWIG_GetConstantObj
957 #define SWIG_Tcl_GetConstant SWIG_Tcl_GetConstantObj
969 SWIGRUNTIME Tcl_HashTable
*
970 SWIG_Tcl_ObjectTable(void) {
971 static Tcl_HashTable swigobjectTable
;
972 static int swigobjectTableinit
= 0;
973 if (!swigobjectTableinit
) {
974 Tcl_InitHashTable(&swigobjectTable
, TCL_ONE_WORD_KEYS
);
975 swigobjectTableinit
= 1;
977 return &swigobjectTable
;
980 /* Acquire ownership of a pointer */
982 SWIG_Tcl_Acquire(void *ptr
) {
984 Tcl_CreateHashEntry(SWIG_Tcl_ObjectTable(), (char *) ptr
, &newobj
);
988 SWIG_Tcl_Thisown(void *ptr
) {
989 if (Tcl_FindHashEntry(SWIG_Tcl_ObjectTable(), (char *) ptr
)) {
995 /* Disown a pointer. Returns 1 if we owned it to begin with */
997 SWIG_Tcl_Disown(void *ptr
) {
998 Tcl_HashEntry
*entryPtr
= Tcl_FindHashEntry(SWIG_Tcl_ObjectTable(), (char *) ptr
);
1000 Tcl_DeleteHashEntry(entryPtr
);
1006 /* Convert a pointer value */
1008 SWIG_Tcl_ConvertPtrFromString(Tcl_Interp
*interp
, const char *c
, void **ptr
, swig_type_info
*ty
, int flags
) {
1010 /* Pointer values must start with leading underscore */
1013 if (strcmp(c
,"NULL") == 0) return SWIG_OK
;
1014 /* Hmmm. It could be an object name. */
1015 if (Tcl_VarEval(interp
,c
," cget -this", (char *) NULL
) == TCL_OK
) {
1016 Tcl_Obj
*result
= Tcl_GetObjResult(interp
);
1017 c
= Tcl_GetStringFromObj(result
, NULL
);
1020 Tcl_ResetResult(interp
);
1024 c
= SWIG_UnpackData(c
,ptr
,sizeof(void *));
1026 tc
= c
? SWIG_TypeCheck(c
,ty
) : 0;
1030 if (flags
& SWIG_POINTER_DISOWN
) {
1031 SWIG_Disown((void *) *ptr
);
1033 *ptr
= SWIG_TypeCast(tc
,(void *) *ptr
);
1038 /* Convert a pointer value */
1039 SWIGRUNTIMEINLINE
int
1040 SWIG_Tcl_ConvertPtr(Tcl_Interp
*interp
, Tcl_Obj
*oc
, void **ptr
, swig_type_info
*ty
, int flags
) {
1041 return SWIG_Tcl_ConvertPtrFromString(interp
, Tcl_GetStringFromObj(oc
,NULL
), ptr
, ty
, flags
);
1044 /* Convert a pointer value */
1046 SWIG_Tcl_PointerTypeFromString(char *c
) {
1048 /* Pointer values must start with leading underscore. NULL has no type */
1053 /* Extract hex value from pointer */
1055 if (!(((d
>= '0') && (d
<= '9')) || ((d
>= 'a') && (d
<= 'f')))) break;
1061 /* Convert a packed value value */
1063 SWIG_Tcl_ConvertPacked(Tcl_Interp
*SWIGUNUSEDPARM(interp
) , Tcl_Obj
*obj
, void *ptr
, int sz
, swig_type_info
*ty
) {
1067 if (!obj
) goto type_error
;
1068 c
= Tcl_GetStringFromObj(obj
,NULL
);
1069 /* Pointer values must start with leading underscore */
1070 if (*c
!= '_') goto type_error
;
1072 c
= SWIG_UnpackData(c
,ptr
,sz
);
1074 tc
= SWIG_TypeCheck(c
,ty
);
1075 if (!tc
) goto type_error
;
1085 /* Take a pointer and convert it to a string */
1087 SWIG_Tcl_MakePtr(char *c
, void *ptr
, swig_type_info
*ty
, int flags
) {
1090 c
= SWIG_PackData(c
,&ptr
,sizeof(void *));
1093 strcpy(c
,(char *)"NULL");
1098 /* Create a new pointer object */
1099 SWIGRUNTIMEINLINE Tcl_Obj
*
1100 SWIG_Tcl_NewPointerObj(void *ptr
, swig_type_info
*type
, int flags
) {
1102 char result
[SWIG_BUFFER_SIZE
];
1103 SWIG_MakePtr(result
,ptr
,type
,flags
);
1104 robj
= Tcl_NewStringObj(result
,-1);
1108 SWIGRUNTIME Tcl_Obj
*
1109 SWIG_Tcl_NewPackedObj(void *ptr
, int sz
, swig_type_info
*type
) {
1112 if ((2*sz
+ 1 + strlen(type
->name
)) > 1000) return 0;
1114 r
= SWIG_PackData(r
,ptr
,sz
);
1115 strcpy(r
,type
->name
);
1116 return Tcl_NewStringObj(result
,-1);
1119 /* -----------------------------------------------------------------------------*
1121 * -----------------------------------------------------------------------------*/
1123 SWIGRUNTIME swig_module_info
*
1124 SWIG_Tcl_GetModule(Tcl_Interp
*interp
) {
1126 swig_module_info
*ret
= 0;
1128 /* first check if pointer already created */
1129 data
= Tcl_GetVar(interp
, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME
, TCL_GLOBAL_ONLY
);
1131 SWIG_UnpackData(data
, &ret
, sizeof(swig_type_info
**));
1138 SWIG_Tcl_SetModule(Tcl_Interp
*interp
, swig_module_info
*module
) {
1139 char buf
[SWIG_BUFFER_SIZE
];
1142 /* create a new pointer */
1143 data
= SWIG_PackData(buf
, &module
, sizeof(swig_type_info
**));
1145 Tcl_SetVar(interp
, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME
, buf
, 0);
1148 /* -----------------------------------------------------------------------------*
1150 * -----------------------------------------------------------------------------*/
1154 SWIG_Tcl_ObjectDelete(ClientData clientData
) {
1155 swig_instance
*si
= (swig_instance
*) clientData
;
1156 if ((si
) && (si
->destroy
) && (SWIG_Disown(si
->thisvalue
))) {
1157 if (si
->classptr
->destructor
) {
1158 (si
->classptr
->destructor
)(si
->thisvalue
);
1161 Tcl_DecrRefCount(si
->thisptr
);
1165 /* Function to invoke object methods given an instance */
1167 SWIG_Tcl_MethodCommand(ClientData clientData
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST _objv
[]) {
1168 char *method
, *attrname
;
1169 swig_instance
*inst
= (swig_instance
*) clientData
;
1171 swig_attribute
*attr
;
1176 swig_class
*cls_stack
[64];
1177 int cls_stack_bi
[64];
1178 int cls_stack_top
= 0;
1182 objv
= (Tcl_Obj
**) _objv
;
1184 Tcl_SetResult(interp
, (char *) "wrong # args.", TCL_STATIC
);
1187 method
= Tcl_GetStringFromObj(objv
[1],NULL
);
1188 if (strcmp(method
,"-acquire") == 0) {
1190 SWIG_Acquire(inst
->thisvalue
);
1193 if (strcmp(method
,"-disown") == 0) {
1194 if (inst
->destroy
) {
1195 SWIG_Disown(inst
->thisvalue
);
1200 if (strcmp(method
,"-delete") == 0) {
1201 Tcl_DeleteCommandFromToken(interp
,inst
->cmdtok
);
1204 cls_stack
[cls_stack_top
] = inst
->classptr
;
1205 cls_stack_bi
[cls_stack_top
] = -1;
1206 cls
= inst
->classptr
;
1208 bi
= cls_stack_bi
[cls_stack_top
];
1209 cls
= cls_stack
[cls_stack_top
];
1211 if (!cls
->bases
[bi
] && cls
->base_names
[bi
]) {
1212 /* lookup and cache the base class */
1213 swig_type_info
*info
= SWIG_TypeQueryModule(cls
->module
, cls
->module
, cls
->base_names
[bi
]);
1214 if (info
) cls
->bases
[bi
] = (swig_class
*) info
->clientdata
;
1216 cls
= cls
->bases
[bi
];
1218 cls_stack_bi
[cls_stack_top
]++;
1220 cls_stack
[cls_stack_top
] = cls
;
1221 cls_stack_bi
[cls_stack_top
] = -1;
1227 if (cls_stack_top
< 0) break;
1230 cls_stack_bi
[cls_stack_top
]++;
1232 meth
= cls
->methods
;
1233 /* Check for methods */
1234 while (meth
&& meth
->name
) {
1235 if (strcmp(meth
->name
,method
) == 0) {
1237 objv
[1] = inst
->thisptr
;
1238 Tcl_IncrRefCount(inst
->thisptr
);
1239 rcode
= (*meth
->method
)(clientData
,interp
,objc
,objv
);
1241 Tcl_DecrRefCount(inst
->thisptr
);
1246 /* Check class methods for a match */
1247 if (strcmp(method
,"cget") == 0) {
1249 Tcl_SetResult(interp
, (char *) "wrong # args.", TCL_STATIC
);
1252 attrname
= Tcl_GetStringFromObj(objv
[2],NULL
);
1253 attr
= cls
->attributes
;
1254 while (attr
&& attr
->name
) {
1255 if ((strcmp(attr
->name
, attrname
) == 0) && (attr
->getmethod
)) {
1257 objv
[1] = inst
->thisptr
;
1258 Tcl_IncrRefCount(inst
->thisptr
);
1259 rcode
= (*attr
->getmethod
)(clientData
,interp
,2, objv
);
1261 Tcl_DecrRefCount(inst
->thisptr
);
1266 if (strcmp(attrname
, "-this") == 0) {
1267 Tcl_SetObjResult(interp
, Tcl_DuplicateObj(inst
->thisptr
));
1270 if (strcmp(attrname
, "-thisown") == 0) {
1271 if (SWIG_Thisown(inst
->thisvalue
)) {
1272 Tcl_SetResult(interp
,(char*)"1",TCL_STATIC
);
1274 Tcl_SetResult(interp
,(char*)"0",TCL_STATIC
);
1278 } else if (strcmp(method
, "configure") == 0) {
1281 Tcl_SetResult(interp
, (char *) "wrong # args.", TCL_STATIC
);
1286 attrname
= Tcl_GetStringFromObj(objv
[i
],NULL
);
1287 attr
= cls
->attributes
;
1288 while (attr
&& attr
->name
) {
1289 if ((strcmp(attr
->name
, attrname
) == 0) && (attr
->setmethod
)) {
1291 objv
[i
] = inst
->thisptr
;
1292 Tcl_IncrRefCount(inst
->thisptr
);
1293 rcode
= (*attr
->setmethod
)(clientData
,interp
,3, &objv
[i
-1]);
1295 Tcl_DecrRefCount(inst
->thisptr
);
1296 if (rcode
!= TCL_OK
) return rcode
;
1305 if (strcmp(method
,"configure") == 0) {
1306 if (numconf
>= objc
) {
1309 Tcl_SetResult(interp
,(char *) "Invalid attribute name.", TCL_STATIC
);
1313 if (strcmp(method
,"cget") == 0) {
1314 Tcl_SetResult(interp
,(char *) "Invalid attribute name.", TCL_STATIC
);
1317 Tcl_SetResult(interp
, (char *) "Invalid method. Must be one of: configure cget -acquire -disown -delete", TCL_STATIC
);
1318 cls
= inst
->classptr
;
1321 meth
= cls
->methods
;
1322 while (meth
&& meth
->name
) {
1323 char *cr
= (char *) Tcl_GetStringResult(interp
);
1324 int meth_len
= strlen(meth
->name
);
1325 char* where
= strchr(cr
,':');
1327 where
= strstr(where
, meth
->name
);
1329 if(where
[-1] == ' ' && (where
[meth_len
] == ' ' || where
[meth_len
]==0)) {
1338 Tcl_AppendElement(interp
, (char *) meth
->name
);
1341 cls
= inst
->classptr
->bases
[bi
++];
1346 /* This function takes the current result and turns it into an object command */
1347 SWIGRUNTIME Tcl_Obj
*
1348 SWIG_Tcl_NewInstanceObj(Tcl_Interp
*interp
, void *thisvalue
, swig_type_info
*type
, int flags
) {
1349 Tcl_Obj
*robj
= SWIG_NewPointerObj(thisvalue
, type
,0);
1350 /* Check to see if this pointer belongs to a class or not */
1351 if ((type
->clientdata
) && (interp
)) {
1354 name
= Tcl_GetStringFromObj(robj
,NULL
);
1355 if (!Tcl_GetCommandInfo(interp
,name
, &ci
) || (flags
)) {
1356 swig_instance
*newinst
= (swig_instance
*) malloc(sizeof(swig_instance
));
1357 newinst
->thisptr
= Tcl_DuplicateObj(robj
);
1358 Tcl_IncrRefCount(newinst
->thisptr
);
1359 newinst
->thisvalue
= thisvalue
;
1360 newinst
->classptr
= (swig_class
*) type
->clientdata
;
1361 newinst
->destroy
= flags
;
1362 newinst
->cmdtok
= Tcl_CreateObjCommand(interp
, Tcl_GetStringFromObj(robj
,NULL
), (swig_wrapper_func
) SWIG_MethodCommand
, (ClientData
) newinst
, (swig_delete_func
) SWIG_ObjectDelete
);
1364 SWIG_Acquire(thisvalue
);
1371 /* Function to create objects */
1373 SWIG_Tcl_ObjectConstructor(ClientData clientData
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
1374 Tcl_Obj
*newObj
= 0;
1375 void *thisvalue
= 0;
1376 swig_instance
*newinst
= 0;
1377 swig_class
*classptr
= (swig_class
*) clientData
;
1378 swig_wrapper cons
= 0;
1385 Tcl_SetResult(interp
, (char *) "swig: internal runtime error. No class object defined.", TCL_STATIC
);
1388 cons
= classptr
->constructor
;
1390 char *s
= Tcl_GetStringFromObj(objv
[1],NULL
);
1391 if (strcmp(s
,"-this") == 0) {
1394 } else if (strcmp(s
,"-args") == 0) {
1396 } else if (objc
== 2) {
1399 } else if (objc
>= 3) {
1402 s1
= Tcl_GetStringFromObj(objv
[2],NULL
);
1403 if (strcmp(s1
,"-this") == 0) {
1413 result
= (*cons
)(0, interp
, objc
-firstarg
, &objv
[firstarg
]);
1414 if (result
!= TCL_OK
) {
1417 newObj
= Tcl_DuplicateObj(Tcl_GetObjResult(interp
));
1418 if (!name
) name
= Tcl_GetStringFromObj(newObj
,NULL
);
1419 } else if (thisarg
> 0) {
1420 if (thisarg
< objc
) {
1422 newObj
= Tcl_DuplicateObj(objv
[thisarg
]);
1423 if (!name
) name
= Tcl_GetStringFromObj(newObj
,NULL
);
1425 Tcl_SetResult(interp
, (char *) "wrong # args.", TCL_STATIC
);
1429 Tcl_SetResult(interp
, (char *) "No constructor available.", TCL_STATIC
);
1432 if (SWIG_Tcl_ConvertPtr(interp
,newObj
, (void **) &thisvalue
, *(classptr
->type
), 0) != SWIG_OK
) {
1433 Tcl_DecrRefCount(newObj
);
1436 newinst
= (swig_instance
*) malloc(sizeof(swig_instance
));
1437 newinst
->thisptr
= newObj
;
1438 Tcl_IncrRefCount(newObj
);
1439 newinst
->thisvalue
= thisvalue
;
1440 newinst
->classptr
= classptr
;
1441 newinst
->destroy
= destroy
;
1443 SWIG_Acquire(thisvalue
);
1445 newinst
->cmdtok
= Tcl_CreateObjCommand(interp
,name
, (swig_wrapper
) SWIG_MethodCommand
, (ClientData
) newinst
, (swig_delete_func
) SWIG_ObjectDelete
);
1449 /* -----------------------------------------------------------------------------*
1451 * -----------------------------------------------------------------------------*/
1453 SWIG_Tcl_GetArgs(Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[], const char *fmt
, ...) {
1454 int argno
= 0, opt
= 0;
1464 for (c
= fmt
; (*c
&& (*c
!= ':') && (*c
!= ';')); c
++,argno
++) {
1469 if (argno
>= (objc
-1)) {
1471 Tcl_SetResult(interp
, (char *) "Wrong number of arguments ", TCL_STATIC
);
1479 vptr
= va_arg(ap
,void *);
1482 obj
= SWIG_Tcl_GetConstantObj(Tcl_GetStringFromObj(objv
[argno
+1],0));
1483 if (!obj
) obj
= objv
[argno
+1];
1485 obj
= objv
[argno
+1];
1492 if (Tcl_GetLongFromObj(interp
,obj
,&tempi
) != TCL_OK
) goto argerror
;
1493 if ((*c
== 'i') || (*c
== 'I')) *((int *)vptr
) = (int)tempi
;
1494 else if ((*c
== 'l') || (*c
== 'L')) *((long *)vptr
) = (long)tempi
;
1495 else if ((*c
== 'h') || (*c
== 'H')) *((short*)vptr
) = (short)tempi
;
1496 else if ((*c
== 'b') || (*c
== 'B')) *((unsigned char *)vptr
) = (unsigned char)tempi
;
1500 if (Tcl_GetDoubleFromObj(interp
,obj
,&tempd
) != TCL_OK
) goto argerror
;
1501 if ((*c
== 'f') || (*c
== 'F')) *((float *) vptr
) = (float)tempd
;
1502 else if ((*c
== 'd') || (*c
== 'D')) *((double*) vptr
) = tempd
;
1505 if (*(c
+1) == '#') {
1506 int *vlptr
= (int *) va_arg(ap
, void *);
1507 *((char **) vptr
) = Tcl_GetStringFromObj(obj
, vlptr
);
1510 *((char **)vptr
) = Tcl_GetStringFromObj(obj
,NULL
);
1514 *((char *)vptr
) = *(Tcl_GetStringFromObj(obj
,NULL
));
1517 ty
= (swig_type_info
*) va_arg(ap
, void *);
1518 if (SWIG_Tcl_ConvertPtr(interp
, obj
, (void **) vptr
, ty
, 0) != SWIG_OK
) goto argerror
;
1521 *((Tcl_Obj
**)vptr
) = objv
[argno
+1];
1529 if ((*c
!= ';') && ((objc
-1) > argno
)) {
1530 Tcl_SetResult(interp
, (char *) "Wrong # args.", TCL_STATIC
);
1539 sprintf(temp
,"%d", argno
+1);
1540 c
= strchr(fmt
,':');
1541 if (!c
) c
= strchr(fmt
,';');
1542 if (!c
) c
= (char *)"";
1543 Tcl_AppendResult(interp
,c
," argument ", temp
, NULL
);
1558 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1560 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1564 /* -------- TYPES TABLE (BEGIN) -------- */
1566 #define SWIGTYPE_p_char swig_types[0]
1567 #define SWIGTYPE_p_netpgp_t swig_types[1]
1568 #define SWIGTYPE_p_p_char swig_types[2]
1569 #define SWIGTYPE_p_void swig_types[3]
1570 static swig_type_info
*swig_types
[5];
1571 static swig_module_info swig_module
= {swig_types
, 4, 0, 0, 0, 0};
1572 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1573 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1575 /* -------- TYPES TABLE (END) -------- */
1577 #define SWIG_init Netpgptcl_Init
1578 #define SWIG_name "netpgptcl"
1579 #define SWIG_prefix ""
1580 #define SWIG_version "0.0"
1582 #define SWIGVERSION 0x010331
1583 #define SWIG_VERSION SWIGVERSION
1586 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
1587 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1597 SWIGEXPORT
int SWIG_init(Tcl_Interp
*);
1614 # define LLONG_MIN LONG_LONG_MIN
1617 # define LLONG_MAX LONG_LONG_MAX
1620 # define ULLONG_MAX ULONG_LONG_MAX
1625 SWIG_AsVal_unsigned_SS_long
SWIG_TCL_DECL_ARGS_2(Tcl_Obj
*obj
, unsigned long *val
) {
1627 if (Tcl_GetLongFromObj(0,obj
, &v
) == TCL_OK
) {
1629 if (val
) *val
= (unsigned long) v
;
1632 /* If v is negative, then this could be a negative number, or an
1633 unsigned value which doesn't fit in a signed long, so try to
1634 get it as a string so we can distinguish these cases. */
1638 const char *nptr
= Tcl_GetStringFromObj(obj
, &len
);
1639 if (nptr
&& len
> 0) {
1642 if (*nptr
== '-') return SWIG_OverflowError
;
1643 v
= strtoul(nptr
, &endptr
,0);
1644 if (errno
== ERANGE
) {
1646 return SWIG_OverflowError
;
1648 if (*endptr
== '\0') {
1656 return SWIG_TypeError
;
1661 SWIG_AsVal_unsigned_SS_int
SWIG_TCL_DECL_ARGS_2(Tcl_Obj
* obj
, unsigned int *val
)
1664 int res
= SWIG_AsVal_unsigned_SS_long
SWIG_TCL_CALL_ARGS_2(obj
, &v
);
1665 if (SWIG_IsOK(res
)) {
1666 if ((v
> UINT_MAX
)) {
1667 return SWIG_OverflowError
;
1669 if (val
) *val
= (unsigned int)(v
);
1676 SWIGINTERNINLINE Tcl_Obj
*
1677 SWIG_From_long (long value
)
1679 if (((long) INT_MIN
<= value
) && (value
<= (long) INT_MAX
)) {
1680 return Tcl_NewIntObj((int)(value
));
1682 return Tcl_NewLongObj(value
);
1688 #if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
1690 # define snprintf _snprintf
1695 SWIGINTERNINLINE Tcl_Obj
*
1696 SWIG_From_unsigned_SS_long (unsigned long value
)
1698 if (value
< (unsigned long) LONG_MAX
) {
1699 return SWIG_From_long ((long)(value
));
1702 sprintf(temp
, "%lu", value
);
1703 return Tcl_NewStringObj(temp
,-1);
1708 SWIGINTERNINLINE Tcl_Obj
*
1709 SWIG_From_unsigned_SS_int (unsigned int value
)
1711 return SWIG_From_unsigned_SS_long (value
);
1715 SWIGINTERNINLINE Tcl_Obj
*
1716 SWIG_From_int (int value
)
1718 return SWIG_From_long (value
);
1723 SWIG_AsCharPtrAndSize(Tcl_Obj
*obj
, char** cptr
, size_t* psize
, int *alloc
)
1726 char *cstr
= Tcl_GetStringFromObj(obj
, &len
);
1728 if (cptr
) *cptr
= cstr
;
1729 if (psize
) *psize
= len
+ 1;
1730 if (alloc
) *alloc
= SWIG_OLDOBJ
;
1733 return SWIG_TypeError
;
1740 SWIGINTERNINLINE Tcl_Obj
*
1741 SWIG_FromCharPtrAndSize(const char* carray
, size_t size
)
1743 return (size
< INT_MAX
) ? Tcl_NewStringObj(carray
, (int)(size
)) : NULL
;
1747 SWIGINTERNINLINE Tcl_Obj
*
1748 SWIG_FromCharPtr(const char *cptr
)
1750 return SWIG_FromCharPtrAndSize(cptr
, (cptr
? strlen(cptr
) : 0));
1755 SWIG_AsVal_long
SWIG_TCL_DECL_ARGS_2(Tcl_Obj
*obj
, long* val
)
1758 if (Tcl_GetLongFromObj(0,obj
, &v
) == TCL_OK
) {
1759 if (val
) *val
= (long) v
;
1762 return SWIG_TypeError
;
1767 SWIG_AsVal_int
SWIG_TCL_DECL_ARGS_2(Tcl_Obj
* obj
, int *val
)
1770 int res
= SWIG_AsVal_long
SWIG_TCL_CALL_ARGS_2(obj
, &v
);
1771 if (SWIG_IsOK(res
)) {
1772 if ((v
< INT_MIN
|| v
> INT_MAX
)) {
1773 return SWIG_OverflowError
;
1775 if (val
) *val
= (int)(v
);
1782 SWIGINTERNINLINE
int
1783 SWIG_AsVal_size_t
SWIG_TCL_DECL_ARGS_2(Tcl_Obj
* obj
, size_t *val
)
1786 int res
= SWIG_AsVal_unsigned_SS_long
SWIG_TCL_CALL_ARGS_2(obj
, val
? &v
: 0);
1787 if (SWIG_IsOK(res
) && val
) *val
= (size_t)(v
);
1795 _wrap_netpgp_t_c_set(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
1796 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1803 if (SWIG_GetArgs(interp
, objc
, objv
,"oo:netpgp_t_c_set self c ",(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
1804 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1805 if (!SWIG_IsOK(res1
)) {
1806 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_c_set" "', argument " "1"" of type '" "netpgp_t *""'");
1808 arg1
= (netpgp_t
*)(argp1
);
1809 ecode2
= SWIG_AsVal_unsigned_SS_int
SWIG_TCL_CALL_ARGS_2(objv
[2], &val2
);
1810 if (!SWIG_IsOK(ecode2
)) {
1811 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "netpgp_t_c_set" "', argument " "2"" of type '" "unsigned int""'");
1813 arg2
= (unsigned int)(val2
);
1814 if (arg1
) (arg1
)->c
= arg2
;
1824 _wrap_netpgp_t_c_get(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
1825 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1826 unsigned int result
;
1830 if (SWIG_GetArgs(interp
, objc
, objv
,"o:netpgp_t_c_get self ",(void *)0) == TCL_ERROR
) SWIG_fail
;
1831 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1832 if (!SWIG_IsOK(res1
)) {
1833 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_c_get" "', argument " "1"" of type '" "netpgp_t *""'");
1835 arg1
= (netpgp_t
*)(argp1
);
1836 result
= (unsigned int) ((arg1
)->c
);
1837 Tcl_SetObjResult(interp
,SWIG_From_unsigned_SS_int((unsigned int)(result
)));
1845 _wrap_netpgp_t_size_set(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
1846 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1853 if (SWIG_GetArgs(interp
, objc
, objv
,"oo:netpgp_t_size_set self size ",(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
1854 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1855 if (!SWIG_IsOK(res1
)) {
1856 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_size_set" "', argument " "1"" of type '" "netpgp_t *""'");
1858 arg1
= (netpgp_t
*)(argp1
);
1859 ecode2
= SWIG_AsVal_unsigned_SS_int
SWIG_TCL_CALL_ARGS_2(objv
[2], &val2
);
1860 if (!SWIG_IsOK(ecode2
)) {
1861 SWIG_exception_fail(SWIG_ArgError(ecode2
), "in method '" "netpgp_t_size_set" "', argument " "2"" of type '" "unsigned int""'");
1863 arg2
= (unsigned int)(val2
);
1864 if (arg1
) (arg1
)->size
= arg2
;
1874 _wrap_netpgp_t_size_get(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
1875 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1876 unsigned int result
;
1880 if (SWIG_GetArgs(interp
, objc
, objv
,"o:netpgp_t_size_get self ",(void *)0) == TCL_ERROR
) SWIG_fail
;
1881 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1882 if (!SWIG_IsOK(res1
)) {
1883 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_size_get" "', argument " "1"" of type '" "netpgp_t *""'");
1885 arg1
= (netpgp_t
*)(argp1
);
1886 result
= (unsigned int) ((arg1
)->size
);
1887 Tcl_SetObjResult(interp
,SWIG_From_unsigned_SS_int((unsigned int)(result
)));
1895 _wrap_netpgp_t_name_set(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
1896 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1897 char **arg2
= (char **) 0 ;
1903 if (SWIG_GetArgs(interp
, objc
, objv
,"oo:netpgp_t_name_set self name ",(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
1904 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1905 if (!SWIG_IsOK(res1
)) {
1906 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_name_set" "', argument " "1"" of type '" "netpgp_t *""'");
1908 arg1
= (netpgp_t
*)(argp1
);
1909 res2
= SWIG_ConvertPtr(objv
[2], &argp2
,SWIGTYPE_p_p_char
, 0 | 0 );
1910 if (!SWIG_IsOK(res2
)) {
1911 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_name_set" "', argument " "2"" of type '" "char **""'");
1913 arg2
= (char **)(argp2
);
1914 if (arg1
) (arg1
)->name
= arg2
;
1924 _wrap_netpgp_t_name_get(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
1925 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1930 if (SWIG_GetArgs(interp
, objc
, objv
,"o:netpgp_t_name_get self ",(void *)0) == TCL_ERROR
) SWIG_fail
;
1931 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1932 if (!SWIG_IsOK(res1
)) {
1933 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_name_get" "', argument " "1"" of type '" "netpgp_t *""'");
1935 arg1
= (netpgp_t
*)(argp1
);
1936 result
= (char **) ((arg1
)->name
);
1937 Tcl_SetObjResult(interp
, SWIG_NewInstanceObj( SWIG_as_voidptr(result
), SWIGTYPE_p_p_char
,0));
1945 _wrap_netpgp_t_value_set(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
1946 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1947 char **arg2
= (char **) 0 ;
1953 if (SWIG_GetArgs(interp
, objc
, objv
,"oo:netpgp_t_value_set self value ",(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
1954 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1955 if (!SWIG_IsOK(res1
)) {
1956 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_value_set" "', argument " "1"" of type '" "netpgp_t *""'");
1958 arg1
= (netpgp_t
*)(argp1
);
1959 res2
= SWIG_ConvertPtr(objv
[2], &argp2
,SWIGTYPE_p_p_char
, 0 | 0 );
1960 if (!SWIG_IsOK(res2
)) {
1961 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_value_set" "', argument " "2"" of type '" "char **""'");
1963 arg2
= (char **)(argp2
);
1964 if (arg1
) (arg1
)->value
= arg2
;
1974 _wrap_netpgp_t_value_get(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
1975 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1980 if (SWIG_GetArgs(interp
, objc
, objv
,"o:netpgp_t_value_get self ",(void *)0) == TCL_ERROR
) SWIG_fail
;
1981 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
1982 if (!SWIG_IsOK(res1
)) {
1983 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_value_get" "', argument " "1"" of type '" "netpgp_t *""'");
1985 arg1
= (netpgp_t
*)(argp1
);
1986 result
= (char **) ((arg1
)->value
);
1987 Tcl_SetObjResult(interp
, SWIG_NewInstanceObj( SWIG_as_voidptr(result
), SWIGTYPE_p_p_char
,0));
1995 _wrap_netpgp_t_pubring_set(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
1996 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
1997 void *arg2
= (void *) 0 ;
2002 if (SWIG_GetArgs(interp
, objc
, objv
,"oo:netpgp_t_pubring_set self pubring ",(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2003 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2004 if (!SWIG_IsOK(res1
)) {
2005 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_pubring_set" "', argument " "1"" of type '" "netpgp_t *""'");
2007 arg1
= (netpgp_t
*)(argp1
);
2008 res2
= SWIG_ConvertPtr(objv
[2],SWIG_as_voidptrptr(&arg2
), 0, SWIG_POINTER_DISOWN
);
2009 if (!SWIG_IsOK(res2
)) {
2010 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_pubring_set" "', argument " "2"" of type '" "void *""'");
2012 if (arg1
) (arg1
)->pubring
= arg2
;
2022 _wrap_netpgp_t_pubring_get(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2023 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2028 if (SWIG_GetArgs(interp
, objc
, objv
,"o:netpgp_t_pubring_get self ",(void *)0) == TCL_ERROR
) SWIG_fail
;
2029 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2030 if (!SWIG_IsOK(res1
)) {
2031 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_pubring_get" "', argument " "1"" of type '" "netpgp_t *""'");
2033 arg1
= (netpgp_t
*)(argp1
);
2034 result
= (void *) ((arg1
)->pubring
);
2035 Tcl_SetObjResult(interp
, SWIG_NewInstanceObj( SWIG_as_voidptr(result
), SWIGTYPE_p_void
,0));
2043 _wrap_netpgp_t_secring_set(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2044 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2045 void *arg2
= (void *) 0 ;
2050 if (SWIG_GetArgs(interp
, objc
, objv
,"oo:netpgp_t_secring_set self secring ",(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2051 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2052 if (!SWIG_IsOK(res1
)) {
2053 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_secring_set" "', argument " "1"" of type '" "netpgp_t *""'");
2055 arg1
= (netpgp_t
*)(argp1
);
2056 res2
= SWIG_ConvertPtr(objv
[2],SWIG_as_voidptrptr(&arg2
), 0, SWIG_POINTER_DISOWN
);
2057 if (!SWIG_IsOK(res2
)) {
2058 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_secring_set" "', argument " "2"" of type '" "void *""'");
2060 if (arg1
) (arg1
)->secring
= arg2
;
2070 _wrap_netpgp_t_secring_get(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2071 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2076 if (SWIG_GetArgs(interp
, objc
, objv
,"o:netpgp_t_secring_get self ",(void *)0) == TCL_ERROR
) SWIG_fail
;
2077 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2078 if (!SWIG_IsOK(res1
)) {
2079 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_secring_get" "', argument " "1"" of type '" "netpgp_t *""'");
2081 arg1
= (netpgp_t
*)(argp1
);
2082 result
= (void *) ((arg1
)->secring
);
2083 Tcl_SetObjResult(interp
, SWIG_NewInstanceObj( SWIG_as_voidptr(result
), SWIGTYPE_p_void
,0));
2091 _wrap_netpgp_t_io_set(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2092 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2093 void *arg2
= (void *) 0 ;
2098 if (SWIG_GetArgs(interp
, objc
, objv
,"oo:netpgp_t_io_set self io ",(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2099 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2100 if (!SWIG_IsOK(res1
)) {
2101 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_io_set" "', argument " "1"" of type '" "netpgp_t *""'");
2103 arg1
= (netpgp_t
*)(argp1
);
2104 res2
= SWIG_ConvertPtr(objv
[2],SWIG_as_voidptrptr(&arg2
), 0, SWIG_POINTER_DISOWN
);
2105 if (!SWIG_IsOK(res2
)) {
2106 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_io_set" "', argument " "2"" of type '" "void *""'");
2108 if (arg1
) (arg1
)->io
= arg2
;
2118 _wrap_netpgp_t_io_get(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2119 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2124 if (SWIG_GetArgs(interp
, objc
, objv
,"o:netpgp_t_io_get self ",(void *)0) == TCL_ERROR
) SWIG_fail
;
2125 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2126 if (!SWIG_IsOK(res1
)) {
2127 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_io_get" "', argument " "1"" of type '" "netpgp_t *""'");
2129 arg1
= (netpgp_t
*)(argp1
);
2130 result
= (void *) ((arg1
)->io
);
2131 Tcl_SetObjResult(interp
, SWIG_NewInstanceObj( SWIG_as_voidptr(result
), SWIGTYPE_p_void
,0));
2139 _wrap_netpgp_t_passfp_set(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2140 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2141 void *arg2
= (void *) 0 ;
2146 if (SWIG_GetArgs(interp
, objc
, objv
,"oo:netpgp_t_passfp_set self passfp ",(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2147 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2148 if (!SWIG_IsOK(res1
)) {
2149 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_passfp_set" "', argument " "1"" of type '" "netpgp_t *""'");
2151 arg1
= (netpgp_t
*)(argp1
);
2152 res2
= SWIG_ConvertPtr(objv
[2],SWIG_as_voidptrptr(&arg2
), 0, SWIG_POINTER_DISOWN
);
2153 if (!SWIG_IsOK(res2
)) {
2154 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_t_passfp_set" "', argument " "2"" of type '" "void *""'");
2156 if (arg1
) (arg1
)->passfp
= arg2
;
2166 _wrap_netpgp_t_passfp_get(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2167 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2172 if (SWIG_GetArgs(interp
, objc
, objv
,"o:netpgp_t_passfp_get self ",(void *)0) == TCL_ERROR
) SWIG_fail
;
2173 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2174 if (!SWIG_IsOK(res1
)) {
2175 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_t_passfp_get" "', argument " "1"" of type '" "netpgp_t *""'");
2177 arg1
= (netpgp_t
*)(argp1
);
2178 result
= (void *) ((arg1
)->passfp
);
2179 Tcl_SetObjResult(interp
, SWIG_NewInstanceObj( SWIG_as_voidptr(result
), SWIGTYPE_p_void
,0));
2187 _wrap_new_netpgp_t(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2188 netpgp_t
*result
= 0 ;
2190 if (SWIG_GetArgs(interp
, objc
, objv
,":new_netpgp_t ") == TCL_ERROR
) SWIG_fail
;
2191 result
= (netpgp_t
*)(netpgp_t
*) calloc(1, sizeof(netpgp_t
));
2192 Tcl_SetObjResult(interp
, SWIG_NewInstanceObj( SWIG_as_voidptr(result
), SWIGTYPE_p_netpgp_t
,0));
2200 _wrap_delete_netpgp_t(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2201 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2205 if (SWIG_GetArgs(interp
, objc
, objv
,"o:delete_netpgp_t self ",(void *)0) == TCL_ERROR
) SWIG_fail
;
2206 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, SWIG_POINTER_DISOWN
| 0 );
2207 if (!SWIG_IsOK(res1
)) {
2208 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "delete_netpgp_t" "', argument " "1"" of type '" "netpgp_t *""'");
2210 arg1
= (netpgp_t
*)(argp1
);
2211 free((char *) arg1
);
2220 SWIGINTERN
void swig_delete_netpgp_t(void *obj
) {
2221 netpgp_t
*arg1
= (netpgp_t
*) obj
;
2222 free((char *) arg1
);
2224 static swig_method swig_netpgp_t_methods
[] = {
2227 static swig_attribute swig_netpgp_t_attributes
[] = {
2228 { "-c",_wrap_netpgp_t_c_get
, _wrap_netpgp_t_c_set
},
2229 { "-size",_wrap_netpgp_t_size_get
, _wrap_netpgp_t_size_set
},
2230 { "-name",_wrap_netpgp_t_name_get
, _wrap_netpgp_t_name_set
},
2231 { "-value",_wrap_netpgp_t_value_get
, _wrap_netpgp_t_value_set
},
2232 { "-pubring",_wrap_netpgp_t_pubring_get
, _wrap_netpgp_t_pubring_set
},
2233 { "-secring",_wrap_netpgp_t_secring_get
, _wrap_netpgp_t_secring_set
},
2234 { "-io",_wrap_netpgp_t_io_get
, _wrap_netpgp_t_io_set
},
2235 { "-passfp",_wrap_netpgp_t_passfp_get
, _wrap_netpgp_t_passfp_set
},
2238 static swig_class
*swig_netpgp_t_bases
[] = {0};
2239 static char *swig_netpgp_t_base_names
[] = {0};
2240 static swig_class _wrap_class_netpgp_t
= { "netpgp_t", &SWIGTYPE_p_netpgp_t
,_wrap_new_netpgp_t
, swig_delete_netpgp_t
, swig_netpgp_t_methods
, swig_netpgp_t_attributes
, swig_netpgp_t_bases
,swig_netpgp_t_base_names
, &swig_module
};
2242 _wrap_netpgp_init(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2243 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2248 if (SWIG_GetArgs(interp
, objc
, objv
,"o:netpgp_init netpgp_t * ",(void *)0) == TCL_ERROR
) SWIG_fail
;
2249 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2250 if (!SWIG_IsOK(res1
)) {
2251 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_init" "', argument " "1"" of type '" "netpgp_t *""'");
2253 arg1
= (netpgp_t
*)(argp1
);
2254 result
= (int)netpgp_init(arg1
);
2255 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2263 _wrap_netpgp_end(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2264 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2269 if (SWIG_GetArgs(interp
, objc
, objv
,"o:netpgp_end netpgp_t * ",(void *)0) == TCL_ERROR
) SWIG_fail
;
2270 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2271 if (!SWIG_IsOK(res1
)) {
2272 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_end" "', argument " "1"" of type '" "netpgp_t *""'");
2274 arg1
= (netpgp_t
*)(argp1
);
2275 result
= (int)netpgp_end(arg1
);
2276 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2284 _wrap_netpgp_set_debug(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2285 char *arg1
= (char *) 0 ;
2291 if (SWIG_GetArgs(interp
, objc
, objv
,"o:netpgp_set_debug char const * ",(void *)0) == TCL_ERROR
) SWIG_fail
;
2292 res1
= SWIG_AsCharPtrAndSize(objv
[1], &buf1
, NULL
, &alloc1
);
2293 if (!SWIG_IsOK(res1
)) {
2294 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_set_debug" "', argument " "1"" of type '" "char const *""'");
2296 arg1
= (char *)(buf1
);
2297 result
= (int)netpgp_set_debug((char const *)arg1
);
2298 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2299 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
2302 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
2308 _wrap_netpgp_get_debug(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2309 char *arg1
= (char *) 0 ;
2315 if (SWIG_GetArgs(interp
, objc
, objv
,"o:netpgp_get_debug char const * ",(void *)0) == TCL_ERROR
) SWIG_fail
;
2316 res1
= SWIG_AsCharPtrAndSize(objv
[1], &buf1
, NULL
, &alloc1
);
2317 if (!SWIG_IsOK(res1
)) {
2318 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_get_debug" "', argument " "1"" of type '" "char const *""'");
2320 arg1
= (char *)(buf1
);
2321 result
= (int)netpgp_get_debug((char const *)arg1
);
2322 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2323 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
2326 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
2332 _wrap_netpgp_get_info(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2333 char *arg1
= (char *) 0 ;
2339 if (SWIG_GetArgs(interp
, objc
, objv
,"o:netpgp_get_info char const * ",(void *)0) == TCL_ERROR
) SWIG_fail
;
2340 res1
= SWIG_AsCharPtrAndSize(objv
[1], &buf1
, NULL
, &alloc1
);
2341 if (!SWIG_IsOK(res1
)) {
2342 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_get_info" "', argument " "1"" of type '" "char const *""'");
2344 arg1
= (char *)(buf1
);
2345 result
= (char *)netpgp_get_info((char const *)arg1
);
2346 Tcl_SetObjResult(interp
,SWIG_FromCharPtr((const char *)result
));
2347 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
2350 if (alloc1
== SWIG_NEWOBJ
) free((char*)buf1
);
2356 _wrap_netpgp_list_packets(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2357 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2358 char *arg2
= (char *) 0 ;
2360 char *arg4
= (char *) 0 ;
2373 if (SWIG_GetArgs(interp
, objc
, objv
,"oooo:netpgp_list_packets netpgp_t * char * int char * ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2374 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2375 if (!SWIG_IsOK(res1
)) {
2376 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_list_packets" "', argument " "1"" of type '" "netpgp_t *""'");
2378 arg1
= (netpgp_t
*)(argp1
);
2379 res2
= SWIG_AsCharPtrAndSize(objv
[2], &buf2
, NULL
, &alloc2
);
2380 if (!SWIG_IsOK(res2
)) {
2381 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_list_packets" "', argument " "2"" of type '" "char *""'");
2383 arg2
= (char *)(buf2
);
2384 ecode3
= SWIG_AsVal_int
SWIG_TCL_CALL_ARGS_2(objv
[3], &val3
);
2385 if (!SWIG_IsOK(ecode3
)) {
2386 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "netpgp_list_packets" "', argument " "3"" of type '" "int""'");
2389 res4
= SWIG_AsCharPtrAndSize(objv
[4], &buf4
, NULL
, &alloc4
);
2390 if (!SWIG_IsOK(res4
)) {
2391 SWIG_exception_fail(SWIG_ArgError(res4
), "in method '" "netpgp_list_packets" "', argument " "4"" of type '" "char *""'");
2393 arg4
= (char *)(buf4
);
2394 result
= (int)netpgp_list_packets(arg1
,arg2
,arg3
,arg4
);
2395 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2396 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2397 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
2400 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2401 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
2407 _wrap_netpgp_setvar(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2408 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2409 char *arg2
= (char *) 0 ;
2410 char *arg3
= (char *) 0 ;
2421 if (SWIG_GetArgs(interp
, objc
, objv
,"ooo:netpgp_setvar netpgp_t * char const * char const * ",(void *)0,(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2422 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2423 if (!SWIG_IsOK(res1
)) {
2424 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_setvar" "', argument " "1"" of type '" "netpgp_t *""'");
2426 arg1
= (netpgp_t
*)(argp1
);
2427 res2
= SWIG_AsCharPtrAndSize(objv
[2], &buf2
, NULL
, &alloc2
);
2428 if (!SWIG_IsOK(res2
)) {
2429 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_setvar" "', argument " "2"" of type '" "char const *""'");
2431 arg2
= (char *)(buf2
);
2432 res3
= SWIG_AsCharPtrAndSize(objv
[3], &buf3
, NULL
, &alloc3
);
2433 if (!SWIG_IsOK(res3
)) {
2434 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_setvar" "', argument " "3"" of type '" "char const *""'");
2436 arg3
= (char *)(buf3
);
2437 result
= (int)netpgp_setvar(arg1
,(char const *)arg2
,(char const *)arg3
);
2438 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2439 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2440 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
2443 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2444 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
2450 _wrap_netpgp_getvar(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2451 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2452 char *arg2
= (char *) 0 ;
2460 if (SWIG_GetArgs(interp
, objc
, objv
,"oo:netpgp_getvar netpgp_t * char const * ",(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2461 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2462 if (!SWIG_IsOK(res1
)) {
2463 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_getvar" "', argument " "1"" of type '" "netpgp_t *""'");
2465 arg1
= (netpgp_t
*)(argp1
);
2466 res2
= SWIG_AsCharPtrAndSize(objv
[2], &buf2
, NULL
, &alloc2
);
2467 if (!SWIG_IsOK(res2
)) {
2468 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_getvar" "', argument " "2"" of type '" "char const *""'");
2470 arg2
= (char *)(buf2
);
2471 result
= (char *)netpgp_getvar(arg1
,(char const *)arg2
);
2472 Tcl_SetObjResult(interp
,SWIG_FromCharPtr((const char *)result
));
2473 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2476 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2482 _wrap_netpgp_list_keys(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2483 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2488 if (SWIG_GetArgs(interp
, objc
, objv
,"o:netpgp_list_keys netpgp_t * ",(void *)0) == TCL_ERROR
) SWIG_fail
;
2489 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2490 if (!SWIG_IsOK(res1
)) {
2491 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_list_keys" "', argument " "1"" of type '" "netpgp_t *""'");
2493 arg1
= (netpgp_t
*)(argp1
);
2494 result
= (int)netpgp_list_keys(arg1
);
2495 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2503 _wrap_netpgp_list_sigs(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2504 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2505 char *arg2
= (char *) 0 ;
2513 if (SWIG_GetArgs(interp
, objc
, objv
,"oo:netpgp_list_sigs netpgp_t * char const * ",(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2514 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2515 if (!SWIG_IsOK(res1
)) {
2516 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_list_sigs" "', argument " "1"" of type '" "netpgp_t *""'");
2518 arg1
= (netpgp_t
*)(argp1
);
2519 res2
= SWIG_AsCharPtrAndSize(objv
[2], &buf2
, NULL
, &alloc2
);
2520 if (!SWIG_IsOK(res2
)) {
2521 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_list_sigs" "', argument " "2"" of type '" "char const *""'");
2523 arg2
= (char *)(buf2
);
2524 result
= (int)netpgp_list_sigs(arg1
,(char const *)arg2
);
2525 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2526 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2529 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2535 _wrap_netpgp_find_key(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2536 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2537 char *arg2
= (char *) 0 ;
2545 if (SWIG_GetArgs(interp
, objc
, objv
,"oo:netpgp_find_key netpgp_t * char * ",(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2546 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2547 if (!SWIG_IsOK(res1
)) {
2548 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_find_key" "', argument " "1"" of type '" "netpgp_t *""'");
2550 arg1
= (netpgp_t
*)(argp1
);
2551 res2
= SWIG_AsCharPtrAndSize(objv
[2], &buf2
, NULL
, &alloc2
);
2552 if (!SWIG_IsOK(res2
)) {
2553 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_find_key" "', argument " "2"" of type '" "char *""'");
2555 arg2
= (char *)(buf2
);
2556 result
= (int)netpgp_find_key(arg1
,arg2
);
2557 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2558 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2561 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2567 _wrap_netpgp_get_key(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2568 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2569 char *arg2
= (char *) 0 ;
2577 if (SWIG_GetArgs(interp
, objc
, objv
,"oo:netpgp_get_key netpgp_t * char const * ",(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2578 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2579 if (!SWIG_IsOK(res1
)) {
2580 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_get_key" "', argument " "1"" of type '" "netpgp_t *""'");
2582 arg1
= (netpgp_t
*)(argp1
);
2583 res2
= SWIG_AsCharPtrAndSize(objv
[2], &buf2
, NULL
, &alloc2
);
2584 if (!SWIG_IsOK(res2
)) {
2585 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_get_key" "', argument " "2"" of type '" "char const *""'");
2587 arg2
= (char *)(buf2
);
2588 result
= (char *)netpgp_get_key(arg1
,(char const *)arg2
);
2589 Tcl_SetObjResult(interp
,SWIG_FromCharPtr((const char *)result
));
2590 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2593 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2599 _wrap_netpgp_export_key(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2600 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2601 char *arg2
= (char *) 0 ;
2609 if (SWIG_GetArgs(interp
, objc
, objv
,"oo:netpgp_export_key netpgp_t * char * ",(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2610 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2611 if (!SWIG_IsOK(res1
)) {
2612 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_export_key" "', argument " "1"" of type '" "netpgp_t *""'");
2614 arg1
= (netpgp_t
*)(argp1
);
2615 res2
= SWIG_AsCharPtrAndSize(objv
[2], &buf2
, NULL
, &alloc2
);
2616 if (!SWIG_IsOK(res2
)) {
2617 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_export_key" "', argument " "2"" of type '" "char *""'");
2619 arg2
= (char *)(buf2
);
2620 result
= (int)netpgp_export_key(arg1
,arg2
);
2621 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2622 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2625 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2631 _wrap_netpgp_import_key(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2632 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2633 char *arg2
= (char *) 0 ;
2641 if (SWIG_GetArgs(interp
, objc
, objv
,"oo:netpgp_import_key netpgp_t * char * ",(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2642 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2643 if (!SWIG_IsOK(res1
)) {
2644 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_import_key" "', argument " "1"" of type '" "netpgp_t *""'");
2646 arg1
= (netpgp_t
*)(argp1
);
2647 res2
= SWIG_AsCharPtrAndSize(objv
[2], &buf2
, NULL
, &alloc2
);
2648 if (!SWIG_IsOK(res2
)) {
2649 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_import_key" "', argument " "2"" of type '" "char *""'");
2651 arg2
= (char *)(buf2
);
2652 result
= (int)netpgp_import_key(arg1
,arg2
);
2653 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2654 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2657 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2663 _wrap_netpgp_generate_key(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2664 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2665 char *arg2
= (char *) 0 ;
2676 if (SWIG_GetArgs(interp
, objc
, objv
,"ooo:netpgp_generate_key netpgp_t * char * int ",(void *)0,(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2677 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2678 if (!SWIG_IsOK(res1
)) {
2679 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_generate_key" "', argument " "1"" of type '" "netpgp_t *""'");
2681 arg1
= (netpgp_t
*)(argp1
);
2682 res2
= SWIG_AsCharPtrAndSize(objv
[2], &buf2
, NULL
, &alloc2
);
2683 if (!SWIG_IsOK(res2
)) {
2684 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_generate_key" "', argument " "2"" of type '" "char *""'");
2686 arg2
= (char *)(buf2
);
2687 ecode3
= SWIG_AsVal_int
SWIG_TCL_CALL_ARGS_2(objv
[3], &val3
);
2688 if (!SWIG_IsOK(ecode3
)) {
2689 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "netpgp_generate_key" "', argument " "3"" of type '" "int""'");
2692 result
= (int)netpgp_generate_key(arg1
,arg2
,arg3
);
2693 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2694 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2697 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2703 _wrap_netpgp_encrypt_file(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2704 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2705 char *arg2
= (char *) 0 ;
2706 char *arg3
= (char *) 0 ;
2707 char *arg4
= (char *) 0 ;
2724 if (SWIG_GetArgs(interp
, objc
, objv
,"ooooo:netpgp_encrypt_file netpgp_t * char const * char const * char * int ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2725 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2726 if (!SWIG_IsOK(res1
)) {
2727 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_encrypt_file" "', argument " "1"" of type '" "netpgp_t *""'");
2729 arg1
= (netpgp_t
*)(argp1
);
2730 res2
= SWIG_AsCharPtrAndSize(objv
[2], &buf2
, NULL
, &alloc2
);
2731 if (!SWIG_IsOK(res2
)) {
2732 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_encrypt_file" "', argument " "2"" of type '" "char const *""'");
2734 arg2
= (char *)(buf2
);
2735 res3
= SWIG_AsCharPtrAndSize(objv
[3], &buf3
, NULL
, &alloc3
);
2736 if (!SWIG_IsOK(res3
)) {
2737 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_encrypt_file" "', argument " "3"" of type '" "char const *""'");
2739 arg3
= (char *)(buf3
);
2740 res4
= SWIG_AsCharPtrAndSize(objv
[4], &buf4
, NULL
, &alloc4
);
2741 if (!SWIG_IsOK(res4
)) {
2742 SWIG_exception_fail(SWIG_ArgError(res4
), "in method '" "netpgp_encrypt_file" "', argument " "4"" of type '" "char *""'");
2744 arg4
= (char *)(buf4
);
2745 ecode5
= SWIG_AsVal_int
SWIG_TCL_CALL_ARGS_2(objv
[5], &val5
);
2746 if (!SWIG_IsOK(ecode5
)) {
2747 SWIG_exception_fail(SWIG_ArgError(ecode5
), "in method '" "netpgp_encrypt_file" "', argument " "5"" of type '" "int""'");
2750 result
= (int)netpgp_encrypt_file(arg1
,(char const *)arg2
,(char const *)arg3
,arg4
,arg5
);
2751 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2752 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2753 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
2754 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
2757 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2758 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
2759 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
2765 _wrap_netpgp_decrypt_file(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2766 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2767 char *arg2
= (char *) 0 ;
2768 char *arg3
= (char *) 0 ;
2782 if (SWIG_GetArgs(interp
, objc
, objv
,"oooo:netpgp_decrypt_file netpgp_t * char const * char * int ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2783 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2784 if (!SWIG_IsOK(res1
)) {
2785 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_decrypt_file" "', argument " "1"" of type '" "netpgp_t *""'");
2787 arg1
= (netpgp_t
*)(argp1
);
2788 res2
= SWIG_AsCharPtrAndSize(objv
[2], &buf2
, NULL
, &alloc2
);
2789 if (!SWIG_IsOK(res2
)) {
2790 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_decrypt_file" "', argument " "2"" of type '" "char const *""'");
2792 arg2
= (char *)(buf2
);
2793 res3
= SWIG_AsCharPtrAndSize(objv
[3], &buf3
, NULL
, &alloc3
);
2794 if (!SWIG_IsOK(res3
)) {
2795 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_decrypt_file" "', argument " "3"" of type '" "char *""'");
2797 arg3
= (char *)(buf3
);
2798 ecode4
= SWIG_AsVal_int
SWIG_TCL_CALL_ARGS_2(objv
[4], &val4
);
2799 if (!SWIG_IsOK(ecode4
)) {
2800 SWIG_exception_fail(SWIG_ArgError(ecode4
), "in method '" "netpgp_decrypt_file" "', argument " "4"" of type '" "int""'");
2803 result
= (int)netpgp_decrypt_file(arg1
,(char const *)arg2
,arg3
,arg4
);
2804 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2805 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2806 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
2809 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2810 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
2816 _wrap_netpgp_sign_file(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2817 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2818 char *arg2
= (char *) 0 ;
2819 char *arg3
= (char *) 0 ;
2820 char *arg4
= (char *) 0 ;
2843 if (SWIG_GetArgs(interp
, objc
, objv
,"ooooooo:netpgp_sign_file netpgp_t * char const * char const * char * int int int ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2844 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2845 if (!SWIG_IsOK(res1
)) {
2846 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_sign_file" "', argument " "1"" of type '" "netpgp_t *""'");
2848 arg1
= (netpgp_t
*)(argp1
);
2849 res2
= SWIG_AsCharPtrAndSize(objv
[2], &buf2
, NULL
, &alloc2
);
2850 if (!SWIG_IsOK(res2
)) {
2851 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_sign_file" "', argument " "2"" of type '" "char const *""'");
2853 arg2
= (char *)(buf2
);
2854 res3
= SWIG_AsCharPtrAndSize(objv
[3], &buf3
, NULL
, &alloc3
);
2855 if (!SWIG_IsOK(res3
)) {
2856 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_sign_file" "', argument " "3"" of type '" "char const *""'");
2858 arg3
= (char *)(buf3
);
2859 res4
= SWIG_AsCharPtrAndSize(objv
[4], &buf4
, NULL
, &alloc4
);
2860 if (!SWIG_IsOK(res4
)) {
2861 SWIG_exception_fail(SWIG_ArgError(res4
), "in method '" "netpgp_sign_file" "', argument " "4"" of type '" "char *""'");
2863 arg4
= (char *)(buf4
);
2864 ecode5
= SWIG_AsVal_int
SWIG_TCL_CALL_ARGS_2(objv
[5], &val5
);
2865 if (!SWIG_IsOK(ecode5
)) {
2866 SWIG_exception_fail(SWIG_ArgError(ecode5
), "in method '" "netpgp_sign_file" "', argument " "5"" of type '" "int""'");
2869 ecode6
= SWIG_AsVal_int
SWIG_TCL_CALL_ARGS_2(objv
[6], &val6
);
2870 if (!SWIG_IsOK(ecode6
)) {
2871 SWIG_exception_fail(SWIG_ArgError(ecode6
), "in method '" "netpgp_sign_file" "', argument " "6"" of type '" "int""'");
2874 ecode7
= SWIG_AsVal_int
SWIG_TCL_CALL_ARGS_2(objv
[7], &val7
);
2875 if (!SWIG_IsOK(ecode7
)) {
2876 SWIG_exception_fail(SWIG_ArgError(ecode7
), "in method '" "netpgp_sign_file" "', argument " "7"" of type '" "int""'");
2879 result
= (int)netpgp_sign_file(arg1
,(char const *)arg2
,(char const *)arg3
,arg4
,arg5
,arg6
,arg7
);
2880 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2881 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2882 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
2883 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
2886 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2887 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
2888 if (alloc4
== SWIG_NEWOBJ
) free((char*)buf4
);
2894 _wrap_netpgp_verify_file(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2895 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2896 char *arg2
= (char *) 0 ;
2897 char *arg3
= (char *) 0 ;
2911 if (SWIG_GetArgs(interp
, objc
, objv
,"oooo:netpgp_verify_file netpgp_t * char const * char const * int ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2912 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2913 if (!SWIG_IsOK(res1
)) {
2914 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_verify_file" "', argument " "1"" of type '" "netpgp_t *""'");
2916 arg1
= (netpgp_t
*)(argp1
);
2917 res2
= SWIG_AsCharPtrAndSize(objv
[2], &buf2
, NULL
, &alloc2
);
2918 if (!SWIG_IsOK(res2
)) {
2919 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_verify_file" "', argument " "2"" of type '" "char const *""'");
2921 arg2
= (char *)(buf2
);
2922 res3
= SWIG_AsCharPtrAndSize(objv
[3], &buf3
, NULL
, &alloc3
);
2923 if (!SWIG_IsOK(res3
)) {
2924 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_verify_file" "', argument " "3"" of type '" "char const *""'");
2926 arg3
= (char *)(buf3
);
2927 ecode4
= SWIG_AsVal_int
SWIG_TCL_CALL_ARGS_2(objv
[4], &val4
);
2928 if (!SWIG_IsOK(ecode4
)) {
2929 SWIG_exception_fail(SWIG_ArgError(ecode4
), "in method '" "netpgp_verify_file" "', argument " "4"" of type '" "int""'");
2932 result
= (int)netpgp_verify_file(arg1
,(char const *)arg2
,(char const *)arg3
,arg4
);
2933 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
2934 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2935 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
2938 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
2939 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
2945 _wrap_netpgp_sign_memory(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
2946 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
2947 char *arg2
= (char *) 0 ;
2948 char *arg3
= (char *) 0 ;
2950 char *arg5
= (char *) 0 ;
2975 if (SWIG_GetArgs(interp
, objc
, objv
,"oooooooo:netpgp_sign_memory netpgp_t * char const * char * size_t char * size_t unsigned int const unsigned int const ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
2976 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
2977 if (!SWIG_IsOK(res1
)) {
2978 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_sign_memory" "', argument " "1"" of type '" "netpgp_t *""'");
2980 arg1
= (netpgp_t
*)(argp1
);
2981 res2
= SWIG_AsCharPtrAndSize(objv
[2], &buf2
, NULL
, &alloc2
);
2982 if (!SWIG_IsOK(res2
)) {
2983 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_sign_memory" "', argument " "2"" of type '" "char const *""'");
2985 arg2
= (char *)(buf2
);
2986 res3
= SWIG_AsCharPtrAndSize(objv
[3], &buf3
, NULL
, &alloc3
);
2987 if (!SWIG_IsOK(res3
)) {
2988 SWIG_exception_fail(SWIG_ArgError(res3
), "in method '" "netpgp_sign_memory" "', argument " "3"" of type '" "char *""'");
2990 arg3
= (char *)(buf3
);
2991 ecode4
= SWIG_AsVal_size_t
SWIG_TCL_CALL_ARGS_2(objv
[4], &val4
);
2992 if (!SWIG_IsOK(ecode4
)) {
2993 SWIG_exception_fail(SWIG_ArgError(ecode4
), "in method '" "netpgp_sign_memory" "', argument " "4"" of type '" "size_t""'");
2995 arg4
= (size_t)(val4
);
2996 res5
= SWIG_AsCharPtrAndSize(objv
[5], &buf5
, NULL
, &alloc5
);
2997 if (!SWIG_IsOK(res5
)) {
2998 SWIG_exception_fail(SWIG_ArgError(res5
), "in method '" "netpgp_sign_memory" "', argument " "5"" of type '" "char *""'");
3000 arg5
= (char *)(buf5
);
3001 ecode6
= SWIG_AsVal_size_t
SWIG_TCL_CALL_ARGS_2(objv
[6], &val6
);
3002 if (!SWIG_IsOK(ecode6
)) {
3003 SWIG_exception_fail(SWIG_ArgError(ecode6
), "in method '" "netpgp_sign_memory" "', argument " "6"" of type '" "size_t""'");
3005 arg6
= (size_t)(val6
);
3006 ecode7
= SWIG_AsVal_unsigned_SS_int
SWIG_TCL_CALL_ARGS_2(objv
[7], &val7
);
3007 if (!SWIG_IsOK(ecode7
)) {
3008 SWIG_exception_fail(SWIG_ArgError(ecode7
), "in method '" "netpgp_sign_memory" "', argument " "7"" of type '" "unsigned int""'");
3010 arg7
= (unsigned int)(val7
);
3011 ecode8
= SWIG_AsVal_unsigned_SS_int
SWIG_TCL_CALL_ARGS_2(objv
[8], &val8
);
3012 if (!SWIG_IsOK(ecode8
)) {
3013 SWIG_exception_fail(SWIG_ArgError(ecode8
), "in method '" "netpgp_sign_memory" "', argument " "8"" of type '" "unsigned int""'");
3015 arg8
= (unsigned int)(val8
);
3016 result
= (int)netpgp_sign_memory(arg1
,(char const *)arg2
,arg3
,arg4
,arg5
,arg6
,arg7
,arg8
);
3017 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
3018 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3019 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3020 if (alloc5
== SWIG_NEWOBJ
) free((char*)buf5
);
3023 if (alloc2
== SWIG_NEWOBJ
) free((char*)buf2
);
3024 if (alloc3
== SWIG_NEWOBJ
) free((char*)buf3
);
3025 if (alloc5
== SWIG_NEWOBJ
) free((char*)buf5
);
3031 _wrap_netpgp_verify_memory(ClientData clientData SWIGUNUSED
, Tcl_Interp
*interp
, int objc
, Tcl_Obj
*CONST objv
[]) {
3032 netpgp_t
*arg1
= (netpgp_t
*) 0 ;
3033 void *arg2
= (void *) 0 ;
3045 if (SWIG_GetArgs(interp
, objc
, objv
,"oooo:netpgp_verify_memory netpgp_t * void const * size_t const int const ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR
) SWIG_fail
;
3046 res1
= SWIG_ConvertPtr(objv
[1], &argp1
,SWIGTYPE_p_netpgp_t
, 0 | 0 );
3047 if (!SWIG_IsOK(res1
)) {
3048 SWIG_exception_fail(SWIG_ArgError(res1
), "in method '" "netpgp_verify_memory" "', argument " "1"" of type '" "netpgp_t *""'");
3050 arg1
= (netpgp_t
*)(argp1
);
3051 res2
= SWIG_ConvertPtr(objv
[2],SWIG_as_voidptrptr(&arg2
), 0, 0);
3052 if (!SWIG_IsOK(res2
)) {
3053 SWIG_exception_fail(SWIG_ArgError(res2
), "in method '" "netpgp_verify_memory" "', argument " "2"" of type '" "void const *""'");
3055 ecode3
= SWIG_AsVal_size_t
SWIG_TCL_CALL_ARGS_2(objv
[3], &val3
);
3056 if (!SWIG_IsOK(ecode3
)) {
3057 SWIG_exception_fail(SWIG_ArgError(ecode3
), "in method '" "netpgp_verify_memory" "', argument " "3"" of type '" "size_t""'");
3059 arg3
= (size_t)(val3
);
3060 ecode4
= SWIG_AsVal_int
SWIG_TCL_CALL_ARGS_2(objv
[4], &val4
);
3061 if (!SWIG_IsOK(ecode4
)) {
3062 SWIG_exception_fail(SWIG_ArgError(ecode4
), "in method '" "netpgp_verify_memory" "', argument " "4"" of type '" "int""'");
3065 result
= (int)netpgp_verify_memory(arg1
,(void const *)arg2
,arg3
,arg4
);
3066 Tcl_SetObjResult(interp
,SWIG_From_int((int)(result
)));
3074 static swig_command_info swig_commands
[] = {
3075 { SWIG_prefix
"netpgp_t_c_set", (swig_wrapper_func
) _wrap_netpgp_t_c_set
, NULL
},
3076 { SWIG_prefix
"netpgp_t_c_get", (swig_wrapper_func
) _wrap_netpgp_t_c_get
, NULL
},
3077 { SWIG_prefix
"netpgp_t_size_set", (swig_wrapper_func
) _wrap_netpgp_t_size_set
, NULL
},
3078 { SWIG_prefix
"netpgp_t_size_get", (swig_wrapper_func
) _wrap_netpgp_t_size_get
, NULL
},
3079 { SWIG_prefix
"netpgp_t_name_set", (swig_wrapper_func
) _wrap_netpgp_t_name_set
, NULL
},
3080 { SWIG_prefix
"netpgp_t_name_get", (swig_wrapper_func
) _wrap_netpgp_t_name_get
, NULL
},
3081 { SWIG_prefix
"netpgp_t_value_set", (swig_wrapper_func
) _wrap_netpgp_t_value_set
, NULL
},
3082 { SWIG_prefix
"netpgp_t_value_get", (swig_wrapper_func
) _wrap_netpgp_t_value_get
, NULL
},
3083 { SWIG_prefix
"netpgp_t_pubring_set", (swig_wrapper_func
) _wrap_netpgp_t_pubring_set
, NULL
},
3084 { SWIG_prefix
"netpgp_t_pubring_get", (swig_wrapper_func
) _wrap_netpgp_t_pubring_get
, NULL
},
3085 { SWIG_prefix
"netpgp_t_secring_set", (swig_wrapper_func
) _wrap_netpgp_t_secring_set
, NULL
},
3086 { SWIG_prefix
"netpgp_t_secring_get", (swig_wrapper_func
) _wrap_netpgp_t_secring_get
, NULL
},
3087 { SWIG_prefix
"netpgp_t_io_set", (swig_wrapper_func
) _wrap_netpgp_t_io_set
, NULL
},
3088 { SWIG_prefix
"netpgp_t_io_get", (swig_wrapper_func
) _wrap_netpgp_t_io_get
, NULL
},
3089 { SWIG_prefix
"netpgp_t_passfp_set", (swig_wrapper_func
) _wrap_netpgp_t_passfp_set
, NULL
},
3090 { SWIG_prefix
"netpgp_t_passfp_get", (swig_wrapper_func
) _wrap_netpgp_t_passfp_get
, NULL
},
3091 { SWIG_prefix
"new_netpgp_t", (swig_wrapper_func
) _wrap_new_netpgp_t
, NULL
},
3092 { SWIG_prefix
"delete_netpgp_t", (swig_wrapper_func
) _wrap_delete_netpgp_t
, NULL
},
3093 { SWIG_prefix
"netpgp_t", (swig_wrapper_func
) SWIG_ObjectConstructor
, (ClientData
)&_wrap_class_netpgp_t
},
3094 { SWIG_prefix
"netpgp_init", (swig_wrapper_func
) _wrap_netpgp_init
, NULL
},
3095 { SWIG_prefix
"netpgp_end", (swig_wrapper_func
) _wrap_netpgp_end
, NULL
},
3096 { SWIG_prefix
"netpgp_set_debug", (swig_wrapper_func
) _wrap_netpgp_set_debug
, NULL
},
3097 { SWIG_prefix
"netpgp_get_debug", (swig_wrapper_func
) _wrap_netpgp_get_debug
, NULL
},
3098 { SWIG_prefix
"netpgp_get_info", (swig_wrapper_func
) _wrap_netpgp_get_info
, NULL
},
3099 { SWIG_prefix
"netpgp_list_packets", (swig_wrapper_func
) _wrap_netpgp_list_packets
, NULL
},
3100 { SWIG_prefix
"netpgp_setvar", (swig_wrapper_func
) _wrap_netpgp_setvar
, NULL
},
3101 { SWIG_prefix
"netpgp_getvar", (swig_wrapper_func
) _wrap_netpgp_getvar
, NULL
},
3102 { SWIG_prefix
"netpgp_list_keys", (swig_wrapper_func
) _wrap_netpgp_list_keys
, NULL
},
3103 { SWIG_prefix
"netpgp_list_sigs", (swig_wrapper_func
) _wrap_netpgp_list_sigs
, NULL
},
3104 { SWIG_prefix
"netpgp_find_key", (swig_wrapper_func
) _wrap_netpgp_find_key
, NULL
},
3105 { SWIG_prefix
"netpgp_get_key", (swig_wrapper_func
) _wrap_netpgp_get_key
, NULL
},
3106 { SWIG_prefix
"netpgp_export_key", (swig_wrapper_func
) _wrap_netpgp_export_key
, NULL
},
3107 { SWIG_prefix
"netpgp_import_key", (swig_wrapper_func
) _wrap_netpgp_import_key
, NULL
},
3108 { SWIG_prefix
"netpgp_generate_key", (swig_wrapper_func
) _wrap_netpgp_generate_key
, NULL
},
3109 { SWIG_prefix
"netpgp_encrypt_file", (swig_wrapper_func
) _wrap_netpgp_encrypt_file
, NULL
},
3110 { SWIG_prefix
"netpgp_decrypt_file", (swig_wrapper_func
) _wrap_netpgp_decrypt_file
, NULL
},
3111 { SWIG_prefix
"netpgp_sign_file", (swig_wrapper_func
) _wrap_netpgp_sign_file
, NULL
},
3112 { SWIG_prefix
"netpgp_verify_file", (swig_wrapper_func
) _wrap_netpgp_verify_file
, NULL
},
3113 { SWIG_prefix
"netpgp_sign_memory", (swig_wrapper_func
) _wrap_netpgp_sign_memory
, NULL
},
3114 { SWIG_prefix
"netpgp_verify_memory", (swig_wrapper_func
) _wrap_netpgp_verify_memory
, NULL
},
3118 static swig_var_info swig_variables
[] = {
3122 static swig_const_info swig_constants
[] = {
3126 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3128 static swig_type_info _swigt__p_char
= {"_p_char", "char *", 0, 0, (void*)0, 0};
3129 static swig_type_info _swigt__p_netpgp_t
= {"_p_netpgp_t", "struct netpgp_t *|netpgp_t *", 0, 0, (void*)&_wrap_class_netpgp_t
, 0};
3130 static swig_type_info _swigt__p_p_char
= {"_p_p_char", "char **", 0, 0, (void*)0, 0};
3131 static swig_type_info _swigt__p_void
= {"_p_void", "void *", 0, 0, (void*)0, 0};
3133 static swig_type_info
*swig_type_initial
[] = {
3135 &_swigt__p_netpgp_t
,
3140 static swig_cast_info _swigc__p_char
[] = { {&_swigt__p_char
, 0, 0, 0},{0, 0, 0, 0}};
3141 static swig_cast_info _swigc__p_netpgp_t
[] = { {&_swigt__p_netpgp_t
, 0, 0, 0},{0, 0, 0, 0}};
3142 static swig_cast_info _swigc__p_p_char
[] = { {&_swigt__p_p_char
, 0, 0, 0},{0, 0, 0, 0}};
3143 static swig_cast_info _swigc__p_void
[] = { {&_swigt__p_void
, 0, 0, 0},{0, 0, 0, 0}};
3145 static swig_cast_info
*swig_cast_initial
[] = {
3153 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3158 /* -----------------------------------------------------------------------------
3159 * Type initialization:
3160 * This problem is tough by the requirement that no dynamic
3161 * memory is used. Also, since swig_type_info structures store pointers to
3162 * swig_cast_info structures and swig_cast_info structures store pointers back
3163 * to swig_type_info structures, we need some lookup code at initialization.
3164 * The idea is that swig generates all the structures that are needed.
3165 * The runtime then collects these partially filled structures.
3166 * The SWIG_InitializeModule function takes these initial arrays out of
3167 * swig_module, and does all the lookup, filling in the swig_module.types
3168 * array with the correct data and linking the correct swig_cast_info
3169 * structures together.
3171 * The generated swig_type_info structures are assigned staticly to an initial
3172 * array. We just loop through that array, and handle each type individually.
3173 * First we lookup if this type has been already loaded, and if so, use the
3174 * loaded structure instead of the generated one. Then we have to fill in the
3175 * cast linked list. The cast data is initially stored in something like a
3176 * two-dimensional array. Each row corresponds to a type (there are the same
3177 * number of rows as there are in the swig_type_initial array). Each entry in
3178 * a column is one of the swig_cast_info structures for that type.
3179 * The cast_initial array is actually an array of arrays, because each row has
3180 * a variable number of columns. So to actually build the cast linked list,
3181 * we find the array of casts associated with the type, and loop through it
3182 * adding the casts to the list. The one last trick we need to do is making
3183 * sure the type pointer in the swig_cast_info struct is correct.
3185 * First off, we lookup the cast->type name to see if it is already loaded.
3186 * There are three cases to handle:
3187 * 1) If the cast->type has already been loaded AND the type we are adding
3188 * casting info to has not been loaded (it is in this module), THEN we
3189 * replace the cast->type pointer with the type pointer that has already
3191 * 2) If BOTH types (the one we are adding casting info to, and the
3192 * cast->type) are loaded, THEN the cast info has already been loaded by
3193 * the previous module so we just ignore it.
3194 * 3) Finally, if cast->type has not already been loaded, then we add that
3195 * swig_cast_info to the linked list (because the cast->type) pointer will
3197 * ----------------------------------------------------------------------------- */
3207 #define SWIGRUNTIME_DEBUG
3212 SWIG_InitializeModule(void *clientdata
) {
3214 swig_module_info
*module_head
, *iter
;
3217 clientdata
= clientdata
;
3219 /* check to see if the circular list has been setup, if not, set it up */
3220 if (swig_module
.next
==0) {
3221 /* Initialize the swig_module */
3222 swig_module
.type_initial
= swig_type_initial
;
3223 swig_module
.cast_initial
= swig_cast_initial
;
3224 swig_module
.next
= &swig_module
;
3227 /* Try and load any already created modules */
3228 module_head
= SWIG_GetModule(clientdata
);
3230 /* This is the first module loaded for this interpreter */
3231 /* so set the swig module into the interpreter */
3232 SWIG_SetModule(clientdata
, &swig_module
);
3233 module_head
= &swig_module
;
3235 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
3239 if (iter
==&swig_module
) {
3244 } while (iter
!= module_head
);
3246 /* if the is found in the list, then all is done and we may leave */
3248 /* otherwise we must add out module into the list */
3249 swig_module
.next
= module_head
->next
;
3250 module_head
->next
= &swig_module
;
3253 /* Now work on filling in swig_module.types */
3254 #ifdef SWIGRUNTIME_DEBUG
3255 printf("SWIG_InitializeModule: size %d\n", swig_module
.size
);
3257 for (i
= 0; i
< swig_module
.size
; ++i
) {
3258 swig_type_info
*type
= 0;
3259 swig_type_info
*ret
;
3260 swig_cast_info
*cast
;
3262 #ifdef SWIGRUNTIME_DEBUG
3263 printf("SWIG_InitializeModule: type %d %s\n", i
, swig_module
.type_initial
[i
]->name
);
3266 /* if there is another module already loaded */
3267 if (swig_module
.next
!= &swig_module
) {
3268 type
= SWIG_MangledTypeQueryModule(swig_module
.next
, &swig_module
, swig_module
.type_initial
[i
]->name
);
3271 /* Overwrite clientdata field */
3272 #ifdef SWIGRUNTIME_DEBUG
3273 printf("SWIG_InitializeModule: found type %s\n", type
->name
);
3275 if (swig_module
.type_initial
[i
]->clientdata
) {
3276 type
->clientdata
= swig_module
.type_initial
[i
]->clientdata
;
3277 #ifdef SWIGRUNTIME_DEBUG
3278 printf("SWIG_InitializeModule: found and overwrite type %s \n", type
->name
);
3282 type
= swig_module
.type_initial
[i
];
3285 /* Insert casting types */
3286 cast
= swig_module
.cast_initial
[i
];
3287 while (cast
->type
) {
3288 /* Don't need to add information already in the list */
3290 #ifdef SWIGRUNTIME_DEBUG
3291 printf("SWIG_InitializeModule: look cast %s\n", cast
->type
->name
);
3293 if (swig_module
.next
!= &swig_module
) {
3294 ret
= SWIG_MangledTypeQueryModule(swig_module
.next
, &swig_module
, cast
->type
->name
);
3295 #ifdef SWIGRUNTIME_DEBUG
3296 if (ret
) printf("SWIG_InitializeModule: found cast %s\n", ret
->name
);
3300 if (type
== swig_module
.type_initial
[i
]) {
3301 #ifdef SWIGRUNTIME_DEBUG
3302 printf("SWIG_InitializeModule: skip old type %s\n", ret
->name
);
3307 /* Check for casting already in the list */
3308 swig_cast_info
*ocast
= SWIG_TypeCheck(ret
->name
, type
);
3309 #ifdef SWIGRUNTIME_DEBUG
3310 if (ocast
) printf("SWIG_InitializeModule: skip old cast %s\n", ret
->name
);
3312 if (!ocast
) ret
= 0;
3317 #ifdef SWIGRUNTIME_DEBUG
3318 printf("SWIG_InitializeModule: adding cast %s\n", cast
->type
->name
);
3321 type
->cast
->prev
= cast
;
3322 cast
->next
= type
->cast
;
3328 /* Set entry in modules->types array equal to the type */
3329 swig_module
.types
[i
] = type
;
3331 swig_module
.types
[i
] = 0;
3333 #ifdef SWIGRUNTIME_DEBUG
3334 printf("**** SWIG_InitializeModule: Cast List ******\n");
3335 for (i
= 0; i
< swig_module
.size
; ++i
) {
3337 swig_cast_info
*cast
= swig_module
.cast_initial
[i
];
3338 printf("SWIG_InitializeModule: type %d %s\n", i
, swig_module
.type_initial
[i
]->name
);
3339 while (cast
->type
) {
3340 printf("SWIG_InitializeModule: cast type %s\n", cast
->type
->name
);
3344 printf("---- Total casts: %d\n",j
);
3346 printf("**** SWIG_InitializeModule: Cast List ******\n");
3350 /* This function will propagate the clientdata field of type to
3351 * any new swig_type_info structures that have been added into the list
3352 * of equivalent types. It is like calling
3353 * SWIG_TypeClientData(type, clientdata) a second time.
3356 SWIG_PropagateClientData(void) {
3358 swig_cast_info
*equiv
;
3359 static int init_run
= 0;
3361 if (init_run
) return;
3364 for (i
= 0; i
< swig_module
.size
; i
++) {
3365 if (swig_module
.types
[i
]->clientdata
) {
3366 equiv
= swig_module
.types
[i
]->cast
;
3368 if (!equiv
->converter
) {
3369 if (equiv
->type
&& !equiv
->type
->clientdata
)
3370 SWIG_TypeClientData(equiv
->type
, swig_module
.types
[i
]->clientdata
);
3372 equiv
= equiv
->next
;
3391 /* -----------------------------------------------------------------------------
3392 * constants/methods manipulation
3393 * ----------------------------------------------------------------------------- */
3395 /* Install Constants */
3398 SWIG_Tcl_InstallConstants(Tcl_Interp
*interp
, swig_const_info constants
[]) {
3402 if (!swigconstTableinit
) {
3403 Tcl_InitHashTable(&swigconstTable
, TCL_STRING_KEYS
);
3404 swigconstTableinit
= 1;
3406 for (i
= 0; constants
[i
].type
; i
++) {
3407 switch(constants
[i
].type
) {
3408 case SWIG_TCL_POINTER
:
3409 obj
= SWIG_NewPointerObj(constants
[i
].pvalue
, *(constants
[i
]).ptype
,0);
3411 case SWIG_TCL_BINARY
:
3412 obj
= SWIG_NewPackedObj(constants
[i
].pvalue
, constants
[i
].lvalue
, *(constants
[i
].ptype
));
3419 SWIG_Tcl_SetConstantObj(interp
, constants
[i
].name
, obj
);
3428 /* -----------------------------------------------------------------------------*
3429 * Partial Init method
3430 * -----------------------------------------------------------------------------*/
3432 SWIGEXPORT
int SWIG_init(Tcl_Interp
*interp
) {
3434 if (interp
== 0) return TCL_ERROR
;
3435 #ifdef USE_TCL_STUBS
3436 if (Tcl_InitStubs(interp
, (char*)"8.1", 0) == NULL
) {
3440 Tcl_PkgProvide(interp
, (char*)SWIG_name
, (char*)SWIG_version
);
3442 #ifdef SWIG_namespace
3443 Tcl_Eval(interp
, "namespace eval " SWIG_namespace
" { }");
3446 SWIG_InitializeModule((void *) interp
);
3447 SWIG_PropagateClientData();
3449 for (i
= 0; swig_commands
[i
].name
; i
++) {
3450 Tcl_CreateObjCommand(interp
, (char *) swig_commands
[i
].name
, (swig_wrapper_func
) swig_commands
[i
].wrapper
,
3451 swig_commands
[i
].clientdata
, NULL
);
3453 for (i
= 0; swig_variables
[i
].name
; i
++) {
3454 Tcl_SetVar(interp
, (char *) swig_variables
[i
].name
, (char *) "", TCL_GLOBAL_ONLY
);
3455 Tcl_TraceVar(interp
, (char *) swig_variables
[i
].name
, TCL_TRACE_READS
| TCL_GLOBAL_ONLY
,
3456 (Tcl_VarTraceProc
*) swig_variables
[i
].get
, (ClientData
) swig_variables
[i
].addr
);
3457 Tcl_TraceVar(interp
, (char *) swig_variables
[i
].name
, TCL_TRACE_WRITES
| TCL_GLOBAL_ONLY
,
3458 (Tcl_VarTraceProc
*) swig_variables
[i
].set
, (ClientData
) swig_variables
[i
].addr
);
3461 SWIG_Tcl_InstallConstants(interp
, swig_constants
);
3466 SWIGEXPORT
int Netpgptcl_SafeInit(Tcl_Interp
*interp
) {
3467 return SWIG_init(interp
);