Points&Forces (survey)
Software tools facilitating the task of surveying architecture
a_colorsTCL8_wrap.cxx
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.2
4  *
5  * This file is not intended to be easily readable and contains a number of
6  * coding conventions designed to improve portability and efficiency. Do not make
7  * changes to this file unless you know what you are doing--modify the SWIG
8  * interface file instead.
9  * ----------------------------------------------------------------------------- */
10 
11 
12 #ifndef SWIGTCL
13 #define SWIGTCL
14 #endif
15 
16 
17 #ifdef __cplusplus
18 /* SwigValueWrapper is described in swig.swg */
19 template<typename T> class SwigValueWrapper {
20  struct SwigMovePointer {
21  T *ptr;
22  SwigMovePointer(T *p) : ptr(p) { }
23  ~SwigMovePointer() { delete ptr; }
24  SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
25  } pointer;
26  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
27  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
28 public:
29  SwigValueWrapper() : pointer(0) { }
30  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
31  operator T&() const { return *pointer.ptr; }
32  T *operator&() { return pointer.ptr; }
33 };
34 
35 template <typename T> T SwigValueInit() {
36  return T();
37 }
38 #endif
39 
40 /* -----------------------------------------------------------------------------
41  * This section contains generic SWIG labels for method/variable
42  * declarations/attributes, and other compiler dependent labels.
43  * ----------------------------------------------------------------------------- */
44 
45 /* template workaround for compilers that cannot correctly implement the C++ standard */
46 #ifndef SWIGTEMPLATEDISAMBIGUATOR
47 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
48 # define SWIGTEMPLATEDISAMBIGUATOR template
49 # elif defined(__HP_aCC)
50 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
51 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
52 # define SWIGTEMPLATEDISAMBIGUATOR template
53 # else
54 # define SWIGTEMPLATEDISAMBIGUATOR
55 # endif
56 #endif
57 
58 /* inline attribute */
59 #ifndef SWIGINLINE
60 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
61 # define SWIGINLINE inline
62 # else
63 # define SWIGINLINE
64 # endif
65 #endif
66 
67 /* attribute recognised by some compilers to avoid 'unused' warnings */
68 #ifndef SWIGUNUSED
69 # if defined(__GNUC__)
70 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
71 # define SWIGUNUSED __attribute__ ((__unused__))
72 # else
73 # define SWIGUNUSED
74 # endif
75 # elif defined(__ICC)
76 # define SWIGUNUSED __attribute__ ((__unused__))
77 # else
78 # define SWIGUNUSED
79 # endif
80 #endif
81 
82 #ifndef SWIG_MSC_UNSUPPRESS_4505
83 # if defined(_MSC_VER)
84 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
85 # endif
86 #endif
87 
88 #ifndef SWIGUNUSEDPARM
89 # ifdef __cplusplus
90 # define SWIGUNUSEDPARM(p)
91 # else
92 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
93 # endif
94 #endif
95 
96 /* internal SWIG method */
97 #ifndef SWIGINTERN
98 # define SWIGINTERN static SWIGUNUSED
99 #endif
100 
101 /* internal inline SWIG method */
102 #ifndef SWIGINTERNINLINE
103 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
104 #endif
105 
106 /* exporting methods */
107 #if defined(__GNUC__)
108 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
109 # ifndef GCC_HASCLASSVISIBILITY
110 # define GCC_HASCLASSVISIBILITY
111 # endif
112 # endif
113 #endif
114 
115 #ifndef SWIGEXPORT
116 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
117 # if defined(STATIC_LINKED)
118 # define SWIGEXPORT
119 # else
120 # define SWIGEXPORT __declspec(dllexport)
121 # endif
122 # else
123 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
124 # define SWIGEXPORT __attribute__ ((visibility("default")))
125 # else
126 # define SWIGEXPORT
127 # endif
128 # endif
129 #endif
130 
131 /* calling conventions for Windows */
132 #ifndef SWIGSTDCALL
133 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
134 # define SWIGSTDCALL __stdcall
135 # else
136 # define SWIGSTDCALL
137 # endif
138 #endif
139 
140 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
141 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
142 # define _CRT_SECURE_NO_DEPRECATE
143 #endif
144 
145 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
146 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
147 # define _SCL_SECURE_NO_DEPRECATE
148 #endif
149 
150 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
151 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
152 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
153 #endif
154 
155 /* Intel's compiler complains if a variable which was never initialised is
156  * cast to void, which is a common idiom which we use to indicate that we
157  * are aware a variable isn't used. So we just silence that warning.
158  * See: https://github.com/swig/swig/issues/192 for more discussion.
159  */
160 #ifdef __INTEL_COMPILER
161 # pragma warning disable 592
162 #endif
163 
164 
165 #include <stdio.h>
166 #include <tcl.h>
167 #include <errno.h>
168 #include <stdlib.h>
169 #include <stdarg.h>
170 #include <ctype.h>
171 
172 /* -----------------------------------------------------------------------------
173  * swigrun.swg
174  *
175  * This file contains generic C API SWIG runtime support for pointer
176  * type checking.
177  * ----------------------------------------------------------------------------- */
178 
179 /* This should only be incremented when either the layout of swig_type_info changes,
180  or for whatever reason, the runtime changes incompatibly */
181 #define SWIG_RUNTIME_VERSION "4"
182 
183 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
184 #ifdef SWIG_TYPE_TABLE
185 # define SWIG_QUOTE_STRING(x) #x
186 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
187 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
188 #else
189 # define SWIG_TYPE_TABLE_NAME
190 #endif
191 
192 /*
193  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
194  creating a static or dynamic library from the SWIG runtime code.
195  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
196 
197  But only do this if strictly necessary, ie, if you have problems
198  with your compiler or suchlike.
199 */
200 
201 #ifndef SWIGRUNTIME
202 # define SWIGRUNTIME SWIGINTERN
203 #endif
204 
205 #ifndef SWIGRUNTIMEINLINE
206 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
207 #endif
208 
209 /* Generic buffer size */
210 #ifndef SWIG_BUFFER_SIZE
211 # define SWIG_BUFFER_SIZE 1024
212 #endif
213 
214 /* Flags for pointer conversions */
215 #define SWIG_POINTER_DISOWN 0x1
216 #define SWIG_CAST_NEW_MEMORY 0x2
217 #define SWIG_POINTER_NO_NULL 0x4
218 
219 /* Flags for new pointer objects */
220 #define SWIG_POINTER_OWN 0x1
221 
222 
223 /*
224  Flags/methods for returning states.
225 
226  The SWIG conversion methods, as ConvertPtr, return an integer
227  that tells if the conversion was successful or not. And if not,
228  an error code can be returned (see swigerrors.swg for the codes).
229 
230  Use the following macros/flags to set or process the returning
231  states.
232 
233  In old versions of SWIG, code such as the following was usually written:
234 
235  if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
236  // success code
237  } else {
238  //fail code
239  }
240 
241  Now you can be more explicit:
242 
243  int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
244  if (SWIG_IsOK(res)) {
245  // success code
246  } else {
247  // fail code
248  }
249 
250  which is the same really, but now you can also do
251 
252  Type *ptr;
253  int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
254  if (SWIG_IsOK(res)) {
255  // success code
256  if (SWIG_IsNewObj(res) {
257  ...
258  delete *ptr;
259  } else {
260  ...
261  }
262  } else {
263  // fail code
264  }
265 
266  I.e., now SWIG_ConvertPtr can return new objects and you can
267  identify the case and take care of the deallocation. Of course that
268  also requires SWIG_ConvertPtr to return new result values, such as
269 
270  int SWIG_ConvertPtr(obj, ptr,...) {
271  if (<obj is ok>) {
272  if (<need new object>) {
273  *ptr = <ptr to new allocated object>;
274  return SWIG_NEWOBJ;
275  } else {
276  *ptr = <ptr to old object>;
277  return SWIG_OLDOBJ;
278  }
279  } else {
280  return SWIG_BADOBJ;
281  }
282  }
283 
284  Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
285  more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
286  SWIG errors code.
287 
288  Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
289  allows to return the 'cast rank', for example, if you have this
290 
291  int food(double)
292  int fooi(int);
293 
294  and you call
295 
296  food(1) // cast rank '1' (1 -> 1.0)
297  fooi(1) // cast rank '0'
298 
299  just use the SWIG_AddCast()/SWIG_CheckState()
300 */
301 
302 #define SWIG_OK (0)
303 #define SWIG_ERROR (-1)
304 #define SWIG_IsOK(r) (r >= 0)
305 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
306 
307 /* The CastRankLimit says how many bits are used for the cast rank */
308 #define SWIG_CASTRANKLIMIT (1 << 8)
309 /* The NewMask denotes the object was created (using new/malloc) */
310 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
311 /* The TmpMask is for in/out typemaps that use temporal objects */
312 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
313 /* Simple returning values */
314 #define SWIG_BADOBJ (SWIG_ERROR)
315 #define SWIG_OLDOBJ (SWIG_OK)
316 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
317 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
318 /* Check, add and del mask methods */
319 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
320 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
321 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
322 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
323 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
324 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
325 
326 /* Cast-Rank Mode */
327 #if defined(SWIG_CASTRANK_MODE)
328 # ifndef SWIG_TypeRank
329 # define SWIG_TypeRank unsigned long
330 # endif
331 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
332 # define SWIG_MAXCASTRANK (2)
333 # endif
334 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
335 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
336 SWIGINTERNINLINE int SWIG_AddCast(int r) {
337  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
338 }
340  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
341 }
342 #else /* no cast-rank mode */
343 # define SWIG_AddCast(r) (r)
344 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
345 #endif
346 
347 
348 #include <string.h>
349 
350 #ifdef __cplusplus
351 extern "C" {
352 #endif
353 
354 typedef void *(*swig_converter_func)(void *, int *);
355 typedef struct swig_type_info *(*swig_dycast_func)(void **);
356 
357 /* Structure to store information on one type */
358 typedef struct swig_type_info {
359  const char *name; /* mangled name of this type */
360  const char *str; /* human readable name of this type */
361  swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
362  struct swig_cast_info *cast; /* linked list of types that can cast into this type */
363  void *clientdata; /* language specific type data */
364  int owndata; /* flag if the structure owns the clientdata */
366 
367 /* Structure to store a type and conversion function used for casting */
368 typedef struct swig_cast_info {
369  swig_type_info *type; /* pointer to type that is equivalent to this type */
370  swig_converter_func converter; /* function to cast the void pointers */
371  struct swig_cast_info *next; /* pointer to next cast in linked list */
372  struct swig_cast_info *prev; /* pointer to the previous cast */
374 
375 /* Structure used to store module information
376  * Each module generates one structure like this, and the runtime collects
377  * all of these structures and stores them in a circularly linked list.*/
378 typedef struct swig_module_info {
379  swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
380  size_t size; /* Number of types in this module */
381  struct swig_module_info *next; /* Pointer to next element in circularly linked list */
382  swig_type_info **type_initial; /* Array of initially generated type structures */
383  swig_cast_info **cast_initial; /* Array of initially generated casting structures */
384  void *clientdata; /* Language specific module data */
386 
387 /*
388  Compare two type names skipping the space characters, therefore
389  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
390 
391  Return 0 when the two name types are equivalent, as in
392  strncmp, but skipping ' '.
393 */
394 SWIGRUNTIME int
395 SWIG_TypeNameComp(const char *f1, const char *l1,
396  const char *f2, const char *l2) {
397  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
398  while ((*f1 == ' ') && (f1 != l1)) ++f1;
399  while ((*f2 == ' ') && (f2 != l2)) ++f2;
400  if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
401  }
402  return (int)((l1 - f1) - (l2 - f2));
403 }
404 
405 /*
406  Check type equivalence in a name list like <name1>|<name2>|...
407  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
408 */
409 SWIGRUNTIME int
410 SWIG_TypeCmp(const char *nb, const char *tb) {
411  int equiv = 1;
412  const char* te = tb + strlen(tb);
413  const char* ne = nb;
414  while (equiv != 0 && *ne) {
415  for (nb = ne; *ne; ++ne) {
416  if (*ne == '|') break;
417  }
418  equiv = SWIG_TypeNameComp(nb, ne, tb, te);
419  if (*ne) ++ne;
420  }
421  return equiv;
422 }
423 
424 /*
425  Check type equivalence in a name list like <name1>|<name2>|...
426  Return 0 if not equal, 1 if equal
427 */
428 SWIGRUNTIME int
429 SWIG_TypeEquiv(const char *nb, const char *tb) {
430  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
431 }
432 
433 /*
434  Check the typename
435 */
437 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
438  if (ty) {
439  swig_cast_info *iter = ty->cast;
440  while (iter) {
441  if (strcmp(iter->type->name, c) == 0) {
442  if (iter == ty->cast)
443  return iter;
444  /* Move iter to the top of the linked list */
445  iter->prev->next = iter->next;
446  if (iter->next)
447  iter->next->prev = iter->prev;
448  iter->next = ty->cast;
449  iter->prev = 0;
450  if (ty->cast) ty->cast->prev = iter;
451  ty->cast = iter;
452  return iter;
453  }
454  iter = iter->next;
455  }
456  }
457  return 0;
458 }
459 
460 /*
461  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
462 */
465  if (ty) {
466  swig_cast_info *iter = ty->cast;
467  while (iter) {
468  if (iter->type == from) {
469  if (iter == ty->cast)
470  return iter;
471  /* Move iter to the top of the linked list */
472  iter->prev->next = iter->next;
473  if (iter->next)
474  iter->next->prev = iter->prev;
475  iter->next = ty->cast;
476  iter->prev = 0;
477  if (ty->cast) ty->cast->prev = iter;
478  ty->cast = iter;
479  return iter;
480  }
481  iter = iter->next;
482  }
483  }
484  return 0;
485 }
486 
487 /*
488  Cast a pointer up an inheritance hierarchy
489 */
490 SWIGRUNTIMEINLINE void *
491 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
492  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
493 }
494 
495 /*
496  Dynamic pointer casting. Down an inheritance hierarchy
497 */
500  swig_type_info *lastty = ty;
501  if (!ty || !ty->dcast) return ty;
502  while (ty && (ty->dcast)) {
503  ty = (*ty->dcast)(ptr);
504  if (ty) lastty = ty;
505  }
506  return lastty;
507 }
508 
509 /*
510  Return the name associated with this type
511 */
512 SWIGRUNTIMEINLINE const char *
514  return ty->name;
515 }
516 
517 /*
518  Return the pretty name associated with this type,
519  that is an unmangled type name in a form presentable to the user.
520 */
521 SWIGRUNTIME const char *
523  /* The "str" field contains the equivalent pretty names of the
524  type, separated by vertical-bar characters. We choose
525  to print the last name, as it is often (?) the most
526  specific. */
527  if (!type) return NULL;
528  if (type->str != NULL) {
529  const char *last_name = type->str;
530  const char *s;
531  for (s = type->str; *s; s++)
532  if (*s == '|') last_name = s+1;
533  return last_name;
534  }
535  else
536  return type->name;
537 }
538 
539 /*
540  Set the clientdata field for a type
541 */
542 SWIGRUNTIME void
544  swig_cast_info *cast = ti->cast;
545  /* if (ti->clientdata == clientdata) return; */
546  ti->clientdata = clientdata;
547 
548  while (cast) {
549  if (!cast->converter) {
550  swig_type_info *tc = cast->type;
551  if (!tc->clientdata) {
553  }
554  }
555  cast = cast->next;
556  }
557 }
558 SWIGRUNTIME void
561  ti->owndata = 1;
562 }
563 
564 /*
565  Search for a swig_type_info structure only by mangled name
566  Search is a O(log #types)
567 
568  We start searching at module start, and finish searching when start == end.
569  Note: if start == end at the beginning of the function, we go all the way around
570  the circular list.
571 */
574  swig_module_info *end,
575  const char *name) {
576  swig_module_info *iter = start;
577  do {
578  if (iter->size) {
579  size_t l = 0;
580  size_t r = iter->size - 1;
581  do {
582  /* since l+r >= 0, we can (>> 1) instead (/ 2) */
583  size_t i = (l + r) >> 1;
584  const char *iname = iter->types[i]->name;
585  if (iname) {
586  int compare = strcmp(name, iname);
587  if (compare == 0) {
588  return iter->types[i];
589  } else if (compare < 0) {
590  if (i) {
591  r = i - 1;
592  } else {
593  break;
594  }
595  } else if (compare > 0) {
596  l = i + 1;
597  }
598  } else {
599  break; /* should never happen */
600  }
601  } while (l <= r);
602  }
603  iter = iter->next;
604  } while (iter != end);
605  return 0;
606 }
607 
608 /*
609  Search for a swig_type_info structure for either a mangled name or a human readable name.
610  It first searches the mangled names of the types, which is a O(log #types)
611  If a type is not found it then searches the human readable names, which is O(#types).
612 
613  We start searching at module start, and finish searching when start == end.
614  Note: if start == end at the beginning of the function, we go all the way around
615  the circular list.
616 */
619  swig_module_info *end,
620  const char *name) {
621  /* STEP 1: Search the name field using binary search */
622  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
623  if (ret) {
624  return ret;
625  } else {
626  /* STEP 2: If the type hasn't been found, do a complete search
627  of the str field (the human readable name) */
628  swig_module_info *iter = start;
629  do {
630  size_t i = 0;
631  for (; i < iter->size; ++i) {
632  if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
633  return iter->types[i];
634  }
635  iter = iter->next;
636  } while (iter != end);
637  }
638 
639  /* neither found a match */
640  return 0;
641 }
642 
643 /*
644  Pack binary data into a string
645 */
646 SWIGRUNTIME char *
647 SWIG_PackData(char *c, void *ptr, size_t sz) {
648  static const char hex[17] = "0123456789abcdef";
649  const unsigned char *u = (unsigned char *) ptr;
650  const unsigned char *eu = u + sz;
651  for (; u != eu; ++u) {
652  unsigned char uu = *u;
653  *(c++) = hex[(uu & 0xf0) >> 4];
654  *(c++) = hex[uu & 0xf];
655  }
656  return c;
657 }
658 
659 /*
660  Unpack binary data from a string
661 */
662 SWIGRUNTIME const char *
663 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
664  unsigned char *u = (unsigned char *) ptr;
665  const unsigned char *eu = u + sz;
666  for (; u != eu; ++u) {
667  char d = *(c++);
668  unsigned char uu;
669  if ((d >= '0') && (d <= '9'))
670  uu = (unsigned char)((d - '0') << 4);
671  else if ((d >= 'a') && (d <= 'f'))
672  uu = (unsigned char)((d - ('a'-10)) << 4);
673  else
674  return (char *) 0;
675  d = *(c++);
676  if ((d >= '0') && (d <= '9'))
677  uu |= (unsigned char)(d - '0');
678  else if ((d >= 'a') && (d <= 'f'))
679  uu |= (unsigned char)(d - ('a'-10));
680  else
681  return (char *) 0;
682  *u = uu;
683  }
684  return c;
685 }
686 
687 /*
688  Pack 'void *' into a string buffer.
689 */
690 SWIGRUNTIME char *
691 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
692  char *r = buff;
693  if ((2*sizeof(void *) + 2) > bsz) return 0;
694  *(r++) = '_';
695  r = SWIG_PackData(r,&ptr,sizeof(void *));
696  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
697  strcpy(r,name);
698  return buff;
699 }
700 
701 SWIGRUNTIME const char *
702 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
703  if (*c != '_') {
704  if (strcmp(c,"NULL") == 0) {
705  *ptr = (void *) 0;
706  return name;
707  } else {
708  return 0;
709  }
710  }
711  return SWIG_UnpackData(++c,ptr,sizeof(void *));
712 }
713 
714 SWIGRUNTIME char *
715 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
716  char *r = buff;
717  size_t lname = (name ? strlen(name) : 0);
718  if ((2*sz + 2 + lname) > bsz) return 0;
719  *(r++) = '_';
720  r = SWIG_PackData(r,ptr,sz);
721  if (lname) {
722  strncpy(r,name,lname+1);
723  } else {
724  *r = 0;
725  }
726  return buff;
727 }
728 
729 SWIGRUNTIME const char *
730 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
731  if (*c != '_') {
732  if (strcmp(c,"NULL") == 0) {
733  memset(ptr,0,sz);
734  return name;
735  } else {
736  return 0;
737  }
738  }
739  return SWIG_UnpackData(++c,ptr,sz);
740 }
741 
742 #ifdef __cplusplus
743 }
744 #endif
745 
746 /* Errors in SWIG */
747 #define SWIG_UnknownError -1
748 #define SWIG_IOError -2
749 #define SWIG_RuntimeError -3
750 #define SWIG_IndexError -4
751 #define SWIG_TypeError -5
752 #define SWIG_DivisionByZero -6
753 #define SWIG_OverflowError -7
754 #define SWIG_SyntaxError -8
755 #define SWIG_ValueError -9
756 #define SWIG_SystemError -10
757 #define SWIG_AttributeError -11
758 #define SWIG_MemoryError -12
759 #define SWIG_NullReferenceError -13
760 
761 
762 
763 /* -----------------------------------------------------------------------------
764  * error manipulation
765  * ----------------------------------------------------------------------------- */
766 
767 SWIGINTERN const char*
769  const char* type = 0;
770  switch(code) {
771  case SWIG_MemoryError:
772  type = "MemoryError";
773  break;
774  case SWIG_IOError:
775  type = "IOError";
776  break;
777  case SWIG_RuntimeError:
778  type = "RuntimeError";
779  break;
780  case SWIG_IndexError:
781  type = "IndexError";
782  break;
783  case SWIG_TypeError:
784  type = "TypeError";
785  break;
786  case SWIG_DivisionByZero:
787  type = "ZeroDivisionError";
788  break;
789  case SWIG_OverflowError:
790  type = "OverflowError";
791  break;
792  case SWIG_SyntaxError:
793  type = "SyntaxError";
794  break;
795  case SWIG_ValueError:
796  type = "ValueError";
797  break;
798  case SWIG_SystemError:
799  type = "SystemError";
800  break;
801  case SWIG_AttributeError:
802  type = "AttributeError";
803  break;
804  default:
805  type = "RuntimeError";
806  }
807  return type;
808 }
809 
810 
811 SWIGINTERN void
812 SWIG_Tcl_SetErrorObj(Tcl_Interp *interp, const char *ctype, Tcl_Obj *obj)
813 {
814  Tcl_ResetResult(interp);
815  Tcl_SetObjResult(interp, obj);
816  Tcl_SetErrorCode(interp, "SWIG", ctype, NULL);
817 }
818 
819 SWIGINTERN void
820 SWIG_Tcl_SetErrorMsg(Tcl_Interp *interp, const char *ctype, const char *mesg)
821 {
822  Tcl_ResetResult(interp);
823  Tcl_SetErrorCode(interp, "SWIG", ctype, NULL);
824  Tcl_AppendResult(interp, ctype, " ", mesg, NULL);
825  /*
826  Tcl_AddErrorInfo(interp, ctype);
827  Tcl_AddErrorInfo(interp, " ");
828  Tcl_AddErrorInfo(interp, mesg);
829  */
830 }
831 
832 SWIGINTERNINLINE void
833 SWIG_Tcl_AddErrorMsg(Tcl_Interp *interp, const char* mesg)
834 {
835  Tcl_AddErrorInfo(interp, mesg);
836 }
837 
838 
839 
840 /* -----------------------------------------------------------------------------
841  * SWIG API. Portion that goes into the runtime
842  * ----------------------------------------------------------------------------- */
843 #ifdef __cplusplus
844 extern "C" {
845 #endif
846 
847 /* -----------------------------------------------------------------------------
848  * Constant declarations
849  * ----------------------------------------------------------------------------- */
850 
851 /* Constant Types */
852 #define SWIG_TCL_POINTER 4
853 #define SWIG_TCL_BINARY 5
854 
855 /* Constant information structure */
856 typedef struct swig_const_info {
857  int type;
858  const char *name;
859  long lvalue;
860  double dvalue;
861  void *pvalue;
864 
865 typedef int (*swig_wrapper)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST []);
866 typedef int (*swig_wrapper_func)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST []);
867 typedef char *(*swig_variable_func)(ClientData, Tcl_Interp *, char *, char *, int);
868 typedef void (*swig_delete_func)(ClientData);
869 
870 typedef struct swig_method {
871  const char *name;
874 
875 typedef struct swig_attribute {
876  const char *name;
880 
881 typedef struct swig_class {
882  const char *name;
885  void (*destructor)(void *);
888  struct swig_class **bases;
889  const char **base_names;
891  Tcl_HashTable hashtable;
893 
894 typedef struct swig_instance {
895  Tcl_Obj *thisptr;
896  void *thisvalue;
898  int destroy;
899  Tcl_Command cmdtok;
901 
902 /* Structure for command table */
903 typedef struct {
904  const char *name;
905  int (*wrapper)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST []);
906  ClientData clientdata;
908 
909 /* Structure for variable linking table */
910 typedef struct {
911  const char *name;
912  void *addr;
913  char * (*get)(ClientData, Tcl_Interp *, char *, char *, int);
914  char * (*set)(ClientData, Tcl_Interp *, char *, char *, int);
915 } swig_var_info;
916 
917 
918 /* -----------------------------------------------------------------------------*
919  * Install a constant object
920  * -----------------------------------------------------------------------------*/
921 
922 static Tcl_HashTable swigconstTable;
923 static int swigconstTableinit = 0;
924 
925 SWIGINTERN void
926 SWIG_Tcl_SetConstantObj(Tcl_Interp *interp, const char* name, Tcl_Obj *obj) {
927  int newobj;
928  Tcl_ObjSetVar2(interp,Tcl_NewStringObj(name,-1), NULL, obj, TCL_GLOBAL_ONLY);
929  Tcl_SetHashValue(Tcl_CreateHashEntry(&swigconstTable, name, &newobj), (ClientData) obj);
930 }
931 
932 SWIGINTERN Tcl_Obj *
933 SWIG_Tcl_GetConstantObj(const char *key) {
934  Tcl_HashEntry *entryPtr;
935  if (!swigconstTableinit) return 0;
936  entryPtr = Tcl_FindHashEntry(&swigconstTable, key);
937  if (entryPtr) {
938  return (Tcl_Obj *) Tcl_GetHashValue(entryPtr);
939  }
940  return 0;
941 }
942 
943 #ifdef __cplusplus
944 }
945 #endif
946 
947 
948 
949 /* -----------------------------------------------------------------------------
950  * tclrun.swg
951  *
952  * This file contains the runtime support for Tcl modules and includes
953  * code for managing global variables and pointer type checking.
954  * ----------------------------------------------------------------------------- */
955 
956 /* Common SWIG API */
957 
958 /* for raw pointers */
959 #define SWIG_ConvertPtr(oc, ptr, ty, flags) SWIG_Tcl_ConvertPtr(interp, oc, ptr, ty, flags)
960 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Tcl_NewPointerObj(ptr, type, flags)
961 
962 /* for raw packed data */
963 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Tcl_ConvertPacked(interp, obj, ptr, sz, ty)
964 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Tcl_NewPackedObj(ptr, sz, type)
965 
966 /* for class or struct pointers */
967 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_Tcl_ConvertPtr(interp, obj, pptr, type, flags)
968 #define SWIG_NewInstanceObj(thisvalue, type, flags) SWIG_Tcl_NewInstanceObj(interp, thisvalue, type, flags)
969 
970 /* for C or C++ function pointers */
971 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Tcl_ConvertPtr(interp, obj, pptr, type, 0)
972 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Tcl_NewPointerObj(ptr, type, 0)
973 
974 /* for C++ member pointers, ie, member methods */
975 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Tcl_ConvertPacked(interp,obj, ptr, sz, ty)
976 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Tcl_NewPackedObj(ptr, sz, type)
977 
978 
979 /* Runtime API */
980 
981 #define SWIG_GetModule(clientdata) SWIG_Tcl_GetModule((Tcl_Interp *) (clientdata))
982 #define SWIG_SetModule(clientdata, pointer) SWIG_Tcl_SetModule((Tcl_Interp *) (clientdata), pointer)
983 
984 
985 /* Error manipulation */
986 
987 #define SWIG_ErrorType(code) SWIG_Tcl_ErrorType(code)
988 #define SWIG_Error(code, msg) SWIG_Tcl_SetErrorMsg(interp, SWIG_Tcl_ErrorType(code), msg)
989 #define SWIG_fail goto fail
990 
991 
992 /* Tcl-specific SWIG API */
993 
994 #define SWIG_Acquire(ptr) SWIG_Tcl_Acquire(ptr)
995 #define SWIG_MethodCommand SWIG_Tcl_MethodCommand
996 #define SWIG_Disown(ptr) SWIG_Tcl_Disown(ptr)
997 #define SWIG_ConvertPtrFromString(c, ptr, ty, flags) SWIG_Tcl_ConvertPtrFromString(interp, c, ptr, ty, flags)
998 #define SWIG_MakePtr(c, ptr, ty, flags) SWIG_Tcl_MakePtr(c, ptr, ty, flags)
999 #define SWIG_PointerTypeFromString(c) SWIG_Tcl_PointerTypeFromString(c)
1000 #define SWIG_GetArgs SWIG_Tcl_GetArgs
1001 #define SWIG_GetConstantObj(key) SWIG_Tcl_GetConstantObj(key)
1002 #define SWIG_ObjectConstructor SWIG_Tcl_ObjectConstructor
1003 #define SWIG_Thisown(ptr) SWIG_Tcl_Thisown(ptr)
1004 #define SWIG_ObjectDelete SWIG_Tcl_ObjectDelete
1005 
1006 
1007 #define SWIG_TCL_DECL_ARGS_2(arg1, arg2) (Tcl_Interp *interp SWIGUNUSED, arg1, arg2)
1008 #define SWIG_TCL_CALL_ARGS_2(arg1, arg2) (interp, arg1, arg2)
1009 /* -----------------------------------------------------------------------------
1010  * pointers/data manipulation
1011  * ----------------------------------------------------------------------------- */
1012 
1013 /* For backward compatibility only */
1014 #define SWIG_POINTER_EXCEPTION 0
1015 #define SWIG_GetConstant SWIG_GetConstantObj
1016 #define SWIG_Tcl_GetConstant SWIG_Tcl_GetConstantObj
1017 
1018 #if TCL_MAJOR_VERSION >= 8 && TCL_MINOR_VERSION >= 5
1019 #define SWIG_TCL_HASHTABLE_INIT {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
1020 #else
1021 #define SWIG_TCL_HASHTABLE_INIT {0}
1022 #endif
1023 
1024 #include "assert.h"
1025 
1026 #ifdef __cplusplus
1027 extern "C" {
1028 #endif
1029 
1030 /* Object support */
1031 
1032 SWIGRUNTIME Tcl_HashTable*
1034  static Tcl_HashTable swigobjectTable;
1035  static int swigobjectTableinit = 0;
1036  if (!swigobjectTableinit) {
1037  Tcl_InitHashTable(&swigobjectTable, TCL_ONE_WORD_KEYS);
1038  swigobjectTableinit = 1;
1039  }
1040  return &swigobjectTable;
1041 }
1042 
1043 /* Acquire ownership of a pointer */
1044 SWIGRUNTIME void
1045 SWIG_Tcl_Acquire(void *ptr) {
1046  int newobj;
1047  Tcl_CreateHashEntry(SWIG_Tcl_ObjectTable(), (char *) ptr, &newobj);
1048 }
1049 
1050 SWIGRUNTIME int
1051 SWIG_Tcl_Thisown(void *ptr) {
1052  if (Tcl_FindHashEntry(SWIG_Tcl_ObjectTable(), (char *) ptr)) {
1053  return 1;
1054  }
1055  return 0;
1056 }
1057 
1058 /* Disown a pointer. Returns 1 if we owned it to begin with */
1059 SWIGRUNTIME int
1060 SWIG_Tcl_Disown(void *ptr) {
1061  Tcl_HashEntry *entryPtr = Tcl_FindHashEntry(SWIG_Tcl_ObjectTable(), (char *) ptr);
1062  if (entryPtr) {
1063  Tcl_DeleteHashEntry(entryPtr);
1064  return 1;
1065  }
1066  return 0;
1067 }
1068 
1069 /* Convert a pointer value */
1070 SWIGRUNTIME int
1071 SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, const char *c, void **ptr, swig_type_info *ty, int flags) {
1072  swig_cast_info *tc;
1073  /* Pointer values must start with leading underscore */
1074  while (*c != '_') {
1075  *ptr = (void *) 0;
1076  if (strcmp(c,"NULL") == 0)
1078 
1079  /* Empty string: not a pointer */
1080  if (*c == 0) return SWIG_ERROR;
1081 
1082  /* Hmmm. It could be an object name. */
1083 
1084  /* Check if this is a command at all. Prevents <c> cget -this */
1085  /* from being called when c is not a command, firing the unknown proc */
1086  if (Tcl_VarEval(interp,"info commands ", c, (char *) NULL) == TCL_OK) {
1087  Tcl_Obj *result = Tcl_GetObjResult(interp);
1088  if (*(Tcl_GetStringFromObj(result, NULL)) == 0) {
1089  /* It's not a command, so it can't be a pointer */
1090  Tcl_ResetResult(interp);
1091  return SWIG_ERROR;
1092  }
1093  } else {
1094  /* This will only fail if the argument is multiple words. */
1095  /* Multiple words are also not commands. */
1096  Tcl_ResetResult(interp);
1097  return SWIG_ERROR;
1098  }
1099 
1100  /* Check if this is really a SWIG pointer */
1101  if (Tcl_VarEval(interp,c," cget -this", (char *) NULL) != TCL_OK) {
1102  Tcl_ResetResult(interp);
1103  return SWIG_ERROR;
1104  }
1105 
1106  c = Tcl_GetStringFromObj(Tcl_GetObjResult(interp), NULL);
1107  }
1108 
1109  c++;
1110  c = SWIG_UnpackData(c,ptr,sizeof(void *));
1111  if (ty) {
1112  tc = c ? SWIG_TypeCheck(c,ty) : 0;
1113  if (!tc) {
1114  return SWIG_ERROR;
1115  }
1116  if (flags & SWIG_POINTER_DISOWN) {
1117  SWIG_Disown((void *) *ptr);
1118  }
1119  {
1120  int newmemory = 0;
1121  *ptr = SWIG_TypeCast(tc,(void *) *ptr,&newmemory);
1122  assert(!newmemory); /* newmemory handling not yet implemented */
1123  }
1124  }
1125  return SWIG_OK;
1126 }
1127 
1128 /* Convert a pointer value */
1130 SWIG_Tcl_ConvertPtr(Tcl_Interp *interp, Tcl_Obj *oc, void **ptr, swig_type_info *ty, int flags) {
1131  return SWIG_Tcl_ConvertPtrFromString(interp, Tcl_GetStringFromObj(oc,NULL), ptr, ty, flags);
1132 }
1133 
1134 /* Convert a pointer value */
1135 SWIGRUNTIME char *
1137  char d;
1138  /* Pointer values must start with leading underscore. NULL has no type */
1139  if (*c != '_') {
1140  return 0;
1141  }
1142  c++;
1143  /* Extract hex value from pointer */
1144  while ((d = *c)) {
1145  if (!(((d >= '0') && (d <= '9')) || ((d >= 'a') && (d <= 'f')))) break;
1146  c++;
1147  }
1148  return c;
1149 }
1150 
1151 /* Convert a packed pointer value */
1152 SWIGRUNTIME int
1153 SWIG_Tcl_ConvertPacked(Tcl_Interp *SWIGUNUSEDPARM(interp) , Tcl_Obj *obj, void *ptr, int sz, swig_type_info *ty) {
1154  swig_cast_info *tc;
1155  const char *c;
1156 
1157  if (!obj) goto type_error;
1158  c = Tcl_GetStringFromObj(obj,NULL);
1159  /* Pointer values must start with leading underscore */
1160  if (*c != '_') goto type_error;
1161  c++;
1162  c = SWIG_UnpackData(c,ptr,sz);
1163  if (ty) {
1164  tc = SWIG_TypeCheck(c,ty);
1165  if (!tc) goto type_error;
1166  }
1167  return SWIG_OK;
1168 
1169  type_error:
1170 
1171  return SWIG_ERROR;
1172 }
1173 
1174 
1175 /* Take a pointer and convert it to a string */
1176 SWIGRUNTIME void
1177 SWIG_Tcl_MakePtr(char *c, void *ptr, swig_type_info *ty, int SWIGUNUSEDPARM(flags)) {
1178  if (ptr) {
1179  *(c++) = '_';
1180  c = SWIG_PackData(c,&ptr,sizeof(void *));
1181  strcpy(c,ty->name);
1182  } else {
1183  strcpy(c,"NULL");
1184  }
1185 }
1186 
1187 /* Create a new pointer object */
1188 SWIGRUNTIMEINLINE Tcl_Obj *
1189 SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
1190  Tcl_Obj *robj;
1191  char result[SWIG_BUFFER_SIZE];
1192  SWIG_MakePtr(result,ptr,type,flags);
1193  robj = Tcl_NewStringObj(result,-1);
1194  return robj;
1195 }
1196 
1197 SWIGRUNTIME Tcl_Obj *
1198 SWIG_Tcl_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
1199  char result[1024];
1200  char *r = result;
1201  if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
1202  *(r++) = '_';
1203  r = SWIG_PackData(r,ptr,sz);
1204  strcpy(r,type->name);
1205  return Tcl_NewStringObj(result,-1);
1206 }
1207 
1208 /* -----------------------------------------------------------------------------*
1209  * Get type list
1210  * -----------------------------------------------------------------------------*/
1211 
1213 SWIG_Tcl_GetModule(Tcl_Interp *interp) {
1214  const char *data;
1215  swig_module_info *ret = 0;
1216 
1217  /* first check if pointer already created */
1218  data = Tcl_GetVar(interp, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TCL_GLOBAL_ONLY);
1219  if (data) {
1220  SWIG_UnpackData(data, &ret, sizeof(swig_type_info **));
1221  }
1222 
1223  return ret;
1224 }
1225 
1226 SWIGRUNTIME void
1227 SWIG_Tcl_SetModule(Tcl_Interp *interp, swig_module_info *module) {
1228  char buf[SWIG_BUFFER_SIZE];
1229  char *data;
1230 
1231  /* create a new pointer */
1232  data = SWIG_PackData(buf, &module, sizeof(swig_type_info **));
1233  *data = 0;
1234  Tcl_SetVar(interp, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, buf, TCL_GLOBAL_ONLY);
1235 }
1236 
1237 /* -----------------------------------------------------------------------------*
1238  * Object auxiliaries
1239  * -----------------------------------------------------------------------------*/
1240 
1241 
1242 SWIGRUNTIME void
1243 SWIG_Tcl_ObjectDelete(ClientData clientData) {
1244  swig_instance *si = (swig_instance *) clientData;
1245  if (!si) return;
1246  if (si->destroy && SWIG_Disown(si->thisvalue)) {
1247  if (si->classptr->destructor) {
1248  (si->classptr->destructor)(si->thisvalue);
1249  }
1250  }
1251  Tcl_DecrRefCount(si->thisptr);
1252  free(si);
1253 }
1254 
1255 /* Function to invoke object methods given an instance */
1256 SWIGRUNTIME int
1257 SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST _objv[]) {
1258  char *method, *attrname;
1259  swig_instance *inst = (swig_instance *) clientData;
1260  swig_method *meth;
1261  swig_attribute *attr;
1262  Tcl_Obj *oldarg;
1263  Tcl_Obj **objv;
1264  int rcode;
1265  swig_class *cls;
1266  swig_class *cls_stack[64];
1267  int cls_stack_bi[64];
1268  int cls_stack_top = 0;
1269  int numconf = 2;
1270  int bi;
1271 
1272  objv = (Tcl_Obj **) _objv;
1273  if (objc < 2) {
1274  Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
1275  return TCL_ERROR;
1276  }
1277  method = Tcl_GetStringFromObj(objv[1],NULL);
1278  if (strcmp(method,"-acquire") == 0) {
1279  inst->destroy = 1;
1280  SWIG_Acquire(inst->thisvalue);
1281  return TCL_OK;
1282  }
1283  if (strcmp(method,"-disown") == 0) {
1284  if (inst->destroy) {
1285  SWIG_Disown(inst->thisvalue);
1286  }
1287  inst->destroy = 0;
1288  return TCL_OK;
1289  }
1290  if (strcmp(method,"-delete") == 0) {
1291  Tcl_DeleteCommandFromToken(interp,inst->cmdtok);
1292  return TCL_OK;
1293  }
1294  cls_stack[cls_stack_top] = inst->classptr;
1295  cls_stack_bi[cls_stack_top] = -1;
1296  while (1) {
1297  Tcl_HashEntry* hashentry;
1298  bi = cls_stack_bi[cls_stack_top];
1299  cls = cls_stack[cls_stack_top];
1300  if (bi != -1) {
1301  if (!cls->bases[bi] && cls->base_names[bi]) {
1302  /* lookup and cache the base class */
1303  swig_type_info *info = SWIG_TypeQueryModule(cls->module, cls->module, cls->base_names[bi]);
1304  if (info) cls->bases[bi] = (swig_class *) info->clientdata;
1305  }
1306  cls = cls->bases[bi];
1307  if (cls) {
1308  cls_stack_bi[cls_stack_top]++;
1309  cls_stack_top++;
1310  cls_stack[cls_stack_top] = cls;
1311  cls_stack_bi[cls_stack_top] = -1;
1312  continue;
1313  }
1314  }
1315  if (!cls) {
1316  cls_stack_top--;
1317  if (cls_stack_top < 0) break;
1318  else continue;
1319  }
1320  cls_stack_bi[cls_stack_top]++;
1321 
1322  hashentry = Tcl_FindHashEntry(&(cls->hashtable), method);
1323  if (hashentry) {
1324  ClientData cd = Tcl_GetHashValue(hashentry);
1325  swig_wrapper method_wrapper = (swig_wrapper)cd;
1326  oldarg = objv[1];
1327  objv[1] = inst->thisptr;
1328  Tcl_IncrRefCount(inst->thisptr);
1329  rcode = (method_wrapper)(clientData,interp,objc,objv);
1330  objv[1] = oldarg;
1331  Tcl_DecrRefCount(inst->thisptr);
1332  return rcode;
1333  }
1334  /* Check class methods for a match */
1335  if (strcmp(method,"cget") == 0) {
1336  if (objc < 3) {
1337  Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
1338  return TCL_ERROR;
1339  }
1340  attrname = Tcl_GetStringFromObj(objv[2],NULL);
1341  attr = cls->attributes;
1342  while (attr && attr->name) {
1343  if ((strcmp(attr->name, attrname) == 0) && (attr->getmethod)) {
1344  oldarg = objv[1];
1345  objv[1] = inst->thisptr;
1346  Tcl_IncrRefCount(inst->thisptr);
1347  rcode = (*attr->getmethod)(clientData,interp,2, objv);
1348  objv[1] = oldarg;
1349  Tcl_DecrRefCount(inst->thisptr);
1350  return rcode;
1351  }
1352  attr++;
1353  }
1354  if (strcmp(attrname, "-this") == 0) {
1355  Tcl_SetObjResult(interp, Tcl_DuplicateObj(inst->thisptr));
1356  return TCL_OK;
1357  }
1358  if (strcmp(attrname, "-thisown") == 0) {
1359  if (SWIG_Thisown(inst->thisvalue)) {
1360  Tcl_SetResult(interp,(char*)"1",TCL_STATIC);
1361  } else {
1362  Tcl_SetResult(interp,(char*)"0",TCL_STATIC);
1363  }
1364  return TCL_OK;
1365  }
1366  } else if (strcmp(method, "configure") == 0) {
1367  int i;
1368  if (objc < 4) {
1369  Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
1370  return TCL_ERROR;
1371  }
1372  i = 2;
1373  while (i < objc) {
1374  attrname = Tcl_GetStringFromObj(objv[i],NULL);
1375  attr = cls->attributes;
1376  while (attr && attr->name) {
1377  if ((strcmp(attr->name, attrname) == 0) && (attr->setmethod)) {
1378  oldarg = objv[i];
1379  objv[i] = inst->thisptr;
1380  Tcl_IncrRefCount(inst->thisptr);
1381  rcode = (*attr->setmethod)(clientData,interp,3, &objv[i-1]);
1382  objv[i] = oldarg;
1383  Tcl_DecrRefCount(inst->thisptr);
1384  if (rcode != TCL_OK) return rcode;
1385  numconf += 2;
1386  }
1387  attr++;
1388  }
1389  i+=2;
1390  }
1391  }
1392  }
1393  if (strcmp(method,"configure") == 0) {
1394  if (numconf >= objc) {
1395  return TCL_OK;
1396  } else {
1397  Tcl_SetResult(interp,(char *) "Invalid attribute name.", TCL_STATIC);
1398  return TCL_ERROR;
1399  }
1400  }
1401  if (strcmp(method,"cget") == 0) {
1402  Tcl_SetResult(interp,(char *) "Invalid attribute name.", TCL_STATIC);
1403  return TCL_ERROR;
1404  }
1405  Tcl_SetResult(interp, (char *) "Invalid method. Must be one of: configure cget -acquire -disown -delete", TCL_STATIC);
1406  cls = inst->classptr;
1407  bi = 0;
1408  while (cls) {
1409  meth = cls->methods;
1410  while (meth && meth->name) {
1411  char *cr = (char *) Tcl_GetStringResult(interp);
1412  size_t meth_len = strlen(meth->name);
1413  char* where = strchr(cr,':');
1414  while(where) {
1415  where = strstr(where, meth->name);
1416  if(where) {
1417  if(where[-1] == ' ' && (where[meth_len] == ' ' || where[meth_len]==0)) {
1418  break;
1419  } else {
1420  where++;
1421  }
1422  }
1423  }
1424 
1425  if (!where)
1426  Tcl_AppendElement(interp, (char *) meth->name);
1427  meth++;
1428  }
1429  cls = inst->classptr->bases[bi++];
1430  }
1431  return TCL_ERROR;
1432 }
1433 
1434 /* This function takes the current result and turns it into an object command */
1435 SWIGRUNTIME Tcl_Obj *
1436 SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *type, int flags) {
1437  Tcl_Obj *robj = SWIG_NewPointerObj(thisvalue, type,0);
1438  /* Check to see if this pointer belongs to a class or not */
1439  if (thisvalue && (type->clientdata) && (interp)) {
1440  Tcl_CmdInfo ci;
1441  char *name;
1442  name = Tcl_GetStringFromObj(robj,NULL);
1443  if (!Tcl_GetCommandInfo(interp,name, &ci) || (flags)) {
1444  swig_instance *newinst = (swig_instance *) malloc(sizeof(swig_instance));
1445  newinst->thisptr = Tcl_DuplicateObj(robj);
1446  Tcl_IncrRefCount(newinst->thisptr);
1447  newinst->thisvalue = thisvalue;
1448  newinst->classptr = (swig_class *) type->clientdata;
1449  newinst->destroy = flags;
1450  newinst->cmdtok = Tcl_CreateObjCommand(interp, Tcl_GetStringFromObj(robj,NULL), (swig_wrapper_func) SWIG_MethodCommand, (ClientData) newinst, (swig_delete_func) SWIG_ObjectDelete);
1451  if (flags) {
1452  SWIG_Acquire(thisvalue);
1453  }
1454  }
1455  }
1456  return robj;
1457 }
1458 
1459 /* Function to create objects */
1460 SWIGRUNTIME int
1461 SWIG_Tcl_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1462  Tcl_Obj *newObj = 0;
1463  void *thisvalue = 0;
1464  swig_instance *newinst = 0;
1465  swig_class *classptr = (swig_class *) clientData;
1466  swig_wrapper cons = 0;
1467  char *name = 0;
1468  int firstarg = 0;
1469  int thisarg = 0;
1470  int destroy = 1;
1471 
1472  if (!classptr) {
1473  Tcl_SetResult(interp, (char *) "swig: internal runtime error. No class object defined.", TCL_STATIC);
1474  return TCL_ERROR;
1475  }
1476  cons = classptr->constructor;
1477  if (objc > 1) {
1478  char *s = Tcl_GetStringFromObj(objv[1],NULL);
1479  if (strcmp(s,"-this") == 0) {
1480  thisarg = 2;
1481  cons = 0;
1482  } else if (strcmp(s,"-args") == 0) {
1483  firstarg = 1;
1484  } else if (objc == 2) {
1485  firstarg = 1;
1486  name = s;
1487  } else if (objc >= 3) {
1488  char *s1;
1489  name = s;
1490  s1 = Tcl_GetStringFromObj(objv[2],NULL);
1491  if (strcmp(s1,"-this") == 0) {
1492  thisarg = 3;
1493  cons = 0;
1494  } else {
1495  firstarg = 1;
1496  }
1497  }
1498  }
1499  if (cons) {
1500  int result;
1501  result = (*cons)(0, interp, objc-firstarg, &objv[firstarg]);
1502  if (result != TCL_OK) {
1503  return result;
1504  }
1505  newObj = Tcl_DuplicateObj(Tcl_GetObjResult(interp));
1506  if (!name) name = Tcl_GetStringFromObj(newObj,NULL);
1507  } else if (thisarg > 0) {
1508  if (thisarg < objc) {
1509  destroy = 0;
1510  newObj = Tcl_DuplicateObj(objv[thisarg]);
1511  if (!name) name = Tcl_GetStringFromObj(newObj,NULL);
1512  } else {
1513  Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
1514  return TCL_ERROR;
1515  }
1516  } else {
1517  Tcl_SetResult(interp, (char *) "No constructor available.", TCL_STATIC);
1518  return TCL_ERROR;
1519  }
1520  if (SWIG_Tcl_ConvertPtr(interp,newObj, (void **) &thisvalue, *(classptr->type), 0) != SWIG_OK) {
1521  Tcl_DecrRefCount(newObj);
1522  return TCL_ERROR;
1523  }
1524  newinst = (swig_instance *) malloc(sizeof(swig_instance));
1525  newinst->thisptr = newObj;
1526  Tcl_IncrRefCount(newObj);
1527  newinst->thisvalue = thisvalue;
1528  newinst->classptr = classptr;
1529  newinst->destroy = destroy;
1530  if (destroy) {
1531  SWIG_Acquire(thisvalue);
1532  }
1533  newinst->cmdtok = Tcl_CreateObjCommand(interp,name, (swig_wrapper) SWIG_MethodCommand, (ClientData) newinst, (swig_delete_func) SWIG_ObjectDelete);
1534  return TCL_OK;
1535 }
1536 
1537 /* -----------------------------------------------------------------------------*
1538  * Get arguments
1539  * -----------------------------------------------------------------------------*/
1540 SWIGRUNTIME int
1541 SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char *fmt, ...) {
1542  int argno = 0, opt = 0;
1543  long tempi;
1544  double tempd;
1545  const char *c;
1546  va_list ap;
1547  void *vptr;
1548  Tcl_Obj *obj = 0;
1549  swig_type_info *ty;
1550 
1551  va_start(ap,fmt);
1552  for (c = fmt; (*c && (*c != ':') && (*c != ';')); c++,argno++) {
1553  if (*c == '|') {
1554  opt = 1;
1555  c++;
1556  }
1557  if (argno >= (objc-1)) {
1558  if (!opt) {
1559  Tcl_SetResult(interp, (char *) "Wrong number of arguments ", TCL_STATIC);
1560  goto argerror;
1561  } else {
1562  va_end(ap);
1563  return TCL_OK;
1564  }
1565  }
1566 
1567  vptr = va_arg(ap,void *);
1568  if (vptr) {
1569  if (isupper(*c)) {
1570  obj = SWIG_Tcl_GetConstantObj(Tcl_GetStringFromObj(objv[argno+1],0));
1571  if (!obj) obj = objv[argno+1];
1572  } else {
1573  obj = objv[argno+1];
1574  }
1575  switch(*c) {
1576  case 'i': case 'I':
1577  case 'l': case 'L':
1578  case 'h': case 'H':
1579  case 'b': case 'B':
1580  if (Tcl_GetLongFromObj(interp,obj,&tempi) != TCL_OK) goto argerror;
1581  if ((*c == 'i') || (*c == 'I')) *((int *)vptr) = (int)tempi;
1582  else if ((*c == 'l') || (*c == 'L')) *((long *)vptr) = (long)tempi;
1583  else if ((*c == 'h') || (*c == 'H')) *((short*)vptr) = (short)tempi;
1584  else if ((*c == 'b') || (*c == 'B')) *((unsigned char *)vptr) = (unsigned char)tempi;
1585  break;
1586  case 'f': case 'F':
1587  case 'd': case 'D':
1588  if (Tcl_GetDoubleFromObj(interp,obj,&tempd) != TCL_OK) goto argerror;
1589  if ((*c == 'f') || (*c == 'F')) *((float *) vptr) = (float)tempd;
1590  else if ((*c == 'd') || (*c == 'D')) *((double*) vptr) = tempd;
1591  break;
1592  case 's': case 'S':
1593  if (*(c+1) == '#') {
1594  int *vlptr = (int *) va_arg(ap, void *);
1595  *((char **) vptr) = Tcl_GetStringFromObj(obj, vlptr);
1596  c++;
1597  } else {
1598  *((char **)vptr) = Tcl_GetStringFromObj(obj,NULL);
1599  }
1600  break;
1601  case 'c': case 'C':
1602  *((char *)vptr) = *(Tcl_GetStringFromObj(obj,NULL));
1603  break;
1604  case 'p': case 'P':
1605  ty = (swig_type_info *) va_arg(ap, void *);
1606  if (SWIG_Tcl_ConvertPtr(interp, obj, (void **) vptr, ty, 0) != SWIG_OK) goto argerror;
1607  break;
1608  case 'o': case 'O':
1609  *((Tcl_Obj **)vptr) = objv[argno+1];
1610  break;
1611  default:
1612  break;
1613  }
1614  }
1615  }
1616 
1617  if ((*c != ';') && ((objc-1) > argno)) {
1618  Tcl_SetResult(interp, (char *) "Wrong # args.", TCL_STATIC);
1619  goto argerror;
1620  }
1621  va_end(ap);
1622  return TCL_OK;
1623 
1624  argerror:
1625  {
1626  char temp[32];
1627  sprintf(temp,"%d", argno+1);
1628  c = strchr(fmt,':');
1629  if (!c) c = strchr(fmt,';');
1630  if (!c) c = (char *)"";
1631  Tcl_AppendResult(interp,c," argument ", temp, NULL);
1632  va_end(ap);
1633  return TCL_ERROR;
1634  }
1635 }
1636 
1637 #ifdef __cplusplus
1638 }
1639 #endif
1640 
1641 
1642 
1643 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1644 
1645 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1646 
1647 
1648 
1649 /* -------- TYPES TABLE (BEGIN) -------- */
1650 
1651 #define SWIGTYPE_p_char swig_types[0]
1652 #define SWIGTYPE_p_double swig_types[1]
1654 static swig_module_info swig_module = {swig_types, 2, 0, 0, 0, 0};
1655 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1656 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1657 
1658 /* -------- TYPES TABLE (END) -------- */
1659 
1660 #define SWIG_init A_colors_Init
1661 #define SWIG_name "a_colors"
1662 #define SWIG_prefix ""
1663 #define SWIG_version "0.0"
1664 
1665 #define SWIGVERSION 0x040002
1666 #define SWIG_VERSION SWIGVERSION
1667 
1668 
1669 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
1670 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
1671 
1672 
1673 #include <stdexcept>
1674 
1675 
1676 
1677 #ifdef __cplusplus
1678 extern "C" {
1679 #endif
1680 #ifdef MAC_TCL
1681 #pragma export on
1682 #endif
1683 SWIGEXPORT int SWIG_init(Tcl_Interp *);
1684 #ifdef MAC_TCL
1685 #pragma export off
1686 #endif
1687 #ifdef __cplusplus
1688 }
1689 #endif
1690 
1691 /* Compatibility version for TCL stubs */
1692 #ifndef SWIG_TCL_STUBS_VERSION
1693 #define SWIG_TCL_STUBS_VERSION "8.1"
1694 #endif
1695 
1696 
1697 
1698 #include <string>
1699 
1700 
1701 #include "a_colors.h"
1702 #include <iostream>
1703 void c_rgb2hsv(double R, double G, double B)
1704 {
1705  double h,s,v;
1706  a_colors::rgb2hsv(R,G,B,h,s,v);
1707  std::cout << h << " " << s << " " << v << std::endl;
1708 }
1709 
1710 
1711 SWIGINTERN int
1712 SWIG_AsVal_double SWIG_TCL_DECL_ARGS_2(Tcl_Obj *obj, double *val)
1713 {
1714  double v;
1715  if (Tcl_GetDoubleFromObj(0, obj, &v) == TCL_OK) {
1716  if (val) *val = v;
1717  return SWIG_OK;
1718  }
1719  return SWIG_TypeError;
1720 }
1721 
1722 #ifdef __cplusplus
1723 extern "C" {
1724 #endif
1725 SWIGINTERN int
1726 _wrap_cmy2rgb(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1727  double arg1 ;
1728  double arg2 ;
1729  double arg3 ;
1730  double *arg4 = 0 ;
1731  double *arg5 = 0 ;
1732  double *arg6 = 0 ;
1733  double val1 ;
1734  int ecode1 = 0 ;
1735  double val2 ;
1736  int ecode2 = 0 ;
1737  double val3 ;
1738  int ecode3 = 0 ;
1739  void *argp4 = 0 ;
1740  int res4 = 0 ;
1741  void *argp5 = 0 ;
1742  int res5 = 0 ;
1743  void *argp6 = 0 ;
1744  int res6 = 0 ;
1745 
1746  if (SWIG_GetArgs(interp, objc, objv,"oooooo:cmy2rgb C M Y R G B ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
1747  ecode1 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
1748  if (!SWIG_IsOK(ecode1)) {
1749  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cmy2rgb" "', argument " "1"" of type '" "double""'");
1750  }
1751  arg1 = static_cast< double >(val1);
1752  ecode2 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
1753  if (!SWIG_IsOK(ecode2)) {
1754  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cmy2rgb" "', argument " "2"" of type '" "double""'");
1755  }
1756  arg2 = static_cast< double >(val2);
1757  ecode3 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
1758  if (!SWIG_IsOK(ecode3)) {
1759  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cmy2rgb" "', argument " "3"" of type '" "double""'");
1760  }
1761  arg3 = static_cast< double >(val3);
1762  res4 = SWIG_ConvertPtr(objv[4], &argp4, SWIGTYPE_p_double, 0 );
1763  if (!SWIG_IsOK(res4)) {
1764  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "cmy2rgb" "', argument " "4"" of type '" "double &""'");
1765  }
1766  if (!argp4) {
1767  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cmy2rgb" "', argument " "4"" of type '" "double &""'");
1768  }
1769  arg4 = reinterpret_cast< double * >(argp4);
1770  res5 = SWIG_ConvertPtr(objv[5], &argp5, SWIGTYPE_p_double, 0 );
1771  if (!SWIG_IsOK(res5)) {
1772  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "cmy2rgb" "', argument " "5"" of type '" "double &""'");
1773  }
1774  if (!argp5) {
1775  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cmy2rgb" "', argument " "5"" of type '" "double &""'");
1776  }
1777  arg5 = reinterpret_cast< double * >(argp5);
1778  res6 = SWIG_ConvertPtr(objv[6], &argp6, SWIGTYPE_p_double, 0 );
1779  if (!SWIG_IsOK(res6)) {
1780  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "cmy2rgb" "', argument " "6"" of type '" "double &""'");
1781  }
1782  if (!argp6) {
1783  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cmy2rgb" "', argument " "6"" of type '" "double &""'");
1784  }
1785  arg6 = reinterpret_cast< double * >(argp6);
1786  a_colors::cmy2rgb(arg1,arg2,arg3,*arg4,*arg5,*arg6);
1787 
1788  return TCL_OK;
1789 fail:
1790  return TCL_ERROR;
1791 }
1792 
1793 
1794 SWIGINTERN int
1795 _wrap_cmyk2cmy(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1796  double arg1 ;
1797  double arg2 ;
1798  double arg3 ;
1799  double arg4 ;
1800  double *arg5 = 0 ;
1801  double *arg6 = 0 ;
1802  double *arg7 = 0 ;
1803  double val1 ;
1804  int ecode1 = 0 ;
1805  double val2 ;
1806  int ecode2 = 0 ;
1807  double val3 ;
1808  int ecode3 = 0 ;
1809  double val4 ;
1810  int ecode4 = 0 ;
1811  void *argp5 = 0 ;
1812  int res5 = 0 ;
1813  void *argp6 = 0 ;
1814  int res6 = 0 ;
1815  void *argp7 = 0 ;
1816  int res7 = 0 ;
1817 
1818  if (SWIG_GetArgs(interp, objc, objv,"ooooooo:cmyk2cmy C M Y K Cn Mn Yn ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
1819  ecode1 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
1820  if (!SWIG_IsOK(ecode1)) {
1821  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cmyk2cmy" "', argument " "1"" of type '" "double""'");
1822  }
1823  arg1 = static_cast< double >(val1);
1824  ecode2 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
1825  if (!SWIG_IsOK(ecode2)) {
1826  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "cmyk2cmy" "', argument " "2"" of type '" "double""'");
1827  }
1828  arg2 = static_cast< double >(val2);
1829  ecode3 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
1830  if (!SWIG_IsOK(ecode3)) {
1831  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "cmyk2cmy" "', argument " "3"" of type '" "double""'");
1832  }
1833  arg3 = static_cast< double >(val3);
1834  ecode4 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[4], &val4);
1835  if (!SWIG_IsOK(ecode4)) {
1836  SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "cmyk2cmy" "', argument " "4"" of type '" "double""'");
1837  }
1838  arg4 = static_cast< double >(val4);
1839  res5 = SWIG_ConvertPtr(objv[5], &argp5, SWIGTYPE_p_double, 0 );
1840  if (!SWIG_IsOK(res5)) {
1841  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "cmyk2cmy" "', argument " "5"" of type '" "double &""'");
1842  }
1843  if (!argp5) {
1844  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cmyk2cmy" "', argument " "5"" of type '" "double &""'");
1845  }
1846  arg5 = reinterpret_cast< double * >(argp5);
1847  res6 = SWIG_ConvertPtr(objv[6], &argp6, SWIGTYPE_p_double, 0 );
1848  if (!SWIG_IsOK(res6)) {
1849  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "cmyk2cmy" "', argument " "6"" of type '" "double &""'");
1850  }
1851  if (!argp6) {
1852  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cmyk2cmy" "', argument " "6"" of type '" "double &""'");
1853  }
1854  arg6 = reinterpret_cast< double * >(argp6);
1855  res7 = SWIG_ConvertPtr(objv[7], &argp7, SWIGTYPE_p_double, 0 );
1856  if (!SWIG_IsOK(res7)) {
1857  SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "cmyk2cmy" "', argument " "7"" of type '" "double &""'");
1858  }
1859  if (!argp7) {
1860  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "cmyk2cmy" "', argument " "7"" of type '" "double &""'");
1861  }
1862  arg7 = reinterpret_cast< double * >(argp7);
1863  a_colors::cmyk2cmy(arg1,arg2,arg3,arg4,*arg5,*arg6,*arg7);
1864 
1865  return TCL_OK;
1866 fail:
1867  return TCL_ERROR;
1868 }
1869 
1870 
1871 SWIGINTERN int
1872 _wrap_rgb2hsv(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1873  double arg1 ;
1874  double arg2 ;
1875  double arg3 ;
1876  double *arg4 = 0 ;
1877  double *arg5 = 0 ;
1878  double *arg6 = 0 ;
1879  double val1 ;
1880  int ecode1 = 0 ;
1881  double val2 ;
1882  int ecode2 = 0 ;
1883  double val3 ;
1884  int ecode3 = 0 ;
1885  void *argp4 = 0 ;
1886  int res4 = 0 ;
1887  void *argp5 = 0 ;
1888  int res5 = 0 ;
1889  void *argp6 = 0 ;
1890  int res6 = 0 ;
1891 
1892  if (SWIG_GetArgs(interp, objc, objv,"oooooo:rgb2hsv R G B H S V ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
1893  ecode1 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
1894  if (!SWIG_IsOK(ecode1)) {
1895  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rgb2hsv" "', argument " "1"" of type '" "double""'");
1896  }
1897  arg1 = static_cast< double >(val1);
1898  ecode2 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
1899  if (!SWIG_IsOK(ecode2)) {
1900  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rgb2hsv" "', argument " "2"" of type '" "double""'");
1901  }
1902  arg2 = static_cast< double >(val2);
1903  ecode3 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
1904  if (!SWIG_IsOK(ecode3)) {
1905  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rgb2hsv" "', argument " "3"" of type '" "double""'");
1906  }
1907  arg3 = static_cast< double >(val3);
1908  res4 = SWIG_ConvertPtr(objv[4], &argp4, SWIGTYPE_p_double, 0 );
1909  if (!SWIG_IsOK(res4)) {
1910  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "rgb2hsv" "', argument " "4"" of type '" "double &""'");
1911  }
1912  if (!argp4) {
1913  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "rgb2hsv" "', argument " "4"" of type '" "double &""'");
1914  }
1915  arg4 = reinterpret_cast< double * >(argp4);
1916  res5 = SWIG_ConvertPtr(objv[5], &argp5, SWIGTYPE_p_double, 0 );
1917  if (!SWIG_IsOK(res5)) {
1918  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "rgb2hsv" "', argument " "5"" of type '" "double &""'");
1919  }
1920  if (!argp5) {
1921  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "rgb2hsv" "', argument " "5"" of type '" "double &""'");
1922  }
1923  arg5 = reinterpret_cast< double * >(argp5);
1924  res6 = SWIG_ConvertPtr(objv[6], &argp6, SWIGTYPE_p_double, 0 );
1925  if (!SWIG_IsOK(res6)) {
1926  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "rgb2hsv" "', argument " "6"" of type '" "double &""'");
1927  }
1928  if (!argp6) {
1929  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "rgb2hsv" "', argument " "6"" of type '" "double &""'");
1930  }
1931  arg6 = reinterpret_cast< double * >(argp6);
1932  a_colors::rgb2hsv(arg1,arg2,arg3,*arg4,*arg5,*arg6);
1933 
1934  return TCL_OK;
1935 fail:
1936  return TCL_ERROR;
1937 }
1938 
1939 
1940 SWIGINTERN int
1941 _wrap_hsv2rgb(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
1942  double arg1 ;
1943  double arg2 ;
1944  double arg3 ;
1945  double *arg4 = 0 ;
1946  double *arg5 = 0 ;
1947  double *arg6 = 0 ;
1948  double val1 ;
1949  int ecode1 = 0 ;
1950  double val2 ;
1951  int ecode2 = 0 ;
1952  double val3 ;
1953  int ecode3 = 0 ;
1954  void *argp4 = 0 ;
1955  int res4 = 0 ;
1956  void *argp5 = 0 ;
1957  int res5 = 0 ;
1958  void *argp6 = 0 ;
1959  int res6 = 0 ;
1960 
1961  if (SWIG_GetArgs(interp, objc, objv,"oooooo:hsv2rgb H S V R G B ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
1962  ecode1 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
1963  if (!SWIG_IsOK(ecode1)) {
1964  SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "hsv2rgb" "', argument " "1"" of type '" "double""'");
1965  }
1966  arg1 = static_cast< double >(val1);
1967  ecode2 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
1968  if (!SWIG_IsOK(ecode2)) {
1969  SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "hsv2rgb" "', argument " "2"" of type '" "double""'");
1970  }
1971  arg2 = static_cast< double >(val2);
1972  ecode3 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
1973  if (!SWIG_IsOK(ecode3)) {
1974  SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "hsv2rgb" "', argument " "3"" of type '" "double""'");
1975  }
1976  arg3 = static_cast< double >(val3);
1977  res4 = SWIG_ConvertPtr(objv[4], &argp4, SWIGTYPE_p_double, 0 );
1978  if (!SWIG_IsOK(res4)) {
1979  SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "hsv2rgb" "', argument " "4"" of type '" "double &""'");
1980  }
1981  if (!argp4) {
1982  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hsv2rgb" "', argument " "4"" of type '" "double &""'");
1983  }
1984  arg4 = reinterpret_cast< double * >(argp4);
1985  res5 = SWIG_ConvertPtr(objv[5], &argp5, SWIGTYPE_p_double, 0 );
1986  if (!SWIG_IsOK(res5)) {
1987  SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "hsv2rgb" "', argument " "5"" of type '" "double &""'");
1988  }
1989  if (!argp5) {
1990  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hsv2rgb" "', argument " "5"" of type '" "double &""'");
1991  }
1992  arg5 = reinterpret_cast< double * >(argp5);
1993  res6 = SWIG_ConvertPtr(objv[6], &argp6, SWIGTYPE_p_double, 0 );
1994  if (!SWIG_IsOK(res6)) {
1995  SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "hsv2rgb" "', argument " "6"" of type '" "double &""'");
1996  }
1997  if (!argp6) {
1998  SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "hsv2rgb" "', argument " "6"" of type '" "double &""'");
1999  }
2000  arg6 = reinterpret_cast< double * >(argp6);
2001  a_colors::hsv2rgb(arg1,arg2,arg3,*arg4,*arg5,*arg6);
2002 
2003  return TCL_OK;
2004 fail:
2005  return TCL_ERROR;
2006 }
2007 
2008 
2009 
2011  { SWIG_prefix "cmy2rgb", (swig_wrapper_func) _wrap_cmy2rgb, NULL},
2012  { SWIG_prefix "cmyk2cmy", (swig_wrapper_func) _wrap_cmyk2cmy, NULL},
2013  { SWIG_prefix "rgb2hsv", (swig_wrapper_func) _wrap_rgb2hsv, NULL},
2014  { SWIG_prefix "hsv2rgb", (swig_wrapper_func) _wrap_hsv2rgb, NULL},
2015  {0, 0, 0}
2016 };
2017 
2019  {0,0,0,0}
2020 };
2021 
2023  {0,0,0,0,0,0}
2024 };
2025 
2026 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
2027 
2028 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
2029 static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
2030 
2032  &_swigt__p_char,
2034 };
2035 
2036 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
2037 static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
2038 
2042 };
2043 
2044 
2045 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
2046 
2047 #ifdef __cplusplus
2048 }
2049 #endif
2050 /* -----------------------------------------------------------------------------
2051  * Type initialization:
2052  * This problem is tough by the requirement that no dynamic
2053  * memory is used. Also, since swig_type_info structures store pointers to
2054  * swig_cast_info structures and swig_cast_info structures store pointers back
2055  * to swig_type_info structures, we need some lookup code at initialization.
2056  * The idea is that swig generates all the structures that are needed.
2057  * The runtime then collects these partially filled structures.
2058  * The SWIG_InitializeModule function takes these initial arrays out of
2059  * swig_module, and does all the lookup, filling in the swig_module.types
2060  * array with the correct data and linking the correct swig_cast_info
2061  * structures together.
2062  *
2063  * The generated swig_type_info structures are assigned statically to an initial
2064  * array. We just loop through that array, and handle each type individually.
2065  * First we lookup if this type has been already loaded, and if so, use the
2066  * loaded structure instead of the generated one. Then we have to fill in the
2067  * cast linked list. The cast data is initially stored in something like a
2068  * two-dimensional array. Each row corresponds to a type (there are the same
2069  * number of rows as there are in the swig_type_initial array). Each entry in
2070  * a column is one of the swig_cast_info structures for that type.
2071  * The cast_initial array is actually an array of arrays, because each row has
2072  * a variable number of columns. So to actually build the cast linked list,
2073  * we find the array of casts associated with the type, and loop through it
2074  * adding the casts to the list. The one last trick we need to do is making
2075  * sure the type pointer in the swig_cast_info struct is correct.
2076  *
2077  * First off, we lookup the cast->type name to see if it is already loaded.
2078  * There are three cases to handle:
2079  * 1) If the cast->type has already been loaded AND the type we are adding
2080  * casting info to has not been loaded (it is in this module), THEN we
2081  * replace the cast->type pointer with the type pointer that has already
2082  * been loaded.
2083  * 2) If BOTH types (the one we are adding casting info to, and the
2084  * cast->type) are loaded, THEN the cast info has already been loaded by
2085  * the previous module so we just ignore it.
2086  * 3) Finally, if cast->type has not already been loaded, then we add that
2087  * swig_cast_info to the linked list (because the cast->type) pointer will
2088  * be correct.
2089  * ----------------------------------------------------------------------------- */
2090 
2091 #ifdef __cplusplus
2092 extern "C" {
2093 #if 0
2094 } /* c-mode */
2095 #endif
2096 #endif
2097 
2098 #if 0
2099 #define SWIGRUNTIME_DEBUG
2100 #endif
2101 
2102 
2103 SWIGRUNTIME void
2104 SWIG_InitializeModule(void *clientdata) {
2105  size_t i;
2106  swig_module_info *module_head, *iter;
2107  int init;
2108 
2109  /* check to see if the circular list has been setup, if not, set it up */
2110  if (swig_module.next==0) {
2111  /* Initialize the swig_module */
2115  init = 1;
2116  } else {
2117  init = 0;
2118  }
2119 
2120  /* Try and load any already created modules */
2121  module_head = SWIG_GetModule(clientdata);
2122  if (!module_head) {
2123  /* This is the first module loaded for this interpreter */
2124  /* so set the swig module into the interpreter */
2125  SWIG_SetModule(clientdata, &swig_module);
2126  } else {
2127  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
2128  iter=module_head;
2129  do {
2130  if (iter==&swig_module) {
2131  /* Our module is already in the list, so there's nothing more to do. */
2132  return;
2133  }
2134  iter=iter->next;
2135  } while (iter!= module_head);
2136 
2137  /* otherwise we must add our module into the list */
2138  swig_module.next = module_head->next;
2139  module_head->next = &swig_module;
2140  }
2141 
2142  /* When multiple interpreters are used, a module could have already been initialized in
2143  a different interpreter, but not yet have a pointer in this interpreter.
2144  In this case, we do not want to continue adding types... everything should be
2145  set up already */
2146  if (init == 0) return;
2147 
2148  /* Now work on filling in swig_module.types */
2149 #ifdef SWIGRUNTIME_DEBUG
2150  printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
2151 #endif
2152  for (i = 0; i < swig_module.size; ++i) {
2153  swig_type_info *type = 0;
2154  swig_type_info *ret;
2155  swig_cast_info *cast;
2156 
2157 #ifdef SWIGRUNTIME_DEBUG
2158  printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
2159 #endif
2160 
2161  /* if there is another module already loaded */
2162  if (swig_module.next != &swig_module) {
2164  }
2165  if (type) {
2166  /* Overwrite clientdata field */
2167 #ifdef SWIGRUNTIME_DEBUG
2168  printf("SWIG_InitializeModule: found type %s\n", type->name);
2169 #endif
2172 #ifdef SWIGRUNTIME_DEBUG
2173  printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
2174 #endif
2175  }
2176  } else {
2177  type = swig_module.type_initial[i];
2178  }
2179 
2180  /* Insert casting types */
2181  cast = swig_module.cast_initial[i];
2182  while (cast->type) {
2183  /* Don't need to add information already in the list */
2184  ret = 0;
2185 #ifdef SWIGRUNTIME_DEBUG
2186  printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
2187 #endif
2188  if (swig_module.next != &swig_module) {
2190 #ifdef SWIGRUNTIME_DEBUG
2191  if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
2192 #endif
2193  }
2194  if (ret) {
2195  if (type == swig_module.type_initial[i]) {
2196 #ifdef SWIGRUNTIME_DEBUG
2197  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
2198 #endif
2199  cast->type = ret;
2200  ret = 0;
2201  } else {
2202  /* Check for casting already in the list */
2203  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
2204 #ifdef SWIGRUNTIME_DEBUG
2205  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
2206 #endif
2207  if (!ocast) ret = 0;
2208  }
2209  }
2210 
2211  if (!ret) {
2212 #ifdef SWIGRUNTIME_DEBUG
2213  printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
2214 #endif
2215  if (type->cast) {
2216  type->cast->prev = cast;
2217  cast->next = type->cast;
2218  }
2219  type->cast = cast;
2220  }
2221  cast++;
2222  }
2223  /* Set entry in modules->types array equal to the type */
2224  swig_module.types[i] = type;
2225  }
2226  swig_module.types[i] = 0;
2227 
2228 #ifdef SWIGRUNTIME_DEBUG
2229  printf("**** SWIG_InitializeModule: Cast List ******\n");
2230  for (i = 0; i < swig_module.size; ++i) {
2231  int j = 0;
2233  printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
2234  while (cast->type) {
2235  printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
2236  cast++;
2237  ++j;
2238  }
2239  printf("---- Total casts: %d\n",j);
2240  }
2241  printf("**** SWIG_InitializeModule: Cast List ******\n");
2242 #endif
2243 }
2244 
2245 /* This function will propagate the clientdata field of type to
2246 * any new swig_type_info structures that have been added into the list
2247 * of equivalent types. It is like calling
2248 * SWIG_TypeClientData(type, clientdata) a second time.
2249 */
2250 SWIGRUNTIME void
2252  size_t i;
2253  swig_cast_info *equiv;
2254  static int init_run = 0;
2255 
2256  if (init_run) return;
2257  init_run = 1;
2258 
2259  for (i = 0; i < swig_module.size; i++) {
2260  if (swig_module.types[i]->clientdata) {
2261  equiv = swig_module.types[i]->cast;
2262  while (equiv) {
2263  if (!equiv->converter) {
2264  if (equiv->type && !equiv->type->clientdata)
2266  }
2267  equiv = equiv->next;
2268  }
2269  }
2270  }
2271 }
2272 
2273 #ifdef __cplusplus
2274 #if 0
2275 {
2276  /* c-mode */
2277 #endif
2278 }
2279 #endif
2280 
2281 
2282 #ifdef __cplusplus
2283 extern "C" {
2284 #endif
2285 
2286  /* -----------------------------------------------------------------------------
2287  * constants/methods manipulation
2288  * ----------------------------------------------------------------------------- */
2289 
2290  /* Install Constants */
2291 
2292  SWIGINTERN void
2293  SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
2294  size_t i;
2295  Tcl_Obj *obj;
2296 
2297  if (!swigconstTableinit) {
2298  Tcl_InitHashTable(&swigconstTable, TCL_STRING_KEYS);
2299  swigconstTableinit = 1;
2300  }
2301  for (i = 0; constants[i].type; i++) {
2302  switch(constants[i].type) {
2303  case SWIG_TCL_POINTER:
2304  obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
2305  break;
2306  case SWIG_TCL_BINARY:
2307  obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
2308  break;
2309  default:
2310  obj = 0;
2311  break;
2312  }
2313  if (obj) {
2314  SWIG_Tcl_SetConstantObj(interp, constants[i].name, obj);
2315  }
2316  }
2317  }
2318 
2319  /* Create fast method lookup tables */
2320 
2321  SWIGINTERN void
2323  size_t i;
2324 
2325  for (i = 0; i < swig_module.size; ++i) {
2327  if (type->clientdata) {
2328  swig_class* klass = (swig_class*) type->clientdata;
2329  swig_method* meth;
2330  Tcl_InitHashTable(&(klass->hashtable), TCL_STRING_KEYS);
2331  for (meth = klass->methods; meth && meth->name; ++meth) {
2332  int newEntry;
2333  Tcl_HashEntry* hashentry = Tcl_CreateHashEntry(&(klass->hashtable), meth->name, &newEntry);
2334  Tcl_SetHashValue(hashentry, (ClientData)meth->method);
2335  }
2336  }
2337  }
2338  }
2339 
2340 #ifdef __cplusplus
2341 }
2342 #endif
2343 
2344 /* -----------------------------------------------------------------------------*
2345  * Partial Init method
2346  * -----------------------------------------------------------------------------*/
2347 
2348 SWIGEXPORT int SWIG_init(Tcl_Interp *interp) {
2349  size_t i;
2350  if (interp == 0) return TCL_ERROR;
2351 #ifdef USE_TCL_STUBS
2352  /* (char*) cast is required to avoid compiler warning/error for Tcl < 8.4. */
2353  if (Tcl_InitStubs(interp, (char*)SWIG_TCL_STUBS_VERSION, 0) == NULL) {
2354  return TCL_ERROR;
2355  }
2356 #endif
2357 #ifdef USE_TK_STUBS
2358  /* (char*) cast is required to avoid compiler warning/error. */
2359  if (Tk_InitStubs(interp, (char*)SWIG_TCL_STUBS_VERSION, 0) == NULL) {
2360  return TCL_ERROR;
2361  }
2362 #endif
2363 
2364  Tcl_PkgProvide(interp, (char*)SWIG_name, (char*)SWIG_version);
2365 
2366 #ifdef SWIG_namespace
2367  Tcl_Eval(interp, "namespace eval " SWIG_namespace " { }");
2368 #endif
2369 
2370  SWIG_InitializeModule((void *) interp);
2372 
2373  for (i = 0; swig_commands[i].name; i++) {
2374  Tcl_CreateObjCommand(interp, (char *) swig_commands[i].name, (swig_wrapper_func) swig_commands[i].wrapper,
2375  swig_commands[i].clientdata, NULL);
2376  }
2377  for (i = 0; swig_variables[i].name; i++) {
2378  Tcl_SetVar(interp, (char *) swig_variables[i].name, (char *) "", TCL_GLOBAL_ONLY);
2379  Tcl_TraceVar(interp, (char *) swig_variables[i].name, TCL_TRACE_READS | TCL_GLOBAL_ONLY,
2380  (Tcl_VarTraceProc *) swig_variables[i].get, (ClientData) swig_variables[i].addr);
2381  Tcl_TraceVar(interp, (char *) swig_variables[i].name, TCL_TRACE_WRITES | TCL_GLOBAL_ONLY,
2382  (Tcl_VarTraceProc *) swig_variables[i].set, (ClientData) swig_variables[i].addr);
2383  }
2384 
2387 
2388 
2389  return TCL_OK;
2390 }
2391 SWIGEXPORT int A_colors_SafeInit(Tcl_Interp *interp) {
2392  return SWIG_init(interp);
2393 }
2394 
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
static swig_var_info swig_variables[]
static swig_cast_info * swig_cast_initial[]
SWIGRUNTIME int SWIG_Tcl_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
#define SWIG_MakePtr(c, ptr, ty, flags)
SWIGINTERN void SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[])
static swig_const_info swig_constants[]
#define SWIG_SyntaxError
#define SWIG_ConvertPtr(oc, ptr, ty, flags)
#define SWIG_CheckState(r)
SWIGRUNTIME void SWIG_Tcl_Acquire(void *ptr)
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
#define SWIG_BUFFER_SIZE
struct swig_instance swig_instance
#define SWIG_TypeError
static swig_cast_info _swigc__p_double[]
SWIGINTERNINLINE void SWIG_Tcl_AddErrorMsg(Tcl_Interp *interp, const char *mesg)
SWIGINTERN void SWIG_Tcl_SetErrorMsg(Tcl_Interp *interp, const char *ctype, const char *mesg)
struct swig_cast_info swig_cast_info
#define SWIG_init
SWIGRUNTIME Tcl_Obj * SWIG_Tcl_NewPackedObj(void *ptr, int sz, swig_type_info *type)
SWIGRUNTIME int SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST _objv[])
SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
#define SWIG_RuntimeError
#define SWIG_GetArgs
static swig_command_info swig_commands[]
int(* swig_wrapper_func)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST[])
SWIGINTERN const char * SWIG_Tcl_ErrorType(int code)
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
#define SWIGRUNTIME
#define SWIG_version
#define SWIG_RUNTIME_VERSION
SWIGINTERN void SWIG_Tcl_SetErrorObj(Tcl_Interp *interp, const char *ctype, Tcl_Obj *obj)
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
static Tcl_HashTable swigconstTable
#define SWIG_MethodCommand
#define SWIG_ValueError
SWIGRUNTIME int SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char *fmt,...)
void c_rgb2hsv(double R, double G, double B)
#define SWIG_AddCast(r)
static swig_type_info * swig_types[3]
#define SWIG_exception_fail(code, msg)
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
#define SWIG_AttributeError
static swig_module_info swig_module
static swig_type_info _swigt__p_double
#define SWIG_SetModule(clientdata, pointer)
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
#define SWIGUNUSEDPARM(p)
struct swig_class swig_class
#define SWIGUNUSED
SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
SWIGRUNTIME void SWIG_Tcl_SetModule(Tcl_Interp *interp, swig_module_info *module)
SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb)
SWIGRUNTIMEINLINE int SWIG_Tcl_ConvertPtr(Tcl_Interp *interp, Tcl_Obj *oc, void **ptr, swig_type_info *ty, int flags)
struct swig_const_info swig_const_info
SWIGRUNTIME int SWIG_Tcl_Thisown(void *ptr)
SWIGRUNTIME void SWIG_InitializeModule(void *clientdata)
SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
SWIGINTERN void SWIG_Tcl_SetConstantObj(Tcl_Interp *interp, const char *name, Tcl_Obj *obj)
SWIGRUNTIMEINLINE Tcl_Obj * SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags)
static swig_cast_info _swigc__p_char[]
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty)
#define SWIGINTERN
SWIGINTERN int _wrap_cmy2rgb(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
#define SWIG_ArgError(r)
#define SWIG_NewPointerObj(ptr, type, flags)
#define SWIG_Thisown(ptr)
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
void *(* swig_converter_func)(void *, int *)
#define SWIG_POINTER_NO_NULL
#define SWIG_IOError
SWIGRUNTIME Tcl_Obj * SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *type, int flags)
#define SWIG_NullReferenceError
SWIGINTERN int _wrap_rgb2hsv(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
#define SWIG_POINTER_DISOWN
struct swig_type_info swig_type_info
SWIGRUNTIME char * SWIG_Tcl_PointerTypeFromString(char *c)
SWIGRUNTIME int SWIG_Tcl_Disown(void *ptr)
#define SWIG_ObjectDelete
#define SWIG_NewPackedObj(ptr, sz, type)
#define SWIG_GetModule(clientdata)
#define SWIG_fail
SWIGRUNTIME void SWIG_PropagateClientData(void)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
SWIGINTERN Tcl_Obj * SWIG_Tcl_GetConstantObj(const char *key)
#define SWIG_TYPE_TABLE_NAME
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
SWIGEXPORT int A_colors_SafeInit(Tcl_Interp *interp)
SWIGRUNTIME swig_module_info * SWIG_Tcl_GetModule(Tcl_Interp *interp)
struct swig_module_info swig_module_info
#define SWIG_TCL_POINTER
#define SWIG_Acquire(ptr)
SWIGRUNTIME void SWIG_Tcl_ObjectDelete(ClientData clientData)
#define SWIG_ERROR
#define SWIG_name
SWIGRUNTIME int SWIG_Tcl_ConvertPacked(Tcl_Interp *SWIGUNUSEDPARM(interp), Tcl_Obj *obj, void *ptr, int sz, swig_type_info *ty)
#define SWIG_Disown(ptr)
static swig_type_info * swig_type_initial[]
static int swigconstTableinit
struct swig_attribute swig_attribute
void(* swig_delete_func)(ClientData)
SWIGRUNTIME Tcl_HashTable * SWIG_Tcl_ObjectTable(void)
SWIGRUNTIME int SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, const char *c, void **ptr, swig_type_info *ty, int flags)
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
#define SWIG_MemoryError
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
#define SWIG_SystemError
#define SWIG_DivisionByZero
#define SWIGTYPE_p_double
static swig_type_info _swigt__p_char
struct swig_method swig_method
#define SWIG_TCL_DECL_ARGS_2(arg1, arg2)
SWIGINTERN int _wrap_hsv2rgb(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
#define SWIG_OverflowError
#define SWIGEXPORT
#define SWIG_IsOK(r)
int(* swig_wrapper)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST[])
SWIGINTERN int _wrap_cmyk2cmy(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[])
SWIGRUNTIME void SWIG_Tcl_MakePtr(char *c, void *ptr, swig_type_info *ty, int SWIGUNUSEDPARM(flags))
struct swig_type_info *(* swig_dycast_func)(void **)
#define SWIG_TCL_CALL_ARGS_2(arg1, arg2)
#define SWIG_IndexError
SWIGINTERN void SWIG_Tcl_InstallMethodLookupTables(void)
#define SWIG_TCL_STUBS_VERSION
#define SWIG_prefix
#define SWIG_TCL_BINARY
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
#define SWIG_OK
#define SWIGINTERNINLINE
#define SWIGRUNTIMEINLINE
double v(const uint32_t step, const uint32_t n)
Definition: generate.cxx:42
void rgb2hsv(double R, double G, double B, double &H, double &S, double &V)
Definition: a_colors.cxx:59
void cmyk2cmy(double C, double M, double Y, double K, double &Cn, double &Mn, double &Yn)
Definition: a_colors.cxx:52
void cmy2rgb(double C, double M, double Y, double &R, double &G, double &B)
Definition: a_colors.cxx:45
void hsv2rgb(double H, double S, double V, double &R, double &G, double &B)
Definition: a_colors.cxx:92
std::string name
Definition: pixelpos.cxx:77
swig_wrapper setmethod
swig_wrapper getmethod
swig_type_info * type
struct swig_cast_info * prev
struct swig_cast_info * next
swig_converter_func converter
swig_method * methods
swig_type_info ** type
Tcl_HashTable hashtable
struct swig_class ** bases
swig_module_info * module
const char * name
void(* destructor)(void *)
swig_wrapper constructor
swig_attribute * attributes
const char ** base_names
swig_type_info ** ptype
swig_class * classptr
const char * name
swig_wrapper method
swig_type_info ** types
swig_cast_info ** cast_initial
swig_type_info ** type_initial
struct swig_module_info * next
swig_dycast_func dcast
struct swig_cast_info * cast