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