PLplot  5.9.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
plplotluacLUA_wrap.c
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 2.0.11
4  *
5  * This file is not intended to be easily readable and contains a number of
6  * coding conventions designed to improve portability and efficiency. Do not make
7  * changes to this file unless you know what you are doing--modify the SWIG
8  * interface file instead.
9  * ----------------------------------------------------------------------------- */
10 
11 #define SWIGLUA
12 #define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA
13 #define SWIG_LUA_MODULE_GLOBAL
14 
15 /* -----------------------------------------------------------------------------
16  * This section contains generic SWIG labels for method/variable
17  * declarations/attributes, and other compiler dependent labels.
18  * ----------------------------------------------------------------------------- */
19 
20 /* template workaround for compilers that cannot correctly implement the C++ standard */
21 #ifndef SWIGTEMPLATEDISAMBIGUATOR
22 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
23 # define SWIGTEMPLATEDISAMBIGUATOR template
24 # elif defined(__HP_aCC)
25 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
26 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
27 # define SWIGTEMPLATEDISAMBIGUATOR template
28 # else
29 # define SWIGTEMPLATEDISAMBIGUATOR
30 # endif
31 #endif
32 
33 /* inline attribute */
34 #ifndef SWIGINLINE
35 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
36 # define SWIGINLINE inline
37 # else
38 # define SWIGINLINE
39 # endif
40 #endif
41 
42 /* attribute recognised by some compilers to avoid 'unused' warnings */
43 #ifndef SWIGUNUSED
44 # if defined(__GNUC__)
45 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
46 # define SWIGUNUSED __attribute__ ((__unused__))
47 # else
48 # define SWIGUNUSED
49 # endif
50 # elif defined(__ICC)
51 # define SWIGUNUSED __attribute__ ((__unused__))
52 # else
53 # define SWIGUNUSED
54 # endif
55 #endif
56 
57 #ifndef SWIG_MSC_UNSUPPRESS_4505
58 # if defined(_MSC_VER)
59 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
60 # endif
61 #endif
62 
63 #ifndef SWIGUNUSEDPARM
64 # ifdef __cplusplus
65 # define SWIGUNUSEDPARM(p)
66 # else
67 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
68 # endif
69 #endif
70 
71 /* internal SWIG method */
72 #ifndef SWIGINTERN
73 # define SWIGINTERN static SWIGUNUSED
74 #endif
75 
76 /* internal inline SWIG method */
77 #ifndef SWIGINTERNINLINE
78 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
79 #endif
80 
81 /* exporting methods */
82 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
83 # ifndef GCC_HASCLASSVISIBILITY
84 # define GCC_HASCLASSVISIBILITY
85 # endif
86 #endif
87 
88 #ifndef SWIGEXPORT
89 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
90 # if defined(STATIC_LINKED)
91 # define SWIGEXPORT
92 # else
93 # define SWIGEXPORT __declspec(dllexport)
94 # endif
95 # else
96 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
97 # define SWIGEXPORT __attribute__ ((visibility("default")))
98 # else
99 # define SWIGEXPORT
100 # endif
101 # endif
102 #endif
103 
104 /* calling conventions for Windows */
105 #ifndef SWIGSTDCALL
106 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
107 # define SWIGSTDCALL __stdcall
108 # else
109 # define SWIGSTDCALL
110 # endif
111 #endif
112 
113 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
114 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
115 # define _CRT_SECURE_NO_DEPRECATE
116 #endif
117 
118 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
119 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
120 # define _SCL_SECURE_NO_DEPRECATE
121 #endif
122 
123 
124 /* -----------------------------------------------------------------------------
125  * swigrun.swg
126  *
127  * This file contains generic C API SWIG runtime support for pointer
128  * type checking.
129  * ----------------------------------------------------------------------------- */
130 
131 /* This should only be incremented when either the layout of swig_type_info changes,
132  or for whatever reason, the runtime changes incompatibly */
133 #define SWIG_RUNTIME_VERSION "4"
134 
135 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
136 #ifdef SWIG_TYPE_TABLE
137 # define SWIG_QUOTE_STRING(x) #x
138 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
139 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
140 #else
141 # define SWIG_TYPE_TABLE_NAME
142 #endif
143 
144 /*
145  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
146  creating a static or dynamic library from the SWIG runtime code.
147  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
148 
149  But only do this if strictly necessary, ie, if you have problems
150  with your compiler or suchlike.
151 */
152 
153 #ifndef SWIGRUNTIME
154 # define SWIGRUNTIME SWIGINTERN
155 #endif
156 
157 #ifndef SWIGRUNTIMEINLINE
158 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
159 #endif
160 
161 /* Generic buffer size */
162 #ifndef SWIG_BUFFER_SIZE
163 # define SWIG_BUFFER_SIZE 1024
164 #endif
165 
166 /* Flags for pointer conversions */
167 #define SWIG_POINTER_DISOWN 0x1
168 #define SWIG_CAST_NEW_MEMORY 0x2
169 
170 /* Flags for new pointer objects */
171 #define SWIG_POINTER_OWN 0x1
172 
173 
174 /*
175  Flags/methods for returning states.
176 
177  The SWIG conversion methods, as ConvertPtr, return an integer
178  that tells if the conversion was successful or not. And if not,
179  an error code can be returned (see swigerrors.swg for the codes).
180 
181  Use the following macros/flags to set or process the returning
182  states.
183 
184  In old versions of SWIG, code such as the following was usually written:
185 
186  if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
187  // success code
188  } else {
189  //fail code
190  }
191 
192  Now you can be more explicit:
193 
194  int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
195  if (SWIG_IsOK(res)) {
196  // success code
197  } else {
198  // fail code
199  }
200 
201  which is the same really, but now you can also do
202 
203  Type *ptr;
204  int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
205  if (SWIG_IsOK(res)) {
206  // success code
207  if (SWIG_IsNewObj(res) {
208  ...
209  delete *ptr;
210  } else {
211  ...
212  }
213  } else {
214  // fail code
215  }
216 
217  I.e., now SWIG_ConvertPtr can return new objects and you can
218  identify the case and take care of the deallocation. Of course that
219  also requires SWIG_ConvertPtr to return new result values, such as
220 
221  int SWIG_ConvertPtr(obj, ptr,...) {
222  if (<obj is ok>) {
223  if (<need new object>) {
224  *ptr = <ptr to new allocated object>;
225  return SWIG_NEWOBJ;
226  } else {
227  *ptr = <ptr to old object>;
228  return SWIG_OLDOBJ;
229  }
230  } else {
231  return SWIG_BADOBJ;
232  }
233  }
234 
235  Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
236  more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
237  SWIG errors code.
238 
239  Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
240  allows to return the 'cast rank', for example, if you have this
241 
242  int food(double)
243  int fooi(int);
244 
245  and you call
246 
247  food(1) // cast rank '1' (1 -> 1.0)
248  fooi(1) // cast rank '0'
249 
250  just use the SWIG_AddCast()/SWIG_CheckState()
251 */
252 
253 #define SWIG_OK (0)
254 #define SWIG_ERROR (-1)
255 #define SWIG_IsOK(r) (r >= 0)
256 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
257 
258 /* The CastRankLimit says how many bits are used for the cast rank */
259 #define SWIG_CASTRANKLIMIT (1 << 8)
260 /* The NewMask denotes the object was created (using new/malloc) */
261 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
262 /* The TmpMask is for in/out typemaps that use temporal objects */
263 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
264 /* Simple returning values */
265 #define SWIG_BADOBJ (SWIG_ERROR)
266 #define SWIG_OLDOBJ (SWIG_OK)
267 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
268 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
269 /* Check, add and del mask methods */
270 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
271 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
272 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
273 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
274 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
275 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
276 
277 /* Cast-Rank Mode */
278 #if defined(SWIG_CASTRANK_MODE)
279 # ifndef SWIG_TypeRank
280 # define SWIG_TypeRank unsigned long
281 # endif
282 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
283 # define SWIG_MAXCASTRANK (2)
284 # endif
285 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
286 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
287 SWIGINTERNINLINE int SWIG_AddCast(int r) {
288  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
289 }
291  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
292 }
293 #else /* no cast-rank mode */
294 # define SWIG_AddCast(r) (r)
295 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
296 #endif
297 
298 
299 #include <string.h>
300 
301 #ifdef __cplusplus
302 extern "C" {
303 #endif
304 
305 typedef void *(*swig_converter_func)(void *, int *);
306 typedef struct swig_type_info *(*swig_dycast_func)(void **);
307 
308 /* Structure to store information on one type */
309 typedef struct swig_type_info {
310  const char *name; /* mangled name of this type */
311  const char *str; /* human readable name of this type */
312  swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
313  struct swig_cast_info *cast; /* linked list of types that can cast into this type */
314  void *clientdata; /* language specific type data */
315  int owndata; /* flag if the structure owns the clientdata */
317 
318 /* Structure to store a type and conversion function used for casting */
319 typedef struct swig_cast_info {
320  swig_type_info *type; /* pointer to type that is equivalent to this type */
321  swig_converter_func converter; /* function to cast the void pointers */
322  struct swig_cast_info *next; /* pointer to next cast in linked list */
323  struct swig_cast_info *prev; /* pointer to the previous cast */
325 
326 /* Structure used to store module information
327  * Each module generates one structure like this, and the runtime collects
328  * all of these structures and stores them in a circularly linked list.*/
329 typedef struct swig_module_info {
330  swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
331  size_t size; /* Number of types in this module */
332  struct swig_module_info *next; /* Pointer to next element in circularly linked list */
333  swig_type_info **type_initial; /* Array of initially generated type structures */
334  swig_cast_info **cast_initial; /* Array of initially generated casting structures */
335  void *clientdata; /* Language specific module data */
337 
338 /*
339  Compare two type names skipping the space characters, therefore
340  "char*" == "char *" and "Class<int>" == "Class<int >", etc.
341 
342  Return 0 when the two name types are equivalent, as in
343  strncmp, but skipping ' '.
344 */
345 SWIGRUNTIME int
346 SWIG_TypeNameComp(const char *f1, const char *l1,
347  const char *f2, const char *l2) {
348  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
349  while ((*f1 == ' ') && (f1 != l1)) ++f1;
350  while ((*f2 == ' ') && (f2 != l2)) ++f2;
351  if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
352  }
353  return (int)((l1 - f1) - (l2 - f2));
354 }
355 
356 /*
357  Check type equivalence in a name list like <name1>|<name2>|...
358  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
359 */
360 SWIGRUNTIME int
361 SWIG_TypeCmp(const char *nb, const char *tb) {
362  int equiv = 1;
363  const char* te = tb + strlen(tb);
364  const char* ne = nb;
365  while (equiv != 0 && *ne) {
366  for (nb = ne; *ne; ++ne) {
367  if (*ne == '|') break;
368  }
369  equiv = SWIG_TypeNameComp(nb, ne, tb, te);
370  if (*ne) ++ne;
371  }
372  return equiv;
373 }
374 
375 /*
376  Check type equivalence in a name list like <name1>|<name2>|...
377  Return 0 if not equal, 1 if equal
378 */
379 SWIGRUNTIME int
380 SWIG_TypeEquiv(const char *nb, const char *tb) {
381  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
382 }
383 
384 /*
385  Check the typename
386 */
388 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
389  if (ty) {
390  swig_cast_info *iter = ty->cast;
391  while (iter) {
392  if (strcmp(iter->type->name, c) == 0) {
393  if (iter == ty->cast)
394  return iter;
395  /* Move iter to the top of the linked list */
396  iter->prev->next = iter->next;
397  if (iter->next)
398  iter->next->prev = iter->prev;
399  iter->next = ty->cast;
400  iter->prev = 0;
401  if (ty->cast) ty->cast->prev = iter;
402  ty->cast = iter;
403  return iter;
404  }
405  iter = iter->next;
406  }
407  }
408  return 0;
409 }
410 
411 /*
412  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
413 */
416  if (ty) {
417  swig_cast_info *iter = ty->cast;
418  while (iter) {
419  if (iter->type == from) {
420  if (iter == ty->cast)
421  return iter;
422  /* Move iter to the top of the linked list */
423  iter->prev->next = iter->next;
424  if (iter->next)
425  iter->next->prev = iter->prev;
426  iter->next = ty->cast;
427  iter->prev = 0;
428  if (ty->cast) ty->cast->prev = iter;
429  ty->cast = iter;
430  return iter;
431  }
432  iter = iter->next;
433  }
434  }
435  return 0;
436 }
437 
438 /*
439  Cast a pointer up an inheritance hierarchy
440 */
441 SWIGRUNTIMEINLINE void *
442 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
443  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
444 }
445 
446 /*
447  Dynamic pointer casting. Down an inheritance hierarchy
448 */
451  swig_type_info *lastty = ty;
452  if (!ty || !ty->dcast) return ty;
453  while (ty && (ty->dcast)) {
454  ty = (*ty->dcast)(ptr);
455  if (ty) lastty = ty;
456  }
457  return lastty;
458 }
459 
460 /*
461  Return the name associated with this type
462 */
463 SWIGRUNTIMEINLINE const char *
465  return ty->name;
466 }
467 
468 /*
469  Return the pretty name associated with this type,
470  that is an unmangled type name in a form presentable to the user.
471 */
472 SWIGRUNTIME const char *
474  /* The "str" field contains the equivalent pretty names of the
475  type, separated by vertical-bar characters. We choose
476  to print the last name, as it is often (?) the most
477  specific. */
478  if (!type) return NULL;
479  if (type->str != NULL) {
480  const char *last_name = type->str;
481  const char *s;
482  for (s = type->str; *s; s++)
483  if (*s == '|') last_name = s+1;
484  return last_name;
485  }
486  else
487  return type->name;
488 }
489 
490 /*
491  Set the clientdata field for a type
492 */
493 SWIGRUNTIME void
495  swig_cast_info *cast = ti->cast;
496  /* if (ti->clientdata == clientdata) return; */
497  ti->clientdata = clientdata;
498 
499  while (cast) {
500  if (!cast->converter) {
501  swig_type_info *tc = cast->type;
502  if (!tc->clientdata) {
503  SWIG_TypeClientData(tc, clientdata);
504  }
505  }
506  cast = cast->next;
507  }
508 }
509 SWIGRUNTIME void
511  SWIG_TypeClientData(ti, clientdata);
512  ti->owndata = 1;
513 }
514 
515 /*
516  Search for a swig_type_info structure only by mangled name
517  Search is a O(log #types)
518 
519  We start searching at module start, and finish searching when start == end.
520  Note: if start == end at the beginning of the function, we go all the way around
521  the circular list.
522 */
525  swig_module_info *end,
526  const char *name) {
527  swig_module_info *iter = start;
528  do {
529  if (iter->size) {
530  register size_t l = 0;
531  register size_t r = iter->size - 1;
532  do {
533  /* since l+r >= 0, we can (>> 1) instead (/ 2) */
534  register size_t i = (l + r) >> 1;
535  const char *iname = iter->types[i]->name;
536  if (iname) {
537  register int compare = strcmp(name, iname);
538  if (compare == 0) {
539  return iter->types[i];
540  } else if (compare < 0) {
541  if (i) {
542  r = i - 1;
543  } else {
544  break;
545  }
546  } else if (compare > 0) {
547  l = i + 1;
548  }
549  } else {
550  break; /* should never happen */
551  }
552  } while (l <= r);
553  }
554  iter = iter->next;
555  } while (iter != end);
556  return 0;
557 }
558 
559 /*
560  Search for a swig_type_info structure for either a mangled name or a human readable name.
561  It first searches the mangled names of the types, which is a O(log #types)
562  If a type is not found it then searches the human readable names, which is O(#types).
563 
564  We start searching at module start, and finish searching when start == end.
565  Note: if start == end at the beginning of the function, we go all the way around
566  the circular list.
567 */
570  swig_module_info *end,
571  const char *name) {
572  /* STEP 1: Search the name field using binary search */
573  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
574  if (ret) {
575  return ret;
576  } else {
577  /* STEP 2: If the type hasn't been found, do a complete search
578  of the str field (the human readable name) */
579  swig_module_info *iter = start;
580  do {
581  register size_t i = 0;
582  for (; i < iter->size; ++i) {
583  if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
584  return iter->types[i];
585  }
586  iter = iter->next;
587  } while (iter != end);
588  }
589 
590  /* neither found a match */
591  return 0;
592 }
593 
594 /*
595  Pack binary data into a string
596 */
597 SWIGRUNTIME char *
598 SWIG_PackData(char *c, void *ptr, size_t sz) {
599  static const char hex[17] = "0123456789abcdef";
600  register const unsigned char *u = (unsigned char *) ptr;
601  register const unsigned char *eu = u + sz;
602  for (; u != eu; ++u) {
603  register unsigned char uu = *u;
604  *(c++) = hex[(uu & 0xf0) >> 4];
605  *(c++) = hex[uu & 0xf];
606  }
607  return c;
608 }
609 
610 /*
611  Unpack binary data from a string
612 */
613 SWIGRUNTIME const char *
614 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
615  register unsigned char *u = (unsigned char *) ptr;
616  register const unsigned char *eu = u + sz;
617  for (; u != eu; ++u) {
618  register char d = *(c++);
619  register unsigned char uu;
620  if ((d >= '0') && (d <= '9'))
621  uu = ((d - '0') << 4);
622  else if ((d >= 'a') && (d <= 'f'))
623  uu = ((d - ('a'-10)) << 4);
624  else
625  return (char *) 0;
626  d = *(c++);
627  if ((d >= '0') && (d <= '9'))
628  uu |= (d - '0');
629  else if ((d >= 'a') && (d <= 'f'))
630  uu |= (d - ('a'-10));
631  else
632  return (char *) 0;
633  *u = uu;
634  }
635  return c;
636 }
637 
638 /*
639  Pack 'void *' into a string buffer.
640 */
641 SWIGRUNTIME char *
642 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
643  char *r = buff;
644  if ((2*sizeof(void *) + 2) > bsz) return 0;
645  *(r++) = '_';
646  r = SWIG_PackData(r,&ptr,sizeof(void *));
647  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
648  strcpy(r,name);
649  return buff;
650 }
651 
652 SWIGRUNTIME const char *
653 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
654  if (*c != '_') {
655  if (strcmp(c,"NULL") == 0) {
656  *ptr = (void *) 0;
657  return name;
658  } else {
659  return 0;
660  }
661  }
662  return SWIG_UnpackData(++c,ptr,sizeof(void *));
663 }
664 
665 SWIGRUNTIME char *
666 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
667  char *r = buff;
668  size_t lname = (name ? strlen(name) : 0);
669  if ((2*sz + 2 + lname) > bsz) return 0;
670  *(r++) = '_';
671  r = SWIG_PackData(r,ptr,sz);
672  if (lname) {
673  strncpy(r,name,lname+1);
674  } else {
675  *r = 0;
676  }
677  return buff;
678 }
679 
680 SWIGRUNTIME const char *
681 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
682  if (*c != '_') {
683  if (strcmp(c,"NULL") == 0) {
684  memset(ptr,0,sz);
685  return name;
686  } else {
687  return 0;
688  }
689  }
690  return SWIG_UnpackData(++c,ptr,sz);
691 }
692 
693 #ifdef __cplusplus
694 }
695 #endif
696 
697 /* -----------------------------------------------------------------------------
698  * luarun.swg
699  *
700  * This file contains the runtime support for Lua modules
701  * and includes code for managing global variables and pointer
702  * type checking.
703  * ----------------------------------------------------------------------------- */
704 
705 #ifdef __cplusplus
706 extern "C" {
707 #endif
708 
709 #include "lua.h"
710 #include "lauxlib.h"
711 #include <stdlib.h> /* for malloc */
712 #include <assert.h> /* for a few sanity tests */
713 
714 /* -----------------------------------------------------------------------------
715  * Lua flavors
716  * ----------------------------------------------------------------------------- */
717 
718 #define SWIG_LUA_FLAVOR_LUA 1
719 #define SWIG_LUA_FLAVOR_ELUA 2
720 #define SWIG_LUA_FLAVOR_ELUAC 3
721 
722 #if !defined(SWIG_LUA_TARGET)
723 # error SWIG_LUA_TARGET not defined
724 #endif
725 
726 #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
727 # define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
728 # define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
729 # define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
730 # define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
731 #else /* SWIG_LUA_FLAVOR_LUA */
732 # define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
733 # define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
734 # define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
735 # define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
736 #endif
737 
738 #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
739 # define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
740 # define LSTRVAL LRO_STRVAL
741 #endif
742 
743 /* -----------------------------------------------------------------------------
744  * compatibility defines
745  * ----------------------------------------------------------------------------- */
746 
747 /* History of Lua C API length functions: In Lua 5.0 (and before?)
748  there was "lua_strlen". In Lua 5.1, this was renamed "lua_objlen",
749  but a compatibility define of "lua_strlen" was added. In Lua 5.2,
750  this function was again renamed, to "lua_rawlen" (to emphasize that
751  it doesn't call the "__len" metamethod), and the compatibility
752  define of lua_strlen was removed. All SWIG uses have been updated
753  to "lua_rawlen", and we add our own defines of that here for older
754  versions of Lua. */
755 #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
756 # define lua_rawlen lua_strlen
757 #elif LUA_VERSION_NUM == 501
758 # define lua_rawlen lua_objlen
759 #endif
760 
761 
762 /* lua_pushglobaltable is the recommended "future-proof" way to get
763  the global table for Lua 5.2 and later. Here we define
764  lua_pushglobaltable ourselves for Lua versions before 5.2. */
765 #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
766 # define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
767 #endif
768 
769 
770 /* --------------------------------------------------------------------------
771  * Helper functions for error handling
772  * -------------------------------------------------------------------------- */
773 
774 /* Push the string STR on the Lua stack, like lua_pushstring, but
775  prefixed with the the location of the innermost Lua call-point
776  (as formated by luaL_where). */
777 SWIGRUNTIME void
778 SWIG_Lua_pusherrstring (lua_State *L, const char *str)
779 {
780  luaL_where (L, 1);
781  lua_pushstring (L, str);
782  lua_concat (L, 2);
783 }
784 
785 /* Push a formatted string generated from FMT and following args on
786  the Lua stack, like lua_pushfstring, but prefixed with the the
787  location of the innermost Lua call-point (as formated by luaL_where). */
788 SWIGRUNTIME void
789 SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...)
790 {
791  va_list argp;
792  va_start(argp, fmt);
793  luaL_where(L, 1);
794  lua_pushvfstring(L, fmt, argp);
795  va_end(argp);
796  lua_concat(L, 2);
797 }
798 
799 
800 /* -----------------------------------------------------------------------------
801  * global swig types
802  * ----------------------------------------------------------------------------- */
803 /* Constant table */
804 #define SWIG_LUA_INT 1
805 #define SWIG_LUA_FLOAT 2
806 #define SWIG_LUA_STRING 3
807 #define SWIG_LUA_POINTER 4
808 #define SWIG_LUA_BINARY 5
809 #define SWIG_LUA_CHAR 6
810 
811 /* Structure for variable linking table */
812 typedef struct {
813  const char *name;
814  lua_CFunction get;
815  lua_CFunction set;
817 
818 /* Constant information structure */
819 typedef struct {
820  int type;
821  char *name;
822  long lvalue;
823  double dvalue;
824  void *pvalue;
827 
828 typedef struct {
829  const char *name;
830  lua_CFunction method;
832 
833 typedef struct {
834  const char *name;
835  lua_CFunction getmethod;
836  lua_CFunction setmethod;
838 
839 // Can be used to create namespaces. Currently used to
840 // wrap class static methods/variables/constants
841 typedef struct {
842  const char *name;
847 
848 typedef struct swig_lua_class {
849  const char *name;
851  lua_CFunction constructor;
852  void (*destructor)(void *);
857  const char **base_names;
859 
860 /* this is the struct for wrapping all pointers in SwigLua
861 */
862 typedef struct {
864  int own; /* 1 if owned & must be destroyed */
865  void *ptr;
867 
868 /* this is the struct for wrapping arbitrary packed binary data
869 (currently it is only used for member function pointers)
870 the data ordering is similar to swig_lua_userdata, but it is currently not possible
871 to tell the two structures apart within SWIG, other than by looking at the type
872 */
873 typedef struct {
875  int own; /* 1 if owned & must be destroyed */
876  char data[1]; /* arbitary amount of data */
878 
879 /* Common SWIG API */
880 #define SWIG_NewPointerObj(L, ptr, type, owner) SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
881 #define SWIG_ConvertPtr(L,idx, ptr, type, flags) SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
882 #define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname) SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
883 /* for C++ member pointers, ie, member methods */
884 #define SWIG_ConvertMember(L, idx, ptr, sz, ty) SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
885 #define SWIG_NewMemberObj(L, ptr, sz, type) SWIG_Lua_NewPackedObj(L, ptr, sz, type)
886 
887 /* Runtime API */
888 #define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
889 #define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
890 #define SWIG_MODULE_CLIENTDATA_TYPE lua_State*
891 
892 /* Contract support */
893 #define SWIG_contract_assert(expr, msg) \
894  if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } else
895 
896 
897 /* helper #defines */
898 #define SWIG_fail {goto fail;}
899 #define SWIG_fail_arg(func_name,argnum,type) \
900  {SWIG_Lua_pushferrstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
901  func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
902  goto fail;}
903 #define SWIG_fail_ptr(func_name,argnum,type) \
904  SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
905 #define SWIG_check_num_args(func_name,a,b) \
906  if (lua_gettop(L)<a || lua_gettop(L)>b) \
907  {SWIG_Lua_pushferrstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
908  goto fail;}
909 
910 
911 #define SWIG_Lua_get_table(L,n) \
912  (lua_pushstring(L, n), lua_rawget(L,-2))
913 
914 #define SWIG_Lua_add_function(L,n,f) \
915  (lua_pushstring(L, n), \
916  lua_pushcfunction(L, f), \
917  lua_rawset(L,-3))
918 
919 /* special helper for allowing 'nil' for usertypes */
920 #define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))
921 
922 #ifdef __cplusplus
923 /* Special helper for member function pointers
924 it gets the address, casts it, then dereferences it */
925 //#define SWIG_mem_fn_as_voidptr(a) (*((char**)&(a)))
926 #endif
927 
928 /* storing/access of swig_module_info */
930 SWIG_Lua_GetModule(lua_State* L) {
931  swig_module_info *ret = 0;
932  lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
933  lua_rawget(L,LUA_REGISTRYINDEX);
934  if (lua_islightuserdata(L,-1))
935  ret=(swig_module_info*)lua_touserdata(L,-1);
936  lua_pop(L,1); /* tidy */
937  return ret;
938 }
939 
940 SWIGRUNTIME void
941 SWIG_Lua_SetModule(lua_State* L, swig_module_info *module) {
942  /* add this all into the Lua registry: */
943  lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
944  lua_pushlightuserdata(L,(void*)module);
945  lua_rawset(L,LUA_REGISTRYINDEX);
946 }
947 
948 /* -----------------------------------------------------------------------------
949  * global variable support code: modules
950  * ----------------------------------------------------------------------------- */
951 
952 /* this function is called when trying to set an immutable.
953 default action is to print an error.
954 This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
956 {
957 /* there should be 1 param passed in: the new value */
958 #ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
959  lua_pop(L,1); /* remove it */
960  luaL_error(L,"This variable is immutable");
961 #endif
962  return 0; /* should not return anything */
963 }
964 
965 /* the module.get method used for getting linked data */
967 {
968 /* there should be 2 params passed in
969  (1) table (not the meta table)
970  (2) string name of the attribute
971  printf("SWIG_Lua_module_get %p(%s) '%s'\n",
972  lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
973  lua_tostring(L,2));
974 */
975  /* get the metatable */
976 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
977  assert(lua_isrotable(L,1)); /* just in case */
978 #else
979  assert(lua_istable(L,1)); /* default Lua action */
980 #endif
981  lua_getmetatable(L,1); /* get the metatable */
982 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
983  assert(lua_isrotable(L,-1)); /* just in case */
984 #else
985  assert(lua_istable(L,-1));
986 #endif
987  SWIG_Lua_get_table(L,".get"); /* get the .get table */
988  lua_remove(L,3); /* remove metatable */
989 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
990  if (lua_isrotable(L,-1))
991 #else
992  if (lua_istable(L,-1))
993 #endif
994  {
995  /* look for the key in the .get table */
996  lua_pushvalue(L,2); /* key */
997  lua_rawget(L,-2);
998  lua_remove(L,3); /* remove .get */
999  if (lua_iscfunction(L,-1))
1000  { /* found it so call the fn & return its value */
1001  lua_call(L,0,1);
1002  return 1;
1003  }
1004  lua_pop(L,1); /* remove the top */
1005  }
1006  lua_pop(L,1); /* remove the .get */
1007  lua_pushnil(L); /* return a nil */
1008  return 1;
1009 }
1010 
1011 /* the module.set method used for setting linked data */
1013 {
1014 /* there should be 3 params passed in
1015  (1) table (not the meta table)
1016  (2) string name of the attribute
1017  (3) any for the new value
1018 */
1019  /* get the metatable */
1020 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
1021  assert(lua_isrotable(L,1)); /* just in case */
1022 #else
1023  assert(lua_istable(L,1)); /* default Lua action */
1024 #endif
1025  lua_getmetatable(L,1); /* get the metatable */
1026 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
1027  assert(lua_isrotable(L,-1)); /* just in case */
1028 #else
1029  assert(lua_istable(L,-1));
1030 #endif
1031  SWIG_Lua_get_table(L,".set"); /* get the .set table */
1032  lua_remove(L,4); /* remove metatable */
1033 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
1034  if (lua_isrotable(L,-1))
1035 #else
1036  if (lua_istable(L,-1))
1037 #endif
1038  {
1039  /* look for the key in the .set table */
1040  lua_pushvalue(L,2); /* key */
1041  lua_rawget(L,-2);
1042  lua_remove(L,4); /* remove .set */
1043  if (lua_iscfunction(L,-1))
1044  { /* found it so call the fn & return its value */
1045  lua_pushvalue(L,3); /* value */
1046  lua_call(L,1,0);
1047  return 0;
1048  }
1049 #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA)
1050  else {
1051  return 0; // Exits stoically if an invalid key is initialized.
1052  }
1053 #endif
1054  }
1055  lua_settop(L,3); /* reset back to start */
1056  /* we now have the table, key & new value, so just set directly */
1057  lua_rawset(L,1); /* add direct */
1058  return 0;
1059 }
1060 
1061 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
1062 /* registering a module in lua. Pushes the module table on the stack. */
1063 SWIGINTERN void SWIG_Lua_module_begin(lua_State* L,const char* name)
1064 {
1065  assert(lua_istable(L,-1)); /* just in case */
1066  lua_pushstring(L,name);
1067  lua_newtable(L); /* the table */
1068  /* add meta table */
1069  lua_newtable(L); /* the meta table */
1072  lua_pushstring(L,".get");
1073  lua_newtable(L); /* the .get table */
1074  lua_rawset(L,-3); /* add .get into metatable */
1075  lua_pushstring(L,".set");
1076  lua_newtable(L); /* the .set table */
1077  lua_rawset(L,-3); /* add .set into metatable */
1078  lua_setmetatable(L,-2); /* sets meta table in module */
1079 #ifdef SWIG_LUA_MODULE_GLOBAL
1080  /* If requested, install the module directly into the global namespace. */
1081  lua_rawset(L,-3); /* add module into parent */
1082  SWIG_Lua_get_table(L,name); /* get the table back out */
1083 #else
1084  /* Do not install the module table as global name. The stack top has
1085  the module table with the name below. We pop the top and replace
1086  the name with it. */
1087  lua_replace(L,-2);
1088 #endif
1089 }
1090 
1091 /* ending the register */
1093 {
1094  lua_pop(L,1); /* tidy stack (remove module) */
1095 }
1096 
1097 /* adding a linked variable to the module */
1098 SWIGINTERN void SWIG_Lua_module_add_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
1099 {
1100  assert(lua_istable(L,-1)); /* just in case */
1101  lua_getmetatable(L,-1); /* get the metatable */
1102  assert(lua_istable(L,-1)); /* just in case */
1103  SWIG_Lua_get_table(L,".get"); /* find the .get table */
1104  assert(lua_istable(L,-1)); /* should be a table: */
1105  SWIG_Lua_add_function(L,name,getFn);
1106  lua_pop(L,1); /* tidy stack (remove table) */
1107  if (setFn) /* if there is a set fn */
1108  {
1109  SWIG_Lua_get_table(L,".set"); /* find the .set table */
1110  assert(lua_istable(L,-1)); /* should be a table: */
1111  SWIG_Lua_add_function(L,name,setFn);
1112  lua_pop(L,1); /* tidy stack (remove table) */
1113  }
1114  lua_pop(L,1); /* tidy stack (remove meta) */
1115 }
1116 #endif
1117 
1118 /* adding a function module */
1119 SWIGINTERN void SWIG_Lua_module_add_function(lua_State* L,const char* name,lua_CFunction fn)
1120 {
1121  SWIG_Lua_add_function(L,name,fn);
1122 }
1123 
1124 /* -----------------------------------------------------------------------------
1125  * global variable support code: namespaces
1126  * ----------------------------------------------------------------------------- */
1127 
1129 {
1130 /* there should be 2 params passed in
1131  (1) table (not the meta table)
1132  (2) string name of the attribute
1133 */
1134  assert(lua_istable(L,-2)); /* just in case */
1135  lua_getmetatable(L,-2);
1136  assert(lua_istable(L,-1));
1137  SWIG_Lua_get_table(L,".get"); /* find the .get table */
1138  assert(lua_istable(L,-1));
1139  /* look for the key in the .get table */
1140  lua_pushvalue(L,2); /* key */
1141  lua_rawget(L,-2);
1142  lua_remove(L,-2); /* stack tidy, remove .get table */
1143  if (lua_iscfunction(L,-1))
1144  { /* found it so call the fn & return its value */
1145  lua_call(L,0,1); /* 1 value in (userdata),1 out (result) */
1146  lua_remove(L,-2); /* stack tidy, remove metatable */
1147  return 1;
1148  }
1149  lua_pop(L,1); /* remove whatever was there */
1150  /* ok, so try the .fn table */
1151  SWIG_Lua_get_table(L,".fn"); /* find the .get table */
1152  assert(lua_istable(L,-1)); /* just in case */
1153  lua_pushvalue(L,2); /* key */
1154  lua_rawget(L,-2); /* look for the fn */
1155  lua_remove(L,-2); /* stack tidy, remove .fn table */
1156  if (lua_isfunction(L,-1)) /* note: whether it's a C function or lua function */
1157  { /* found it so return the fn & let lua call it */
1158  lua_remove(L,-2); /* stack tidy, remove metatable */
1159  return 1;
1160  }
1161  lua_pop(L,1); /* remove whatever was there */
1162  return 0;
1163 }
1164 
1166 {
1167 /* there should be 3 params passed in
1168  (1) table (not the meta table)
1169  (2) string name of the attribute
1170  (3) any for the new value
1171 */
1172 
1173  assert(lua_istable(L,1));
1174  lua_getmetatable(L,1); /* get the meta table */
1175  assert(lua_istable(L,-1));
1176 
1177  SWIG_Lua_get_table(L,".set"); /* find the .set table */
1178  if (lua_istable(L,-1))
1179  {
1180  /* look for the key in the .set table */
1181  lua_pushvalue(L,2); /* key */
1182  lua_rawget(L,-2);
1183  if (lua_iscfunction(L,-1))
1184  { /* found it so call the fn & return its value */
1185  lua_pushvalue(L,3); /* value */
1186  lua_call(L,1,0);
1187  return 0;
1188  }
1189  lua_pop(L,1); /* remove the value */
1190  }
1191  lua_pop(L,1); /* remove the value .set table */
1192  return 0;
1193 }
1194 
1195 SWIGINTERN void SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]); // forward declaration
1196 SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn); // forward declaration
1197 
1198 /* helper function - register namespace methods and attributes into namespace */
1200 {
1201  int i = 0;
1202  assert(lua_istable(L,-1));
1203  /* There must be table at the top of the stack */
1205 
1206  lua_getmetatable(L,-1);
1207 
1208  /* add fns */
1209  for(i=0;ns->ns_attributes[i].name;i++){
1211  }
1212 
1213  /* add methods to the metatable */
1214  SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
1215  assert(lua_istable(L,-1)); /* just in case */
1216  for(i=0;ns->ns_methods[i].name;i++){
1218  }
1219  lua_pop(L,1);
1220 
1221  /* clear stack - remove metatble */
1222  lua_pop(L,1);
1223 
1224 }
1225 
1226 /* helper function. creates namespace table and add it to module table */
1228 {
1229  assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table */
1230  lua_checkstack(L,5);
1231  lua_pushstring(L, ns->name);
1232  lua_newtable(L); /* namespace itself */
1233  lua_newtable(L); /* metatable for namespace */
1234 
1235  /* add a table called ".get" */
1236  lua_pushstring(L,".get");
1237  lua_newtable(L);
1238  lua_rawset(L,-3);
1239  /* add a table called ".set" */
1240  lua_pushstring(L,".set");
1241  lua_newtable(L);
1242  lua_rawset(L,-3);
1243  /* add a table called ".fn" */
1244  lua_pushstring(L,".fn");
1245  lua_newtable(L);
1246  lua_rawset(L,-3);
1247 
1248  /* add accessor fns for using the .get,.set&.fn */
1251 
1252  lua_setmetatable(L,-2); /* set metatable */
1253  lua_rawset(L,-3); /* add namespace to module table */
1254 }
1255 /* -----------------------------------------------------------------------------
1256  * global variable support code: classes
1257  * ----------------------------------------------------------------------------- */
1258 
1259 /* the class.get method, performs the lookup of class attributes */
1261 {
1262 /* there should be 2 params passed in
1263  (1) userdata (not the meta table)
1264  (2) string name of the attribute
1265 */
1266  assert(lua_isuserdata(L,-2)); /* just in case */
1267  lua_getmetatable(L,-2); /* get the meta table */
1268  assert(lua_istable(L,-1)); /* just in case */
1269  SWIG_Lua_get_table(L,".get"); /* find the .get table */
1270  assert(lua_istable(L,-1)); /* just in case */
1271  /* look for the key in the .get table */
1272  lua_pushvalue(L,2); /* key */
1273  lua_rawget(L,-2);
1274  lua_remove(L,-2); /* stack tidy, remove .get table */
1275  if (lua_iscfunction(L,-1))
1276  { /* found it so call the fn & return its value */
1277  lua_pushvalue(L,1); /* the userdata */
1278  lua_call(L,1,1); /* 1 value in (userdata),1 out (result) */
1279  lua_remove(L,-2); /* stack tidy, remove metatable */
1280  return 1;
1281  }
1282  lua_pop(L,1); /* remove whatever was there */
1283  /* ok, so try the .fn table */
1284  SWIG_Lua_get_table(L,".fn"); /* find the .get table */
1285  assert(lua_istable(L,-1)); /* just in case */
1286  lua_pushvalue(L,2); /* key */
1287  lua_rawget(L,-2); /* look for the fn */
1288  lua_remove(L,-2); /* stack tidy, remove .fn table */
1289  if (lua_isfunction(L,-1)) /* note: if its a C function or lua function */
1290  { /* found it so return the fn & let lua call it */
1291  lua_remove(L,-2); /* stack tidy, remove metatable */
1292  return 1;
1293  }
1294  lua_pop(L,1); /* remove whatever was there */
1295  /* NEW: looks for the __getitem() fn
1296  this is a user provided get fn */
1297  SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
1298  if (lua_iscfunction(L,-1)) /* if its there */
1299  { /* found it so call the fn & return its value */
1300  lua_pushvalue(L,1); /* the userdata */
1301  lua_pushvalue(L,2); /* the parameter */
1302  lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */
1303  lua_remove(L,-2); /* stack tidy, remove metatable */
1304  return 1;
1305  }
1306  return 0; /* sorry not known */
1307 }
1308 
1309 /* the class.set method, performs the lookup of class attributes */
1311 {
1312 /* there should be 3 params passed in
1313  (1) table (not the meta table)
1314  (2) string name of the attribute
1315  (3) any for the new value
1316 printf("SWIG_Lua_class_set %p(%s) '%s' %p(%s)\n",
1317  lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
1318  lua_tostring(L,2),
1319  lua_topointer(L,3),lua_typename(L,lua_type(L,3)));*/
1320 
1321  assert(lua_isuserdata(L,1)); /* just in case */
1322  lua_getmetatable(L,1); /* get the meta table */
1323  assert(lua_istable(L,-1)); /* just in case */
1324 
1325  SWIG_Lua_get_table(L,".set"); /* find the .set table */
1326  if (lua_istable(L,-1))
1327  {
1328  /* look for the key in the .set table */
1329  lua_pushvalue(L,2); /* key */
1330  lua_rawget(L,-2);
1331  if (lua_iscfunction(L,-1))
1332  { /* found it so call the fn & return its value */
1333  lua_pushvalue(L,1); /* userdata */
1334  lua_pushvalue(L,3); /* value */
1335  lua_call(L,2,0);
1336  return 0;
1337  }
1338  lua_pop(L,1); /* remove the value */
1339  }
1340  lua_pop(L,1); /* remove the value .set table */
1341  /* NEW: looks for the __setitem() fn
1342  this is a user provided set fn */
1343  SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
1344  if (lua_iscfunction(L,-1)) /* if its there */
1345  { /* found it so call the fn & return its value */
1346  lua_pushvalue(L,1); /* the userdata */
1347  lua_pushvalue(L,2); /* the parameter */
1348  lua_pushvalue(L,3); /* the value */
1349  lua_call(L,3,0); /* 3 values in ,0 out */
1350  lua_remove(L,-2); /* stack tidy, remove metatable */
1351  return 1;
1352  }
1353  return 0;
1354 }
1355 
1356 /* the class.destruct method called by the interpreter */
1358 {
1359 /* there should be 1 params passed in
1360  (1) userdata (not the meta table) */
1361  swig_lua_userdata* usr;
1362  swig_lua_class* clss;
1363  assert(lua_isuserdata(L,-1)); /* just in case */
1364  usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1365  /* if must be destroyed & has a destructor */
1366  if (usr->own) /* if must be destroyed */
1367  {
1368  clss=(swig_lua_class*)usr->type->clientdata; /* get the class */
1369  if (clss && clss->destructor) /* there is a destroy fn */
1370  {
1371  clss->destructor(usr->ptr); /* bye bye */
1372  }
1373  }
1374  return 0;
1375 }
1376 
1377 /* the class.__tostring method called by the interpreter and print */
1379 {
1380 /* there should be 1 param passed in
1381  (1) userdata (not the metatable) */
1382  assert(lua_isuserdata(L,1)); /* just in case */
1383  unsigned long userData = (unsigned long)lua_touserdata(L,1); /* get the userdata address for later */
1384  lua_getmetatable(L,1); /* get the meta table */
1385  assert(lua_istable(L,-1)); /* just in case */
1386 
1387  lua_getfield(L, -1, ".type");
1388  const char* className = lua_tostring(L, -1);
1389 
1390  char output[256];
1391  sprintf(output, "<%s userdata: %lX>", className, userData);
1392 
1393  lua_pushstring(L, (const char*)output);
1394  return 1;
1395 }
1396 
1397 /* to manually disown some userdata */
1399 {
1400 /* there should be 1 params passed in
1401  (1) userdata (not the meta table) */
1402  swig_lua_userdata* usr;
1403  assert(lua_isuserdata(L,-1)); /* just in case */
1404  usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1405 
1406  usr->own = 0; /* clear our ownership */
1407  return 0;
1408 }
1409 
1410 /* Constructor proxy. Used when class name entry in module is not class constructor,
1411 but special table instead. */
1413 {
1414  /* unlimited number of parameters
1415  First one is our proxy table and we should remove it
1416  Other we should pass to real constructor
1417  */
1418  assert(lua_istable(L,1));
1419  lua_pushstring(L,".constructor");
1420  lua_rawget(L,1);
1421  assert(!lua_isnil(L,-1));
1422  lua_replace(L,1); /* replace our table with real constructor */
1423  lua_call(L,lua_gettop(L)-1,1);
1424  return 1;
1425 }
1426 
1427 /* gets the swig class registry (or creates it) */
1429 {
1430  /* add this all into the swig registry: */
1431  lua_pushstring(L,"SWIG");
1432  lua_rawget(L,LUA_REGISTRYINDEX); /* get the registry */
1433  if (!lua_istable(L,-1)) /* not there */
1434  { /* must be first time, so add it */
1435  lua_pop(L,1); /* remove the result */
1436  lua_pushstring(L,"SWIG");
1437  lua_newtable(L);
1438  lua_rawset(L,LUA_REGISTRYINDEX);
1439  /* then get it */
1440  lua_pushstring(L,"SWIG");
1441  lua_rawget(L,LUA_REGISTRYINDEX);
1442  }
1443 }
1444 
1445 /* helper fn to get the classes metatable from the register */
1446 SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State* L,const char* cname)
1447 {
1448  SWIG_Lua_get_class_registry(L); /* get the registry */
1449  lua_pushstring(L,cname); /* get the name */
1450  lua_rawget(L,-2); /* get it */
1451  lua_remove(L,-2); /* tidy up (remove registry) */
1452 }
1453 
1454 /* helper add a variable to a registered class */
1455 SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
1456 {
1457  assert(lua_istable(L,-1)); /* just in case */
1458  SWIG_Lua_get_table(L,".get"); /* find the .get table */
1459  assert(lua_istable(L,-1)); /* just in case */
1460  SWIG_Lua_add_function(L,name,getFn);
1461  lua_pop(L,1); /* tidy stack (remove table) */
1462  if (setFn)
1463  {
1464  SWIG_Lua_get_table(L,".set"); /* find the .set table */
1465  assert(lua_istable(L,-1)); /* just in case */
1466  SWIG_Lua_add_function(L,name,setFn);
1467  lua_pop(L,1); /* tidy stack (remove table) */
1468  }
1469 }
1470 
1471 /* helper to recursively add class static details (static attributes, operations and constants) */
1473 {
1474  int i = 0;
1475  /* The class namespace table must be on the top of the stack */
1476  assert(lua_istable(L,-1));
1477  /* call all the base classes first: we can then override these later: */
1478  for(i=0;clss->bases[i];i++)
1479  {
1481  }
1482 
1484 }
1485 
1486 /* helper to recursively add class details (attributes & operations) */
1488 {
1489  int i;
1490  /* call all the base classes first: we can then override these later: */
1491  for(i=0;clss->bases[i];i++)
1492  {
1493  SWIG_Lua_add_class_details(L,clss->bases[i]);
1494  }
1495  /* add fns */
1496  for(i=0;clss->attributes[i].name;i++){
1498  }
1499  /* add methods to the metatable */
1500  SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
1501  assert(lua_istable(L,-1)); /* just in case */
1502  for(i=0;clss->methods[i].name;i++){
1503  SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
1504  }
1505  lua_pop(L,1); /* tidy stack (remove table) */
1506  /* add operator overloads
1507  these look ANY method which start with "__" and assume they
1508  are operator overloads & add them to the metatable
1509  (this might mess up is someone defines a method __gc (the destructor)*/
1510  for(i=0;clss->methods[i].name;i++){
1511  if (clss->methods[i].name[0]=='_' && clss->methods[i].name[1]=='_'){
1512  SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
1513  }
1514  }
1515 }
1516 
1517 /* set up the base classes pointers.
1518 Each class structure has a list of pointers to the base class structures.
1519 This function fills them.
1520 It cannot be done at compile time, as this will not work with hireachies
1521 spread over more than one swig file.
1522 Therefore it must be done at runtime, querying the SWIG type system.
1523 */
1525 {
1526  int i=0;
1527  swig_module_info* module=SWIG_GetModule(L);
1528  for(i=0;clss->base_names[i];i++)
1529  {
1530  if (clss->bases[i]==0) /* not found yet */
1531  {
1532  /* lookup and cache the base class */
1533  swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
1534  if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
1535  }
1536  }
1537 }
1538 
1539 /* Register class static methods,attributes etc as well as constructor proxy */
1541 {
1542  lua_checkstack(L,5); /* just in case */
1543  assert(lua_istable(L,-1)); /* just in case */
1544  assert(strcmp(clss->name, clss->cls_static.name) == 0); /* in class those 2 must be equal */
1545 
1547 
1548  SWIG_Lua_get_table(L,clss->name); // Get namespace table back
1549  assert(lua_istable(L,-1)); /* just in case */
1550 
1551  /* add its constructor to module with the name of the class
1552  so you can do MyClass(...) as well as new_MyClass(...)
1553  BUT only if a constructor is defined
1554  (this overcomes the problem of pure virtual classes without constructors)*/
1555  if (clss->constructor)
1556  {
1557  SWIG_Lua_add_function(L,".constructor", clss->constructor);
1558  lua_getmetatable(L,-1);
1559  assert(lua_istable(L,-1)); /* just in case */
1561  lua_pop(L,1);
1562  }
1563 
1564  assert(lua_istable(L,-1)); /* just in case */
1566 
1567  /* clear stack */
1568  lua_pop(L,1);
1569 }
1570 
1571 /* performs the entire class registration process */
1573 {
1575 
1576  SWIG_Lua_get_class_registry(L); /* get the registry */
1577  lua_pushstring(L,clss->name); /* get the name */
1578  lua_newtable(L); /* create the metatable */
1579  /* add string of class name called ".type" */
1580  lua_pushstring(L,".type");
1581  lua_pushstring(L,clss->name);
1582  lua_rawset(L,-3);
1583  /* add a table called ".get" */
1584  lua_pushstring(L,".get");
1585  lua_newtable(L);
1586  lua_rawset(L,-3);
1587  /* add a table called ".set" */
1588  lua_pushstring(L,".set");
1589  lua_newtable(L);
1590  lua_rawset(L,-3);
1591  /* add a table called ".fn" */
1592  lua_pushstring(L,".fn");
1593  lua_newtable(L);
1594  /* add manual disown method */
1596  lua_rawset(L,-3);
1597  /* add accessor fns for using the .get,.set&.fn */
1599  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_class_set);
1601  /* add tostring method for better output */
1603  /* add it */
1604  lua_rawset(L,-3); /* metatable into registry */
1605  lua_pop(L,1); /* tidy stack (remove registry) */
1606 
1608  SWIG_Lua_add_class_details(L,clss); /* recursive adding of details (atts & ops) */
1609  lua_pop(L,1); /* tidy stack (remove class metatable) */
1610 }
1611 
1612 /* -----------------------------------------------------------------------------
1613  * Class/structure conversion fns
1614  * ----------------------------------------------------------------------------- */
1615 
1616 /* helper to add metatable to new lua object */
1618 {
1619  if (type->clientdata) /* there is clientdata: so add the metatable */
1620  {
1622  if (lua_istable(L,-1))
1623  {
1624  lua_setmetatable(L,-2);
1625  }
1626  else
1627  {
1628  lua_pop(L,1);
1629  }
1630  }
1631 }
1632 
1633 /* pushes a new object into the lua stack */
1634 SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State* L,void* ptr,swig_type_info *type, int own)
1635 {
1636  swig_lua_userdata* usr;
1637  if (!ptr){
1638  lua_pushnil(L);
1639  return;
1640  }
1641  usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata)); /* get data */
1642  usr->ptr=ptr; /* set the ptr */
1643  usr->type=type;
1644  usr->own=own;
1645 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
1646  _SWIG_Lua_AddMetatable(L,type); /* add metatable */
1647 #endif
1648 }
1649 
1650 /* takes a object from the lua stack & converts it into an object of the correct type
1651  (if possible) */
1652 SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State* L,int index,void** ptr,swig_type_info *type,int flags)
1653 {
1654  swig_lua_userdata* usr;
1655  swig_cast_info *cast;
1656  if (lua_isnil(L,index)){*ptr=0; return SWIG_OK;} /* special case: lua nil => NULL pointer */
1657  usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */
1658  if (usr)
1659  {
1660  if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
1661  {
1662  usr->own=0;
1663  }
1664  if (!type) /* special cast void*, no casting fn */
1665  {
1666  *ptr=usr->ptr;
1667  return SWIG_OK; /* ok */
1668  }
1669  cast=SWIG_TypeCheckStruct(usr->type,type); /* performs normal type checking */
1670  if (cast)
1671  {
1672  int newmemory = 0;
1673  *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
1674  assert(!newmemory); /* newmemory handling not yet implemented */
1675  return SWIG_OK; /* ok */
1676  }
1677  }
1678  return SWIG_ERROR; /* error */
1679 }
1680 
1681 SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State* L,int index,swig_type_info *type,int flags,
1682  int argnum,const char* func_name){
1683  void* result;
1684  if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
1685  luaL_error (L,"Error in %s, expected a %s at argument number %d\n",
1686  func_name,(type && type->str)?type->str:"void*",argnum);
1687  }
1688  return result;
1689 }
1690 
1691 /* pushes a packed userdata. user for member fn pointers only */
1692 SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State* L,void* ptr,size_t size,swig_type_info *type)
1693 {
1694  swig_lua_rawdata* raw;
1695  assert(ptr); /* not acceptable to pass in a NULL value */
1696  raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size); /* alloc data */
1697  raw->type=type;
1698  raw->own=0;
1699  memcpy(raw->data,ptr,size); /* copy the data */
1700  _SWIG_Lua_AddMetatable(L,type); /* add metatable */
1701 }
1702 
1703 /* converts a packed userdata. user for member fn pointers only */
1704 SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State* L,int index,void* ptr,size_t size,swig_type_info *type)
1705 {
1706  swig_lua_rawdata* raw;
1707  raw=(swig_lua_rawdata*)lua_touserdata(L,index); /* get data */
1708  if (!raw) return SWIG_ERROR; /* error */
1709  if (type==0 || type==raw->type) /* void* or identical type */
1710  {
1711  memcpy(ptr,raw->data,size); /* copy it */
1712  return SWIG_OK; /* ok */
1713  }
1714  return SWIG_ERROR; /* error */
1715 }
1716 
1717 /* a function to get the typestring of a piece of data */
1718 SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
1719 {
1720  swig_lua_userdata* usr;
1721  if (lua_isuserdata(L,tp))
1722  {
1723  usr=(swig_lua_userdata*)lua_touserdata(L,tp); /* get data */
1724  if (usr && usr->type && usr->type->str)
1725  return usr->type->str;
1726  return "userdata (unknown type)";
1727  }
1728  return lua_typename(L,lua_type(L,tp));
1729 }
1730 
1731 /* lua callable function to get the userdata's type */
1732 SWIGRUNTIME int SWIG_Lua_type(lua_State* L)
1733 {
1734  lua_pushstring(L,SWIG_Lua_typename(L,1));
1735  return 1;
1736 }
1737 
1738 /* lua callable function to compare userdata's value
1739 the issue is that two userdata may point to the same thing
1740 but to lua, they are different objects */
1741 SWIGRUNTIME int SWIG_Lua_equal(lua_State* L)
1742 {
1743  int result;
1744  swig_lua_userdata *usr1,*usr2;
1745  if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2)) /* just in case */
1746  return 0; /* nil reply */
1747  usr1=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1748  usr2=(swig_lua_userdata*)lua_touserdata(L,2); /* get data */
1749  /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
1750  result=(usr1->ptr==usr2->ptr);
1751  lua_pushboolean(L,result);
1752  return 1;
1753 }
1754 
1755 /* -----------------------------------------------------------------------------
1756  * global variable support code: class/struct typemap functions
1757  * ----------------------------------------------------------------------------- */
1758 
1759 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
1760 /* Install Constants */
1761 SWIGINTERN void
1763  int i;
1764  for (i = 0; constants[i].type; i++) {
1765  switch(constants[i].type) {
1766  case SWIG_LUA_INT:
1767  lua_pushstring(L,constants[i].name);
1768  lua_pushnumber(L,(lua_Number)constants[i].lvalue);
1769  lua_rawset(L,-3);
1770  break;
1771  case SWIG_LUA_FLOAT:
1772  lua_pushstring(L,constants[i].name);
1773  lua_pushnumber(L,(lua_Number)constants[i].dvalue);
1774  lua_rawset(L,-3);
1775  break;
1776  case SWIG_LUA_CHAR:
1777  lua_pushstring(L,constants[i].name);
1778  lua_pushfstring(L,"%c",(char)constants[i].lvalue);
1779  lua_rawset(L,-3);
1780  break;
1781  case SWIG_LUA_STRING:
1782  lua_pushstring(L,constants[i].name);
1783  lua_pushstring(L,(char *) constants[i].pvalue);
1784  lua_rawset(L,-3);
1785  break;
1786  case SWIG_LUA_POINTER:
1787  lua_pushstring(L,constants[i].name);
1788  SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
1789  lua_rawset(L,-3);
1790  break;
1791  case SWIG_LUA_BINARY:
1792  lua_pushstring(L,constants[i].name);
1793  SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
1794  lua_rawset(L,-3);
1795  break;
1796  default:
1797  break;
1798  }
1799  }
1800 }
1801 #endif
1802 
1803 /* -----------------------------------------------------------------------------
1804  * executing lua code from within the wrapper
1805  * ----------------------------------------------------------------------------- */
1806 
1807 #ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
1808 #define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
1809 #endif
1810 /* Executes a C string in Lua which is a really simple way of calling lua from C
1811 Unfortunately lua keeps changing its APIs, so we need a conditional compile
1812 In lua 5.0.X its lua_dostring()
1813 In lua 5.1.X its luaL_dostring()
1814 */
1815 SWIGINTERN int
1816 SWIG_Lua_dostring(lua_State *L, const char* str) {
1817  int ok,top;
1818  if (str==0 || str[0]==0) return 0; /* nothing to do */
1819  top=lua_gettop(L); /* save stack */
1820 #if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
1821  ok=luaL_dostring(L,str); /* looks like this is lua 5.1.X or later, good */
1822 #else
1823  ok=lua_dostring(L,str); /* might be lua 5.0.x, using lua_dostring */
1824 #endif
1825  if (ok!=0) {
1826  SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
1827  }
1828  lua_settop(L,top); /* restore the stack */
1829  return ok;
1830 }
1831 
1832 #ifdef __cplusplus
1833 }
1834 #endif
1835 
1836 /* ------------------------------ end luarun.swg ------------------------------ */
1837 
1838 
1839 /* -------- TYPES TABLE (BEGIN) -------- */
1840 
1841 #define SWIGTYPE_p_PLGraphicsIn swig_types[0]
1842 #define SWIGTYPE_p_char swig_types[1]
1843 #define SWIGTYPE_p_double swig_types[2]
1844 #define SWIGTYPE_p_f_double_double__int swig_types[3]
1845 #define SWIGTYPE_p_f_double_double_p_double_p_double_p_void__void swig_types[4]
1846 #define SWIGTYPE_p_f_int_double_p_char_int_p_void__void swig_types[5]
1847 #define SWIGTYPE_p_f_int_p_double_p_double__void swig_types[6]
1848 #define SWIGTYPE_p_f_int_p_q_const__double_p_q_const__double__void swig_types[7]
1849 #define SWIGTYPE_p_int swig_types[8]
1850 #define SWIGTYPE_p_p_char swig_types[9]
1851 #define SWIGTYPE_p_p_double swig_types[10]
1852 #define SWIGTYPE_p_unsigned_int swig_types[11]
1854 static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
1855 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1856 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1857 
1858 /* -------- TYPES TABLE (END) -------- */
1859 
1860 #define SWIG_name "plplotluac"
1861 #define SWIG_init luaopen_plplotluac
1862 #define SWIG_init_user luaopen_plplotluac_user
1863 
1864 #define SWIG_LUACODE luaopen_plplotluac_luacode
1865 
1866 #include "plplotP.h"
1867 
1868 
1869 #define LUA_ALLOC_ARRAY( TYPE, LEN ) (TYPE *) malloc( LEN * sizeof ( TYPE ) )
1870 #define LUA_FREE_ARRAY( PTR ) if ( PTR ) { free( PTR ); PTR = NULL;}
1871 
1872 // super macro to declare array typemap helper fns
1873  SWIGINTERN int SWIG_itable_size( lua_State* L, int index );
1874 #define LUA_DECLARE_TYPEMAP_ARR_FN( NAME, TYPE ) \
1875  SWIGINTERN int LUA_read_ ## NAME ## _num_array( lua_State * L, int index, TYPE * array, int size ){ \
1876  int i; \
1877  for ( i = 0; i < size; i++ ) { \
1878  lua_rawgeti( L, index, i + 1 ); \
1879  if ( lua_isnumber( L, -1 ) ) { \
1880  array[i] = (TYPE) lua_tonumber( L, -1 ); \
1881  } else { \
1882  lua_pop( L, 1 ); \
1883  return 0; \
1884  } \
1885  lua_pop( L, 1 ); \
1886  } \
1887  return 1; \
1888  } \
1889  SWIGINTERN TYPE* LUA_get_ ## NAME ## _num_array_var( lua_State * L, int index, int* size ) \
1890  { \
1891  TYPE *array; \
1892  if ( !lua_istable( L, index ) ) { \
1893  lua_pushstring( L, "expected a table" ); \
1894  return 0; \
1895  } \
1896  *size = SWIG_itable_size( L, index ); \
1897  if ( *size < 1 ) { \
1898  array = LUA_ALLOC_ARRAY( TYPE, 1 ); \
1899  array[0] = (TYPE) 0; \
1900  return array; \
1901  } \
1902  array = LUA_ALLOC_ARRAY( TYPE, *size ); \
1903  if ( !LUA_read_ ## NAME ## _num_array( L, index, array, *size ) ) { \
1904  lua_pushstring( L, "table must contain numbers" ); \
1905  LUA_FREE_ARRAY( array ); \
1906  return 0; \
1907  } \
1908  return array; \
1909  }
1910 
1911  LUA_DECLARE_TYPEMAP_ARR_FN( double, double );
1912  LUA_DECLARE_TYPEMAP_ARR_FN( int, int );
1913 
1914 
1915  static PLINT Alen = 0;
1916  static PLINT Xlen = 0, Ylen = 0;
1917 
1918 
1919 #ifdef __cplusplus /* generic alloc/dealloc fns*/
1920 #define SWIG_ALLOC_ARRAY(TYPE,LEN) new TYPE[LEN]
1921 #define SWIG_FREE_ARRAY(PTR) delete[] PTR
1922 #else
1923 #define SWIG_ALLOC_ARRAY(TYPE,LEN) (TYPE *)malloc(LEN*sizeof(TYPE))
1924 #define SWIG_FREE_ARRAY(PTR) free(PTR)
1925 #endif
1926 /* counting the size of arrays:*/
1927 SWIGINTERN int SWIG_itable_size(lua_State* L, int index)
1928 {
1929  int n=0;
1930  while(1){
1931  lua_rawgeti(L,index,n+1);
1932  if (lua_isnil(L,-1))break;
1933  ++n;
1934  lua_pop(L,1);
1935  }
1936  lua_pop(L,1);
1937  return n;
1938 }
1939 
1940 SWIGINTERN int SWIG_table_size(lua_State* L, int index)
1941 {
1942  int n=0;
1943  lua_pushnil(L); /* first key*/
1944  while (lua_next(L, index) != 0) {
1945  ++n;
1946  lua_pop(L, 1); /* removes `value'; keeps `key' for next iteration*/
1947  }
1948  return n;
1949 }
1950 
1951 /* super macro to declare array typemap helper fns */
1952 #define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME,TYPE)\
1953  SWIGINTERN int SWIG_read_##NAME##_num_array(lua_State* L,int index,TYPE *array,int size){\
1954  int i;\
1955  for (i = 0; i < size; i++) {\
1956  lua_rawgeti(L,index,i+1);\
1957  if (lua_isnumber(L,-1)){\
1958  array[i] = (TYPE)lua_tonumber(L,-1);\
1959  } else {\
1960  lua_pop(L,1);\
1961  return 0;\
1962  }\
1963  lua_pop(L,1);\
1964  }\
1965  return 1;\
1966  }\
1967  SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_fixed(lua_State* L, int index, int size){\
1968  TYPE *array;\
1969  if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {\
1970  SWIG_Lua_pushferrstring(L,"expected a table of size %d",size);\
1971  return 0;\
1972  }\
1973  array=SWIG_ALLOC_ARRAY(TYPE,size);\
1974  if (!SWIG_read_##NAME##_num_array(L,index,array,size)){\
1975  SWIG_Lua_pusherrstring(L,"table must contain numbers");\
1976  SWIG_FREE_ARRAY(array);\
1977  return 0;\
1978  }\
1979  return array;\
1980  }\
1981  SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_var(lua_State* L, int index, int* size)\
1982  {\
1983  TYPE *array;\
1984  if (!lua_istable(L,index)) {\
1985  SWIG_Lua_pusherrstring(L,"expected a table");\
1986  return 0;\
1987  }\
1988  *size=SWIG_itable_size(L,index);\
1989  if (*size<1){\
1990  SWIG_Lua_pusherrstring(L,"table appears to be empty");\
1991  return 0;\
1992  }\
1993  array=SWIG_ALLOC_ARRAY(TYPE,*size);\
1994  if (!SWIG_read_##NAME##_num_array(L,index,array,*size)){\
1995  SWIG_Lua_pusherrstring(L,"table must contain numbers");\
1996  SWIG_FREE_ARRAY(array);\
1997  return 0;\
1998  }\
1999  return array;\
2000  }\
2001  SWIGINTERN void SWIG_write_##NAME##_num_array(lua_State* L,TYPE *array,int size){\
2002  int i;\
2003  lua_newtable(L);\
2004  for (i = 0; i < size; i++){\
2005  lua_pushnumber(L,(lua_Number)array[i]);\
2006  lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/ \
2007  }\
2008  }
2009 
2010 SWIG_DECLARE_TYPEMAP_ARR_FN(schar,signed char);
2011 SWIG_DECLARE_TYPEMAP_ARR_FN(uchar,unsigned char);
2013 SWIG_DECLARE_TYPEMAP_ARR_FN(uint,unsigned int);
2014 SWIG_DECLARE_TYPEMAP_ARR_FN(short,short);
2015 SWIG_DECLARE_TYPEMAP_ARR_FN(ushort,unsigned short);
2016 SWIG_DECLARE_TYPEMAP_ARR_FN(long,long);
2017 SWIG_DECLARE_TYPEMAP_ARR_FN(ulong,unsigned long);
2018 SWIG_DECLARE_TYPEMAP_ARR_FN(float,float);
2019 SWIG_DECLARE_TYPEMAP_ARR_FN(double,double);
2020 
2021 SWIGINTERN int SWIG_read_ptr_array(lua_State* L,int index,void **array,int size,swig_type_info *type){
2022  int i;
2023  for (i = 0; i < size; i++) {
2024  lua_rawgeti(L,index,i+1);
2025  if (!lua_isuserdata(L,-1) || SWIG_ConvertPtr(L,-1,&array[i],type,0)==-1){
2026  lua_pop(L,1);
2027  return 0;
2028  }
2029  lua_pop(L,1);
2030  }
2031  return 1;
2032 }
2033 SWIGINTERN void** SWIG_get_ptr_array_fixed(lua_State* L, int index, int size,swig_type_info *type){
2034  void **array;
2035  if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {
2036  SWIG_Lua_pushferrstring(L,"expected a table of size %d",size);
2037  return 0;
2038  }
2039  array=SWIG_ALLOC_ARRAY(void*,size);
2040  if (!SWIG_read_ptr_array(L,index,array,size,type)){
2041  SWIG_Lua_pushferrstring(L,"table must contain pointers of type %s",type->name);
2042  SWIG_FREE_ARRAY(array);
2043  return 0;
2044  }
2045  return array;
2046 }
2047 SWIGINTERN void** SWIG_get_ptr_array_var(lua_State* L, int index, int* size,swig_type_info *type){
2048  void **array;
2049  if (!lua_istable(L,index)) {
2050  SWIG_Lua_pusherrstring(L,"expected a table");
2051  return 0;
2052  }
2053  *size=SWIG_itable_size(L,index);
2054  if (*size<1){
2055  SWIG_Lua_pusherrstring(L,"table appears to be empty");
2056  return 0;
2057  }
2058  array=SWIG_ALLOC_ARRAY(void*,*size);
2059  if (!SWIG_read_ptr_array(L,index,array,*size,type)){
2060  SWIG_Lua_pushferrstring(L,"table must contain pointers of type %s",type->name);
2061  SWIG_FREE_ARRAY(array);
2062  return 0;
2063  }
2064  return array;
2065 }
2066 SWIGINTERN void SWIG_write_ptr_array(lua_State* L,void **array,int size,swig_type_info *type,int own){
2067  int i;
2068  lua_newtable(L);
2069  for (i = 0; i < size; i++){
2070  SWIG_NewPointerObj(L,array[i],type,own);
2071  lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/
2072  }
2073 }
2074 
2075 
2076  PLFLT** read_double_Matrix( lua_State* L, int index, int* nx, int *ny )
2077  {
2078  int i, j;
2079  PLFLT** matrix;
2080 
2081  *nx = 0;
2082  *ny = 0;
2083 
2084  if ( !lua_istable( L, index ) )
2085  {
2086  lua_pushstring( L, "expected a table" );
2087  return NULL;
2088  }
2089  *nx = SWIG_itable_size( L, index );
2090  if ( *nx < 1 )
2091  {
2092  lua_pushstring( L, "table appears to be empty" );
2093  return NULL;
2094  }
2095  matrix = LUA_ALLOC_ARRAY( PLFLT *, *nx );
2096  for ( i = 0; i < *nx; i++ )
2097  matrix[i] = NULL;
2098 
2099  lua_rawgeti( L, index, 1 );
2100  if ( !lua_istable( L, -1 ) )
2101  {
2102  lua_pop( L, 1 );
2103  lua_pushstring( L, "expected a table" );
2104  LUA_FREE_ARRAY( matrix );
2105  return NULL;
2106  }
2107  *ny = SWIG_itable_size( L, -1 );
2108  if ( *ny < 1 )
2109  {
2110  lua_pushstring( L, "table appears to be empty" );
2111  LUA_FREE_ARRAY( matrix );
2112  return NULL;
2113  }
2114  lua_pop( L, 1 );
2115 
2116  for ( i = 0; i < *nx; i++ )
2117  {
2118  lua_rawgeti( L, index, i + 1 );
2119  if ( !lua_istable( L, -1 ) )
2120  {
2121  lua_pop( L, 1 );
2122  lua_pushstring( L, "expected a table" );
2123  for ( j = 0; j < *ny; j++ )
2124  LUA_FREE_ARRAY( matrix[j] );
2125  LUA_FREE_ARRAY( matrix );
2126  return NULL;
2127  }
2128  if ( *ny != SWIG_itable_size( L, -1 ) )
2129  {
2130  lua_pop( L, 1 );
2131  lua_pushstring( L, "inconsistent table sizes" );
2132  for ( j = 0; j < i; j++ )
2133  LUA_FREE_ARRAY( matrix[j] );
2134  LUA_FREE_ARRAY( matrix );
2135  return NULL;
2136  }
2137  matrix[i] = LUA_ALLOC_ARRAY( PLFLT, *ny );
2138  for ( j = 0; j < *ny; j++ )
2139  {
2140  lua_rawgeti( L, -1, j + 1 );
2141  if ( lua_isnumber( L, -1 ) )
2142  {
2143  matrix[i][j] = (PLFLT) lua_tonumber( L, -1 );
2144  }
2145  else
2146  {
2147  lua_pop( L, 1 );
2148  lua_pushstring( L, "table must contain numbers" );
2149  for ( j = 0; j < i + 1; j++ )
2150  LUA_FREE_ARRAY( matrix[j] );
2151  LUA_FREE_ARRAY( matrix );
2152  return NULL;
2153  }
2154  lua_pop( L, 1 );
2155  }
2156  lua_pop( L, 1 );
2157  }
2158 
2159  return matrix;
2160  }
2161 
2162 
2163  static lua_State* myL = NULL;
2164  static char mapform_funcstr[255];
2165 
2166  void mapform( PLINT n, PLFLT* x, PLFLT* y )
2167  {
2168  PLFLT *xtemp, *ytemp;
2169  int len, i;
2170 
2171  // check Lua state
2172  if ( myL == NULL )
2173  {
2174  fprintf( stderr, "Lua state is not set!" );
2175  return;
2176  }
2177 
2178  // push functions and arguments
2179  lua_getglobal( myL, mapform_funcstr ); // function to be called
2180  lua_pushnumber( myL, n ); // push 1st argument
2181  SWIG_write_double_num_array( myL, x, n ); // push 2nd argument
2182  SWIG_write_double_num_array( myL, y, n ); // push 3rd argument
2183 
2184  // do the call (3 arguments, 2 result)
2185  if ( lua_pcall( myL, 3, 2, 0 ) != 0 )
2186  fprintf( stderr, "error running function `%s':%s",
2187  mapform_funcstr, lua_tostring( myL, -1 ) );
2188 
2189  // retrieve results
2190  if ( !lua_istable( myL, -2 ) )
2191  {
2192  fprintf( stderr, "function `%s' must return a table as 1st result", mapform_funcstr );
2193  return;
2194  }
2195  if ( !lua_istable( myL, -1 ) )
2196  {
2197  fprintf( stderr, "function `%s' must return a table as 2nd result", mapform_funcstr );
2198  return;
2199  }
2200  xtemp = (PLFLT *) LUA_get_double_num_array_var( myL, -2, &len );
2201  if ( !xtemp || len != n )
2202  {
2203  fprintf( stderr, "function `%s' must return a table of length%d", mapform_funcstr, n );
2204  return;
2205  }
2206  for ( i = 0; i < n; i++ )
2207  x[i] = xtemp[i];
2208  LUA_FREE_ARRAY( xtemp );
2209 
2210  ytemp = (PLFLT *) LUA_get_double_num_array_var( myL, -1, &len );
2211  if ( !ytemp || len != n )
2212  {
2213  fprintf( stderr, "function `%s' must return a table of length%d", mapform_funcstr, n );
2214  return;
2215  }
2216  for ( i = 0; i < n; i++ )
2217  y[i] = ytemp[i];
2218  LUA_FREE_ARRAY( ytemp );
2219 
2220  lua_pop( myL, 2 ); // pop returned values
2221 
2222  return;
2223  }
2224 
2225 
2226  typedef PLINT ( *defined_func )( PLFLT, PLFLT );
2227  typedef void ( *fill_func )( PLINT, const PLFLT*, const PLFLT* );
2228  typedef void ( *pltr_func )( PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer );
2229  typedef void ( *ct_func )( PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer );
2230  typedef void ( *mapform_func )( PLINT, PLFLT *, PLFLT* );
2232  typedef void ( *label_func )( PLINT, PLFLT, char*, PLINT, PLPointer );
2233 
2234  static char mypltr_funcstr[255];
2235 
2236 // This is the callback that gets handed to the C code.
2237 // It, in turn, calls the Lua callback
2238  void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data )
2239  {
2240  *tx = 0;
2241  *ty = 0;
2242 
2243  // check Lua state
2244  if ( myL == NULL )
2245  {
2246  fprintf( stderr, "Lua state is not set!" );
2247  return;
2248  }
2249 
2250  // push functions and arguments
2251  lua_getglobal( myL, mypltr_funcstr ); // function to be called
2252  lua_pushnumber( myL, x ); // push 1st argument
2253  lua_pushnumber( myL, y ); // push 2nd argument
2254 
2255  // do the call (2 arguments, 2 result)
2256  if ( lua_pcall( myL, 2, 2, 0 ) != 0 )
2257  fprintf( stderr, "error running function `%s':%s",
2258  mypltr_funcstr, lua_tostring( myL, -1 ) );
2259 
2260  // retrieve results
2261  if ( !lua_isnumber( myL, -2 ) )
2262  {
2263  fprintf( stderr, "function `%s' must return a number as 1st result", mypltr_funcstr );
2264  return;
2265  }
2266  if ( !lua_isnumber( myL, -1 ) )
2267  {
2268  fprintf( stderr, "function `%s' must return a number as 2nd result", mypltr_funcstr );
2269  return;
2270  }
2271  *tx = lua_tonumber( myL, -2 );
2272  *ty = lua_tonumber( myL, -1 );
2273  lua_pop( myL, 2 ); // pop returned values
2274 
2275  return;
2276  }
2277 
2278  static char myct_funcstr[255];
2279 
2280 // This is the callback that gets handed to the C code.
2281 // It, in turn, calls the Lua callback
2282  void myct( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data )
2283  {
2284  *tx = 0;
2285  *ty = 0;
2286 
2287  // check Lua state
2288  if ( myL == NULL )
2289  {
2290  fprintf( stderr, "Lua state is not set!" );
2291  return;
2292  }
2293 
2294  // push functions and arguments
2295  lua_getglobal( myL, myct_funcstr ); // function to be called
2296  lua_pushnumber( myL, x ); // push 1st argument
2297  lua_pushnumber( myL, y ); // push 2nd argument
2298 
2299  // do the call (2 arguments, 2 result)
2300  if ( lua_pcall( myL, 2, 2, 0 ) != 0 )
2301  fprintf( stderr, "error running function `%s':%s",
2302  myct_funcstr, lua_tostring( myL, -1 ) );
2303 
2304  // retrieve results
2305  if ( !lua_isnumber( myL, -2 ) )
2306  {
2307  fprintf( stderr, "function `%s' must return a number as 1st result", myct_funcstr );
2308  return;
2309  }
2310  if ( !lua_isnumber( myL, -1 ) )
2311  {
2312  fprintf( stderr, "function `%s' must return a number as 2nd result", myct_funcstr );
2313  return;
2314  }
2315  *tx = lua_tonumber( myL, -2 );
2316  *ty = lua_tonumber( myL, -1 );
2317  lua_pop( myL, 2 ); // pop returned values
2318 
2319  return;
2320  }
2321 
2322  static char label_funcstr[255];
2323 
2324  void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer data )
2325  {
2326  PLFLT *xtemp, *ytemp;
2327  int len, i;
2328 
2329  // check Lua state
2330  if ( myL == NULL )
2331  {
2332  fprintf( stderr, "Lua state is not set!" );
2333  return;
2334  }
2335 
2336  // push functions and arguments
2337  lua_getglobal( myL, label_funcstr ); // function to be called
2338  lua_pushnumber( myL, axis ); // push 1st argument
2339  lua_pushnumber( myL, value ); // push 1st argument
2340 
2341  // do the call (2 arguments, 1 result)
2342  if ( lua_pcall( myL, 2, 1, 0 ) != 0 )
2343  fprintf( stderr, "error running function `%s':%s",
2344  label_funcstr, lua_tostring( myL, -1 ) );
2345 
2346  // retrieve results
2347  if ( !lua_isstring( myL, -1 ) )
2348  {
2349  fprintf( stderr, "function `%s' must return a string as result", label_funcstr );
2350  return;
2351  }
2352  strncpy( label, lua_tostring( myL, -1 ), length );
2353 
2354  lua_pop( myL, 1 ); // pop returned values
2355 
2356  return;
2357  }
2358 
2359 
2360 SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
2361  int ret = lua_isstring(L, idx);
2362  if (!ret)
2363  ret = lua_isnil(L, idx);
2364  return ret;
2365 }
2366 
2367 #ifdef __cplusplus
2368 extern "C" {
2369 #endif
2370 static int _wrap_PLGraphicsIn_type_set(lua_State* L) {
2371  int SWIG_arg = 0;
2372  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2373  int arg2 ;
2374 
2375  SWIG_check_num_args("PLGraphicsIn::type",2,2)
2376  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::type",1,"PLGraphicsIn *");
2377  if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::type",2,"int");
2378 
2379  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2380  SWIG_fail_ptr("PLGraphicsIn_type_set",1,SWIGTYPE_p_PLGraphicsIn);
2381  }
2382 
2383  arg2 = (int)lua_tonumber(L, 2);
2384  if (arg1) (arg1)->type = arg2;
2385 
2386  return SWIG_arg;
2387 
2388  if(0) SWIG_fail;
2389 
2390 fail:
2391  lua_error(L);
2392  return SWIG_arg;
2393 }
2394 
2395 
2396 static int _wrap_PLGraphicsIn_type_get(lua_State* L) {
2397  int SWIG_arg = 0;
2398  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2399  int result;
2400 
2401  SWIG_check_num_args("PLGraphicsIn::type",1,1)
2402  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::type",1,"PLGraphicsIn *");
2403 
2404  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2405  SWIG_fail_ptr("PLGraphicsIn_type_get",1,SWIGTYPE_p_PLGraphicsIn);
2406  }
2407 
2408  result = (int) ((arg1)->type);
2409  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2410  return SWIG_arg;
2411 
2412  if(0) SWIG_fail;
2413 
2414 fail:
2415  lua_error(L);
2416  return SWIG_arg;
2417 }
2418 
2419 
2420 static int _wrap_PLGraphicsIn_state_set(lua_State* L) {
2421  int SWIG_arg = 0;
2422  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2423  unsigned int arg2 ;
2424 
2425  SWIG_check_num_args("PLGraphicsIn::state",2,2)
2426  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::state",1,"PLGraphicsIn *");
2427  if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::state",2,"unsigned int");
2428 
2429  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2430  SWIG_fail_ptr("PLGraphicsIn_state_set",1,SWIGTYPE_p_PLGraphicsIn);
2431  }
2432 
2433  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
2434  arg2 = (unsigned int)lua_tonumber(L, 2);
2435  if (arg1) (arg1)->state = arg2;
2436 
2437  return SWIG_arg;
2438 
2439  if(0) SWIG_fail;
2440 
2441 fail:
2442  lua_error(L);
2443  return SWIG_arg;
2444 }
2445 
2446 
2447 static int _wrap_PLGraphicsIn_state_get(lua_State* L) {
2448  int SWIG_arg = 0;
2449  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2450  unsigned int result;
2451 
2452  SWIG_check_num_args("PLGraphicsIn::state",1,1)
2453  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::state",1,"PLGraphicsIn *");
2454 
2455  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2456  SWIG_fail_ptr("PLGraphicsIn_state_get",1,SWIGTYPE_p_PLGraphicsIn);
2457  }
2458 
2459  result = (unsigned int) ((arg1)->state);
2460  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2461  return SWIG_arg;
2462 
2463  if(0) SWIG_fail;
2464 
2465 fail:
2466  lua_error(L);
2467  return SWIG_arg;
2468 }
2469 
2470 
2471 static int _wrap_PLGraphicsIn_keysym_set(lua_State* L) {
2472  int SWIG_arg = 0;
2473  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2474  unsigned int arg2 ;
2475 
2476  SWIG_check_num_args("PLGraphicsIn::keysym",2,2)
2477  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::keysym",1,"PLGraphicsIn *");
2478  if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::keysym",2,"unsigned int");
2479 
2480  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2481  SWIG_fail_ptr("PLGraphicsIn_keysym_set",1,SWIGTYPE_p_PLGraphicsIn);
2482  }
2483 
2484  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
2485  arg2 = (unsigned int)lua_tonumber(L, 2);
2486  if (arg1) (arg1)->keysym = arg2;
2487 
2488  return SWIG_arg;
2489 
2490  if(0) SWIG_fail;
2491 
2492 fail:
2493  lua_error(L);
2494  return SWIG_arg;
2495 }
2496 
2497 
2498 static int _wrap_PLGraphicsIn_keysym_get(lua_State* L) {
2499  int SWIG_arg = 0;
2500  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2501  unsigned int result;
2502 
2503  SWIG_check_num_args("PLGraphicsIn::keysym",1,1)
2504  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::keysym",1,"PLGraphicsIn *");
2505 
2506  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2507  SWIG_fail_ptr("PLGraphicsIn_keysym_get",1,SWIGTYPE_p_PLGraphicsIn);
2508  }
2509 
2510  result = (unsigned int) ((arg1)->keysym);
2511  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2512  return SWIG_arg;
2513 
2514  if(0) SWIG_fail;
2515 
2516 fail:
2517  lua_error(L);
2518  return SWIG_arg;
2519 }
2520 
2521 
2522 static int _wrap_PLGraphicsIn_button_set(lua_State* L) {
2523  int SWIG_arg = 0;
2524  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2525  unsigned int arg2 ;
2526 
2527  SWIG_check_num_args("PLGraphicsIn::button",2,2)
2528  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::button",1,"PLGraphicsIn *");
2529  if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::button",2,"unsigned int");
2530 
2531  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2532  SWIG_fail_ptr("PLGraphicsIn_button_set",1,SWIGTYPE_p_PLGraphicsIn);
2533  }
2534 
2535  SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
2536  arg2 = (unsigned int)lua_tonumber(L, 2);
2537  if (arg1) (arg1)->button = arg2;
2538 
2539  return SWIG_arg;
2540 
2541  if(0) SWIG_fail;
2542 
2543 fail:
2544  lua_error(L);
2545  return SWIG_arg;
2546 }
2547 
2548 
2549 static int _wrap_PLGraphicsIn_button_get(lua_State* L) {
2550  int SWIG_arg = 0;
2551  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2552  unsigned int result;
2553 
2554  SWIG_check_num_args("PLGraphicsIn::button",1,1)
2555  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::button",1,"PLGraphicsIn *");
2556 
2557  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2558  SWIG_fail_ptr("PLGraphicsIn_button_get",1,SWIGTYPE_p_PLGraphicsIn);
2559  }
2560 
2561  result = (unsigned int) ((arg1)->button);
2562  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2563  return SWIG_arg;
2564 
2565  if(0) SWIG_fail;
2566 
2567 fail:
2568  lua_error(L);
2569  return SWIG_arg;
2570 }
2571 
2572 
2573 static int _wrap_PLGraphicsIn_subwindow_set(lua_State* L) {
2574  int SWIG_arg = 0;
2575  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2576  PLINT arg2 ;
2577 
2578  SWIG_check_num_args("PLGraphicsIn::subwindow",2,2)
2579  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::subwindow",1,"PLGraphicsIn *");
2580  if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::subwindow",2,"PLINT");
2581 
2582  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2583  SWIG_fail_ptr("PLGraphicsIn_subwindow_set",1,SWIGTYPE_p_PLGraphicsIn);
2584  }
2585 
2586  arg2 = (PLINT)lua_tonumber(L, 2);
2587  if (arg1) (arg1)->subwindow = arg2;
2588 
2589  return SWIG_arg;
2590 
2591  if(0) SWIG_fail;
2592 
2593 fail:
2594  lua_error(L);
2595  return SWIG_arg;
2596 }
2597 
2598 
2599 static int _wrap_PLGraphicsIn_subwindow_get(lua_State* L) {
2600  int SWIG_arg = 0;
2601  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2602  PLINT result;
2603 
2604  SWIG_check_num_args("PLGraphicsIn::subwindow",1,1)
2605  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::subwindow",1,"PLGraphicsIn *");
2606 
2607  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2608  SWIG_fail_ptr("PLGraphicsIn_subwindow_get",1,SWIGTYPE_p_PLGraphicsIn);
2609  }
2610 
2611  result = (PLINT) ((arg1)->subwindow);
2612  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2613  return SWIG_arg;
2614 
2615  if(0) SWIG_fail;
2616 
2617 fail:
2618  lua_error(L);
2619  return SWIG_arg;
2620 }
2621 
2622 
2623 static int _wrap_PLGraphicsIn_string_set(lua_State* L) {
2624  int SWIG_arg = 0;
2625  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2626  char *arg2 ;
2627 
2628  SWIG_check_num_args("PLGraphicsIn::string",2,2)
2629  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::string",1,"PLGraphicsIn *");
2630  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("PLGraphicsIn::string",2,"char [16]");
2631 
2632  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2633  SWIG_fail_ptr("PLGraphicsIn_string_set",1,SWIGTYPE_p_PLGraphicsIn);
2634  }
2635 
2636  arg2 = (char *)lua_tostring(L, 2);
2637  {
2638  if(arg2) {
2639  strncpy((char*)arg1->string, (const char *)arg2, 16-1);
2640  arg1->string[16-1] = 0;
2641  } else {
2642  arg1->string[0] = 0;
2643  }
2644  }
2645 
2646  return SWIG_arg;
2647 
2648  if(0) SWIG_fail;
2649 
2650 fail:
2651  lua_error(L);
2652  return SWIG_arg;
2653 }
2654 
2655 
2656 static int _wrap_PLGraphicsIn_string_get(lua_State* L) {
2657  int SWIG_arg = 0;
2658  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2659  char *result = 0 ;
2660 
2661  SWIG_check_num_args("PLGraphicsIn::string",1,1)
2662  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::string",1,"PLGraphicsIn *");
2663 
2664  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2665  SWIG_fail_ptr("PLGraphicsIn_string_get",1,SWIGTYPE_p_PLGraphicsIn);
2666  }
2667 
2668  result = (char *)(char *) ((arg1)->string);
2669  lua_pushstring(L,(const char *)result); SWIG_arg++;
2670  return SWIG_arg;
2671 
2672  if(0) SWIG_fail;
2673 
2674 fail:
2675  lua_error(L);
2676  return SWIG_arg;
2677 }
2678 
2679 
2680 static int _wrap_PLGraphicsIn_pX_set(lua_State* L) {
2681  int SWIG_arg = 0;
2682  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2683  int arg2 ;
2684 
2685  SWIG_check_num_args("PLGraphicsIn::pX",2,2)
2686  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pX",1,"PLGraphicsIn *");
2687  if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::pX",2,"int");
2688 
2689  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2690  SWIG_fail_ptr("PLGraphicsIn_pX_set",1,SWIGTYPE_p_PLGraphicsIn);
2691  }
2692 
2693  arg2 = (int)lua_tonumber(L, 2);
2694  if (arg1) (arg1)->pX = arg2;
2695 
2696  return SWIG_arg;
2697 
2698  if(0) SWIG_fail;
2699 
2700 fail:
2701  lua_error(L);
2702  return SWIG_arg;
2703 }
2704 
2705 
2706 static int _wrap_PLGraphicsIn_pX_get(lua_State* L) {
2707  int SWIG_arg = 0;
2708  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2709  int result;
2710 
2711  SWIG_check_num_args("PLGraphicsIn::pX",1,1)
2712  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pX",1,"PLGraphicsIn *");
2713 
2714  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2715  SWIG_fail_ptr("PLGraphicsIn_pX_get",1,SWIGTYPE_p_PLGraphicsIn);
2716  }
2717 
2718  result = (int) ((arg1)->pX);
2719  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2720  return SWIG_arg;
2721 
2722  if(0) SWIG_fail;
2723 
2724 fail:
2725  lua_error(L);
2726  return SWIG_arg;
2727 }
2728 
2729 
2730 static int _wrap_PLGraphicsIn_pY_set(lua_State* L) {
2731  int SWIG_arg = 0;
2732  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2733  int arg2 ;
2734 
2735  SWIG_check_num_args("PLGraphicsIn::pY",2,2)
2736  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pY",1,"PLGraphicsIn *");
2737  if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::pY",2,"int");
2738 
2739  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2740  SWIG_fail_ptr("PLGraphicsIn_pY_set",1,SWIGTYPE_p_PLGraphicsIn);
2741  }
2742 
2743  arg2 = (int)lua_tonumber(L, 2);
2744  if (arg1) (arg1)->pY = arg2;
2745 
2746  return SWIG_arg;
2747 
2748  if(0) SWIG_fail;
2749 
2750 fail:
2751  lua_error(L);
2752  return SWIG_arg;
2753 }
2754 
2755 
2756 static int _wrap_PLGraphicsIn_pY_get(lua_State* L) {
2757  int SWIG_arg = 0;
2758  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2759  int result;
2760 
2761  SWIG_check_num_args("PLGraphicsIn::pY",1,1)
2762  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pY",1,"PLGraphicsIn *");
2763 
2764  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2765  SWIG_fail_ptr("PLGraphicsIn_pY_get",1,SWIGTYPE_p_PLGraphicsIn);
2766  }
2767 
2768  result = (int) ((arg1)->pY);
2769  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2770  return SWIG_arg;
2771 
2772  if(0) SWIG_fail;
2773 
2774 fail:
2775  lua_error(L);
2776  return SWIG_arg;
2777 }
2778 
2779 
2780 static int _wrap_PLGraphicsIn_dX_set(lua_State* L) {
2781  int SWIG_arg = 0;
2782  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2783  PLFLT arg2 ;
2784 
2785  SWIG_check_num_args("PLGraphicsIn::dX",2,2)
2786  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dX",1,"PLGraphicsIn *");
2787  if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::dX",2,"PLFLT");
2788 
2789  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2790  SWIG_fail_ptr("PLGraphicsIn_dX_set",1,SWIGTYPE_p_PLGraphicsIn);
2791  }
2792 
2793  arg2 = (PLFLT)lua_tonumber(L, 2);
2794  if (arg1) (arg1)->dX = arg2;
2795 
2796  return SWIG_arg;
2797 
2798  if(0) SWIG_fail;
2799 
2800 fail:
2801  lua_error(L);
2802  return SWIG_arg;
2803 }
2804 
2805 
2806 static int _wrap_PLGraphicsIn_dX_get(lua_State* L) {
2807  int SWIG_arg = 0;
2808  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2809  PLFLT result;
2810 
2811  SWIG_check_num_args("PLGraphicsIn::dX",1,1)
2812  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dX",1,"PLGraphicsIn *");
2813 
2814  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2815  SWIG_fail_ptr("PLGraphicsIn_dX_get",1,SWIGTYPE_p_PLGraphicsIn);
2816  }
2817 
2818  result = (PLFLT) ((arg1)->dX);
2819  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2820  return SWIG_arg;
2821 
2822  if(0) SWIG_fail;
2823 
2824 fail:
2825  lua_error(L);
2826  return SWIG_arg;
2827 }
2828 
2829 
2830 static int _wrap_PLGraphicsIn_dY_set(lua_State* L) {
2831  int SWIG_arg = 0;
2832  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2833  PLFLT arg2 ;
2834 
2835  SWIG_check_num_args("PLGraphicsIn::dY",2,2)
2836  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dY",1,"PLGraphicsIn *");
2837  if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::dY",2,"PLFLT");
2838 
2839  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2840  SWIG_fail_ptr("PLGraphicsIn_dY_set",1,SWIGTYPE_p_PLGraphicsIn);
2841  }
2842 
2843  arg2 = (PLFLT)lua_tonumber(L, 2);
2844  if (arg1) (arg1)->dY = arg2;
2845 
2846  return SWIG_arg;
2847 
2848  if(0) SWIG_fail;
2849 
2850 fail:
2851  lua_error(L);
2852  return SWIG_arg;
2853 }
2854 
2855 
2856 static int _wrap_PLGraphicsIn_dY_get(lua_State* L) {
2857  int SWIG_arg = 0;
2858  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2859  PLFLT result;
2860 
2861  SWIG_check_num_args("PLGraphicsIn::dY",1,1)
2862  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dY",1,"PLGraphicsIn *");
2863 
2864  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2865  SWIG_fail_ptr("PLGraphicsIn_dY_get",1,SWIGTYPE_p_PLGraphicsIn);
2866  }
2867 
2868  result = (PLFLT) ((arg1)->dY);
2869  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2870  return SWIG_arg;
2871 
2872  if(0) SWIG_fail;
2873 
2874 fail:
2875  lua_error(L);
2876  return SWIG_arg;
2877 }
2878 
2879 
2880 static int _wrap_PLGraphicsIn_wX_set(lua_State* L) {
2881  int SWIG_arg = 0;
2882  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2883  PLFLT arg2 ;
2884 
2885  SWIG_check_num_args("PLGraphicsIn::wX",2,2)
2886  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wX",1,"PLGraphicsIn *");
2887  if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::wX",2,"PLFLT");
2888 
2889  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2890  SWIG_fail_ptr("PLGraphicsIn_wX_set",1,SWIGTYPE_p_PLGraphicsIn);
2891  }
2892 
2893  arg2 = (PLFLT)lua_tonumber(L, 2);
2894  if (arg1) (arg1)->wX = arg2;
2895 
2896  return SWIG_arg;
2897 
2898  if(0) SWIG_fail;
2899 
2900 fail:
2901  lua_error(L);
2902  return SWIG_arg;
2903 }
2904 
2905 
2906 static int _wrap_PLGraphicsIn_wX_get(lua_State* L) {
2907  int SWIG_arg = 0;
2908  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2909  PLFLT result;
2910 
2911  SWIG_check_num_args("PLGraphicsIn::wX",1,1)
2912  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wX",1,"PLGraphicsIn *");
2913 
2914  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2915  SWIG_fail_ptr("PLGraphicsIn_wX_get",1,SWIGTYPE_p_PLGraphicsIn);
2916  }
2917 
2918  result = (PLFLT) ((arg1)->wX);
2919  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2920  return SWIG_arg;
2921 
2922  if(0) SWIG_fail;
2923 
2924 fail:
2925  lua_error(L);
2926  return SWIG_arg;
2927 }
2928 
2929 
2930 static int _wrap_PLGraphicsIn_wY_set(lua_State* L) {
2931  int SWIG_arg = 0;
2932  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2933  PLFLT arg2 ;
2934 
2935  SWIG_check_num_args("PLGraphicsIn::wY",2,2)
2936  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wY",1,"PLGraphicsIn *");
2937  if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::wY",2,"PLFLT");
2938 
2939  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2940  SWIG_fail_ptr("PLGraphicsIn_wY_set",1,SWIGTYPE_p_PLGraphicsIn);
2941  }
2942 
2943  arg2 = (PLFLT)lua_tonumber(L, 2);
2944  if (arg1) (arg1)->wY = arg2;
2945 
2946  return SWIG_arg;
2947 
2948  if(0) SWIG_fail;
2949 
2950 fail:
2951  lua_error(L);
2952  return SWIG_arg;
2953 }
2954 
2955 
2956 static int _wrap_PLGraphicsIn_wY_get(lua_State* L) {
2957  int SWIG_arg = 0;
2958  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2959  PLFLT result;
2960 
2961  SWIG_check_num_args("PLGraphicsIn::wY",1,1)
2962  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wY",1,"PLGraphicsIn *");
2963 
2964  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2965  SWIG_fail_ptr("PLGraphicsIn_wY_get",1,SWIGTYPE_p_PLGraphicsIn);
2966  }
2967 
2968  result = (PLFLT) ((arg1)->wY);
2969  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2970  return SWIG_arg;
2971 
2972  if(0) SWIG_fail;
2973 
2974 fail:
2975  lua_error(L);
2976  return SWIG_arg;
2977 }
2978 
2979 
2980 static int _wrap_new_PLGraphicsIn(lua_State* L) {
2981  int SWIG_arg = 0;
2982  PLGraphicsIn *result = 0 ;
2983 
2984  SWIG_check_num_args("PLGraphicsIn::PLGraphicsIn",0,0)
2985  result = (PLGraphicsIn *)calloc(1, sizeof(PLGraphicsIn));
2986  SWIG_NewPointerObj(L,result,SWIGTYPE_p_PLGraphicsIn,1); SWIG_arg++;
2987  return SWIG_arg;
2988 
2989  if(0) SWIG_fail;
2990 
2991 fail:
2992  lua_error(L);
2993  return SWIG_arg;
2994 }
2995 
2996 
2997 static void swig_delete_PLGraphicsIn(void *obj) {
2998 PLGraphicsIn *arg1 = (PLGraphicsIn *) obj;
2999 free((char *) arg1);
3000 }
3002  {0,0}
3003 };
3017  {0,0,0}
3018 };
3020  {0,0,0}
3021 };
3023  {0,0}
3024 };
3026  {0,0,0,0,0,0}
3027 };
3029 static const char *swig_PLGraphicsIn_base_names[] = {0};
3031 
3032 static int _wrap_setcontlabelformat(lua_State* L) {
3033  int SWIG_arg = 0;
3034  PLINT arg1 ;
3035  PLINT arg2 ;
3036 
3037  SWIG_check_num_args("pl_setcontlabelformat",2,2)
3038  if(!lua_isnumber(L,1)) SWIG_fail_arg("pl_setcontlabelformat",1,"PLINT");
3039  if(!lua_isnumber(L,2)) SWIG_fail_arg("pl_setcontlabelformat",2,"PLINT");
3040  arg1 = (PLINT)lua_tonumber(L, 1);
3041  arg2 = (PLINT)lua_tonumber(L, 2);
3042  pl_setcontlabelformat(arg1,arg2);
3043 
3044  return SWIG_arg;
3045 
3046  if(0) SWIG_fail;
3047 
3048 fail:
3049  lua_error(L);
3050  return SWIG_arg;
3051 }
3052 
3053 
3054 static int _wrap_setcontlabelparam(lua_State* L) {
3055  int SWIG_arg = 0;
3056  PLFLT arg1 ;
3057  PLFLT arg2 ;
3058  PLFLT arg3 ;
3059  PLINT arg4 ;
3060 
3061  SWIG_check_num_args("pl_setcontlabelparam",4,4)
3062  if(!lua_isnumber(L,1)) SWIG_fail_arg("pl_setcontlabelparam",1,"PLFLT");
3063  if(!lua_isnumber(L,2)) SWIG_fail_arg("pl_setcontlabelparam",2,"PLFLT");
3064  if(!lua_isnumber(L,3)) SWIG_fail_arg("pl_setcontlabelparam",3,"PLFLT");
3065  if(!lua_isnumber(L,4)) SWIG_fail_arg("pl_setcontlabelparam",4,"PLINT");
3066  arg1 = (PLFLT)lua_tonumber(L, 1);
3067  arg2 = (PLFLT)lua_tonumber(L, 2);
3068  arg3 = (PLFLT)lua_tonumber(L, 3);
3069  arg4 = (PLINT)lua_tonumber(L, 4);
3070  pl_setcontlabelparam(arg1,arg2,arg3,arg4);
3071 
3072  return SWIG_arg;
3073 
3074  if(0) SWIG_fail;
3075 
3076 fail:
3077  lua_error(L);
3078  return SWIG_arg;
3079 }
3080 
3081 
3082 static int _wrap_adv(lua_State* L) {
3083  int SWIG_arg = 0;
3084  PLINT arg1 ;
3085 
3086  SWIG_check_num_args("pladv",1,1)
3087  if(!lua_isnumber(L,1)) SWIG_fail_arg("pladv",1,"PLINT");
3088  arg1 = (PLINT)lua_tonumber(L, 1);
3089  pladv(arg1);
3090 
3091  return SWIG_arg;
3092 
3093  if(0) SWIG_fail;
3094 
3095 fail:
3096  lua_error(L);
3097  return SWIG_arg;
3098 }
3099 
3100 
3101 static int _wrap_arc(lua_State* L) {
3102  int SWIG_arg = 0;
3103  PLFLT arg1 ;
3104  PLFLT arg2 ;
3105  PLFLT arg3 ;
3106  PLFLT arg4 ;
3107  PLFLT arg5 ;
3108  PLFLT arg6 ;
3109  PLFLT arg7 ;
3110  PLBOOL arg8 ;
3111 
3112  SWIG_check_num_args("plarc",8,8)
3113  if(!lua_isnumber(L,1)) SWIG_fail_arg("plarc",1,"PLFLT");
3114  if(!lua_isnumber(L,2)) SWIG_fail_arg("plarc",2,"PLFLT");
3115  if(!lua_isnumber(L,3)) SWIG_fail_arg("plarc",3,"PLFLT");
3116  if(!lua_isnumber(L,4)) SWIG_fail_arg("plarc",4,"PLFLT");
3117  if(!lua_isnumber(L,5)) SWIG_fail_arg("plarc",5,"PLFLT");
3118  if(!lua_isnumber(L,6)) SWIG_fail_arg("plarc",6,"PLFLT");
3119  if(!lua_isnumber(L,7)) SWIG_fail_arg("plarc",7,"PLFLT");
3120  if(!lua_isnumber(L,8)) SWIG_fail_arg("plarc",8,"PLBOOL");
3121  arg1 = (PLFLT)lua_tonumber(L, 1);
3122  arg2 = (PLFLT)lua_tonumber(L, 2);
3123  arg3 = (PLFLT)lua_tonumber(L, 3);
3124  arg4 = (PLFLT)lua_tonumber(L, 4);
3125  arg5 = (PLFLT)lua_tonumber(L, 5);
3126  arg6 = (PLFLT)lua_tonumber(L, 6);
3127  arg7 = (PLFLT)lua_tonumber(L, 7);
3128  arg8 = (PLBOOL)lua_tonumber(L, 8);
3129  plarc(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
3130 
3131  return SWIG_arg;
3132 
3133  if(0) SWIG_fail;
3134 
3135 fail:
3136  lua_error(L);
3137  return SWIG_arg;
3138 }
3139 
3140 
3141 static int _wrap_axes(lua_State* L) {
3142  int SWIG_arg = 0;
3143  PLFLT arg1 ;
3144  PLFLT arg2 ;
3145  char *arg3 = (char *) 0 ;
3146  PLFLT arg4 ;
3147  PLINT arg5 ;
3148  char *arg6 = (char *) 0 ;
3149  PLFLT arg7 ;
3150  PLINT arg8 ;
3151 
3152  SWIG_check_num_args("plaxes",8,8)
3153  if(!lua_isnumber(L,1)) SWIG_fail_arg("plaxes",1,"PLFLT");
3154  if(!lua_isnumber(L,2)) SWIG_fail_arg("plaxes",2,"PLFLT");
3155  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plaxes",3,"char const *");
3156  if(!lua_isnumber(L,4)) SWIG_fail_arg("plaxes",4,"PLFLT");
3157  if(!lua_isnumber(L,5)) SWIG_fail_arg("plaxes",5,"PLINT");
3158  if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plaxes",6,"char const *");
3159  if(!lua_isnumber(L,7)) SWIG_fail_arg("plaxes",7,"PLFLT");
3160  if(!lua_isnumber(L,8)) SWIG_fail_arg("plaxes",8,"PLINT");
3161  arg1 = (PLFLT)lua_tonumber(L, 1);
3162  arg2 = (PLFLT)lua_tonumber(L, 2);
3163  arg3 = (char *)lua_tostring(L, 3);
3164  arg4 = (PLFLT)lua_tonumber(L, 4);
3165  arg5 = (PLINT)lua_tonumber(L, 5);
3166  arg6 = (char *)lua_tostring(L, 6);
3167  arg7 = (PLFLT)lua_tonumber(L, 7);
3168  arg8 = (PLINT)lua_tonumber(L, 8);
3169  plaxes(arg1,arg2,(char const *)arg3,arg4,arg5,(char const *)arg6,arg7,arg8);
3170 
3171  return SWIG_arg;
3172 
3173  if(0) SWIG_fail;
3174 
3175 fail:
3176  lua_error(L);
3177  return SWIG_arg;
3178 }
3179 
3180 
3181 static int _wrap_bin(lua_State* L) {
3182  int SWIG_arg = 0;
3183  PLINT arg1 ;
3184  PLFLT *arg2 = (PLFLT *) 0 ;
3185  PLFLT *arg3 = (PLFLT *) 0 ;
3186  PLINT arg4 ;
3187  int temp3 ;
3188 
3189  SWIG_check_num_args("plbin",3,3)
3190  if(!lua_isnumber(L,3)) SWIG_fail_arg("plbin",3,"PLINT");
3191  {
3192  int temp;
3193  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
3194  if ( !arg2 )
3195  SWIG_fail;
3196  arg1 = Alen = temp;
3197  }
3198  {
3199  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
3200  if ( !arg3 )
3201  SWIG_fail;
3202  if ( temp3 != Alen )
3203  {
3204  lua_pushfstring( L, "Tables must be of same length." );
3205  SWIG_fail;
3206  }
3207  }
3208  arg4 = (PLINT)lua_tonumber(L, 3);
3209  plbin(arg1,(double const *)arg2,(double const *)arg3,arg4);
3210 
3211  {
3212  LUA_FREE_ARRAY( arg2 );
3213  }
3214  {
3215  LUA_FREE_ARRAY( arg3 );
3216  }
3217  return SWIG_arg;
3218 
3219  if(0) SWIG_fail;
3220 
3221 fail:
3222  {
3223  LUA_FREE_ARRAY( arg2 );
3224  }
3225  {
3226  LUA_FREE_ARRAY( arg3 );
3227  }
3228  lua_error(L);
3229  return SWIG_arg;
3230 }
3231 
3232 
3233 static int _wrap_btime(lua_State* L) {
3234  int SWIG_arg = 0;
3235  PLINT *arg1 = (PLINT *) 0 ;
3236  PLINT *arg2 = (PLINT *) 0 ;
3237  PLINT *arg3 = (PLINT *) 0 ;
3238  PLINT *arg4 = (PLINT *) 0 ;
3239  PLINT *arg5 = (PLINT *) 0 ;
3240  PLFLT *arg6 = (PLFLT *) 0 ;
3241  PLFLT arg7 ;
3242  PLINT temp1 ;
3243  PLINT temp2 ;
3244  PLINT temp3 ;
3245  PLINT temp4 ;
3246  PLINT temp5 ;
3247  PLFLT temp6 ;
3248 
3249  arg1 = &temp1;
3250  arg2 = &temp2;
3251  arg3 = &temp3;
3252  arg4 = &temp4;
3253  arg5 = &temp5;
3254  arg6 = &temp6;
3255  SWIG_check_num_args("plbtime",1,1)
3256  if(!lua_isnumber(L,1)) SWIG_fail_arg("plbtime",1,"PLFLT");
3257  arg7 = (PLFLT)lua_tonumber(L, 1);
3258  plbtime(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
3259 
3260  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
3261  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
3262  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
3263  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
3264  lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
3265  lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
3266  return SWIG_arg;
3267 
3268  if(0) SWIG_fail;
3269 
3270 fail:
3271  lua_error(L);
3272  return SWIG_arg;
3273 }
3274 
3275 
3276 static int _wrap_bop(lua_State* L) {
3277  int SWIG_arg = 0;
3278 
3279  SWIG_check_num_args("plbop",0,0)
3280  plbop();
3281 
3282  return SWIG_arg;
3283 
3284  if(0) SWIG_fail;
3285 
3286 fail:
3287  lua_error(L);
3288  return SWIG_arg;
3289 }
3290 
3291 
3292 static int _wrap_box(lua_State* L) {
3293  int SWIG_arg = 0;
3294  char *arg1 = (char *) 0 ;
3295  PLFLT arg2 ;
3296  PLINT arg3 ;
3297  char *arg4 = (char *) 0 ;
3298  PLFLT arg5 ;
3299  PLINT arg6 ;
3300 
3301  SWIG_check_num_args("plbox",6,6)
3302  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plbox",1,"char const *");
3303  if(!lua_isnumber(L,2)) SWIG_fail_arg("plbox",2,"PLFLT");
3304  if(!lua_isnumber(L,3)) SWIG_fail_arg("plbox",3,"PLINT");
3305  if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("plbox",4,"char const *");
3306  if(!lua_isnumber(L,5)) SWIG_fail_arg("plbox",5,"PLFLT");
3307  if(!lua_isnumber(L,6)) SWIG_fail_arg("plbox",6,"PLINT");
3308  arg1 = (char *)lua_tostring(L, 1);
3309  arg2 = (PLFLT)lua_tonumber(L, 2);
3310  arg3 = (PLINT)lua_tonumber(L, 3);
3311  arg4 = (char *)lua_tostring(L, 4);
3312  arg5 = (PLFLT)lua_tonumber(L, 5);
3313  arg6 = (PLINT)lua_tonumber(L, 6);
3314  plbox((char const *)arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
3315 
3316  return SWIG_arg;
3317 
3318  if(0) SWIG_fail;
3319 
3320 fail:
3321  lua_error(L);
3322  return SWIG_arg;
3323 }
3324 
3325 
3326 static int _wrap_box3(lua_State* L) {
3327  int SWIG_arg = 0;
3328  char *arg1 = (char *) 0 ;
3329  char *arg2 = (char *) 0 ;
3330  PLFLT arg3 ;
3331  PLINT arg4 ;
3332  char *arg5 = (char *) 0 ;
3333  char *arg6 = (char *) 0 ;
3334  PLFLT arg7 ;
3335  PLINT arg8 ;
3336  char *arg9 = (char *) 0 ;
3337  char *arg10 = (char *) 0 ;
3338  PLFLT arg11 ;
3339  PLINT arg12 ;
3340 
3341  SWIG_check_num_args("plbox3",12,12)
3342  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plbox3",1,"char const *");
3343  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plbox3",2,"char const *");
3344  if(!lua_isnumber(L,3)) SWIG_fail_arg("plbox3",3,"PLFLT");
3345  if(!lua_isnumber(L,4)) SWIG_fail_arg("plbox3",4,"PLINT");
3346  if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plbox3",5,"char const *");
3347  if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plbox3",6,"char const *");
3348  if(!lua_isnumber(L,7)) SWIG_fail_arg("plbox3",7,"PLFLT");
3349  if(!lua_isnumber(L,8)) SWIG_fail_arg("plbox3",8,"PLINT");
3350  if(!SWIG_lua_isnilstring(L,9)) SWIG_fail_arg("plbox3",9,"char const *");
3351  if(!SWIG_lua_isnilstring(L,10)) SWIG_fail_arg("plbox3",10,"char const *");
3352  if(!lua_isnumber(L,11)) SWIG_fail_arg("plbox3",11,"PLFLT");
3353  if(!lua_isnumber(L,12)) SWIG_fail_arg("plbox3",12,"PLINT");
3354  arg1 = (char *)lua_tostring(L, 1);
3355  arg2 = (char *)lua_tostring(L, 2);
3356  arg3 = (PLFLT)lua_tonumber(L, 3);
3357  arg4 = (PLINT)lua_tonumber(L, 4);
3358  arg5 = (char *)lua_tostring(L, 5);
3359  arg6 = (char *)lua_tostring(L, 6);
3360  arg7 = (PLFLT)lua_tonumber(L, 7);
3361  arg8 = (PLINT)lua_tonumber(L, 8);
3362  arg9 = (char *)lua_tostring(L, 9);
3363  arg10 = (char *)lua_tostring(L, 10);
3364  arg11 = (PLFLT)lua_tonumber(L, 11);
3365  arg12 = (PLINT)lua_tonumber(L, 12);
3366  plbox3((char const *)arg1,(char const *)arg2,arg3,arg4,(char const *)arg5,(char const *)arg6,arg7,arg8,(char const *)arg9,(char const *)arg10,arg11,arg12);
3367 
3368  return SWIG_arg;
3369 
3370  if(0) SWIG_fail;
3371 
3372 fail:
3373  lua_error(L);
3374  return SWIG_arg;
3375 }
3376 
3377 
3378 static int _wrap_calc_world(lua_State* L) {
3379  int SWIG_arg = 0;
3380  PLFLT arg1 ;
3381  PLFLT arg2 ;
3382  PLFLT *arg3 = (PLFLT *) 0 ;
3383  PLFLT *arg4 = (PLFLT *) 0 ;
3384  PLINT *arg5 = (PLINT *) 0 ;
3385  PLFLT temp3 ;
3386  PLFLT temp4 ;
3387  PLINT temp5 ;
3388 
3389  arg3 = &temp3;
3390  arg4 = &temp4;
3391  arg5 = &temp5;
3392  SWIG_check_num_args("plcalc_world",2,2)
3393  if(!lua_isnumber(L,1)) SWIG_fail_arg("plcalc_world",1,"PLFLT");
3394  if(!lua_isnumber(L,2)) SWIG_fail_arg("plcalc_world",2,"PLFLT");
3395  arg1 = (PLFLT)lua_tonumber(L, 1);
3396  arg2 = (PLFLT)lua_tonumber(L, 2);
3397  plcalc_world(arg1,arg2,arg3,arg4,arg5);
3398 
3399  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
3400  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
3401  lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
3402  return SWIG_arg;
3403 
3404  if(0) SWIG_fail;
3405 
3406 fail:
3407  lua_error(L);
3408  return SWIG_arg;
3409 }
3410 
3411 
3412 static int _wrap_clear(lua_State* L) {
3413  int SWIG_arg = 0;
3414 
3415  SWIG_check_num_args("plclear",0,0)
3416  plclear();
3417 
3418  return SWIG_arg;
3419 
3420  if(0) SWIG_fail;
3421 
3422 fail:
3423  lua_error(L);
3424  return SWIG_arg;
3425 }
3426 
3427 
3428 static int _wrap_col0(lua_State* L) {
3429  int SWIG_arg = 0;
3430  PLINT arg1 ;
3431 
3432  SWIG_check_num_args("plcol0",1,1)
3433  if(!lua_isnumber(L,1)) SWIG_fail_arg("plcol0",1,"PLINT");
3434  arg1 = (PLINT)lua_tonumber(L, 1);
3435  plcol0(arg1);
3436 
3437  return SWIG_arg;
3438 
3439  if(0) SWIG_fail;
3440 
3441 fail:
3442  lua_error(L);
3443  return SWIG_arg;
3444 }
3445 
3446 
3447 static int _wrap_col1(lua_State* L) {
3448  int SWIG_arg = 0;
3449  PLFLT arg1 ;
3450 
3451  SWIG_check_num_args("plcol1",1,1)
3452  if(!lua_isnumber(L,1)) SWIG_fail_arg("plcol1",1,"PLFLT");
3453  arg1 = (PLFLT)lua_tonumber(L, 1);
3454  plcol1(arg1);
3455 
3456  return SWIG_arg;
3457 
3458  if(0) SWIG_fail;
3459 
3460 fail:
3461  lua_error(L);
3462  return SWIG_arg;
3463 }
3464 
3465 
3466 static int _wrap_configtime(lua_State* L) {
3467  int SWIG_arg = 0;
3468  PLFLT arg1 ;
3469  PLFLT arg2 ;
3470  PLFLT arg3 ;
3471  PLINT arg4 ;
3472  PLBOOL arg5 ;
3473  PLINT arg6 ;
3474  PLINT arg7 ;
3475  PLINT arg8 ;
3476  PLINT arg9 ;
3477  PLINT arg10 ;
3478  PLFLT arg11 ;
3479 
3480  SWIG_check_num_args("plconfigtime",11,11)
3481  if(!lua_isnumber(L,1)) SWIG_fail_arg("plconfigtime",1,"PLFLT");
3482  if(!lua_isnumber(L,2)) SWIG_fail_arg("plconfigtime",2,"PLFLT");
3483  if(!lua_isnumber(L,3)) SWIG_fail_arg("plconfigtime",3,"PLFLT");
3484  if(!lua_isnumber(L,4)) SWIG_fail_arg("plconfigtime",4,"PLINT");
3485  if(!lua_isnumber(L,5)) SWIG_fail_arg("plconfigtime",5,"PLBOOL");
3486  if(!lua_isnumber(L,6)) SWIG_fail_arg("plconfigtime",6,"PLINT");
3487  if(!lua_isnumber(L,7)) SWIG_fail_arg("plconfigtime",7,"PLINT");
3488  if(!lua_isnumber(L,8)) SWIG_fail_arg("plconfigtime",8,"PLINT");
3489  if(!lua_isnumber(L,9)) SWIG_fail_arg("plconfigtime",9,"PLINT");
3490  if(!lua_isnumber(L,10)) SWIG_fail_arg("plconfigtime",10,"PLINT");
3491  if(!lua_isnumber(L,11)) SWIG_fail_arg("plconfigtime",11,"PLFLT");
3492  arg1 = (PLFLT)lua_tonumber(L, 1);
3493  arg2 = (PLFLT)lua_tonumber(L, 2);
3494  arg3 = (PLFLT)lua_tonumber(L, 3);
3495  arg4 = (PLINT)lua_tonumber(L, 4);
3496  arg5 = (PLBOOL)lua_tonumber(L, 5);
3497  arg6 = (PLINT)lua_tonumber(L, 6);
3498  arg7 = (PLINT)lua_tonumber(L, 7);
3499  arg8 = (PLINT)lua_tonumber(L, 8);
3500  arg9 = (PLINT)lua_tonumber(L, 9);
3501  arg10 = (PLINT)lua_tonumber(L, 10);
3502  arg11 = (PLFLT)lua_tonumber(L, 11);
3503  plconfigtime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
3504 
3505  return SWIG_arg;
3506 
3507  if(0) SWIG_fail;
3508 
3509 fail:
3510  lua_error(L);
3511  return SWIG_arg;
3512 }
3513 
3514 
3515 static int _wrap_cont(lua_State* L) {
3516  int SWIG_arg = 0;
3517  PLFLT **arg1 = (PLFLT **) 0 ;
3518  PLINT arg2 ;
3519  PLINT arg3 ;
3520  PLINT arg4 ;
3521  PLINT arg5 ;
3522  PLINT arg6 ;
3523  PLINT arg7 ;
3524  PLFLT *arg8 = (PLFLT *) 0 ;
3525  PLINT arg9 ;
3526  pltr_func arg10 = (pltr_func) 0 ;
3527  PLPointer arg11 = (PLPointer) 0 ;
3528  int ii1 ;
3529  PLcGrid cgrid111 ;
3530  PLcGrid2 cgrid211 ;
3531 
3532  {
3533  cgrid111.xg = cgrid111.yg = cgrid111.zg = NULL;
3534  cgrid111.nx = cgrid111.ny = cgrid111.nz = 0;
3535  cgrid211.xg = cgrid211.yg = cgrid211.zg = NULL;
3536  cgrid211.nx = cgrid211.ny = 0;
3537  }
3538  {
3539  arg10 = NULL;
3540  }
3541  {
3542  arg11 = NULL;
3543  }
3544  SWIG_check_num_args("plcont",6,8)
3545  if(!lua_isnumber(L,2)) SWIG_fail_arg("plcont",2,"PLINT");
3546  if(!lua_isnumber(L,3)) SWIG_fail_arg("plcont",3,"PLINT");
3547  if(!lua_isnumber(L,4)) SWIG_fail_arg("plcont",4,"PLINT");
3548  if(!lua_isnumber(L,5)) SWIG_fail_arg("plcont",5,"PLINT");
3549  {
3550  int jj;
3551 
3552  arg1 = read_double_Matrix( L, 1, &ii1, &jj );
3553  if ( !arg1 )
3554  SWIG_fail;
3555  Xlen = arg2 = ii1;
3556  Ylen = arg3 = jj;
3557  }
3558  arg4 = (PLINT)lua_tonumber(L, 2);
3559  arg5 = (PLINT)lua_tonumber(L, 3);
3560  arg6 = (PLINT)lua_tonumber(L, 4);
3561  arg7 = (PLINT)lua_tonumber(L, 5);
3562  {
3563  int temp;
3564  arg8 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp );
3565  if ( !arg8 )
3566  SWIG_fail;
3567  arg9 = Alen = temp;
3568  }
3569  if(lua_gettop(L)>=7){
3570  {
3571  arg10 = NULL;
3572  mypltr_funcstr[0] = '\0';
3573 
3574  if ( lua_isstring( L, 7 ) )
3575  {
3576  const char* funcstr = lua_tostring( L, 7 );
3577  if ( strcmp( "pltr0", funcstr ) == 0 )
3578  {
3579  arg10 = pltr0;
3580  }
3581  else if ( strcmp( "pltr1", funcstr ) == 0 )
3582  {
3583  arg10 = pltr1;
3584  }
3585  else if ( strcmp( "pltr2", funcstr ) == 0 )
3586  {
3587  arg10 = pltr2;
3588  }
3589  else
3590  {
3591  arg10 = mypltr;
3592  strncpy( mypltr_funcstr, funcstr, 255 );
3593  myL = L;
3594  }
3595  }
3596  else
3597  SWIG_fail_arg( "cont", 10, "pltr_func" );
3598  }
3599  }
3600  if(lua_gettop(L)>=8){
3601  {
3602  int nx, ny;
3603  int gridmode = 0;
3604 
3605  lua_pushstring( L, "xg" );
3606  lua_gettable( L, 8 );
3607  if ( !lua_istable( L, -1 ) )
3608  {
3609  lua_pop( L, 1 ); // pop "xg"
3610  lua_pushstring( L, "expected a table xg" );
3611  SWIG_fail;
3612  }
3613  lua_rawgeti( L, -1, 1 );
3614  if ( lua_istable( L, -1 ) )
3615  gridmode = 2; // two dimensional array
3616  else if ( lua_isnumber( L, -1 ) )
3617  gridmode = 1; // one dimensional array
3618  else
3619  {
3620  lua_pop( L, 1 ); // pop "1"
3621  lua_pop( L, 1 ); // pop "xg"
3622  lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
3623  SWIG_fail;
3624  }
3625  lua_pop( L, 1 ); // pop test element
3626  if ( gridmode == 1 )
3627  {
3628  cgrid111.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
3629  if ( !cgrid111.xg )
3630  {
3631  lua_pop( L, 1 ); // pop "xg"
3632  SWIG_fail;
3633  }
3634  if ( nx != Xlen )
3635  {
3636  lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
3637  SWIG_fail;
3638  }
3639  cgrid111.nx = nx;
3640  }
3641  else
3642  {
3643  cgrid211.xg = read_double_Matrix( L, -1, &nx, &ny );
3644  if ( !cgrid211.xg )
3645  {
3646  lua_pop( L, 1 ); // pop "xg"
3647  SWIG_fail;
3648  }
3649  if ( ( nx != Xlen ) || ( ny != Ylen ) )
3650  {
3651  lua_pop( L, 1 ); // pop "xg"
3652  lua_pushfstring( L, "Vectors must match matrix." );
3653  SWIG_fail;
3654  }
3655  cgrid211.nx = nx;
3656  cgrid211.ny = ny;
3657  }
3658  lua_pop( L, 1 ); // pop "xg"
3659 
3660  lua_pushstring( L, "yg" );
3661  lua_gettable( L, 8 );
3662  if ( !lua_istable( L, -1 ) )
3663  {
3664  lua_pop( L, 1 );
3665  lua_pushstring( L, "expected a table yg" );
3666  SWIG_fail;
3667  }
3668  lua_rawgeti( L, -1, 1 );
3669  if ( gridmode == 2 )
3670  {
3671  if ( !lua_istable( L, -1 ) )
3672  {
3673  lua_pop( L, 1 ); // pop "1"
3674  lua_pop( L, 1 ); // pop "yg"
3675  lua_pushstring( L, "expected a two dimensional array/table in yg" );
3676  SWIG_fail;
3677  }
3678  }
3679  else
3680  {
3681  if ( !lua_isnumber( L, -1 ) )
3682  {
3683  lua_pop( L, 1 ); // pop "1"
3684  lua_pop( L, 1 ); // pop "yg"
3685  lua_pushstring( L, "expected a one dimensional array/table in yg" );
3686  SWIG_fail;
3687  }
3688  }
3689  lua_pop( L, 1 ); // pop "1"
3690  if ( gridmode == 1 )
3691  {
3692  cgrid111.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
3693  if ( !cgrid111.yg )
3694  {
3695  lua_pop( L, 1 ); // pop "yg"
3696  SWIG_fail;
3697  }
3698  if ( ny != Ylen )
3699  {
3700  lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
3701  SWIG_fail;
3702  }
3703  cgrid111.ny = ny;
3704  }
3705  else
3706  {
3707  cgrid211.yg = read_double_Matrix( L, -1, &nx, &ny );
3708  if ( !cgrid211.yg )
3709  {
3710  lua_pop( L, 1 ); // pop "xg"
3711  SWIG_fail;
3712  }
3713  if ( ( nx != Xlen ) || ( ny != Ylen ) )
3714  {
3715  lua_pop( L, 1 ); // pop "xg"
3716  lua_pushfstring( L, "Vectors must match matrix." );
3717  SWIG_fail;
3718  }
3719  // cgrid211.nx/ny already set
3720  }
3721  lua_pop( L, 1 ); // pop "yg"
3722 
3723  if ( gridmode == 1 )
3724  arg11 = &cgrid111;
3725  else if ( gridmode == 2 )
3726  arg11 = &cgrid211;
3727  }
3728  }
3729  plcont((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,(double const *)arg8,arg9,arg10,arg11);
3730 
3731  {
3732  int i;
3733 
3734  if ( arg1 )
3735  {
3736  for ( i = 0; i < ii1; i++ )
3737  LUA_FREE_ARRAY( arg1[i] );
3738  LUA_FREE_ARRAY( arg1 );
3739  }
3740  }
3741  {
3742  LUA_FREE_ARRAY( arg8 );
3743  }
3744  {
3745  mypltr_funcstr[0] = '\0';
3746  }
3747  {
3748  int i;
3749 
3750  LUA_FREE_ARRAY( cgrid111.xg );
3751  LUA_FREE_ARRAY( cgrid111.yg );
3752 
3753  if ( cgrid211.xg )
3754  {
3755  for ( i = 0; i < Xlen; i++ )
3756  LUA_FREE_ARRAY( cgrid211.xg[i] );
3757  LUA_FREE_ARRAY( cgrid211.xg );
3758  }
3759  if ( cgrid211.yg )
3760  {
3761  for ( i = 0; i < Xlen; i++ )
3762  LUA_FREE_ARRAY( cgrid211.yg[i] );
3763  LUA_FREE_ARRAY( cgrid211.yg );
3764  }
3765  }
3766  return SWIG_arg;
3767 
3768  if(0) SWIG_fail;
3769 
3770 fail:
3771  {
3772  int i;
3773 
3774  if ( arg1 )
3775  {
3776  for ( i = 0; i < ii1; i++ )
3777  LUA_FREE_ARRAY( arg1[i] );
3778  LUA_FREE_ARRAY( arg1 );
3779  }
3780  }
3781  {
3782  LUA_FREE_ARRAY( arg8 );
3783  }
3784  {
3785  mypltr_funcstr[0] = '\0';
3786  }
3787  {
3788  int i;
3789 
3790  LUA_FREE_ARRAY( cgrid111.xg );
3791  LUA_FREE_ARRAY( cgrid111.yg );
3792 
3793  if ( cgrid211.xg )
3794  {
3795  for ( i = 0; i < Xlen; i++ )
3796  LUA_FREE_ARRAY( cgrid211.xg[i] );
3797  LUA_FREE_ARRAY( cgrid211.xg );
3798  }
3799  if ( cgrid211.yg )
3800  {
3801  for ( i = 0; i < Xlen; i++ )
3802  LUA_FREE_ARRAY( cgrid211.yg[i] );
3803  LUA_FREE_ARRAY( cgrid211.yg );
3804  }
3805  }
3806  lua_error(L);
3807  return SWIG_arg;
3808 }
3809 
3810 
3811 static int _wrap_ctime(lua_State* L) {
3812  int SWIG_arg = 0;
3813  PLINT arg1 ;
3814  PLINT arg2 ;
3815  PLINT arg3 ;
3816  PLINT arg4 ;
3817  PLINT arg5 ;
3818  PLFLT arg6 ;
3819  PLFLT *arg7 = (PLFLT *) 0 ;
3820  PLFLT temp7 ;
3821 
3822  arg7 = &temp7;
3823  SWIG_check_num_args("plctime",6,6)
3824  if(!lua_isnumber(L,1)) SWIG_fail_arg("plctime",1,"PLINT");
3825  if(!lua_isnumber(L,2)) SWIG_fail_arg("plctime",2,"PLINT");
3826  if(!lua_isnumber(L,3)) SWIG_fail_arg("plctime",3,"PLINT");
3827  if(!lua_isnumber(L,4)) SWIG_fail_arg("plctime",4,"PLINT");
3828  if(!lua_isnumber(L,5)) SWIG_fail_arg("plctime",5,"PLINT");
3829  if(!lua_isnumber(L,6)) SWIG_fail_arg("plctime",6,"PLFLT");
3830  arg1 = (PLINT)lua_tonumber(L, 1);
3831  arg2 = (PLINT)lua_tonumber(L, 2);
3832  arg3 = (PLINT)lua_tonumber(L, 3);
3833  arg4 = (PLINT)lua_tonumber(L, 4);
3834  arg5 = (PLINT)lua_tonumber(L, 5);
3835  arg6 = (PLFLT)lua_tonumber(L, 6);
3836  plctime(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
3837 
3838  lua_pushnumber(L, (lua_Number) *arg7); SWIG_arg++;
3839  return SWIG_arg;
3840 
3841  if(0) SWIG_fail;
3842 
3843 fail:
3844  lua_error(L);
3845  return SWIG_arg;
3846 }
3847 
3848 
3849 static int _wrap_cpstrm(lua_State* L) {
3850  int SWIG_arg = 0;
3851  PLINT arg1 ;
3852  PLBOOL arg2 ;
3853 
3854  SWIG_check_num_args("plcpstrm",2,2)
3855  if(!lua_isnumber(L,1)) SWIG_fail_arg("plcpstrm",1,"PLINT");
3856  if(!lua_isnumber(L,2)) SWIG_fail_arg("plcpstrm",2,"PLBOOL");
3857  arg1 = (PLINT)lua_tonumber(L, 1);
3858  arg2 = (PLBOOL)lua_tonumber(L, 2);
3859  plcpstrm(arg1,arg2);
3860 
3861  return SWIG_arg;
3862 
3863  if(0) SWIG_fail;
3864 
3865 fail:
3866  lua_error(L);
3867  return SWIG_arg;
3868 }
3869 
3870 
3871 static int _wrap_plend(lua_State* L) {
3872  int SWIG_arg = 0;
3873 
3874  SWIG_check_num_args("plend",0,0)
3875  plend();
3876 
3877  return SWIG_arg;
3878 
3879  if(0) SWIG_fail;
3880 
3881 fail:
3882  lua_error(L);
3883  return SWIG_arg;
3884 }
3885 
3886 
3887 static int _wrap_plend1(lua_State* L) {
3888  int SWIG_arg = 0;
3889 
3890  SWIG_check_num_args("plend1",0,0)
3891  plend1();
3892 
3893  return SWIG_arg;
3894 
3895  if(0) SWIG_fail;
3896 
3897 fail:
3898  lua_error(L);
3899  return SWIG_arg;
3900 }
3901 
3902 
3903 static int _wrap_env(lua_State* L) {
3904  int SWIG_arg = 0;
3905  PLFLT arg1 ;
3906  PLFLT arg2 ;
3907  PLFLT arg3 ;
3908  PLFLT arg4 ;
3909  PLINT arg5 ;
3910  PLINT arg6 ;
3911 
3912  SWIG_check_num_args("plenv",6,6)
3913  if(!lua_isnumber(L,1)) SWIG_fail_arg("plenv",1,"PLFLT");
3914  if(!lua_isnumber(L,2)) SWIG_fail_arg("plenv",2,"PLFLT");
3915  if(!lua_isnumber(L,3)) SWIG_fail_arg("plenv",3,"PLFLT");
3916  if(!lua_isnumber(L,4)) SWIG_fail_arg("plenv",4,"PLFLT");
3917  if(!lua_isnumber(L,5)) SWIG_fail_arg("plenv",5,"PLINT");
3918  if(!lua_isnumber(L,6)) SWIG_fail_arg("plenv",6,"PLINT");
3919  arg1 = (PLFLT)lua_tonumber(L, 1);
3920  arg2 = (PLFLT)lua_tonumber(L, 2);
3921  arg3 = (PLFLT)lua_tonumber(L, 3);
3922  arg4 = (PLFLT)lua_tonumber(L, 4);
3923  arg5 = (PLINT)lua_tonumber(L, 5);
3924  arg6 = (PLINT)lua_tonumber(L, 6);
3925  plenv(arg1,arg2,arg3,arg4,arg5,arg6);
3926 
3927  return SWIG_arg;
3928 
3929  if(0) SWIG_fail;
3930 
3931 fail:
3932  lua_error(L);
3933  return SWIG_arg;
3934 }
3935 
3936 
3937 static int _wrap_env0(lua_State* L) {
3938  int SWIG_arg = 0;
3939  PLFLT arg1 ;
3940  PLFLT arg2 ;
3941  PLFLT arg3 ;
3942  PLFLT arg4 ;
3943  PLINT arg5 ;
3944  PLINT arg6 ;
3945 
3946  SWIG_check_num_args("plenv0",6,6)
3947  if(!lua_isnumber(L,1)) SWIG_fail_arg("plenv0",1,"PLFLT");
3948  if(!lua_isnumber(L,2)) SWIG_fail_arg("plenv0",2,"PLFLT");
3949  if(!lua_isnumber(L,3)) SWIG_fail_arg("plenv0",3,"PLFLT");
3950  if(!lua_isnumber(L,4)) SWIG_fail_arg("plenv0",4,"PLFLT");
3951  if(!lua_isnumber(L,5)) SWIG_fail_arg("plenv0",5,"PLINT");
3952  if(!lua_isnumber(L,6)) SWIG_fail_arg("plenv0",6,"PLINT");
3953  arg1 = (PLFLT)lua_tonumber(L, 1);
3954  arg2 = (PLFLT)lua_tonumber(L, 2);
3955  arg3 = (PLFLT)lua_tonumber(L, 3);
3956  arg4 = (PLFLT)lua_tonumber(L, 4);
3957  arg5 = (PLINT)lua_tonumber(L, 5);
3958  arg6 = (PLINT)lua_tonumber(L, 6);
3959  plenv0(arg1,arg2,arg3,arg4,arg5,arg6);
3960 
3961  return SWIG_arg;
3962 
3963  if(0) SWIG_fail;
3964 
3965 fail:
3966  lua_error(L);
3967  return SWIG_arg;
3968 }
3969 
3970 
3971 static int _wrap_eop(lua_State* L) {
3972  int SWIG_arg = 0;
3973 
3974  SWIG_check_num_args("pleop",0,0)
3975  pleop();
3976 
3977  return SWIG_arg;
3978 
3979  if(0) SWIG_fail;
3980 
3981 fail:
3982  lua_error(L);
3983  return SWIG_arg;
3984 }
3985 
3986 
3987 static int _wrap_errx(lua_State* L) {
3988  int SWIG_arg = 0;
3989  PLINT arg1 ;
3990  PLFLT *arg2 = (PLFLT *) 0 ;
3991  PLFLT *arg3 = (PLFLT *) 0 ;
3992  PLFLT *arg4 = (PLFLT *) 0 ;
3993  int temp3 ;
3994  int temp4 ;
3995 
3996  SWIG_check_num_args("plerrx",3,3)
3997  {
3998  int temp;
3999  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4000  if ( !arg2 )
4001  SWIG_fail;
4002  arg1 = Alen = temp;
4003  }
4004  {
4005  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4006  if ( !arg3 )
4007  SWIG_fail;
4008  if ( temp3 != Alen )
4009  {
4010  lua_pushfstring( L, "Tables must be of same length." );
4011  SWIG_fail;
4012  }
4013  }
4014  {
4015  arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
4016  if ( !arg4 )
4017  SWIG_fail;
4018  if ( temp4 != Alen )
4019  {
4020  lua_pushfstring( L, "Tables must be of same length." );
4021  SWIG_fail;
4022  }
4023  }
4024  plerrx(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
4025 
4026  {
4027  LUA_FREE_ARRAY( arg2 );
4028  }
4029  {
4030  LUA_FREE_ARRAY( arg3 );
4031  }
4032  {
4033  LUA_FREE_ARRAY( arg4 );
4034  }
4035  return SWIG_arg;
4036 
4037  if(0) SWIG_fail;
4038 
4039 fail:
4040  {
4041  LUA_FREE_ARRAY( arg2 );
4042  }
4043  {
4044  LUA_FREE_ARRAY( arg3 );
4045  }
4046  {
4047  LUA_FREE_ARRAY( arg4 );
4048  }
4049  lua_error(L);
4050  return SWIG_arg;
4051 }
4052 
4053 
4054 static int _wrap_erry(lua_State* L) {
4055  int SWIG_arg = 0;
4056  PLINT arg1 ;
4057  PLFLT *arg2 = (PLFLT *) 0 ;
4058  PLFLT *arg3 = (PLFLT *) 0 ;
4059  PLFLT *arg4 = (PLFLT *) 0 ;
4060  int temp3 ;
4061  int temp4 ;
4062 
4063  SWIG_check_num_args("plerry",3,3)
4064  {
4065  int temp;
4066  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4067  if ( !arg2 )
4068  SWIG_fail;
4069  arg1 = Alen = temp;
4070  }
4071  {
4072  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4073  if ( !arg3 )
4074  SWIG_fail;
4075  if ( temp3 != Alen )
4076  {
4077  lua_pushfstring( L, "Tables must be of same length." );
4078  SWIG_fail;
4079  }
4080  }
4081  {
4082  arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
4083  if ( !arg4 )
4084  SWIG_fail;
4085  if ( temp4 != Alen )
4086  {
4087  lua_pushfstring( L, "Tables must be of same length." );
4088  SWIG_fail;
4089  }
4090  }
4091  plerry(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
4092 
4093  {
4094  LUA_FREE_ARRAY( arg2 );
4095  }
4096  {
4097  LUA_FREE_ARRAY( arg3 );
4098  }
4099  {
4100  LUA_FREE_ARRAY( arg4 );
4101  }
4102  return SWIG_arg;
4103 
4104  if(0) SWIG_fail;
4105 
4106 fail:
4107  {
4108  LUA_FREE_ARRAY( arg2 );
4109  }
4110  {
4111  LUA_FREE_ARRAY( arg3 );
4112  }
4113  {
4114  LUA_FREE_ARRAY( arg4 );
4115  }
4116  lua_error(L);
4117  return SWIG_arg;
4118 }
4119 
4120 
4121 static int _wrap_famadv(lua_State* L) {
4122  int SWIG_arg = 0;
4123 
4124  SWIG_check_num_args("plfamadv",0,0)
4125  plfamadv();
4126 
4127  return SWIG_arg;
4128 
4129  if(0) SWIG_fail;
4130 
4131 fail:
4132  lua_error(L);
4133  return SWIG_arg;
4134 }
4135 
4136 
4137 static int _wrap_fill(lua_State* L) {
4138  int SWIG_arg = 0;
4139  PLINT arg1 ;
4140  PLFLT *arg2 = (PLFLT *) 0 ;
4141  PLFLT *arg3 = (PLFLT *) 0 ;
4142  int temp3 ;
4143 
4144  SWIG_check_num_args("plfill",2,2)
4145  {
4146  int temp;
4147  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4148  if ( !arg2 )
4149  SWIG_fail;
4150  arg1 = Alen = temp;
4151  }
4152  {
4153  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4154  if ( !arg3 )
4155  SWIG_fail;
4156  if ( temp3 != Alen )
4157  {
4158  lua_pushfstring( L, "Tables must be of same length." );
4159  SWIG_fail;
4160  }
4161  }
4162  plfill(arg1,(double const *)arg2,(double const *)arg3);
4163 
4164  {
4165  LUA_FREE_ARRAY( arg2 );
4166  }
4167  {
4168  LUA_FREE_ARRAY( arg3 );
4169  }
4170  return SWIG_arg;
4171 
4172  if(0) SWIG_fail;
4173 
4174 fail:
4175  {
4176  LUA_FREE_ARRAY( arg2 );
4177  }
4178  {
4179  LUA_FREE_ARRAY( arg3 );
4180  }
4181  lua_error(L);
4182  return SWIG_arg;
4183 }
4184 
4185 
4186 static int _wrap_fill3(lua_State* L) {
4187  int SWIG_arg = 0;
4188  PLINT arg1 ;
4189  PLFLT *arg2 = (PLFLT *) 0 ;
4190  PLFLT *arg3 = (PLFLT *) 0 ;
4191  PLFLT *arg4 = (PLFLT *) 0 ;
4192  int temp3 ;
4193  int temp4 ;
4194 
4195  SWIG_check_num_args("plfill3",3,3)
4196  {
4197  int temp;
4198  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4199  if ( !arg2 )
4200  SWIG_fail;
4201  arg1 = Alen = temp;
4202  }
4203  {
4204  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4205  if ( !arg3 )
4206  SWIG_fail;
4207  if ( temp3 != Alen )
4208  {
4209  lua_pushfstring( L, "Tables must be of same length." );
4210  SWIG_fail;
4211  }
4212  }
4213  {
4214  arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
4215  if ( !arg4 )
4216  SWIG_fail;
4217  if ( temp4 != Alen )
4218  {
4219  lua_pushfstring( L, "Tables must be of same length." );
4220  SWIG_fail;
4221  }
4222  }
4223  plfill3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
4224 
4225  {
4226  LUA_FREE_ARRAY( arg2 );
4227  }
4228  {
4229  LUA_FREE_ARRAY( arg3 );
4230  }
4231  {
4232  LUA_FREE_ARRAY( arg4 );
4233  }
4234  return SWIG_arg;
4235 
4236  if(0) SWIG_fail;
4237 
4238 fail:
4239  {
4240  LUA_FREE_ARRAY( arg2 );
4241  }
4242  {
4243  LUA_FREE_ARRAY( arg3 );
4244  }
4245  {
4246  LUA_FREE_ARRAY( arg4 );
4247  }
4248  lua_error(L);
4249  return SWIG_arg;
4250 }
4251 
4252 
4253 static int _wrap_gradient(lua_State* L) {
4254  int SWIG_arg = 0;
4255  PLINT arg1 ;
4256  PLFLT *arg2 = (PLFLT *) 0 ;
4257  PLFLT *arg3 = (PLFLT *) 0 ;
4258  PLFLT arg4 ;
4259  int temp3 ;
4260 
4261  SWIG_check_num_args("plgradient",3,3)
4262  if(!lua_isnumber(L,3)) SWIG_fail_arg("plgradient",3,"PLFLT");
4263  {
4264  int temp;
4265  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4266  if ( !arg2 )
4267  SWIG_fail;
4268  arg1 = Alen = temp;
4269  }
4270  {
4271  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4272  if ( !arg3 )
4273  SWIG_fail;
4274  if ( temp3 != Alen )
4275  {
4276  lua_pushfstring( L, "Tables must be of same length." );
4277  SWIG_fail;
4278  }
4279  }
4280  arg4 = (PLFLT)lua_tonumber(L, 3);
4281  plgradient(arg1,(double const *)arg2,(double const *)arg3,arg4);
4282 
4283  {
4284  LUA_FREE_ARRAY( arg2 );
4285  }
4286  {
4287  LUA_FREE_ARRAY( arg3 );
4288  }
4289  return SWIG_arg;
4290 
4291  if(0) SWIG_fail;
4292 
4293 fail:
4294  {
4295  LUA_FREE_ARRAY( arg2 );
4296  }
4297  {
4298  LUA_FREE_ARRAY( arg3 );
4299  }
4300  lua_error(L);
4301  return SWIG_arg;
4302 }
4303 
4304 
4305 static int _wrap_flush(lua_State* L) {
4306  int SWIG_arg = 0;
4307 
4308  SWIG_check_num_args("plflush",0,0)
4309  plflush();
4310 
4311  return SWIG_arg;
4312 
4313  if(0) SWIG_fail;
4314 
4315 fail:
4316  lua_error(L);
4317  return SWIG_arg;
4318 }
4319 
4320 
4321 static int _wrap_font(lua_State* L) {
4322  int SWIG_arg = 0;
4323  PLINT arg1 ;
4324 
4325  SWIG_check_num_args("plfont",1,1)
4326  if(!lua_isnumber(L,1)) SWIG_fail_arg("plfont",1,"PLINT");
4327  arg1 = (PLINT)lua_tonumber(L, 1);
4328  plfont(arg1);
4329 
4330  return SWIG_arg;
4331 
4332  if(0) SWIG_fail;
4333 
4334 fail:
4335  lua_error(L);
4336  return SWIG_arg;
4337 }
4338 
4339 
4340 static int _wrap_fontld(lua_State* L) {
4341  int SWIG_arg = 0;
4342  PLINT arg1 ;
4343 
4344  SWIG_check_num_args("plfontld",1,1)
4345  if(!lua_isnumber(L,1)) SWIG_fail_arg("plfontld",1,"PLINT");
4346  arg1 = (PLINT)lua_tonumber(L, 1);
4347  plfontld(arg1);
4348 
4349  return SWIG_arg;
4350 
4351  if(0) SWIG_fail;
4352 
4353 fail:
4354  lua_error(L);
4355  return SWIG_arg;
4356 }
4357 
4358 
4359 static int _wrap_gchr(lua_State* L) {
4360  int SWIG_arg = 0;
4361  PLFLT *arg1 = (PLFLT *) 0 ;
4362  PLFLT *arg2 = (PLFLT *) 0 ;
4363  PLFLT temp1 ;
4364  PLFLT temp2 ;
4365 
4366  arg1 = &temp1;
4367  arg2 = &temp2;
4368  SWIG_check_num_args("plgchr",0,0)
4369  plgchr(arg1,arg2);
4370 
4371  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4372  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4373  return SWIG_arg;
4374 
4375  if(0) SWIG_fail;
4376 
4377 fail:
4378  lua_error(L);
4379  return SWIG_arg;
4380 }
4381 
4382 
4383 static int _wrap_gcol0(lua_State* L) {
4384  int SWIG_arg = 0;
4385  PLINT arg1 ;
4386  PLINT *arg2 = (PLINT *) 0 ;
4387  PLINT *arg3 = (PLINT *) 0 ;
4388  PLINT *arg4 = (PLINT *) 0 ;
4389  PLINT temp2 ;
4390  PLINT temp3 ;
4391  PLINT temp4 ;
4392 
4393  arg2 = &temp2;
4394  arg3 = &temp3;
4395  arg4 = &temp4;
4396  SWIG_check_num_args("plgcol0",1,1)
4397  if(!lua_isnumber(L,1)) SWIG_fail_arg("plgcol0",1,"PLINT");
4398  arg1 = (PLINT)lua_tonumber(L, 1);
4399  plgcol0(arg1,arg2,arg3,arg4);
4400 
4401  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4402  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4403  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4404  return SWIG_arg;
4405 
4406  if(0) SWIG_fail;
4407 
4408 fail:
4409  lua_error(L);
4410  return SWIG_arg;
4411 }
4412 
4413 
4414 static int _wrap_gcol0a(lua_State* L) {
4415  int SWIG_arg = 0;
4416  PLINT arg1 ;
4417  PLINT *arg2 = (PLINT *) 0 ;
4418  PLINT *arg3 = (PLINT *) 0 ;
4419  PLINT *arg4 = (PLINT *) 0 ;
4420  PLFLT *arg5 = (PLFLT *) 0 ;
4421  PLINT temp2 ;
4422  PLINT temp3 ;
4423  PLINT temp4 ;
4424  PLFLT temp5 ;
4425 
4426  arg2 = &temp2;
4427  arg3 = &temp3;
4428  arg4 = &temp4;
4429  arg5 = &temp5;
4430  SWIG_check_num_args("plgcol0a",1,1)
4431  if(!lua_isnumber(L,1)) SWIG_fail_arg("plgcol0a",1,"PLINT");
4432  arg1 = (PLINT)lua_tonumber(L, 1);
4433  plgcol0a(arg1,arg2,arg3,arg4,arg5);
4434 
4435  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4436  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4437  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4438  lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
4439  return SWIG_arg;
4440 
4441  if(0) SWIG_fail;
4442 
4443 fail:
4444  lua_error(L);
4445  return SWIG_arg;
4446 }
4447 
4448 
4449 static int _wrap_gcolbg(lua_State* L) {
4450  int SWIG_arg = 0;
4451  PLINT *arg1 = (PLINT *) 0 ;
4452  PLINT *arg2 = (PLINT *) 0 ;
4453  PLINT *arg3 = (PLINT *) 0 ;
4454  PLINT temp1 ;
4455  PLINT temp2 ;
4456  PLINT temp3 ;
4457 
4458  arg1 = &temp1;
4459  arg2 = &temp2;
4460  arg3 = &temp3;
4461  SWIG_check_num_args("plgcolbg",0,0)
4462  plgcolbg(arg1,arg2,arg3);
4463 
4464  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4465  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4466  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4467  return SWIG_arg;
4468 
4469  if(0) SWIG_fail;
4470 
4471 fail:
4472  lua_error(L);
4473  return SWIG_arg;
4474 }
4475 
4476 
4477 static int _wrap_gcolbga(lua_State* L) {
4478  int SWIG_arg = 0;
4479  PLINT *arg1 = (PLINT *) 0 ;
4480  PLINT *arg2 = (PLINT *) 0 ;
4481  PLINT *arg3 = (PLINT *) 0 ;
4482  PLFLT *arg4 = (PLFLT *) 0 ;
4483  PLINT temp1 ;
4484  PLINT temp2 ;
4485  PLINT temp3 ;
4486  PLFLT temp4 ;
4487 
4488  arg1 = &temp1;
4489  arg2 = &temp2;
4490  arg3 = &temp3;
4491  arg4 = &temp4;
4492  SWIG_check_num_args("plgcolbga",0,0)
4493  plgcolbga(arg1,arg2,arg3,arg4);
4494 
4495  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4496  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4497  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4498  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4499  return SWIG_arg;
4500 
4501  if(0) SWIG_fail;
4502 
4503 fail:
4504  lua_error(L);
4505  return SWIG_arg;
4506 }
4507 
4508 
4509 static int _wrap_gcompression(lua_State* L) {
4510  int SWIG_arg = 0;
4511  PLINT *arg1 = (PLINT *) 0 ;
4512  PLINT temp1 ;
4513 
4514  arg1 = &temp1;
4515  SWIG_check_num_args("plgcompression",0,0)
4516  plgcompression(arg1);
4517 
4518  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4519  return SWIG_arg;
4520 
4521  if(0) SWIG_fail;
4522 
4523 fail:
4524  lua_error(L);
4525  return SWIG_arg;
4526 }
4527 
4528 
4529 static int _wrap_gdev(lua_State* L) {
4530  int SWIG_arg = 0;
4531  char *arg1 = (char *) 0 ;
4532  char buff1[1000] ;
4533 
4534  {
4535  arg1 = buff1;
4536  }
4537  SWIG_check_num_args("plgdev",0,0)
4538  plgdev(arg1);
4539 
4540  {
4541  lua_pushstring( L, arg1 );
4542  SWIG_arg++;
4543  }
4544  return SWIG_arg;
4545 
4546  if(0) SWIG_fail;
4547 
4548 fail:
4549  lua_error(L);
4550  return SWIG_arg;
4551 }
4552 
4553 
4554 static int _wrap_gdidev(lua_State* L) {
4555  int SWIG_arg = 0;
4556  PLFLT *arg1 = (PLFLT *) 0 ;
4557  PLFLT *arg2 = (PLFLT *) 0 ;
4558  PLFLT *arg3 = (PLFLT *) 0 ;
4559  PLFLT *arg4 = (PLFLT *) 0 ;
4560  PLFLT temp1 ;
4561  PLFLT temp2 ;
4562  PLFLT temp3 ;
4563  PLFLT temp4 ;
4564 
4565  arg1 = &temp1;
4566  arg2 = &temp2;
4567  arg3 = &temp3;
4568  arg4 = &temp4;
4569  SWIG_check_num_args("plgdidev",0,0)
4570  plgdidev(arg1,arg2,arg3,arg4);
4571 
4572  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4573  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4574  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4575  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4576  return SWIG_arg;
4577 
4578  if(0) SWIG_fail;
4579 
4580 fail:
4581  lua_error(L);
4582  return SWIG_arg;
4583 }
4584 
4585 
4586 static int _wrap_gdiori(lua_State* L) {
4587  int SWIG_arg = 0;
4588  PLFLT *arg1 = (PLFLT *) 0 ;
4589  PLFLT temp1 ;
4590 
4591  arg1 = &temp1;
4592  SWIG_check_num_args("plgdiori",0,0)
4593  plgdiori(arg1);
4594 
4595  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4596  return SWIG_arg;
4597 
4598  if(0) SWIG_fail;
4599 
4600 fail:
4601  lua_error(L);
4602  return SWIG_arg;
4603 }
4604 
4605 
4606 static int _wrap_gdiplt(lua_State* L) {
4607  int SWIG_arg = 0;
4608  PLFLT *arg1 = (PLFLT *) 0 ;
4609  PLFLT *arg2 = (PLFLT *) 0 ;
4610  PLFLT *arg3 = (PLFLT *) 0 ;
4611  PLFLT *arg4 = (PLFLT *) 0 ;
4612  PLFLT temp1 ;
4613  PLFLT temp2 ;
4614  PLFLT temp3 ;
4615  PLFLT temp4 ;
4616 
4617  arg1 = &temp1;
4618  arg2 = &temp2;
4619  arg3 = &temp3;
4620  arg4 = &temp4;
4621  SWIG_check_num_args("plgdiplt",0,0)
4622  plgdiplt(arg1,arg2,arg3,arg4);
4623 
4624  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4625  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4626  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4627  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4628  return SWIG_arg;
4629 
4630  if(0) SWIG_fail;
4631 
4632 fail:
4633  lua_error(L);
4634  return SWIG_arg;
4635 }
4636 
4637 
4638 static int _wrap_gfam(lua_State* L) {
4639  int SWIG_arg = 0;
4640  PLINT *arg1 = (PLINT *) 0 ;
4641  PLINT *arg2 = (PLINT *) 0 ;
4642  PLINT *arg3 = (PLINT *) 0 ;
4643  PLINT temp1 ;
4644  PLINT temp2 ;
4645  PLINT temp3 ;
4646 
4647  arg1 = &temp1;
4648  arg2 = &temp2;
4649  arg3 = &temp3;
4650  SWIG_check_num_args("plgfam",0,0)
4651  plgfam(arg1,arg2,arg3);
4652 
4653  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4654  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4655  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4656  return SWIG_arg;
4657 
4658  if(0) SWIG_fail;
4659 
4660 fail:
4661  lua_error(L);
4662  return SWIG_arg;
4663 }
4664 
4665 
4666 static int _wrap_gfci(lua_State* L) {
4667  int SWIG_arg = 0;
4668  PLUNICODE *arg1 = (PLUNICODE *) 0 ;
4669  PLUNICODE temp1 ;
4670 
4671  arg1 = &temp1;
4672  SWIG_check_num_args("plgfci",0,0)
4673  plgfci(arg1);
4674 
4675  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4676  return SWIG_arg;
4677 
4678  if(0) SWIG_fail;
4679 
4680 fail:
4681  lua_error(L);
4682  return SWIG_arg;
4683 }
4684 
4685 
4686 static int _wrap_gfnam(lua_State* L) {
4687  int SWIG_arg = 0;
4688  char *arg1 = (char *) 0 ;
4689  char buff1[1000] ;
4690 
4691  {
4692  arg1 = buff1;
4693  }
4694  SWIG_check_num_args("plgfnam",0,0)
4695  plgfnam(arg1);
4696 
4697  {
4698  lua_pushstring( L, arg1 );
4699  SWIG_arg++;
4700  }
4701  return SWIG_arg;
4702 
4703  if(0) SWIG_fail;
4704 
4705 fail:
4706  lua_error(L);
4707  return SWIG_arg;
4708 }
4709 
4710 
4711 static int _wrap_gfont(lua_State* L) {
4712  int SWIG_arg = 0;
4713  PLINT *arg1 = (PLINT *) 0 ;
4714  PLINT *arg2 = (PLINT *) 0 ;
4715  PLINT *arg3 = (PLINT *) 0 ;
4716  PLINT temp1 ;
4717  PLINT temp2 ;
4718  PLINT temp3 ;
4719 
4720  arg1 = &temp1;
4721  arg2 = &temp2;
4722  arg3 = &temp3;
4723  SWIG_check_num_args("plgfont",0,0)
4724  plgfont(arg1,arg2,arg3);
4725 
4726  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4727  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4728  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4729  return SWIG_arg;
4730 
4731  if(0) SWIG_fail;
4732 
4733 fail:
4734  lua_error(L);
4735  return SWIG_arg;
4736 }
4737 
4738 
4739 static int _wrap_glevel(lua_State* L) {
4740  int SWIG_arg = 0;
4741  PLINT *arg1 = (PLINT *) 0 ;
4742  PLINT temp1 ;
4743 
4744  arg1 = &temp1;
4745  SWIG_check_num_args("plglevel",0,0)
4746  plglevel(arg1);
4747 
4748  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4749  return SWIG_arg;
4750 
4751  if(0) SWIG_fail;
4752 
4753 fail:
4754  lua_error(L);
4755  return SWIG_arg;
4756 }
4757 
4758 
4759 static int _wrap_gpage(lua_State* L) {
4760  int SWIG_arg = 0;
4761  PLFLT *arg1 = (PLFLT *) 0 ;
4762  PLFLT *arg2 = (PLFLT *) 0 ;
4763  PLINT *arg3 = (PLINT *) 0 ;
4764  PLINT *arg4 = (PLINT *) 0 ;
4765  PLINT *arg5 = (PLINT *) 0 ;
4766  PLINT *arg6 = (PLINT *) 0 ;
4767  PLFLT temp1 ;
4768  PLFLT temp2 ;
4769  PLINT temp3 ;
4770  PLINT temp4 ;
4771  PLINT temp5 ;
4772  PLINT temp6 ;
4773 
4774  arg1 = &temp1;
4775  arg2 = &temp2;
4776  arg3 = &temp3;
4777  arg4 = &temp4;
4778  arg5 = &temp5;
4779  arg6 = &temp6;
4780  SWIG_check_num_args("plgpage",0,0)
4781  plgpage(arg1,arg2,arg3,arg4,arg5,arg6);
4782 
4783  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4784  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4785  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4786  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4787  lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
4788  lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
4789  return SWIG_arg;
4790 
4791  if(0) SWIG_fail;
4792 
4793 fail:
4794  lua_error(L);
4795  return SWIG_arg;
4796 }
4797 
4798 
4799 static int _wrap_gra(lua_State* L) {
4800  int SWIG_arg = 0;
4801 
4802  SWIG_check_num_args("plgra",0,0)
4803  plgra();
4804 
4805  return SWIG_arg;
4806 
4807  if(0) SWIG_fail;
4808 
4809 fail:
4810  lua_error(L);
4811  return SWIG_arg;
4812 }
4813 
4814 
4815 static int _wrap_griddata(lua_State* L) {
4816  int SWIG_arg = 0;
4817  PLFLT *arg1 = (PLFLT *) 0 ;
4818  PLFLT *arg2 = (PLFLT *) 0 ;
4819  PLFLT *arg3 = (PLFLT *) 0 ;
4820  PLINT arg4 ;
4821  PLFLT *arg5 = (PLFLT *) 0 ;
4822  PLINT arg6 ;
4823  PLFLT *arg7 = (PLFLT *) 0 ;
4824  PLINT arg8 ;
4825  PLFLT **arg9 = (PLFLT **) 0 ;
4826  PLINT arg10 ;
4827  PLFLT arg11 ;
4828  int temp2 ;
4829 
4830  SWIG_check_num_args("plgriddata",7,7)
4831  if(!lua_isnumber(L,6)) SWIG_fail_arg("plgriddata",6,"PLINT");
4832  if(!lua_isnumber(L,7)) SWIG_fail_arg("plgriddata",7,"PLFLT");
4833  {
4834  int temp;
4835  arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4836  if ( !arg1 )
4837  SWIG_fail;
4838  Alen = temp;
4839  }
4840  {
4841  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp2 );
4842  if ( !arg2 )
4843  SWIG_fail;
4844  if ( temp2 != Alen )
4845  {
4846  lua_pushfstring( L, "Tables must be of same length." );
4847  SWIG_fail;
4848  }
4849  }
4850  {
4851  int temp;
4852  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp );
4853  if ( !arg3 )
4854  SWIG_fail;
4855  if ( temp != Alen )
4856  {
4857  lua_pushfstring( L, "Tables must be of same length." );
4858  SWIG_fail;
4859  }
4860  arg4 = temp;
4861  }
4862  {
4863  int temp;
4864  arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
4865  if ( !arg5 )
4866  SWIG_fail;
4867  arg6 = Xlen = temp;
4868  }
4869  {
4870  int temp, i;
4871 
4872  arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
4873  if ( !arg7 )
4874  SWIG_fail;
4875  arg8 = Ylen = temp;
4876 
4877  arg9 = LUA_ALLOC_ARRAY( PLFLT *, Xlen );
4878  if ( !arg9 )
4879  SWIG_fail;
4880  for ( i = 0; i < Xlen; i++ )
4881  arg9[i] = NULL;
4882 
4883  for ( i = 0; i < Xlen; i++ )
4884  {
4885  arg9[i] = LUA_ALLOC_ARRAY( PLFLT, Ylen );
4886  if ( !arg9[i] )
4887  SWIG_fail;
4888  }
4889  }
4890  arg10 = (PLINT)lua_tonumber(L, 6);
4891  arg11 = (PLFLT)lua_tonumber(L, 7);
4892  plgriddata((double const *)arg1,(double const *)arg2,(double const *)arg3,arg4,(double const *)arg5,arg6,(double const *)arg7,arg8,arg9,arg10,arg11);
4893 
4894  {
4895  int i;
4896 
4897  if ( arg9 )
4898  {
4899  lua_newtable( L );
4900  for ( i = 0; i < Xlen; i++ )
4901  {
4902  SWIG_write_double_num_array( L, arg9[i], Ylen );
4903  lua_rawseti( L, -2, i + 1 ); // -1 is the inner table, -2 is the outer table
4904  }
4905  SWIG_arg++;
4906  }
4907  }
4908  {
4909  LUA_FREE_ARRAY( arg1 );
4910  }
4911  {
4912  LUA_FREE_ARRAY( arg2 );
4913  }
4914  {
4915  LUA_FREE_ARRAY( arg3 );
4916  }
4917  {
4918  LUA_FREE_ARRAY( arg5 );
4919  }
4920  {
4921  int i;
4922 
4923  LUA_FREE_ARRAY( arg7 );
4924 
4925  if ( arg9 )
4926  {
4927  for ( i = 0; i < Xlen; i++ )
4928  LUA_FREE_ARRAY( arg9[i] );
4929  LUA_FREE_ARRAY( arg9 );
4930  }
4931  }
4932  return SWIG_arg;
4933 
4934  if(0) SWIG_fail;
4935 
4936 fail:
4937  {
4938  LUA_FREE_ARRAY( arg1 );
4939  }
4940  {
4941  LUA_FREE_ARRAY( arg2 );
4942  }
4943  {
4944  LUA_FREE_ARRAY( arg3 );
4945  }
4946  {
4947  LUA_FREE_ARRAY( arg5 );
4948  }
4949  {
4950  int i;
4951 
4952  LUA_FREE_ARRAY( arg7 );
4953 
4954  if ( arg9 )
4955  {
4956  for ( i = 0; i < Xlen; i++ )
4957  LUA_FREE_ARRAY( arg9[i] );
4958  LUA_FREE_ARRAY( arg9 );
4959  }
4960  }
4961  lua_error(L);
4962  return SWIG_arg;
4963 }
4964 
4965 
4966 static int _wrap_gspa(lua_State* L) {
4967  int SWIG_arg = 0;
4968  PLFLT *arg1 = (PLFLT *) 0 ;
4969  PLFLT *arg2 = (PLFLT *) 0 ;
4970  PLFLT *arg3 = (PLFLT *) 0 ;
4971  PLFLT *arg4 = (PLFLT *) 0 ;
4972  PLFLT temp1 ;
4973  PLFLT temp2 ;
4974  PLFLT temp3 ;
4975  PLFLT temp4 ;
4976 
4977  arg1 = &temp1;
4978  arg2 = &temp2;
4979  arg3 = &temp3;
4980  arg4 = &temp4;
4981  SWIG_check_num_args("plgspa",0,0)
4982  plgspa(arg1,arg2,arg3,arg4);
4983 
4984  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4985  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4986  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4987  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4988  return SWIG_arg;
4989 
4990  if(0) SWIG_fail;
4991 
4992 fail:
4993  lua_error(L);
4994  return SWIG_arg;
4995 }
4996 
4997 
4998 static int _wrap_gstrm(lua_State* L) {
4999  int SWIG_arg = 0;
5000  PLINT *arg1 = (PLINT *) 0 ;
5001  PLINT temp1 ;
5002 
5003  arg1 = &temp1;
5004  SWIG_check_num_args("plgstrm",0,0)
5005  plgstrm(arg1);
5006 
5007  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5008  return SWIG_arg;
5009 
5010  if(0) SWIG_fail;
5011 
5012 fail:
5013  lua_error(L);
5014  return SWIG_arg;
5015 }
5016 
5017 
5018 static int _wrap_gver(lua_State* L) {
5019  int SWIG_arg = 0;
5020  char *arg1 = (char *) 0 ;
5021  char buff1[1000] ;
5022 
5023  {
5024  arg1 = buff1;
5025  }
5026  SWIG_check_num_args("plgver",0,0)
5027  plgver(arg1);
5028 
5029  {
5030  lua_pushstring( L, arg1 );
5031  SWIG_arg++;
5032  }
5033  return SWIG_arg;
5034 
5035  if(0) SWIG_fail;
5036 
5037 fail:
5038  lua_error(L);
5039  return SWIG_arg;
5040 }
5041 
5042 
5043 static int _wrap_gvpd(lua_State* L) {
5044  int SWIG_arg = 0;
5045  PLFLT *arg1 = (PLFLT *) 0 ;
5046  PLFLT *arg2 = (PLFLT *) 0 ;
5047  PLFLT *arg3 = (PLFLT *) 0 ;
5048  PLFLT *arg4 = (PLFLT *) 0 ;
5049  PLFLT temp1 ;
5050  PLFLT temp2 ;
5051  PLFLT temp3 ;
5052  PLFLT temp4 ;
5053 
5054  arg1 = &temp1;
5055  arg2 = &temp2;
5056  arg3 = &temp3;
5057  arg4 = &temp4;
5058  SWIG_check_num_args("plgvpd",0,0)
5059  plgvpd(arg1,arg2,arg3,arg4);
5060 
5061  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5062  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5063  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5064  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5065  return SWIG_arg;
5066 
5067  if(0) SWIG_fail;
5068 
5069 fail:
5070  lua_error(L);
5071  return SWIG_arg;
5072 }
5073 
5074 
5075 static int _wrap_gvpw(lua_State* L) {
5076  int SWIG_arg = 0;
5077  PLFLT *arg1 = (PLFLT *) 0 ;
5078  PLFLT *arg2 = (PLFLT *) 0 ;
5079  PLFLT *arg3 = (PLFLT *) 0 ;
5080  PLFLT *arg4 = (PLFLT *) 0 ;
5081  PLFLT temp1 ;
5082  PLFLT temp2 ;
5083  PLFLT temp3 ;
5084  PLFLT temp4 ;
5085 
5086  arg1 = &temp1;
5087  arg2 = &temp2;
5088  arg3 = &temp3;
5089  arg4 = &temp4;
5090  SWIG_check_num_args("plgvpw",0,0)
5091  plgvpw(arg1,arg2,arg3,arg4);
5092 
5093  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5094  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5095  lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5096  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5097  return SWIG_arg;
5098 
5099  if(0) SWIG_fail;
5100 
5101 fail:
5102  lua_error(L);
5103  return SWIG_arg;
5104 }
5105 
5106 
5107 static int _wrap_gxax(lua_State* L) {
5108  int SWIG_arg = 0;
5109  PLINT *arg1 = (PLINT *) 0 ;
5110  PLINT *arg2 = (PLINT *) 0 ;
5111  PLINT temp1 ;
5112  PLINT temp2 ;
5113 
5114  arg1 = &temp1;
5115  arg2 = &temp2;
5116  SWIG_check_num_args("plgxax",0,0)
5117  plgxax(arg1,arg2);
5118 
5119  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5120  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5121  return SWIG_arg;
5122 
5123  if(0) SWIG_fail;
5124 
5125 fail:
5126  lua_error(L);
5127  return SWIG_arg;
5128 }
5129 
5130 
5131 static int _wrap_gyax(lua_State* L) {
5132  int SWIG_arg = 0;
5133  PLINT *arg1 = (PLINT *) 0 ;
5134  PLINT *arg2 = (PLINT *) 0 ;
5135  PLINT temp1 ;
5136  PLINT temp2 ;
5137 
5138  arg1 = &temp1;
5139  arg2 = &temp2;
5140  SWIG_check_num_args("plgyax",0,0)
5141  plgyax(arg1,arg2);
5142 
5143  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5144  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5145  return SWIG_arg;
5146 
5147  if(0) SWIG_fail;
5148 
5149 fail:
5150  lua_error(L);
5151  return SWIG_arg;
5152 }
5153 
5154 
5155 static int _wrap_gzax(lua_State* L) {
5156  int SWIG_arg = 0;
5157  PLINT *arg1 = (PLINT *) 0 ;
5158  PLINT *arg2 = (PLINT *) 0 ;
5159  PLINT temp1 ;
5160  PLINT temp2 ;
5161 
5162  arg1 = &temp1;
5163  arg2 = &temp2;
5164  SWIG_check_num_args("plgzax",0,0)
5165  plgzax(arg1,arg2);
5166 
5167  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5168  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5169  return SWIG_arg;
5170 
5171  if(0) SWIG_fail;
5172 
5173 fail:
5174  lua_error(L);
5175  return SWIG_arg;
5176 }
5177 
5178 
5179 static int _wrap_hist(lua_State* L) {
5180  int SWIG_arg = 0;
5181  PLINT arg1 ;
5182  PLFLT *arg2 = (PLFLT *) 0 ;
5183  PLFLT arg3 ;
5184  PLFLT arg4 ;
5185  PLINT arg5 ;
5186  PLINT arg6 ;
5187 
5188  SWIG_check_num_args("plhist",5,5)
5189  if(!lua_isnumber(L,2)) SWIG_fail_arg("plhist",2,"PLFLT");
5190  if(!lua_isnumber(L,3)) SWIG_fail_arg("plhist",3,"PLFLT");
5191  if(!lua_isnumber(L,4)) SWIG_fail_arg("plhist",4,"PLINT");
5192  if(!lua_isnumber(L,5)) SWIG_fail_arg("plhist",5,"PLINT");
5193  {
5194  int temp;
5195  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5196  if ( !arg2 )
5197  SWIG_fail;
5198  arg1 = Alen = temp;
5199  }
5200  arg3 = (PLFLT)lua_tonumber(L, 2);
5201  arg4 = (PLFLT)lua_tonumber(L, 3);
5202  arg5 = (PLINT)lua_tonumber(L, 4);
5203  arg6 = (PLINT)lua_tonumber(L, 5);
5204  plhist(arg1,(double const *)arg2,arg3,arg4,arg5,arg6);
5205 
5206  {
5207  LUA_FREE_ARRAY( arg2 );
5208  }
5209  return SWIG_arg;
5210 
5211  if(0) SWIG_fail;
5212 
5213 fail:
5214  {
5215  LUA_FREE_ARRAY( arg2 );
5216  }
5217  lua_error(L);
5218  return SWIG_arg;
5219 }
5220 
5221 
5222 static int _wrap_hlsrgb(lua_State* L) {
5223  int SWIG_arg = 0;
5224  PLFLT arg1 ;
5225  PLFLT arg2 ;
5226  PLFLT arg3 ;
5227  PLFLT *arg4 = (PLFLT *) 0 ;
5228  PLFLT *arg5 = (PLFLT *) 0 ;
5229  PLFLT *arg6 = (PLFLT *) 0 ;
5230  PLFLT temp4 ;
5231  PLFLT temp5 ;
5232  PLFLT temp6 ;
5233 
5234  arg4 = &temp4;
5235  arg5 = &temp5;
5236  arg6 = &temp6;
5237  SWIG_check_num_args("plhlsrgb",3,3)
5238  if(!lua_isnumber(L,1)) SWIG_fail_arg("plhlsrgb",1,"PLFLT");
5239  if(!lua_isnumber(L,2)) SWIG_fail_arg("plhlsrgb",2,"PLFLT");
5240  if(!lua_isnumber(L,3)) SWIG_fail_arg("plhlsrgb",3,"PLFLT");
5241  arg1 = (PLFLT)lua_tonumber(L, 1);
5242  arg2 = (PLFLT)lua_tonumber(L, 2);
5243  arg3 = (PLFLT)lua_tonumber(L, 3);
5244  plhlsrgb(arg1,arg2,arg3,arg4,arg5,arg6);
5245 
5246  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5247  lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
5248  lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
5249  return SWIG_arg;
5250 
5251  if(0) SWIG_fail;
5252 
5253 fail:
5254  lua_error(L);
5255  return SWIG_arg;
5256 }
5257 
5258 
5259 static int _wrap_init(lua_State* L) {
5260  int SWIG_arg = 0;
5261 
5262  SWIG_check_num_args("plinit",0,0)
5263  plinit();
5264 
5265  return SWIG_arg;
5266 
5267  if(0) SWIG_fail;
5268 
5269 fail:
5270  lua_error(L);
5271  return SWIG_arg;
5272 }
5273 
5274 
5275 static int _wrap_join(lua_State* L) {
5276  int SWIG_arg = 0;
5277  PLFLT arg1 ;
5278  PLFLT arg2 ;
5279  PLFLT arg3 ;
5280  PLFLT arg4 ;
5281 
5282  SWIG_check_num_args("pljoin",4,4)
5283  if(!lua_isnumber(L,1)) SWIG_fail_arg("pljoin",1,"PLFLT");
5284  if(!lua_isnumber(L,2)) SWIG_fail_arg("pljoin",2,"PLFLT");
5285  if(!lua_isnumber(L,3)) SWIG_fail_arg("pljoin",3,"PLFLT");
5286  if(!lua_isnumber(L,4)) SWIG_fail_arg("pljoin",4,"PLFLT");
5287  arg1 = (PLFLT)lua_tonumber(L, 1);
5288  arg2 = (PLFLT)lua_tonumber(L, 2);
5289  arg3 = (PLFLT)lua_tonumber(L, 3);
5290  arg4 = (PLFLT)lua_tonumber(L, 4);
5291  pljoin(arg1,arg2,arg3,arg4);
5292 
5293  return SWIG_arg;
5294 
5295  if(0) SWIG_fail;
5296 
5297 fail:
5298  lua_error(L);
5299  return SWIG_arg;
5300 }
5301 
5302 
5303 static int _wrap_lab(lua_State* L) {
5304  int SWIG_arg = 0;
5305  char *arg1 = (char *) 0 ;
5306  char *arg2 = (char *) 0 ;
5307  char *arg3 = (char *) 0 ;
5308 
5309  SWIG_check_num_args("pllab",3,3)
5310  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("pllab",1,"char const *");
5311  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("pllab",2,"char const *");
5312  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("pllab",3,"char const *");
5313  arg1 = (char *)lua_tostring(L, 1);
5314  arg2 = (char *)lua_tostring(L, 2);
5315  arg3 = (char *)lua_tostring(L, 3);
5316  pllab((char const *)arg1,(char const *)arg2,(char const *)arg3);
5317 
5318  return SWIG_arg;
5319 
5320  if(0) SWIG_fail;
5321 
5322 fail:
5323  lua_error(L);
5324  return SWIG_arg;
5325 }
5326 
5327 
5328 static int _wrap_legend(lua_State* L) {
5329  int SWIG_arg = 0;
5330  PLFLT *arg1 = (PLFLT *) 0 ;
5331  PLFLT *arg2 = (PLFLT *) 0 ;
5332  PLINT arg3 ;
5333  PLINT arg4 ;
5334  PLFLT arg5 ;
5335  PLFLT arg6 ;
5336  PLFLT arg7 ;
5337  PLINT arg8 ;
5338  PLINT arg9 ;
5339  PLINT arg10 ;
5340  PLINT arg11 ;
5341  PLINT arg12 ;
5342  PLINT arg13 ;
5343  PLINT *arg14 = (PLINT *) 0 ;
5344  PLFLT arg15 ;
5345  PLFLT arg16 ;
5346  PLFLT arg17 ;
5347  PLFLT arg18 ;
5348  PLINT *arg19 = (PLINT *) 0 ;
5349  char **arg20 = (char **) 0 ;
5350  PLINT *arg21 = (PLINT *) 0 ;
5351  PLINT *arg22 = (PLINT *) 0 ;
5352  PLFLT *arg23 = (PLFLT *) 0 ;
5353  PLFLT *arg24 = (PLFLT *) 0 ;
5354  PLINT *arg25 = (PLINT *) 0 ;
5355  PLINT *arg26 = (PLINT *) 0 ;
5356  PLFLT *arg27 = (PLFLT *) 0 ;
5357  PLINT *arg28 = (PLINT *) 0 ;
5358  PLFLT *arg29 = (PLFLT *) 0 ;
5359  PLINT *arg30 = (PLINT *) 0 ;
5360  char **arg31 = (char **) 0 ;
5361  PLFLT temp1 ;
5362  PLFLT temp2 ;
5363  int temp19 ;
5364  int temp21 ;
5365  int temp22 ;
5366  int temp23 ;
5367  int temp24 ;
5368  int temp25 ;
5369  int temp26 ;
5370  int temp27 ;
5371  int temp28 ;
5372  int temp29 ;
5373  int temp30 ;
5374 
5375  {
5376  arg21 = NULL;
5377  }
5378  {
5379  arg22 = NULL;
5380  }
5381  {
5382  arg23 = NULL;
5383  }
5384  {
5385  arg24 = NULL;
5386  }
5387  {
5388  arg25 = NULL;
5389  }
5390  {
5391  arg26 = NULL;
5392  }
5393  {
5394  arg27 = NULL;
5395  }
5396  {
5397  arg28 = NULL;
5398  }
5399  {
5400  arg29 = NULL;
5401  }
5402  {
5403  arg30 = NULL;
5404  }
5405  arg1 = &temp1;
5406  arg2 = &temp2;
5407  SWIG_check_num_args("pllegend",17,28)
5408  if(!lua_isnumber(L,1)) SWIG_fail_arg("pllegend",1,"PLINT");
5409  if(!lua_isnumber(L,2)) SWIG_fail_arg("pllegend",2,"PLINT");
5410  if(!lua_isnumber(L,3)) SWIG_fail_arg("pllegend",3,"PLFLT");
5411  if(!lua_isnumber(L,4)) SWIG_fail_arg("pllegend",4,"PLFLT");
5412  if(!lua_isnumber(L,5)) SWIG_fail_arg("pllegend",5,"PLFLT");
5413  if(!lua_isnumber(L,6)) SWIG_fail_arg("pllegend",6,"PLINT");
5414  if(!lua_isnumber(L,7)) SWIG_fail_arg("pllegend",7,"PLINT");
5415  if(!lua_isnumber(L,8)) SWIG_fail_arg("pllegend",8,"PLINT");
5416  if(!lua_isnumber(L,9)) SWIG_fail_arg("pllegend",9,"PLINT");
5417  if(!lua_isnumber(L,10)) SWIG_fail_arg("pllegend",10,"PLINT");
5418  if(!lua_isnumber(L,12)) SWIG_fail_arg("pllegend",12,"PLFLT");
5419  if(!lua_isnumber(L,13)) SWIG_fail_arg("pllegend",13,"PLFLT");
5420  if(!lua_isnumber(L,14)) SWIG_fail_arg("pllegend",14,"PLFLT");
5421  if(!lua_isnumber(L,15)) SWIG_fail_arg("pllegend",15,"PLFLT");
5422  if(!lua_istable(L,17)) SWIG_fail_arg("pllegend",17,"char const **");
5423  if(lua_gettop(L)>=28 && !lua_istable(L,28)) SWIG_fail_arg("pllegend",28,"char const **");
5424  arg3 = (PLINT)lua_tonumber(L, 1);
5425  arg4 = (PLINT)lua_tonumber(L, 2);
5426  arg5 = (PLFLT)lua_tonumber(L, 3);
5427  arg6 = (PLFLT)lua_tonumber(L, 4);
5428  arg7 = (PLFLT)lua_tonumber(L, 5);
5429  arg8 = (PLINT)lua_tonumber(L, 6);
5430  arg9 = (PLINT)lua_tonumber(L, 7);
5431  arg10 = (PLINT)lua_tonumber(L, 8);
5432  arg11 = (PLINT)lua_tonumber(L, 9);
5433  arg12 = (PLINT)lua_tonumber(L, 10);
5434  {
5435  arg14 = (PLINT *) LUA_get_int_num_array_var( L, 11, &arg13 );
5436  if ( !arg14 )
5437  SWIG_fail;
5438  Alen = arg13;
5439  }
5440  arg15 = (PLFLT)lua_tonumber(L, 12);
5441  arg16 = (PLFLT)lua_tonumber(L, 13);
5442  arg17 = (PLFLT)lua_tonumber(L, 14);
5443  arg18 = (PLFLT)lua_tonumber(L, 15);
5444  {
5445  arg19 = (PLINT *) LUA_get_int_num_array_var( L, 16, &temp19 );
5446  if ( !arg19 )
5447  SWIG_fail;
5448  if ( temp19 != Alen )
5449  {
5450  lua_pushfstring( L, "Tables must be of same length." );
5451  SWIG_fail;
5452  }
5453  }
5454  {
5455  int i;
5456  arg20 = NULL;
5457 
5458  if ( SWIG_table_size( L, 17 ) != Alen )
5459  {
5460  lua_pushfstring( L, "Tables must be of same length." );
5461  SWIG_fail;
5462  }
5463  arg20 = malloc( sizeof ( char* ) * Alen );
5464  for ( i = 1; i <= Alen; i++ )
5465  {
5466  lua_rawgeti( L, 17, i );
5467  if ( lua_isstring( L, -1 ) )
5468  {
5469  arg20[i - 1] = (char *) lua_tostring( L, -1 );
5470  }
5471  else
5472  {
5473  lua_pop( L, 1 );
5474  lua_pushfstring( L, "Requires a sequence of strings." );
5475  SWIG_fail;
5476  // arg20 array is freed after 'fail:'
5477  }
5478  lua_pop( L, 1 );
5479  }
5480  }
5481  if(lua_gettop(L)>=18){
5482  {
5483  arg21 = (PLINT *) LUA_get_int_num_array_var( L, 18, &temp21 );
5484  if ( !arg21 )
5485  SWIG_fail;
5486  if ( temp21 != Alen )
5487  {
5488  lua_pushfstring( L, "Tables must be of same length." );
5489  SWIG_fail;
5490  }
5491  }
5492  }
5493  if(lua_gettop(L)>=19){
5494  {
5495  arg22 = (PLINT *) LUA_get_int_num_array_var( L, 19, &temp22 );
5496  if ( !arg22 )
5497  SWIG_fail;
5498  if ( temp22 != Alen )
5499  {
5500  lua_pushfstring( L, "Tables must be of same length." );
5501  SWIG_fail;
5502  }
5503  }
5504  }
5505  if(lua_gettop(L)>=20){
5506  {
5507  arg23 = (PLFLT *) LUA_get_double_num_array_var( L, 20, &temp23 );
5508  if ( !arg23 )
5509  SWIG_fail;
5510  if ( temp23 != Alen )
5511  {
5512  lua_pushfstring( L, "Tables must be of same length." );
5513  SWIG_fail;
5514  }
5515  }
5516  }
5517  if(lua_gettop(L)>=21){
5518  {
5519  arg24 = (PLFLT *) LUA_get_double_num_array_var( L, 21, &temp24 );
5520  if ( !arg24 )
5521  SWIG_fail;
5522  if ( temp24 != Alen )
5523  {
5524  lua_pushfstring( L, "Tables must be of same length." );
5525  SWIG_fail;
5526  }
5527  }
5528  }
5529  if(lua_gettop(L)>=22){
5530  {
5531  arg25 = (PLINT *) LUA_get_int_num_array_var( L, 22, &temp25 );
5532  if ( !arg25 )
5533  SWIG_fail;
5534  if ( temp25 != Alen )
5535  {
5536  lua_pushfstring( L, "Tables must be of same length." );
5537  SWIG_fail;
5538  }
5539  }
5540  }
5541  if(lua_gettop(L)>=23){
5542  {
5543  arg26 = (PLINT *) LUA_get_int_num_array_var( L, 23, &temp26 );
5544  if ( !arg26 )
5545  SWIG_fail;
5546  if ( temp26 != Alen )
5547  {
5548  lua_pushfstring( L, "Tables must be of same length." );
5549  SWIG_fail;
5550  }
5551  }
5552  }
5553  if(lua_gettop(L)>=24){
5554  {
5555  arg27 = (PLFLT *) LUA_get_double_num_array_var( L, 24, &temp27 );
5556  if ( !arg27 )
5557  SWIG_fail;
5558  if ( temp27 != Alen )
5559  {
5560  lua_pushfstring( L, "Tables must be of same length." );
5561  SWIG_fail;
5562  }
5563  }
5564  }
5565  if(lua_gettop(L)>=25){
5566  {
5567  arg28 = (PLINT *) LUA_get_int_num_array_var( L, 25, &temp28 );
5568  if ( !arg28 )
5569  SWIG_fail;
5570  if ( temp28 != Alen )
5571  {
5572  lua_pushfstring( L, "Tables must be of same length." );
5573  SWIG_fail;
5574  }
5575  }
5576  }
5577  if(lua_gettop(L)>=26){
5578  {
5579  arg29 = (PLFLT *) LUA_get_double_num_array_var( L, 26, &temp29 );
5580  if ( !arg29 )
5581  SWIG_fail;
5582  if ( temp29 != Alen )
5583  {
5584  lua_pushfstring( L, "Tables must be of same length." );
5585  SWIG_fail;
5586  }
5587  }
5588  }
5589  if(lua_gettop(L)>=27){
5590  {
5591  arg30 = (PLINT *) LUA_get_int_num_array_var( L, 27, &temp30 );
5592  if ( !arg30 )
5593  SWIG_fail;
5594  if ( temp30 != Alen )
5595  {
5596  lua_pushfstring( L, "Tables must be of same length." );
5597  SWIG_fail;
5598  }
5599  }
5600  }
5601  if(lua_gettop(L)>=28){
5602  {
5603  int i;
5604  arg31 = NULL;
5605 
5606  if ( SWIG_table_size( L, 28 ) != Alen )
5607  {
5608  lua_pushfstring( L, "Tables must be of same length." );
5609  SWIG_fail;
5610  }
5611  arg31 = malloc( sizeof ( char* ) * Alen );
5612  for ( i = 1; i <= Alen; i++ )
5613  {
5614  lua_rawgeti( L, 28, i );
5615  if ( lua_isstring( L, -1 ) )
5616  {
5617  arg31[i - 1] = (char *) lua_tostring( L, -1 );
5618  }
5619  else
5620  {
5621  lua_pop( L, 1 );
5622  lua_pushfstring( L, "Requires a sequence of strings." );
5623  SWIG_fail;
5624  // arg31 array is freed after 'fail:'
5625  }
5626  lua_pop( L, 1 );
5627  }
5628  }
5629  }
5630  pllegend(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,(int const *)arg14,arg15,arg16,arg17,arg18,(int const *)arg19,(char const **)arg20,(int const *)arg21,(int const *)arg22,(double const *)arg23,(double const *)arg24,(int const *)arg25,(int const *)arg26,(double const *)arg27,(int const *)arg28,(double const *)arg29,(int const *)arg30,(char const **)arg31);
5631 
5632  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5633  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5634  {
5635  LUA_FREE_ARRAY( arg14 );
5636  }
5637  {
5638  LUA_FREE_ARRAY( arg19 );
5639  }
5640  {
5641  if ( arg20 )
5642  {
5643  free( arg20 ); arg20 = NULL;
5644  }
5645  }
5646  {
5647  LUA_FREE_ARRAY( arg21 );
5648  }
5649  {
5650  LUA_FREE_ARRAY( arg22 );
5651  }
5652  {
5653  LUA_FREE_ARRAY( arg23 );
5654  }
5655  {
5656  LUA_FREE_ARRAY( arg24 );
5657  }
5658  {
5659  LUA_FREE_ARRAY( arg25 );
5660  }
5661  {
5662  LUA_FREE_ARRAY( arg26 );
5663  }
5664  {
5665  LUA_FREE_ARRAY( arg27 );
5666  }
5667  {
5668  LUA_FREE_ARRAY( arg28 );
5669  }
5670  {
5671  LUA_FREE_ARRAY( arg29 );
5672  }
5673  {
5674  LUA_FREE_ARRAY( arg30 );
5675  }
5676  {
5677  if ( arg31 )
5678  {
5679  free( arg31 ); arg31 = NULL;
5680  }
5681  }
5682  return SWIG_arg;
5683 
5684  if(0) SWIG_fail;
5685 
5686 fail:
5687  {
5688  LUA_FREE_ARRAY( arg14 );
5689  }
5690  {
5691  LUA_FREE_ARRAY( arg19 );
5692  }
5693  {
5694  if ( arg20 )
5695  {
5696  free( arg20 ); arg20 = NULL;
5697  }
5698  }
5699  {
5700  LUA_FREE_ARRAY( arg21 );
5701  }
5702  {
5703  LUA_FREE_ARRAY( arg22 );
5704  }
5705  {
5706  LUA_FREE_ARRAY( arg23 );
5707  }
5708  {
5709  LUA_FREE_ARRAY( arg24 );
5710  }
5711  {
5712  LUA_FREE_ARRAY( arg25 );
5713  }
5714  {
5715  LUA_FREE_ARRAY( arg26 );
5716  }
5717  {
5718  LUA_FREE_ARRAY( arg27 );
5719  }
5720  {
5721  LUA_FREE_ARRAY( arg28 );
5722  }
5723  {
5724  LUA_FREE_ARRAY( arg29 );
5725  }
5726  {
5727  LUA_FREE_ARRAY( arg30 );
5728  }
5729  {
5730  if ( arg31 )
5731  {
5732  free( arg31 ); arg31 = NULL;
5733  }
5734  }
5735  lua_error(L);
5736  return SWIG_arg;
5737 }
5738 
5739 
5740 static int _wrap_colorbar(lua_State* L) {
5741  int SWIG_arg = 0;
5742  PLFLT *arg1 = (PLFLT *) 0 ;
5743  PLFLT *arg2 = (PLFLT *) 0 ;
5744  PLINT arg3 ;
5745  PLINT arg4 ;
5746  PLFLT arg5 ;
5747  PLFLT arg6 ;
5748  PLFLT arg7 ;
5749  PLFLT arg8 ;
5750  PLINT arg9 ;
5751  PLINT arg10 ;
5752  PLINT arg11 ;
5753  PLFLT arg12 ;
5754  PLFLT arg13 ;
5755  PLINT arg14 ;
5756  PLFLT arg15 ;
5757  PLINT arg16 ;
5758  PLINT *arg17 = (PLINT *) 0 ;
5759  char **arg18 = (char **) 0 ;
5760  PLINT arg19 ;
5761  char **arg20 = (char **) 0 ;
5762  PLFLT *arg21 = (PLFLT *) 0 ;
5763  PLINT *arg22 = (PLINT *) 0 ;
5764  PLINT *arg23 = (PLINT *) 0 ;
5765  PLFLT **arg24 = (PLFLT **) 0 ;
5766  PLFLT temp1 ;
5767  PLFLT temp2 ;
5768  int temp21 ;
5769  int temp22 ;
5770  int temp23 ;
5771  int ii24 ;
5772 
5773  arg1 = &temp1;
5774  arg2 = &temp2;
5775  SWIG_check_num_args("plcolorbar",20,20)
5776  if(!lua_isnumber(L,1)) SWIG_fail_arg("plcolorbar",1,"PLINT");
5777  if(!lua_isnumber(L,2)) SWIG_fail_arg("plcolorbar",2,"PLINT");
5778  if(!lua_isnumber(L,3)) SWIG_fail_arg("plcolorbar",3,"PLFLT");
5779  if(!lua_isnumber(L,4)) SWIG_fail_arg("plcolorbar",4,"PLFLT");
5780  if(!lua_isnumber(L,5)) SWIG_fail_arg("plcolorbar",5,"PLFLT");
5781  if(!lua_isnumber(L,6)) SWIG_fail_arg("plcolorbar",6,"PLFLT");
5782  if(!lua_isnumber(L,7)) SWIG_fail_arg("plcolorbar",7,"PLINT");
5783  if(!lua_isnumber(L,8)) SWIG_fail_arg("plcolorbar",8,"PLINT");
5784  if(!lua_isnumber(L,9)) SWIG_fail_arg("plcolorbar",9,"PLINT");
5785  if(!lua_isnumber(L,10)) SWIG_fail_arg("plcolorbar",10,"PLFLT");
5786  if(!lua_isnumber(L,11)) SWIG_fail_arg("plcolorbar",11,"PLFLT");
5787  if(!lua_isnumber(L,12)) SWIG_fail_arg("plcolorbar",12,"PLINT");
5788  if(!lua_isnumber(L,13)) SWIG_fail_arg("plcolorbar",13,"PLFLT");
5789  if(!lua_istable(L,15)) SWIG_fail_arg("plcolorbar",15,"char const **");
5790  arg3 = (PLINT)lua_tonumber(L, 1);
5791  arg4 = (PLINT)lua_tonumber(L, 2);
5792  arg5 = (PLFLT)lua_tonumber(L, 3);
5793  arg6 = (PLFLT)lua_tonumber(L, 4);
5794  arg7 = (PLFLT)lua_tonumber(L, 5);
5795  arg8 = (PLFLT)lua_tonumber(L, 6);
5796  arg9 = (PLINT)lua_tonumber(L, 7);
5797  arg10 = (PLINT)lua_tonumber(L, 8);
5798  arg11 = (PLINT)lua_tonumber(L, 9);
5799  arg12 = (PLFLT)lua_tonumber(L, 10);
5800  arg13 = (PLFLT)lua_tonumber(L, 11);
5801  arg14 = (PLINT)lua_tonumber(L, 12);
5802  arg15 = (PLFLT)lua_tonumber(L, 13);
5803  {
5804  arg17 = (PLINT *) LUA_get_int_num_array_var( L, 14, &arg16 );
5805  if ( !arg17 )
5806  SWIG_fail;
5807  Alen = arg16;
5808  }
5809  {
5810  int i;
5811  arg18 = NULL;
5812 
5813  if ( SWIG_table_size( L, 15 ) != Alen )
5814  {
5815  lua_pushfstring( L, "Tables must be of same length." );
5816  SWIG_fail;
5817  }
5818  arg18 = malloc( sizeof ( char* ) * Alen );
5819  for ( i = 1; i <= Alen; i++ )
5820  {
5821  lua_rawgeti( L, 15, i );
5822  if ( lua_isstring( L, -1 ) )
5823  {
5824  arg18[i - 1] = (char *) lua_tostring( L, -1 );
5825  }
5826  else
5827  {
5828  lua_pop( L, 1 );
5829  lua_pushfstring( L, "Requires a sequence of strings." );
5830  SWIG_fail;
5831  // arg18 array is freed after 'fail:'
5832  }
5833  lua_pop( L, 1 );
5834  }
5835  }
5836  {
5837  int i;
5838  arg19 = SWIG_table_size( L, 16 );
5839  Alen = arg19;
5840 
5841  arg20 = malloc( sizeof ( char* ) * Alen );
5842  for ( i = 1; i <= Alen; i++ )
5843  {
5844  lua_rawgeti( L, 16, i );
5845  if ( lua_isstring( L, -1 ) )
5846  {
5847  arg20[i - 1] = (char *) lua_tostring( L, -1 );
5848  }
5849  else
5850  {
5851  lua_pop( L, 1 );
5852  lua_pushfstring( L, "Requires a sequence of strings." );
5853  SWIG_fail;
5854  }
5855  lua_pop( L, 1 );
5856  }
5857  }
5858  {
5859  arg21 = (PLFLT *) LUA_get_double_num_array_var( L, 17, &temp21 );
5860  if ( !arg21 )
5861  SWIG_fail;
5862  if ( temp21 != Alen )
5863  {
5864  lua_pushfstring( L, "Tables must be of same length." );
5865  SWIG_fail;
5866  }
5867  }
5868  {
5869  arg22 = (PLINT *) LUA_get_int_num_array_var( L, 18, &temp22 );
5870  if ( !arg22 )
5871  SWIG_fail;
5872  if ( temp22 != Alen )
5873  {
5874  lua_pushfstring( L, "Tables must be of same length." );
5875  SWIG_fail;
5876  }
5877  }
5878  {
5879  int i;
5880 
5881  arg23 = (PLINT *) LUA_get_int_num_array_var( L, 19, &temp23 );
5882  if ( !arg23 )
5883  SWIG_fail;
5884  if ( temp23 != Alen )
5885  {
5886  lua_pushfstring( L, "Tables must be of same length." );
5887  SWIG_fail;
5888  }
5889 
5890  Xlen = temp23;
5891  Ylen = -1;
5892  for ( i = 0; i < Xlen; i++ )
5893  if ( arg23[i] > Ylen )
5894  Ylen = arg23[i];
5895  }
5896  {
5897  int jj;
5898 
5899  arg24 = read_double_Matrix( L, 20, &ii24, &jj );
5900  if ( !arg24 )
5901  SWIG_fail;
5902  if ( ( ii24 != Xlen ) || ( jj != Ylen ) )
5903  {
5904  lua_pushfstring( L, "Vectors must match matrix." );
5905  SWIG_fail;
5906  }
5907  }
5908  plcolorbar(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,(int const *)arg17,(char const **)arg18,arg19,(char const **)arg20,(double const *)arg21,(int const *)arg22,(int const *)arg23,(double const **)arg24);
5909 
5910  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5911  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5912  {
5913  LUA_FREE_ARRAY( arg17 );
5914  }
5915  {
5916  if ( arg18 )
5917  {
5918  free( arg18 ); arg18 = NULL;
5919  }
5920  }
5921  {
5922  if ( arg20 )
5923  {
5924  free( arg20 ); arg20 = NULL;
5925  }
5926  }
5927  {
5928  LUA_FREE_ARRAY( arg21 );
5929  }
5930  {
5931  LUA_FREE_ARRAY( arg22 );
5932  }
5933  {
5934  LUA_FREE_ARRAY( arg23 );
5935  }
5936  {
5937  int i;
5938 
5939  if ( arg24 )
5940  {
5941  for ( i = 0; i < ii24; i++ )
5942  LUA_FREE_ARRAY( arg24[i] );
5943  LUA_FREE_ARRAY( arg24 );
5944  }
5945  }
5946  return SWIG_arg;
5947 
5948  if(0) SWIG_fail;
5949 
5950 fail:
5951  {
5952  LUA_FREE_ARRAY( arg17 );
5953  }
5954  {
5955  if ( arg18 )
5956  {
5957  free( arg18 ); arg18 = NULL;
5958  }
5959  }
5960  {
5961  if ( arg20 )
5962  {
5963  free( arg20 ); arg20 = NULL;
5964  }
5965  }
5966  {
5967  LUA_FREE_ARRAY( arg21 );
5968  }
5969  {
5970  LUA_FREE_ARRAY( arg22 );
5971  }
5972  {
5973  LUA_FREE_ARRAY( arg23 );
5974  }
5975  {
5976  int i;
5977 
5978  if ( arg24 )
5979  {
5980  for ( i = 0; i < ii24; i++ )
5981  LUA_FREE_ARRAY( arg24[i] );
5982  LUA_FREE_ARRAY( arg24 );
5983  }
5984  }
5985  lua_error(L);
5986  return SWIG_arg;
5987 }
5988 
5989 
5990 static int _wrap_lightsource(lua_State* L) {
5991  int SWIG_arg = 0;
5992  PLFLT arg1 ;
5993  PLFLT arg2 ;
5994  PLFLT arg3 ;
5995 
5996  SWIG_check_num_args("pllightsource",3,3)
5997  if(!lua_isnumber(L,1)) SWIG_fail_arg("pllightsource",1,"PLFLT");
5998  if(!lua_isnumber(L,2)) SWIG_fail_arg("pllightsource",2,"PLFLT");
5999  if(!lua_isnumber(L,3)) SWIG_fail_arg("pllightsource",3,"PLFLT");
6000  arg1 = (PLFLT)lua_tonumber(L, 1);
6001  arg2 = (PLFLT)lua_tonumber(L, 2);
6002  arg3 = (PLFLT)lua_tonumber(L, 3);
6003  pllightsource(arg1,arg2,arg3);
6004 
6005  return SWIG_arg;
6006 
6007  if(0) SWIG_fail;
6008 
6009 fail:
6010  lua_error(L);
6011  return SWIG_arg;
6012 }
6013 
6014 
6015 static int _wrap_line(lua_State* L) {
6016  int SWIG_arg = 0;
6017  PLINT arg1 ;
6018  PLFLT *arg2 = (PLFLT *) 0 ;
6019  PLFLT *arg3 = (PLFLT *) 0 ;
6020  int temp3 ;
6021 
6022  SWIG_check_num_args("plline",2,2)
6023  {
6024  int temp;
6025  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6026  if ( !arg2 )
6027  SWIG_fail;
6028  arg1 = Alen = temp;
6029  }
6030  {
6031  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
6032  if ( !arg3 )
6033  SWIG_fail;
6034  if ( temp3 != Alen )
6035  {
6036  lua_pushfstring( L, "Tables must be of same length." );
6037  SWIG_fail;
6038  }
6039  }
6040  plline(arg1,(double const *)arg2,(double const *)arg3);
6041 
6042  {
6043  LUA_FREE_ARRAY( arg2 );
6044  }
6045  {
6046  LUA_FREE_ARRAY( arg3 );
6047  }
6048  return SWIG_arg;
6049 
6050  if(0) SWIG_fail;
6051 
6052 fail:
6053  {
6054  LUA_FREE_ARRAY( arg2 );
6055  }
6056  {
6057  LUA_FREE_ARRAY( arg3 );
6058  }
6059  lua_error(L);
6060  return SWIG_arg;
6061 }
6062 
6063 
6064 static int _wrap_line3(lua_State* L) {
6065  int SWIG_arg = 0;
6066  PLINT arg1 ;
6067  PLFLT *arg2 = (PLFLT *) 0 ;
6068  PLFLT *arg3 = (PLFLT *) 0 ;
6069  PLFLT *arg4 = (PLFLT *) 0 ;
6070  int temp3 ;
6071  int temp4 ;
6072 
6073  SWIG_check_num_args("plline3",3,3)
6074  {
6075  int temp;
6076  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6077  if ( !arg2 )
6078  SWIG_fail;
6079  arg1 = Alen = temp;
6080  }
6081  {
6082  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
6083  if ( !arg3 )
6084  SWIG_fail;
6085  if ( temp3 != Alen )
6086  {
6087  lua_pushfstring( L, "Tables must be of same length." );
6088  SWIG_fail;
6089  }
6090  }
6091  {
6092  arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
6093  if ( !arg4 )
6094  SWIG_fail;
6095  if ( temp4 != Alen )
6096  {
6097  lua_pushfstring( L, "Tables must be of same length." );
6098  SWIG_fail;
6099  }
6100  }
6101  plline3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
6102 
6103  {
6104  LUA_FREE_ARRAY( arg2 );
6105  }
6106  {
6107  LUA_FREE_ARRAY( arg3 );
6108  }
6109  {
6110  LUA_FREE_ARRAY( arg4 );
6111  }
6112  return SWIG_arg;
6113 
6114  if(0) SWIG_fail;
6115 
6116 fail:
6117  {
6118  LUA_FREE_ARRAY( arg2 );
6119  }
6120  {
6121  LUA_FREE_ARRAY( arg3 );
6122  }
6123  {
6124  LUA_FREE_ARRAY( arg4 );
6125  }
6126  lua_error(L);
6127  return SWIG_arg;
6128 }
6129 
6130 
6131 static int _wrap_lsty(lua_State* L) {
6132  int SWIG_arg = 0;
6133  PLINT arg1 ;
6134 
6135  SWIG_check_num_args("pllsty",1,1)
6136  if(!lua_isnumber(L,1)) SWIG_fail_arg("pllsty",1,"PLINT");
6137  arg1 = (PLINT)lua_tonumber(L, 1);
6138  pllsty(arg1);
6139 
6140  return SWIG_arg;
6141 
6142  if(0) SWIG_fail;
6143 
6144 fail:
6145  lua_error(L);
6146  return SWIG_arg;
6147 }
6148 
6149 
6150 static int _wrap_mesh(lua_State* L) {
6151  int SWIG_arg = 0;
6152  PLFLT *arg1 = (PLFLT *) 0 ;
6153  PLFLT *arg2 = (PLFLT *) 0 ;
6154  PLFLT **arg3 = (PLFLT **) 0 ;
6155  PLINT arg4 ;
6156  PLINT arg5 ;
6157  PLINT arg6 ;
6158  int ii3 ;
6159 
6160  SWIG_check_num_args("plmesh",4,4)
6161  if(!lua_isnumber(L,4)) SWIG_fail_arg("plmesh",4,"PLINT");
6162  {
6163  int temp;
6164  arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6165  if ( !arg1 )
6166  SWIG_fail;
6167  Xlen = temp;
6168  }
6169  {
6170  int temp;
6171  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6172  if ( !arg2 )
6173  SWIG_fail;
6174  Ylen = temp;
6175  }
6176  {
6177  int jj;
6178 
6179  arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6180  if ( !arg3 )
6181  SWIG_fail;
6182  arg4 = ii3;
6183  arg5 = jj;
6184  if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6185  {
6186  lua_pushfstring( L, "Vectors must match matrix." );
6187  SWIG_fail;
6188  }
6189  }
6190  arg6 = (PLINT)lua_tonumber(L, 4);
6191  plmesh((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6);
6192 
6193  {
6194  LUA_FREE_ARRAY( arg1 );
6195  }
6196  {
6197  LUA_FREE_ARRAY( arg2 );
6198  }
6199  {
6200  int i;
6201 
6202  if ( arg3 )
6203  {
6204  for ( i = 0; i < ii3; i++ )
6205  LUA_FREE_ARRAY( arg3[i] );
6206  LUA_FREE_ARRAY( arg3 );
6207  }
6208  }
6209  return SWIG_arg;
6210 
6211  if(0) SWIG_fail;
6212 
6213 fail:
6214  {
6215  LUA_FREE_ARRAY( arg1 );
6216  }
6217  {
6218  LUA_FREE_ARRAY( arg2 );
6219  }
6220  {
6221  int i;
6222 
6223  if ( arg3 )
6224  {
6225  for ( i = 0; i < ii3; i++ )
6226  LUA_FREE_ARRAY( arg3[i] );
6227  LUA_FREE_ARRAY( arg3 );
6228  }
6229  }
6230  lua_error(L);
6231  return SWIG_arg;
6232 }
6233 
6234 
6235 static int _wrap_meshc(lua_State* L) {
6236  int SWIG_arg = 0;
6237  PLFLT *arg1 = (PLFLT *) 0 ;
6238  PLFLT *arg2 = (PLFLT *) 0 ;
6239  PLFLT **arg3 = (PLFLT **) 0 ;
6240  PLINT arg4 ;
6241  PLINT arg5 ;
6242  PLINT arg6 ;
6243  PLFLT *arg7 = (PLFLT *) 0 ;
6244  PLINT arg8 ;
6245  int ii3 ;
6246 
6247  SWIG_check_num_args("plmeshc",5,5)
6248  if(!lua_isnumber(L,4)) SWIG_fail_arg("plmeshc",4,"PLINT");
6249  {
6250  int temp;
6251  arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6252  if ( !arg1 )
6253  SWIG_fail;
6254  Xlen = temp;
6255  }
6256  {
6257  int temp;
6258  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6259  if ( !arg2 )
6260  SWIG_fail;
6261  Ylen = temp;
6262  }
6263  {
6264  int jj;
6265 
6266  arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6267  if ( !arg3 )
6268  SWIG_fail;
6269  arg4 = ii3;
6270  arg5 = jj;
6271  if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6272  {
6273  lua_pushfstring( L, "Vectors must match matrix." );
6274  SWIG_fail;
6275  }
6276  }
6277  arg6 = (PLINT)lua_tonumber(L, 4);
6278  {
6279  int temp;
6280  arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
6281  if ( !arg7 )
6282  SWIG_fail;
6283  arg8 = Alen = temp;
6284  }
6285  plmeshc((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
6286 
6287  {
6288  LUA_FREE_ARRAY( arg1 );
6289  }
6290  {
6291  LUA_FREE_ARRAY( arg2 );
6292  }
6293  {
6294  int i;
6295 
6296  if ( arg3 )
6297  {
6298  for ( i = 0; i < ii3; i++ )
6299  LUA_FREE_ARRAY( arg3[i] );
6300  LUA_FREE_ARRAY( arg3 );
6301  }
6302  }
6303  {
6304  LUA_FREE_ARRAY( arg7 );
6305  }
6306  return SWIG_arg;
6307 
6308  if(0) SWIG_fail;
6309 
6310 fail:
6311  {
6312  LUA_FREE_ARRAY( arg1 );
6313  }
6314  {
6315  LUA_FREE_ARRAY( arg2 );
6316  }
6317  {
6318  int i;
6319 
6320  if ( arg3 )
6321  {
6322  for ( i = 0; i < ii3; i++ )
6323  LUA_FREE_ARRAY( arg3[i] );
6324  LUA_FREE_ARRAY( arg3 );
6325  }
6326  }
6327  {
6328  LUA_FREE_ARRAY( arg7 );
6329  }
6330  lua_error(L);
6331  return SWIG_arg;
6332 }
6333 
6334 
6335 static int _wrap_mkstrm(lua_State* L) {
6336  int SWIG_arg = 0;
6337  PLINT *arg1 = (PLINT *) 0 ;
6338  PLINT temp1 ;
6339 
6340  arg1 = &temp1;
6341  SWIG_check_num_args("plmkstrm",0,0)
6342  plmkstrm(arg1);
6343 
6344  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6345  return SWIG_arg;
6346 
6347  if(0) SWIG_fail;
6348 
6349 fail:
6350  lua_error(L);
6351  return SWIG_arg;
6352 }
6353 
6354 
6355 static int _wrap_mtex(lua_State* L) {
6356  int SWIG_arg = 0;
6357  char *arg1 = (char *) 0 ;
6358  PLFLT arg2 ;
6359  PLFLT arg3 ;
6360  PLFLT arg4 ;
6361  char *arg5 = (char *) 0 ;
6362 
6363  SWIG_check_num_args("plmtex",5,5)
6364  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plmtex",1,"char const *");
6365  if(!lua_isnumber(L,2)) SWIG_fail_arg("plmtex",2,"PLFLT");
6366  if(!lua_isnumber(L,3)) SWIG_fail_arg("plmtex",3,"PLFLT");
6367  if(!lua_isnumber(L,4)) SWIG_fail_arg("plmtex",4,"PLFLT");
6368  if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plmtex",5,"char const *");
6369  arg1 = (char *)lua_tostring(L, 1);
6370  arg2 = (PLFLT)lua_tonumber(L, 2);
6371  arg3 = (PLFLT)lua_tonumber(L, 3);
6372  arg4 = (PLFLT)lua_tonumber(L, 4);
6373  arg5 = (char *)lua_tostring(L, 5);
6374  plmtex((char const *)arg1,arg2,arg3,arg4,(char const *)arg5);
6375 
6376  return SWIG_arg;
6377 
6378  if(0) SWIG_fail;
6379 
6380 fail:
6381  lua_error(L);
6382  return SWIG_arg;
6383 }
6384 
6385 
6386 static int _wrap_mtex3(lua_State* L) {
6387  int SWIG_arg = 0;
6388  char *arg1 = (char *) 0 ;
6389  PLFLT arg2 ;
6390  PLFLT arg3 ;
6391  PLFLT arg4 ;
6392  char *arg5 = (char *) 0 ;
6393 
6394  SWIG_check_num_args("plmtex3",5,5)
6395  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plmtex3",1,"char const *");
6396  if(!lua_isnumber(L,2)) SWIG_fail_arg("plmtex3",2,"PLFLT");
6397  if(!lua_isnumber(L,3)) SWIG_fail_arg("plmtex3",3,"PLFLT");
6398  if(!lua_isnumber(L,4)) SWIG_fail_arg("plmtex3",4,"PLFLT");
6399  if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plmtex3",5,"char const *");
6400  arg1 = (char *)lua_tostring(L, 1);
6401  arg2 = (PLFLT)lua_tonumber(L, 2);
6402  arg3 = (PLFLT)lua_tonumber(L, 3);
6403  arg4 = (PLFLT)lua_tonumber(L, 4);
6404  arg5 = (char *)lua_tostring(L, 5);
6405  plmtex3((char const *)arg1,arg2,arg3,arg4,(char const *)arg5);
6406 
6407  return SWIG_arg;
6408 
6409  if(0) SWIG_fail;
6410 
6411 fail:
6412  lua_error(L);
6413  return SWIG_arg;
6414 }
6415 
6416 
6417 static int _wrap_plot3d(lua_State* L) {
6418  int SWIG_arg = 0;
6419  PLFLT *arg1 = (PLFLT *) 0 ;
6420  PLFLT *arg2 = (PLFLT *) 0 ;
6421  PLFLT **arg3 = (PLFLT **) 0 ;
6422  PLINT arg4 ;
6423  PLINT arg5 ;
6424  PLINT arg6 ;
6425  PLBOOL arg7 ;
6426  int ii3 ;
6427 
6428  SWIG_check_num_args("plot3d",5,5)
6429  if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3d",4,"PLINT");
6430  if(!lua_isnumber(L,5)) SWIG_fail_arg("plot3d",5,"PLBOOL");
6431  {
6432  int temp;
6433  arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6434  if ( !arg1 )
6435  SWIG_fail;
6436  Xlen = temp;
6437  }
6438  {
6439  int temp;
6440  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6441  if ( !arg2 )
6442  SWIG_fail;
6443  Ylen = temp;
6444  }
6445  {
6446  int jj;
6447 
6448  arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6449  if ( !arg3 )
6450  SWIG_fail;
6451  arg4 = ii3;
6452  arg5 = jj;
6453  if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6454  {
6455  lua_pushfstring( L, "Vectors must match matrix." );
6456  SWIG_fail;
6457  }
6458  }
6459  arg6 = (PLINT)lua_tonumber(L, 4);
6460  arg7 = (PLBOOL)lua_tonumber(L, 5);
6461  plot3d((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,arg7);
6462 
6463  {
6464  LUA_FREE_ARRAY( arg1 );
6465  }
6466  {
6467  LUA_FREE_ARRAY( arg2 );
6468  }
6469  {
6470  int i;
6471 
6472  if ( arg3 )
6473  {
6474  for ( i = 0; i < ii3; i++ )
6475  LUA_FREE_ARRAY( arg3[i] );
6476  LUA_FREE_ARRAY( arg3 );
6477  }
6478  }
6479  return SWIG_arg;
6480 
6481  if(0) SWIG_fail;
6482 
6483 fail:
6484  {
6485  LUA_FREE_ARRAY( arg1 );
6486  }
6487  {
6488  LUA_FREE_ARRAY( arg2 );
6489  }
6490  {
6491  int i;
6492 
6493  if ( arg3 )
6494  {
6495  for ( i = 0; i < ii3; i++ )
6496  LUA_FREE_ARRAY( arg3[i] );
6497  LUA_FREE_ARRAY( arg3 );
6498  }
6499  }
6500  lua_error(L);
6501  return SWIG_arg;
6502 }
6503 
6504 
6505 static int _wrap_plot3dc(lua_State* L) {
6506  int SWIG_arg = 0;
6507  PLFLT *arg1 = (PLFLT *) 0 ;
6508  PLFLT *arg2 = (PLFLT *) 0 ;
6509  PLFLT **arg3 = (PLFLT **) 0 ;
6510  PLINT arg4 ;
6511  PLINT arg5 ;
6512  PLINT arg6 ;
6513  PLFLT *arg7 = (PLFLT *) 0 ;
6514  PLINT arg8 ;
6515  int ii3 ;
6516 
6517  SWIG_check_num_args("plot3dc",5,5)
6518  if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3dc",4,"PLINT");
6519  {
6520  int temp;
6521  arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6522  if ( !arg1 )
6523  SWIG_fail;
6524  Xlen = temp;
6525  }
6526  {
6527  int temp;
6528  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6529  if ( !arg2 )
6530  SWIG_fail;
6531  Ylen = temp;
6532  }
6533  {
6534  int jj;
6535 
6536  arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6537  if ( !arg3 )
6538  SWIG_fail;
6539  arg4 = ii3;
6540  arg5 = jj;
6541  if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6542  {
6543  lua_pushfstring( L, "Vectors must match matrix." );
6544  SWIG_fail;
6545  }
6546  }
6547  arg6 = (PLINT)lua_tonumber(L, 4);
6548  {
6549  int temp;
6550  arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
6551  if ( !arg7 )
6552  SWIG_fail;
6553  arg8 = Alen = temp;
6554  }
6555  plot3dc((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
6556 
6557  {
6558  LUA_FREE_ARRAY( arg1 );
6559  }
6560  {
6561  LUA_FREE_ARRAY( arg2 );
6562  }
6563  {
6564  int i;
6565 
6566  if ( arg3 )
6567  {
6568  for ( i = 0; i < ii3; i++ )
6569  LUA_FREE_ARRAY( arg3[i] );
6570  LUA_FREE_ARRAY( arg3 );
6571  }
6572  }
6573  {
6574  LUA_FREE_ARRAY( arg7 );
6575  }
6576  return SWIG_arg;
6577 
6578  if(0) SWIG_fail;
6579 
6580 fail:
6581  {
6582  LUA_FREE_ARRAY( arg1 );
6583  }
6584  {
6585  LUA_FREE_ARRAY( arg2 );
6586  }
6587  {
6588  int i;
6589 
6590  if ( arg3 )
6591  {
6592  for ( i = 0; i < ii3; i++ )
6593  LUA_FREE_ARRAY( arg3[i] );
6594  LUA_FREE_ARRAY( arg3 );
6595  }
6596  }
6597  {
6598  LUA_FREE_ARRAY( arg7 );
6599  }
6600  lua_error(L);
6601  return SWIG_arg;
6602 }
6603 
6604 
6605 static int _wrap_plot3dcl(lua_State* L) {
6606  int SWIG_arg = 0;
6607  PLFLT *arg1 = (PLFLT *) 0 ;
6608  PLFLT *arg2 = (PLFLT *) 0 ;
6609  PLFLT **arg3 = (PLFLT **) 0 ;
6610  PLINT arg4 ;
6611  PLINT arg5 ;
6612  PLINT arg6 ;
6613  PLFLT *arg7 = (PLFLT *) 0 ;
6614  PLINT arg8 ;
6615  PLINT arg9 ;
6616  PLINT arg10 ;
6617  PLINT *arg11 = (PLINT *) 0 ;
6618  PLINT *arg12 = (PLINT *) 0 ;
6619  int ii3 ;
6620  int temp12 ;
6621 
6622  SWIG_check_num_args("plot3dcl",8,8)
6623  if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3dcl",4,"PLINT");
6624  if(!lua_isnumber(L,6)) SWIG_fail_arg("plot3dcl",6,"PLINT");
6625  {
6626  int temp;
6627  arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6628  if ( !arg1 )
6629  SWIG_fail;
6630  Xlen = temp;
6631  }
6632  {
6633  int temp;
6634  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6635  if ( !arg2 )
6636  SWIG_fail;
6637  Ylen = temp;
6638  }
6639  {
6640  int jj;
6641 
6642  arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6643  if ( !arg3 )
6644  SWIG_fail;
6645  arg4 = ii3;
6646  arg5 = jj;
6647  if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6648  {
6649  lua_pushfstring( L, "Vectors must match matrix." );
6650  SWIG_fail;
6651  }
6652  }
6653  arg6 = (PLINT)lua_tonumber(L, 4);
6654  {
6655  int temp;
6656  arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
6657  if ( !arg7 )
6658  SWIG_fail;
6659  arg8 = Alen = temp;
6660  }
6661  arg9 = (PLINT)lua_tonumber(L, 6);
6662  {
6663  arg11 = (PLINT *) LUA_get_int_num_array_var( L, 7, &arg10 );
6664  if ( !arg11 )
6665  SWIG_fail;
6666  Alen = arg10;
6667  }
6668  {
6669  arg12 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp12 );
6670  if ( !arg12 )
6671  SWIG_fail;
6672  if ( temp12 != Alen )
6673  {
6674  lua_pushfstring( L, "Tables must be of same length." );
6675  SWIG_fail;
6676  }
6677  }
6678  plot3dcl((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8,arg9,arg10,(int const *)arg11,(int const *)arg12);
6679 
6680  {
6681  LUA_FREE_ARRAY( arg1 );
6682  }
6683  {
6684  LUA_FREE_ARRAY( arg2 );
6685  }
6686  {
6687  int i;
6688 
6689  if ( arg3 )
6690  {
6691  for ( i = 0; i < ii3; i++ )
6692  LUA_FREE_ARRAY( arg3[i] );
6693  LUA_FREE_ARRAY( arg3 );
6694  }
6695  }
6696  {
6697  LUA_FREE_ARRAY( arg7 );
6698  }
6699  {
6700  LUA_FREE_ARRAY( arg11 );
6701  }
6702  {
6703  LUA_FREE_ARRAY( arg12 );
6704  }
6705  return SWIG_arg;
6706 
6707  if(0) SWIG_fail;
6708 
6709 fail:
6710  {
6711  LUA_FREE_ARRAY( arg1 );
6712  }
6713  {
6714  LUA_FREE_ARRAY( arg2 );
6715  }
6716  {
6717  int i;
6718 
6719  if ( arg3 )
6720  {
6721  for ( i = 0; i < ii3; i++ )
6722  LUA_FREE_ARRAY( arg3[i] );
6723  LUA_FREE_ARRAY( arg3 );
6724  }
6725  }
6726  {
6727  LUA_FREE_ARRAY( arg7 );
6728  }
6729  {
6730  LUA_FREE_ARRAY( arg11 );
6731  }
6732  {
6733  LUA_FREE_ARRAY( arg12 );
6734  }
6735  lua_error(L);
6736  return SWIG_arg;
6737 }
6738 
6739 
6740 static int _wrap_surf3d(lua_State* L) {
6741  int SWIG_arg = 0;
6742  PLFLT *arg1 = (PLFLT *) 0 ;
6743  PLFLT *arg2 = (PLFLT *) 0 ;
6744  PLFLT **arg3 = (PLFLT **) 0 ;
6745  PLINT arg4 ;
6746  PLINT arg5 ;
6747  PLINT arg6 ;
6748  PLFLT *arg7 = (PLFLT *) 0 ;
6749  PLINT arg8 ;
6750  int ii3 ;
6751 
6752  SWIG_check_num_args("plsurf3d",5,5)
6753  if(!lua_isnumber(L,4)) SWIG_fail_arg("plsurf3d",4,"PLINT");
6754  {
6755  int temp;
6756  arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6757  if ( !arg1 )
6758  SWIG_fail;
6759  Xlen = temp;
6760  }
6761  {
6762  int temp;
6763  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6764  if ( !arg2 )
6765  SWIG_fail;
6766  Ylen = temp;
6767  }
6768  {
6769  int jj;
6770 
6771  arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6772  if ( !arg3 )
6773  SWIG_fail;
6774  arg4 = ii3;
6775  arg5 = jj;
6776  if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6777  {
6778  lua_pushfstring( L, "Vectors must match matrix." );
6779  SWIG_fail;
6780  }
6781  }
6782  arg6 = (PLINT)lua_tonumber(L, 4);
6783  {
6784  int temp;
6785  arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
6786  if ( !arg7 )
6787  SWIG_fail;
6788  arg8 = Alen = temp;
6789  }
6790  plsurf3d((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
6791 
6792  {
6793  LUA_FREE_ARRAY( arg1 );
6794  }
6795  {
6796  LUA_FREE_ARRAY( arg2 );
6797  }
6798  {
6799  int i;
6800 
6801  if ( arg3 )
6802  {
6803  for ( i = 0; i < ii3; i++ )
6804  LUA_FREE_ARRAY( arg3[i] );
6805  LUA_FREE_ARRAY( arg3 );
6806  }
6807  }
6808  {
6809  LUA_FREE_ARRAY( arg7 );
6810  }
6811  return SWIG_arg;
6812 
6813  if(0) SWIG_fail;
6814 
6815 fail:
6816  {
6817  LUA_FREE_ARRAY( arg1 );
6818  }
6819  {
6820  LUA_FREE_ARRAY( arg2 );
6821  }
6822  {
6823  int i;
6824 
6825  if ( arg3 )
6826  {
6827  for ( i = 0; i < ii3; i++ )
6828  LUA_FREE_ARRAY( arg3[i] );
6829  LUA_FREE_ARRAY( arg3 );
6830  }
6831  }
6832  {
6833  LUA_FREE_ARRAY( arg7 );
6834  }
6835  lua_error(L);
6836  return SWIG_arg;
6837 }
6838 
6839 
6840 static int _wrap_surf3dl(lua_State* L) {
6841  int SWIG_arg = 0;
6842  PLFLT *arg1 = (PLFLT *) 0 ;
6843  PLFLT *arg2 = (PLFLT *) 0 ;
6844  PLFLT **arg3 = (PLFLT **) 0 ;
6845  PLINT arg4 ;
6846  PLINT arg5 ;
6847  PLINT arg6 ;
6848  PLFLT *arg7 = (PLFLT *) 0 ;
6849  PLINT arg8 ;
6850  PLINT arg9 ;
6851  PLINT arg10 ;
6852  PLINT *arg11 = (PLINT *) 0 ;
6853  PLINT *arg12 = (PLINT *) 0 ;
6854  int ii3 ;
6855  int temp12 ;
6856 
6857  SWIG_check_num_args("plsurf3dl",8,8)
6858  if(!lua_isnumber(L,4)) SWIG_fail_arg("plsurf3dl",4,"PLINT");
6859  if(!lua_isnumber(L,6)) SWIG_fail_arg("plsurf3dl",6,"PLINT");
6860  {
6861  int temp;
6862  arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6863  if ( !arg1 )
6864  SWIG_fail;
6865  Xlen = temp;
6866  }
6867  {
6868  int temp;
6869  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6870  if ( !arg2 )
6871  SWIG_fail;
6872  Ylen = temp;
6873  }
6874  {
6875  int jj;
6876 
6877  arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6878  if ( !arg3 )
6879  SWIG_fail;
6880  arg4 = ii3;
6881  arg5 = jj;
6882  if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6883  {
6884  lua_pushfstring( L, "Vectors must match matrix." );
6885  SWIG_fail;
6886  }
6887  }
6888  arg6 = (PLINT)lua_tonumber(L, 4);
6889  {
6890  int temp;
6891  arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
6892  if ( !arg7 )
6893  SWIG_fail;
6894  arg8 = Alen = temp;
6895  }
6896  arg9 = (PLINT)lua_tonumber(L, 6);
6897  {
6898  arg11 = (PLINT *) LUA_get_int_num_array_var( L, 7, &arg10 );
6899  if ( !arg11 )
6900  SWIG_fail;
6901  Alen = arg10;
6902  }
6903  {
6904  arg12 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp12 );
6905  if ( !arg12 )
6906  SWIG_fail;
6907  if ( temp12 != Alen )
6908  {
6909  lua_pushfstring( L, "Tables must be of same length." );
6910  SWIG_fail;
6911  }
6912  }
6913  plsurf3dl((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8,arg9,arg10,(int const *)arg11,(int const *)arg12);
6914 
6915  {
6916  LUA_FREE_ARRAY( arg1 );
6917  }
6918  {
6919  LUA_FREE_ARRAY( arg2 );
6920  }
6921  {
6922  int i;
6923 
6924  if ( arg3 )
6925  {
6926  for ( i = 0; i < ii3; i++ )
6927  LUA_FREE_ARRAY( arg3[i] );
6928  LUA_FREE_ARRAY( arg3 );
6929  }
6930  }
6931  {
6932  LUA_FREE_ARRAY( arg7 );
6933  }
6934  {
6935  LUA_FREE_ARRAY( arg11 );
6936  }
6937  {
6938  LUA_FREE_ARRAY( arg12 );
6939  }
6940  return SWIG_arg;
6941 
6942  if(0) SWIG_fail;
6943 
6944 fail:
6945  {
6946  LUA_FREE_ARRAY( arg1 );
6947  }
6948  {
6949  LUA_FREE_ARRAY( arg2 );
6950  }
6951  {
6952  int i;
6953 
6954  if ( arg3 )
6955  {
6956  for ( i = 0; i < ii3; i++ )
6957  LUA_FREE_ARRAY( arg3[i] );
6958  LUA_FREE_ARRAY( arg3 );
6959  }
6960  }
6961  {
6962  LUA_FREE_ARRAY( arg7 );
6963  }
6964  {
6965  LUA_FREE_ARRAY( arg11 );
6966  }
6967  {
6968  LUA_FREE_ARRAY( arg12 );
6969  }
6970  lua_error(L);
6971  return SWIG_arg;
6972 }
6973 
6974 
6975 static int _wrap_parseopts(lua_State* L) {
6976  int SWIG_arg = 0;
6977  int *arg1 = (int *) 0 ;
6978  char **arg2 = (char **) 0 ;
6979  PLINT arg3 ;
6980  PLINT result;
6981 
6982  SWIG_check_num_args("plparseopts",2,2)
6983  if(!lua_istable(L,1)) SWIG_fail_arg("plparseopts",1,"int *");
6984  if(!lua_isnumber(L,2)) SWIG_fail_arg("plparseopts",2,"PLINT");
6985  {
6986  int i, n;
6987 
6988  // from lua 5.1 on there is no element "n" anymore,
6989  // so we need to find out the number of command line
6990  // options manually
6991  for ( i = 1;; i++ )
6992  {
6993  lua_rawgeti( L, 1, i );
6994  if ( lua_isnil( L, -1 ) )
6995  {
6996  // ok, this index doesn't exist anymore, we have i-1
6997  // command line options
6998  lua_pop( L, 1 );
6999  break;
7000  }
7001  }
7002  n = i;
7003  arg1 = &n;
7004 
7005  arg2 = LUA_ALLOC_ARRAY( char*, ( n + 1 ) );
7006 
7007  for ( i = 0; i < n; i++ )
7008  {
7009  lua_rawgeti( L, 1, i );
7010  if ( lua_isstring( L, -1 ) )
7011  {
7012  arg2[i] = (char *) lua_tostring( L, -1 );
7013  }
7014  else
7015  {
7016  lua_pop( L, 1 );
7017  lua_pushfstring( L, "List items must be strings" );
7018  SWIG_fail;
7019  // arg2 array is freed after 'fail:'
7020  }
7021  lua_pop( L, 1 );
7022  }
7023  arg2[n] = NULL;
7024  }
7025  arg3 = (PLINT)lua_tonumber(L, 2);
7026  result = (PLINT)plparseopts(arg1,(char const **)arg2,arg3);
7027  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
7028  {
7029  LUA_FREE_ARRAY( arg2 );
7030  }
7031  return SWIG_arg;
7032 
7033  if(0) SWIG_fail;
7034 
7035 fail:
7036  {
7037  LUA_FREE_ARRAY( arg2 );
7038  }
7039  lua_error(L);
7040  return SWIG_arg;
7041 }
7042 
7043 
7044 static int _wrap_pat(lua_State* L) {
7045  int SWIG_arg = 0;
7046  PLINT arg1 ;
7047  PLINT *arg2 = (PLINT *) 0 ;
7048  PLINT *arg3 = (PLINT *) 0 ;
7049  int temp3 ;
7050 
7051  SWIG_check_num_args("plpat",2,2)
7052  {
7053  arg2 = (PLINT *) LUA_get_int_num_array_var( L, 1, &arg1 );
7054  if ( !arg2 )
7055  SWIG_fail;
7056  Alen = arg1;
7057  }
7058  {
7059  arg3 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp3 );
7060  if ( !arg3 )
7061  SWIG_fail;
7062  if ( temp3 != Alen )
7063  {
7064  lua_pushfstring( L, "Tables must be of same length." );
7065  SWIG_fail;
7066  }
7067  }
7068  plpat(arg1,(int const *)arg2,(int const *)arg3);
7069 
7070  {
7071  LUA_FREE_ARRAY( arg2 );
7072  }
7073  {
7074  LUA_FREE_ARRAY( arg3 );
7075  }
7076  return SWIG_arg;
7077 
7078  if(0) SWIG_fail;
7079 
7080 fail:
7081  {
7082  LUA_FREE_ARRAY( arg2 );
7083  }
7084  {
7085  LUA_FREE_ARRAY( arg3 );
7086  }
7087  lua_error(L);
7088  return SWIG_arg;
7089 }
7090 
7091 
7092 static int _wrap_poin(lua_State* L) {
7093  int SWIG_arg = 0;
7094  PLINT arg1 ;
7095  PLFLT *arg2 = (PLFLT *) 0 ;
7096  PLFLT *arg3 = (PLFLT *) 0 ;
7097  PLINT arg4 ;
7098  int temp3 ;
7099 
7100  SWIG_check_num_args("plpoin",3,3)
7101  if(!lua_isnumber(L,3)) SWIG_fail_arg("plpoin",3,"PLINT");
7102  {
7103  int temp;
7104  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7105  if ( !arg2 )
7106  SWIG_fail;
7107  arg1 = Alen = temp;
7108  }
7109  {
7110  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
7111  if ( !arg3 )
7112  SWIG_fail;
7113  if ( temp3 != Alen )
7114  {
7115  lua_pushfstring( L, "Tables must be of same length." );
7116  SWIG_fail;
7117  }
7118  }
7119  arg4 = (PLINT)lua_tonumber(L, 3);
7120  plpoin(arg1,(double const *)arg2,(double const *)arg3,arg4);
7121 
7122  {
7123  LUA_FREE_ARRAY( arg2 );
7124  }
7125  {
7126  LUA_FREE_ARRAY( arg3 );
7127  }
7128  return SWIG_arg;
7129 
7130  if(0) SWIG_fail;
7131 
7132 fail:
7133  {
7134  LUA_FREE_ARRAY( arg2 );
7135  }
7136  {
7137  LUA_FREE_ARRAY( arg3 );
7138  }
7139  lua_error(L);
7140  return SWIG_arg;
7141 }
7142 
7143 
7144 static int _wrap_poin3(lua_State* L) {
7145  int SWIG_arg = 0;
7146  PLINT arg1 ;
7147  PLFLT *arg2 = (PLFLT *) 0 ;
7148  PLFLT *arg3 = (PLFLT *) 0 ;
7149  PLFLT *arg4 = (PLFLT *) 0 ;
7150  PLINT arg5 ;
7151  int temp3 ;
7152  int temp4 ;
7153 
7154  SWIG_check_num_args("plpoin3",4,4)
7155  if(!lua_isnumber(L,4)) SWIG_fail_arg("plpoin3",4,"PLINT");
7156  {
7157  int temp;
7158  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7159  if ( !arg2 )
7160  SWIG_fail;
7161  arg1 = Alen = temp;
7162  }
7163  {
7164  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
7165  if ( !arg3 )
7166  SWIG_fail;
7167  if ( temp3 != Alen )
7168  {
7169  lua_pushfstring( L, "Tables must be of same length." );
7170  SWIG_fail;
7171  }
7172  }
7173  {
7174  arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
7175  if ( !arg4 )
7176  SWIG_fail;
7177  if ( temp4 != Alen )
7178  {
7179  lua_pushfstring( L, "Tables must be of same length." );
7180  SWIG_fail;
7181  }
7182  }
7183  arg5 = (PLINT)lua_tonumber(L, 4);
7184  plpoin3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,arg5);
7185 
7186  {
7187  LUA_FREE_ARRAY( arg2 );
7188  }
7189  {
7190  LUA_FREE_ARRAY( arg3 );
7191  }
7192  {
7193  LUA_FREE_ARRAY( arg4 );
7194  }
7195  return SWIG_arg;
7196 
7197  if(0) SWIG_fail;
7198 
7199 fail:
7200  {
7201  LUA_FREE_ARRAY( arg2 );
7202  }
7203  {
7204  LUA_FREE_ARRAY( arg3 );
7205  }
7206  {
7207  LUA_FREE_ARRAY( arg4 );
7208  }
7209  lua_error(L);
7210  return SWIG_arg;
7211 }
7212 
7213 
7214 static int _wrap_poly3(lua_State* L) {
7215  int SWIG_arg = 0;
7216  PLINT arg1 ;
7217  PLFLT *arg2 = (PLFLT *) 0 ;
7218  PLFLT *arg3 = (PLFLT *) 0 ;
7219  PLFLT *arg4 = (PLFLT *) 0 ;
7220  PLBOOL *arg5 = (PLBOOL *) 0 ;
7221  PLBOOL arg6 ;
7222  int temp3 ;
7223  int temp4 ;
7224  int temp5 ;
7225 
7226  SWIG_check_num_args("plpoly3",5,5)
7227  if(!lua_isnumber(L,5)) SWIG_fail_arg("plpoly3",5,"PLBOOL");
7228  {
7229  int temp;
7230  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7231  if ( !arg2 )
7232  SWIG_fail;
7233  arg1 = Alen = temp;
7234  }
7235  {
7236  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
7237  if ( !arg3 )
7238  SWIG_fail;
7239  if ( temp3 != Alen )
7240  {
7241  lua_pushfstring( L, "Tables must be of same length." );
7242  SWIG_fail;
7243  }
7244  }
7245  {
7246  arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
7247  if ( !arg4 )
7248  SWIG_fail;
7249  if ( temp4 != Alen )
7250  {
7251  lua_pushfstring( L, "Tables must be of same length." );
7252  SWIG_fail;
7253  }
7254  }
7255  {
7256  arg5 = (PLINT *) LUA_get_int_num_array_var( L, 4, &temp5 );
7257  if ( !arg5 )
7258  SWIG_fail;
7259  if ( temp5 < Alen - 1 )
7260  {
7261  lua_pushfstring( L, "Tables must be at least length of others minus 1." );
7262  SWIG_fail;
7263  }
7264  }
7265  arg6 = (PLBOOL)lua_tonumber(L, 5);
7266  plpoly3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,(int const *)arg5,arg6);
7267 
7268  {
7269  LUA_FREE_ARRAY( arg2 );
7270  }
7271  {
7272  LUA_FREE_ARRAY( arg3 );
7273  }
7274  {
7275  LUA_FREE_ARRAY( arg4 );
7276  }
7277  {
7278  LUA_FREE_ARRAY( arg5 );
7279  }
7280  return SWIG_arg;
7281 
7282  if(0) SWIG_fail;
7283 
7284 fail:
7285  {
7286  LUA_FREE_ARRAY( arg2 );
7287  }
7288  {
7289  LUA_FREE_ARRAY( arg3 );
7290  }
7291  {
7292  LUA_FREE_ARRAY( arg4 );
7293  }
7294  {
7295  LUA_FREE_ARRAY( arg5 );
7296  }
7297  lua_error(L);
7298  return SWIG_arg;
7299 }
7300 
7301 
7302 static int _wrap_prec(lua_State* L) {
7303  int SWIG_arg = 0;
7304  PLINT arg1 ;
7305  PLINT arg2 ;
7306 
7307  SWIG_check_num_args("plprec",2,2)
7308  if(!lua_isnumber(L,1)) SWIG_fail_arg("plprec",1,"PLINT");
7309  if(!lua_isnumber(L,2)) SWIG_fail_arg("plprec",2,"PLINT");
7310  arg1 = (PLINT)lua_tonumber(L, 1);
7311  arg2 = (PLINT)lua_tonumber(L, 2);
7312  plprec(arg1,arg2);
7313 
7314  return SWIG_arg;
7315 
7316  if(0) SWIG_fail;
7317 
7318 fail:
7319  lua_error(L);
7320  return SWIG_arg;
7321 }
7322 
7323 
7324 static int _wrap_psty(lua_State* L) {
7325  int SWIG_arg = 0;
7326  PLINT arg1 ;
7327 
7328  SWIG_check_num_args("plpsty",1,1)
7329  if(!lua_isnumber(L,1)) SWIG_fail_arg("plpsty",1,"PLINT");
7330  arg1 = (PLINT)lua_tonumber(L, 1);
7331  plpsty(arg1);
7332 
7333  return SWIG_arg;
7334 
7335  if(0) SWIG_fail;
7336 
7337 fail:
7338  lua_error(L);
7339  return SWIG_arg;
7340 }
7341 
7342 
7343 static int _wrap_ptex(lua_State* L) {
7344  int SWIG_arg = 0;
7345  PLFLT arg1 ;
7346  PLFLT arg2 ;
7347  PLFLT arg3 ;
7348  PLFLT arg4 ;
7349  PLFLT arg5 ;
7350  char *arg6 = (char *) 0 ;
7351 
7352  SWIG_check_num_args("plptex",6,6)
7353  if(!lua_isnumber(L,1)) SWIG_fail_arg("plptex",1,"PLFLT");
7354  if(!lua_isnumber(L,2)) SWIG_fail_arg("plptex",2,"PLFLT");
7355  if(!lua_isnumber(L,3)) SWIG_fail_arg("plptex",3,"PLFLT");
7356  if(!lua_isnumber(L,4)) SWIG_fail_arg("plptex",4,"PLFLT");
7357  if(!lua_isnumber(L,5)) SWIG_fail_arg("plptex",5,"PLFLT");
7358  if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plptex",6,"char const *");
7359  arg1 = (PLFLT)lua_tonumber(L, 1);
7360  arg2 = (PLFLT)lua_tonumber(L, 2);
7361  arg3 = (PLFLT)lua_tonumber(L, 3);
7362  arg4 = (PLFLT)lua_tonumber(L, 4);
7363  arg5 = (PLFLT)lua_tonumber(L, 5);
7364  arg6 = (char *)lua_tostring(L, 6);
7365  plptex(arg1,arg2,arg3,arg4,arg5,(char const *)arg6);
7366 
7367  return SWIG_arg;
7368 
7369  if(0) SWIG_fail;
7370 
7371 fail:
7372  lua_error(L);
7373  return SWIG_arg;
7374 }
7375 
7376 
7377 static int _wrap_ptex3(lua_State* L) {
7378  int SWIG_arg = 0;
7379  PLFLT arg1 ;
7380  PLFLT arg2 ;
7381  PLFLT arg3 ;
7382  PLFLT arg4 ;
7383  PLFLT arg5 ;
7384  PLFLT arg6 ;
7385  PLFLT arg7 ;
7386  PLFLT arg8 ;
7387  PLFLT arg9 ;
7388  PLFLT arg10 ;
7389  char *arg11 = (char *) 0 ;
7390 
7391  SWIG_check_num_args("plptex3",11,11)
7392  if(!lua_isnumber(L,1)) SWIG_fail_arg("plptex3",1,"PLFLT");
7393  if(!lua_isnumber(L,2)) SWIG_fail_arg("plptex3",2,"PLFLT");
7394  if(!lua_isnumber(L,3)) SWIG_fail_arg("plptex3",3,"PLFLT");
7395  if(!lua_isnumber(L,4)) SWIG_fail_arg("plptex3",4,"PLFLT");
7396  if(!lua_isnumber(L,5)) SWIG_fail_arg("plptex3",5,"PLFLT");
7397  if(!lua_isnumber(L,6)) SWIG_fail_arg("plptex3",6,"PLFLT");
7398  if(!lua_isnumber(L,7)) SWIG_fail_arg("plptex3",7,"PLFLT");
7399  if(!lua_isnumber(L,8)) SWIG_fail_arg("plptex3",8,"PLFLT");
7400  if(!lua_isnumber(L,9)) SWIG_fail_arg("plptex3",9,"PLFLT");
7401  if(!lua_isnumber(L,10)) SWIG_fail_arg("plptex3",10,"PLFLT");
7402  if(!SWIG_lua_isnilstring(L,11)) SWIG_fail_arg("plptex3",11,"char const *");
7403  arg1 = (PLFLT)lua_tonumber(L, 1);
7404  arg2 = (PLFLT)lua_tonumber(L, 2);
7405  arg3 = (PLFLT)lua_tonumber(L, 3);
7406  arg4 = (PLFLT)lua_tonumber(L, 4);
7407  arg5 = (PLFLT)lua_tonumber(L, 5);
7408  arg6 = (PLFLT)lua_tonumber(L, 6);
7409  arg7 = (PLFLT)lua_tonumber(L, 7);
7410  arg8 = (PLFLT)lua_tonumber(L, 8);
7411  arg9 = (PLFLT)lua_tonumber(L, 9);
7412  arg10 = (PLFLT)lua_tonumber(L, 10);
7413  arg11 = (char *)lua_tostring(L, 11);
7414  plptex3(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,(char const *)arg11);
7415 
7416  return SWIG_arg;
7417 
7418  if(0) SWIG_fail;
7419 
7420 fail:
7421  lua_error(L);
7422  return SWIG_arg;
7423 }
7424 
7425 
7426 static int _wrap_randd(lua_State* L) {
7427  int SWIG_arg = 0;
7428  PLFLT result;
7429 
7430  SWIG_check_num_args("plrandd",0,0)
7431  result = (PLFLT)plrandd();
7432  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
7433  return SWIG_arg;
7434 
7435  if(0) SWIG_fail;
7436 
7437 fail:
7438  lua_error(L);
7439  return SWIG_arg;
7440 }
7441 
7442 
7443 static int _wrap_replot(lua_State* L) {
7444  int SWIG_arg = 0;
7445 
7446  SWIG_check_num_args("plreplot",0,0)
7447  plreplot();
7448 
7449  return SWIG_arg;
7450 
7451  if(0) SWIG_fail;
7452 
7453 fail:
7454  lua_error(L);
7455  return SWIG_arg;
7456 }
7457 
7458 
7459 static int _wrap_rgbhls(lua_State* L) {
7460  int SWIG_arg = 0;
7461  PLFLT arg1 ;
7462  PLFLT arg2 ;
7463  PLFLT arg3 ;
7464  PLFLT *arg4 = (PLFLT *) 0 ;
7465  PLFLT *arg5 = (PLFLT *) 0 ;
7466  PLFLT *arg6 = (PLFLT *) 0 ;
7467  PLFLT temp4 ;
7468  PLFLT temp5 ;
7469  PLFLT temp6 ;
7470 
7471  arg4 = &temp4;
7472  arg5 = &temp5;
7473  arg6 = &temp6;
7474  SWIG_check_num_args("plrgbhls",3,3)
7475  if(!lua_isnumber(L,1)) SWIG_fail_arg("plrgbhls",1,"PLFLT");
7476  if(!lua_isnumber(L,2)) SWIG_fail_arg("plrgbhls",2,"PLFLT");
7477  if(!lua_isnumber(L,3)) SWIG_fail_arg("plrgbhls",3,"PLFLT");
7478  arg1 = (PLFLT)lua_tonumber(L, 1);
7479  arg2 = (PLFLT)lua_tonumber(L, 2);
7480  arg3 = (PLFLT)lua_tonumber(L, 3);
7481  plrgbhls(arg1,arg2,arg3,arg4,arg5,arg6);
7482 
7483  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
7484  lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
7485  lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
7486  return SWIG_arg;
7487 
7488  if(0) SWIG_fail;
7489 
7490 fail:
7491  lua_error(L);
7492  return SWIG_arg;
7493 }
7494 
7495 
7496 static int _wrap_schr(lua_State* L) {
7497  int SWIG_arg = 0;
7498  PLFLT arg1 ;
7499  PLFLT arg2 ;
7500 
7501  SWIG_check_num_args("plschr",2,2)
7502  if(!lua_isnumber(L,1)) SWIG_fail_arg("plschr",1,"PLFLT");
7503  if(!lua_isnumber(L,2)) SWIG_fail_arg("plschr",2,"PLFLT");
7504  arg1 = (PLFLT)lua_tonumber(L, 1);
7505  arg2 = (PLFLT)lua_tonumber(L, 2);
7506  plschr(arg1,arg2);
7507 
7508  return SWIG_arg;
7509 
7510  if(0) SWIG_fail;
7511 
7512 fail:
7513  lua_error(L);
7514  return SWIG_arg;
7515 }
7516 
7517 
7518 static int _wrap_scmap0(lua_State* L) {
7519  int SWIG_arg = 0;
7520  PLINT *arg1 = (PLINT *) 0 ;
7521  PLINT *arg2 = (PLINT *) 0 ;
7522  PLINT *arg3 = (PLINT *) 0 ;
7523  PLINT arg4 ;
7524  int temp1 ;
7525  int temp2 ;
7526  int temp3 ;
7527 
7528  SWIG_check_num_args("plscmap0",3,3)
7529  {
7530  arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
7531  if ( !arg1 )
7532  SWIG_fail;
7533  Alen = temp1;
7534  }
7535  {
7536  arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
7537  if ( !arg2 )
7538  SWIG_fail;
7539  if ( temp2 != Alen )
7540  {
7541  lua_pushfstring( L, "Tables must be of same length." );
7542  SWIG_fail;
7543  }
7544  }
7545  {
7546  arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
7547  if ( !arg3 )
7548  SWIG_fail;
7549  if ( temp3 != Alen )
7550  {
7551  lua_pushfstring( L, "Tables must be of same length." );
7552  SWIG_fail;
7553  }
7554  arg4 = temp3;
7555  }
7556  plscmap0((int const *)arg1,(int const *)arg2,(int const *)arg3,arg4);
7557 
7558  {
7559  LUA_FREE_ARRAY( arg1 );
7560  }
7561  {
7562  LUA_FREE_ARRAY( arg2 );
7563  }
7564  {
7565  LUA_FREE_ARRAY( arg3 );
7566  }
7567  return SWIG_arg;
7568 
7569  if(0) SWIG_fail;
7570 
7571 fail:
7572  {
7573  LUA_FREE_ARRAY( arg1 );
7574  }
7575  {
7576  LUA_FREE_ARRAY( arg2 );
7577  }
7578  {
7579  LUA_FREE_ARRAY( arg3 );
7580  }
7581  lua_error(L);
7582  return SWIG_arg;
7583 }
7584 
7585 
7586 static int _wrap_scmap0a(lua_State* L) {
7587  int SWIG_arg = 0;
7588  PLINT *arg1 = (PLINT *) 0 ;
7589  PLINT *arg2 = (PLINT *) 0 ;
7590  PLINT *arg3 = (PLINT *) 0 ;
7591  PLFLT *arg4 = (PLFLT *) 0 ;
7592  PLINT arg5 ;
7593  int temp1 ;
7594  int temp2 ;
7595  int temp3 ;
7596 
7597  SWIG_check_num_args("plscmap0a",4,4)
7598  {
7599  arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
7600  if ( !arg1 )
7601  SWIG_fail;
7602  Alen = temp1;
7603  }
7604  {
7605  arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
7606  if ( !arg2 )
7607  SWIG_fail;
7608  if ( temp2 != Alen )
7609  {
7610  lua_pushfstring( L, "Tables must be of same length." );
7611  SWIG_fail;
7612  }
7613  }
7614  {
7615  arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
7616  if ( !arg3 )
7617  SWIG_fail;
7618  if ( temp3 != Alen )
7619  {
7620  lua_pushfstring( L, "Tables must be of same length." );
7621  SWIG_fail;
7622  }
7623  }
7624  {
7625  int temp;
7626  arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
7627  if ( !arg4 )
7628  SWIG_fail;
7629  if ( temp != Alen )
7630  {
7631  lua_pushfstring( L, "Tables must be of same length." );
7632  SWIG_fail;
7633  }
7634  arg5 = temp;
7635  }
7636  plscmap0a((int const *)arg1,(int const *)arg2,(int const *)arg3,(double const *)arg4,arg5);
7637 
7638  {
7639  LUA_FREE_ARRAY( arg1 );
7640  }
7641  {
7642  LUA_FREE_ARRAY( arg2 );
7643  }
7644  {
7645  LUA_FREE_ARRAY( arg3 );
7646  }
7647  {
7648  LUA_FREE_ARRAY( arg4 );
7649  }
7650  return SWIG_arg;
7651 
7652  if(0) SWIG_fail;
7653 
7654 fail:
7655  {
7656  LUA_FREE_ARRAY( arg1 );
7657  }
7658  {
7659  LUA_FREE_ARRAY( arg2 );
7660  }
7661  {
7662  LUA_FREE_ARRAY( arg3 );
7663  }
7664  {
7665  LUA_FREE_ARRAY( arg4 );
7666  }
7667  lua_error(L);
7668  return SWIG_arg;
7669 }
7670 
7671 
7672 static int _wrap_scmap0n(lua_State* L) {
7673  int SWIG_arg = 0;
7674  PLINT arg1 ;
7675 
7676  SWIG_check_num_args("plscmap0n",1,1)
7677  if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap0n",1,"PLINT");
7678  arg1 = (PLINT)lua_tonumber(L, 1);
7679  plscmap0n(arg1);
7680 
7681  return SWIG_arg;
7682 
7683  if(0) SWIG_fail;
7684 
7685 fail:
7686  lua_error(L);
7687  return SWIG_arg;
7688 }
7689 
7690 
7691 static int _wrap_scmap1(lua_State* L) {
7692  int SWIG_arg = 0;
7693  PLINT *arg1 = (PLINT *) 0 ;
7694  PLINT *arg2 = (PLINT *) 0 ;
7695  PLINT *arg3 = (PLINT *) 0 ;
7696  PLINT arg4 ;
7697  int temp1 ;
7698  int temp2 ;
7699  int temp3 ;
7700 
7701  SWIG_check_num_args("plscmap1",3,3)
7702  {
7703  arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
7704  if ( !arg1 )
7705  SWIG_fail;
7706  Alen = temp1;
7707  }
7708  {
7709  arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
7710  if ( !arg2 )
7711  SWIG_fail;
7712  if ( temp2 != Alen )
7713  {
7714  lua_pushfstring( L, "Tables must be of same length." );
7715  SWIG_fail;
7716  }
7717  }
7718  {
7719  arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
7720  if ( !arg3 )
7721  SWIG_fail;
7722  if ( temp3 != Alen )
7723  {
7724  lua_pushfstring( L, "Tables must be of same length." );
7725  SWIG_fail;
7726  }
7727  arg4 = temp3;
7728  }
7729  plscmap1((int const *)arg1,(int const *)arg2,(int const *)arg3,arg4);
7730 
7731  {
7732  LUA_FREE_ARRAY( arg1 );
7733  }
7734  {
7735  LUA_FREE_ARRAY( arg2 );
7736  }
7737  {
7738  LUA_FREE_ARRAY( arg3 );
7739  }
7740  return SWIG_arg;
7741 
7742  if(0) SWIG_fail;
7743 
7744 fail:
7745  {
7746  LUA_FREE_ARRAY( arg1 );
7747  }
7748  {
7749  LUA_FREE_ARRAY( arg2 );
7750  }
7751  {
7752  LUA_FREE_ARRAY( arg3 );
7753  }
7754  lua_error(L);
7755  return SWIG_arg;
7756 }
7757 
7758 
7759 static int _wrap_scmap1a(lua_State* L) {
7760  int SWIG_arg = 0;
7761  PLINT *arg1 = (PLINT *) 0 ;
7762  PLINT *arg2 = (PLINT *) 0 ;
7763  PLINT *arg3 = (PLINT *) 0 ;
7764  PLFLT *arg4 = (PLFLT *) 0 ;
7765  PLINT arg5 ;
7766  int temp1 ;
7767  int temp2 ;
7768  int temp3 ;
7769 
7770  SWIG_check_num_args("plscmap1a",4,4)
7771  {
7772  arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
7773  if ( !arg1 )
7774  SWIG_fail;
7775  Alen = temp1;
7776  }
7777  {
7778  arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
7779  if ( !arg2 )
7780  SWIG_fail;
7781  if ( temp2 != Alen )
7782  {
7783  lua_pushfstring( L, "Tables must be of same length." );
7784  SWIG_fail;
7785  }
7786  }
7787  {
7788  arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
7789  if ( !arg3 )
7790  SWIG_fail;
7791  if ( temp3 != Alen )
7792  {
7793  lua_pushfstring( L, "Tables must be of same length." );
7794  SWIG_fail;
7795  }
7796  }
7797  {
7798  int temp;
7799  arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
7800  if ( !arg4 )
7801  SWIG_fail;
7802  if ( temp != Alen )
7803  {
7804  lua_pushfstring( L, "Tables must be of same length." );
7805  SWIG_fail;
7806  }
7807  arg5 = temp;
7808  }
7809  plscmap1a((int const *)arg1,(int const *)arg2,(int const *)arg3,(double const *)arg4,arg5);
7810 
7811  {
7812  LUA_FREE_ARRAY( arg1 );
7813  }
7814  {
7815  LUA_FREE_ARRAY( arg2 );
7816  }
7817  {
7818  LUA_FREE_ARRAY( arg3 );
7819  }
7820  {
7821  LUA_FREE_ARRAY( arg4 );
7822  }
7823  return SWIG_arg;
7824 
7825  if(0) SWIG_fail;
7826 
7827 fail:
7828  {
7829  LUA_FREE_ARRAY( arg1 );
7830  }
7831  {
7832  LUA_FREE_ARRAY( arg2 );
7833  }
7834  {
7835  LUA_FREE_ARRAY( arg3 );
7836  }
7837  {
7838  LUA_FREE_ARRAY( arg4 );
7839  }
7840  lua_error(L);
7841  return SWIG_arg;
7842 }
7843 
7844 
7845 static int _wrap_scmap1l(lua_State* L) {
7846  int SWIG_arg = 0;
7847  PLBOOL arg1 ;
7848  PLINT arg2 ;
7849  PLFLT *arg3 = (PLFLT *) 0 ;
7850  PLFLT *arg4 = (PLFLT *) 0 ;
7851  PLFLT *arg5 = (PLFLT *) 0 ;
7852  PLFLT *arg6 = (PLFLT *) 0 ;
7853  PLBOOL *arg7 = (PLBOOL *) 0 ;
7854  int temp4 ;
7855  int temp5 ;
7856  int temp6 ;
7857  int temp7 ;
7858 
7859  {
7860  arg7 = NULL;
7861  }
7862  SWIG_check_num_args("plscmap1l",5,6)
7863  if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1l",1,"PLBOOL");
7864  arg1 = (PLBOOL)lua_tonumber(L, 1);
7865  {
7866  int temp;
7867  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7868  if ( !arg3 )
7869  SWIG_fail;
7870  arg2 = Alen = temp;
7871  }
7872  {
7873  arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
7874  if ( !arg4 )
7875  SWIG_fail;
7876  if ( temp4 != Alen )
7877  {
7878  lua_pushfstring( L, "Tables must be of same length." );
7879  SWIG_fail;
7880  }
7881  }
7882  {
7883  arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp5 );
7884  if ( !arg5 )
7885  SWIG_fail;
7886  if ( temp5 != Alen )
7887  {
7888  lua_pushfstring( L, "Tables must be of same length." );
7889  SWIG_fail;
7890  }
7891  }
7892  {
7893  arg6 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp6 );
7894  if ( !arg6 )
7895  SWIG_fail;
7896  if ( temp6 != Alen )
7897  {
7898  lua_pushfstring( L, "Tables must be of same length." );
7899  SWIG_fail;
7900  }
7901  }
7902  if(lua_gettop(L)>=6){
7903  {
7904  arg7 = (PLINT *) LUA_get_int_num_array_var( L, 6, &temp7 );
7905  if ( !arg7 )
7906  SWIG_fail;
7907  if ( temp7 < Alen - 1 )
7908  {
7909  lua_pushfstring( L, "Tables must be at least length of others minus 1." );
7910  SWIG_fail;
7911  }
7912  }
7913  }
7914  plscmap1l(arg1,arg2,(double const *)arg3,(double const *)arg4,(double const *)arg5,(double const *)arg6,(int const *)arg7);
7915 
7916  {
7917  LUA_FREE_ARRAY( arg3 );
7918  }
7919  {
7920  LUA_FREE_ARRAY( arg4 );
7921  }
7922  {
7923  LUA_FREE_ARRAY( arg5 );
7924  }
7925  {
7926  LUA_FREE_ARRAY( arg6 );
7927  }
7928  {
7929  LUA_FREE_ARRAY( arg7 );
7930  }
7931  return SWIG_arg;
7932 
7933  if(0) SWIG_fail;
7934 
7935 fail:
7936  {
7937  LUA_FREE_ARRAY( arg3 );
7938  }
7939  {
7940  LUA_FREE_ARRAY( arg4 );
7941  }
7942  {
7943  LUA_FREE_ARRAY( arg5 );
7944  }
7945  {
7946  LUA_FREE_ARRAY( arg6 );
7947  }
7948  {
7949  LUA_FREE_ARRAY( arg7 );
7950  }
7951  lua_error(L);
7952  return SWIG_arg;
7953 }
7954 
7955 
7956 static int _wrap_scmap1la(lua_State* L) {
7957  int SWIG_arg = 0;
7958  PLBOOL arg1 ;
7959  PLINT arg2 ;
7960  PLFLT *arg3 = (PLFLT *) 0 ;
7961  PLFLT *arg4 = (PLFLT *) 0 ;
7962  PLFLT *arg5 = (PLFLT *) 0 ;
7963  PLFLT *arg6 = (PLFLT *) 0 ;
7964  PLFLT *arg7 = (PLFLT *) 0 ;
7965  PLBOOL *arg8 = (PLBOOL *) 0 ;
7966  int temp4 ;
7967  int temp5 ;
7968  int temp6 ;
7969  int temp7 ;
7970  int temp8 ;
7971 
7972  {
7973  arg8 = NULL;
7974  }
7975  SWIG_check_num_args("plscmap1la",6,7)
7976  if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1la",1,"PLBOOL");
7977  arg1 = (PLBOOL)lua_tonumber(L, 1);
7978  {
7979  int temp;
7980  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7981  if ( !arg3 )
7982  SWIG_fail;
7983  arg2 = Alen = temp;
7984  }
7985  {
7986  arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
7987  if ( !arg4 )
7988  SWIG_fail;
7989  if ( temp4 != Alen )
7990  {
7991  lua_pushfstring( L, "Tables must be of same length." );
7992  SWIG_fail;
7993  }
7994  }
7995  {
7996  arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp5 );
7997  if ( !arg5 )
7998  SWIG_fail;
7999  if ( temp5 != Alen )
8000  {
8001  lua_pushfstring( L, "Tables must be of same length." );
8002  SWIG_fail;
8003  }
8004  }
8005  {
8006  arg6 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp6 );
8007  if ( !arg6 )
8008  SWIG_fail;
8009  if ( temp6 != Alen )
8010  {
8011  lua_pushfstring( L, "Tables must be of same length." );
8012  SWIG_fail;
8013  }
8014  }
8015  {
8016  arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp7 );
8017  if ( !arg7 )
8018  SWIG_fail;
8019  if ( temp7 != Alen )
8020  {
8021  lua_pushfstring( L, "Tables must be of same length." );
8022  SWIG_fail;
8023  }
8024  }
8025  if(lua_gettop(L)>=7){
8026  {
8027  arg8 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp8 );
8028  if ( !arg8 )
8029  SWIG_fail;
8030  if ( temp8 < Alen - 1 )
8031  {
8032  lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8033  SWIG_fail;
8034  }
8035  }
8036  }
8037  plscmap1la(arg1,arg2,(double const *)arg3,(double const *)arg4,(double const *)arg5,(double const *)arg6,(double const *)arg7,(int const *)arg8);
8038 
8039  {
8040  LUA_FREE_ARRAY( arg3 );
8041  }
8042  {
8043  LUA_FREE_ARRAY( arg4 );
8044  }
8045  {
8046  LUA_FREE_ARRAY( arg5 );
8047  }
8048  {
8049  LUA_FREE_ARRAY( arg6 );
8050  }
8051  {
8052  LUA_FREE_ARRAY( arg7 );
8053  }
8054  {
8055  LUA_FREE_ARRAY( arg8 );
8056  }
8057  return SWIG_arg;
8058 
8059  if(0) SWIG_fail;
8060 
8061 fail:
8062  {
8063  LUA_FREE_ARRAY( arg3 );
8064  }
8065  {
8066  LUA_FREE_ARRAY( arg4 );
8067  }
8068  {
8069  LUA_FREE_ARRAY( arg5 );
8070  }
8071  {
8072  LUA_FREE_ARRAY( arg6 );
8073  }
8074  {
8075  LUA_FREE_ARRAY( arg7 );
8076  }
8077  {
8078  LUA_FREE_ARRAY( arg8 );
8079  }
8080  lua_error(L);
8081  return SWIG_arg;
8082 }
8083 
8084 
8085 static int _wrap_scmap1n(lua_State* L) {
8086  int SWIG_arg = 0;
8087  PLINT arg1 ;
8088 
8089  SWIG_check_num_args("plscmap1n",1,1)
8090  if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1n",1,"PLINT");
8091  arg1 = (PLINT)lua_tonumber(L, 1);
8092  plscmap1n(arg1);
8093 
8094  return SWIG_arg;
8095 
8096  if(0) SWIG_fail;
8097 
8098 fail:
8099  lua_error(L);
8100  return SWIG_arg;
8101 }
8102 
8103 
8104 static int _wrap_scmap1_range(lua_State* L) {
8105  int SWIG_arg = 0;
8106  PLFLT arg1 ;
8107  PLFLT arg2 ;
8108 
8109  SWIG_check_num_args("plscmap1_range",2,2)
8110  if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1_range",1,"PLFLT");
8111  if(!lua_isnumber(L,2)) SWIG_fail_arg("plscmap1_range",2,"PLFLT");
8112  arg1 = (PLFLT)lua_tonumber(L, 1);
8113  arg2 = (PLFLT)lua_tonumber(L, 2);
8114  plscmap1_range(arg1,arg2);
8115 
8116  return SWIG_arg;
8117 
8118  if(0) SWIG_fail;
8119 
8120 fail:
8121  lua_error(L);
8122  return SWIG_arg;
8123 }
8124 
8125 
8126 static int _wrap_gcmap1_range(lua_State* L) {
8127  int SWIG_arg = 0;
8128  PLFLT *arg1 = (PLFLT *) 0 ;
8129  PLFLT *arg2 = (PLFLT *) 0 ;
8130  PLFLT temp1 ;
8131  PLFLT temp2 ;
8132 
8133  arg1 = &temp1;
8134  arg2 = &temp2;
8135  SWIG_check_num_args("plgcmap1_range",0,0)
8136  plgcmap1_range(arg1,arg2);
8137 
8138  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
8139  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
8140  return SWIG_arg;
8141 
8142  if(0) SWIG_fail;
8143 
8144 fail:
8145  lua_error(L);
8146  return SWIG_arg;
8147 }
8148 
8149 
8150 static int _wrap_scol0(lua_State* L) {
8151  int SWIG_arg = 0;
8152  PLINT arg1 ;
8153  PLINT arg2 ;
8154  PLINT arg3 ;
8155  PLINT arg4 ;
8156 
8157  SWIG_check_num_args("plscol0",4,4)
8158  if(!lua_isnumber(L,1)) SWIG_fail_arg("plscol0",1,"PLINT");
8159  if(!lua_isnumber(L,2)) SWIG_fail_arg("plscol0",2,"PLINT");
8160  if(!lua_isnumber(L,3)) SWIG_fail_arg("plscol0",3,"PLINT");
8161  if(!lua_isnumber(L,4)) SWIG_fail_arg("plscol0",4,"PLINT");
8162  arg1 = (PLINT)lua_tonumber(L, 1);
8163  arg2 = (PLINT)lua_tonumber(L, 2);
8164  arg3 = (PLINT)lua_tonumber(L, 3);
8165  arg4 = (PLINT)lua_tonumber(L, 4);
8166  plscol0(arg1,arg2,arg3,arg4);
8167 
8168  return SWIG_arg;
8169 
8170  if(0) SWIG_fail;
8171 
8172 fail:
8173  lua_error(L);
8174  return SWIG_arg;
8175 }
8176 
8177 
8178 static int _wrap_scol0a(lua_State* L) {
8179  int SWIG_arg = 0;
8180  PLINT arg1 ;
8181  PLINT arg2 ;
8182  PLINT arg3 ;
8183  PLINT arg4 ;
8184  PLFLT arg5 ;
8185 
8186  SWIG_check_num_args("plscol0a",5,5)
8187  if(!lua_isnumber(L,1)) SWIG_fail_arg("plscol0a",1,"PLINT");
8188  if(!lua_isnumber(L,2)) SWIG_fail_arg("plscol0a",2,"PLINT");
8189  if(!lua_isnumber(L,3)) SWIG_fail_arg("plscol0a",3,"PLINT");
8190  if(!lua_isnumber(L,4)) SWIG_fail_arg("plscol0a",4,"PLINT");
8191  if(!lua_isnumber(L,5)) SWIG_fail_arg("plscol0a",5,"PLFLT");
8192  arg1 = (PLINT)lua_tonumber(L, 1);
8193  arg2 = (PLINT)lua_tonumber(L, 2);
8194  arg3 = (PLINT)lua_tonumber(L, 3);
8195  arg4 = (PLINT)lua_tonumber(L, 4);
8196  arg5 = (PLFLT)lua_tonumber(L, 5);
8197  plscol0a(arg1,arg2,arg3,arg4,arg5);
8198 
8199  return SWIG_arg;
8200 
8201  if(0) SWIG_fail;
8202 
8203 fail:
8204  lua_error(L);
8205  return SWIG_arg;
8206 }
8207 
8208 
8209 static int _wrap_scolbg(lua_State* L) {
8210  int SWIG_arg = 0;
8211  PLINT arg1 ;
8212  PLINT arg2 ;
8213  PLINT arg3 ;
8214 
8215  SWIG_check_num_args("plscolbg",3,3)
8216  if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolbg",1,"PLINT");
8217  if(!lua_isnumber(L,2)) SWIG_fail_arg("plscolbg",2,"PLINT");
8218  if(!lua_isnumber(L,3)) SWIG_fail_arg("plscolbg",3,"PLINT");
8219  arg1 = (PLINT)lua_tonumber(L, 1);
8220  arg2 = (PLINT)lua_tonumber(L, 2);
8221  arg3 = (PLINT)lua_tonumber(L, 3);
8222  plscolbg(arg1,arg2,arg3);
8223 
8224  return SWIG_arg;
8225 
8226  if(0) SWIG_fail;
8227 
8228 fail:
8229  lua_error(L);
8230  return SWIG_arg;
8231 }
8232 
8233 
8234 static int _wrap_scolbga(lua_State* L) {
8235  int SWIG_arg = 0;
8236  PLINT arg1 ;
8237  PLINT arg2 ;
8238  PLINT arg3 ;
8239  PLFLT arg4 ;
8240 
8241  SWIG_check_num_args("plscolbga",4,4)
8242  if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolbga",1,"PLINT");
8243  if(!lua_isnumber(L,2)) SWIG_fail_arg("plscolbga",2,"PLINT");
8244  if(!lua_isnumber(L,3)) SWIG_fail_arg("plscolbga",3,"PLINT");
8245  if(!lua_isnumber(L,4)) SWIG_fail_arg("plscolbga",4,"PLFLT");
8246  arg1 = (PLINT)lua_tonumber(L, 1);
8247  arg2 = (PLINT)lua_tonumber(L, 2);
8248  arg3 = (PLINT)lua_tonumber(L, 3);
8249  arg4 = (PLFLT)lua_tonumber(L, 4);
8250  plscolbga(arg1,arg2,arg3,arg4);
8251 
8252  return SWIG_arg;
8253 
8254  if(0) SWIG_fail;
8255 
8256 fail:
8257  lua_error(L);
8258  return SWIG_arg;
8259 }
8260 
8261 
8262 static int _wrap_scolor(lua_State* L) {
8263  int SWIG_arg = 0;
8264  PLINT arg1 ;
8265 
8266  SWIG_check_num_args("plscolor",1,1)
8267  if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolor",1,"PLINT");
8268  arg1 = (PLINT)lua_tonumber(L, 1);
8269  plscolor(arg1);
8270 
8271  return SWIG_arg;
8272 
8273  if(0) SWIG_fail;
8274 
8275 fail:
8276  lua_error(L);
8277  return SWIG_arg;
8278 }
8279 
8280 
8281 static int _wrap_scompression(lua_State* L) {
8282  int SWIG_arg = 0;
8283  PLINT arg1 ;
8284 
8285  SWIG_check_num_args("plscompression",1,1)
8286  if(!lua_isnumber(L,1)) SWIG_fail_arg("plscompression",1,"PLINT");
8287  arg1 = (PLINT)lua_tonumber(L, 1);
8288  plscompression(arg1);
8289 
8290  return SWIG_arg;
8291 
8292  if(0) SWIG_fail;
8293 
8294 fail:
8295  lua_error(L);
8296  return SWIG_arg;
8297 }
8298 
8299 
8300 static int _wrap_sdev(lua_State* L) {
8301  int SWIG_arg = 0;
8302  char *arg1 = (char *) 0 ;
8303 
8304  SWIG_check_num_args("plsdev",1,1)
8305  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsdev",1,"char const *");
8306  arg1 = (char *)lua_tostring(L, 1);
8307  plsdev((char const *)arg1);
8308 
8309  return SWIG_arg;
8310 
8311  if(0) SWIG_fail;
8312 
8313 fail:
8314  lua_error(L);
8315  return SWIG_arg;
8316 }
8317 
8318 
8319 static int _wrap_sdidev(lua_State* L) {
8320  int SWIG_arg = 0;
8321  PLFLT arg1 ;
8322  PLFLT arg2 ;
8323  PLFLT arg3 ;
8324  PLFLT arg4 ;
8325 
8326  SWIG_check_num_args("plsdidev",4,4)
8327  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdidev",1,"PLFLT");
8328  if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdidev",2,"PLFLT");
8329  if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdidev",3,"PLFLT");
8330  if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdidev",4,"PLFLT");
8331  arg1 = (PLFLT)lua_tonumber(L, 1);
8332  arg2 = (PLFLT)lua_tonumber(L, 2);
8333  arg3 = (PLFLT)lua_tonumber(L, 3);
8334  arg4 = (PLFLT)lua_tonumber(L, 4);
8335  plsdidev(arg1,arg2,arg3,arg4);
8336 
8337  return SWIG_arg;
8338 
8339  if(0) SWIG_fail;
8340 
8341 fail:
8342  lua_error(L);
8343  return SWIG_arg;
8344 }
8345 
8346 
8347 static int _wrap_sdimap(lua_State* L) {
8348  int SWIG_arg = 0;
8349  PLINT arg1 ;
8350  PLINT arg2 ;
8351  PLINT arg3 ;
8352  PLINT arg4 ;
8353  PLFLT arg5 ;
8354  PLFLT arg6 ;
8355 
8356  SWIG_check_num_args("plsdimap",6,6)
8357  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdimap",1,"PLINT");
8358  if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdimap",2,"PLINT");
8359  if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdimap",3,"PLINT");
8360  if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdimap",4,"PLINT");
8361  if(!lua_isnumber(L,5)) SWIG_fail_arg("plsdimap",5,"PLFLT");
8362  if(!lua_isnumber(L,6)) SWIG_fail_arg("plsdimap",6,"PLFLT");
8363  arg1 = (PLINT)lua_tonumber(L, 1);
8364  arg2 = (PLINT)lua_tonumber(L, 2);
8365  arg3 = (PLINT)lua_tonumber(L, 3);
8366  arg4 = (PLINT)lua_tonumber(L, 4);
8367  arg5 = (PLFLT)lua_tonumber(L, 5);
8368  arg6 = (PLFLT)lua_tonumber(L, 6);
8369  plsdimap(arg1,arg2,arg3,arg4,arg5,arg6);
8370 
8371  return SWIG_arg;
8372 
8373  if(0) SWIG_fail;
8374 
8375 fail:
8376  lua_error(L);
8377  return SWIG_arg;
8378 }
8379 
8380 
8381 static int _wrap_sdiori(lua_State* L) {
8382  int SWIG_arg = 0;
8383  PLFLT arg1 ;
8384 
8385  SWIG_check_num_args("plsdiori",1,1)
8386  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiori",1,"PLFLT");
8387  arg1 = (PLFLT)lua_tonumber(L, 1);
8388  plsdiori(arg1);
8389 
8390  return SWIG_arg;
8391 
8392  if(0) SWIG_fail;
8393 
8394 fail:
8395  lua_error(L);
8396  return SWIG_arg;
8397 }
8398 
8399 
8400 static int _wrap_sdiplt(lua_State* L) {
8401  int SWIG_arg = 0;
8402  PLFLT arg1 ;
8403  PLFLT arg2 ;
8404  PLFLT arg3 ;
8405  PLFLT arg4 ;
8406 
8407  SWIG_check_num_args("plsdiplt",4,4)
8408  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiplt",1,"PLFLT");
8409  if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdiplt",2,"PLFLT");
8410  if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdiplt",3,"PLFLT");
8411  if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdiplt",4,"PLFLT");
8412  arg1 = (PLFLT)lua_tonumber(L, 1);
8413  arg2 = (PLFLT)lua_tonumber(L, 2);
8414  arg3 = (PLFLT)lua_tonumber(L, 3);
8415  arg4 = (PLFLT)lua_tonumber(L, 4);
8416  plsdiplt(arg1,arg2,arg3,arg4);
8417 
8418  return SWIG_arg;
8419 
8420  if(0) SWIG_fail;
8421 
8422 fail:
8423  lua_error(L);
8424  return SWIG_arg;
8425 }
8426 
8427 
8428 static int _wrap_sdiplz(lua_State* L) {
8429  int SWIG_arg = 0;
8430  PLFLT arg1 ;
8431  PLFLT arg2 ;
8432  PLFLT arg3 ;
8433  PLFLT arg4 ;
8434 
8435  SWIG_check_num_args("plsdiplz",4,4)
8436  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiplz",1,"PLFLT");
8437  if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdiplz",2,"PLFLT");
8438  if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdiplz",3,"PLFLT");
8439  if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdiplz",4,"PLFLT");
8440  arg1 = (PLFLT)lua_tonumber(L, 1);
8441  arg2 = (PLFLT)lua_tonumber(L, 2);
8442  arg3 = (PLFLT)lua_tonumber(L, 3);
8443  arg4 = (PLFLT)lua_tonumber(L, 4);
8444  plsdiplz(arg1,arg2,arg3,arg4);
8445 
8446  return SWIG_arg;
8447 
8448  if(0) SWIG_fail;
8449 
8450 fail:
8451  lua_error(L);
8452  return SWIG_arg;
8453 }
8454 
8455 
8456 static int _wrap_seed(lua_State* L) {
8457  int SWIG_arg = 0;
8458  unsigned int arg1 ;
8459 
8460  SWIG_check_num_args("plseed",1,1)
8461  if(!lua_isnumber(L,1)) SWIG_fail_arg("plseed",1,"unsigned int");
8462  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
8463  arg1 = (unsigned int)lua_tonumber(L, 1);
8464  plseed(arg1);
8465 
8466  return SWIG_arg;
8467 
8468  if(0) SWIG_fail;
8469 
8470 fail:
8471  lua_error(L);
8472  return SWIG_arg;
8473 }
8474 
8475 
8476 static int _wrap_sesc(lua_State* L) {
8477  int SWIG_arg = 0;
8478  char arg1 ;
8479 
8480  SWIG_check_num_args("plsesc",1,1)
8481  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsesc",1,"char");
8482  arg1 = (lua_tostring(L, 1))[0];
8483  plsesc(arg1);
8484 
8485  return SWIG_arg;
8486 
8487  if(0) SWIG_fail;
8488 
8489 fail:
8490  lua_error(L);
8491  return SWIG_arg;
8492 }
8493 
8494 
8495 static int _wrap_setopt(lua_State* L) {
8496  int SWIG_arg = 0;
8497  char *arg1 = (char *) 0 ;
8498  char *arg2 = (char *) 0 ;
8499  PLINT result;
8500 
8501  SWIG_check_num_args("plsetopt",2,2)
8502  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsetopt",1,"char const *");
8503  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plsetopt",2,"char const *");
8504  arg1 = (char *)lua_tostring(L, 1);
8505  arg2 = (char *)lua_tostring(L, 2);
8506  result = (PLINT)plsetopt((char const *)arg1,(char const *)arg2);
8507  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
8508  return SWIG_arg;
8509 
8510  if(0) SWIG_fail;
8511 
8512 fail:
8513  lua_error(L);
8514  return SWIG_arg;
8515 }
8516 
8517 
8518 static int _wrap_sfam(lua_State* L) {
8519  int SWIG_arg = 0;
8520  PLINT arg1 ;
8521  PLINT arg2 ;
8522  PLINT arg3 ;
8523 
8524  SWIG_check_num_args("plsfam",3,3)
8525  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfam",1,"PLINT");
8526  if(!lua_isnumber(L,2)) SWIG_fail_arg("plsfam",2,"PLINT");
8527  if(!lua_isnumber(L,3)) SWIG_fail_arg("plsfam",3,"PLINT");
8528  arg1 = (PLINT)lua_tonumber(L, 1);
8529  arg2 = (PLINT)lua_tonumber(L, 2);
8530  arg3 = (PLINT)lua_tonumber(L, 3);
8531  plsfam(arg1,arg2,arg3);
8532 
8533  return SWIG_arg;
8534 
8535  if(0) SWIG_fail;
8536 
8537 fail:
8538  lua_error(L);
8539  return SWIG_arg;
8540 }
8541 
8542 
8543 static int _wrap_sfci(lua_State* L) {
8544  int SWIG_arg = 0;
8545  PLUNICODE arg1 ;
8546 
8547  SWIG_check_num_args("plsfci",1,1)
8548  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfci",1,"PLUNICODE");
8549  SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
8550  arg1 = (PLUNICODE)lua_tonumber(L, 1);
8551  plsfci(arg1);
8552 
8553  return SWIG_arg;
8554 
8555  if(0) SWIG_fail;
8556 
8557 fail:
8558  lua_error(L);
8559  return SWIG_arg;
8560 }
8561 
8562 
8563 static int _wrap_sfnam(lua_State* L) {
8564  int SWIG_arg = 0;
8565  char *arg1 = (char *) 0 ;
8566 
8567  SWIG_check_num_args("plsfnam",1,1)
8568  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsfnam",1,"char const *");
8569  arg1 = (char *)lua_tostring(L, 1);
8570  plsfnam((char const *)arg1);
8571 
8572  return SWIG_arg;
8573 
8574  if(0) SWIG_fail;
8575 
8576 fail:
8577  lua_error(L);
8578  return SWIG_arg;
8579 }
8580 
8581 
8582 static int _wrap_sfont(lua_State* L) {
8583  int SWIG_arg = 0;
8584  PLINT arg1 ;
8585  PLINT arg2 ;
8586  PLINT arg3 ;
8587 
8588  SWIG_check_num_args("plsfont",3,3)
8589  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfont",1,"PLINT");
8590  if(!lua_isnumber(L,2)) SWIG_fail_arg("plsfont",2,"PLINT");
8591  if(!lua_isnumber(L,3)) SWIG_fail_arg("plsfont",3,"PLINT");
8592  arg1 = (PLINT)lua_tonumber(L, 1);
8593  arg2 = (PLINT)lua_tonumber(L, 2);
8594  arg3 = (PLINT)lua_tonumber(L, 3);
8595  plsfont(arg1,arg2,arg3);
8596 
8597  return SWIG_arg;
8598 
8599  if(0) SWIG_fail;
8600 
8601 fail:
8602  lua_error(L);
8603  return SWIG_arg;
8604 }
8605 
8606 
8607 static int _wrap_shades(lua_State* L) {
8608  int SWIG_arg = 0;
8609  PLFLT **arg1 = (PLFLT **) 0 ;
8610  PLINT arg2 ;
8611  PLINT arg3 ;
8612  defined_func arg4 = (defined_func) 0 ;
8613  PLFLT arg5 ;
8614  PLFLT arg6 ;
8615  PLFLT arg7 ;
8616  PLFLT arg8 ;
8617  PLFLT *arg9 = (PLFLT *) 0 ;
8618  PLINT arg10 ;
8619  PLFLT arg11 ;
8620  PLINT arg12 ;
8621  PLFLT arg13 ;
8622  fill_func arg14 = (fill_func) 0 ;
8623  PLBOOL arg15 ;
8624  pltr_func arg16 = (pltr_func) 0 ;
8625  PLPointer arg17 = (PLPointer) 0 ;
8626  int ii1 ;
8627  PLcGrid cgrid117 ;
8628  PLcGrid2 cgrid217 ;
8629 
8630  {
8631  cgrid117.xg = cgrid117.yg = cgrid117.zg = NULL;
8632  cgrid117.nx = cgrid117.ny = cgrid117.nz = 0;
8633  cgrid217.xg = cgrid217.yg = cgrid217.zg = NULL;
8634  cgrid217.nx = cgrid217.ny = 0;
8635  }
8636  {
8637  arg16 = NULL;
8638  }
8639  {
8640  arg17 = NULL;
8641  }
8642  {
8643  arg4 = NULL;
8644  }
8645  {
8646  arg14 = plfill;
8647  }
8648  SWIG_check_num_args("plshades",10,12)
8649  if(!lua_isnumber(L,2)) SWIG_fail_arg("plshades",2,"PLFLT");
8650  if(!lua_isnumber(L,3)) SWIG_fail_arg("plshades",3,"PLFLT");
8651  if(!lua_isnumber(L,4)) SWIG_fail_arg("plshades",4,"PLFLT");
8652  if(!lua_isnumber(L,5)) SWIG_fail_arg("plshades",5,"PLFLT");
8653  if(!lua_isnumber(L,7)) SWIG_fail_arg("plshades",7,"PLFLT");
8654  if(!lua_isnumber(L,8)) SWIG_fail_arg("plshades",8,"PLINT");
8655  if(!lua_isnumber(L,9)) SWIG_fail_arg("plshades",9,"PLFLT");
8656  if(!lua_isnumber(L,10)) SWIG_fail_arg("plshades",10,"PLBOOL");
8657  {
8658  int jj;
8659 
8660  arg1 = read_double_Matrix( L, 1, &ii1, &jj );
8661  if ( !arg1 )
8662  SWIG_fail;
8663  Xlen = arg2 = ii1;
8664  Ylen = arg3 = jj;
8665  }
8666  arg5 = (PLFLT)lua_tonumber(L, 2);
8667  arg6 = (PLFLT)lua_tonumber(L, 3);
8668  arg7 = (PLFLT)lua_tonumber(L, 4);
8669  arg8 = (PLFLT)lua_tonumber(L, 5);
8670  {
8671  int temp;
8672  arg9 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp );
8673  if ( !arg9 )
8674  SWIG_fail;
8675  arg10 = Alen = temp;
8676  }
8677  arg11 = (PLFLT)lua_tonumber(L, 7);
8678  arg12 = (PLINT)lua_tonumber(L, 8);
8679  arg13 = (PLFLT)lua_tonumber(L, 9);
8680  arg15 = (PLBOOL)lua_tonumber(L, 10);
8681  if(lua_gettop(L)>=11){
8682  {
8683  arg16 = NULL;
8684  mypltr_funcstr[0] = '\0';
8685 
8686  if ( lua_isstring( L, 11 ) )
8687  {
8688  const char* funcstr = lua_tostring( L, 11 );
8689  if ( strcmp( "pltr0", funcstr ) == 0 )
8690  {
8691  arg16 = pltr0;
8692  }
8693  else if ( strcmp( "pltr1", funcstr ) == 0 )
8694  {
8695  arg16 = pltr1;
8696  }
8697  else if ( strcmp( "pltr2", funcstr ) == 0 )
8698  {
8699  arg16 = pltr2;
8700  }
8701  else
8702  {
8703  arg16 = mypltr;
8704  strncpy( mypltr_funcstr, funcstr, 255 );
8705  myL = L;
8706  }
8707  }
8708  else
8709  SWIG_fail_arg( "shades", 16, "pltr_func" );
8710  }
8711  }
8712  if(lua_gettop(L)>=12){
8713  {
8714  int nx, ny;
8715  int gridmode = 0;
8716 
8717  lua_pushstring( L, "xg" );
8718  lua_gettable( L, 12 );
8719  if ( !lua_istable( L, -1 ) )
8720  {
8721  lua_pop( L, 1 ); // pop "xg"
8722  lua_pushstring( L, "expected a table xg" );
8723  SWIG_fail;
8724  }
8725  lua_rawgeti( L, -1, 1 );
8726  if ( lua_istable( L, -1 ) )
8727  gridmode = 2; // two dimensional array
8728  else if ( lua_isnumber( L, -1 ) )
8729  gridmode = 1; // one dimensional array
8730  else
8731  {
8732  lua_pop( L, 1 ); // pop "1"
8733  lua_pop( L, 1 ); // pop "xg"
8734  lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
8735  SWIG_fail;
8736  }
8737  lua_pop( L, 1 ); // pop test element
8738  if ( gridmode == 1 )
8739  {
8740  cgrid117.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
8741  if ( !cgrid117.xg )
8742  {
8743  lua_pop( L, 1 ); // pop "xg"
8744  SWIG_fail;
8745  }
8746  if ( nx != Xlen )
8747  {
8748  lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
8749  SWIG_fail;
8750  }
8751  cgrid117.nx = nx;
8752  }
8753  else
8754  {
8755  cgrid217.xg = read_double_Matrix( L, -1, &nx, &ny );
8756  if ( !cgrid217.xg )
8757  {
8758  lua_pop( L, 1 ); // pop "xg"
8759  SWIG_fail;
8760  }
8761  if ( ( nx != Xlen ) || ( ny != Ylen ) )
8762  {
8763  lua_pop( L, 1 ); // pop "xg"
8764  lua_pushfstring( L, "Vectors must match matrix." );
8765  SWIG_fail;
8766  }
8767  cgrid217.nx = nx;
8768  cgrid217.ny = ny;
8769  }
8770  lua_pop( L, 1 ); // pop "xg"
8771 
8772  lua_pushstring( L, "yg" );
8773  lua_gettable( L, 12 );
8774  if ( !lua_istable( L, -1 ) )
8775  {
8776  lua_pop( L, 1 );
8777  lua_pushstring( L, "expected a table yg" );
8778  SWIG_fail;
8779  }
8780  lua_rawgeti( L, -1, 1 );
8781  if ( gridmode == 2 )
8782  {
8783  if ( !lua_istable( L, -1 ) )
8784  {
8785  lua_pop( L, 1 ); // pop "1"
8786  lua_pop( L, 1 ); // pop "yg"
8787  lua_pushstring( L, "expected a two dimensional array/table in yg" );
8788  SWIG_fail;
8789  }
8790  }
8791  else
8792  {
8793  if ( !lua_isnumber( L, -1 ) )
8794  {
8795  lua_pop( L, 1 ); // pop "1"
8796  lua_pop( L, 1 ); // pop "yg"
8797  lua_pushstring( L, "expected a one dimensional array/table in yg" );
8798  SWIG_fail;
8799  }
8800  }
8801  lua_pop( L, 1 ); // pop "1"
8802  if ( gridmode == 1 )
8803  {
8804  cgrid117.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
8805  if ( !cgrid117.yg )
8806  {
8807  lua_pop( L, 1 ); // pop "yg"
8808  SWIG_fail;
8809  }
8810  if ( ny != Ylen )
8811  {
8812  lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
8813  SWIG_fail;
8814  }
8815  cgrid117.ny = ny;
8816  }
8817  else
8818  {
8819  cgrid217.yg = read_double_Matrix( L, -1, &nx, &ny );
8820  if ( !cgrid217.yg )
8821  {
8822  lua_pop( L, 1 ); // pop "xg"
8823  SWIG_fail;
8824  }
8825  if ( ( nx != Xlen ) || ( ny != Ylen ) )
8826  {
8827  lua_pop( L, 1 ); // pop "xg"
8828  lua_pushfstring( L, "Vectors must match matrix." );
8829  SWIG_fail;
8830  }
8831  // cgrid217.nx/ny already set
8832  }
8833  lua_pop( L, 1 ); // pop "yg"
8834 
8835  if ( gridmode == 1 )
8836  arg17 = &cgrid117;
8837  else if ( gridmode == 2 )
8838  arg17 = &cgrid217;
8839  }
8840  }
8841  plshades((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,(double const *)arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
8842 
8843  {
8844  int i;
8845 
8846  if ( arg1 )
8847  {
8848  for ( i = 0; i < ii1; i++ )
8849  LUA_FREE_ARRAY( arg1[i] );
8850  LUA_FREE_ARRAY( arg1 );
8851  }
8852  }
8853  {
8854  LUA_FREE_ARRAY( arg9 );
8855  }
8856  {
8857  mypltr_funcstr[0] = '\0';
8858  }
8859  {
8860  int i;
8861 
8862  LUA_FREE_ARRAY( cgrid117.xg );
8863  LUA_FREE_ARRAY( cgrid117.yg );
8864 
8865  if ( cgrid217.xg )
8866  {
8867  for ( i = 0; i < Xlen; i++ )
8868  LUA_FREE_ARRAY( cgrid217.xg[i] );
8869  LUA_FREE_ARRAY( cgrid217.xg );
8870  }
8871  if ( cgrid217.yg )
8872  {
8873  for ( i = 0; i < Xlen; i++ )
8874  LUA_FREE_ARRAY( cgrid217.yg[i] );
8875  LUA_FREE_ARRAY( cgrid217.yg );
8876  }
8877  }
8878  return SWIG_arg;
8879 
8880  if(0) SWIG_fail;
8881 
8882 fail:
8883  {
8884  int i;
8885 
8886  if ( arg1 )
8887  {
8888  for ( i = 0; i < ii1; i++ )
8889  LUA_FREE_ARRAY( arg1[i] );
8890  LUA_FREE_ARRAY( arg1 );
8891  }
8892  }
8893  {
8894  LUA_FREE_ARRAY( arg9 );
8895  }
8896  {
8897  mypltr_funcstr[0] = '\0';
8898  }
8899  {
8900  int i;
8901 
8902  LUA_FREE_ARRAY( cgrid117.xg );
8903  LUA_FREE_ARRAY( cgrid117.yg );
8904 
8905  if ( cgrid217.xg )
8906  {
8907  for ( i = 0; i < Xlen; i++ )
8908  LUA_FREE_ARRAY( cgrid217.xg[i] );
8909  LUA_FREE_ARRAY( cgrid217.xg );
8910  }
8911  if ( cgrid217.yg )
8912  {
8913  for ( i = 0; i < Xlen; i++ )
8914  LUA_FREE_ARRAY( cgrid217.yg[i] );
8915  LUA_FREE_ARRAY( cgrid217.yg );
8916  }
8917  }
8918  lua_error(L);
8919  return SWIG_arg;
8920 }
8921 
8922 
8923 static int _wrap_shade(lua_State* L) {
8924  int SWIG_arg = 0;
8925  PLFLT **arg1 = (PLFLT **) 0 ;
8926  PLINT arg2 ;
8927  PLINT arg3 ;
8928  defined_func arg4 = (defined_func) 0 ;
8929  PLFLT arg5 ;
8930  PLFLT arg6 ;
8931  PLFLT arg7 ;
8932  PLFLT arg8 ;
8933  PLFLT arg9 ;
8934  PLFLT arg10 ;
8935  PLINT arg11 ;
8936  PLFLT arg12 ;
8937  PLFLT arg13 ;
8938  PLINT arg14 ;
8939  PLFLT arg15 ;
8940  PLINT arg16 ;
8941  PLFLT arg17 ;
8942  fill_func arg18 = (fill_func) 0 ;
8943  PLBOOL arg19 ;
8944  pltr_func arg20 = (pltr_func) 0 ;
8945  PLPointer arg21 = (PLPointer) 0 ;
8946  int ii1 ;
8947  PLcGrid cgrid121 ;
8948  PLcGrid2 cgrid221 ;
8949 
8950  {
8951  cgrid121.xg = cgrid121.yg = cgrid121.zg = NULL;
8952  cgrid121.nx = cgrid121.ny = cgrid121.nz = 0;
8953  cgrid221.xg = cgrid221.yg = cgrid221.zg = NULL;
8954  cgrid221.nx = cgrid221.ny = 0;
8955  }
8956  {
8957  arg20 = NULL;
8958  }
8959  {
8960  arg21 = NULL;
8961  }
8962  {
8963  arg4 = NULL;
8964  }
8965  {
8966  arg18 = plfill;
8967  }
8968  SWIG_check_num_args("plshade",15,17)
8969  if(!lua_isnumber(L,2)) SWIG_fail_arg("plshade",2,"PLFLT");
8970  if(!lua_isnumber(L,3)) SWIG_fail_arg("plshade",3,"PLFLT");
8971  if(!lua_isnumber(L,4)) SWIG_fail_arg("plshade",4,"PLFLT");
8972  if(!lua_isnumber(L,5)) SWIG_fail_arg("plshade",5,"PLFLT");
8973  if(!lua_isnumber(L,6)) SWIG_fail_arg("plshade",6,"PLFLT");
8974  if(!lua_isnumber(L,7)) SWIG_fail_arg("plshade",7,"PLFLT");
8975  if(!lua_isnumber(L,8)) SWIG_fail_arg("plshade",8,"PLINT");
8976  if(!lua_isnumber(L,9)) SWIG_fail_arg("plshade",9,"PLFLT");
8977  if(!lua_isnumber(L,10)) SWIG_fail_arg("plshade",10,"PLFLT");
8978  if(!lua_isnumber(L,11)) SWIG_fail_arg("plshade",11,"PLINT");
8979  if(!lua_isnumber(L,12)) SWIG_fail_arg("plshade",12,"PLFLT");
8980  if(!lua_isnumber(L,13)) SWIG_fail_arg("plshade",13,"PLINT");
8981  if(!lua_isnumber(L,14)) SWIG_fail_arg("plshade",14,"PLFLT");
8982  if(!lua_isnumber(L,15)) SWIG_fail_arg("plshade",15,"PLBOOL");
8983  {
8984  int jj;
8985 
8986  arg1 = read_double_Matrix( L, 1, &ii1, &jj );
8987  if ( !arg1 )
8988  SWIG_fail;
8989  Xlen = arg2 = ii1;
8990  Ylen = arg3 = jj;
8991  }
8992  arg5 = (PLFLT)lua_tonumber(L, 2);
8993  arg6 = (PLFLT)lua_tonumber(L, 3);
8994  arg7 = (PLFLT)lua_tonumber(L, 4);
8995  arg8 = (PLFLT)lua_tonumber(L, 5);
8996  arg9 = (PLFLT)lua_tonumber(L, 6);
8997  arg10 = (PLFLT)lua_tonumber(L, 7);
8998  arg11 = (PLINT)lua_tonumber(L, 8);
8999  arg12 = (PLFLT)lua_tonumber(L, 9);
9000  arg13 = (PLFLT)lua_tonumber(L, 10);
9001  arg14 = (PLINT)lua_tonumber(L, 11);
9002  arg15 = (PLFLT)lua_tonumber(L, 12);
9003  arg16 = (PLINT)lua_tonumber(L, 13);
9004  arg17 = (PLFLT)lua_tonumber(L, 14);
9005  arg19 = (PLBOOL)lua_tonumber(L, 15);
9006  if(lua_gettop(L)>=16){
9007  {
9008  arg20 = NULL;
9009  mypltr_funcstr[0] = '\0';
9010 
9011  if ( lua_isstring( L, 16 ) )
9012  {
9013  const char* funcstr = lua_tostring( L, 16 );
9014  if ( strcmp( "pltr0", funcstr ) == 0 )
9015  {
9016  arg20 = pltr0;
9017  }
9018  else if ( strcmp( "pltr1", funcstr ) == 0 )
9019  {
9020  arg20 = pltr1;
9021  }
9022  else if ( strcmp( "pltr2", funcstr ) == 0 )
9023  {
9024  arg20 = pltr2;
9025  }
9026  else
9027  {
9028  arg20 = mypltr;
9029  strncpy( mypltr_funcstr, funcstr, 255 );
9030  myL = L;
9031  }
9032  }
9033  else
9034  SWIG_fail_arg( "shade", 20, "pltr_func" );
9035  }
9036  }
9037  if(lua_gettop(L)>=17){
9038  {
9039  int nx, ny;
9040  int gridmode = 0;
9041 
9042  lua_pushstring( L, "xg" );
9043  lua_gettable( L, 17 );
9044  if ( !lua_istable( L, -1 ) )
9045  {
9046  lua_pop( L, 1 ); // pop "xg"
9047  lua_pushstring( L, "expected a table xg" );
9048  SWIG_fail;
9049  }
9050  lua_rawgeti( L, -1, 1 );
9051  if ( lua_istable( L, -1 ) )
9052  gridmode = 2; // two dimensional array
9053  else if ( lua_isnumber( L, -1 ) )
9054  gridmode = 1; // one dimensional array
9055  else
9056  {
9057  lua_pop( L, 1 ); // pop "1"
9058  lua_pop( L, 1 ); // pop "xg"
9059  lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
9060  SWIG_fail;
9061  }
9062  lua_pop( L, 1 ); // pop test element
9063  if ( gridmode == 1 )
9064  {
9065  cgrid121.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
9066  if ( !cgrid121.xg )
9067  {
9068  lua_pop( L, 1 ); // pop "xg"
9069  SWIG_fail;
9070  }
9071  if ( nx != Xlen )
9072  {
9073  lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
9074  SWIG_fail;
9075  }
9076  cgrid121.nx = nx;
9077  }
9078  else
9079  {
9080  cgrid221.xg = read_double_Matrix( L, -1, &nx, &ny );
9081  if ( !cgrid221.xg )
9082  {
9083  lua_pop( L, 1 ); // pop "xg"
9084  SWIG_fail;
9085  }
9086  if ( ( nx != Xlen ) || ( ny != Ylen ) )
9087  {
9088  lua_pop( L, 1 ); // pop "xg"
9089  lua_pushfstring( L, "Vectors must match matrix." );
9090  SWIG_fail;
9091  }
9092  cgrid221.nx = nx;
9093  cgrid221.ny = ny;
9094  }
9095  lua_pop( L, 1 ); // pop "xg"
9096 
9097  lua_pushstring( L, "yg" );
9098  lua_gettable( L, 17 );
9099  if ( !lua_istable( L, -1 ) )
9100  {
9101  lua_pop( L, 1 );
9102  lua_pushstring( L, "expected a table yg" );
9103  SWIG_fail;
9104  }
9105  lua_rawgeti( L, -1, 1 );
9106  if ( gridmode == 2 )
9107  {
9108  if ( !lua_istable( L, -1 ) )
9109  {
9110  lua_pop( L, 1 ); // pop "1"
9111  lua_pop( L, 1 ); // pop "yg"
9112  lua_pushstring( L, "expected a two dimensional array/table in yg" );
9113  SWIG_fail;
9114  }
9115  }
9116  else
9117  {
9118  if ( !lua_isnumber( L, -1 ) )
9119  {
9120  lua_pop( L, 1 ); // pop "1"
9121  lua_pop( L, 1 ); // pop "yg"
9122  lua_pushstring( L, "expected a one dimensional array/table in yg" );
9123  SWIG_fail;
9124  }
9125  }
9126  lua_pop( L, 1 ); // pop "1"
9127  if ( gridmode == 1 )
9128  {
9129  cgrid121.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
9130  if ( !cgrid121.yg )
9131  {
9132  lua_pop( L, 1 ); // pop "yg"
9133  SWIG_fail;
9134  }
9135  if ( ny != Ylen )
9136  {
9137  lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
9138  SWIG_fail;
9139  }
9140  cgrid121.ny = ny;
9141  }
9142  else
9143  {
9144  cgrid221.yg = read_double_Matrix( L, -1, &nx, &ny );
9145  if ( !cgrid221.yg )
9146  {
9147  lua_pop( L, 1 ); // pop "xg"
9148  SWIG_fail;
9149  }
9150  if ( ( nx != Xlen ) || ( ny != Ylen ) )
9151  {
9152  lua_pop( L, 1 ); // pop "xg"
9153  lua_pushfstring( L, "Vectors must match matrix." );
9154  SWIG_fail;
9155  }
9156  // cgrid221.nx/ny already set
9157  }
9158  lua_pop( L, 1 ); // pop "yg"
9159 
9160  if ( gridmode == 1 )
9161  arg21 = &cgrid121;
9162  else if ( gridmode == 2 )
9163  arg21 = &cgrid221;
9164  }
9165  }
9166  plshade((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21);
9167 
9168  {
9169  int i;
9170 
9171  if ( arg1 )
9172  {
9173  for ( i = 0; i < ii1; i++ )
9174  LUA_FREE_ARRAY( arg1[i] );
9175  LUA_FREE_ARRAY( arg1 );
9176  }
9177  }
9178  {
9179  mypltr_funcstr[0] = '\0';
9180  }
9181  {
9182  int i;
9183 
9184  LUA_FREE_ARRAY( cgrid121.xg );
9185  LUA_FREE_ARRAY( cgrid121.yg );
9186 
9187  if ( cgrid221.xg )
9188  {
9189  for ( i = 0; i < Xlen; i++ )
9190  LUA_FREE_ARRAY( cgrid221.xg[i] );
9191  LUA_FREE_ARRAY( cgrid221.xg );
9192  }
9193  if ( cgrid221.yg )
9194  {
9195  for ( i = 0; i < Xlen; i++ )
9196  LUA_FREE_ARRAY( cgrid221.yg[i] );
9197  LUA_FREE_ARRAY( cgrid221.yg );
9198  }
9199  }
9200  return SWIG_arg;
9201 
9202  if(0) SWIG_fail;
9203 
9204 fail:
9205  {
9206  int i;
9207 
9208  if ( arg1 )
9209  {
9210  for ( i = 0; i < ii1; i++ )
9211  LUA_FREE_ARRAY( arg1[i] );
9212  LUA_FREE_ARRAY( arg1 );
9213  }
9214  }
9215  {
9216  mypltr_funcstr[0] = '\0';
9217  }
9218  {
9219  int i;
9220 
9221  LUA_FREE_ARRAY( cgrid121.xg );
9222  LUA_FREE_ARRAY( cgrid121.yg );
9223 
9224  if ( cgrid221.xg )
9225  {
9226  for ( i = 0; i < Xlen; i++ )
9227  LUA_FREE_ARRAY( cgrid221.xg[i] );
9228  LUA_FREE_ARRAY( cgrid221.xg );
9229  }
9230  if ( cgrid221.yg )
9231  {
9232  for ( i = 0; i < Xlen; i++ )
9233  LUA_FREE_ARRAY( cgrid221.yg[i] );
9234  LUA_FREE_ARRAY( cgrid221.yg );
9235  }
9236  }
9237  lua_error(L);
9238  return SWIG_arg;
9239 }
9240 
9241 
9242 static int _wrap_slabelfunc(lua_State* L) {
9243  int SWIG_arg = 0;
9244  label_func arg1 = (label_func) 0 ;
9245  PLPointer arg2 = (PLPointer) 0 ;
9246 
9247  {
9248  arg2 = NULL;
9249  }
9250  SWIG_check_num_args("plslabelfunc",1,1)
9251  {
9252  arg1 = NULL;
9253  label_funcstr[0] = '\0';
9254 
9255  if ( lua_isnil( L, 1 ) )
9256  {
9257  arg1 = NULL;
9258  }
9259  else if ( lua_isstring( L, 1 ) )
9260  {
9261  arg1 = mylabel;
9262  strncpy( label_funcstr, lua_tostring( L, 1 ), 255 );
9263  myL = L;
9264  }
9265  else
9266  SWIG_fail_arg( "slabelfunc", 1, "label_func" );
9267  }
9268  plslabelfunc(arg1,arg2);
9269 
9270  {
9271 
9272  }
9273  return SWIG_arg;
9274 
9275  if(0) SWIG_fail;
9276 
9277 fail:
9278  {
9279 
9280  }
9281  lua_error(L);
9282  return SWIG_arg;
9283 }
9284 
9285 
9286 static int _wrap_smaj(lua_State* L) {
9287  int SWIG_arg = 0;
9288  PLFLT arg1 ;
9289  PLFLT arg2 ;
9290 
9291  SWIG_check_num_args("plsmaj",2,2)
9292  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsmaj",1,"PLFLT");
9293  if(!lua_isnumber(L,2)) SWIG_fail_arg("plsmaj",2,"PLFLT");
9294  arg1 = (PLFLT)lua_tonumber(L, 1);
9295  arg2 = (PLFLT)lua_tonumber(L, 2);
9296  plsmaj(arg1,arg2);
9297 
9298  return SWIG_arg;
9299 
9300  if(0) SWIG_fail;
9301 
9302 fail:
9303  lua_error(L);
9304  return SWIG_arg;
9305 }
9306 
9307 
9308 static int _wrap_smin(lua_State* L) {
9309  int SWIG_arg = 0;
9310  PLFLT arg1 ;
9311  PLFLT arg2 ;
9312 
9313  SWIG_check_num_args("plsmin",2,2)
9314  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsmin",1,"PLFLT");
9315  if(!lua_isnumber(L,2)) SWIG_fail_arg("plsmin",2,"PLFLT");
9316  arg1 = (PLFLT)lua_tonumber(L, 1);
9317  arg2 = (PLFLT)lua_tonumber(L, 2);
9318  plsmin(arg1,arg2);
9319 
9320  return SWIG_arg;
9321 
9322  if(0) SWIG_fail;
9323 
9324 fail:
9325  lua_error(L);
9326  return SWIG_arg;
9327 }
9328 
9329 
9330 static int _wrap_sori(lua_State* L) {
9331  int SWIG_arg = 0;
9332  PLINT arg1 ;
9333 
9334  SWIG_check_num_args("plsori",1,1)
9335  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsori",1,"PLINT");
9336  arg1 = (PLINT)lua_tonumber(L, 1);
9337  plsori(arg1);
9338 
9339  return SWIG_arg;
9340 
9341  if(0) SWIG_fail;
9342 
9343 fail:
9344  lua_error(L);
9345  return SWIG_arg;
9346 }
9347 
9348 
9349 static int _wrap_spage(lua_State* L) {
9350  int SWIG_arg = 0;
9351  PLFLT arg1 ;
9352  PLFLT arg2 ;
9353  PLINT arg3 ;
9354  PLINT arg4 ;
9355  PLINT arg5 ;
9356  PLINT arg6 ;
9357 
9358  SWIG_check_num_args("plspage",6,6)
9359  if(!lua_isnumber(L,1)) SWIG_fail_arg("plspage",1,"PLFLT");
9360  if(!lua_isnumber(L,2)) SWIG_fail_arg("plspage",2,"PLFLT");
9361  if(!lua_isnumber(L,3)) SWIG_fail_arg("plspage",3,"PLINT");
9362  if(!lua_isnumber(L,4)) SWIG_fail_arg("plspage",4,"PLINT");
9363  if(!lua_isnumber(L,5)) SWIG_fail_arg("plspage",5,"PLINT");
9364  if(!lua_isnumber(L,6)) SWIG_fail_arg("plspage",6,"PLINT");
9365  arg1 = (PLFLT)lua_tonumber(L, 1);
9366  arg2 = (PLFLT)lua_tonumber(L, 2);
9367  arg3 = (PLINT)lua_tonumber(L, 3);
9368  arg4 = (PLINT)lua_tonumber(L, 4);
9369  arg5 = (PLINT)lua_tonumber(L, 5);
9370  arg6 = (PLINT)lua_tonumber(L, 6);
9371  plspage(arg1,arg2,arg3,arg4,arg5,arg6);
9372 
9373  return SWIG_arg;
9374 
9375  if(0) SWIG_fail;
9376 
9377 fail:
9378  lua_error(L);
9379  return SWIG_arg;
9380 }
9381 
9382 
9383 static int _wrap_spal0(lua_State* L) {
9384  int SWIG_arg = 0;
9385  char *arg1 = (char *) 0 ;
9386 
9387  SWIG_check_num_args("plspal0",1,1)
9388  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plspal0",1,"char const *");
9389  arg1 = (char *)lua_tostring(L, 1);
9390  plspal0((char const *)arg1);
9391 
9392  return SWIG_arg;
9393 
9394  if(0) SWIG_fail;
9395 
9396 fail:
9397  lua_error(L);
9398  return SWIG_arg;
9399 }
9400 
9401 
9402 static int _wrap_spal1(lua_State* L) {
9403  int SWIG_arg = 0;
9404  char *arg1 = (char *) 0 ;
9405  PLBOOL arg2 ;
9406 
9407  SWIG_check_num_args("plspal1",2,2)
9408  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plspal1",1,"char const *");
9409  if(!lua_isnumber(L,2)) SWIG_fail_arg("plspal1",2,"PLBOOL");
9410  arg1 = (char *)lua_tostring(L, 1);
9411  arg2 = (PLBOOL)lua_tonumber(L, 2);
9412  plspal1((char const *)arg1,arg2);
9413 
9414  return SWIG_arg;
9415 
9416  if(0) SWIG_fail;
9417 
9418 fail:
9419  lua_error(L);
9420  return SWIG_arg;
9421 }
9422 
9423 
9424 static int _wrap_spause(lua_State* L) {
9425  int SWIG_arg = 0;
9426  PLBOOL arg1 ;
9427 
9428  SWIG_check_num_args("plspause",1,1)
9429  if(!lua_isnumber(L,1)) SWIG_fail_arg("plspause",1,"PLBOOL");
9430  arg1 = (PLBOOL)lua_tonumber(L, 1);
9431  plspause(arg1);
9432 
9433  return SWIG_arg;
9434 
9435  if(0) SWIG_fail;
9436 
9437 fail:
9438  lua_error(L);
9439  return SWIG_arg;
9440 }
9441 
9442 
9443 static int _wrap_sstrm(lua_State* L) {
9444  int SWIG_arg = 0;
9445  PLINT arg1 ;
9446 
9447  SWIG_check_num_args("plsstrm",1,1)
9448  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsstrm",1,"PLINT");
9449  arg1 = (PLINT)lua_tonumber(L, 1);
9450  plsstrm(arg1);
9451 
9452  return SWIG_arg;
9453 
9454  if(0) SWIG_fail;
9455 
9456 fail:
9457  lua_error(L);
9458  return SWIG_arg;
9459 }
9460 
9461 
9462 static int _wrap_ssub(lua_State* L) {
9463  int SWIG_arg = 0;
9464  PLINT arg1 ;
9465  PLINT arg2 ;
9466 
9467  SWIG_check_num_args("plssub",2,2)
9468  if(!lua_isnumber(L,1)) SWIG_fail_arg("plssub",1,"PLINT");
9469  if(!lua_isnumber(L,2)) SWIG_fail_arg("plssub",2,"PLINT");
9470  arg1 = (PLINT)lua_tonumber(L, 1);
9471  arg2 = (PLINT)lua_tonumber(L, 2);
9472  plssub(arg1,arg2);
9473 
9474  return SWIG_arg;
9475 
9476  if(0) SWIG_fail;
9477 
9478 fail:
9479  lua_error(L);
9480  return SWIG_arg;
9481 }
9482 
9483 
9484 static int _wrap_ssym(lua_State* L) {
9485  int SWIG_arg = 0;
9486  PLFLT arg1 ;
9487  PLFLT arg2 ;
9488 
9489  SWIG_check_num_args("plssym",2,2)
9490  if(!lua_isnumber(L,1)) SWIG_fail_arg("plssym",1,"PLFLT");
9491  if(!lua_isnumber(L,2)) SWIG_fail_arg("plssym",2,"PLFLT");
9492  arg1 = (PLFLT)lua_tonumber(L, 1);
9493  arg2 = (PLFLT)lua_tonumber(L, 2);
9494  plssym(arg1,arg2);
9495 
9496  return SWIG_arg;
9497 
9498  if(0) SWIG_fail;
9499 
9500 fail:
9501  lua_error(L);
9502  return SWIG_arg;
9503 }
9504 
9505 
9506 static int _wrap_star(lua_State* L) {
9507  int SWIG_arg = 0;
9508  PLINT arg1 ;
9509  PLINT arg2 ;
9510 
9511  SWIG_check_num_args("plstar",2,2)
9512  if(!lua_isnumber(L,1)) SWIG_fail_arg("plstar",1,"PLINT");
9513  if(!lua_isnumber(L,2)) SWIG_fail_arg("plstar",2,"PLINT");
9514  arg1 = (PLINT)lua_tonumber(L, 1);
9515  arg2 = (PLINT)lua_tonumber(L, 2);
9516  plstar(arg1,arg2);
9517 
9518  return SWIG_arg;
9519 
9520  if(0) SWIG_fail;
9521 
9522 fail:
9523  lua_error(L);
9524  return SWIG_arg;
9525 }
9526 
9527 
9528 static int _wrap_start(lua_State* L) {
9529  int SWIG_arg = 0;
9530  char *arg1 = (char *) 0 ;
9531  PLINT arg2 ;
9532  PLINT arg3 ;
9533 
9534  SWIG_check_num_args("plstart",3,3)
9535  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plstart",1,"char const *");
9536  if(!lua_isnumber(L,2)) SWIG_fail_arg("plstart",2,"PLINT");
9537  if(!lua_isnumber(L,3)) SWIG_fail_arg("plstart",3,"PLINT");
9538  arg1 = (char *)lua_tostring(L, 1);
9539  arg2 = (PLINT)lua_tonumber(L, 2);
9540  arg3 = (PLINT)lua_tonumber(L, 3);
9541  plstart((char const *)arg1,arg2,arg3);
9542 
9543  return SWIG_arg;
9544 
9545  if(0) SWIG_fail;
9546 
9547 fail:
9548  lua_error(L);
9549  return SWIG_arg;
9550 }
9551 
9552 
9553 static int _wrap_stransform(lua_State* L) {
9554  int SWIG_arg = 0;
9555  ct_func arg1 = (ct_func) 0 ;
9556  PLPointer arg2 = (PLPointer) 0 ;
9557 
9558  {
9559  arg1 = NULL;
9560  myct_funcstr[0] = '\0';
9561  }
9562  {
9563  arg2 = NULL;
9564  }
9565  SWIG_check_num_args("plstransform",0,1)
9566  if(lua_gettop(L)>=1){
9567  {
9568  arg1 = NULL;
9569  myct_funcstr[0] = '\0';
9570 
9571  if ( lua_isstring( L, 1 ) )
9572  {
9573  const char* funcstr = lua_tostring( L, 1 );
9574  arg1 = myct;
9575  strncpy( myct_funcstr, funcstr, 255 );
9576  myL = L;
9577  }
9578  else
9579  SWIG_fail_arg( "stransform", 1, "ct_func" );
9580  }
9581  }
9582  plstransform(arg1,arg2);
9583 
9584  return SWIG_arg;
9585 
9586  if(0) SWIG_fail;
9587 
9588 fail:
9589  lua_error(L);
9590  return SWIG_arg;
9591 }
9592 
9593 
9594 static int _wrap_string(lua_State* L) {
9595  int SWIG_arg = 0;
9596  PLINT arg1 ;
9597  PLFLT *arg2 = (PLFLT *) 0 ;
9598  PLFLT *arg3 = (PLFLT *) 0 ;
9599  char *arg4 = (char *) 0 ;
9600  int temp3 ;
9601 
9602  SWIG_check_num_args("plstring",3,3)
9603  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plstring",3,"char const *");
9604  {
9605  int temp;
9606  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
9607  if ( !arg2 )
9608  SWIG_fail;
9609  arg1 = Alen = temp;
9610  }
9611  {
9612  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
9613  if ( !arg3 )
9614  SWIG_fail;
9615  if ( temp3 != Alen )
9616  {
9617  lua_pushfstring( L, "Tables must be of same length." );
9618  SWIG_fail;
9619  }
9620  }
9621  arg4 = (char *)lua_tostring(L, 3);
9622  plstring(arg1,(double const *)arg2,(double const *)arg3,(char const *)arg4);
9623 
9624  {
9625  LUA_FREE_ARRAY( arg2 );
9626  }
9627  {
9628  LUA_FREE_ARRAY( arg3 );
9629  }
9630  return SWIG_arg;
9631 
9632  if(0) SWIG_fail;
9633 
9634 fail:
9635  {
9636  LUA_FREE_ARRAY( arg2 );
9637  }
9638  {
9639  LUA_FREE_ARRAY( arg3 );
9640  }
9641  lua_error(L);
9642  return SWIG_arg;
9643 }
9644 
9645 
9646 static int _wrap_string3(lua_State* L) {
9647  int SWIG_arg = 0;
9648  PLINT arg1 ;
9649  PLFLT *arg2 = (PLFLT *) 0 ;
9650  PLFLT *arg3 = (PLFLT *) 0 ;
9651  PLFLT *arg4 = (PLFLT *) 0 ;
9652  char *arg5 = (char *) 0 ;
9653  int temp3 ;
9654  int temp4 ;
9655 
9656  SWIG_check_num_args("plstring3",4,4)
9657  if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("plstring3",4,"char const *");
9658  {
9659  int temp;
9660  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
9661  if ( !arg2 )
9662  SWIG_fail;
9663  arg1 = Alen = temp;
9664  }
9665  {
9666  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
9667  if ( !arg3 )
9668  SWIG_fail;
9669  if ( temp3 != Alen )
9670  {
9671  lua_pushfstring( L, "Tables must be of same length." );
9672  SWIG_fail;
9673  }
9674  }
9675  {
9676  arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
9677  if ( !arg4 )
9678  SWIG_fail;
9679  if ( temp4 != Alen )
9680  {
9681  lua_pushfstring( L, "Tables must be of same length." );
9682  SWIG_fail;
9683  }
9684  }
9685  arg5 = (char *)lua_tostring(L, 4);
9686  plstring3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,(char const *)arg5);
9687 
9688  {
9689  LUA_FREE_ARRAY( arg2 );
9690  }
9691  {
9692  LUA_FREE_ARRAY( arg3 );
9693  }
9694  {
9695  LUA_FREE_ARRAY( arg4 );
9696  }
9697  return SWIG_arg;
9698 
9699  if(0) SWIG_fail;
9700 
9701 fail:
9702  {
9703  LUA_FREE_ARRAY( arg2 );
9704  }
9705  {
9706  LUA_FREE_ARRAY( arg3 );
9707  }
9708  {
9709  LUA_FREE_ARRAY( arg4 );
9710  }
9711  lua_error(L);
9712  return SWIG_arg;
9713 }
9714 
9715 
9716 static int _wrap_stripa(lua_State* L) {
9717  int SWIG_arg = 0;
9718  PLINT arg1 ;
9719  PLINT arg2 ;
9720  PLFLT arg3 ;
9721  PLFLT arg4 ;
9722 
9723  SWIG_check_num_args("plstripa",4,4)
9724  if(!lua_isnumber(L,1)) SWIG_fail_arg("plstripa",1,"PLINT");
9725  if(!lua_isnumber(L,2)) SWIG_fail_arg("plstripa",2,"PLINT");
9726  if(!lua_isnumber(L,3)) SWIG_fail_arg("plstripa",3,"PLFLT");
9727  if(!lua_isnumber(L,4)) SWIG_fail_arg("plstripa",4,"PLFLT");
9728  arg1 = (PLINT)lua_tonumber(L, 1);
9729  arg2 = (PLINT)lua_tonumber(L, 2);
9730  arg3 = (PLFLT)lua_tonumber(L, 3);
9731  arg4 = (PLFLT)lua_tonumber(L, 4);
9732  plstripa(arg1,arg2,arg3,arg4);
9733 
9734  return SWIG_arg;
9735 
9736  if(0) SWIG_fail;
9737 
9738 fail:
9739  lua_error(L);
9740  return SWIG_arg;
9741 }
9742 
9743 
9744 static int _wrap_stripc(lua_State* L) {
9745  int SWIG_arg = 0;
9746  PLINT *arg1 = (PLINT *) 0 ;
9747  char *arg2 = (char *) 0 ;
9748  char *arg3 = (char *) 0 ;
9749  PLFLT arg4 ;
9750  PLFLT arg5 ;
9751  PLFLT arg6 ;
9752  PLFLT arg7 ;
9753  PLFLT arg8 ;
9754  PLFLT arg9 ;
9755  PLFLT arg10 ;
9756  PLBOOL arg11 ;
9757  PLBOOL arg12 ;
9758  PLINT arg13 ;
9759  PLINT arg14 ;
9760  PLINT *arg15 = (PLINT *) 0 ;
9761  PLINT *arg16 = (PLINT *) 0 ;
9762  char **arg17 ;
9763  char *arg18 = (char *) 0 ;
9764  char *arg19 = (char *) 0 ;
9765  char *arg20 = (char *) 0 ;
9766  PLINT temp1 ;
9767  int temp15 ;
9768  int temp16 ;
9769 
9770  arg1 = &temp1;
9771  SWIG_check_num_args("plstripc",19,19)
9772  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plstripc",1,"char const *");
9773  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plstripc",2,"char const *");
9774  if(!lua_isnumber(L,3)) SWIG_fail_arg("plstripc",3,"PLFLT");
9775  if(!lua_isnumber(L,4)) SWIG_fail_arg("plstripc",4,"PLFLT");
9776  if(!lua_isnumber(L,5)) SWIG_fail_arg("plstripc",5,"PLFLT");
9777  if(!lua_isnumber(L,6)) SWIG_fail_arg("plstripc",6,"PLFLT");
9778  if(!lua_isnumber(L,7)) SWIG_fail_arg("plstripc",7,"PLFLT");
9779  if(!lua_isnumber(L,8)) SWIG_fail_arg("plstripc",8,"PLFLT");
9780  if(!lua_isnumber(L,9)) SWIG_fail_arg("plstripc",9,"PLFLT");
9781  if(!lua_isnumber(L,10)) SWIG_fail_arg("plstripc",10,"PLBOOL");
9782  if(!lua_isnumber(L,11)) SWIG_fail_arg("plstripc",11,"PLBOOL");
9783  if(!lua_isnumber(L,12)) SWIG_fail_arg("plstripc",12,"PLINT");
9784  if(!lua_isnumber(L,13)) SWIG_fail_arg("plstripc",13,"PLINT");
9785  if(!lua_istable(L,16)) SWIG_fail_arg("plstripc",16,"char const *[4]");
9786  if(!SWIG_lua_isnilstring(L,17)) SWIG_fail_arg("plstripc",17,"char const *");
9787  if(!SWIG_lua_isnilstring(L,18)) SWIG_fail_arg("plstripc",18,"char const *");
9788  if(!SWIG_lua_isnilstring(L,19)) SWIG_fail_arg("plstripc",19,"char const *");
9789  arg2 = (char *)lua_tostring(L, 1);
9790  arg3 = (char *)lua_tostring(L, 2);
9791  arg4 = (PLFLT)lua_tonumber(L, 3);
9792  arg5 = (PLFLT)lua_tonumber(L, 4);
9793  arg6 = (PLFLT)lua_tonumber(L, 5);
9794  arg7 = (PLFLT)lua_tonumber(L, 6);
9795  arg8 = (PLFLT)lua_tonumber(L, 7);
9796  arg9 = (PLFLT)lua_tonumber(L, 8);
9797  arg10 = (PLFLT)lua_tonumber(L, 9);
9798  arg11 = (PLBOOL)lua_tonumber(L, 10);
9799  arg12 = (PLBOOL)lua_tonumber(L, 11);
9800  arg13 = (PLINT)lua_tonumber(L, 12);
9801  arg14 = (PLINT)lua_tonumber(L, 13);
9802  {
9803  arg15 = (PLINT *) LUA_get_int_num_array_var( L, 14, &temp15 );
9804  if ( !arg15 )
9805  SWIG_fail;
9806  Alen = temp15;
9807  }
9808  {
9809  arg16 = (PLINT *) LUA_get_int_num_array_var( L, 15, &temp16 );
9810  if ( !arg16 )
9811  SWIG_fail;
9812  if ( temp16 != Alen )
9813  {
9814  lua_pushfstring( L, "Tables must be of same length." );
9815  SWIG_fail;
9816  }
9817  }
9818  {
9819  int i;
9820  arg17 = NULL;
9821 
9822  if ( SWIG_table_size( L, 16 ) != 4 )
9823  {
9824  lua_pushfstring( L, "Requires a sequence of 4 strings." );
9825  SWIG_fail;
9826  }
9827  if ( Alen != 4 )
9828  {
9829  lua_pushfstring( L, "colline and styline args must be length 4." );
9830  SWIG_fail;
9831  }
9832 
9833  arg17 = malloc( sizeof ( char* ) * 4 );
9834  for ( i = 1; i <= 4; i++ )
9835  {
9836  lua_rawgeti( L, 16, i );
9837  if ( lua_isstring( L, -1 ) )
9838  {
9839  arg17[i - 1] = (char *) lua_tostring( L, -1 );
9840  }
9841  else
9842  {
9843  lua_pop( L, 1 );
9844  lua_pushfstring( L, "Requires a sequence of 4 strings." );
9845  SWIG_fail;
9846  // arg17 array is freed after 'fail:'
9847  }
9848  lua_pop( L, 1 );
9849  }
9850  }
9851  arg18 = (char *)lua_tostring(L, 17);
9852  arg19 = (char *)lua_tostring(L, 18);
9853  arg20 = (char *)lua_tostring(L, 19);
9854  plstripc(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,(int const *)arg15,(int const *)arg16,(char const *(*))arg17,(char const *)arg18,(char const *)arg19,(char const *)arg20);
9855 
9856  lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
9857  {
9858  LUA_FREE_ARRAY( arg15 );
9859  }
9860  {
9861  LUA_FREE_ARRAY( arg16 );
9862  }
9863  {
9864  if ( arg17 )
9865  {
9866  free( arg17 ); arg17 = NULL;
9867  }
9868  }
9869  return SWIG_arg;
9870 
9871  if(0) SWIG_fail;
9872 
9873 fail:
9874  {
9875  LUA_FREE_ARRAY( arg15 );
9876  }
9877  {
9878  LUA_FREE_ARRAY( arg16 );
9879  }
9880  {
9881  if ( arg17 )
9882  {
9883  free( arg17 ); arg17 = NULL;
9884  }
9885  }
9886  lua_error(L);
9887  return SWIG_arg;
9888 }
9889 
9890 
9891 static int _wrap_stripd(lua_State* L) {
9892  int SWIG_arg = 0;
9893  PLINT arg1 ;
9894 
9895  SWIG_check_num_args("plstripd",1,1)
9896  if(!lua_isnumber(L,1)) SWIG_fail_arg("plstripd",1,"PLINT");
9897  arg1 = (PLINT)lua_tonumber(L, 1);
9898  plstripd(arg1);
9899 
9900  return SWIG_arg;
9901 
9902  if(0) SWIG_fail;
9903 
9904 fail:
9905  lua_error(L);
9906  return SWIG_arg;
9907 }
9908 
9909 
9910 static int _wrap_styl(lua_State* L) {
9911  int SWIG_arg = 0;
9912  PLINT arg1 ;
9913  PLINT *arg2 = (PLINT *) 0 ;
9914  PLINT *arg3 = (PLINT *) 0 ;
9915  int temp3 ;
9916 
9917  SWIG_check_num_args("plstyl",2,2)
9918  {
9919  arg2 = (PLINT *) LUA_get_int_num_array_var( L, 1, &arg1 );
9920  if ( !arg2 )
9921  SWIG_fail;
9922  Alen = arg1;
9923  }
9924  {
9925  arg3 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp3 );
9926  if ( !arg3 )
9927  SWIG_fail;
9928  if ( temp3 != Alen )
9929  {
9930  lua_pushfstring( L, "Tables must be of same length." );
9931  SWIG_fail;
9932  }
9933  }
9934  plstyl(arg1,(int const *)arg2,(int const *)arg3);
9935 
9936  {
9937  LUA_FREE_ARRAY( arg2 );
9938  }
9939  {
9940  LUA_FREE_ARRAY( arg3 );
9941  }
9942  return SWIG_arg;
9943 
9944  if(0) SWIG_fail;
9945 
9946 fail:
9947  {
9948  LUA_FREE_ARRAY( arg2 );
9949  }
9950  {
9951  LUA_FREE_ARRAY( arg3 );
9952  }
9953  lua_error(L);
9954  return SWIG_arg;
9955 }
9956 
9957 
9958 static int _wrap_svect(lua_State* L) {
9959  int SWIG_arg = 0;
9960  PLFLT *arg1 = (PLFLT *) 0 ;
9961  PLFLT *arg2 = (PLFLT *) 0 ;
9962  PLINT arg3 ;
9963  PLBOOL arg4 ;
9964 
9965  SWIG_check_num_args("plsvect",3,3)
9966  if(!lua_isnumber(L,3)) SWIG_fail_arg("plsvect",3,"PLBOOL");
9967  {
9968  int temp;
9969  arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
9970  if ( !arg1 )
9971  SWIG_fail;
9972  Alen = temp;
9973  }
9974  {
9975  int temp;
9976  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
9977  if ( !arg2 )
9978  SWIG_fail;
9979  if ( temp != Alen )
9980  {
9981  lua_pushfstring( L, "Tables must be of same length." );
9982  SWIG_fail;
9983  }
9984  arg3 = temp;
9985  }
9986  arg4 = (PLBOOL)lua_tonumber(L, 3);
9987  plsvect((double const *)arg1,(double const *)arg2,arg3,arg4);
9988 
9989  {
9990  LUA_FREE_ARRAY( arg1 );
9991  }
9992  {
9993  LUA_FREE_ARRAY( arg2 );
9994  }
9995  return SWIG_arg;
9996 
9997  if(0) SWIG_fail;
9998 
9999 fail:
10000  {
10001  LUA_FREE_ARRAY( arg1 );
10002  }
10003  {
10004  LUA_FREE_ARRAY( arg2 );
10005  }
10006  lua_error(L);
10007  return SWIG_arg;
10008 }
10009 
10010 
10011 static int _wrap_svpa(lua_State* L) {
10012  int SWIG_arg = 0;
10013  PLFLT arg1 ;
10014  PLFLT arg2 ;
10015  PLFLT arg3 ;
10016  PLFLT arg4 ;
10017 
10018  SWIG_check_num_args("plsvpa",4,4)
10019  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsvpa",1,"PLFLT");
10020  if(!lua_isnumber(L,2)) SWIG_fail_arg("plsvpa",2,"PLFLT");
10021  if(!lua_isnumber(L,3)) SWIG_fail_arg("plsvpa",3,"PLFLT");
10022  if(!lua_isnumber(L,4)) SWIG_fail_arg("plsvpa",4,"PLFLT");
10023  arg1 = (PLFLT)lua_tonumber(L, 1);
10024  arg2 = (PLFLT)lua_tonumber(L, 2);
10025  arg3 = (PLFLT)lua_tonumber(L, 3);
10026  arg4 = (PLFLT)lua_tonumber(L, 4);
10027  plsvpa(arg1,arg2,arg3,arg4);
10028 
10029  return SWIG_arg;
10030 
10031  if(0) SWIG_fail;
10032 
10033 fail:
10034  lua_error(L);
10035  return SWIG_arg;
10036 }
10037 
10038 
10039 static int _wrap_sxax(lua_State* L) {
10040  int SWIG_arg = 0;
10041  PLINT arg1 ;
10042  PLINT arg2 ;
10043 
10044  SWIG_check_num_args("plsxax",2,2)
10045  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsxax",1,"PLINT");
10046  if(!lua_isnumber(L,2)) SWIG_fail_arg("plsxax",2,"PLINT");
10047  arg1 = (PLINT)lua_tonumber(L, 1);
10048  arg2 = (PLINT)lua_tonumber(L, 2);
10049  plsxax(arg1,arg2);
10050 
10051  return SWIG_arg;
10052 
10053  if(0) SWIG_fail;
10054 
10055 fail:
10056  lua_error(L);
10057  return SWIG_arg;
10058 }
10059 
10060 
10061 static int _wrap_syax(lua_State* L) {
10062  int SWIG_arg = 0;
10063  PLINT arg1 ;
10064  PLINT arg2 ;
10065 
10066  SWIG_check_num_args("plsyax",2,2)
10067  if(!lua_isnumber(L,1)) SWIG_fail_arg("plsyax",1,"PLINT");
10068  if(!lua_isnumber(L,2)) SWIG_fail_arg("plsyax",2,"PLINT");
10069  arg1 = (PLINT)lua_tonumber(L, 1);
10070  arg2 = (PLINT)lua_tonumber(L, 2);
10071  plsyax(arg1,arg2);
10072 
10073  return SWIG_arg;
10074 
10075  if(0) SWIG_fail;
10076 
10077 fail:
10078  lua_error(L);
10079  return SWIG_arg;
10080 }
10081 
10082 
10083 static int _wrap_sym(lua_State* L) {
10084  int SWIG_arg = 0;
10085  PLINT arg1 ;
10086  PLFLT *arg2 = (PLFLT *) 0 ;
10087  PLFLT *arg3 = (PLFLT *) 0 ;
10088  PLINT arg4 ;
10089  int temp3 ;
10090 
10091  SWIG_check_num_args("plsym",3,3)
10092  if(!lua_isnumber(L,3)) SWIG_fail_arg("plsym",3,"PLINT");
10093  {
10094  int temp;
10095  arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10096  if ( !arg2 )
10097  SWIG_fail;
10098  arg1 = Alen = temp;
10099  }
10100  {
10101  arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10102  if ( !arg3 )
10103  SWIG_fail;
10104  if ( temp3 != Alen )
10105  {
10106  lua_pushfstring( L, "Tables must be of same length." );
10107  SWIG_fail;
10108  }
10109  }
10110  arg4 = (PLINT)lua_tonumber(L, 3);
10111  plsym(arg1,(double const *)arg2,(double const *)arg3,arg4);
10112 
10113  {
10114  LUA_FREE_ARRAY( arg2 );
10115  }
10116  {
10117  LUA_FREE_ARRAY( arg3 );
10118  }
10119  return SWIG_arg;
10120 
10121  if(0) SWIG_fail;
10122 
10123 fail:
10124  {
10125  LUA_FREE_ARRAY( arg2 );
10126  }
10127  {
10128  LUA_FREE_ARRAY( arg3 );
10129  }
10130  lua_error(L);
10131  return SWIG_arg;
10132 }
10133 
10134 
10135 static int _wrap_szax(lua_State* L) {
10136  int SWIG_arg = 0;
10137  PLINT arg1 ;
10138  PLINT arg2 ;
10139 
10140  SWIG_check_num_args("plszax",2,2)
10141  if(!lua_isnumber(L,1)) SWIG_fail_arg("plszax",1,"PLINT");
10142  if(!lua_isnumber(L,2)) SWIG_fail_arg("plszax",2,"PLINT");
10143  arg1 = (PLINT)lua_tonumber(L, 1);
10144  arg2 = (PLINT)lua_tonumber(L, 2);
10145  plszax(arg1,arg2);
10146 
10147  return SWIG_arg;
10148 
10149  if(0) SWIG_fail;
10150 
10151 fail:
10152  lua_error(L);
10153  return SWIG_arg;
10154 }
10155 
10156 
10157 static int _wrap_text(lua_State* L) {
10158  int SWIG_arg = 0;
10159 
10160  SWIG_check_num_args("pltext",0,0)
10161  pltext();
10162 
10163  return SWIG_arg;
10164 
10165  if(0) SWIG_fail;
10166 
10167 fail:
10168  lua_error(L);
10169  return SWIG_arg;
10170 }
10171 
10172 
10173 static int _wrap_timefmt(lua_State* L) {
10174  int SWIG_arg = 0;
10175  char *arg1 = (char *) 0 ;
10176 
10177  SWIG_check_num_args("pltimefmt",1,1)
10178  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("pltimefmt",1,"char const *");
10179  arg1 = (char *)lua_tostring(L, 1);
10180  pltimefmt((char const *)arg1);
10181 
10182  return SWIG_arg;
10183 
10184  if(0) SWIG_fail;
10185 
10186 fail:
10187  lua_error(L);
10188  return SWIG_arg;
10189 }
10190 
10191 
10192 static int _wrap_vasp(lua_State* L) {
10193  int SWIG_arg = 0;
10194  PLFLT arg1 ;
10195 
10196  SWIG_check_num_args("plvasp",1,1)
10197  if(!lua_isnumber(L,1)) SWIG_fail_arg("plvasp",1,"PLFLT");
10198  arg1 = (PLFLT)lua_tonumber(L, 1);
10199  plvasp(arg1);
10200 
10201  return SWIG_arg;
10202 
10203  if(0) SWIG_fail;
10204 
10205 fail:
10206  lua_error(L);
10207  return SWIG_arg;
10208 }
10209 
10210 
10211 static int _wrap_vect(lua_State* L) {
10212  int SWIG_arg = 0;
10213  PLFLT **arg1 = (PLFLT **) 0 ;
10214  PLFLT **arg2 = (PLFLT **) 0 ;
10215  PLINT arg3 ;
10216  PLINT arg4 ;
10217  PLFLT arg5 ;
10218  pltr_func arg6 = (pltr_func) 0 ;
10219  PLPointer arg7 = (PLPointer) 0 ;
10220  int ii1 ;
10221  int ii2 ;
10222  PLcGrid cgrid17 ;
10223  PLcGrid2 cgrid27 ;
10224 
10225  {
10226  cgrid17.xg = cgrid17.yg = cgrid17.zg = NULL;
10227  cgrid17.nx = cgrid17.ny = cgrid17.nz = 0;
10228  cgrid27.xg = cgrid27.yg = cgrid27.zg = NULL;
10229  cgrid27.nx = cgrid27.ny = 0;
10230  }
10231  {
10232  arg6 = NULL;
10233  }
10234  {
10235  arg7 = NULL;
10236  }
10237  SWIG_check_num_args("plvect",3,5)
10238  if(!lua_isnumber(L,3)) SWIG_fail_arg("plvect",3,"PLFLT");
10239  {
10240  int jj;
10241 
10242  arg1 = read_double_Matrix( L, 1, &ii1, &jj );
10243  if ( !arg1 )
10244  SWIG_fail;
10245  Xlen = ii1;
10246  Ylen = jj;
10247  }
10248  {
10249  int jj;
10250 
10251  arg2 = read_double_Matrix( L, 2, &ii2, &jj );
10252  if ( !arg2 )
10253  SWIG_fail;
10254  arg3 = ii2;
10255  arg4 = jj;
10256  if ( ( arg3 != Xlen ) || ( arg4 != Ylen ) )
10257  {
10258  lua_pushfstring( L, "Vectors must match matrix." );
10259  SWIG_fail;
10260  }
10261  }
10262  arg5 = (PLFLT)lua_tonumber(L, 3);
10263  if(lua_gettop(L)>=4){
10264  {
10265  arg6 = NULL;
10266  mypltr_funcstr[0] = '\0';
10267 
10268  if ( lua_isstring( L, 4 ) )
10269  {
10270  const char* funcstr = lua_tostring( L, 4 );
10271  if ( strcmp( "pltr0", funcstr ) == 0 )
10272  {
10273  arg6 = pltr0;
10274  }
10275  else if ( strcmp( "pltr1", funcstr ) == 0 )
10276  {
10277  arg6 = pltr1;
10278  }
10279  else if ( strcmp( "pltr2", funcstr ) == 0 )
10280  {
10281  arg6 = pltr2;
10282  }
10283  else
10284  {
10285  arg6 = mypltr;
10286  strncpy( mypltr_funcstr, funcstr, 255 );
10287  myL = L;
10288  }
10289  }
10290  else
10291  SWIG_fail_arg( "vect", 6, "pltr_func" );
10292  }
10293  }
10294  if(lua_gettop(L)>=5){
10295  {
10296  int nx, ny;
10297  int gridmode = 0;
10298 
10299  lua_pushstring( L, "xg" );
10300  lua_gettable( L, 5 );
10301  if ( !lua_istable( L, -1 ) )
10302  {
10303  lua_pop( L, 1 ); // pop "xg"
10304  lua_pushstring( L, "expected a table xg" );
10305  SWIG_fail;
10306  }
10307  lua_rawgeti( L, -1, 1 );
10308  if ( lua_istable( L, -1 ) )
10309  gridmode = 2; // two dimensional array
10310  else if ( lua_isnumber( L, -1 ) )
10311  gridmode = 1; // one dimensional array
10312  else
10313  {
10314  lua_pop( L, 1 ); // pop "1"
10315  lua_pop( L, 1 ); // pop "xg"
10316  lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
10317  SWIG_fail;
10318  }
10319  lua_pop( L, 1 ); // pop test element
10320  if ( gridmode == 1 )
10321  {
10322  cgrid17.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
10323  if ( !cgrid17.xg )
10324  {
10325  lua_pop( L, 1 ); // pop "xg"
10326  SWIG_fail;
10327  }
10328  if ( nx != Xlen )
10329  {
10330  lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
10331  SWIG_fail;
10332  }
10333  cgrid17.nx = nx;
10334  }
10335  else
10336  {
10337  cgrid27.xg = read_double_Matrix( L, -1, &nx, &ny );
10338  if ( !cgrid27.xg )
10339  {
10340  lua_pop( L, 1 ); // pop "xg"
10341  SWIG_fail;
10342  }
10343  if ( ( nx != Xlen ) || ( ny != Ylen ) )
10344  {
10345  lua_pop( L, 1 ); // pop "xg"
10346  lua_pushfstring( L, "Vectors must match matrix." );
10347  SWIG_fail;
10348  }
10349  cgrid27.nx = nx;
10350  cgrid27.ny = ny;
10351  }
10352  lua_pop( L, 1 ); // pop "xg"
10353 
10354  lua_pushstring( L, "yg" );
10355  lua_gettable( L, 5 );
10356  if ( !lua_istable( L, -1 ) )
10357  {
10358  lua_pop( L, 1 );
10359  lua_pushstring( L, "expected a table yg" );
10360  SWIG_fail;
10361  }
10362  lua_rawgeti( L, -1, 1 );
10363  if ( gridmode == 2 )
10364  {
10365  if ( !lua_istable( L, -1 ) )
10366  {
10367  lua_pop( L, 1 ); // pop "1"
10368  lua_pop( L, 1 ); // pop "yg"
10369  lua_pushstring( L, "expected a two dimensional array/table in yg" );
10370  SWIG_fail;
10371  }
10372  }
10373  else
10374  {
10375  if ( !lua_isnumber( L, -1 ) )
10376  {
10377  lua_pop( L, 1 ); // pop "1"
10378  lua_pop( L, 1 ); // pop "yg"
10379  lua_pushstring( L, "expected a one dimensional array/table in yg" );
10380  SWIG_fail;
10381  }
10382  }
10383  lua_pop( L, 1 ); // pop "1"
10384  if ( gridmode == 1 )
10385  {
10386  cgrid17.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
10387  if ( !cgrid17.yg )
10388  {
10389  lua_pop( L, 1 ); // pop "yg"
10390  SWIG_fail;
10391  }
10392  if ( ny != Ylen )
10393  {
10394  lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
10395  SWIG_fail;
10396  }
10397  cgrid17.ny = ny;
10398  }
10399  else
10400  {
10401  cgrid27.yg = read_double_Matrix( L, -1, &nx, &ny );
10402  if ( !cgrid27.yg )
10403  {
10404  lua_pop( L, 1 ); // pop "xg"
10405  SWIG_fail;
10406  }
10407  if ( ( nx != Xlen ) || ( ny != Ylen ) )
10408  {
10409  lua_pop( L, 1 ); // pop "xg"
10410  lua_pushfstring( L, "Vectors must match matrix." );
10411  SWIG_fail;
10412  }
10413  // cgrid27.nx/ny already set
10414  }
10415  lua_pop( L, 1 ); // pop "yg"
10416 
10417  if ( gridmode == 1 )
10418  arg7 = &cgrid17;
10419  else if ( gridmode == 2 )
10420  arg7 = &cgrid27;
10421  }
10422  }
10423  plvect((double const **)arg1,(double const **)arg2,arg3,arg4,arg5,arg6,arg7);
10424 
10425  {
10426  int i;
10427 
10428  if ( arg1 )
10429  {
10430  for ( i = 0; i < ii1; i++ )
10431  LUA_FREE_ARRAY( arg1[i] );
10432  LUA_FREE_ARRAY( arg1 );
10433  }
10434  }
10435  {
10436  int i;
10437 
10438  if ( arg2 )
10439  {
10440  for ( i = 0; i < ii2; i++ )
10441  LUA_FREE_ARRAY( arg2[i] );
10442  LUA_FREE_ARRAY( arg2 );
10443  }
10444  }
10445  {
10446  mypltr_funcstr[0] = '\0';
10447  }
10448  {
10449  int i;
10450 
10451  LUA_FREE_ARRAY( cgrid17.xg );
10452  LUA_FREE_ARRAY( cgrid17.yg );
10453 
10454  if ( cgrid27.xg )
10455  {
10456  for ( i = 0; i < Xlen; i++ )
10457  LUA_FREE_ARRAY( cgrid27.xg[i] );
10458  LUA_FREE_ARRAY( cgrid27.xg );
10459  }
10460  if ( cgrid27.yg )
10461  {
10462  for ( i = 0; i < Xlen; i++ )
10463  LUA_FREE_ARRAY( cgrid27.yg[i] );
10464  LUA_FREE_ARRAY( cgrid27.yg );
10465  }
10466  }
10467  return SWIG_arg;
10468 
10469  if(0) SWIG_fail;
10470 
10471 fail:
10472  {
10473  int i;
10474 
10475  if ( arg1 )
10476  {
10477  for ( i = 0; i < ii1; i++ )
10478  LUA_FREE_ARRAY( arg1[i] );
10479  LUA_FREE_ARRAY( arg1 );
10480  }
10481  }
10482  {
10483  int i;
10484 
10485  if ( arg2 )
10486  {
10487  for ( i = 0; i < ii2; i++ )
10488  LUA_FREE_ARRAY( arg2[i] );
10489  LUA_FREE_ARRAY( arg2 );
10490  }
10491  }
10492  {
10493  mypltr_funcstr[0] = '\0';
10494  }
10495  {
10496  int i;
10497 
10498  LUA_FREE_ARRAY( cgrid17.xg );
10499  LUA_FREE_ARRAY( cgrid17.yg );
10500 
10501  if ( cgrid27.xg )
10502  {
10503  for ( i = 0; i < Xlen; i++ )
10504  LUA_FREE_ARRAY( cgrid27.xg[i] );
10505  LUA_FREE_ARRAY( cgrid27.xg );
10506  }
10507  if ( cgrid27.yg )
10508  {
10509  for ( i = 0; i < Xlen; i++ )
10510  LUA_FREE_ARRAY( cgrid27.yg[i] );
10511  LUA_FREE_ARRAY( cgrid27.yg );
10512  }
10513  }
10514  lua_error(L);
10515  return SWIG_arg;
10516 }
10517 
10518 
10519 static int _wrap_vpas(lua_State* L) {
10520  int SWIG_arg = 0;
10521  PLFLT arg1 ;
10522  PLFLT arg2 ;
10523  PLFLT arg3 ;
10524  PLFLT arg4 ;
10525  PLFLT arg5 ;
10526 
10527  SWIG_check_num_args("plvpas",5,5)
10528  if(!lua_isnumber(L,1)) SWIG_fail_arg("plvpas",1,"PLFLT");
10529  if(!lua_isnumber(L,2)) SWIG_fail_arg("plvpas",2,"PLFLT");
10530  if(!lua_isnumber(L,3)) SWIG_fail_arg("plvpas",3,"PLFLT");
10531  if(!lua_isnumber(L,4)) SWIG_fail_arg("plvpas",4,"PLFLT");
10532  if(!lua_isnumber(L,5)) SWIG_fail_arg("plvpas",5,"PLFLT");
10533  arg1 = (PLFLT)lua_tonumber(L, 1);
10534  arg2 = (PLFLT)lua_tonumber(L, 2);
10535  arg3 = (PLFLT)lua_tonumber(L, 3);
10536  arg4 = (PLFLT)lua_tonumber(L, 4);
10537  arg5 = (PLFLT)lua_tonumber(L, 5);
10538  plvpas(arg1,arg2,arg3,arg4,arg5);
10539 
10540  return SWIG_arg;
10541 
10542  if(0) SWIG_fail;
10543 
10544 fail:
10545  lua_error(L);
10546  return SWIG_arg;
10547 }
10548 
10549 
10550 static int _wrap_vpor(lua_State* L) {
10551  int SWIG_arg = 0;
10552  PLFLT arg1 ;
10553  PLFLT arg2 ;
10554  PLFLT arg3 ;
10555  PLFLT arg4 ;
10556 
10557  SWIG_check_num_args("plvpor",4,4)
10558  if(!lua_isnumber(L,1)) SWIG_fail_arg("plvpor",1,"PLFLT");
10559  if(!lua_isnumber(L,2)) SWIG_fail_arg("plvpor",2,"PLFLT");
10560  if(!lua_isnumber(L,3)) SWIG_fail_arg("plvpor",3,"PLFLT");
10561  if(!lua_isnumber(L,4)) SWIG_fail_arg("plvpor",4,"PLFLT");
10562  arg1 = (PLFLT)lua_tonumber(L, 1);
10563  arg2 = (PLFLT)lua_tonumber(L, 2);
10564  arg3 = (PLFLT)lua_tonumber(L, 3);
10565  arg4 = (PLFLT)lua_tonumber(L, 4);
10566  plvpor(arg1,arg2,arg3,arg4);
10567 
10568  return SWIG_arg;
10569 
10570  if(0) SWIG_fail;
10571 
10572 fail:
10573  lua_error(L);
10574  return SWIG_arg;
10575 }
10576 
10577 
10578 static int _wrap_vsta(lua_State* L) {
10579  int SWIG_arg = 0;
10580 
10581  SWIG_check_num_args("plvsta",0,0)
10582  plvsta();
10583 
10584  return SWIG_arg;
10585 
10586  if(0) SWIG_fail;
10587 
10588 fail:
10589  lua_error(L);
10590  return SWIG_arg;
10591 }
10592 
10593 
10594 static int _wrap_w3d(lua_State* L) {
10595  int SWIG_arg = 0;
10596  PLFLT arg1 ;
10597  PLFLT arg2 ;
10598  PLFLT arg3 ;
10599  PLFLT arg4 ;
10600  PLFLT arg5 ;
10601  PLFLT arg6 ;
10602  PLFLT arg7 ;
10603  PLFLT arg8 ;
10604  PLFLT arg9 ;
10605  PLFLT arg10 ;
10606  PLFLT arg11 ;
10607 
10608  SWIG_check_num_args("plw3d",11,11)
10609  if(!lua_isnumber(L,1)) SWIG_fail_arg("plw3d",1,"PLFLT");
10610  if(!lua_isnumber(L,2)) SWIG_fail_arg("plw3d",2,"PLFLT");
10611  if(!lua_isnumber(L,3)) SWIG_fail_arg("plw3d",3,"PLFLT");
10612  if(!lua_isnumber(L,4)) SWIG_fail_arg("plw3d",4,"PLFLT");
10613  if(!lua_isnumber(L,5)) SWIG_fail_arg("plw3d",5,"PLFLT");
10614  if(!lua_isnumber(L,6)) SWIG_fail_arg("plw3d",6,"PLFLT");
10615  if(!lua_isnumber(L,7)) SWIG_fail_arg("plw3d",7,"PLFLT");
10616  if(!lua_isnumber(L,8)) SWIG_fail_arg("plw3d",8,"PLFLT");
10617  if(!lua_isnumber(L,9)) SWIG_fail_arg("plw3d",9,"PLFLT");
10618  if(!lua_isnumber(L,10)) SWIG_fail_arg("plw3d",10,"PLFLT");
10619  if(!lua_isnumber(L,11)) SWIG_fail_arg("plw3d",11,"PLFLT");
10620  arg1 = (PLFLT)lua_tonumber(L, 1);
10621  arg2 = (PLFLT)lua_tonumber(L, 2);
10622  arg3 = (PLFLT)lua_tonumber(L, 3);
10623  arg4 = (PLFLT)lua_tonumber(L, 4);
10624  arg5 = (PLFLT)lua_tonumber(L, 5);
10625  arg6 = (PLFLT)lua_tonumber(L, 6);
10626  arg7 = (PLFLT)lua_tonumber(L, 7);
10627  arg8 = (PLFLT)lua_tonumber(L, 8);
10628  arg9 = (PLFLT)lua_tonumber(L, 9);
10629  arg10 = (PLFLT)lua_tonumber(L, 10);
10630  arg11 = (PLFLT)lua_tonumber(L, 11);
10631  plw3d(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
10632 
10633  return SWIG_arg;
10634 
10635  if(0) SWIG_fail;
10636 
10637 fail:
10638  lua_error(L);
10639  return SWIG_arg;
10640 }
10641 
10642 
10643 static int _wrap_width(lua_State* L) {
10644  int SWIG_arg = 0;
10645  PLINT arg1 ;
10646 
10647  SWIG_check_num_args("plwidth",1,1)
10648  if(!lua_isnumber(L,1)) SWIG_fail_arg("plwidth",1,"PLINT");
10649  arg1 = (PLINT)lua_tonumber(L, 1);
10650  plwidth(arg1);
10651 
10652  return SWIG_arg;
10653 
10654  if(0) SWIG_fail;
10655 
10656 fail:
10657  lua_error(L);
10658  return SWIG_arg;
10659 }
10660 
10661 
10662 static int _wrap_wind(lua_State* L) {
10663  int SWIG_arg = 0;
10664  PLFLT arg1 ;
10665  PLFLT arg2 ;
10666  PLFLT arg3 ;
10667  PLFLT arg4 ;
10668 
10669  SWIG_check_num_args("plwind",4,4)
10670  if(!lua_isnumber(L,1)) SWIG_fail_arg("plwind",1,"PLFLT");
10671  if(!lua_isnumber(L,2)) SWIG_fail_arg("plwind",2,"PLFLT");
10672  if(!lua_isnumber(L,3)) SWIG_fail_arg("plwind",3,"PLFLT");
10673  if(!lua_isnumber(L,4)) SWIG_fail_arg("plwind",4,"PLFLT");
10674  arg1 = (PLFLT)lua_tonumber(L, 1);
10675  arg2 = (PLFLT)lua_tonumber(L, 2);
10676  arg3 = (PLFLT)lua_tonumber(L, 3);
10677  arg4 = (PLFLT)lua_tonumber(L, 4);
10678  plwind(arg1,arg2,arg3,arg4);
10679 
10680  return SWIG_arg;
10681 
10682  if(0) SWIG_fail;
10683 
10684 fail:
10685  lua_error(L);
10686  return SWIG_arg;
10687 }
10688 
10689 
10690 static int _wrap_xormod(lua_State* L) {
10691  int SWIG_arg = 0;
10692  PLBOOL arg1 ;
10693  PLBOOL *arg2 = (PLBOOL *) 0 ;
10694  PLBOOL temp2 ;
10695 
10696  arg2 = &temp2;
10697  SWIG_check_num_args("plxormod",1,1)
10698  if(!lua_isnumber(L,1)) SWIG_fail_arg("plxormod",1,"PLBOOL");
10699  arg1 = (PLBOOL)lua_tonumber(L, 1);
10700  plxormod(arg1,arg2);
10701 
10702  lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
10703  return SWIG_arg;
10704 
10705  if(0) SWIG_fail;
10706 
10707 fail:
10708  lua_error(L);
10709  return SWIG_arg;
10710 }
10711 
10712 
10713 static int _wrap_map(lua_State* L) {
10714  int SWIG_arg = 0;
10715  mapform_func arg1 = (mapform_func) 0 ;
10716  char *arg2 = (char *) 0 ;
10717  PLFLT arg3 ;
10718  PLFLT arg4 ;
10719  PLFLT arg5 ;
10720  PLFLT arg6 ;
10721 
10722  SWIG_check_num_args("plmap",6,6)
10723  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmap",2,"char const *");
10724  if(!lua_isnumber(L,3)) SWIG_fail_arg("plmap",3,"PLFLT");
10725  if(!lua_isnumber(L,4)) SWIG_fail_arg("plmap",4,"PLFLT");
10726  if(!lua_isnumber(L,5)) SWIG_fail_arg("plmap",5,"PLFLT");
10727  if(!lua_isnumber(L,6)) SWIG_fail_arg("plmap",6,"PLFLT");
10728  {
10729  arg1 = NULL;
10730  mapform_funcstr[0] = '\0';
10731 
10732  if ( lua_isnil( L, 1 ) )
10733  {
10734  arg1 = NULL;
10735  }
10736  else if ( lua_isstring( L, 1 ) )
10737  {
10738  arg1 = mapform;
10739  strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
10740  myL = L;
10741  }
10742  else
10743  SWIG_fail_arg( "map", 1, "mapform_func" );
10744  }
10745  arg2 = (char *)lua_tostring(L, 2);
10746  arg3 = (PLFLT)lua_tonumber(L, 3);
10747  arg4 = (PLFLT)lua_tonumber(L, 4);
10748  arg5 = (PLFLT)lua_tonumber(L, 5);
10749  arg6 = (PLFLT)lua_tonumber(L, 6);
10750  plmap(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
10751 
10752  {
10753  mapform_funcstr[0] = '\0';
10754  }
10755  return SWIG_arg;
10756 
10757  if(0) SWIG_fail;
10758 
10759 fail:
10760  {
10761  mapform_funcstr[0] = '\0';
10762  }
10763  lua_error(L);
10764  return SWIG_arg;
10765 }
10766 
10767 
10768 static int _wrap_meridians(lua_State* L) {
10769  int SWIG_arg = 0;
10770  mapform_func arg1 = (mapform_func) 0 ;
10771  PLFLT arg2 ;
10772  PLFLT arg3 ;
10773  PLFLT arg4 ;
10774  PLFLT arg5 ;
10775  PLFLT arg6 ;
10776  PLFLT arg7 ;
10777 
10778  SWIG_check_num_args("plmeridians",7,7)
10779  if(!lua_isnumber(L,2)) SWIG_fail_arg("plmeridians",2,"PLFLT");
10780  if(!lua_isnumber(L,3)) SWIG_fail_arg("plmeridians",3,"PLFLT");
10781  if(!lua_isnumber(L,4)) SWIG_fail_arg("plmeridians",4,"PLFLT");
10782  if(!lua_isnumber(L,5)) SWIG_fail_arg("plmeridians",5,"PLFLT");
10783  if(!lua_isnumber(L,6)) SWIG_fail_arg("plmeridians",6,"PLFLT");
10784  if(!lua_isnumber(L,7)) SWIG_fail_arg("plmeridians",7,"PLFLT");
10785  {
10786  arg1 = NULL;
10787  mapform_funcstr[0] = '\0';
10788 
10789  if ( lua_isnil( L, 1 ) )
10790  {
10791  arg1 = NULL;
10792  }
10793  else if ( lua_isstring( L, 1 ) )
10794  {
10795  arg1 = mapform;
10796  strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
10797  myL = L;
10798  }
10799  else
10800  SWIG_fail_arg( "meridians", 1, "mapform_func" );
10801  }
10802  arg2 = (PLFLT)lua_tonumber(L, 2);
10803  arg3 = (PLFLT)lua_tonumber(L, 3);
10804  arg4 = (PLFLT)lua_tonumber(L, 4);
10805  arg5 = (PLFLT)lua_tonumber(L, 5);
10806  arg6 = (PLFLT)lua_tonumber(L, 6);
10807  arg7 = (PLFLT)lua_tonumber(L, 7);
10808  plmeridians(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
10809 
10810  {
10811  mapform_funcstr[0] = '\0';
10812  }
10813  return SWIG_arg;
10814 
10815  if(0) SWIG_fail;
10816 
10817 fail:
10818  {
10819  mapform_funcstr[0] = '\0';
10820  }
10821  lua_error(L);
10822  return SWIG_arg;
10823 }
10824 
10825 
10826 static int _wrap_image(lua_State* L) {
10827  int SWIG_arg = 0;
10828  PLFLT **arg1 = (PLFLT **) 0 ;
10829  PLINT arg2 ;
10830  PLINT arg3 ;
10831  PLFLT arg4 ;
10832  PLFLT arg5 ;
10833  PLFLT arg6 ;
10834  PLFLT arg7 ;
10835  PLFLT arg8 ;
10836  PLFLT arg9 ;
10837  PLFLT arg10 ;
10838  PLFLT arg11 ;
10839  PLFLT arg12 ;
10840  PLFLT arg13 ;
10841  int ii1 ;
10842 
10843  SWIG_check_num_args("plimage",11,11)
10844  if(!lua_isnumber(L,2)) SWIG_fail_arg("plimage",2,"PLFLT");
10845  if(!lua_isnumber(L,3)) SWIG_fail_arg("plimage",3,"PLFLT");
10846  if(!lua_isnumber(L,4)) SWIG_fail_arg("plimage",4,"PLFLT");
10847  if(!lua_isnumber(L,5)) SWIG_fail_arg("plimage",5,"PLFLT");
10848  if(!lua_isnumber(L,6)) SWIG_fail_arg("plimage",6,"PLFLT");
10849  if(!lua_isnumber(L,7)) SWIG_fail_arg("plimage",7,"PLFLT");
10850  if(!lua_isnumber(L,8)) SWIG_fail_arg("plimage",8,"PLFLT");
10851  if(!lua_isnumber(L,9)) SWIG_fail_arg("plimage",9,"PLFLT");
10852  if(!lua_isnumber(L,10)) SWIG_fail_arg("plimage",10,"PLFLT");
10853  if(!lua_isnumber(L,11)) SWIG_fail_arg("plimage",11,"PLFLT");
10854  {
10855  int jj;
10856 
10857  arg1 = read_double_Matrix( L, 1, &ii1, &jj );
10858  if ( !arg1 )
10859  SWIG_fail;
10860  Xlen = arg2 = ii1;
10861  Ylen = arg3 = jj;
10862  }
10863  arg4 = (PLFLT)lua_tonumber(L, 2);
10864  arg5 = (PLFLT)lua_tonumber(L, 3);
10865  arg6 = (PLFLT)lua_tonumber(L, 4);
10866  arg7 = (PLFLT)lua_tonumber(L, 5);
10867  arg8 = (PLFLT)lua_tonumber(L, 6);
10868  arg9 = (PLFLT)lua_tonumber(L, 7);
10869  arg10 = (PLFLT)lua_tonumber(L, 8);
10870  arg11 = (PLFLT)lua_tonumber(L, 9);
10871  arg12 = (PLFLT)lua_tonumber(L, 10);
10872  arg13 = (PLFLT)lua_tonumber(L, 11);
10873  plimage((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
10874 
10875  {
10876  int i;
10877 
10878  if ( arg1 )
10879  {
10880  for ( i = 0; i < ii1; i++ )
10881  LUA_FREE_ARRAY( arg1[i] );
10882  LUA_FREE_ARRAY( arg1 );
10883  }
10884  }
10885  return SWIG_arg;
10886 
10887  if(0) SWIG_fail;
10888 
10889 fail:
10890  {
10891  int i;
10892 
10893  if ( arg1 )
10894  {
10895  for ( i = 0; i < ii1; i++ )
10896  LUA_FREE_ARRAY( arg1[i] );
10897  LUA_FREE_ARRAY( arg1 );
10898  }
10899  }
10900  lua_error(L);
10901  return SWIG_arg;
10902 }
10903 
10904 
10905 static int _wrap_imagefr(lua_State* L) {
10906  int SWIG_arg = 0;
10907  PLFLT **arg1 = (PLFLT **) 0 ;
10908  PLINT arg2 ;
10909  PLINT arg3 ;
10910  PLFLT arg4 ;
10911  PLFLT arg5 ;
10912  PLFLT arg6 ;
10913  PLFLT arg7 ;
10914  PLFLT arg8 ;
10915  PLFLT arg9 ;
10916  PLFLT arg10 ;
10917  PLFLT arg11 ;
10918  pltr_func arg12 = (pltr_func) 0 ;
10919  PLPointer arg13 = (PLPointer) 0 ;
10920  int ii1 ;
10921  PLcGrid cgrid113 ;
10922  PLcGrid2 cgrid213 ;
10923 
10924  {
10925  cgrid113.xg = cgrid113.yg = cgrid113.zg = NULL;
10926  cgrid113.nx = cgrid113.ny = cgrid113.nz = 0;
10927  cgrid213.xg = cgrid213.yg = cgrid213.zg = NULL;
10928  cgrid213.nx = cgrid213.ny = 0;
10929  }
10930  {
10931  arg12 = NULL;
10932  }
10933  {
10934  arg13 = NULL;
10935  }
10936  SWIG_check_num_args("plimagefr",9,11)
10937  if(!lua_isnumber(L,2)) SWIG_fail_arg("plimagefr",2,"PLFLT");
10938  if(!lua_isnumber(L,3)) SWIG_fail_arg("plimagefr",3,"PLFLT");
10939  if(!lua_isnumber(L,4)) SWIG_fail_arg("plimagefr",4,"PLFLT");
10940  if(!lua_isnumber(L,5)) SWIG_fail_arg("plimagefr",5,"PLFLT");
10941  if(!lua_isnumber(L,6)) SWIG_fail_arg("plimagefr",6,"PLFLT");
10942  if(!lua_isnumber(L,7)) SWIG_fail_arg("plimagefr",7,"PLFLT");
10943  if(!lua_isnumber(L,8)) SWIG_fail_arg("plimagefr",8,"PLFLT");
10944  if(!lua_isnumber(L,9)) SWIG_fail_arg("plimagefr",9,"PLFLT");
10945  {
10946  int jj;
10947 
10948  arg1 = read_double_Matrix( L, 1, &ii1, &jj );
10949  if ( !arg1 )
10950  SWIG_fail;
10951  Xlen = arg2 = ii1;
10952  Ylen = arg3 = jj;
10953  }
10954  arg4 = (PLFLT)lua_tonumber(L, 2);
10955  arg5 = (PLFLT)lua_tonumber(L, 3);
10956  arg6 = (PLFLT)lua_tonumber(L, 4);
10957  arg7 = (PLFLT)lua_tonumber(L, 5);
10958  arg8 = (PLFLT)lua_tonumber(L, 6);
10959  arg9 = (PLFLT)lua_tonumber(L, 7);
10960  arg10 = (PLFLT)lua_tonumber(L, 8);
10961  arg11 = (PLFLT)lua_tonumber(L, 9);
10962  if(lua_gettop(L)>=10){
10963  {
10964  arg12 = NULL;
10965  mypltr_funcstr[0] = '\0';
10966 
10967  if ( lua_isstring( L, 10 ) )
10968  {
10969  const char* funcstr = lua_tostring( L, 10 );
10970  if ( strcmp( "pltr0", funcstr ) == 0 )
10971  {
10972  arg12 = pltr0;
10973  }
10974  else if ( strcmp( "pltr1", funcstr ) == 0 )
10975  {
10976  arg12 = pltr1;
10977  }
10978  else if ( strcmp( "pltr2", funcstr ) == 0 )
10979  {
10980  arg12 = pltr2;
10981  }
10982  else
10983  {
10984  arg12 = mypltr;
10985  strncpy( mypltr_funcstr, funcstr, 255 );
10986  myL = L;
10987  }
10988  }
10989  else
10990  SWIG_fail_arg( "imagefr", 12, "pltr_func" );
10991  }
10992  }
10993  if(lua_gettop(L)>=11){
10994  {
10995  int nx, ny;
10996  int gridmode = 0;
10997 
10998  lua_pushstring( L, "xg" );
10999  lua_gettable( L, 11 );
11000  if ( !lua_istable( L, -1 ) )
11001  {
11002  lua_pop( L, 1 ); // pop "xg"
11003  lua_pushstring( L, "expected a table xg" );
11004  SWIG_fail;
11005  }
11006  lua_rawgeti( L, -1, 1 );
11007  if ( lua_istable( L, -1 ) )
11008  gridmode = 2; // two dimensional array
11009  else if ( lua_isnumber( L, -1 ) )
11010  gridmode = 1; // one dimensional array
11011  else
11012  {
11013  lua_pop( L, 1 ); // pop "1"
11014  lua_pop( L, 1 ); // pop "xg"
11015  lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
11016  SWIG_fail;
11017  }
11018  lua_pop( L, 1 ); // pop test element
11019  if ( gridmode == 1 )
11020  {
11021  cgrid113.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
11022  if ( !cgrid113.xg )
11023  {
11024  lua_pop( L, 1 ); // pop "xg"
11025  SWIG_fail;
11026  }
11027  if ( nx != Xlen )
11028  {
11029  lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
11030  SWIG_fail;
11031  }
11032  cgrid113.nx = nx;
11033  }
11034  else
11035  {
11036  cgrid213.xg = read_double_Matrix( L, -1, &nx, &ny );
11037  if ( !cgrid213.xg )
11038  {
11039  lua_pop( L, 1 ); // pop "xg"
11040  SWIG_fail;
11041  }
11042  if ( ( nx != Xlen ) || ( ny != Ylen ) )
11043  {
11044  lua_pop( L, 1 ); // pop "xg"
11045  lua_pushfstring( L, "Vectors must match matrix." );
11046  SWIG_fail;
11047  }
11048  cgrid213.nx = nx;
11049  cgrid213.ny = ny;
11050  }
11051  lua_pop( L, 1 ); // pop "xg"
11052 
11053  lua_pushstring( L, "yg" );
11054  lua_gettable( L, 11 );
11055  if ( !lua_istable( L, -1 ) )
11056  {
11057  lua_pop( L, 1 );
11058  lua_pushstring( L, "expected a table yg" );
11059  SWIG_fail;
11060  }
11061  lua_rawgeti( L, -1, 1 );
11062  if ( gridmode == 2 )
11063  {
11064  if ( !lua_istable( L, -1 ) )
11065  {
11066  lua_pop( L, 1 ); // pop "1"
11067  lua_pop( L, 1 ); // pop "yg"
11068  lua_pushstring( L, "expected a two dimensional array/table in yg" );
11069  SWIG_fail;
11070  }
11071  }
11072  else
11073  {
11074  if ( !lua_isnumber( L, -1 ) )
11075  {
11076  lua_pop( L, 1 ); // pop "1"
11077  lua_pop( L, 1 ); // pop "yg"
11078  lua_pushstring( L, "expected a one dimensional array/table in yg" );
11079  SWIG_fail;
11080  }
11081  }
11082  lua_pop( L, 1 ); // pop "1"
11083  if ( gridmode == 1 )
11084  {
11085  cgrid113.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
11086  if ( !cgrid113.yg )
11087  {
11088  lua_pop( L, 1 ); // pop "yg"
11089  SWIG_fail;
11090  }
11091  if ( ny != Ylen )
11092  {
11093  lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
11094  SWIG_fail;
11095  }
11096  cgrid113.ny = ny;
11097  }
11098  else
11099  {
11100  cgrid213.yg = read_double_Matrix( L, -1, &nx, &ny );
11101  if ( !cgrid213.yg )
11102  {
11103  lua_pop( L, 1 ); // pop "xg"
11104  SWIG_fail;
11105  }
11106  if ( ( nx != Xlen ) || ( ny != Ylen ) )
11107  {
11108  lua_pop( L, 1 ); // pop "xg"
11109  lua_pushfstring( L, "Vectors must match matrix." );
11110  SWIG_fail;
11111  }
11112  // cgrid213.nx/ny already set
11113  }
11114  lua_pop( L, 1 ); // pop "yg"
11115 
11116  if ( gridmode == 1 )
11117  arg13 = &cgrid113;
11118  else if ( gridmode == 2 )
11119  arg13 = &cgrid213;
11120  }
11121  }
11122  plimagefr((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
11123 
11124  {
11125  int i;
11126 
11127  if ( arg1 )
11128  {
11129  for ( i = 0; i < ii1; i++ )
11130  LUA_FREE_ARRAY( arg1[i] );
11131  LUA_FREE_ARRAY( arg1 );
11132  }
11133  }
11134  {
11135  mypltr_funcstr[0] = '\0';
11136  }
11137  {
11138  int i;
11139 
11140  LUA_FREE_ARRAY( cgrid113.xg );
11141  LUA_FREE_ARRAY( cgrid113.yg );
11142 
11143  if ( cgrid213.xg )
11144  {
11145  for ( i = 0; i < Xlen; i++ )
11146  LUA_FREE_ARRAY( cgrid213.xg[i] );
11147  LUA_FREE_ARRAY( cgrid213.xg );
11148  }
11149  if ( cgrid213.yg )
11150  {
11151  for ( i = 0; i < Xlen; i++ )
11152  LUA_FREE_ARRAY( cgrid213.yg[i] );
11153  LUA_FREE_ARRAY( cgrid213.yg );
11154  }
11155  }
11156  return SWIG_arg;
11157 
11158  if(0) SWIG_fail;
11159 
11160 fail:
11161  {
11162  int i;
11163 
11164  if ( arg1 )
11165  {
11166  for ( i = 0; i < ii1; i++ )
11167  LUA_FREE_ARRAY( arg1[i] );
11168  LUA_FREE_ARRAY( arg1 );
11169  }
11170  }
11171  {
11172  mypltr_funcstr[0] = '\0';
11173  }
11174  {
11175  int i;
11176 
11177  LUA_FREE_ARRAY( cgrid113.xg );
11178  LUA_FREE_ARRAY( cgrid113.yg );
11179 
11180  if ( cgrid213.xg )
11181  {
11182  for ( i = 0; i < Xlen; i++ )
11183  LUA_FREE_ARRAY( cgrid213.xg[i] );
11184  LUA_FREE_ARRAY( cgrid213.xg );
11185  }
11186  if ( cgrid213.yg )
11187  {
11188  for ( i = 0; i < Xlen; i++ )
11189  LUA_FREE_ARRAY( cgrid213.yg[i] );
11190  LUA_FREE_ARRAY( cgrid213.yg );
11191  }
11192  }
11193  lua_error(L);
11194  return SWIG_arg;
11195 }
11196 
11197 
11198 static int _wrap_plClearOpts(lua_State* L) {
11199  int SWIG_arg = 0;
11200 
11201  SWIG_check_num_args("plClearOpts",0,0)
11202  plClearOpts();
11203 
11204  return SWIG_arg;
11205 
11206  if(0) SWIG_fail;
11207 
11208 fail:
11209  lua_error(L);
11210  return SWIG_arg;
11211 }
11212 
11213 
11214 static int _wrap_plResetOpts(lua_State* L) {
11215  int SWIG_arg = 0;
11216 
11217  SWIG_check_num_args("plResetOpts",0,0)
11218  plResetOpts();
11219 
11220  return SWIG_arg;
11221 
11222  if(0) SWIG_fail;
11223 
11224 fail:
11225  lua_error(L);
11226  return SWIG_arg;
11227 }
11228 
11229 
11230 static int _wrap_plSetUsage(lua_State* L) {
11231  int SWIG_arg = 0;
11232  char *arg1 = (char *) 0 ;
11233  char *arg2 = (char *) 0 ;
11234 
11235  SWIG_check_num_args("plSetUsage",2,2)
11236  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plSetUsage",1,"char const *");
11237  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plSetUsage",2,"char const *");
11238  arg1 = (char *)lua_tostring(L, 1);
11239  arg2 = (char *)lua_tostring(L, 2);
11240  plSetUsage((char const *)arg1,(char const *)arg2);
11241 
11242  return SWIG_arg;
11243 
11244  if(0) SWIG_fail;
11245 
11246 fail:
11247  lua_error(L);
11248  return SWIG_arg;
11249 }
11250 
11251 
11252 static int _wrap_plOptUsage(lua_State* L) {
11253  int SWIG_arg = 0;
11254 
11255  SWIG_check_num_args("plOptUsage",0,0)
11256  plOptUsage();
11257 
11258  return SWIG_arg;
11259 
11260  if(0) SWIG_fail;
11261 
11262 fail:
11263  lua_error(L);
11264  return SWIG_arg;
11265 }
11266 
11267 
11268 static int _wrap_MinMax2dGrid(lua_State* L) {
11269  int SWIG_arg = 0;
11270  PLFLT **arg1 = (PLFLT **) 0 ;
11271  PLINT arg2 ;
11272  PLINT arg3 ;
11273  PLFLT *arg4 = (PLFLT *) 0 ;
11274  PLFLT *arg5 = (PLFLT *) 0 ;
11275  int ii1 ;
11276  PLFLT temp4 ;
11277  PLFLT temp5 ;
11278 
11279  arg4 = &temp4;
11280  arg5 = &temp5;
11281  SWIG_check_num_args("plMinMax2dGrid",1,1)
11282  {
11283  int jj;
11284 
11285  arg1 = read_double_Matrix( L, 1, &ii1, &jj );
11286  if ( !arg1 )
11287  SWIG_fail;
11288  Xlen = arg2 = ii1;
11289  Ylen = arg3 = jj;
11290  }
11291  plMinMax2dGrid((double const **)arg1,arg2,arg3,arg4,arg5);
11292 
11293  lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
11294  lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
11295  {
11296  int i;
11297 
11298  if ( arg1 )
11299  {
11300  for ( i = 0; i < ii1; i++ )
11301  LUA_FREE_ARRAY( arg1[i] );
11302  LUA_FREE_ARRAY( arg1 );
11303  }
11304  }
11305  return SWIG_arg;
11306 
11307  if(0) SWIG_fail;
11308 
11309 fail:
11310  {
11311  int i;
11312 
11313  if ( arg1 )
11314  {
11315  for ( i = 0; i < ii1; i++ )
11316  LUA_FREE_ARRAY( arg1[i] );
11317  LUA_FREE_ARRAY( arg1 );
11318  }
11319  }
11320  lua_error(L);
11321  return SWIG_arg;
11322 }
11323 
11324 
11325 static int _wrap_plGetCursor(lua_State* L) {
11326  int SWIG_arg = 0;
11327  PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
11328  PLINT result;
11329 
11330  SWIG_check_num_args("plGetCursor",1,1)
11331  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("plGetCursor",1,"PLGraphicsIn *");
11332 
11333  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
11334  SWIG_fail_ptr("plGetCursor",1,SWIGTYPE_p_PLGraphicsIn);
11335  }
11336 
11337  result = (PLINT)plGetCursor(arg1);
11338  lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
11339  return SWIG_arg;
11340 
11341  if(0) SWIG_fail;
11342 
11343 fail:
11344  lua_error(L);
11345  return SWIG_arg;
11346 }
11347 
11348 
11349 static int _wrap_warn(lua_State* L) {
11350  int SWIG_arg = 0;
11351  char *arg1 = (char *) 0 ;
11352 
11353  SWIG_check_num_args("plwarn",1,1)
11354  if(!lua_isstring(L,1)) SWIG_fail_arg("plwarn",1,"char const *");
11355  {
11356  arg1 = (char *) lua_tostring( L, 1 );
11357  }
11358  plwarn((char const *)arg1);
11359 
11360  return SWIG_arg;
11361 
11362  if(0) SWIG_fail;
11363 
11364 fail:
11365  lua_error(L);
11366  return SWIG_arg;
11367 }
11368 
11369 
11370 static int _wrap_abort(lua_State* L) {
11371  int SWIG_arg = 0;
11372  char *arg1 = (char *) 0 ;
11373 
11374  SWIG_check_num_args("plabort",1,1)
11375  if(!lua_isstring(L,1)) SWIG_fail_arg("plabort",1,"char const *");
11376  {
11377  arg1 = (char *) lua_tostring( L, 1 );
11378  }
11379  plabort((char const *)arg1);
11380 
11381  return SWIG_arg;
11382 
11383  if(0) SWIG_fail;
11384 
11385 fail:
11386  lua_error(L);
11387  return SWIG_arg;
11388 }
11389 
11390 
11391 #ifdef __cplusplus
11392 }
11393 #endif
11394 
11395 static const struct luaL_Reg swig_commands[] = {
11396  { "setcontlabelformat", _wrap_setcontlabelformat},
11397  { "setcontlabelparam", _wrap_setcontlabelparam},
11398  { "adv", _wrap_adv},
11399  { "arc", _wrap_arc},
11400  { "axes", _wrap_axes},
11401  { "bin", _wrap_bin},
11402  { "btime", _wrap_btime},
11403  { "bop", _wrap_bop},
11404  { "box", _wrap_box},
11405  { "box3", _wrap_box3},
11406  { "calc_world", _wrap_calc_world},
11407  { "clear", _wrap_clear},
11408  { "col0", _wrap_col0},
11409  { "col1", _wrap_col1},
11410  { "configtime", _wrap_configtime},
11411  { "cont", _wrap_cont},
11412  { "ctime", _wrap_ctime},
11413  { "cpstrm", _wrap_cpstrm},
11414  { "plend", _wrap_plend},
11415  { "plend1", _wrap_plend1},
11416  { "env", _wrap_env},
11417  { "env0", _wrap_env0},
11418  { "eop", _wrap_eop},
11419  { "errx", _wrap_errx},
11420  { "erry", _wrap_erry},
11421  { "famadv", _wrap_famadv},
11422  { "fill", _wrap_fill},
11423  { "fill3", _wrap_fill3},
11424  { "gradient", _wrap_gradient},
11425  { "flush", _wrap_flush},
11426  { "font", _wrap_font},
11427  { "fontld", _wrap_fontld},
11428  { "gchr", _wrap_gchr},
11429  { "gcol0", _wrap_gcol0},
11430  { "gcol0a", _wrap_gcol0a},
11431  { "gcolbg", _wrap_gcolbg},
11432  { "gcolbga", _wrap_gcolbga},
11433  { "gcompression", _wrap_gcompression},
11434  { "gdev", _wrap_gdev},
11435  { "gdidev", _wrap_gdidev},
11436  { "gdiori", _wrap_gdiori},
11437  { "gdiplt", _wrap_gdiplt},
11438  { "gfam", _wrap_gfam},
11439  { "gfci", _wrap_gfci},
11440  { "gfnam", _wrap_gfnam},
11441  { "gfont", _wrap_gfont},
11442  { "glevel", _wrap_glevel},
11443  { "gpage", _wrap_gpage},
11444  { "gra", _wrap_gra},
11445  { "griddata", _wrap_griddata},
11446  { "gspa", _wrap_gspa},
11447  { "gstrm", _wrap_gstrm},
11448  { "gver", _wrap_gver},
11449  { "gvpd", _wrap_gvpd},
11450  { "gvpw", _wrap_gvpw},
11451  { "gxax", _wrap_gxax},
11452  { "gyax", _wrap_gyax},
11453  { "gzax", _wrap_gzax},
11454  { "hist", _wrap_hist},
11455  { "hlsrgb", _wrap_hlsrgb},
11456  { "init", _wrap_init},
11457  { "join", _wrap_join},
11458  { "lab", _wrap_lab},
11459  { "legend", _wrap_legend},
11460  { "colorbar", _wrap_colorbar},
11461  { "lightsource", _wrap_lightsource},
11462  { "line", _wrap_line},
11463  { "line3", _wrap_line3},
11464  { "lsty", _wrap_lsty},
11465  { "mesh", _wrap_mesh},
11466  { "meshc", _wrap_meshc},
11467  { "mkstrm", _wrap_mkstrm},
11468  { "mtex", _wrap_mtex},
11469  { "mtex3", _wrap_mtex3},
11470  { "plot3d", _wrap_plot3d},
11471  { "plot3dc", _wrap_plot3dc},
11472  { "plot3dcl", _wrap_plot3dcl},
11473  { "surf3d", _wrap_surf3d},
11474  { "surf3dl", _wrap_surf3dl},
11475  { "parseopts", _wrap_parseopts},
11476  { "pat", _wrap_pat},
11477  { "poin", _wrap_poin},
11478  { "poin3", _wrap_poin3},
11479  { "poly3", _wrap_poly3},
11480  { "prec", _wrap_prec},
11481  { "psty", _wrap_psty},
11482  { "ptex", _wrap_ptex},
11483  { "ptex3", _wrap_ptex3},
11484  { "randd", _wrap_randd},
11485  { "replot", _wrap_replot},
11486  { "rgbhls", _wrap_rgbhls},
11487  { "schr", _wrap_schr},
11488  { "scmap0", _wrap_scmap0},
11489  { "scmap0a", _wrap_scmap0a},
11490  { "scmap0n", _wrap_scmap0n},
11491  { "scmap1", _wrap_scmap1},
11492  { "scmap1a", _wrap_scmap1a},
11493  { "scmap1l", _wrap_scmap1l},
11494  { "scmap1la", _wrap_scmap1la},
11495  { "scmap1n", _wrap_scmap1n},
11496  { "scmap1_range", _wrap_scmap1_range},
11497  { "gcmap1_range", _wrap_gcmap1_range},
11498  { "scol0", _wrap_scol0},
11499  { "scol0a", _wrap_scol0a},
11500  { "scolbg", _wrap_scolbg},
11501  { "scolbga", _wrap_scolbga},
11502  { "scolor", _wrap_scolor},
11503  { "scompression", _wrap_scompression},
11504  { "sdev", _wrap_sdev},
11505  { "sdidev", _wrap_sdidev},
11506  { "sdimap", _wrap_sdimap},
11507  { "sdiori", _wrap_sdiori},
11508  { "sdiplt", _wrap_sdiplt},
11509  { "sdiplz", _wrap_sdiplz},
11510  { "seed", _wrap_seed},
11511  { "sesc", _wrap_sesc},
11512  { "setopt", _wrap_setopt},
11513  { "sfam", _wrap_sfam},
11514  { "sfci", _wrap_sfci},
11515  { "sfnam", _wrap_sfnam},
11516  { "sfont", _wrap_sfont},
11517  { "shades", _wrap_shades},
11518  { "shade", _wrap_shade},
11519  { "slabelfunc", _wrap_slabelfunc},
11520  { "smaj", _wrap_smaj},
11521  { "smin", _wrap_smin},
11522  { "sori", _wrap_sori},
11523  { "spage", _wrap_spage},
11524  { "spal0", _wrap_spal0},
11525  { "spal1", _wrap_spal1},
11526  { "spause", _wrap_spause},
11527  { "sstrm", _wrap_sstrm},
11528  { "ssub", _wrap_ssub},
11529  { "ssym", _wrap_ssym},
11530  { "star", _wrap_star},
11531  { "start", _wrap_start},
11532  { "stransform", _wrap_stransform},
11533  { "string", _wrap_string},
11534  { "string3", _wrap_string3},
11535  { "stripa", _wrap_stripa},
11536  { "stripc", _wrap_stripc},
11537  { "stripd", _wrap_stripd},
11538  { "styl", _wrap_styl},
11539  { "svect", _wrap_svect},
11540  { "svpa", _wrap_svpa},
11541  { "sxax", _wrap_sxax},
11542  { "syax", _wrap_syax},
11543  { "sym", _wrap_sym},
11544  { "szax", _wrap_szax},
11545  { "text", _wrap_text},
11546  { "timefmt", _wrap_timefmt},
11547  { "vasp", _wrap_vasp},
11548  { "vect", _wrap_vect},
11549  { "vpas", _wrap_vpas},
11550  { "vpor", _wrap_vpor},
11551  { "vsta", _wrap_vsta},
11552  { "w3d", _wrap_w3d},
11553  { "width", _wrap_width},
11554  { "wind", _wrap_wind},
11555  { "xormod", _wrap_xormod},
11556  { "map", _wrap_map},
11557  { "meridians", _wrap_meridians},
11558  { "image", _wrap_image},
11559  { "imagefr", _wrap_imagefr},
11560  { "plClearOpts", _wrap_plClearOpts},
11561  { "plResetOpts", _wrap_plResetOpts},
11562  { "plSetUsage", _wrap_plSetUsage},
11563  { "plOptUsage", _wrap_plOptUsage},
11564  { "MinMax2dGrid", _wrap_MinMax2dGrid},
11565  { "plGetCursor", _wrap_plGetCursor},
11566  { "warn", _wrap_warn},
11567  { "abort", _wrap_abort},
11568  {0,0}
11569 };
11570 
11572  {0,0,0}
11573 };
11574 
11576  {SWIG_LUA_CONSTTAB_INT("PLESC_SET_RGB", 1)},
11577  {SWIG_LUA_CONSTTAB_INT("PLESC_ALLOC_NCOL", 2)},
11578  {SWIG_LUA_CONSTTAB_INT("PLESC_SET_LPB", 3)},
11579  {SWIG_LUA_CONSTTAB_INT("PLESC_EXPOSE", 4)},
11580  {SWIG_LUA_CONSTTAB_INT("PLESC_RESIZE", 5)},
11581  {SWIG_LUA_CONSTTAB_INT("PLESC_REDRAW", 6)},
11582  {SWIG_LUA_CONSTTAB_INT("PLESC_TEXT", 7)},
11583  {SWIG_LUA_CONSTTAB_INT("PLESC_GRAPH", 8)},
11584  {SWIG_LUA_CONSTTAB_INT("PLESC_FILL", 9)},
11585  {SWIG_LUA_CONSTTAB_INT("PLESC_DI", 10)},
11586  {SWIG_LUA_CONSTTAB_INT("PLESC_FLUSH", 11)},
11587  {SWIG_LUA_CONSTTAB_INT("PLESC_EH", 12)},
11588  {SWIG_LUA_CONSTTAB_INT("PLESC_GETC", 13)},
11589  {SWIG_LUA_CONSTTAB_INT("PLESC_SWIN", 14)},
11590  {SWIG_LUA_CONSTTAB_INT("PLESC_PLFLTBUFFERING", 15)},
11591  {SWIG_LUA_CONSTTAB_INT("PLESC_XORMOD", 16)},
11592  {SWIG_LUA_CONSTTAB_INT("PLESC_SET_COMPRESSION", 17)},
11593  {SWIG_LUA_CONSTTAB_INT("PLESC_CLEAR", 18)},
11594  {SWIG_LUA_CONSTTAB_INT("PLESC_DASH", 19)},
11595  {SWIG_LUA_CONSTTAB_INT("PLESC_HAS_TEXT", 20)},
11596  {SWIG_LUA_CONSTTAB_INT("PLESC_IMAGE", 21)},
11597  {SWIG_LUA_CONSTTAB_INT("PLESC_IMAGEOPS", 22)},
11598  {SWIG_LUA_CONSTTAB_INT("DRAW_LINEX", 0x01)},
11599  {SWIG_LUA_CONSTTAB_INT("DRAW_LINEY", 0x02)},
11600  {SWIG_LUA_CONSTTAB_INT("DRAW_LINEXY", 0x03)},
11601  {SWIG_LUA_CONSTTAB_INT("MAG_COLOR", 0x04)},
11602  {SWIG_LUA_CONSTTAB_INT("BASE_CONT", 0x08)},
11603  {SWIG_LUA_CONSTTAB_INT("TOP_CONT", 0x10)},
11604  {SWIG_LUA_CONSTTAB_INT("SURF_CONT", 0x20)},
11605  {SWIG_LUA_CONSTTAB_INT("DRAW_SIDES", 0x40)},
11606  {SWIG_LUA_CONSTTAB_INT("FACETED", 0x80)},
11607  {SWIG_LUA_CONSTTAB_INT("MESH", 0x100)},
11608  {SWIG_LUA_CONSTTAB_INT("PL_BIN_DEFAULT", 0)},
11609  {SWIG_LUA_CONSTTAB_INT("PL_BIN_CENTRED", 1)},
11610  {SWIG_LUA_CONSTTAB_INT("PL_BIN_NOEXPAND", 2)},
11611  {SWIG_LUA_CONSTTAB_INT("PL_BIN_NOEMPTY", 4)},
11612  {SWIG_LUA_CONSTTAB_INT("PL_HIST_DEFAULT", 0)},
11613  {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOSCALING", 1)},
11614  {SWIG_LUA_CONSTTAB_INT("PL_HIST_IGNORE_OUTLIERS", 2)},
11615  {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOEXPAND", 8)},
11616  {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOEMPTY", 16)},
11617  {SWIG_LUA_CONSTTAB_INT("PL_POSITION_LEFT", 1)},
11618  {SWIG_LUA_CONSTTAB_INT("PL_POSITION_RIGHT", 2)},
11619  {SWIG_LUA_CONSTTAB_INT("PL_POSITION_TOP", 4)},
11620  {SWIG_LUA_CONSTTAB_INT("PL_POSITION_BOTTOM", 8)},
11621  {SWIG_LUA_CONSTTAB_INT("PL_POSITION_INSIDE", 16)},
11622  {SWIG_LUA_CONSTTAB_INT("PL_POSITION_OUTSIDE", 32)},
11623  {SWIG_LUA_CONSTTAB_INT("PL_POSITION_VIEWPORT", 64)},
11624  {SWIG_LUA_CONSTTAB_INT("PL_POSITION_SUBPAGE", 128)},
11625  {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_NONE", 1)},
11626  {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_COLOR_BOX", 2)},
11627  {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_LINE", 4)},
11628  {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_SYMBOL", 8)},
11629  {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_TEXT_LEFT", 16)},
11630  {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_BACKGROUND", 32)},
11631  {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_BOUNDING_BOX", 64)},
11632  {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_ROW_MAJOR", 128)},
11633  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_LEFT", 0x1)},
11634  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_RIGHT", 0x2)},
11635  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_TOP", 0x4)},
11636  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_BOTTOM", 0x8)},
11637  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_IMAGE", 0x10)},
11638  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_SHADE", 0x20)},
11639  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_GRADIENT", 0x40)},
11640  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_NONE", 0x80)},
11641  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_LOW", 0x100)},
11642  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_HIGH", 0x200)},
11643  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_SHADE_LABEL", 0x400)},
11644  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_RIGHT", 0x800)},
11645  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_TOP", 0x1000)},
11646  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_LEFT", 0x2000)},
11647  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_BOTTOM", 0x4000)},
11648  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_BACKGROUND", 0x8000)},
11649  {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_BOUNDING_BOX", 0x10000)},
11650  {SWIG_LUA_CONSTTAB_INT("PLSWIN_DEVICE", 1)},
11651  {SWIG_LUA_CONSTTAB_INT("PLSWIN_WORLD", 2)},
11652  {SWIG_LUA_CONSTTAB_INT("PL_X_AXIS", 1)},
11653  {SWIG_LUA_CONSTTAB_INT("PL_Y_AXIS", 2)},
11654  {SWIG_LUA_CONSTTAB_INT("PL_Z_AXIS", 3)},
11655  {SWIG_LUA_CONSTTAB_INT("PL_OPT_ENABLED", 0x0001)},
11656  {SWIG_LUA_CONSTTAB_INT("PL_OPT_ARG", 0x0002)},
11657  {SWIG_LUA_CONSTTAB_INT("PL_OPT_NODELETE", 0x0004)},
11658  {SWIG_LUA_CONSTTAB_INT("PL_OPT_INVISIBLE", 0x0008)},
11659  {SWIG_LUA_CONSTTAB_INT("PL_OPT_DISABLED", 0x0010)},
11660  {SWIG_LUA_CONSTTAB_INT("PL_OPT_FUNC", 0x0100)},
11661  {SWIG_LUA_CONSTTAB_INT("PL_OPT_BOOL", 0x0200)},
11662  {SWIG_LUA_CONSTTAB_INT("PL_OPT_INT", 0x0400)},
11663  {SWIG_LUA_CONSTTAB_INT("PL_OPT_FLOAT", 0x0800)},
11664  {SWIG_LUA_CONSTTAB_INT("PL_OPT_STRING", 0x1000)},
11665  {SWIG_LUA_CONSTTAB_INT("PL_PARSE_PARTIAL", 0x0000)},
11666  {SWIG_LUA_CONSTTAB_INT("PL_PARSE_FULL", 0x0001)},
11667  {SWIG_LUA_CONSTTAB_INT("PL_PARSE_QUIET", 0x0002)},
11668  {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NODELETE", 0x0004)},
11669  {SWIG_LUA_CONSTTAB_INT("PL_PARSE_SHOWALL", 0x0008)},
11670  {SWIG_LUA_CONSTTAB_INT("PL_PARSE_OVERRIDE", 0x0010)},
11671  {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NOPROGRAM", 0x0020)},
11672  {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NODASH", 0x0040)},
11673  {SWIG_LUA_CONSTTAB_INT("PL_PARSE_SKIP", 0x0080)},
11674  {SWIG_LUA_CONSTTAB_INT("PL_FCI_MARK", 0x80000000)},
11675  {SWIG_LUA_CONSTTAB_INT("PL_FCI_IMPOSSIBLE", 0x00000000)},
11676  {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXDIGIT_MASK", 0xf)},
11677  {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXPOWER_MASK", 0x7)},
11678  {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXPOWER_IMPOSSIBLE", 0xf)},
11679  {SWIG_LUA_CONSTTAB_INT("PL_FCI_FAMILY", 0x0)},
11680  {SWIG_LUA_CONSTTAB_INT("PL_FCI_STYLE", 0x1)},
11681  {SWIG_LUA_CONSTTAB_INT("PL_FCI_WEIGHT", 0x2)},
11682  {SWIG_LUA_CONSTTAB_INT("PL_FCI_SANS", 0x0)},
11683  {SWIG_LUA_CONSTTAB_INT("PL_FCI_SERIF", 0x1)},
11684  {SWIG_LUA_CONSTTAB_INT("PL_FCI_MONO", 0x2)},
11685  {SWIG_LUA_CONSTTAB_INT("PL_FCI_SCRIPT", 0x3)},
11686  {SWIG_LUA_CONSTTAB_INT("PL_FCI_SYMBOL", 0x4)},
11687  {SWIG_LUA_CONSTTAB_INT("PL_FCI_UPRIGHT", 0x0)},
11688  {SWIG_LUA_CONSTTAB_INT("PL_FCI_ITALIC", 0x1)},
11689  {SWIG_LUA_CONSTTAB_INT("PL_FCI_OBLIQUE", 0x2)},
11690  {SWIG_LUA_CONSTTAB_INT("PL_FCI_MEDIUM", 0x0)},
11691  {SWIG_LUA_CONSTTAB_INT("PL_FCI_BOLD", 0x1)},
11692  {SWIG_LUA_CONSTTAB_INT("PL_MAXKEY", 16)},
11693  {SWIG_LUA_CONSTTAB_INT("PL_MAXWINDOWS", 64)},
11694  {SWIG_LUA_CONSTTAB_INT("PL_NOTSET", (-42))},
11695  {SWIG_LUA_CONSTTAB_INT("PLESPLFLTBUFFERING_ENABLE", 1)},
11696  {SWIG_LUA_CONSTTAB_INT("PLESPLFLTBUFFERING_DISABLE", 2)},
11697  {SWIG_LUA_CONSTTAB_INT("PLESPLFLTBUFFERING_QUERY", 3)},
11698  {SWIG_LUA_CONSTTAB_INT("GRID_CSA", 1)},
11699  {SWIG_LUA_CONSTTAB_INT("GRID_DTLI", 2)},
11700  {SWIG_LUA_CONSTTAB_INT("GRID_NNI", 3)},
11701  {SWIG_LUA_CONSTTAB_INT("GRID_NNIDW", 4)},
11702  {SWIG_LUA_CONSTTAB_INT("GRID_NNLI", 5)},
11703  {SWIG_LUA_CONSTTAB_INT("GRID_NNAIDW", 6)},
11704  {0,0,0,0,0,0}
11705 };
11706 
11707 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
11708 
11709 static swig_type_info _swigt__p_PLGraphicsIn = {"_p_PLGraphicsIn", "PLGraphicsIn *", 0, 0, (void*)&_wrap_class_PLGraphicsIn, 0};
11710 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
11711 static swig_type_info _swigt__p_double = {"_p_double", "double *|PLFLT *", 0, 0, (void*)0, 0};
11712 static swig_type_info _swigt__p_f_double_double__int = {"_p_f_double_double__int", "defined_func|int (*)(double,double)", 0, 0, (void*)0, 0};
11713 static swig_type_info _swigt__p_f_double_double_p_double_p_double_p_void__void = {"_p_f_double_double_p_double_p_double_p_void__void", "ct_func|pltr_func|void (*)(double,double,double *,double *,void *)", 0, 0, (void*)0, 0};
11714 static swig_type_info _swigt__p_f_int_double_p_char_int_p_void__void = {"_p_f_int_double_p_char_int_p_void__void", "void (*)(int,double,char *,int,void *)|label_func", 0, 0, (void*)0, 0};
11715 static swig_type_info _swigt__p_f_int_p_double_p_double__void = {"_p_f_int_p_double_p_double__void", "mapform_func|void (*)(int,double *,double *)", 0, 0, (void*)0, 0};
11716 static swig_type_info _swigt__p_f_int_p_q_const__double_p_q_const__double__void = {"_p_f_int_p_q_const__double_p_q_const__double__void", "void (*)(int,double const *,double const *)|fill_func", 0, 0, (void*)0, 0};
11717 static swig_type_info _swigt__p_int = {"_p_int", "PLBOOL *|int *|PLINT *", 0, 0, (void*)0, 0};
11718 static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
11719 static swig_type_info _swigt__p_p_double = {"_p_p_double", "PLFLT **|double **", 0, 0, (void*)0, 0};
11720 static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|PLUNICODE *", 0, 0, (void*)0, 0};
11721 
11724  &_swigt__p_char,
11731  &_swigt__p_int,
11735 };
11736 
11737 static swig_cast_info _swigc__p_PLGraphicsIn[] = { {&_swigt__p_PLGraphicsIn, 0, 0, 0},{0, 0, 0, 0}};
11738 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
11739 static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
11745 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
11746 static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
11747 static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
11748 static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
11749 
11759  _swigc__p_int,
11763 };
11764 
11765 
11766 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
11767 
11768 /* -----------------------------------------------------------------------------
11769  * Type initialization:
11770  * This problem is tough by the requirement that no dynamic
11771  * memory is used. Also, since swig_type_info structures store pointers to
11772  * swig_cast_info structures and swig_cast_info structures store pointers back
11773  * to swig_type_info structures, we need some lookup code at initialization.
11774  * The idea is that swig generates all the structures that are needed.
11775  * The runtime then collects these partially filled structures.
11776  * The SWIG_InitializeModule function takes these initial arrays out of
11777  * swig_module, and does all the lookup, filling in the swig_module.types
11778  * array with the correct data and linking the correct swig_cast_info
11779  * structures together.
11780  *
11781  * The generated swig_type_info structures are assigned staticly to an initial
11782  * array. We just loop through that array, and handle each type individually.
11783  * First we lookup if this type has been already loaded, and if so, use the
11784  * loaded structure instead of the generated one. Then we have to fill in the
11785  * cast linked list. The cast data is initially stored in something like a
11786  * two-dimensional array. Each row corresponds to a type (there are the same
11787  * number of rows as there are in the swig_type_initial array). Each entry in
11788  * a column is one of the swig_cast_info structures for that type.
11789  * The cast_initial array is actually an array of arrays, because each row has
11790  * a variable number of columns. So to actually build the cast linked list,
11791  * we find the array of casts associated with the type, and loop through it
11792  * adding the casts to the list. The one last trick we need to do is making
11793  * sure the type pointer in the swig_cast_info struct is correct.
11794  *
11795  * First off, we lookup the cast->type name to see if it is already loaded.
11796  * There are three cases to handle:
11797  * 1) If the cast->type has already been loaded AND the type we are adding
11798  * casting info to has not been loaded (it is in this module), THEN we
11799  * replace the cast->type pointer with the type pointer that has already
11800  * been loaded.
11801  * 2) If BOTH types (the one we are adding casting info to, and the
11802  * cast->type) are loaded, THEN the cast info has already been loaded by
11803  * the previous module so we just ignore it.
11804  * 3) Finally, if cast->type has not already been loaded, then we add that
11805  * swig_cast_info to the linked list (because the cast->type) pointer will
11806  * be correct.
11807  * ----------------------------------------------------------------------------- */
11808 
11809 #ifdef __cplusplus
11810 extern "C" {
11811 #if 0
11812 } /* c-mode */
11813 #endif
11814 #endif
11815 
11816 #if 0
11817 #define SWIGRUNTIME_DEBUG
11818 #endif
11819 
11820 
11821 SWIGRUNTIME void
11822 SWIG_InitializeModule(void *clientdata) {
11823  size_t i;
11824  swig_module_info *module_head, *iter;
11825  int found, init;
11826 
11827  /* check to see if the circular list has been setup, if not, set it up */
11828  if (swig_module.next==0) {
11829  /* Initialize the swig_module */
11830  swig_module.type_initial = swig_type_initial;
11831  swig_module.cast_initial = swig_cast_initial;
11832  swig_module.next = &swig_module;
11833  init = 1;
11834  } else {
11835  init = 0;
11836  }
11837 
11838  /* Try and load any already created modules */
11839  module_head = SWIG_GetModule(clientdata);
11840  if (!module_head) {
11841  /* This is the first module loaded for this interpreter */
11842  /* so set the swig module into the interpreter */
11843  SWIG_SetModule(clientdata, &swig_module);
11844  module_head = &swig_module;
11845  } else {
11846  /* the interpreter has loaded a SWIG module, but has it loaded this one? */
11847  found=0;
11848  iter=module_head;
11849  do {
11850  if (iter==&swig_module) {
11851  found=1;
11852  break;
11853  }
11854  iter=iter->next;
11855  } while (iter!= module_head);
11856 
11857  /* if the is found in the list, then all is done and we may leave */
11858  if (found) return;
11859  /* otherwise we must add out module into the list */
11860  swig_module.next = module_head->next;
11861  module_head->next = &swig_module;
11862  }
11863 
11864  /* When multiple interpreters are used, a module could have already been initialized in
11865  a different interpreter, but not yet have a pointer in this interpreter.
11866  In this case, we do not want to continue adding types... everything should be
11867  set up already */
11868  if (init == 0) return;
11869 
11870  /* Now work on filling in swig_module.types */
11871 #ifdef SWIGRUNTIME_DEBUG
11872  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
11873 #endif
11874  for (i = 0; i < swig_module.size; ++i) {
11875  swig_type_info *type = 0;
11876  swig_type_info *ret;
11877  swig_cast_info *cast;
11878 
11879 #ifdef SWIGRUNTIME_DEBUG
11880  printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
11881 #endif
11882 
11883  /* if there is another module already loaded */
11884  if (swig_module.next != &swig_module) {
11885  type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
11886  }
11887  if (type) {
11888  /* Overwrite clientdata field */
11889 #ifdef SWIGRUNTIME_DEBUG
11890  printf("SWIG_InitializeModule: found type %s\n", type->name);
11891 #endif
11892  if (swig_module.type_initial[i]->clientdata) {
11893  type->clientdata = swig_module.type_initial[i]->clientdata;
11894 #ifdef SWIGRUNTIME_DEBUG
11895  printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
11896 #endif
11897  }
11898  } else {
11899  type = swig_module.type_initial[i];
11900  }
11901 
11902  /* Insert casting types */
11903  cast = swig_module.cast_initial[i];
11904  while (cast->type) {
11905 
11906  /* Don't need to add information already in the list */
11907  ret = 0;
11908 #ifdef SWIGRUNTIME_DEBUG
11909  printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
11910 #endif
11911  if (swig_module.next != &swig_module) {
11912  ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
11913 #ifdef SWIGRUNTIME_DEBUG
11914  if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
11915 #endif
11916  }
11917  if (ret) {
11918  if (type == swig_module.type_initial[i]) {
11919 #ifdef SWIGRUNTIME_DEBUG
11920  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
11921 #endif
11922  cast->type = ret;
11923  ret = 0;
11924  } else {
11925  /* Check for casting already in the list */
11926  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
11927 #ifdef SWIGRUNTIME_DEBUG
11928  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
11929 #endif
11930  if (!ocast) ret = 0;
11931  }
11932  }
11933 
11934  if (!ret) {
11935 #ifdef SWIGRUNTIME_DEBUG
11936  printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
11937 #endif
11938  if (type->cast) {
11939  type->cast->prev = cast;
11940  cast->next = type->cast;
11941  }
11942  type->cast = cast;
11943  }
11944  cast++;
11945  }
11946  /* Set entry in modules->types array equal to the type */
11947  swig_module.types[i] = type;
11948  }
11949  swig_module.types[i] = 0;
11950 
11951 #ifdef SWIGRUNTIME_DEBUG
11952  printf("**** SWIG_InitializeModule: Cast List ******\n");
11953  for (i = 0; i < swig_module.size; ++i) {
11954  int j = 0;
11955  swig_cast_info *cast = swig_module.cast_initial[i];
11956  printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
11957  while (cast->type) {
11958  printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
11959  cast++;
11960  ++j;
11961  }
11962  printf("---- Total casts: %d\n",j);
11963  }
11964  printf("**** SWIG_InitializeModule: Cast List ******\n");
11965 #endif
11966 }
11967 
11968 /* This function will propagate the clientdata field of type to
11969 * any new swig_type_info structures that have been added into the list
11970 * of equivalent types. It is like calling
11971 * SWIG_TypeClientData(type, clientdata) a second time.
11972 */
11973 SWIGRUNTIME void
11975  size_t i;
11976  swig_cast_info *equiv;
11977  static int init_run = 0;
11978 
11979  if (init_run) return;
11980  init_run = 1;
11981 
11982  for (i = 0; i < swig_module.size; i++) {
11983  if (swig_module.types[i]->clientdata) {
11984  equiv = swig_module.types[i]->cast;
11985  while (equiv) {
11986  if (!equiv->converter) {
11987  if (equiv->type && !equiv->type->clientdata)
11988  SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
11989  }
11990  equiv = equiv->next;
11991  }
11992  }
11993  }
11994 }
11995 
11996 #ifdef __cplusplus
11997 #if 0
11998 { /* c-mode */
11999 #endif
12000 }
12001 #endif
12002 
12003 
12004 
12005 /* Forward declaration of where the user's %init{} gets inserted */
12006 void SWIG_init_user(lua_State* L );
12007 
12008 #ifdef __cplusplus
12009 extern "C" {
12010 #endif
12011 /* this is the initialization function
12012  added at the very end of the code
12013  the function is always called SWIG_init, but an earlier #define will rename it
12014 */
12015 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
12016 LUALIB_API int SWIG_init(lua_State* L)
12017 #else
12018 SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
12019 #endif
12020 {
12021 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
12022  int i;
12023  /* start with global table */
12024  lua_pushglobaltable (L);
12025  /* SWIG's internal initalisation */
12026  SWIG_InitializeModule((void*)L);
12028 #endif
12029 
12030 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
12031  /* add a global fn */
12032  SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
12033  SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_equal);
12034  /* begin the module (its a table with the same name as the module) */
12036  /* add commands/functions */
12037  for (i = 0; swig_commands[i].name; i++){
12039  }
12040  /* add variables */
12041  for (i = 0; swig_variables[i].name; i++){
12042  SWIG_Lua_module_add_variable(L,swig_variables[i].name,swig_variables[i].get,swig_variables[i].set);
12043  }
12044 #endif
12045 
12046 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
12047  /* set up base class pointers (the hierarchy) */
12048  for (i = 0; swig_types[i]; i++){
12049  if (swig_types[i]->clientdata){
12050  SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata));
12051  }
12052  }
12053  /* additional registration structs & classes in lua */
12054  for (i = 0; swig_types[i]; i++){
12055  if (swig_types[i]->clientdata){
12056  SWIG_Lua_class_register(L,(swig_lua_class*)(swig_types[i]->clientdata));
12057  }
12058  }
12059 #endif
12060 
12061 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
12062  /* constants */
12063  SWIG_Lua_InstallConstants(L,swig_constants);
12064 #endif
12065 
12066 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
12067  /* invoke user-specific initialization */
12068  SWIG_init_user(L);
12069  /* end module */
12070  /* Note: We do not clean up the stack here (Lua will do this for us). At this
12071  point, we have the globals table and out module table on the stack. Returning
12072  one value makes the module table the result of the require command. */
12073  return 1;
12074 #else
12075  return 0;
12076 #endif
12077 }
12078 
12079 #ifdef __cplusplus
12080 }
12081 #endif
12082 
12083 
12084 const char* SWIG_LUACODE=
12085  "\n"
12086  " pl = plplotluac";
12087 
12088 void SWIG_init_user(lua_State* L)
12089 {
12090  /* exec Lua code if applicable */
12091  SWIG_Lua_dostring(L,SWIG_LUACODE);
12092 }
12093 
static int _wrap_bin(lua_State *L)
subroutine plbox(xopt, xtick, nxsub, yopt, ytick, nysub)
Definition: sfstubs.f90:148
static swig_cast_info _swigc__p_f_double_double__int[]
struct swig_type_info swig_type_info
#define SWIG_fail
static int _wrap_rgbhls(lua_State *L)
static lua_State * myL
#define plsfam
Definition: plplot.h:709
static char myct_funcstr[255]
#define plw3d
Definition: plplot.h:754
void(* label_func)(PLINT, PLFLT, char *, PLINT, PLPointer)
static int _wrap_box(lua_State *L)
static int _wrap_PLGraphicsIn_pX_get(lua_State *L)
static const char * name
Definition: tkMain.c:131
static swig_module_info swig_module
void plimagefr(PLFLT **idata, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, PLFLT valuemin, PLFLT valuemax, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L)
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
static int _wrap_mtex3(lua_State *L)
#define plgxax
Definition: plplot.h:642
#define plsstrm
Definition: plplot.h:727
void(* ct_func)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer)
static int _wrap_PLGraphicsIn_string_set(lua_State *L)
static swig_lua_attribute swig_PLGraphicsIn_attributes[]
static int _wrap_plot3d(lua_State *L)
void PLFLT PLINT PLINT PLFLT PLFLT PLFLT PLFLT PLINT PLINT PLINT PLFLT PLFLT PLINT PLFLT PLINT const PLINT const char *const * label
static int _wrap_spal1(lua_State *L)
static swig_type_info _swigt__p_char
#define plspage
Definition: plplot.h:723
static int _wrap_scmap1a(lua_State *L)
#define plvpor
Definition: plplot.h:752
SWIGINTERN void SWIG_write_ptr_array(lua_State *L, void **array, int size, swig_type_info *type, int own)
static swig_lua_method swig_PLGraphicsIn_cls_methods[]
static int _wrap_sfont(lua_State *L)
static int _wrap_imagefr(lua_State *L)
static int _wrap_gfam(lua_State *L)
#define SWIG_name
static int _wrap_gra(lua_State *L)
static int _wrap_PLGraphicsIn_keysym_set(lua_State *L)
void PLFLT PLINT PLINT PLFLT PLFLT PLFLT PLFLT PLINT PLINT PLINT PLFLT PLFLT PLINT PLFLT PLINT const PLINT const char *const PLINT nx
#define SWIG_LUA_CONSTTAB_INT(B, C)
#define plerry
Definition: plplot.h:610
PLFLT * xg
Definition: plplot.h:428
static int _wrap_PLGraphicsIn_wX_get(lua_State *L)
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
#define plsyax
Definition: plplot.h:744
SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[])
#define plschr
Definition: plplot.h:683
SWIGINTERN void ** SWIG_get_ptr_array_fixed(lua_State *L, int index, int size, swig_type_info *type)
static void swig_delete_PLGraphicsIn(void *obj)
subroutine plmtex3(side, disp, pos, xjust, text)
Definition: sfstubs.f90:722
static int _wrap_scolor(lua_State *L)
static int _wrap_setopt(lua_State *L)
#define SWIG_Lua_get_table(L, n)
static int _wrap_vsta(lua_State *L)
static int _wrap_PLGraphicsIn_subwindow_get(lua_State *L)
subroutine plsfnam(fnam)
Definition: sfstubs.f90:92
#define pllegend
Definition: plplot.h:653
static int _wrap_plGetCursor(lua_State *L)
SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L, const char *cname)
#define SWIG_LUA_INT
static int _wrap_pat(lua_State *L)
static int _wrap_PLGraphicsIn_dY_set(lua_State *L)
static int _wrap_scmap1la(lua_State *L)
#define plshade
Definition: plplot.h:713
#define plscompression
Definition: plplot.h:699
static int _wrap_scompression(lua_State *L)
#define plarc
Definition: plplot.h:588
SWIGRUNTIME int SWIG_Lua_equal(lua_State *L)
PLFLT(* f2eval_func)(PLINT, PLINT, PLPointer)
PLUINT PLUNICODE
Definition: plplot.h:195
subroutine plstring3(x, y, z, string)
Definition: sfstubs.f90:327
static int _wrap_spause(lua_State *L)
SWIGINTERN int SWIG_Lua_class_set(lua_State *L)
static int _wrap_poin(lua_State *L)
SWIGINTERN int SWIG_Lua_namespace_set(lua_State *L)
PLINT nz
Definition: plplot.h:429
#define plot3dc
Definition: plplot.h:667
void plgriddata(PLFLT *x, PLFLT *y, PLFLT *z, int npts, PLFLT *xg, int nptsx, PLFLT *yg, int nptsy, PLFLT **zg, int type, PLFLT data)
#define plot3dcl
Definition: plplot.h:668
static int _wrap_arc(lua_State *L)
SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb)
SWIGINTERN void SWIG_Lua_class_register(lua_State *L, swig_lua_class *clss)
#define pllsty
Definition: plplot.h:658
static int _wrap_eop(lua_State *L)
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
SWIGINTERN void SWIG_Lua_init_base_class(lua_State *L, swig_lua_class *clss)
#define plsmin
Definition: plplot.h:720
#define plwind
Definition: plplot.h:757
#define plclear
Definition: plplot.h:596
#define plfill
Definition: plplot.h:612
#define plconfigtime
Definition: plplot.h:600
#define plsurf3dl
Definition: plplot.h:740
SWIGINTERN void ** SWIG_get_ptr_array_var(lua_State *L, int index, int *size, swig_type_info *type)
SWIGINTERN void SWIG_Lua_add_class_details(lua_State *L, swig_lua_class *clss)
SWIGINTERN int SWIG_Lua_dostring(lua_State *L, const char *str)
static int _wrap_gdev(lua_State *L)
void plimage(PLFLT **data, PLINT nx, PLINT ny, PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, PLFLT zmin, PLFLT zmax, PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax)
static int _wrap_scolbg(lua_State *L)
#define plbtime
Definition: plplot.h:594
subroutine plmtex(side, disp, pos, xjust, text)
Definition: sfstubs.f90:705
#define pl_setcontlabelparam
Definition: plplot.h:586
#define SWIG_DOSTRING_FAIL(S)
static int _wrap_szax(lua_State *L)
#define LUA_DECLARE_TYPEMAP_ARR_FN(NAME, TYPE)
static int _wrap_vpas(lua_State *L)
static int _wrap_plClearOpts(lua_State *L)
static int _wrap_scol0a(lua_State *L)
static int _wrap_PLGraphicsIn_pY_set(lua_State *L)
static swig_type_info _swigt__p_p_double
#define plscolbg
Definition: plplot.h:696
swig_dycast_func dcast
char string[PL_MAXKEY]
Definition: plplot.h:360
static int _wrap_PLGraphicsIn_dX_set(lua_State *L)
struct swig_cast_info * cast
#define plfont
Definition: plplot.h:615
static int _wrap_PLGraphicsIn_type_get(lua_State *L)
#define plstyl
Definition: plplot.h:738
#define plpoly3
Definition: plplot.h:673
subroutine plstring(x, y, string)
Definition: sfstubs.f90:309
#define SWIG_ConvertPtr(L, idx, ptr, type, flags)
swig_type_info ** type
swig_type_info * type
static int _wrap_lightsource(lua_State *L)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
SWIGINTERN void SWIG_Lua_module_add_function(lua_State *L, const char *name, lua_CFunction fn)
#define plfontld
Definition: plplot.h:616
#define SWIG_RUNTIME_VERSION
subroutine plgdev(dnam)
Definition: sfstubs.f90:80
static int _wrap_image(lua_State *L)
#define plscolbga
Definition: plplot.h:697
#define SWIGRUNTIMEINLINE
PLFLT * yg
Definition: plplot.h:428
#define plbin
Definition: plplot.h:590
static int _wrap_plot3dcl(lua_State *L)
static int _wrap_setcontlabelformat(lua_State *L)
#define plsdiori
Definition: plplot.h:703
static int _wrap_PLGraphicsIn_dY_get(lua_State *L)
PLFLT ** zg
Definition: plplot.h:440
SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L, void *ptr, swig_type_info *type, int own)
#define plparseopts
Definition: plplot.h:669
#define SWIGRUNTIME
#define plsym
Definition: plplot.h:745
static int _wrap_scol0(lua_State *L)
#define plscmap1
Definition: plplot.h:687
struct swig_type_info *(* swig_dycast_func)(void **)
static int _wrap_poin3(lua_State *L)
#define plinit
Definition: plplot.h:650
void PLFLT PLINT PLINT PLFLT x
#define plctime
Definition: plplot.h:603
SWIGINTERN int SWIG_Lua_class_tostring(lua_State *L)
#define plscmap1n
Definition: plplot.h:691
static int _wrap_gcol0(lua_State *L)
static int _wrap_prec(lua_State *L)
#define plbop
Definition: plplot.h:591
static int _wrap_scolbga(lua_State *L)
static int _wrap_plend(lua_State *L)
static int _wrap_slabelfunc(lua_State *L)
static int _wrap_plOptUsage(lua_State *L)
#define plsdiplt
Definition: plplot.h:704
#define plsvect
Definition: plplot.h:741
#define plscmap1a
Definition: plplot.h:688
#define plssub
Definition: plplot.h:728
static int _wrap_start(lua_State *L)
static swig_type_info _swigt__p_int
static swig_type_info _swigt__p_double
void * PLPointer
Definition: plplot.h:201
static int _wrap_lab(lua_State *L)
#define plmeshc
Definition: plplot.h:662
#define plgcompression
Definition: plplot.h:622
static int _wrap_sesc(lua_State *L)
#define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME, TYPE)
#define SWIG_GetModule(clientdata)
#define plszax
Definition: plplot.h:746
#define plvsta
Definition: plplot.h:753
static int _wrap_map(lua_State *L)
static swig_type_info _swigt__p_f_int_p_double_p_double__void
static int _wrap_replot(lua_State *L)
void *(* swig_converter_func)(void *, int *)
SWIGINTERN int SWIG_Lua_class_get(lua_State *L)
static int _wrap_gcolbga(lua_State *L)
SWIGINTERN int SWIG_itable_size(lua_State *L, int index)
#define plgpage
Definition: plplot.h:633
#define plsori
Definition: plplot.h:722
static char mapform_funcstr[255]
#define plgdiplt
Definition: plplot.h:626
#define plscmap0a
Definition: plplot.h:685
PLINT ny
Definition: plplot.h:441
static const char * swig_PLGraphicsIn_base_names[]
#define plfamadv
Definition: plplot.h:611
static int _wrap_gcolbg(lua_State *L)
static int _wrap_schr(lua_State *L)
SWIGINTERN int SWIG_Lua_class_disown(lua_State *L)
static int _wrap_randd(lua_State *L)
subroutine plbox3(xopt, xlabel, xtick, nxsub, yopt, ylabel, ytick, nysub, zopt, zlabel, ztick, nzsub)
Definition: sfstubs.f90:166
#define plend
Definition: plplot.h:604
SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L, int index, void **ptr, swig_type_info *type, int flags)
static int _wrap_poly3(lua_State *L)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty)
swig_lua_attribute * attributes
SWIGINTERN void SWIG_Lua_class_register_static(lua_State *L, swig_lua_class *clss)
static int _wrap_string3(lua_State *L)
static swig_type_info _swigt__p_f_double_double_p_double_p_double_p_void__void
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
static int _wrap_PLGraphicsIn_wY_get(lua_State *L)
static int _wrap_stripa(lua_State *L)
static char label_funcstr[255]
#define plmap
Definition: plplot.h:659
#define plgfont
Definition: plplot.h:631
#define SWIG_init
static int _wrap_PLGraphicsIn_state_set(lua_State *L)
#define plend1
Definition: plplot.h:605
int PLINT
Definition: plplot.h:175
#define plenv0
Definition: plplot.h:607
static int _wrap_sdiori(lua_State *L)
static int _wrap_erry(lua_State *L)
#define plgdiori
Definition: plplot.h:625
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
#define plshades
Definition: plplot.h:715
static int _wrap_scmap1n(lua_State *L)
PLINT PLBOOL
Definition: plplot.h:198
#define SWIG_LUA_FLOAT
#define SWIG_fail_arg(func_name, argnum, type)
void(* fill_func)(PLINT, const PLFLT *, const PLFLT *)
#define SWIG_FREE_ARRAY(PTR)
static int _wrap_meshc(lua_State *L)
static swig_type_info _swigt__p_PLGraphicsIn
static int _wrap_PLGraphicsIn_wX_set(lua_State *L)
#define plssym
Definition: plplot.h:729
static int _wrap_smaj(lua_State *L)
#define pljoin
Definition: plplot.h:651
#define plgzax
Definition: plplot.h:644
static int _wrap_sori(lua_State *L)
static int _wrap_surf3d(lua_State *L)
static int _wrap_line(lua_State *L)
#define SWIGEXPORT
SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L, int index, void *ptr, size_t size, swig_type_info *type)
static int _wrap_new_PLGraphicsIn(lua_State *L)
#define plgfam
Definition: plplot.h:628
PLINT ny
Definition: plplot.h:429
#define plgdidev
Definition: plplot.h:624
static int _wrap_col1(lua_State *L)
static int _wrap_legend(lua_State *L)
#define plstar
Definition: plplot.h:730
static int _wrap_stransform(lua_State *L)
static int _wrap_glevel(lua_State *L)
void(* pltr_func)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer)
static swig_cast_info _swigc__p_f_int_p_double_p_double__void[]
#define plcpstrm
Definition: plplot.h:602
#define plcalc_world
Definition: plplot.h:595
void mypltr(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data)
static swig_cast_info _swigc__p_double[]
#define lua_pushglobaltable(L)
swig_type_info * type
#define plhist
Definition: plplot.h:645
static int _wrap_font(lua_State *L)
static int _wrap_scmap1(lua_State *L)
SWIGRUNTIME void SWIG_InitializeModule(void *clientdata)
static int _wrap_ssym(lua_State *L)
#define plgchr
Definition: plplot.h:617
SWIGINTERN int SWIG_Lua_namespace_register(lua_State *L, swig_lua_namespace *ns)
struct swig_module_info * next
#define SWIG_ERROR
#define SWIGTYPE_p_PLGraphicsIn
plGetCursor
Definition: plplotc.py:6962
#define plsdidev
Definition: plplot.h:701
SWIGRUNTIME void SWIG_Lua_SetModule(lua_State *L, swig_module_info *module)
#define SWIG_SetModule(clientdata, pointer)
static int _wrap_scmap0n(lua_State *L)
plSetUsage
Definition: plplotc.py:6950
#define plfill3
Definition: plplot.h:613
static int _wrap_box3(lua_State *L)
const char ** base_names
static int _wrap_spal0(lua_State *L)
SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
subroutine plgver(ver)
Definition: sfstubs.f90:117
static int _wrap_plend1(lua_State *L)
static int _wrap_gspa(lua_State *L)
static int _wrap_plSetUsage(lua_State *L)
static int _wrap_gfont(lua_State *L)
void PLFLT PLINT PLINT PLFLT PLFLT y
static int _wrap_sdiplz(lua_State *L)
static int _wrap_gdidev(lua_State *L)
swig_converter_func converter
PLFLT ** xg
Definition: plplot.h:440
subroutine plaxes(x0, y0, xopt, xtick, nxsub, yopt, ytick, nysub)
Definition: sfstubs.f90:130
static int _wrap_ptex3(lua_State *L)
#define plseed
Definition: plplot.h:706
static int _wrap_PLGraphicsIn_type_set(lua_State *L)
plOptUsage
Definition: plplotc.py:6954
#define plstransform
Definition: plplot.h:732
#define plvect
Definition: plplot.h:750
SWIGINTERN void SWIG_Lua_add_class_variable(lua_State *L, const char *name, lua_CFunction getFn, lua_CFunction setFn)
swig_type_info * type
static int _wrap_adv(lua_State *L)
void mapform(PLINT n, PLFLT *x, PLFLT *y)
static int _wrap_sfam(lua_State *L)
#define plscmap1la
Definition: plplot.h:690
static swig_cast_info _swigc__p_f_double_double_p_double_p_double_p_void__void[]
static swig_lua_const_info swig_PLGraphicsIn_cls_constants[]
static int _wrap_vasp(lua_State *L)
#define plcont
Definition: plplot.h:601
#define plsxax
Definition: plplot.h:743
plClearOpts
Definition: plplotc.py:6942
subroutine plspal0(filename)
Definition: sfstubs.f90:676
#define pleop
Definition: plplot.h:608
static swig_type_info _swigt__p_p_char
#define plmesh
Definition: plplot.h:661
static int _wrap_PLGraphicsIn_button_set(lua_State *L)
static int _wrap_bop(lua_State *L)
#define plhlsrgb
Definition: plplot.h:647
swig_type_info ** types
static int _wrap_cont(lua_State *L)
SWIGINTERN int SWIG_Lua_module_get(lua_State *L)
#define plsmaj
Definition: plplot.h:717
PLINT nx
Definition: plplot.h:441
#define SWIG_fail_ptr(func_name, argnum, type)
static int _wrap_plot3dc(lua_State *L)
static int _wrap_surf3dl(lua_State *L)
SWIGRUNTIME swig_module_info * SWIG_Lua_GetModule(lua_State *L)
PLFLT ** read_double_Matrix(lua_State *L, int index, int *nx, int *ny)
SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx)
static swig_lua_class * swig_PLGraphicsIn_bases[]
#define plcol1
Definition: plplot.h:598
#define pllightsource
Definition: plplot.h:654
SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State *L, swig_lua_class *clss)
swig_lua_namespace cls_static
#define SWIGINTERN
pl_setcontlabelformat
Definition: tclgen_s.h:1
#define SWIG_init_user
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
lua_CFunction constructor
#define pltext
Definition: plplot.h:747
plMinMax2dGrid
Definition: plplotc.py:6958
static int _wrap_lsty(lua_State *L)
#define plwidth
Definition: plplot.h:756
static int _wrap_smin(lua_State *L)
static int _wrap_mkstrm(lua_State *L)
#define plscol0a
Definition: plplot.h:695
static swig_cast_info _swigc__p_p_char[]
static int _wrap_wind(lua_State *L)
static int _wrap_vect(lua_State *L)
static const struct luaL_Reg swig_commands[]
static int _wrap_cpstrm(lua_State *L)
subroutine plsetopt(opt, optarg)
Definition: sfstubs.f90:39
#define plsdiplz
Definition: plplot.h:705
static int _wrap_sfci(lua_State *L)
static int _wrap_text(lua_State *L)
static int _wrap_parseopts(lua_State *L)
#define SWIG_TYPE_TABLE_NAME
#define plspause
Definition: plplot.h:726
subroutine plptex(x, y, dx, dy, xjust, text)
Definition: sfstubs.f90:739
SWIGRUNTIME const char * SWIG_Lua_typename(lua_State *L, int tp)
static int _wrap_hist(lua_State *L)
static PLINT Ylen
#define plline3
Definition: plplot.h:657
static char mypltr_funcstr[255]
#define plstripd
Definition: plplot.h:737
#define plgfci
Definition: plplot.h:629
#define plgspa
Definition: plplot.h:637
#define plgcolbg
Definition: plplot.h:620
#define plstripc
Definition: plplot.h:736
static int _wrap_gpage(lua_State *L)
static swig_lua_attribute swig_PLGraphicsIn_cls_attributes[]
SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
#define plstripa
Definition: plplot.h:735
#define SWIG_LUA_STRING
void
Definition: f95/scstubs.c:588
static int _wrap_svpa(lua_State *L)
static PLINT Alen
subroutine plgfnam(fnam)
Definition: sfstubs.f90:105
#define SWIG_NewMemberObj(L, ptr, sz, type)
#define plvpas
Definition: plplot.h:751
void(* mapform_func)(PLINT, PLFLT *, PLFLT *)
void myct(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data)
SWIGINTERN void _SWIG_Lua_AddMetatable(lua_State *L, swig_type_info *type)
static swig_type_info _swigt__p_f_int_double_p_char_int_p_void__void
#define plsfont
Definition: plplot.h:712
static int _wrap_fill(lua_State *L)
SWIGINTERN int SWIG_table_size(lua_State *L, int index)
static int _wrap_gver(lua_State *L)
PLINT(* defined_func)(PLFLT, PLFLT)
static int _wrap_gfci(lua_State *L)
subroutine pllab(xlab, ylab, title)
Definition: sfstubs.f90:658
static int _wrap_famadv(lua_State *L)
static int _wrap_fontld(lua_State *L)
#define plpsty
Definition: plplot.h:675
PLFLT ** yg
Definition: plplot.h:440
SWIGINTERN void SWIG_Lua_module_begin(lua_State *L, const char *name)
static int _wrap_sym(lua_State *L)
static int _wrap_gyax(lua_State *L)
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
static PLFLT value(double n1, double n2, double hue)
Definition: plctrl.c:1203
SWIGRUNTIME int SWIG_Lua_type(lua_State *L)
void plabort(const char *errormsg)
Definition: plctrl.c:1877
SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
#define plgvpd
Definition: plplot.h:640
#define plpoin
Definition: plplot.h:671
#define plgvpw
Definition: plplot.h:641
static int _wrap_plResetOpts(lua_State *L)
static int _wrap_PLGraphicsIn_state_get(lua_State *L)
#define SWIG_NewPointerObj(L, ptr, type, owner)
subroutine plsdev(dnam)
Definition: sfstubs.f90:67
static int _wrap_ptex(lua_State *L)
SWIGINTERN int SWIG_Lua_class_destruct(lua_State *L)
static int _wrap_env(lua_State *L)
#define SWIG_ALLOC_ARRAY(TYPE, LEN)
static int _wrap_mesh(lua_State *L)
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
SWIGINTERN int SWIG_read_ptr_array(lua_State *L, int index, void **array, int size, swig_type_info *type)
static int _wrap_gvpw(lua_State *L)
#define SWIG_Lua_add_function(L, n, f)
static int _wrap_w3d(lua_State *L)
static int _wrap_griddata(lua_State *L)
static int _wrap_MinMax2dGrid(lua_State *L)
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
#define plmkstrm
Definition: plplot.h:663
float PLFLT
Definition: plplot.h:159
void mylabel(PLINT axis, PLFLT value, char *label, PLINT length, PLPointer data)
#define plscol0
Definition: plplot.h:694
struct swig_module_info swig_module_info
static int _wrap_warn(lua_State *L)
#define plxormod
Definition: plplot.h:758
static int _wrap_mtex(lua_State *L)
swig_lua_method * methods
static int _wrap_flush(lua_State *L)
#define plflush
Definition: plplot.h:614
#define plerrx
Definition: plplot.h:609
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
#define SWIG_LUACODE
#define SWIG_LUA_CHAR
static int _wrap_configtime(lua_State *L)
#define plgcol0a
Definition: plplot.h:619
SWIGINTERN void SWIG_Lua_module_add_variable(lua_State *L, const char *name, lua_CFunction getFn, lua_CFunction setFn)
static swig_type_info * swig_types[13]
static int _wrap_sxax(lua_State *L)
void plwarn(const char *errormsg)
Definition: plctrl.c:1846
SWIGRUNTIME void SWIG_PropagateClientData(void)
#define plgcolbga
Definition: plplot.h:621
SWIGINTERN int SWIG_Lua_module_set(lua_State *L)
static swig_cast_info _swigc__p_f_int_p_q_const__double_p_q_const__double__void[]
static int _wrap_init(lua_State *L)
lua_CFunction method
static int _wrap_shades(lua_State *L)
#define plgyax
Definition: plplot.h:643
#define plsesc
Definition: plplot.h:707
static swig_type_info _swigt__p_f_int_p_q_const__double_p_q_const__double__void
static int _wrap_gzax(lua_State *L)
#define SWIG_isptrtype(L, I)
swig_lua_const_info * ns_constants
#define plenv
Definition: plplot.h:606
static int _wrap_star(lua_State *L)
#define SWIG_LUA_BINARY
static swig_cast_info * swig_cast_initial[]
static int _wrap_scmap1l(lua_State *L)
struct swig_cast_info * next
static int _wrap_meridians(lua_State *L)
struct swig_lua_class swig_lua_class
swig_lua_method * ns_methods
subroutine plspal1(filename, interpolate)
Definition: sfstubs.f90:690
static swig_cast_info _swigc__p_int[]
#define plgcmap1_range
Definition: plplot.h:693
#define plcol0
Definition: plplot.h:597
static int _wrap_PLGraphicsIn_pX_set(lua_State *L)
static int _wrap_gcompression(lua_State *L)
static int _wrap_ctime(lua_State *L)
static int _wrap_scmap0(lua_State *L)
#define LUA_FREE_ARRAY(PTR)
#define SWIG_CheckState(r)
static int _wrap_timefmt(lua_State *L)
static int _wrap_axes(lua_State *L)
static PLINT Xlen
static int _wrap_gcmap1_range(lua_State *L)
static swig_cast_info _swigc__p_p_double[]
subroutine plstart(devname, nx, ny)
Definition: sfstubs.f90:769
#define LUA_ALLOC_ARRAY(TYPE, LEN)
static int _wrap_stripd(lua_State *L)
#define plglevel
Definition: plplot.h:632
static int _wrap_PLGraphicsIn_pY_get(lua_State *L)
static swig_lua_class _wrap_class_PLGraphicsIn
static swig_type_info _swigt__p_unsigned_int
static swig_type_info _swigt__p_f_double_double__int
static swig_lua_const_info swig_constants[]
static int _wrap_sdev(lua_State *L)
static int _wrap_stripc(lua_State *L)
#define SWIG_LUA_POINTER
#define plpoin3
Definition: plplot.h:672
static int _wrap_PLGraphicsIn_keysym_get(lua_State *L)
static int _wrap_gxax(lua_State *L)
static int _wrap_PLGraphicsIn_string_get(lua_State *L)
#define plscmap0n
Definition: plplot.h:686
#define SWIG_AddCast(r)
subroutine plptex3(x, y, z, dx, dy, dz, sx, sy, sz, xjust, text)
Definition: sfstubs.f90:754
#define plscolor
Definition: plplot.h:698
#define plsvpa
Definition: plplot.h:742
#define plpat
Definition: plplot.h:670
static int _wrap_gvpd(lua_State *L)
struct swig_lua_class ** bases
static int _wrap_gchr(lua_State *L)
#define plscmap1_range
Definition: plplot.h:692
#define SWIG_check_num_args(func_name, a, b)
struct swig_cast_info * prev
#define plgcol0
Definition: plplot.h:618
static int _wrap_sdidev(lua_State *L)
static swig_lua_method swig_PLGraphicsIn_methods[]
static int _wrap_scmap1_range(lua_State *L)
#define plreplot
Definition: plplot.h:679
swig_cast_info ** cast_initial
#define SWIG_POINTER_DISOWN
static int _wrap_PLGraphicsIn_button_get(lua_State *L)
swig_lua_attribute * ns_attributes
static int _wrap_colorbar(lua_State *L)
#define plscmap1l
Definition: plplot.h:689
#define plprec
Definition: plplot.h:674
void(* destructor)(void *)
#define plline
Definition: plplot.h:655
#define SWIG_contract_assert(expr, msg)
static int _wrap_width(lua_State *L)
static swig_cast_info _swigc__p_char[]
SWIGINTERN int SWIG_Lua_constructor_proxy(lua_State *L)
struct swig_cast_info swig_cast_info
#define plgradient
Definition: plplot.h:635
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
static int _wrap_shade(lua_State *L)
static swig_lua_var_info swig_variables[]
swig_type_info ** ptype
static int _wrap_gradient(lua_State *L)
static int _wrap_join(lua_State *L)
swig_type_info ** type_initial
static int _wrap_PLGraphicsIn_dX_get(lua_State *L)
static int _wrap_hlsrgb(lua_State *L)
static int _wrap_psty(lua_State *L)
static int _wrap_gdiplt(lua_State *L)
static int _wrap_setcontlabelparam(lua_State *L)
static int _wrap_gdiori(lua_State *L)
SWIGINTERN int SWIG_Lua_namespace_get(lua_State *L)
#define pladv
Definition: plplot.h:587
#define SWIG_OK
#define SWIGINTERNINLINE
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
#define plvasp
Definition: plplot.h:749
static int _wrap_line3(lua_State *L)
#define plrandd
Definition: plplot.h:678
static int _wrap_sstrm(lua_State *L)
#define plmeridians
Definition: plplot.h:660
SWIGRUNTIME void SWIG_Lua_pusherrstring(lua_State *L, const char *str)
static swig_type_info * swig_type_initial[]
#define plscmap0
Definition: plplot.h:684
static swig_cast_info _swigc__p_unsigned_int[]
static int _wrap_sfnam(lua_State *L)
#define plgstrm
Definition: plplot.h:638
#define SWIG_IsOK(r)
static int _wrap_seed(lua_State *L)
static int _wrap_abort(lua_State *L)
static swig_cast_info _swigc__p_PLGraphicsIn[]
static int _wrap_gfnam(lua_State *L)
static int _wrap_sdimap(lua_State *L)
#define plsfci
Definition: plplot.h:710
static int _wrap_col0(lua_State *L)
SWIGINTERN void SWIG_Lua_module_end(lua_State *L)
static int _wrap_svect(lua_State *L)
static int _wrap_styl(lua_State *L)
static int _wrap_gstrm(lua_State *L)
static int _wrap_clear(lua_State *L)
static int _wrap_spage(lua_State *L)
plResetOpts
Definition: plplotc.py:6946
static swig_cast_info _swigc__p_f_int_double_p_char_int_p_void__void[]
subroutine pltimefmt(fmt)
Definition: sfstubs.f90:784
static int _wrap_vpor(lua_State *L)
PLFLT * zg
Definition: plplot.h:428
#define plrgbhls
Definition: plplot.h:682
#define plsurf3d
Definition: plplot.h:739
void plcolorbar(PLFLT *p_colorbar_width, PLFLT *p_colorbar_height, PLINT opt, PLINT position, PLFLT x, PLFLT y, PLFLT x_length, PLFLT y_length, PLINT bg_color, PLINT bb_color, PLINT bb_style, PLFLT low_cap_color, PLFLT high_cap_color, PLINT cont_color, PLFLT cont_width, PLINT n_labels, const PLINT *label_opts, const char *const *label, PLINT n_axes, const char *const *axis_opts, const PLFLT *ticks, const PLINT *sub_ticks, const PLINT *n_values, const PLFLT *const *values) void my_plcolorbar(PLFLT *p_colorbar_width
static int _wrap_errx(lua_State *L)
#define plgra
Definition: plplot.h:634
static int _wrap_gcol0a(lua_State *L)
#define plsdimap
Definition: plplot.h:702
static int _wrap_scmap0a(lua_State *L)
static int _wrap_calc_world(lua_State *L)
SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L, void *ptr, size_t size, swig_type_info *type)
static int _wrap_sdiplt(lua_State *L)
static int _wrap_string(lua_State *L)
static int _wrap_PLGraphicsIn_wY_set(lua_State *L)
static int _wrap_btime(lua_State *L)
SWIGRUNTIME void * SWIG_Lua_MustGetPtr(lua_State *L, int index, swig_type_info *type, int flags, int argnum, const char *func_name)
#define plot3d
Definition: plplot.h:666
SWIGINTERN int SWIG_Lua_set_immutable(lua_State *L)
static int _wrap_env0(lua_State *L)
SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State *L, swig_lua_namespace *ns)
static int _wrap_PLGraphicsIn_subwindow_set(lua_State *L)
#define plslabelfunc
Definition: plplot.h:716
PLINT nx
Definition: plplot.h:429
SWIGRUNTIME void SWIG_Lua_pushferrstring(lua_State *L, const char *fmt,...)
static int _wrap_ssub(lua_State *L)
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
static int _wrap_xormod(lua_State *L)
static int _wrap_fill3(lua_State *L)
static int _wrap_syax(lua_State *L)