PLplot 5.15.0
Loading...
Searching...
No Matches
plplotluacLUA_wrap.c
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (https://www.swig.org).
3 * Version 4.3.0
4 *
5 * Do not make changes to this file unless you know what you are doing - modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
8
9
10#define SWIG_VERSION 0x040300
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 defined(__GNUC__)
83# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
84# ifndef GCC_HASCLASSVISIBILITY
85# define GCC_HASCLASSVISIBILITY
86# endif
87# endif
88#endif
89
90#ifndef SWIGEXPORT
91# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
92# if defined(STATIC_LINKED)
93# define SWIGEXPORT
94# else
95# define SWIGEXPORT __declspec(dllexport)
96# endif
97# else
98# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
99# define SWIGEXPORT __attribute__ ((visibility("default")))
100# else
101# define SWIGEXPORT
102# endif
103# endif
104#endif
105
106/* calling conventions for Windows */
107#ifndef SWIGSTDCALL
108# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
109# define SWIGSTDCALL __stdcall
110# else
111# define SWIGSTDCALL
112# endif
113#endif
114
115/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
116#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
117# define _CRT_SECURE_NO_DEPRECATE
118#endif
119
120/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
121#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
122# define _SCL_SECURE_NO_DEPRECATE
123#endif
124
125/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
126#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
127# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
128#endif
129
130/* Intel's compiler complains if a variable which was never initialised is
131 * cast to void, which is a common idiom which we use to indicate that we
132 * are aware a variable isn't used. So we just silence that warning.
133 * See: https://github.com/swig/swig/issues/192 for more discussion.
134 */
135#ifdef __INTEL_COMPILER
136# pragma warning disable 592
137#endif
138
139#if defined(__cplusplus) && __cplusplus >=201103L
140# define SWIG_NULLPTR nullptr
141#else
142# define SWIG_NULLPTR NULL
143#endif
144
145/* -----------------------------------------------------------------------------
146 * swigcompat.swg
147 *
148 * Macros to provide support compatibility with older C and C++ standards.
149 *
150 * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard.
151 * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option.
152 * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus.
153 * ----------------------------------------------------------------------------- */
154
155/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
156 * if you're missing it.
157 */
158#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
159 (defined __cplusplus && __cplusplus >= 201103L) || \
160 defined SWIG_HAVE_SNPRINTF) && \
161 !defined SWIG_NO_SNPRINTF
162# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
163# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
164#else
165/* Fallback versions ignore the buffer size, but most of our uses either have a
166 * fixed maximum possible size or dynamically allocate a buffer that's large
167 * enough.
168 */
169# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
170# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
171#endif
172
173/* -----------------------------------------------------------------------------
174 * swigrun.swg
175 *
176 * This file contains generic C API SWIG runtime support for pointer
177 * type checking.
178 * ----------------------------------------------------------------------------- */
179
180/* This should only be incremented when either the layout of swig_type_info changes,
181 or for whatever reason, the runtime changes incompatibly */
182#define SWIG_RUNTIME_VERSION "4"
183
184/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
185#ifdef SWIG_TYPE_TABLE
186# define SWIG_QUOTE_STRING(x) #x
187# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
188# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
189#else
190# define SWIG_TYPE_TABLE_NAME
191#endif
192
193/*
194 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
195 creating a static or dynamic library from the SWIG runtime code.
196 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
197
198 But only do this if strictly necessary, ie, if you have problems
199 with your compiler or suchlike.
200*/
201
202#ifndef SWIGRUNTIME
203# define SWIGRUNTIME SWIGINTERN
204#endif
205
206#ifndef SWIGRUNTIMEINLINE
207# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
208#endif
209
210/* Generic buffer size */
211#ifndef SWIG_BUFFER_SIZE
212# define SWIG_BUFFER_SIZE 1024
213#endif
214
215/* Flags for pointer conversions */
216#define SWIG_POINTER_DISOWN 0x1
217#define SWIG_CAST_NEW_MEMORY 0x2
218#define SWIG_POINTER_NO_NULL 0x4
219#define SWIG_POINTER_CLEAR 0x8
220#define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
221
222/* Flags for new pointer objects */
223#define SWIG_POINTER_OWN 0x1
224
225
226/*
227 Flags/methods for returning states.
228
229 The SWIG conversion methods, as ConvertPtr, return an integer
230 that tells if the conversion was successful or not. And if not,
231 an error code can be returned (see swigerrors.swg for the codes).
232
233 Use the following macros/flags to set or process the returning
234 states.
235
236 In old versions of SWIG, code such as the following was usually written:
237
238 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
239 // success code
240 } else {
241 //fail code
242 }
243
244 Now you can be more explicit:
245
246 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
247 if (SWIG_IsOK(res)) {
248 // success code
249 } else {
250 // fail code
251 }
252
253 which is the same really, but now you can also do
254
255 Type *ptr;
256 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
257 if (SWIG_IsOK(res)) {
258 // success code
259 if (SWIG_IsNewObj(res) {
260 ...
261 delete *ptr;
262 } else {
263 ...
264 }
265 } else {
266 // fail code
267 }
268
269 I.e., now SWIG_ConvertPtr can return new objects and you can
270 identify the case and take care of the deallocation. Of course that
271 also requires SWIG_ConvertPtr to return new result values, such as
272
273 int SWIG_ConvertPtr(obj, ptr,...) {
274 if (<obj is ok>) {
275 if (<need new object>) {
276 *ptr = <ptr to new allocated object>;
277 return SWIG_NEWOBJ;
278 } else {
279 *ptr = <ptr to old object>;
280 return SWIG_OLDOBJ;
281 }
282 } else {
283 return SWIG_BADOBJ;
284 }
285 }
286
287 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
288 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
289 SWIG errors code.
290
291 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
292 allows returning the 'cast rank', for example, if you have this
293
294 int food(double)
295 int fooi(int);
296
297 and you call
298
299 food(1) // cast rank '1' (1 -> 1.0)
300 fooi(1) // cast rank '0'
301
302 just use the SWIG_AddCast()/SWIG_CheckState()
303*/
304
305#define SWIG_OK (0)
306/* Runtime errors are < 0 */
307#define SWIG_ERROR (-1)
308/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
309/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
310/* Errors < -200 are generic runtime specific errors */
311#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
312
313#define SWIG_IsOK(r) (r >= 0)
314#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
315
316/* The CastRankLimit says how many bits are used for the cast rank */
317#define SWIG_CASTRANKLIMIT (1 << 8)
318/* The NewMask denotes the object was created (using new/malloc) */
319#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
320/* The TmpMask is for in/out typemaps that use temporary objects */
321#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
322/* Simple returning values */
323#define SWIG_BADOBJ (SWIG_ERROR)
324#define SWIG_OLDOBJ (SWIG_OK)
325#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
326#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
327/* Check, add and del object mask methods */
328#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
329#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
330#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
331#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
332#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
333#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
334
335/* Cast-Rank Mode */
336#if defined(SWIG_CASTRANK_MODE)
337# ifndef SWIG_TypeRank
338# define SWIG_TypeRank unsigned long
339# endif
340# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
341# define SWIG_MAXCASTRANK (2)
342# endif
343# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
344# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
346 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
347}
349 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
350}
351#else /* no cast-rank mode */
352# define SWIG_AddCast(r) (r)
353# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
354#endif
355
356
357#include <string.h>
358
359#ifdef __cplusplus
360extern "C" {
361#endif
362
363typedef void *(*swig_converter_func)(void *, int *);
364typedef struct swig_type_info *(*swig_dycast_func)(void **);
365
366/* Structure to store information on one type */
367typedef struct swig_type_info {
368 const char *name; /* mangled name of this type */
369 const char *str; /* human readable name of this type */
370 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
371 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
372 void *clientdata; /* language specific type data */
373 int owndata; /* flag if the structure owns the clientdata */
375
376/* Structure to store a type and conversion function used for casting */
377typedef struct swig_cast_info {
378 swig_type_info *type; /* pointer to type that is equivalent to this type */
379 swig_converter_func converter; /* function to cast the void pointers */
380 struct swig_cast_info *next; /* pointer to next cast in linked list */
381 struct swig_cast_info *prev; /* pointer to the previous cast */
383
384/* Structure used to store module information
385 * Each module generates one structure like this, and the runtime collects
386 * all of these structures and stores them in a circularly linked list.*/
387typedef struct swig_module_info {
388 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
389 size_t size; /* Number of types in this module */
390 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
391 swig_type_info **type_initial; /* Array of initially generated type structures */
392 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
393 void *clientdata; /* Language specific module data */
395
396/*
397 Compare two type names skipping the space characters, therefore
398 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
399
400 Return 0 when the two name types are equivalent, as in
401 strncmp, but skipping ' '.
402*/
403SWIGRUNTIME int
404SWIG_TypeNameComp(const char *f1, const char *l1,
405 const char *f2, const char *l2) {
406 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
407 while ((*f1 == ' ') && (f1 != l1)) ++f1;
408 while ((*f2 == ' ') && (f2 != l2)) ++f2;
409 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
410 }
411 return (int)((l1 - f1) - (l2 - f2));
412}
413
414/*
415 Check type equivalence in a name list like <name1>|<name2>|...
416 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
417*/
418SWIGRUNTIME int
419SWIG_TypeCmp(const char *nb, const char *tb) {
420 int equiv = 1;
421 const char* te = tb + strlen(tb);
422 const char* ne = nb;
423 while (equiv != 0 && *ne) {
424 for (nb = ne; *ne; ++ne) {
425 if (*ne == '|') break;
426 }
427 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
428 if (*ne) ++ne;
429 }
430 return equiv;
431}
432
433/*
434 Check type equivalence in a name list like <name1>|<name2>|...
435 Return 0 if not equal, 1 if equal
436*/
437SWIGRUNTIME int
438SWIG_TypeEquiv(const char *nb, const char *tb) {
439 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
440}
441
442/*
443 Check the typename
444*/
446SWIG_TypeCheck(const char *c, swig_type_info *ty) {
447 if (ty) {
448 swig_cast_info *iter = ty->cast;
449 while (iter) {
450 if (strcmp(iter->type->name, c) == 0) {
451 if (iter == ty->cast)
452 return iter;
453 /* Move iter to the top of the linked list */
454 iter->prev->next = iter->next;
455 if (iter->next)
456 iter->next->prev = iter->prev;
457 iter->next = ty->cast;
458 iter->prev = 0;
459 if (ty->cast) ty->cast->prev = iter;
460 ty->cast = iter;
461 return iter;
462 }
463 iter = iter->next;
464 }
465 }
466 return 0;
467}
468
469/*
470 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
471*/
474 if (ty) {
475 swig_cast_info *iter = ty->cast;
476 while (iter) {
477 if (iter->type == from) {
478 if (iter == ty->cast)
479 return iter;
480 /* Move iter to the top of the linked list */
481 iter->prev->next = iter->next;
482 if (iter->next)
483 iter->next->prev = iter->prev;
484 iter->next = ty->cast;
485 iter->prev = 0;
486 if (ty->cast) ty->cast->prev = iter;
487 ty->cast = iter;
488 return iter;
489 }
490 iter = iter->next;
491 }
492 }
493 return 0;
494}
495
496/*
497 Cast a pointer up an inheritance hierarchy
498*/
500SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
501 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
502}
503
504/*
505 Dynamic pointer casting. Down an inheritance hierarchy
506*/
509 swig_type_info *lastty = ty;
510 if (!ty || !ty->dcast) return ty;
511 while (ty && (ty->dcast)) {
512 ty = (*ty->dcast)(ptr);
513 if (ty) lastty = ty;
514 }
515 return lastty;
516}
517
518/*
519 Return the name associated with this type
520*/
521SWIGRUNTIMEINLINE const char *
523 return ty->name;
524}
525
526/*
527 Return the pretty name associated with this type,
528 that is an unmangled type name in a form presentable to the user.
529*/
530SWIGRUNTIME const char *
532 /* The "str" field contains the equivalent pretty names of the
533 type, separated by vertical-bar characters. Choose the last
534 name. It should be the most specific; a fully resolved name
535 but not necessarily with default template parameters expanded. */
536 if (!type) return NULL;
537 if (type->str != NULL) {
538 const char *last_name = type->str;
539 const char *s;
540 for (s = type->str; *s; s++)
541 if (*s == '|') last_name = s+1;
542 return last_name;
543 }
544 else
545 return type->name;
546}
547
548/*
549 Set the clientdata field for a type
550*/
551SWIGRUNTIME void
553 swig_cast_info *cast = ti->cast;
554 /* if (ti->clientdata == clientdata) return; */
556
557 while (cast) {
558 if (!cast->converter) {
559 swig_type_info *tc = cast->type;
560 if (!tc->clientdata) {
562 }
563 }
564 cast = cast->next;
565 }
566}
567SWIGRUNTIME void
572
573/*
574 Search for a swig_type_info structure only by mangled name
575 Search is a O(log #types)
576
577 We start searching at module start, and finish searching when start == end.
578 Note: if start == end at the beginning of the function, we go all the way around
579 the circular list.
580*/
583 swig_module_info *end,
584 const char *name) {
585 swig_module_info *iter = start;
586 do {
587 if (iter->size) {
588 size_t l = 0;
589 size_t r = iter->size - 1;
590 do {
591 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
592 size_t i = (l + r) >> 1;
593 const char *iname = iter->types[i]->name;
594 if (iname) {
595 int compare = strcmp(name, iname);
596 if (compare == 0) {
597 return iter->types[i];
598 } else if (compare < 0) {
599 if (i) {
600 r = i - 1;
601 } else {
602 break;
603 }
604 } else if (compare > 0) {
605 l = i + 1;
606 }
607 } else {
608 break; /* should never happen */
609 }
610 } while (l <= r);
611 }
612 iter = iter->next;
613 } while (iter != end);
614 return 0;
615}
616
617/*
618 Search for a swig_type_info structure for either a mangled name or a human readable name.
619 It first searches the mangled names of the types, which is a O(log #types)
620 If a type is not found it then searches the human readable names, which is O(#types).
621
622 We start searching at module start, and finish searching when start == end.
623 Note: if start == end at the beginning of the function, we go all the way around
624 the circular list.
625*/
628 swig_module_info *end,
629 const char *name) {
630 /* STEP 1: Search the name field using binary search */
632 if (ret) {
633 return ret;
634 } else {
635 /* STEP 2: If the type hasn't been found, do a complete search
636 of the str field (the human readable name) */
637 swig_module_info *iter = start;
638 do {
639 size_t i = 0;
640 for (; i < iter->size; ++i) {
641 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
642 return iter->types[i];
643 }
644 iter = iter->next;
645 } while (iter != end);
646 }
647
648 /* neither found a match */
649 return 0;
650}
651
652/*
653 Pack binary data into a string
654*/
655SWIGRUNTIME char *
656SWIG_PackData(char *c, void *ptr, size_t sz) {
657 static const char hex[17] = "0123456789abcdef";
658 const unsigned char *u = (unsigned char *) ptr;
659 const unsigned char *eu = u + sz;
660 for (; u != eu; ++u) {
661 unsigned char uu = *u;
662 *(c++) = hex[(uu & 0xf0) >> 4];
663 *(c++) = hex[uu & 0xf];
664 }
665 return c;
666}
667
668/*
669 Unpack binary data from a string
670*/
671SWIGRUNTIME const char *
672SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
673 unsigned char *u = (unsigned char *) ptr;
674 const unsigned char *eu = u + sz;
675 for (; u != eu; ++u) {
676 char d = *(c++);
677 unsigned char uu;
678 if ((d >= '0') && (d <= '9'))
679 uu = (unsigned char)((d - '0') << 4);
680 else if ((d >= 'a') && (d <= 'f'))
681 uu = (unsigned char)((d - ('a'-10)) << 4);
682 else
683 return (char *) 0;
684 d = *(c++);
685 if ((d >= '0') && (d <= '9'))
686 uu |= (unsigned char)(d - '0');
687 else if ((d >= 'a') && (d <= 'f'))
688 uu |= (unsigned char)(d - ('a'-10));
689 else
690 return (char *) 0;
691 *u = uu;
692 }
693 return c;
694}
695
696/*
697 Pack 'void *' into a string buffer.
698*/
699SWIGRUNTIME char *
700SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
701 char *r = buff;
702 if ((2*sizeof(void *) + 2) > bsz) return 0;
703 *(r++) = '_';
704 r = SWIG_PackData(r,&ptr,sizeof(void *));
705 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
706 strcpy(r,name);
707 return buff;
708}
709
710SWIGRUNTIME const char *
711SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
712 if (*c != '_') {
713 if (strcmp(c,"NULL") == 0) {
714 *ptr = (void *) 0;
715 return name;
716 } else {
717 return 0;
718 }
719 }
720 return SWIG_UnpackData(++c,ptr,sizeof(void *));
721}
722
723SWIGRUNTIME char *
724SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
725 char *r = buff;
726 size_t lname = (name ? strlen(name) : 0);
727 if ((2*sz + 2 + lname) > bsz) return 0;
728 *(r++) = '_';
729 r = SWIG_PackData(r,ptr,sz);
730 if (lname) {
731 strncpy(r,name,lname+1);
732 } else {
733 *r = 0;
734 }
735 return buff;
736}
737
738SWIGRUNTIME const char *
739SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
740 if (*c != '_') {
741 if (strcmp(c,"NULL") == 0) {
742 memset(ptr,0,sz);
743 return name;
744 } else {
745 return 0;
746 }
747 }
748 return SWIG_UnpackData(++c,ptr,sz);
749}
750
751#ifdef __cplusplus
752}
753#endif
754
755/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
756#define SWIG_UnknownError -1
757#define SWIG_IOError -2
758#define SWIG_RuntimeError -3
759#define SWIG_IndexError -4
760#define SWIG_TypeError -5
761#define SWIG_DivisionByZero -6
762#define SWIG_OverflowError -7
763#define SWIG_SyntaxError -8
764#define SWIG_ValueError -9
765#define SWIG_SystemError -10
766#define SWIG_AttributeError -11
767#define SWIG_MemoryError -12
768#define SWIG_NullReferenceError -13
769
770
771/* -----------------------------------------------------------------------------
772 * luarun.swg
773 *
774 * This file contains the runtime support for Lua modules
775 * and includes code for managing global variables and pointer
776 * type checking.
777 * ----------------------------------------------------------------------------- */
778
779#ifdef __cplusplus
780extern "C" {
781#endif
782
783#include "lua.h"
784#include "lauxlib.h"
785#include <stdlib.h> /* for malloc */
786#include <assert.h> /* for a few sanity tests */
787
788/* -----------------------------------------------------------------------------
789 * Lua flavors
790 * ----------------------------------------------------------------------------- */
791
792#define SWIG_LUA_FLAVOR_LUA 1
793#define SWIG_LUA_FLAVOR_ELUA 2
794#define SWIG_LUA_FLAVOR_ELUAC 3
795
796#if !defined(SWIG_LUA_TARGET)
797# error SWIG_LUA_TARGET not defined
798#endif
799
800#if defined(SWIG_LUA_ELUA_EMULATE)
801
802struct swig_elua_entry;
803
804typedef struct swig_elua_key {
805 int type;
806 union {
807 const char* strkey;
808 lua_Number numkey;
809 } key;
810} swig_elua_key;
811
812typedef struct swig_elua_val {
813 int type;
814 union {
815 lua_Number number;
816 const struct swig_elua_entry *table;
817 const char *string;
818 lua_CFunction function;
819 struct {
820 char member;
821 long lvalue;
822 void *pvalue;
823 swig_type_info **ptype;
824 } userdata;
825 } value;
826} swig_elua_val;
827
828typedef struct swig_elua_entry {
829 swig_elua_key key;
830 swig_elua_val value;
831} swig_elua_entry;
832
833#define LSTRKEY(x) {LUA_TSTRING, {.strkey = x} }
834#define LNUMKEY(x) {LUA_TNUMBER, {.numkey = x} }
835#define LNILKEY {LUA_TNIL, {.strkey = 0} }
836
837#define LNUMVAL(x) {LUA_TNUMBER, {.number = x} }
838#define LFUNCVAL(x) {LUA_TFUNCTION, {.function = x} }
839#define LROVAL(x) {LUA_TTABLE, {.table = x} }
840#define LNILVAL {LUA_TNIL, {.string = 0} }
841#define LSTRVAL(x) {LUA_TSTRING, {.string = x} }
842
843#define LUA_REG_TYPE swig_elua_entry
844
845#define SWIG_LUA_ELUA_EMUL_METATABLE_KEY "__metatable"
846
847#define lua_pushrotable(L,p)\
848 lua_newtable(L);\
849 assert(p);\
850 SWIG_Lua_elua_emulate_register(L,(swig_elua_entry*)(p));
851
852#define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
853 LSTRKEY(B), {LUA_TUSERDATA, { .userdata={0,0,(void*)(C),&D} } }
854
855#define SWIG_LUA_CONSTTAB_BINARY(B,S,C,D)\
856 LSTRKEY(B), {LUA_TUSERDATA, { .userdata={1,S,(void*)(C),&D} } }
857#endif
858
859#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
860# define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
861# define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
862# define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
863# define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
864 /* Those two types of constants are not supported in elua */
865
866#ifndef SWIG_LUA_CONSTTAB_POINTER
867#warning eLua does not support pointers as constants. By default, nil will be used as value
868#define SWIG_LUA_CONSTTAB_POINTER(B,C,D) LSTRKEY(B), LNILVAL
869#endif
870
871#ifndef SWIG_LUA_CONSTTAB_BINARY
872#warning eLua does not support pointers to member as constants. By default, nil will be used as value
873#define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D) LSTRKEY(B), LNILVAL
874#endif
875#else /* SWIG_LUA_FLAVOR_LUA */
876# define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
877# define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
878# define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
879# define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
880# define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
881 SWIG_LUA_POINTER, (char *)B, 0, 0, (void *)C, &D
882# define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D)\
883 SWIG_LUA_BINARY, (char *)B, S, 0, (void *)C, &D
884#endif
885
886#ifndef SWIG_LUA_ELUA_EMULATE
887#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
888# define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
889# define LSTRVAL LRO_STRVAL
890#endif
891#endif /* SWIG_LUA_ELUA_EMULATE*/
892
893#ifndef SWIG_LUA_ELUA_EMULATE
894#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
895
896#ifndef MIN_OPT_LEVEL
897#define MIN_OPT_LEVEL 2
898#endif
899
900#include "lrodefs.h"
901#include "lrotable.h"
902#endif
903#endif /* SWIG_LUA_ELUA_EMULATE*/
904/* -----------------------------------------------------------------------------
905 * compatibility defines
906 * ----------------------------------------------------------------------------- */
907
908/* History of Lua C API length functions: In Lua 5.0 (and before?)
909 there was "lua_strlen". In Lua 5.1, this was renamed "lua_objlen",
910 but a compatibility define of "lua_strlen" was added. In Lua 5.2,
911 this function was again renamed, to "lua_rawlen" (to emphasize that
912 it doesn't call the "__len" metamethod), and the compatibility
913 define of lua_strlen was removed. All SWIG uses have been updated
914 to "lua_rawlen", and we add our own defines of that here for older
915 versions of Lua. */
916#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
917# define lua_rawlen lua_strlen
918#elif LUA_VERSION_NUM == 501
919# define lua_rawlen lua_objlen
920#endif
921
922/* lua_tolstring() was added in Lua 5.1. It should be a little more
923 efficient than making two separate calls and it avoids problems with order
924 of evaluation so SWIG calls lua_tolstring() when it wants the length and
925 we provide a compatibility implementation for Lua 5.0. */
926#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
927static const char *(lua_tolstring)(lua_State *L, int idx, size_t *len) {
928 /* Call lua_tostring() first as it may convert the value from number to
929 string. */
930 const char *result = lua_tostring(L, idx);
931 if (len) *len = lua_strlen(L, idx);
932 return result;
933}
934#endif
935
936
937/* lua_pushglobaltable is the recommended "future-proof" way to get
938 the global table for Lua 5.2 and later. Here we define
939 lua_pushglobaltable ourselves for Lua versions before 5.2. */
940#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
941# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
942#endif
943
944/* lua_absindex was introduced in Lua 5.2 */
945#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
946# define lua_absindex(L,i) ((i)>0 || (i) <= LUA_REGISTRYINDEX ? (i) : lua_gettop(L) + (i) + 1)
947#endif
948
949/* lua_rawsetp was introduced in Lua 5.2 */
950#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
951#define lua_rawsetp(L,index,ptr)\
952 lua_pushlightuserdata(L,(void*)(ptr));\
953 lua_insert(L,-2);\
954 lua_rawset(L,index);
955
956#define lua_rawgetp(L,index,ptr)\
957 lua_pushlightuserdata(L,(void*)(ptr));\
958 lua_rawget(L,index);
959
960#endif
961
962/* --------------------------------------------------------------------------
963 * Helper functions for error handling
964 * -------------------------------------------------------------------------- */
965
966/* Push the string STR on the Lua stack, like lua_pushstring, but
967 prefixed with the location of the innermost Lua call-point
968 (as formatted by luaL_where). */
969SWIGRUNTIME void
970SWIG_Lua_pusherrstring (lua_State *L, const char *str)
971{
972 luaL_where (L, 1);
973 lua_pushstring (L, str);
974 lua_concat (L, 2);
975}
976
977/* Push a formatted string generated from FMT and following args on
978 the Lua stack, like lua_pushfstring, but prefixed with the
979 location of the innermost Lua call-point (as formatted by luaL_where). */
980SWIGRUNTIME void
981SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...)
982{
983 va_list argp;
984 va_start(argp, fmt);
985 luaL_where(L, 1);
986 lua_pushvfstring(L, fmt, argp);
987 va_end(argp);
988 lua_concat(L, 2);
989}
990
991
992/* -----------------------------------------------------------------------------
993 * global swig types
994 * ----------------------------------------------------------------------------- */
995/* Constant table */
996#define SWIG_LUA_INT 1
997#define SWIG_LUA_FLOAT 2
998#define SWIG_LUA_STRING 3
999#define SWIG_LUA_POINTER 4
1000#define SWIG_LUA_BINARY 5
1001#define SWIG_LUA_CHAR 6
1002
1003/* Structure for variable linking table */
1004typedef struct {
1005 const char *name;
1006 lua_CFunction get;
1007 lua_CFunction set;
1009
1010#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
1011typedef const LUA_REG_TYPE swig_lua_method;
1012typedef const LUA_REG_TYPE swig_lua_const_info;
1013#else /* Normal lua */
1014typedef luaL_Reg swig_lua_method;
1015
1016/* Constant information structure */
1017typedef struct {
1018 int type;
1019 char *name;
1021 double dvalue;
1022 void *pvalue;
1025
1026#endif
1027
1028typedef struct {
1029 const char *name;
1030 lua_CFunction getmethod;
1031 lua_CFunction setmethod;
1033
1034
1035struct swig_lua_class;
1036/* Can be used to create namespaces. Currently used to wrap class static methods/variables/constants */
1045
1046typedef struct swig_lua_class {
1047 const char *name; /* Name that this class has in Lua */
1048 const char *fqname; /* Fully qualified name - Scope + class name */
1050 lua_CFunction constructor;
1051 void (*destructor)(void *);
1055 swig_lua_method *metatable; /* 0 for -eluac */
1057 const char **base_names;
1059
1060/* this is the struct for wrapping all pointers in SwigLua
1061*/
1062typedef struct {
1064 int own; /* 1 if owned & must be destroyed */
1065 void *ptr;
1067
1068/* this is the struct for wrapping arbitrary packed binary data
1069(currently it is only used for member function pointers)
1070the data ordering is similar to swig_lua_userdata, but it is currently not possible
1071to tell the two structures apart within SWIG, other than by looking at the type
1072*/
1073typedef struct {
1075 int own; /* 1 if owned & must be destroyed */
1076 char data[1]; /* arbitrary amount of data */
1078
1079/* Common SWIG API */
1080#define SWIG_NewPointerObj(L, ptr, type, owner) SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
1081#define SWIG_ConvertPtr(L,idx, ptr, type, flags) SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
1082#define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname) SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
1083/* for C++ member pointers, ie, member methods */
1084#define SWIG_ConvertMember(L, idx, ptr, sz, ty) SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
1085#define SWIG_NewMemberObj(L, ptr, sz, type) SWIG_Lua_NewPackedObj(L, ptr, sz, type)
1086
1087/* Runtime API */
1088#define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
1089#define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
1090#define SWIG_MODULE_CLIENTDATA_TYPE lua_State*
1091
1092/* Contract support */
1093#define SWIG_contract_assert(expr, msg) \
1094 do { if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } } while (0)
1095
1096
1097/* helper #defines */
1098#define SWIG_fail {goto fail;}
1099#define SWIG_fail_arg(func_name,argnum,type) \
1100 {SWIG_Lua_pushferrstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
1101 func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
1102 goto fail;}
1103#define SWIG_fail_ptr(func_name,argnum,type) \
1104 SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
1105#define SWIG_check_num_args(func_name,a,b) \
1106 if (lua_gettop(L)<a || lua_gettop(L)>b) \
1107 {SWIG_Lua_pushferrstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
1108 goto fail;}
1109
1110
1111#define SWIG_Lua_get_table(L,n) \
1112 (lua_pushstring(L, n), lua_rawget(L,-2))
1113
1114#define SWIG_Lua_add_function(L,n,f) \
1115 (lua_pushstring(L, n), \
1116 lua_pushcfunction(L, f), \
1117 lua_rawset(L,-3))
1118
1119#define SWIG_Lua_add_boolean(L,n,b) \
1120 (lua_pushstring(L, n), \
1121 lua_pushboolean(L, b), \
1122 lua_rawset(L,-3))
1123
1124/* special helper for allowing 'nil' for usertypes */
1125#define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))
1126
1127#ifdef __cplusplus
1128/* Special helper for member function pointers
1129it gets the address, casts it, then dereferences it */
1130/*#define SWIG_mem_fn_as_voidptr(a) (*((char**)&(a))) */
1131#endif
1132
1133/* storing/access of swig_module_info */
1135SWIG_Lua_GetModule(lua_State *L) {
1136 swig_module_info *ret = 0;
1137 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1138 lua_rawget(L,LUA_REGISTRYINDEX);
1139 if (lua_islightuserdata(L,-1))
1140 ret=(swig_module_info*)lua_touserdata(L,-1);
1141 lua_pop(L,1); /* tidy */
1142 return ret;
1143}
1144
1145SWIGRUNTIME void
1146SWIG_Lua_SetModule(lua_State *L, swig_module_info *module) {
1147 /* add this all into the Lua registry: */
1148 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1149 lua_pushlightuserdata(L,(void*)module);
1150 lua_rawset(L,LUA_REGISTRYINDEX);
1151}
1152
1153/* -----------------------------------------------------------------------------
1154 * global variable support code: modules
1155 * ----------------------------------------------------------------------------- */
1156
1157/* this function is called when trying to set an immutable.
1158default action is to print an error.
1159This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
1161{
1162/* there should be 1 param passed in: the new value */
1163#ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
1164 lua_pop(L,1); /* remove it */
1165 luaL_error(L,"This variable is immutable");
1166#endif
1167 return 0; /* should not return anything */
1168}
1169
1170#ifdef SWIG_LUA_ELUA_EMULATE
1171
1172SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own);
1173SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type);
1174static int swig_lua_elua_emulate_unique_key;
1175
1176/* This function emulates eLua rotables behaviour. It loads a rotable definition into the usual lua table. */
1177SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_entry *table)
1178{
1179 int i, table_parsed, parsed_tables_array, target_table;
1180 assert(lua_istable(L,-1));
1181 target_table = lua_gettop(L);
1182 /* Get the registry where we put all parsed tables to avoid loops */
1183 lua_rawgetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
1184 if(lua_isnil(L,-1)) {
1185 lua_pop(L,1);
1186 lua_newtable(L);
1187 lua_pushvalue(L,-1);
1188 lua_rawsetp(L,LUA_REGISTRYINDEX,(void*)(&swig_lua_elua_emulate_unique_key));
1189 }
1190 parsed_tables_array = lua_gettop(L);
1191 lua_pushvalue(L,target_table);
1192 lua_rawsetp(L, parsed_tables_array, table);
1193 table_parsed = 0;
1194 const int SWIGUNUSED pairs_start = lua_gettop(L);
1195 for(i = 0;table[i].key.type != LUA_TNIL || table[i].value.type != LUA_TNIL;i++)
1196 {
1197 const swig_elua_entry *entry = table + i;
1198 int is_metatable = 0;
1199 switch(entry->key.type) {
1200 case LUA_TSTRING:
1201 lua_pushstring(L,entry->key.key.strkey);
1202 if(strcmp(entry->key.key.strkey, SWIG_LUA_ELUA_EMUL_METATABLE_KEY) == 0)
1203 is_metatable = 1;
1204 break;
1205 case LUA_TNUMBER:
1206 lua_pushnumber(L,entry->key.key.numkey);
1207 break;
1208 case LUA_TNIL:
1209 lua_pushnil(L);
1210 break;
1211 default:
1212 assert(0);
1213 }
1214 switch(entry->value.type) {
1215 case LUA_TSTRING:
1216 lua_pushstring(L,entry->value.value.string);
1217 break;
1218 case LUA_TNUMBER:
1219 lua_pushnumber(L,entry->value.value.number);
1220 break;
1221 case LUA_TFUNCTION:
1222 lua_pushcfunction(L,entry->value.value.function);
1223 break;
1224 case LUA_TTABLE:
1225 lua_rawgetp(L,parsed_tables_array, entry->value.value.table);
1226 table_parsed = !lua_isnil(L,-1);
1227 if(!table_parsed) {
1228 lua_pop(L,1); /*remove nil */
1229 lua_newtable(L);
1230 SWIG_Lua_elua_emulate_register(L,entry->value.value.table);
1231 }
1232 if(is_metatable) {
1233 assert(lua_istable(L,-1));
1234 lua_pushvalue(L,-1);
1235 lua_setmetatable(L,target_table);
1236 }
1237
1238 break;
1239 case LUA_TUSERDATA:
1240 if(entry->value.value.userdata.member)
1241 SWIG_NewMemberObj(L,entry->value.value.userdata.pvalue,
1242 entry->value.value.userdata.lvalue,
1243 *(entry->value.value.userdata.ptype));
1244 else
1245 SWIG_NewPointerObj(L,entry->value.value.userdata.pvalue,
1246 *(entry->value.value.userdata.ptype),0);
1247 break;
1248 case LUA_TNIL:
1249 lua_pushnil(L);
1250 break;
1251 default:
1252 assert(0);
1253 }
1254 assert(lua_gettop(L) == pairs_start + 2);
1255 lua_rawset(L,target_table);
1256 }
1257 lua_pop(L,1); /* Removing parsed tables storage */
1258 assert(lua_gettop(L) == target_table);
1259}
1260
1261SWIGINTERN void SWIG_Lua_elua_emulate_register_clear(lua_State *L)
1262{
1263 lua_pushnil(L);
1264 lua_rawsetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
1265}
1266
1267SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L);
1268
1269SWIGINTERN int SWIG_Lua_emulate_elua_getmetatable(lua_State *L)
1270{
1271 SWIG_check_num_args("getmetatable(SWIG eLua emulation)", 1, 1);
1273 lua_getfield(L,-1,"lua_getmetatable");
1274 lua_remove(L,-2); /* remove the registry*/
1275 assert(!lua_isnil(L,-1));
1276 lua_pushvalue(L,1);
1277 assert(lua_gettop(L) == 3); /* object | function | object again */
1278 lua_call(L,1,1);
1279 if(!lua_isnil(L,-1)) /*There is an ordinary metatable */
1280 return 1;
1281 /*if it is a table, then emulate elua behaviour - check for __metatable attribute of a table*/
1282 assert(lua_gettop(L) == 2);
1283 if(lua_istable(L,-2)) {
1284 lua_pop(L,1); /*remove the nil*/
1285 lua_getfield(L,-1, SWIG_LUA_ELUA_EMUL_METATABLE_KEY);
1286 }
1287 assert(lua_gettop(L) == 2);
1288 return 1;
1289
1290fail:
1291 lua_error(L);
1292 return 0;
1293}
1294
1295SWIGINTERN void SWIG_Lua_emulate_elua_swap_getmetatable(lua_State *L)
1296{
1299 lua_pushstring(L,"lua_getmetatable");
1300 lua_getfield(L,-2,"getmetatable");
1301 assert(!lua_isnil(L,-1));
1302 lua_rawset(L,-4);
1303 lua_pushstring(L, "getmetatable");
1304 lua_pushcfunction(L, SWIG_Lua_emulate_elua_getmetatable);
1305 lua_rawset(L,-3);
1306 lua_pop(L,2);
1307
1308}
1309/* END OF REMOVE */
1310
1311#endif
1312/* -----------------------------------------------------------------------------
1313 * global variable support code: namespaces and modules (which are the same thing)
1314 * ----------------------------------------------------------------------------- */
1315
1317{
1318/* there should be 2 params passed in
1319 (1) table (not the meta table)
1320 (2) string name of the attribute
1321*/
1322 assert(lua_istable(L,-2)); /* just in case */
1323 lua_getmetatable(L,-2);
1324 assert(lua_istable(L,-1));
1325 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1326 assert(lua_istable(L,-1));
1327 /* look for the key in the .get table */
1328 lua_pushvalue(L,2); /* key */
1329 lua_rawget(L,-2);
1330 lua_remove(L,-2); /* stack tidy, remove .get table */
1331 if (lua_iscfunction(L,-1))
1332 { /* found it so call the fn & return its value */
1333 lua_call(L,0,1); /* 1 value in (userdata),1 out (result) */
1334 lua_remove(L,-2); /* stack tidy, remove metatable */
1335 return 1;
1336 }
1337 lua_pop(L,1); /* remove whatever was there */
1338 /* ok, so try the .fn table */
1339 SWIG_Lua_get_table(L,".fn"); /* find the .get table */
1340 assert(lua_istable(L,-1)); /* just in case */
1341 lua_pushvalue(L,2); /* key */
1342 lua_rawget(L,-2); /* look for the fn */
1343 lua_remove(L,-2); /* stack tidy, remove .fn table */
1344 if (lua_isfunction(L,-1)) /* note: whether it's a C function or lua function */
1345 { /* found it so return the fn & let lua call it */
1346 lua_remove(L,-2); /* stack tidy, remove metatable */
1347 return 1;
1348 }
1349 lua_pop(L,1); /* remove whatever was there */
1350 return 0;
1351}
1352
1354{
1355/* there should be 3 params passed in
1356 (1) table (not the meta table)
1357 (2) string name of the attribute
1358 (3) any for the new value
1359*/
1360
1361 assert(lua_istable(L,1));
1362 lua_getmetatable(L,1); /* get the meta table */
1363 assert(lua_istable(L,-1));
1364
1365 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1366 if (lua_istable(L,-1))
1367 {
1368 /* look for the key in the .set table */
1369 lua_pushvalue(L,2); /* key */
1370 lua_rawget(L,-2);
1371 if (lua_iscfunction(L,-1))
1372 { /* found it so call the fn & return its value */
1373 lua_pushvalue(L,3); /* value */
1374 lua_call(L,1,0);
1375 return 0;
1376 }
1377 lua_pop(L,1); /* remove the value */
1378 }
1379 lua_pop(L,1); /* remove the value .set table */
1380 lua_pop(L,1); /* remote metatable */
1381 lua_rawset(L,-3);
1382 return 0;
1383}
1384
1385#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
1386SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]); /* forward declaration */
1387SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn); /* forward declaration */
1388SWIGINTERN void SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss);
1389
1390/* helper function - register namespace methods and attributes into namespace */
1392{
1393 int i;
1394 /* There must be namespace table (not metatable) at the top of the stack */
1395 assert(lua_istable(L,-1));
1397
1398 /* add methods to the namespace/module table */
1399 for(i=0;ns->ns_methods[i].name;i++){
1400 SWIG_Lua_add_function(L,ns->ns_methods[i].name,ns->ns_methods[i].func);
1401 }
1402 lua_getmetatable(L,-1);
1403
1404 /* add fns */
1405 for(i=0;ns->ns_attributes[i].name;i++){
1407 }
1408
1409 /* clear stack - remove metatble */
1410 lua_pop(L,1);
1411 return 0;
1412}
1413
1414/* Register all classes in the namespace */
1416{
1417 swig_lua_class **classes;
1418
1419 /* There must be a module/namespace table at the top of the stack */
1420 assert(lua_istable(L,-1));
1421
1422 classes = ns->ns_classes;
1423
1424 if( classes != 0 ) {
1425 while(*classes != 0) {
1426 SWIG_Lua_class_register(L, *classes);
1427 classes++;
1428 }
1429 }
1430}
1431
1432/* Helper function. Creates namespace table and adds it to module table
1433 if 'reg' is true, then will register namespace table to parent one (must be on top of the stack
1434 when function is called).
1435 Function always returns newly registered table on top of the stack.
1436*/
1438{
1439 swig_lua_namespace **sub_namespace;
1440 /* 1 argument - table on the top of the stack */
1441 const int SWIGUNUSED begin = lua_gettop(L);
1442 assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table or parent namespace table */
1443 lua_checkstack(L,5);
1444 lua_newtable(L); /* namespace itself */
1445 lua_newtable(L); /* metatable for namespace */
1446
1447 /* add a table called ".get" */
1448 lua_pushstring(L,".get");
1449 lua_newtable(L);
1450 lua_rawset(L,-3);
1451 /* add a table called ".set" */
1452 lua_pushstring(L,".set");
1453 lua_newtable(L);
1454 lua_rawset(L,-3);
1455 /* add a table called ".fn" */
1456 lua_pushstring(L,".fn");
1457 lua_newtable(L);
1458 lua_rawset(L,-3);
1459
1460 /* add accessor fns for using the .get,.set&.fn */
1463
1464 lua_setmetatable(L,-2); /* set metatable */
1465
1466 /* Register all functions, variables etc */
1468 /* Register classes */
1470
1471 sub_namespace = ns->ns_namespaces;
1472 if( sub_namespace != 0) {
1473 while(*sub_namespace != 0) {
1474 SWIG_Lua_namespace_register(L, *sub_namespace, 1);
1475 lua_pop(L,1); /* removing sub-namespace table */
1476 sub_namespace++;
1477 }
1478 }
1479
1480 if (reg) {
1481 lua_pushstring(L,ns->name);
1482 lua_pushvalue(L,-2);
1483 lua_rawset(L,-4); /* add namespace to module table */
1484 }
1485 assert(lua_gettop(L) == begin+1);
1486}
1487#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */
1488
1489/* -----------------------------------------------------------------------------
1490 * global variable support code: classes
1491 * ----------------------------------------------------------------------------- */
1492
1493SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname);
1494
1495typedef int (*swig_lua_base_iterator_func)(lua_State*,swig_type_info*, int, int *ret);
1496
1498 int first_arg, swig_lua_base_iterator_func func, int *const ret)
1499{
1500 /* first_arg - position of the object in stack. Everything that is above are arguments
1501 * and is passed to every evocation of the func */
1502 int last_arg = lua_gettop(L);/* position of last argument */
1503 int original_metatable = last_arg + 1;
1504 size_t bases_count;
1505 int result = SWIG_ERROR;
1506 int bases_table;
1507 (void)swig_type;
1508 lua_getmetatable(L,first_arg);
1509
1510 /* initialise base search */
1511#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1512 SWIG_Lua_get_table(L,".bases");
1513 assert(lua_istable(L,-1));
1514 bases_count = lua_rawlen(L,-1);
1515 bases_table = lua_gettop(L);
1516#else
1517 /* In elua .bases table doesn't exist. Use table from swig_lua_class */
1518 (void)bases_table;
1519 assert(swig_type!=0);
1521 swig_lua_class **bases= ((swig_lua_class*)(swig_type->clientdata))->bases;
1522 const char **base_names= ((swig_lua_class*)(swig_type->clientdata))->base_names;
1523 bases_count = 0;
1524 for(;base_names[bases_count];
1525 bases_count++);/* get length of bases */
1526#endif
1527
1528 if(ret)
1529 *ret = 0;
1530 if(bases_count>0)
1531 {
1532 int to_remove;
1533 size_t i;
1534 int j;
1535 int subcall_last_arg;
1536 int subcall_first_arg = lua_gettop(L) + 1;/* Here a copy of first_arg and arguments begin */
1537 int valid = 1;
1538 swig_type_info *base_swig_type = 0;
1539 for(j=first_arg;j<=last_arg;j++)
1540 lua_pushvalue(L,j);
1541 subcall_last_arg = lua_gettop(L);
1542
1543 /* Trick: temporarily replacing original metatable with metatable for base class and call getter */
1544 for(i=0;i<bases_count;i++) {
1545 /* Iteration through class bases */
1546#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1547 lua_rawgeti(L,bases_table,i+1);
1548 base_swig_type = 0;
1549 if(lua_isnil(L,-1)) {
1550 valid = 0;
1551 lua_pop(L,1);
1552 } else {
1553 valid = 1;
1554 }
1555#else /* In elua .bases table doesn't exist. Use table from swig_lua_class */
1556 swig_lua_class *base_class = bases[i];
1557 if(!base_class) {
1558 valid = 0;
1559 } else {
1560 valid = 1;
1561 SWIG_Lua_get_class_metatable(L,base_class->fqname);
1562 base_swig_type = SWIG_TypeQueryModule(module,module,base_names[i]);
1563 assert(base_swig_type != 0);
1564 }
1565#endif
1566
1567 if(!valid)
1568 continue;
1569 assert(lua_isuserdata(L, subcall_first_arg));
1570 assert(lua_istable(L,-1));
1571 lua_setmetatable(L,subcall_first_arg); /* Set new metatable */
1572 assert(lua_gettop(L) == subcall_last_arg);
1573 result = func(L, base_swig_type,subcall_first_arg, ret); /* Forward call */
1574 if(result != SWIG_ERROR) {
1575 break;
1576 }
1577 }
1578 /* Restore original metatable */
1579 lua_pushvalue(L,original_metatable);
1580 lua_setmetatable(L,first_arg);
1581 /* Clear - remove everything between last_arg and subcall_last_arg including */
1582 to_remove = subcall_last_arg - last_arg;
1583 for(j=0;j<to_remove;j++)
1584 lua_remove(L,last_arg+1);
1585 } else {
1586 /* Remove everything after last_arg */
1587 lua_pop(L, lua_gettop(L) - last_arg);
1588 }
1589 if(ret) assert(lua_gettop(L) == last_arg + *ret);
1590 return result;
1591}
1592
1593/* The class.get method helper, performs the lookup of class attributes.
1594 * It returns an error code. Number of function return values is passed inside 'ret'.
1595 * first_arg is not used in this function because function always has 2 arguments.
1596 */
1597SWIGINTERN int SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
1598{
1599/* there should be 2 params passed in
1600 (1) userdata (not the meta table)
1601 (2) string name of the attribute
1602*/
1603 int bases_search_result;
1604 int substack_start = lua_gettop(L)-2;
1605 assert(first_arg == substack_start+1);
1606 (void)first_arg;
1607 lua_checkstack(L,5);
1608 assert(lua_isuserdata(L,-2)); /* just in case */
1609 lua_getmetatable(L,-2); /* get the meta table */
1610 assert(lua_istable(L,-1)); /* just in case */
1611 /* NEW: looks for the __getitem() fn
1612 this is a user provided get fn */
1613 SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
1614 if (lua_iscfunction(L,-1)) /* if it's there */
1615 { /* found it so call the fn & return its value */
1616 lua_pushvalue(L,substack_start+1); /* the userdata */
1617 lua_pushvalue(L,substack_start+2); /* the parameter */
1618 lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */
1619 lua_remove(L,-2); /* stack tidy, remove metatable */
1620 if(ret) *ret = 1;
1621 return SWIG_OK;
1622 }
1623 lua_pop(L,1);
1624 /* Remove the metatable */
1625 lua_pop(L,1);
1626 /* Search in base classes */
1627 bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get_item,ret);
1628 return bases_search_result; /* sorry not known */
1629}
1630
1631
1632/* The class.get method helper, performs the lookup of class attributes.
1633 * It returns an error code. Number of function return values is passed inside 'ret'.
1634 * first_arg is not used in this function because function always has 2 arguments.
1635 */
1636SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
1637{
1638/* there should be 2 params passed in
1639 (1) userdata (not the meta table)
1640 (2) string name of the attribute
1641*/
1642 int bases_search_result;
1643 int substack_start = lua_gettop(L)-2;
1644 assert(first_arg == substack_start+1);
1645 (void)first_arg;
1646 lua_checkstack(L,5);
1647 assert(lua_isuserdata(L,-2)); /* just in case */
1648 lua_getmetatable(L,-2); /* get the meta table */
1649 assert(lua_istable(L,-1)); /* just in case */
1650 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1651 assert(lua_istable(L,-1)); /* just in case */
1652 /* look for the key in the .get table */
1653 lua_pushvalue(L,substack_start+2); /* key */
1654 lua_rawget(L,-2);
1655 lua_remove(L,-2); /* stack tidy, remove .get table */
1656 if (lua_iscfunction(L,-1))
1657 { /* found it so call the fn & return its value */
1658 lua_pushvalue(L,substack_start+1); /* the userdata */
1659 lua_call(L,1,1); /* 1 value in (userdata),1 out (result) */
1660 lua_remove(L,-2); /* stack tidy, remove metatable */
1661 if(ret)
1662 *ret = 1;
1663 return SWIG_OK;
1664 }
1665 lua_pop(L,1); /* remove whatever was there */
1666 /* ok, so try the .fn table */
1667 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
1668 assert(lua_istable(L,-1)); /* just in case */
1669 lua_pushvalue(L,substack_start+2); /* key */
1670 lua_rawget(L,-2); /* look for the fn */
1671 lua_remove(L,-2); /* stack tidy, remove .fn table */
1672 if (lua_isfunction(L,-1)) /* note: if it's a C function or lua function */
1673 { /* found it so return the fn & let lua call it */
1674 lua_remove(L,-2); /* stack tidy, remove metatable */
1675 if(ret)
1676 *ret = 1;
1677 return SWIG_OK;
1678 }
1679 lua_pop(L,1); /* remove whatever was there */
1680 /* Remove the metatable */
1681 lua_pop(L,1);
1682 /* Search in base classes */
1683 bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get,ret);
1684 return bases_search_result; /* sorry not known */
1685}
1686
1687/* the class.get method, performs the lookup of class attributes
1688 */
1690{
1691/* there should be 2 params passed in
1692 (1) userdata (not the meta table)
1693 (2) string name of the attribute
1694*/
1695 int result;
1696 swig_lua_userdata *usr;
1697 swig_type_info *type;
1698 int ret = 0;
1699 assert(lua_isuserdata(L,1));
1700 usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1701 type = usr->type;
1702 result = SWIG_Lua_class_do_get(L,type,1,&ret);
1703 if(result == SWIG_OK)
1704 return ret;
1705
1706 result = SWIG_Lua_class_do_get_item(L,type,1,&ret);
1707 if(result == SWIG_OK)
1708 return ret;
1709
1710 return 0;
1711}
1712
1713/* helper for the class.set method, performs the lookup of class attributes
1714 * It returns error code. Number of function return values is passed inside 'ret'
1715 */
1716SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret)
1717{
1718/* there should be 3 params passed in
1719 (1) table (not the meta table)
1720 (2) string name of the attribute
1721 (3) any for the new value
1722 */
1723
1724 int bases_search_result;
1725 int substack_start = lua_gettop(L) - 3;
1726 lua_checkstack(L,5);
1727 assert(lua_isuserdata(L,substack_start+1)); /* just in case */
1728 lua_getmetatable(L,substack_start+1); /* get the meta table */
1729 assert(lua_istable(L,-1)); /* just in case */
1730 if(ret)
1731 *ret = 0; /* it is setter - number of return values is always 0 */
1732
1733 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1734 if (lua_istable(L,-1))
1735 {
1736 /* look for the key in the .set table */
1737 lua_pushvalue(L,substack_start+2); /* key */
1738 lua_rawget(L,-2);
1739 lua_remove(L,-2); /* tidy stack, remove .set table */
1740 if (lua_iscfunction(L,-1))
1741 { /* found it so call the fn & return its value */
1742 lua_pushvalue(L,substack_start+1); /* userdata */
1743 lua_pushvalue(L,substack_start+3); /* value */
1744 lua_call(L,2,0);
1745 lua_remove(L,substack_start+4); /*remove metatable*/
1746 return SWIG_OK;
1747 }
1748 lua_pop(L,1); /* remove the value */
1749 } else {
1750 lua_pop(L,1); /* remove the answer for .set table request*/
1751 }
1752 /* NEW: looks for the __setitem() fn
1753 this is a user provided set fn */
1754 SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
1755 if (lua_iscfunction(L,-1)) /* if it's there */
1756 { /* found it so call the fn & return its value */
1757 lua_pushvalue(L,substack_start+1); /* the userdata */
1758 lua_pushvalue(L,substack_start+2); /* the parameter */
1759 lua_pushvalue(L,substack_start+3); /* the value */
1760 lua_call(L,3,0); /* 3 values in ,0 out */
1761 lua_remove(L,-2); /* stack tidy, remove metatable */
1762 return SWIG_OK;
1763 }
1764 lua_pop(L,1); /* remove value */
1765
1766 lua_pop(L,1); /* remove metatable */
1767 /* Search among bases */
1768 bases_search_result = SWIG_Lua_iterate_bases(L,type,first_arg,SWIG_Lua_class_do_set,ret);
1769 if(ret)
1770 assert(*ret == 0);
1771 assert(lua_gettop(L) == substack_start + 3);
1772 return bases_search_result;
1773}
1774
1775/* This is the actual method exported to Lua. It calls SWIG_Lua_class_do_set and correctly
1776 * handles return values.
1777 */
1779{
1780/* There should be 3 params passed in
1781 (1) table (not the meta table)
1782 (2) string name of the attribute
1783 (3) any for the new value
1784 */
1785 int ret = 0;
1786 int result;
1787 swig_lua_userdata *usr;
1788 swig_type_info *type;
1789 assert(lua_isuserdata(L,1));
1790 usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1791 type = usr->type;
1792 result = SWIG_Lua_class_do_set(L,type,1,&ret);
1793 if(result != SWIG_OK) {
1794 SWIG_Lua_pushferrstring(L,"Assignment not possible. No setter/member with this name. For custom assignments implement __setitem method.");
1795 lua_error(L);
1796 } else {
1797 assert(ret==0);
1798 }
1799 return 0;
1800}
1801
1802/* the class.destruct method called by the interpreter */
1804{
1805/* there should be 1 params passed in
1806 (1) userdata (not the meta table) */
1807 swig_lua_userdata *usr;
1808 swig_lua_class *clss;
1809 assert(lua_isuserdata(L,-1)); /* just in case */
1810 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1811 /* if must be destroyed & has a destructor */
1812 if (usr->own) /* if must be destroyed */
1813 {
1814 clss=(swig_lua_class*)usr->type->clientdata; /* get the class */
1815 if (clss && clss->destructor) /* there is a destroy fn */
1816 {
1817 clss->destructor(usr->ptr); /* bye bye */
1818 }
1819 }
1820 return 0;
1821}
1822
1823/* the class.__tostring method called by the interpreter and print */
1825{
1826/* there should be 1 param passed in
1827 (1) userdata (not the metatable) */
1828 swig_lua_userdata* userData;
1829 assert(lua_isuserdata(L,1)); /* just in case */
1830 userData = (swig_lua_userdata*)lua_touserdata(L,1); /* get the userdata address */
1831
1832 lua_pushfstring(L, "<userdata of type '%s' at %p>", userData->type->str, userData->ptr);
1833 return 1;
1834}
1835
1836/* to manually disown some userdata */
1838{
1839/* there should be 1 params passed in
1840 (1) userdata (not the meta table) */
1841 swig_lua_userdata *usr;
1842 assert(lua_isuserdata(L,-1)); /* just in case */
1843 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1844
1845 usr->own = 0; /* clear our ownership */
1846 return 0;
1847}
1848
1849/* lua callable function to compare userdata's value
1850the issue is that two userdata may point to the same thing
1851but to lua, they are different objects */
1853{
1854 int result;
1855 swig_lua_userdata *usr1,*usr2;
1856 if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2)) /* just in case */
1857 return 0; /* nil reply */
1858 usr1=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1859 usr2=(swig_lua_userdata*)lua_touserdata(L,2); /* get data */
1860 /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
1861 result=(usr1->ptr==usr2->ptr);
1862 lua_pushboolean(L,result);
1863 return 1;
1864}
1865
1866/* populate table at the top of the stack with metamethods that ought to be inherited */
1868{
1869 SWIG_Lua_add_boolean(L, "__add", 1);
1870 SWIG_Lua_add_boolean(L, "__sub", 1);
1871 SWIG_Lua_add_boolean(L, "__mul", 1);
1872 SWIG_Lua_add_boolean(L, "__div", 1);
1873 SWIG_Lua_add_boolean(L, "__mod", 1);
1874 SWIG_Lua_add_boolean(L, "__pow", 1);
1875 SWIG_Lua_add_boolean(L, "__unm", 1);
1876 SWIG_Lua_add_boolean(L, "__len", 1 );
1877 SWIG_Lua_add_boolean(L, "__concat", 1 );
1878 SWIG_Lua_add_boolean(L, "__eq", 1);
1879 SWIG_Lua_add_boolean(L, "__lt", 1);
1880 SWIG_Lua_add_boolean(L, "__le", 1);
1881 SWIG_Lua_add_boolean(L, "__call", 1);
1882 SWIG_Lua_add_boolean(L, "__tostring", 1);
1883 SWIG_Lua_add_boolean(L, "__gc", 0);
1884}
1885
1886/* creates the swig registry */
1888{
1889 /* create main SWIG registry table */
1890 lua_pushstring(L,"SWIG");
1891 lua_newtable(L);
1892 /* populate it with some predefined data */
1893
1894 /* .library table. Placeholder */
1895 lua_pushstring(L,".library");
1896 lua_newtable(L);
1897 {
1898 /* list of metamethods that class inherits from its bases */
1899 lua_pushstring(L,"inheritable_metamethods");
1900 lua_newtable(L);
1901 /* populate with list of metamethods */
1903 lua_rawset(L,-3);
1904 }
1905 lua_rawset(L,-3);
1906
1907 lua_rawset(L,LUA_REGISTRYINDEX);
1908}
1909
1910/* gets the swig registry (or creates it) */
1912{
1913 /* add this all into the swig registry: */
1914 lua_pushstring(L,"SWIG");
1915 lua_rawget(L,LUA_REGISTRYINDEX); /* get the registry */
1916 if (!lua_istable(L,-1)) /* not there */
1917 { /* must be first time, so add it */
1918 lua_pop(L,1); /* remove the result */
1920 /* then get it */
1921 lua_pushstring(L,"SWIG");
1922 lua_rawget(L,LUA_REGISTRYINDEX);
1923 }
1924}
1925
1927{
1929 lua_pushstring(L, ".library");
1930 lua_rawget(L,-2);
1931 assert( !lua_isnil(L,-1) );
1932 lua_pushstring(L, "inheritable_metamethods");
1933 lua_rawget(L,-2);
1934
1935 /* Remove class registry and library table */
1936 lua_remove(L,-2);
1937 lua_remove(L,-2);
1938}
1939
1940/* Helper function to get the classes metatable from the register */
1941SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname)
1942{
1943 SWIG_Lua_get_class_registry(L); /* get the registry */
1944 lua_pushstring(L,cname); /* get the name */
1945 lua_rawget(L,-2); /* get it */
1946 lua_remove(L,-2); /* tidy up (remove registry) */
1947}
1948
1949/* Set up the base classes pointers.
1950Each class structure has a list of pointers to the base class structures.
1951This function fills them.
1952It cannot be done at compile time, as this will not work with hireachies
1953spread over more than one swig file.
1954Therefore it must be done at runtime, querying the SWIG type system.
1955*/
1957{
1958 int i=0;
1960 for(i=0;clss->base_names[i];i++)
1961 {
1962 if (clss->bases[i]==0) /* not found yet */
1963 {
1964 /* lookup and cache the base class */
1965 swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
1966 if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
1967 }
1968 }
1969}
1970
1971#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1972/* Merges two tables */
1973SWIGINTERN void SWIG_Lua_merge_tables_by_index(lua_State *L, int target, int source)
1974{
1975 /* iterating */
1976 lua_pushnil(L);
1977 while (lua_next(L,source) != 0) {
1978 /* -1 - value, -2 - index */
1979 /* have to copy to assign */
1980 lua_pushvalue(L,-2); /* copy of index */
1981 lua_pushvalue(L,-2); /* copy of value */
1982 lua_rawset(L, target);
1983 lua_pop(L,1);
1984 /* only key is left */
1985 }
1986}
1987
1988/* Merges two tables with given name. original - index of target metatable, base - index of source metatable */
1989SWIGINTERN void SWIG_Lua_merge_tables(lua_State *L, const char* name, int original, int base)
1990{
1991 /* push original[name], then base[name] */
1992 lua_pushstring(L,name);
1993 lua_rawget(L,original);
1994 int original_table = lua_gettop(L);
1995 lua_pushstring(L,name);
1996 lua_rawget(L,base);
1997 int base_table = lua_gettop(L);
1998 SWIG_Lua_merge_tables_by_index(L, original_table, base_table);
1999 /* clearing stack */
2000 lua_pop(L,2);
2001}
2002
2003/* Function takes all symbols from base and adds it to derived class. It's just a helper. */
2004SWIGINTERN void SWIG_Lua_class_squash_base(lua_State *L, swig_lua_class *base_cls)
2005{
2006 /* There is one parameter - original, i.e. 'derived' class metatable */
2007 assert(lua_istable(L,-1));
2008 int original = lua_gettop(L);
2010 int base = lua_gettop(L);
2011 SWIG_Lua_merge_tables(L, ".fn", original, base );
2012 SWIG_Lua_merge_tables(L, ".set", original, base );
2013 SWIG_Lua_merge_tables(L, ".get", original, base );
2014 lua_pop(L,1);
2015}
2016
2017/* Function squashes all symbols from 'clss' bases into itself */
2018SWIGINTERN void SWIG_Lua_class_squash_bases(lua_State *L, swig_lua_class *clss)
2019{
2020 int i;
2022 for(i=0;clss->base_names[i];i++)
2023 {
2024 if (clss->bases[i]==0) /* Somehow it's not found. Skip it */
2025 continue;
2026 /* Thing is: all bases are already registered. Thus they have already executed
2027 * this function. So we just need to squash them into us, because their bases
2028 * are already squashed into them. No need for recursion here!
2029 */
2030 SWIG_Lua_class_squash_base(L, clss->bases[i]);
2031 }
2032 lua_pop(L,1); /*tidy stack*/
2033}
2034#endif
2035
2036#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
2037/* helper add a variable to a registered class */
2038SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn)
2039{
2040 assert(lua_istable(L,-1)); /* just in case */
2041 SWIG_Lua_get_table(L,".get"); /* find the .get table */
2042 assert(lua_istable(L,-1)); /* just in case */
2043 SWIG_Lua_add_function(L,name,getFn);
2044 lua_pop(L,1); /* tidy stack (remove table) */
2045 if (setFn)
2046 {
2047 SWIG_Lua_get_table(L,".set"); /* find the .set table */
2048 assert(lua_istable(L,-1)); /* just in case */
2049 SWIG_Lua_add_function(L,name,setFn);
2050 lua_pop(L,1); /* tidy stack (remove table) */
2051 }
2052}
2053
2054/* helper to recursively add class static details (static attributes, operations and constants) */
2056{
2057 int i = 0;
2058 /* The class namespace table must be on the top of the stack */
2059 assert(lua_istable(L,-1));
2060 /* call all the base classes first: we can then override these later: */
2061 for(i=0;clss->bases[i];i++)
2062 {
2064 }
2065
2067}
2068
2069SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss); /* forward declaration */
2070
2071/* helper to recursively add class details (attributes & operations) */
2073{
2074 int i;
2075 size_t bases_count = 0;
2076 /* Add bases to .bases table */
2077 SWIG_Lua_get_table(L,".bases");
2078 assert(lua_istable(L,-1)); /* just in case */
2079 for(i=0;clss->bases[i];i++)
2080 {
2082 /* Base class must be already registered */
2083 assert(lua_istable(L,-1));
2084 lua_rawseti(L,-2,i+1); /* In lua indexing starts from 1 */
2085 bases_count++;
2086 }
2087 assert(lua_rawlen(L,-1) == bases_count);
2088 lua_pop(L,1); /* remove .bases table */
2089 /* add attributes */
2090 for(i=0;clss->attributes[i].name;i++){
2092 }
2093 /* add methods to the metatable */
2094 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
2095 assert(lua_istable(L,-1)); /* just in case */
2096 for(i=0;clss->methods[i].name;i++){
2097 SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].func);
2098 }
2099 lua_pop(L,1); /* tidy stack (remove table) */
2100 /* add operator overloads
2101 This adds methods from metatable array to metatable. Can mess up garbage
2102 collectind if someone defines __gc method
2103 */
2104 if(clss->metatable) {
2105 for(i=0;clss->metatable[i].name;i++) {
2106 SWIG_Lua_add_function(L,clss->metatable[i].name,clss->metatable[i].func);
2107 }
2108 }
2109
2110#if !defined(SWIG_LUA_SQUASH_BASES)
2111 /* Adding metamethods that are defined in base classes. If bases were squashed
2112 * then it is obviously unnecessary
2113 */
2115#endif
2116}
2117
2118/* Helpers to add user defined class metamedhods - __add, __sub etc. The helpers are needed
2119 for the following issue: Lua runtime checks for metamethod existence with rawget function
2120 ignoring our SWIG-provided __index and __newindex functions. Thus our inheritance-aware method
2121 search algorithm doesn't work in such case. (Not to say that Lua runtime queries metamethod directly
2122 in metatable and not in object).
2123 Current solution is this: if somewhere in hierarchy metamethod __x is defined, then all descendants
2124 are automatically given a special proxy __x that calls the real __x method.
2125 Obvious idea - to copy __x instead of creating __x-proxy is wrong because if someone changes __x in runtime,
2126 those changes must be reflected in all descendants.
2127*/
2128
2129SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L); /*forward declaration*/
2130
2131/* The real function that resolves a metamethod.
2132 * Function searches given class and all its bases (recursively) for first instance of something that is
2133 * not equal to SWIG_Lua_resolve_metamethod. (Almost always this 'something' is actual metamethod implementation
2134 * and it is a SWIG-generated C function.). It returns value on the top of the L and there is no garbage below the
2135 * answer.
2136 * Returns 1 if found, 0 otherwise.
2137 * clss is class which metatable we will search for method
2138 * metamethod_name_idx is index in L where metamethod name (as string) lies
2139 * skip_check allows skipping searching metamethod in the given class and immediately going to searching in bases. skip_check
2140 * is not carried to subsequent recursive calls - false is always passed. It is set to true only at first call from
2141 * SWIG_Lua_resolve_metamethod
2142 * */
2143SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx,
2144 int skip_check)
2145{
2146 /* This function is called recursively */
2147 int result = 0;
2148 int i = 0;
2149
2150 if (!skip_check) {
2152 lua_pushvalue(L, metamethod_name_idx);
2153 lua_rawget(L,-2);
2154 /* If this is cfunction and it is equal to SWIG_Lua_resolve_metamethod then
2155 * this isn't the function we are looking for :)
2156 * lua_tocfunction will return NULL if not cfunction
2157 */
2158 if (!lua_isnil(L,-1) && lua_tocfunction(L,-1) != SWIG_Lua_resolve_metamethod ) {
2159 lua_remove(L,-2); /* removing class metatable */
2160 return 1;
2161 }
2162 lua_pop(L,2); /* remove class metatable and query result */
2163 }
2164
2165 /* Forwarding calls to bases */
2166 for(i=0;clss->bases[i];i++)
2167 {
2168 result = SWIG_Lua_do_resolve_metamethod(L, clss->bases[i], metamethod_name_idx, 0);
2169 if (result)
2170 break;
2171 }
2172
2173 return result;
2174}
2175
2176/* The proxy function for metamethod. All parameters are passed as cclosure. Searches for actual method
2177 * and calls it */
2179{
2180 int numargs;
2181 int metamethod_name_idx;
2182 const swig_lua_class* clss;
2183 int result;
2184
2185 lua_checkstack(L,5);
2186 numargs = lua_gettop(L); /* number of arguments to pass to actual metamethod */
2187
2188 /* Get upvalues from closure */
2189 lua_pushvalue(L, lua_upvalueindex(1)); /*Get function name*/
2190 metamethod_name_idx = lua_gettop(L);
2191
2192 lua_pushvalue(L, lua_upvalueindex(2));
2193 clss = (const swig_lua_class*)(lua_touserdata(L,-1));
2194 lua_pop(L,1); /* remove lightuserdata with clss from stack */
2195
2196 /* Actual work */
2197 result = SWIG_Lua_do_resolve_metamethod(L, clss, metamethod_name_idx, 1);
2198 if (!result) {
2199 SWIG_Lua_pushferrstring(L,"The metamethod proxy is set, but it failed to find actual metamethod. Memory corruption is most likely explanation.");
2200 lua_error(L);
2201 return 0;
2202 }
2203
2204 lua_remove(L,-2); /* remove metamethod key */
2205 lua_insert(L,1); /* move function to correct position */
2206 lua_call(L, numargs, LUA_MULTRET);
2207 return lua_gettop(L); /* return all results */
2208}
2209
2210
2211/* If given metamethod must be present in given class, then creates appropriate proxy
2212 * Returns 1 if successfully added, 0 if not added because no base class has it, -1
2213 * if method is defined in the class metatable itself
2214 */
2215SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index)
2216{
2217 int key_index;
2218 int success = 0;
2219 int i = 0;
2220
2221 /* metamethod name - on the top of the stack */
2222 assert(lua_isstring(L,-1));
2223
2224 key_index = lua_gettop(L);
2225
2226 /* Check whether method is already defined in metatable */
2227 lua_pushvalue(L,key_index); /* copy of the key */
2228 lua_gettable(L,metatable_index);
2229 if( !lua_isnil(L,-1) ) {
2230 lua_pop(L,1);
2231 return -1;
2232 }
2233 lua_pop(L,1);
2234
2235 /* Iterating over immediate bases */
2236 for(i=0;clss->bases[i];i++)
2237 {
2238 const swig_lua_class *base = clss->bases[i];
2240 lua_pushvalue(L, key_index);
2241 lua_rawget(L, -2);
2242 if( !lua_isnil(L,-1) ) {
2243 lua_pushvalue(L, key_index);
2244
2245 /* Add proxy function */
2246 lua_pushvalue(L, key_index); /* first closure value is function name */
2247 lua_pushlightuserdata(L, clss); /* second closure value is swig_lua_class structure */
2248 lua_pushcclosure(L, SWIG_Lua_resolve_metamethod, 2);
2249
2250 lua_rawset(L, metatable_index);
2251 success = 1;
2252 }
2253 lua_pop(L,1); /* remove function or nil */
2254 lua_pop(L,1); /* remove base class metatable */
2255
2256 if( success )
2257 break;
2258 }
2259
2260 return success;
2261}
2262
2264{
2265 int metatable_index;
2266 int metamethods_info_index;
2267 int tostring_undefined;
2268 int eq_undefined = 0;
2269
2271 metatable_index = lua_gettop(L);
2273 assert(lua_istable(L,-1));
2274 metamethods_info_index = lua_gettop(L);
2275 lua_pushnil(L); /* first key */
2276 while(lua_next(L, metamethods_info_index) != 0 ) {
2277 /* key at index -2, value at index -1 */
2278 const int is_inheritable = lua_toboolean(L,-2);
2279 lua_pop(L,1); /* remove value - we don't need it anymore */
2280
2281 if(is_inheritable) { /* if metamethod is inheritable */
2282 SWIG_Lua_add_class_user_metamethod(L,clss,metatable_index);
2283 }
2284 }
2285
2286 lua_pop(L,1); /* remove inheritable metamethods table */
2287
2288 /* Special handling for __tostring method */
2289 lua_pushstring(L, "__tostring");
2290 lua_pushvalue(L,-1);
2291 lua_rawget(L,metatable_index);
2292 tostring_undefined = lua_isnil(L,-1);
2293 lua_pop(L,1);
2294 if( tostring_undefined ) {
2295 lua_pushcfunction(L, SWIG_Lua_class_tostring);
2296 lua_rawset(L, metatable_index);
2297 } else {
2298 lua_pop(L,1); /* remove copy of the key */
2299 }
2300
2301 /* Special handling for __eq method */
2302 lua_pushstring(L, "__eq");
2303 lua_pushvalue(L,-1);
2304 lua_rawget(L,metatable_index);
2305 eq_undefined = lua_isnil(L,-1);
2306 lua_pop(L,1);
2307 if( eq_undefined ) {
2308 lua_pushcfunction(L, SWIG_Lua_class_equal);
2309 lua_rawset(L, metatable_index);
2310 } else {
2311 lua_pop(L,1); /* remove copy of the key */
2312 }
2313 /* Warning: __index and __newindex are SWIG-defined. For user-defined operator[]
2314 * a __getitem/__setitem method should be defined
2315 */
2316 lua_pop(L,1); /* pop class metatable */
2317}
2318
2319/* Register class static methods,attributes etc as well as constructor proxy */
2321{
2322 const int SWIGUNUSED begin = lua_gettop(L);
2323 lua_checkstack(L,5); /* just in case */
2324 assert(lua_istable(L,-1)); /* just in case */
2325 assert(strcmp(clss->name, clss->cls_static->name) == 0); /* in class those 2 must be equal */
2326
2328
2329 assert(lua_istable(L,-1)); /* just in case */
2330
2331 /* add its constructor to module with the name of the class
2332 so you can do MyClass(...) as well as new_MyClass(...)
2333 BUT only if a constructor is defined
2334 (this overcomes the problem of pure virtual classes without constructors)*/
2335 if (clss->constructor)
2336 {
2337 lua_getmetatable(L,-1);
2338 assert(lua_istable(L,-1)); /* just in case */
2339 SWIG_Lua_add_function(L,"__call", clss->constructor);
2340 lua_pop(L,1);
2341 }
2342
2343 assert(lua_istable(L,-1)); /* just in case */
2345
2346 /* clear stack */
2347 lua_pop(L,1);
2348 assert( lua_gettop(L) == begin );
2349}
2350
2351/* Performs the instance (non-static) class registration process. Metatable for class is created
2352 * and added to the class registry.
2353 */
2355{
2356 const int SWIGUNUSED begin = lua_gettop(L);
2357 int i;
2358 /* if name already there (class is already registered) then do nothing */
2359 SWIG_Lua_get_class_registry(L); /* get the registry */
2360 lua_pushstring(L,clss->fqname); /* get the name */
2361 lua_rawget(L,-2);
2362 if(!lua_isnil(L,-1)) {
2363 lua_pop(L,2);
2364 assert(lua_gettop(L)==begin);
2365 return;
2366 }
2367 lua_pop(L,2); /* tidy stack */
2368 /* Recursively initialize all bases */
2369 for(i=0;clss->bases[i];i++)
2370 {
2372 }
2373 /* Again, get registry and push name */
2374 SWIG_Lua_get_class_registry(L); /* get the registry */
2375 lua_pushstring(L,clss->fqname); /* get the name */
2376 lua_newtable(L); /* create the metatable */
2377#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
2378 /* If squashing is requested, then merges all bases metatable into this one.
2379 * It would get us all special methods: __getitem, __add etc.
2380 * This would set .fn, .type, and other .xxx incorrectly, but we will overwrite it right away
2381 */
2382 {
2383 int new_metatable_index = lua_absindex(L,-1);
2384 for(i=0;clss->bases[i];i++)
2385 {
2386 int base_metatable;
2388 base_metatable = lua_absindex(L,-1);
2389 SWIG_Lua_merge_tables_by_index(L,new_metatable_index, base_metatable);
2390 lua_pop(L,1);
2391 }
2392 }
2393 /* And now we will overwrite all incorrectly set data */
2394#endif
2395 /* add string of class name called ".type" */
2396 lua_pushstring(L,".type");
2397 lua_pushstring(L,clss->fqname);
2398 lua_rawset(L,-3);
2399 /* add a table called bases */
2400 lua_pushstring(L,".bases");
2401 lua_newtable(L);
2402 lua_rawset(L,-3);
2403 /* add a table called ".get" */
2404 lua_pushstring(L,".get");
2405 lua_newtable(L);
2406 lua_rawset(L,-3);
2407 /* add a table called ".set" */
2408 lua_pushstring(L,".set");
2409 lua_newtable(L);
2410 lua_rawset(L,-3);
2411 /* add a table called ".fn" */
2412 lua_pushstring(L,".fn");
2413 lua_newtable(L);
2414 /* add manual disown method */
2416 lua_rawset(L,-3);
2417 /* add accessor fns for using the .get,.set&.fn */
2421 /* add it */
2422 lua_rawset(L,-3); /* metatable into registry */
2423 lua_pop(L,1); /* tidy stack (remove registry) */
2424 assert(lua_gettop(L) == begin);
2425
2426#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
2427 /* Now merge all symbols from .fn, .set, .get etc from bases to our tables */
2428 SWIG_Lua_class_squash_bases(L,clss);
2429#endif
2431 SWIG_Lua_add_class_instance_details(L,clss); /* recursive adding of details (atts & ops) */
2432 lua_pop(L,1); /* tidy stack (remove class metatable) */
2433 assert( lua_gettop(L) == begin );
2434}
2435
2437{
2438 int SWIGUNUSED begin;
2439 assert(lua_istable(L,-1)); /* This is a table (module or namespace) where classes will be added */
2442
2443 /* Add links from static part to instance part and vice versa */
2444 /* [SWIG registry] [Module]
2445 * "MyClass" ----> [MyClass metatable] <===== "MyClass" -+> [static part]
2446 * ".get" ----> ... | | getmetatable()----|
2447 * ".set" ----> ... | | |
2448 * ".static" --------------)----------------/ [static part metatable]
2449 * | ".get" --> ...
2450 * | ".set" --> ....
2451 * |=============================== ".instance"
2452 */
2453 begin = lua_gettop(L);
2454 lua_pushstring(L,clss->cls_static->name);
2455 lua_rawget(L,-2); /* get class static table */
2456 assert(lua_istable(L,-1));
2457 lua_getmetatable(L,-1);
2458 assert(lua_istable(L,-1)); /* get class static metatable */
2459 lua_pushstring(L,".instance"); /* prepare key */
2460
2461 SWIG_Lua_get_class_metatable(L,clss->fqname); /* get class metatable */
2462 assert(lua_istable(L,-1));
2463 lua_pushstring(L,".static"); /* prepare key */
2464 lua_pushvalue(L, -4); /* push static class TABLE */
2465 assert(lua_istable(L,-1));
2466 lua_rawset(L,-3); /* assign static class table(!NOT metatable) as ".static" member of class metatable */
2467 lua_rawset(L,-3); /* assign class metatable as ".instance" member of class static METATABLE */
2468 lua_pop(L,2);
2469 assert(lua_gettop(L) == begin);
2470}
2471#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */
2472
2473#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
2474SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_class *clss)
2475{
2476 const int SWIGUNUSED begin = lua_gettop(L);
2477 int i;
2478 /* if name already there (class is already registered) then do nothing */
2479 SWIG_Lua_get_class_registry(L); /* get the registry */
2480 lua_pushstring(L,clss->fqname); /* get the name */
2481 lua_rawget(L,-2);
2482 if(!lua_isnil(L,-1)) {
2483 lua_pop(L,2);
2484 assert(lua_gettop(L)==begin);
2485 return;
2486 }
2487 lua_pop(L,2); /* tidy stack */
2488 /* Recursively initialize all bases */
2489 for(i=0;clss->bases[i];i++)
2490 {
2491 SWIG_Lua_elua_class_register_instance(L,clss->bases[i]);
2492 }
2493 /* Again, get registry and push name */
2494 SWIG_Lua_get_class_registry(L); /* get the registry */
2495 lua_pushstring(L,clss->fqname); /* get the name */
2496 assert(clss->metatable);
2497 lua_pushrotable(L, (void*)(clss->metatable)); /* create the metatable */
2498 lua_rawset(L,-3);
2499 lua_pop(L,1);
2500 assert(lua_gettop(L) == begin);
2501}
2502#endif /* elua && eluac */
2503
2504/* -----------------------------------------------------------------------------
2505 * Class/structure conversion fns
2506 * ----------------------------------------------------------------------------- */
2507
2508/* helper to add metatable to new lua object */
2510{
2511 if (type->clientdata) /* there is clientdata: so add the metatable */
2512 {
2513 SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->fqname);
2514 if (lua_istable(L,-1))
2515 {
2516 lua_setmetatable(L,-2);
2517 }
2518 else
2519 {
2520 lua_pop(L,1);
2521 }
2522 }
2523}
2524
2525/* pushes a new object into the lua stack */
2526SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own)
2527{
2528 swig_lua_userdata *usr;
2529 if (!ptr){
2530 lua_pushnil(L);
2531 return;
2532 }
2533 usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata)); /* get data */
2534 usr->ptr=ptr; /* set the ptr */
2535 usr->type=type;
2536 usr->own=own;
2537#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
2538 SWIG_Lua_AddMetatable(L,type); /* add metatable */
2539#endif
2540}
2541
2542/* takes a object from the lua stack & converts it into an object of the correct type
2543 (if possible) */
2544SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L,int index,void **ptr,swig_type_info *type,int flags)
2545{
2546 int ret = SWIG_ERROR;
2547 swig_lua_userdata *usr;
2548 swig_cast_info *cast;
2549 /* special case: lua nil => NULL pointer */
2550 if (lua_isnil(L,index))
2551 {
2552 *ptr=0;
2554 }
2555 if (lua_islightuserdata(L,index))
2556 {
2557 *ptr=lua_touserdata(L,index);
2559 }
2560 usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */
2561 if (usr)
2562 {
2563 if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !usr->own)
2564 {
2566 }
2567 if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
2568 {
2569 usr->own = 0;
2570 }
2571 if (!type) /* special cast void*, no casting fn */
2572 {
2573 *ptr=usr->ptr;
2574 ret = SWIG_OK;
2575 }
2576 else
2577 {
2578 cast=SWIG_TypeCheck(usr->type->name,type); /* performs normal type checking */
2579 if (cast)
2580 {
2581 int newmemory = 0;
2582 *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
2583 assert(!newmemory); /* newmemory handling not yet implemented */
2584 ret = SWIG_OK;
2585 }
2586 }
2587 if ((ret == SWIG_OK) && (flags & SWIG_POINTER_CLEAR))
2588 {
2589 usr->ptr = 0;
2590 }
2591 }
2592 return ret;
2593}
2594
2595SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State *L,int index,swig_type_info *type,int flags,
2596 int argnum,const char *func_name){
2597 void *result = 0;
2598 if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
2599 luaL_error (L,"Error in %s, expected a %s at argument number %d\n",
2600 func_name,(type && type->str)?type->str:"void*",argnum);
2601 }
2602 return result;
2603}
2604
2605/* pushes a packed userdata. user for member fn pointers only */
2606SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type)
2607{
2608 swig_lua_rawdata *raw;
2609 assert(ptr); /* not acceptable to pass in a NULL value */
2610 raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size); /* alloc data */
2611 raw->type=type;
2612 raw->own=0;
2613 memcpy(raw->data,ptr,size); /* copy the data */
2614 SWIG_Lua_AddMetatable(L,type); /* add metatable */
2615}
2616
2617/* converts a packed userdata. user for member fn pointers only */
2618SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L,int index,void *ptr,size_t size,swig_type_info *type)
2619{
2620 swig_lua_rawdata *raw;
2621 raw=(swig_lua_rawdata*)lua_touserdata(L,index); /* get data */
2622 if (!raw) return SWIG_ERROR; /* error */
2623 if (type==0 || type==raw->type) /* void* or identical type */
2624 {
2625 memcpy(ptr,raw->data,size); /* copy it */
2626 return SWIG_OK; /* ok */
2627 }
2628 return SWIG_ERROR; /* error */
2629}
2630
2631/* a function to get the typestring of a piece of data */
2632SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
2633{
2634 swig_lua_userdata *usr;
2635 if (lua_isuserdata(L,tp))
2636 {
2637 usr=(swig_lua_userdata*)lua_touserdata(L,tp); /* get data */
2638 if (usr && usr->type && usr->type->str)
2639 return usr->type->str;
2640 return "userdata (unknown type)";
2641 }
2642 return lua_typename(L,lua_type(L,tp));
2643}
2644
2645/* lua callable function to get the userdata's type */
2647{
2648 lua_pushstring(L,SWIG_Lua_typename(L,1));
2649 return 1;
2650}
2651
2652/* -----------------------------------------------------------------------------
2653 * global variable support code: class/struct typemap functions
2654 * ----------------------------------------------------------------------------- */
2655
2656#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
2657/* Install Constants */
2658SWIGINTERN void
2660 int i;
2661 for (i = 0; constants[i].type; i++) {
2662 switch(constants[i].type) {
2663 case SWIG_LUA_INT:
2664 lua_pushstring(L,constants[i].name);
2665 lua_pushinteger(L,(lua_Integer)constants[i].lvalue);
2666 lua_rawset(L,-3);
2667 break;
2668 case SWIG_LUA_FLOAT:
2669 lua_pushstring(L,constants[i].name);
2670 lua_pushnumber(L,(lua_Number)constants[i].dvalue);
2671 lua_rawset(L,-3);
2672 break;
2673 case SWIG_LUA_CHAR:
2674 lua_pushstring(L,constants[i].name);
2675 {
2676 char c = (char)constants[i].lvalue;
2677 lua_pushlstring(L,&c,1);
2678 }
2679 lua_rawset(L,-3);
2680 break;
2681 case SWIG_LUA_STRING:
2682 lua_pushstring(L,constants[i].name);
2683 lua_pushstring(L,(char *) constants[i].pvalue);
2684 lua_rawset(L,-3);
2685 break;
2686 case SWIG_LUA_POINTER:
2687 lua_pushstring(L,constants[i].name);
2688 SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
2689 lua_rawset(L,-3);
2690 break;
2691 case SWIG_LUA_BINARY:
2692 lua_pushstring(L,constants[i].name);
2693 SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
2694 lua_rawset(L,-3);
2695 break;
2696 default:
2697 break;
2698 }
2699 }
2700}
2701#endif
2702
2703/* -----------------------------------------------------------------------------
2704 * executing lua code from within the wrapper
2705 * ----------------------------------------------------------------------------- */
2706
2707#ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
2708#define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
2709#endif
2710/* Executes a C string in Lua which is a really simple way of calling lua from C
2711Unfortunately lua keeps changing its APIs, so we need a conditional compile
2712In lua 5.0.X it's lua_dostring()
2713In lua 5.1.X it's luaL_dostring()
2714*/
2715SWIGINTERN int
2716SWIG_Lua_dostring(lua_State *L, const char *str) {
2717 int ok,top;
2718 if (str==0 || str[0]==0) return 0; /* nothing to do */
2719 top=lua_gettop(L); /* save stack */
2720#if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
2721 ok=luaL_dostring(L,str); /* looks like this is lua 5.1.X or later, good */
2722#else
2723 ok=lua_dostring(L,str); /* might be lua 5.0.x, using lua_dostring */
2724#endif
2725 if (ok!=0) {
2726 SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
2727 }
2728 lua_settop(L,top); /* restore the stack */
2729 return ok;
2730}
2731
2732#ifdef __cplusplus
2733}
2734#endif
2735
2736/* ------------------------------ end luarun.swg ------------------------------ */
2737
2738
2739/* -------- TYPES TABLE (BEGIN) -------- */
2740
2741#define SWIGTYPE_p_PLGraphicsIn swig_types[0]
2742#define SWIGTYPE_p_char swig_types[1]
2743#define SWIGTYPE_p_double swig_types[2]
2744#define SWIGTYPE_p_f_double_double__int swig_types[3]
2745#define SWIGTYPE_p_f_double_double_p_double_p_double_p_void__void swig_types[4]
2746#define SWIGTYPE_p_f_int_double_p_char_int_p_void__void swig_types[5]
2747#define SWIGTYPE_p_f_int_p_double_p_double__void swig_types[6]
2748#define SWIGTYPE_p_f_int_p_q_const__double_p_q_const__double__void swig_types[7]
2749#define SWIGTYPE_p_int swig_types[8]
2750#define SWIGTYPE_p_p_char swig_types[9]
2751#define SWIGTYPE_p_p_double swig_types[10]
2752#define SWIGTYPE_p_unsigned_int swig_types[11]
2754static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
2755#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2756#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2757
2758/* -------- TYPES TABLE (END) -------- */
2759
2760#define SWIG_name "plplotluac"
2761#define SWIG_init luaopen_plplotluac
2762#define SWIG_init_user luaopen_plplotluac_user
2763
2764#define SWIG_LUACODE luaopen_plplotluac_luacode
2765
2766#include "plplotP.h"
2767
2768
2769#define LUA_ALLOC_ARRAY( TYPE, LEN ) (TYPE *) malloc( LEN * sizeof ( TYPE ) )
2770#define LUA_FREE_ARRAY( PTR ) if ( PTR ) { free( PTR ); PTR = NULL;}
2771
2772// super macro to declare array typemap helper fns
2773 SWIGINTERN int SWIG_itable_size( lua_State* L, int index );
2774#define LUA_DECLARE_TYPEMAP_ARR_FN( NAME, TYPE ) \
2775 SWIGINTERN int LUA_read_ ## NAME ## _num_array( lua_State * L, int index, TYPE * array, int size ){ \
2776 int i; \
2777 for ( i = 0; i < size; i++ ) { \
2778 lua_rawgeti( L, index, i + 1 ); \
2779 if ( lua_isnumber( L, -1 ) ) { \
2780 array[i] = (TYPE) lua_tonumber( L, -1 ); \
2781 } else { \
2782 lua_pop( L, 1 ); \
2783 return 0; \
2784 } \
2785 lua_pop( L, 1 ); \
2786 } \
2787 return 1; \
2788 } \
2789 SWIGINTERN TYPE* LUA_get_ ## NAME ## _num_array_var( lua_State * L, int index, int* size ) \
2790 { \
2791 TYPE *array; \
2792 if ( !lua_istable( L, index ) ) { \
2793 lua_pushstring( L, "expected a table" ); \
2794 return 0; \
2795 } \
2796 *size = SWIG_itable_size( L, index ); \
2797 if ( *size < 1 ) { \
2798 array = LUA_ALLOC_ARRAY( TYPE, 1 ); \
2799 array[0] = (TYPE) 0; \
2800 return array; \
2801 } \
2802 array = LUA_ALLOC_ARRAY( TYPE, *size ); \
2803 if ( !LUA_read_ ## NAME ## _num_array( L, index, array, *size ) ) { \
2804 lua_pushstring( L, "table must contain numbers" ); \
2805 LUA_FREE_ARRAY( array ); \
2806 return 0; \
2807 } \
2808 return array; \
2809 }
2810
2813
2814
2815 static PLINT Alen = 0;
2816 static PLINT Xlen = 0, Ylen = 0;
2817
2818
2819#ifdef __cplusplus /* generic alloc/dealloc fns*/
2820#define SWIG_ALLOC_ARRAY(TYPE,LEN) new TYPE[LEN]
2821#define SWIG_FREE_ARRAY(PTR) delete[] PTR
2822#else
2823#define SWIG_ALLOC_ARRAY(TYPE,LEN) (TYPE *)malloc(LEN*sizeof(TYPE))
2824#define SWIG_FREE_ARRAY(PTR) free(PTR)
2825#endif
2826/* counting the size of arrays:*/
2827SWIGINTERN int SWIG_itable_size(lua_State* L, int index)
2828{
2829 int n=0;
2830 while(1){
2831 lua_rawgeti(L,index,n+1);
2832 if (lua_isnil(L,-1))break;
2833 ++n;
2834 lua_pop(L,1);
2835 }
2836 lua_pop(L,1);
2837 return n;
2838}
2839
2840SWIGINTERN int SWIG_table_size(lua_State* L, int index)
2841{
2842 int n=0;
2843 lua_pushnil(L); /* first key*/
2844 while (lua_next(L, index) != 0) {
2845 ++n;
2846 lua_pop(L, 1); /* removes `value'; keeps `key' for next iteration*/
2847 }
2848 return n;
2849}
2850
2851/* super macro to declare array typemap helper fns */
2852#define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME,TYPE)\
2853 SWIGINTERN int SWIG_read_##NAME##_num_array(lua_State* L,int index,TYPE *array,int size){\
2854 int i;\
2855 for (i = 0; i < size; i++) {\
2856 lua_rawgeti(L,index,i+1);\
2857 if (lua_isnumber(L,-1)){\
2858 array[i] = (TYPE)lua_tonumber(L,-1);\
2859 } else {\
2860 lua_pop(L,1);\
2861 return 0;\
2862 }\
2863 lua_pop(L,1);\
2864 }\
2865 return 1;\
2866 }\
2867 SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_fixed(lua_State* L, int index, int size){\
2868 TYPE *array;\
2869 if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {\
2870 SWIG_Lua_pushferrstring(L,"expected a table of size %d",size);\
2871 return 0;\
2872 }\
2873 array=SWIG_ALLOC_ARRAY(TYPE,size);\
2874 if (!SWIG_read_##NAME##_num_array(L,index,array,size)){\
2875 SWIG_Lua_pusherrstring(L,"table must contain numbers");\
2876 SWIG_FREE_ARRAY(array);\
2877 return 0;\
2878 }\
2879 return array;\
2880 }\
2881 SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_var(lua_State* L, int index, int* size)\
2882 {\
2883 TYPE *array;\
2884 if (!lua_istable(L,index)) {\
2885 SWIG_Lua_pusherrstring(L,"expected a table");\
2886 return 0;\
2887 }\
2888 *size=SWIG_itable_size(L,index);\
2889 if (*size<1){\
2890 SWIG_Lua_pusherrstring(L,"table appears to be empty");\
2891 return 0;\
2892 }\
2893 array=SWIG_ALLOC_ARRAY(TYPE,*size);\
2894 if (!SWIG_read_##NAME##_num_array(L,index,array,*size)){\
2895 SWIG_Lua_pusherrstring(L,"table must contain numbers");\
2896 SWIG_FREE_ARRAY(array);\
2897 return 0;\
2898 }\
2899 return array;\
2900 }\
2901 SWIGINTERN void SWIG_write_##NAME##_num_array(lua_State* L,TYPE *array,int size){\
2902 int i;\
2903 lua_newtable(L);\
2904 for (i = 0; i < size; i++){\
2905 lua_pushnumber(L,(lua_Number)array[i]);\
2906 lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/ \
2907 }\
2908 }
2909
2910SWIG_DECLARE_TYPEMAP_ARR_FN(schar,signed char)
2911SWIG_DECLARE_TYPEMAP_ARR_FN(uchar,unsigned char)
2914SWIG_DECLARE_TYPEMAP_ARR_FN(short,short)
2915SWIG_DECLARE_TYPEMAP_ARR_FN(ushort,unsigned short)
2917SWIG_DECLARE_TYPEMAP_ARR_FN(ulong,unsigned long)
2918SWIG_DECLARE_TYPEMAP_ARR_FN(float,float)
2919SWIG_DECLARE_TYPEMAP_ARR_FN(double,double)
2920
2921SWIGINTERN int SWIG_read_ptr_array(lua_State* L,int index,void **array,int size,swig_type_info *type){
2922 int i;
2923 for (i = 0; i < size; i++) {
2924 lua_rawgeti(L,index,i+1);
2925 if (!lua_isuserdata(L,-1) || SWIG_ConvertPtr(L,-1,&array[i],type,0)==-1){
2926 lua_pop(L,1);
2927 return 0;
2928 }
2929 lua_pop(L,1);
2930 }
2931 return 1;
2932}
2933SWIGINTERN void** SWIG_get_ptr_array_fixed(lua_State* L, int index, int size,swig_type_info *type){
2934 void **array;
2935 if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {
2936 SWIG_Lua_pushferrstring(L,"expected a table of size %d",size);
2937 return 0;
2938 }
2939 array=SWIG_ALLOC_ARRAY(void*,size);
2940 if (!SWIG_read_ptr_array(L,index,array,size,type)){
2941 SWIG_Lua_pushferrstring(L,"table must contain pointers of type %s",type->name);
2942 SWIG_FREE_ARRAY(array);
2943 return 0;
2944 }
2945 return array;
2946}
2947SWIGINTERN void** SWIG_get_ptr_array_var(lua_State* L, int index, int* size,swig_type_info *type){
2948 void **array;
2949 if (!lua_istable(L,index)) {
2950 SWIG_Lua_pusherrstring(L,"expected a table");
2951 return 0;
2952 }
2953 *size=SWIG_itable_size(L,index);
2954 if (*size<1){
2955 SWIG_Lua_pusherrstring(L,"table appears to be empty");
2956 return 0;
2957 }
2958 array=SWIG_ALLOC_ARRAY(void*,*size);
2959 if (!SWIG_read_ptr_array(L,index,array,*size,type)){
2960 SWIG_Lua_pushferrstring(L,"table must contain pointers of type %s",type->name);
2961 SWIG_FREE_ARRAY(array);
2962 return 0;
2963 }
2964 return array;
2965}
2966SWIGINTERN void SWIG_write_ptr_array(lua_State* L,void **array,int size,swig_type_info *type,int own){
2967 int i;
2968 lua_newtable(L);
2969 for (i = 0; i < size; i++){
2970 SWIG_NewPointerObj(L,array[i],type,own);
2971 lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/
2972 }
2973}
2974
2975
2976 PLFLT** read_double_Matrix( lua_State* L, int index, int* nx, int *ny );
2977
2978 PLFLT** read_double_Matrix( lua_State* L, int index, int* nx, int *ny )
2979 {
2980 int i, j;
2981 PLFLT** matrix;
2982
2983 *nx = 0;
2984 *ny = 0;
2985
2986 if ( !lua_istable( L, index ) )
2987 {
2988 lua_pushstring( L, "expected a table" );
2989 return NULL;
2990 }
2991 *nx = SWIG_itable_size( L, index );
2992 if ( *nx < 1 )
2993 {
2994 lua_pushstring( L, "table appears to be empty" );
2995 return NULL;
2996 }
2997 matrix = LUA_ALLOC_ARRAY( PLFLT *, *nx );
2998 for ( i = 0; i < *nx; i++ )
2999 matrix[i] = NULL;
3000
3001 lua_rawgeti( L, index, 1 );
3002 if ( !lua_istable( L, -1 ) )
3003 {
3004 lua_pop( L, 1 );
3005 lua_pushstring( L, "expected a table" );
3006 LUA_FREE_ARRAY( matrix );
3007 return NULL;
3008 }
3009 *ny = SWIG_itable_size( L, -1 );
3010 if ( *ny < 1 )
3011 {
3012 lua_pushstring( L, "table appears to be empty" );
3013 LUA_FREE_ARRAY( matrix );
3014 return NULL;
3015 }
3016 lua_pop( L, 1 );
3017
3018 for ( i = 0; i < *nx; i++ )
3019 {
3020 lua_rawgeti( L, index, i + 1 );
3021 if ( !lua_istable( L, -1 ) )
3022 {
3023 lua_pop( L, 1 );
3024 lua_pushstring( L, "expected a table" );
3025 for ( j = 0; j < *ny; j++ )
3026 LUA_FREE_ARRAY( matrix[j] );
3027 LUA_FREE_ARRAY( matrix );
3028 return NULL;
3029 }
3030 if ( *ny != SWIG_itable_size( L, -1 ) )
3031 {
3032 lua_pop( L, 1 );
3033 lua_pushstring( L, "inconsistent table sizes" );
3034 for ( j = 0; j < i; j++ )
3035 LUA_FREE_ARRAY( matrix[j] );
3036 LUA_FREE_ARRAY( matrix );
3037 return NULL;
3038 }
3039 matrix[i] = LUA_ALLOC_ARRAY( PLFLT, *ny );
3040 for ( j = 0; j < *ny; j++ )
3041 {
3042 lua_rawgeti( L, -1, j + 1 );
3043 if ( lua_isnumber( L, -1 ) )
3044 {
3045 matrix[i][j] = (PLFLT) lua_tonumber( L, -1 );
3046 }
3047 else
3048 {
3049 lua_pop( L, 1 );
3050 lua_pushstring( L, "table must contain numbers" );
3051 for ( j = 0; j < i + 1; j++ )
3052 LUA_FREE_ARRAY( matrix[j] );
3053 LUA_FREE_ARRAY( matrix );
3054 return NULL;
3055 }
3056 lua_pop( L, 1 );
3057 }
3058 lua_pop( L, 1 );
3059 }
3060
3061 return matrix;
3062 }
3063
3064
3065 void mapform( PLINT n, PLFLT* x, PLFLT* y );
3066
3067 static lua_State* myL = NULL;
3068 static char mapform_funcstr[255];
3069
3070 void mapform( PLINT n, PLFLT* x, PLFLT* y )
3071 {
3072 PLFLT *xtemp, *ytemp;
3073 int len, i;
3074
3075 // check Lua state
3076 if ( myL == NULL )
3077 {
3078 fprintf( stderr, "Lua state is not set!" );
3079 return;
3080 }
3081
3082 // push functions and arguments
3083 lua_getglobal( myL, mapform_funcstr ); // function to be called
3084 lua_pushnumber( myL, n ); // push 1st argument
3085 SWIG_write_double_num_array( myL, x, n ); // push 2nd argument
3086 SWIG_write_double_num_array( myL, y, n ); // push 3rd argument
3087
3088 // do the call (3 arguments, 2 result)
3089 if ( lua_pcall( myL, 3, 2, 0 ) != 0 )
3090 fprintf( stderr, "error running function `%s':%s",
3091 mapform_funcstr, lua_tostring( myL, -1 ) );
3092
3093 // retrieve results
3094 if ( !lua_istable( myL, -2 ) )
3095 {
3096 fprintf( stderr, "function `%s' must return a table as 1st result", mapform_funcstr );
3097 return;
3098 }
3099 if ( !lua_istable( myL, -1 ) )
3100 {
3101 fprintf( stderr, "function `%s' must return a table as 2nd result", mapform_funcstr );
3102 return;
3103 }
3104 xtemp = (PLFLT *) LUA_get_double_num_array_var( myL, -2, &len );
3105 if ( !xtemp || len != n )
3106 {
3107 fprintf( stderr, "function `%s' must return a table of length%d", mapform_funcstr, n );
3108 return;
3109 }
3110 for ( i = 0; i < n; i++ )
3111 x[i] = xtemp[i];
3112 LUA_FREE_ARRAY( xtemp );
3113
3114 ytemp = (PLFLT *) LUA_get_double_num_array_var( myL, -1, &len );
3115 if ( !ytemp || len != n )
3116 {
3117 fprintf( stderr, "function `%s' must return a table of length%d", mapform_funcstr, n );
3118 return;
3119 }
3120 for ( i = 0; i < n; i++ )
3121 y[i] = ytemp[i];
3122 LUA_FREE_ARRAY( ytemp );
3123
3124 lua_pop( myL, 2 ); // pop returned values
3125
3126 return;
3127 }
3128
3129
3130 typedef PLINT ( *defined_func )( PLFLT, PLFLT );
3131 typedef void ( *fill_func )( PLINT, const PLFLT*, const PLFLT* );
3132 typedef void ( *pltr_func )( PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer );
3133 typedef void ( *ct_func )( PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer );
3134 typedef void ( *mapform_func )( PLINT, PLFLT *, PLFLT* );
3136 typedef void ( *label_func )( PLINT, PLFLT, char*, PLINT, PLPointer );
3137
3138// Function prototypes
3139 void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * pltr_data );
3140 void myct( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * pltr_data );
3141 void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer data );
3142
3143 static char mypltr_funcstr[255];
3144
3145// This is the callback that gets handed to the C code.
3146// It, in turn, calls the Lua callback
3147 void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * PL_UNUSED( pltr_data ) )
3148 {
3149 *tx = 0;
3150 *ty = 0;
3151
3152 // check Lua state
3153 if ( myL == NULL )
3154 {
3155 fprintf( stderr, "Lua state is not set!" );
3156 return;
3157 }
3158
3159 // push functions and arguments
3160 lua_getglobal( myL, mypltr_funcstr ); // function to be called
3161 lua_pushnumber( myL, x ); // push 1st argument
3162 lua_pushnumber( myL, y ); // push 2nd argument
3163
3164 // do the call (2 arguments, 2 result)
3165 if ( lua_pcall( myL, 2, 2, 0 ) != 0 )
3166 fprintf( stderr, "error running function `%s':%s",
3167 mypltr_funcstr, lua_tostring( myL, -1 ) );
3168
3169 // retrieve results
3170 if ( !lua_isnumber( myL, -2 ) )
3171 {
3172 fprintf( stderr, "function `%s' must return a number as 1st result", mypltr_funcstr );
3173 return;
3174 }
3175 if ( !lua_isnumber( myL, -1 ) )
3176 {
3177 fprintf( stderr, "function `%s' must return a number as 2nd result", mypltr_funcstr );
3178 return;
3179 }
3180 *tx = lua_tonumber( myL, -2 );
3181 *ty = lua_tonumber( myL, -1 );
3182 lua_pop( myL, 2 ); // pop returned values
3183
3184 return;
3185 }
3186
3187 static char myct_funcstr[255];
3188
3189// This is the callback that gets handed to the C code.
3190// It, in turn, calls the Lua callback
3191 void myct( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * PL_UNUSED( pltr_data ) )
3192 {
3193 *tx = 0;
3194 *ty = 0;
3195
3196 // check Lua state
3197 if ( myL == NULL )
3198 {
3199 fprintf( stderr, "Lua state is not set!" );
3200 return;
3201 }
3202
3203 // push functions and arguments
3204 lua_getglobal( myL, myct_funcstr ); // function to be called
3205 lua_pushnumber( myL, x ); // push 1st argument
3206 lua_pushnumber( myL, y ); // push 2nd argument
3207
3208 // do the call (2 arguments, 2 result)
3209 if ( lua_pcall( myL, 2, 2, 0 ) != 0 )
3210 fprintf( stderr, "error running function `%s':%s",
3211 myct_funcstr, lua_tostring( myL, -1 ) );
3212
3213 // retrieve results
3214 if ( !lua_isnumber( myL, -2 ) )
3215 {
3216 fprintf( stderr, "function `%s' must return a number as 1st result", myct_funcstr );
3217 return;
3218 }
3219 if ( !lua_isnumber( myL, -1 ) )
3220 {
3221 fprintf( stderr, "function `%s' must return a number as 2nd result", myct_funcstr );
3222 return;
3223 }
3224 *tx = lua_tonumber( myL, -2 );
3225 *ty = lua_tonumber( myL, -1 );
3226 lua_pop( myL, 2 ); // pop returned values
3227
3228 return;
3229 }
3230
3231 static char mylabel_funcstr[255];
3232
3233 void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer PL_UNUSED( data ) )
3234 {
3235 // check Lua state
3236 if ( myL == NULL )
3237 {
3238 fprintf( stderr, "Lua state is not set!" );
3239 return;
3240 }
3241
3242 // push functions and arguments
3243 lua_getglobal( myL, mylabel_funcstr ); // function to be called
3244 lua_pushnumber( myL, axis ); // push 1st argument
3245 lua_pushnumber( myL, value ); // push 1st argument
3246
3247 // do the call (2 arguments, 1 result)
3248 if ( lua_pcall( myL, 2, 1, 0 ) != 0 )
3249 fprintf( stderr, "error running function `%s':%s",
3250 mylabel_funcstr, lua_tostring( myL, -1 ) );
3251
3252 // retrieve results
3253 if ( !lua_isstring( myL, -1 ) )
3254 {
3255 fprintf( stderr, "function `%s' must return a string as result", mylabel_funcstr );
3256 return;
3257 }
3258 strncpy( label, lua_tostring( myL, -1 ), length );
3259
3260 lua_pop( myL, 1 ); // pop returned values
3261
3262 return;
3263 }
3264
3265
3266#include <string.h>
3267
3268
3269SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
3270 int ret = lua_isstring(L, idx);
3271 if (!ret)
3272 ret = lua_isnil(L, idx);
3273 return ret;
3274}
3275
3276#ifdef __cplusplus
3277extern "C" {
3278#endif
3279static int _wrap_PLGraphicsIn_type_set(lua_State* L) {
3280 int SWIG_arg = 0;
3281 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3282 int arg2 ;
3283
3284 SWIG_check_num_args("PLGraphicsIn::type",2,2)
3285 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::type",1,"PLGraphicsIn *");
3286 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::type",2,"int");
3287
3288 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3289 SWIG_fail_ptr("PLGraphicsIn_type_set",1,SWIGTYPE_p_PLGraphicsIn);
3290 }
3291
3292 arg2 = (int)lua_tonumber(L, 2);
3293 if (arg1) (arg1)->type = arg2;
3294
3295 return SWIG_arg;
3296
3297 fail: SWIGUNUSED;
3298 lua_error(L);
3299 return 0;
3300}
3301
3302
3303static int _wrap_PLGraphicsIn_type_get(lua_State* L) {
3304 int SWIG_arg = 0;
3305 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3306 int result;
3307
3308 SWIG_check_num_args("PLGraphicsIn::type",1,1)
3309 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::type",1,"PLGraphicsIn *");
3310
3311 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3312 SWIG_fail_ptr("PLGraphicsIn_type_get",1,SWIGTYPE_p_PLGraphicsIn);
3313 }
3314
3315 result = (int) ((arg1)->type);
3316 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3317 return SWIG_arg;
3318
3319 fail: SWIGUNUSED;
3320 lua_error(L);
3321 return 0;
3322}
3323
3324
3325static int _wrap_PLGraphicsIn_state_set(lua_State* L) {
3326 int SWIG_arg = 0;
3327 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3328 unsigned int arg2 ;
3329
3330 SWIG_check_num_args("PLGraphicsIn::state",2,2)
3331 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::state",1,"PLGraphicsIn *");
3332 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::state",2,"unsigned int");
3333
3334 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3335 SWIG_fail_ptr("PLGraphicsIn_state_set",1,SWIGTYPE_p_PLGraphicsIn);
3336 }
3337
3338 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
3339 arg2 = (unsigned int)lua_tonumber(L, 2);
3340 if (arg1) (arg1)->state = arg2;
3341
3342 return SWIG_arg;
3343
3344 fail: SWIGUNUSED;
3345 lua_error(L);
3346 return 0;
3347}
3348
3349
3350static int _wrap_PLGraphicsIn_state_get(lua_State* L) {
3351 int SWIG_arg = 0;
3352 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3353 unsigned int result;
3354
3355 SWIG_check_num_args("PLGraphicsIn::state",1,1)
3356 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::state",1,"PLGraphicsIn *");
3357
3358 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3359 SWIG_fail_ptr("PLGraphicsIn_state_get",1,SWIGTYPE_p_PLGraphicsIn);
3360 }
3361
3362 result = (unsigned int) ((arg1)->state);
3363 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3364 return SWIG_arg;
3365
3366 fail: SWIGUNUSED;
3367 lua_error(L);
3368 return 0;
3369}
3370
3371
3372static int _wrap_PLGraphicsIn_keysym_set(lua_State* L) {
3373 int SWIG_arg = 0;
3374 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3375 unsigned int arg2 ;
3376
3377 SWIG_check_num_args("PLGraphicsIn::keysym",2,2)
3378 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::keysym",1,"PLGraphicsIn *");
3379 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::keysym",2,"unsigned int");
3380
3381 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3382 SWIG_fail_ptr("PLGraphicsIn_keysym_set",1,SWIGTYPE_p_PLGraphicsIn);
3383 }
3384
3385 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
3386 arg2 = (unsigned int)lua_tonumber(L, 2);
3387 if (arg1) (arg1)->keysym = arg2;
3388
3389 return SWIG_arg;
3390
3391 fail: SWIGUNUSED;
3392 lua_error(L);
3393 return 0;
3394}
3395
3396
3397static int _wrap_PLGraphicsIn_keysym_get(lua_State* L) {
3398 int SWIG_arg = 0;
3399 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3400 unsigned int result;
3401
3402 SWIG_check_num_args("PLGraphicsIn::keysym",1,1)
3403 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::keysym",1,"PLGraphicsIn *");
3404
3405 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3406 SWIG_fail_ptr("PLGraphicsIn_keysym_get",1,SWIGTYPE_p_PLGraphicsIn);
3407 }
3408
3409 result = (unsigned int) ((arg1)->keysym);
3410 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3411 return SWIG_arg;
3412
3413 fail: SWIGUNUSED;
3414 lua_error(L);
3415 return 0;
3416}
3417
3418
3419static int _wrap_PLGraphicsIn_button_set(lua_State* L) {
3420 int SWIG_arg = 0;
3421 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3422 unsigned int arg2 ;
3423
3424 SWIG_check_num_args("PLGraphicsIn::button",2,2)
3425 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::button",1,"PLGraphicsIn *");
3426 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::button",2,"unsigned int");
3427
3428 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3429 SWIG_fail_ptr("PLGraphicsIn_button_set",1,SWIGTYPE_p_PLGraphicsIn);
3430 }
3431
3432 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
3433 arg2 = (unsigned int)lua_tonumber(L, 2);
3434 if (arg1) (arg1)->button = arg2;
3435
3436 return SWIG_arg;
3437
3438 fail: SWIGUNUSED;
3439 lua_error(L);
3440 return 0;
3441}
3442
3443
3444static int _wrap_PLGraphicsIn_button_get(lua_State* L) {
3445 int SWIG_arg = 0;
3446 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3447 unsigned int result;
3448
3449 SWIG_check_num_args("PLGraphicsIn::button",1,1)
3450 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::button",1,"PLGraphicsIn *");
3451
3452 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3453 SWIG_fail_ptr("PLGraphicsIn_button_get",1,SWIGTYPE_p_PLGraphicsIn);
3454 }
3455
3456 result = (unsigned int) ((arg1)->button);
3457 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3458 return SWIG_arg;
3459
3460 fail: SWIGUNUSED;
3461 lua_error(L);
3462 return 0;
3463}
3464
3465
3466static int _wrap_PLGraphicsIn_subwindow_set(lua_State* L) {
3467 int SWIG_arg = 0;
3468 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3469 PLINT arg2 ;
3470
3471 SWIG_check_num_args("PLGraphicsIn::subwindow",2,2)
3472 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::subwindow",1,"PLGraphicsIn *");
3473 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::subwindow",2,"PLINT");
3474
3475 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3476 SWIG_fail_ptr("PLGraphicsIn_subwindow_set",1,SWIGTYPE_p_PLGraphicsIn);
3477 }
3478
3479 arg2 = (PLINT)lua_tonumber(L, 2);
3480 if (arg1) (arg1)->subwindow = arg2;
3481
3482 return SWIG_arg;
3483
3484 fail: SWIGUNUSED;
3485 lua_error(L);
3486 return 0;
3487}
3488
3489
3490static int _wrap_PLGraphicsIn_subwindow_get(lua_State* L) {
3491 int SWIG_arg = 0;
3492 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3493 PLINT result;
3494
3495 SWIG_check_num_args("PLGraphicsIn::subwindow",1,1)
3496 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::subwindow",1,"PLGraphicsIn *");
3497
3498 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3499 SWIG_fail_ptr("PLGraphicsIn_subwindow_get",1,SWIGTYPE_p_PLGraphicsIn);
3500 }
3501
3502 result = (PLINT) ((arg1)->subwindow);
3503 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3504 return SWIG_arg;
3505
3506 fail: SWIGUNUSED;
3507 lua_error(L);
3508 return 0;
3509}
3510
3511
3512static int _wrap_PLGraphicsIn_string_set(lua_State* L) {
3513 int SWIG_arg = 0;
3514 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3515 char *arg2 = (char *) (char *)0 ;
3516
3517 SWIG_check_num_args("PLGraphicsIn::string",2,2)
3518 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::string",1,"PLGraphicsIn *");
3519 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("PLGraphicsIn::string",2,"char [16]");
3520
3521 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3522 SWIG_fail_ptr("PLGraphicsIn_string_set",1,SWIGTYPE_p_PLGraphicsIn);
3523 }
3524
3525 arg2 = (char *)lua_tostring(L, 2);
3526 {
3527 if(arg2) {
3528 strncpy((char*)arg1->string, (const char *)arg2, 16-1);
3529 arg1->string[16-1] = 0;
3530 } else {
3531 arg1->string[0] = 0;
3532 }
3533 }
3534
3535 return SWIG_arg;
3536
3537 fail: SWIGUNUSED;
3538 lua_error(L);
3539 return 0;
3540}
3541
3542
3543static int _wrap_PLGraphicsIn_string_get(lua_State* L) {
3544 int SWIG_arg = 0;
3545 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3546 char *result = 0 ;
3547
3548 SWIG_check_num_args("PLGraphicsIn::string",1,1)
3549 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::string",1,"PLGraphicsIn *");
3550
3551 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3552 SWIG_fail_ptr("PLGraphicsIn_string_get",1,SWIGTYPE_p_PLGraphicsIn);
3553 }
3554
3555 result = (char *)(char *) ((arg1)->string);
3556 lua_pushstring(L,(const char *)result); SWIG_arg++;
3557 return SWIG_arg;
3558
3559 fail: SWIGUNUSED;
3560 lua_error(L);
3561 return 0;
3562}
3563
3564
3565static int _wrap_PLGraphicsIn_pX_set(lua_State* L) {
3566 int SWIG_arg = 0;
3567 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3568 int arg2 ;
3569
3570 SWIG_check_num_args("PLGraphicsIn::pX",2,2)
3571 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pX",1,"PLGraphicsIn *");
3572 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::pX",2,"int");
3573
3574 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3575 SWIG_fail_ptr("PLGraphicsIn_pX_set",1,SWIGTYPE_p_PLGraphicsIn);
3576 }
3577
3578 arg2 = (int)lua_tonumber(L, 2);
3579 if (arg1) (arg1)->pX = arg2;
3580
3581 return SWIG_arg;
3582
3583 fail: SWIGUNUSED;
3584 lua_error(L);
3585 return 0;
3586}
3587
3588
3589static int _wrap_PLGraphicsIn_pX_get(lua_State* L) {
3590 int SWIG_arg = 0;
3591 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3592 int result;
3593
3594 SWIG_check_num_args("PLGraphicsIn::pX",1,1)
3595 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pX",1,"PLGraphicsIn *");
3596
3597 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3598 SWIG_fail_ptr("PLGraphicsIn_pX_get",1,SWIGTYPE_p_PLGraphicsIn);
3599 }
3600
3601 result = (int) ((arg1)->pX);
3602 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3603 return SWIG_arg;
3604
3605 fail: SWIGUNUSED;
3606 lua_error(L);
3607 return 0;
3608}
3609
3610
3611static int _wrap_PLGraphicsIn_pY_set(lua_State* L) {
3612 int SWIG_arg = 0;
3613 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3614 int arg2 ;
3615
3616 SWIG_check_num_args("PLGraphicsIn::pY",2,2)
3617 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pY",1,"PLGraphicsIn *");
3618 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::pY",2,"int");
3619
3620 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3621 SWIG_fail_ptr("PLGraphicsIn_pY_set",1,SWIGTYPE_p_PLGraphicsIn);
3622 }
3623
3624 arg2 = (int)lua_tonumber(L, 2);
3625 if (arg1) (arg1)->pY = arg2;
3626
3627 return SWIG_arg;
3628
3629 fail: SWIGUNUSED;
3630 lua_error(L);
3631 return 0;
3632}
3633
3634
3635static int _wrap_PLGraphicsIn_pY_get(lua_State* L) {
3636 int SWIG_arg = 0;
3637 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3638 int result;
3639
3640 SWIG_check_num_args("PLGraphicsIn::pY",1,1)
3641 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pY",1,"PLGraphicsIn *");
3642
3643 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3644 SWIG_fail_ptr("PLGraphicsIn_pY_get",1,SWIGTYPE_p_PLGraphicsIn);
3645 }
3646
3647 result = (int) ((arg1)->pY);
3648 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3649 return SWIG_arg;
3650
3651 fail: SWIGUNUSED;
3652 lua_error(L);
3653 return 0;
3654}
3655
3656
3657static int _wrap_PLGraphicsIn_dX_set(lua_State* L) {
3658 int SWIG_arg = 0;
3659 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3660 PLFLT arg2 ;
3661
3662 SWIG_check_num_args("PLGraphicsIn::dX",2,2)
3663 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dX",1,"PLGraphicsIn *");
3664 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::dX",2,"PLFLT");
3665
3666 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3667 SWIG_fail_ptr("PLGraphicsIn_dX_set",1,SWIGTYPE_p_PLGraphicsIn);
3668 }
3669
3670 arg2 = (PLFLT)lua_tonumber(L, 2);
3671 if (arg1) (arg1)->dX = arg2;
3672
3673 return SWIG_arg;
3674
3675 fail: SWIGUNUSED;
3676 lua_error(L);
3677 return 0;
3678}
3679
3680
3681static int _wrap_PLGraphicsIn_dX_get(lua_State* L) {
3682 int SWIG_arg = 0;
3683 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3684 PLFLT result;
3685
3686 SWIG_check_num_args("PLGraphicsIn::dX",1,1)
3687 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dX",1,"PLGraphicsIn *");
3688
3689 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3690 SWIG_fail_ptr("PLGraphicsIn_dX_get",1,SWIGTYPE_p_PLGraphicsIn);
3691 }
3692
3693 result = (PLFLT) ((arg1)->dX);
3694 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3695 return SWIG_arg;
3696
3697 fail: SWIGUNUSED;
3698 lua_error(L);
3699 return 0;
3700}
3701
3702
3703static int _wrap_PLGraphicsIn_dY_set(lua_State* L) {
3704 int SWIG_arg = 0;
3705 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3706 PLFLT arg2 ;
3707
3708 SWIG_check_num_args("PLGraphicsIn::dY",2,2)
3709 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dY",1,"PLGraphicsIn *");
3710 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::dY",2,"PLFLT");
3711
3712 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3713 SWIG_fail_ptr("PLGraphicsIn_dY_set",1,SWIGTYPE_p_PLGraphicsIn);
3714 }
3715
3716 arg2 = (PLFLT)lua_tonumber(L, 2);
3717 if (arg1) (arg1)->dY = arg2;
3718
3719 return SWIG_arg;
3720
3721 fail: SWIGUNUSED;
3722 lua_error(L);
3723 return 0;
3724}
3725
3726
3727static int _wrap_PLGraphicsIn_dY_get(lua_State* L) {
3728 int SWIG_arg = 0;
3729 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3730 PLFLT result;
3731
3732 SWIG_check_num_args("PLGraphicsIn::dY",1,1)
3733 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dY",1,"PLGraphicsIn *");
3734
3735 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3736 SWIG_fail_ptr("PLGraphicsIn_dY_get",1,SWIGTYPE_p_PLGraphicsIn);
3737 }
3738
3739 result = (PLFLT) ((arg1)->dY);
3740 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3741 return SWIG_arg;
3742
3743 fail: SWIGUNUSED;
3744 lua_error(L);
3745 return 0;
3746}
3747
3748
3749static int _wrap_PLGraphicsIn_wX_set(lua_State* L) {
3750 int SWIG_arg = 0;
3751 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3752 PLFLT arg2 ;
3753
3754 SWIG_check_num_args("PLGraphicsIn::wX",2,2)
3755 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wX",1,"PLGraphicsIn *");
3756 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::wX",2,"PLFLT");
3757
3758 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3759 SWIG_fail_ptr("PLGraphicsIn_wX_set",1,SWIGTYPE_p_PLGraphicsIn);
3760 }
3761
3762 arg2 = (PLFLT)lua_tonumber(L, 2);
3763 if (arg1) (arg1)->wX = arg2;
3764
3765 return SWIG_arg;
3766
3767 fail: SWIGUNUSED;
3768 lua_error(L);
3769 return 0;
3770}
3771
3772
3773static int _wrap_PLGraphicsIn_wX_get(lua_State* L) {
3774 int SWIG_arg = 0;
3775 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3776 PLFLT result;
3777
3778 SWIG_check_num_args("PLGraphicsIn::wX",1,1)
3779 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wX",1,"PLGraphicsIn *");
3780
3781 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3782 SWIG_fail_ptr("PLGraphicsIn_wX_get",1,SWIGTYPE_p_PLGraphicsIn);
3783 }
3784
3785 result = (PLFLT) ((arg1)->wX);
3786 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3787 return SWIG_arg;
3788
3789 fail: SWIGUNUSED;
3790 lua_error(L);
3791 return 0;
3792}
3793
3794
3795static int _wrap_PLGraphicsIn_wY_set(lua_State* L) {
3796 int SWIG_arg = 0;
3797 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3798 PLFLT arg2 ;
3799
3800 SWIG_check_num_args("PLGraphicsIn::wY",2,2)
3801 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wY",1,"PLGraphicsIn *");
3802 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::wY",2,"PLFLT");
3803
3804 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3805 SWIG_fail_ptr("PLGraphicsIn_wY_set",1,SWIGTYPE_p_PLGraphicsIn);
3806 }
3807
3808 arg2 = (PLFLT)lua_tonumber(L, 2);
3809 if (arg1) (arg1)->wY = arg2;
3810
3811 return SWIG_arg;
3812
3813 fail: SWIGUNUSED;
3814 lua_error(L);
3815 return 0;
3816}
3817
3818
3819static int _wrap_PLGraphicsIn_wY_get(lua_State* L) {
3820 int SWIG_arg = 0;
3821 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3822 PLFLT result;
3823
3824 SWIG_check_num_args("PLGraphicsIn::wY",1,1)
3825 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wY",1,"PLGraphicsIn *");
3826
3827 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3828 SWIG_fail_ptr("PLGraphicsIn_wY_get",1,SWIGTYPE_p_PLGraphicsIn);
3829 }
3830
3831 result = (PLFLT) ((arg1)->wY);
3832 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3833 return SWIG_arg;
3834
3835 fail: SWIGUNUSED;
3836 lua_error(L);
3837 return 0;
3838}
3839
3840
3841static int _wrap_new_PLGraphicsIn(lua_State* L) {
3842 int SWIG_arg = 0;
3843 PLGraphicsIn *result = 0 ;
3844
3845 SWIG_check_num_args("PLGraphicsIn::PLGraphicsIn",0,0)
3846 result = (PLGraphicsIn *)calloc(1, sizeof(PLGraphicsIn));
3847 SWIG_NewPointerObj(L,result,SWIGTYPE_p_PLGraphicsIn,1); SWIG_arg++;
3848 return SWIG_arg;
3849
3850 fail: SWIGUNUSED;
3851 lua_error(L);
3852 return 0;
3853}
3854
3855
3856static void swig_delete_PLGraphicsIn(void *obj) {
3857PLGraphicsIn *arg1 = (PLGraphicsIn *) obj;
3858free((char *) arg1);
3859}
3860static int _proxy__wrap_new_PLGraphicsIn(lua_State *L) {
3861 assert(lua_istable(L,1));
3862 lua_pushcfunction(L,_wrap_new_PLGraphicsIn);
3863 assert(!lua_isnil(L,-1));
3864 lua_replace(L,1); /* replace our table with real constructor */
3865 lua_call(L,lua_gettop(L)-1,1);
3866 return 1;
3867}
3884 {0,0}
3885};
3887 {0,0}
3888};
3889
3902
3912static const char *swig_PLGraphicsIn_base_names[] = {0};
3914
3915static int _wrap_setcontlabelformat(lua_State* L) {
3916 int SWIG_arg = 0;
3917 PLINT arg1 ;
3918 PLINT arg2 ;
3919
3920 SWIG_check_num_args("pl_setcontlabelformat",2,2)
3921 if(!lua_isnumber(L,1)) SWIG_fail_arg("pl_setcontlabelformat",1,"PLINT");
3922 if(!lua_isnumber(L,2)) SWIG_fail_arg("pl_setcontlabelformat",2,"PLINT");
3923 arg1 = (PLINT)lua_tonumber(L, 1);
3924 arg2 = (PLINT)lua_tonumber(L, 2);
3925 pl_setcontlabelformat(arg1,arg2);
3926
3927 return SWIG_arg;
3928
3929 fail: SWIGUNUSED;
3930 lua_error(L);
3931 return 0;
3932}
3933
3934
3935static int _wrap_setcontlabelparam(lua_State* L) {
3936 int SWIG_arg = 0;
3937 PLFLT arg1 ;
3938 PLFLT arg2 ;
3939 PLFLT arg3 ;
3940 PLINT arg4 ;
3941
3942 SWIG_check_num_args("pl_setcontlabelparam",4,4)
3943 if(!lua_isnumber(L,1)) SWIG_fail_arg("pl_setcontlabelparam",1,"PLFLT");
3944 if(!lua_isnumber(L,2)) SWIG_fail_arg("pl_setcontlabelparam",2,"PLFLT");
3945 if(!lua_isnumber(L,3)) SWIG_fail_arg("pl_setcontlabelparam",3,"PLFLT");
3946 if(!lua_isnumber(L,4)) SWIG_fail_arg("pl_setcontlabelparam",4,"PLINT");
3947 arg1 = (PLFLT)lua_tonumber(L, 1);
3948 arg2 = (PLFLT)lua_tonumber(L, 2);
3949 arg3 = (PLFLT)lua_tonumber(L, 3);
3950 arg4 = (PLINT)lua_tonumber(L, 4);
3951 pl_setcontlabelparam(arg1,arg2,arg3,arg4);
3952
3953 return SWIG_arg;
3954
3955 fail: SWIGUNUSED;
3956 lua_error(L);
3957 return 0;
3958}
3959
3960
3961static int _wrap_adv(lua_State* L) {
3962 int SWIG_arg = 0;
3963 PLINT arg1 ;
3964
3965 SWIG_check_num_args("pladv",1,1)
3966 if(!lua_isnumber(L,1)) SWIG_fail_arg("pladv",1,"PLINT");
3967 arg1 = (PLINT)lua_tonumber(L, 1);
3968 pladv(arg1);
3969
3970 return SWIG_arg;
3971
3972 fail: SWIGUNUSED;
3973 lua_error(L);
3974 return 0;
3975}
3976
3977
3978static int _wrap_arc(lua_State* L) {
3979 int SWIG_arg = 0;
3980 PLFLT arg1 ;
3981 PLFLT arg2 ;
3982 PLFLT arg3 ;
3983 PLFLT arg4 ;
3984 PLFLT arg5 ;
3985 PLFLT arg6 ;
3986 PLFLT arg7 ;
3987 PLBOOL arg8 ;
3988
3989 SWIG_check_num_args("plarc",8,8)
3990 if(!lua_isnumber(L,1)) SWIG_fail_arg("plarc",1,"PLFLT");
3991 if(!lua_isnumber(L,2)) SWIG_fail_arg("plarc",2,"PLFLT");
3992 if(!lua_isnumber(L,3)) SWIG_fail_arg("plarc",3,"PLFLT");
3993 if(!lua_isnumber(L,4)) SWIG_fail_arg("plarc",4,"PLFLT");
3994 if(!lua_isnumber(L,5)) SWIG_fail_arg("plarc",5,"PLFLT");
3995 if(!lua_isnumber(L,6)) SWIG_fail_arg("plarc",6,"PLFLT");
3996 if(!lua_isnumber(L,7)) SWIG_fail_arg("plarc",7,"PLFLT");
3997 if(!lua_isnumber(L,8)) SWIG_fail_arg("plarc",8,"PLBOOL");
3998 arg1 = (PLFLT)lua_tonumber(L, 1);
3999 arg2 = (PLFLT)lua_tonumber(L, 2);
4000 arg3 = (PLFLT)lua_tonumber(L, 3);
4001 arg4 = (PLFLT)lua_tonumber(L, 4);
4002 arg5 = (PLFLT)lua_tonumber(L, 5);
4003 arg6 = (PLFLT)lua_tonumber(L, 6);
4004 arg7 = (PLFLT)lua_tonumber(L, 7);
4005 arg8 = (PLBOOL)lua_tonumber(L, 8);
4006 plarc(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
4007
4008 return SWIG_arg;
4009
4010 fail: SWIGUNUSED;
4011 lua_error(L);
4012 return 0;
4013}
4014
4015
4016static int _wrap_axes(lua_State* L) {
4017 int SWIG_arg = 0;
4018 PLFLT arg1 ;
4019 PLFLT arg2 ;
4020 char *arg3 = (char *) 0 ;
4021 PLFLT arg4 ;
4022 PLINT arg5 ;
4023 char *arg6 = (char *) 0 ;
4024 PLFLT arg7 ;
4025 PLINT arg8 ;
4026
4027 SWIG_check_num_args("plaxes",8,8)
4028 if(!lua_isnumber(L,1)) SWIG_fail_arg("plaxes",1,"PLFLT");
4029 if(!lua_isnumber(L,2)) SWIG_fail_arg("plaxes",2,"PLFLT");
4030 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plaxes",3,"char const *");
4031 if(!lua_isnumber(L,4)) SWIG_fail_arg("plaxes",4,"PLFLT");
4032 if(!lua_isnumber(L,5)) SWIG_fail_arg("plaxes",5,"PLINT");
4033 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plaxes",6,"char const *");
4034 if(!lua_isnumber(L,7)) SWIG_fail_arg("plaxes",7,"PLFLT");
4035 if(!lua_isnumber(L,8)) SWIG_fail_arg("plaxes",8,"PLINT");
4036 arg1 = (PLFLT)lua_tonumber(L, 1);
4037 arg2 = (PLFLT)lua_tonumber(L, 2);
4038 arg3 = (char *)lua_tostring(L, 3);
4039 arg4 = (PLFLT)lua_tonumber(L, 4);
4040 arg5 = (PLINT)lua_tonumber(L, 5);
4041 arg6 = (char *)lua_tostring(L, 6);
4042 arg7 = (PLFLT)lua_tonumber(L, 7);
4043 arg8 = (PLINT)lua_tonumber(L, 8);
4044 plaxes(arg1,arg2,(char const *)arg3,arg4,arg5,(char const *)arg6,arg7,arg8);
4045
4046 return SWIG_arg;
4047
4048 fail: SWIGUNUSED;
4049 lua_error(L);
4050 return 0;
4051}
4052
4053
4054static int _wrap_bin(lua_State* L) {
4055 int SWIG_arg = 0;
4056 PLINT arg1 ;
4057 PLFLT *arg2 = (PLFLT *) 0 ;
4058 PLFLT *arg3 = (PLFLT *) 0 ;
4059 PLINT arg4 ;
4060 int temp3 ;
4061
4062 SWIG_check_num_args("plbin",3,3)
4063 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbin",3,"PLINT");
4064 {
4065 int temp;
4066 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4067 if ( !arg2 )
4068 SWIG_fail;
4069 arg1 = Alen = temp;
4070 }
4071 {
4072 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4073 if ( !arg3 )
4074 SWIG_fail;
4075 if ( temp3 != Alen )
4076 {
4077 lua_pushfstring( L, "Tables must be of same length." );
4078 SWIG_fail;
4079 }
4080 }
4081 arg4 = (PLINT)lua_tonumber(L, 3);
4082 plbin(arg1,(double const *)arg2,(double const *)arg3,arg4);
4083
4084 {
4085 LUA_FREE_ARRAY( arg2 );
4086 }
4087 {
4088 LUA_FREE_ARRAY( arg3 );
4089 }
4090 return SWIG_arg;
4091
4092 fail: SWIGUNUSED;
4093 {
4094 LUA_FREE_ARRAY( arg2 );
4095 }
4096 {
4097 LUA_FREE_ARRAY( arg3 );
4098 }
4099 lua_error(L);
4100 return 0;
4101}
4102
4103
4104static int _wrap_btime(lua_State* L) {
4105 int SWIG_arg = 0;
4106 PLINT *arg1 = (PLINT *) 0 ;
4107 PLINT *arg2 = (PLINT *) 0 ;
4108 PLINT *arg3 = (PLINT *) 0 ;
4109 PLINT *arg4 = (PLINT *) 0 ;
4110 PLINT *arg5 = (PLINT *) 0 ;
4111 PLFLT *arg6 = (PLFLT *) 0 ;
4112 PLFLT arg7 ;
4113 PLINT temp1 ;
4114 PLINT temp2 ;
4115 PLINT temp3 ;
4116 PLINT temp4 ;
4117 PLINT temp5 ;
4118 PLFLT temp6 ;
4119
4120 arg1 = &temp1;
4121 arg2 = &temp2;
4122 arg3 = &temp3;
4123 arg4 = &temp4;
4124 arg5 = &temp5;
4125 arg6 = &temp6;
4126 SWIG_check_num_args("plbtime",1,1)
4127 if(!lua_isnumber(L,1)) SWIG_fail_arg("plbtime",1,"PLFLT");
4128 arg7 = (PLFLT)lua_tonumber(L, 1);
4129 plbtime(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
4130
4131 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4132 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4133 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4134 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4135 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
4136 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
4137 return SWIG_arg;
4138
4139 fail: SWIGUNUSED;
4140 lua_error(L);
4141 return 0;
4142}
4143
4144
4145static int _wrap_bop(lua_State* L) {
4146 int SWIG_arg = 0;
4147
4148 SWIG_check_num_args("plbop",0,0)
4149 plbop();
4150
4151 return SWIG_arg;
4152
4153 fail: SWIGUNUSED;
4154 lua_error(L);
4155 return 0;
4156}
4157
4158
4159static int _wrap_box(lua_State* L) {
4160 int SWIG_arg = 0;
4161 char *arg1 = (char *) 0 ;
4162 PLFLT arg2 ;
4163 PLINT arg3 ;
4164 char *arg4 = (char *) 0 ;
4165 PLFLT arg5 ;
4166 PLINT arg6 ;
4167
4168 SWIG_check_num_args("plbox",6,6)
4169 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plbox",1,"char const *");
4170 if(!lua_isnumber(L,2)) SWIG_fail_arg("plbox",2,"PLFLT");
4171 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbox",3,"PLINT");
4172 if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("plbox",4,"char const *");
4173 if(!lua_isnumber(L,5)) SWIG_fail_arg("plbox",5,"PLFLT");
4174 if(!lua_isnumber(L,6)) SWIG_fail_arg("plbox",6,"PLINT");
4175 arg1 = (char *)lua_tostring(L, 1);
4176 arg2 = (PLFLT)lua_tonumber(L, 2);
4177 arg3 = (PLINT)lua_tonumber(L, 3);
4178 arg4 = (char *)lua_tostring(L, 4);
4179 arg5 = (PLFLT)lua_tonumber(L, 5);
4180 arg6 = (PLINT)lua_tonumber(L, 6);
4181 plbox((char const *)arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
4182
4183 return SWIG_arg;
4184
4185 fail: SWIGUNUSED;
4186 lua_error(L);
4187 return 0;
4188}
4189
4190
4191static int _wrap_box3(lua_State* L) {
4192 int SWIG_arg = 0;
4193 char *arg1 = (char *) 0 ;
4194 char *arg2 = (char *) 0 ;
4195 PLFLT arg3 ;
4196 PLINT arg4 ;
4197 char *arg5 = (char *) 0 ;
4198 char *arg6 = (char *) 0 ;
4199 PLFLT arg7 ;
4200 PLINT arg8 ;
4201 char *arg9 = (char *) 0 ;
4202 char *arg10 = (char *) 0 ;
4203 PLFLT arg11 ;
4204 PLINT arg12 ;
4205
4206 SWIG_check_num_args("plbox3",12,12)
4207 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plbox3",1,"char const *");
4208 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plbox3",2,"char const *");
4209 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbox3",3,"PLFLT");
4210 if(!lua_isnumber(L,4)) SWIG_fail_arg("plbox3",4,"PLINT");
4211 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plbox3",5,"char const *");
4212 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plbox3",6,"char const *");
4213 if(!lua_isnumber(L,7)) SWIG_fail_arg("plbox3",7,"PLFLT");
4214 if(!lua_isnumber(L,8)) SWIG_fail_arg("plbox3",8,"PLINT");
4215 if(!SWIG_lua_isnilstring(L,9)) SWIG_fail_arg("plbox3",9,"char const *");
4216 if(!SWIG_lua_isnilstring(L,10)) SWIG_fail_arg("plbox3",10,"char const *");
4217 if(!lua_isnumber(L,11)) SWIG_fail_arg("plbox3",11,"PLFLT");
4218 if(!lua_isnumber(L,12)) SWIG_fail_arg("plbox3",12,"PLINT");
4219 arg1 = (char *)lua_tostring(L, 1);
4220 arg2 = (char *)lua_tostring(L, 2);
4221 arg3 = (PLFLT)lua_tonumber(L, 3);
4222 arg4 = (PLINT)lua_tonumber(L, 4);
4223 arg5 = (char *)lua_tostring(L, 5);
4224 arg6 = (char *)lua_tostring(L, 6);
4225 arg7 = (PLFLT)lua_tonumber(L, 7);
4226 arg8 = (PLINT)lua_tonumber(L, 8);
4227 arg9 = (char *)lua_tostring(L, 9);
4228 arg10 = (char *)lua_tostring(L, 10);
4229 arg11 = (PLFLT)lua_tonumber(L, 11);
4230 arg12 = (PLINT)lua_tonumber(L, 12);
4231 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);
4232
4233 return SWIG_arg;
4234
4235 fail: SWIGUNUSED;
4236 lua_error(L);
4237 return 0;
4238}
4239
4240
4241static int _wrap_calc_world(lua_State* L) {
4242 int SWIG_arg = 0;
4243 PLFLT arg1 ;
4244 PLFLT arg2 ;
4245 PLFLT *arg3 = (PLFLT *) 0 ;
4246 PLFLT *arg4 = (PLFLT *) 0 ;
4247 PLINT *arg5 = (PLINT *) 0 ;
4248 PLFLT temp3 ;
4249 PLFLT temp4 ;
4250 PLINT temp5 ;
4251
4252 arg3 = &temp3;
4253 arg4 = &temp4;
4254 arg5 = &temp5;
4255 SWIG_check_num_args("plcalc_world",2,2)
4256 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcalc_world",1,"PLFLT");
4257 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcalc_world",2,"PLFLT");
4258 arg1 = (PLFLT)lua_tonumber(L, 1);
4259 arg2 = (PLFLT)lua_tonumber(L, 2);
4260 plcalc_world(arg1,arg2,arg3,arg4,arg5);
4261
4262 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4263 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4264 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
4265 return SWIG_arg;
4266
4267 fail: SWIGUNUSED;
4268 lua_error(L);
4269 return 0;
4270}
4271
4272
4273static int _wrap_clear(lua_State* L) {
4274 int SWIG_arg = 0;
4275
4276 SWIG_check_num_args("plclear",0,0)
4277 plclear();
4278
4279 return SWIG_arg;
4280
4281 fail: SWIGUNUSED;
4282 lua_error(L);
4283 return 0;
4284}
4285
4286
4287static int _wrap_col0(lua_State* L) {
4288 int SWIG_arg = 0;
4289 PLINT arg1 ;
4290
4291 SWIG_check_num_args("plcol0",1,1)
4292 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcol0",1,"PLINT");
4293 arg1 = (PLINT)lua_tonumber(L, 1);
4294 plcol0(arg1);
4295
4296 return SWIG_arg;
4297
4298 fail: SWIGUNUSED;
4299 lua_error(L);
4300 return 0;
4301}
4302
4303
4304static int _wrap_col1(lua_State* L) {
4305 int SWIG_arg = 0;
4306 PLFLT arg1 ;
4307
4308 SWIG_check_num_args("plcol1",1,1)
4309 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcol1",1,"PLFLT");
4310 arg1 = (PLFLT)lua_tonumber(L, 1);
4311 plcol1(arg1);
4312
4313 return SWIG_arg;
4314
4315 fail: SWIGUNUSED;
4316 lua_error(L);
4317 return 0;
4318}
4319
4320
4321static int _wrap_configtime(lua_State* L) {
4322 int SWIG_arg = 0;
4323 PLFLT arg1 ;
4324 PLFLT arg2 ;
4325 PLFLT arg3 ;
4326 PLINT arg4 ;
4327 PLBOOL arg5 ;
4328 PLINT arg6 ;
4329 PLINT arg7 ;
4330 PLINT arg8 ;
4331 PLINT arg9 ;
4332 PLINT arg10 ;
4333 PLFLT arg11 ;
4334
4335 SWIG_check_num_args("plconfigtime",11,11)
4336 if(!lua_isnumber(L,1)) SWIG_fail_arg("plconfigtime",1,"PLFLT");
4337 if(!lua_isnumber(L,2)) SWIG_fail_arg("plconfigtime",2,"PLFLT");
4338 if(!lua_isnumber(L,3)) SWIG_fail_arg("plconfigtime",3,"PLFLT");
4339 if(!lua_isnumber(L,4)) SWIG_fail_arg("plconfigtime",4,"PLINT");
4340 if(!lua_isnumber(L,5)) SWIG_fail_arg("plconfigtime",5,"PLBOOL");
4341 if(!lua_isnumber(L,6)) SWIG_fail_arg("plconfigtime",6,"PLINT");
4342 if(!lua_isnumber(L,7)) SWIG_fail_arg("plconfigtime",7,"PLINT");
4343 if(!lua_isnumber(L,8)) SWIG_fail_arg("plconfigtime",8,"PLINT");
4344 if(!lua_isnumber(L,9)) SWIG_fail_arg("plconfigtime",9,"PLINT");
4345 if(!lua_isnumber(L,10)) SWIG_fail_arg("plconfigtime",10,"PLINT");
4346 if(!lua_isnumber(L,11)) SWIG_fail_arg("plconfigtime",11,"PLFLT");
4347 arg1 = (PLFLT)lua_tonumber(L, 1);
4348 arg2 = (PLFLT)lua_tonumber(L, 2);
4349 arg3 = (PLFLT)lua_tonumber(L, 3);
4350 arg4 = (PLINT)lua_tonumber(L, 4);
4351 arg5 = (PLBOOL)lua_tonumber(L, 5);
4352 arg6 = (PLINT)lua_tonumber(L, 6);
4353 arg7 = (PLINT)lua_tonumber(L, 7);
4354 arg8 = (PLINT)lua_tonumber(L, 8);
4355 arg9 = (PLINT)lua_tonumber(L, 9);
4356 arg10 = (PLINT)lua_tonumber(L, 10);
4357 arg11 = (PLFLT)lua_tonumber(L, 11);
4358 plconfigtime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
4359
4360 return SWIG_arg;
4361
4362 fail: SWIGUNUSED;
4363 lua_error(L);
4364 return 0;
4365}
4366
4367
4368static int _wrap_cont(lua_State* L) {
4369 int SWIG_arg = 0;
4370 PLFLT **arg1 = (PLFLT **) 0 ;
4371 PLINT arg2 ;
4372 PLINT arg3 ;
4373 PLINT arg4 ;
4374 PLINT arg5 ;
4375 PLINT arg6 ;
4376 PLINT arg7 ;
4377 PLFLT *arg8 = (PLFLT *) 0 ;
4378 PLINT arg9 ;
4379 pltr_func arg10 = (pltr_func) 0 ;
4380 PLPointer arg11 = (PLPointer) 0 ;
4381 int ii1 ;
4382 PLcGrid cgrid111 ;
4383 PLcGrid2 cgrid211 ;
4384
4385 {
4386 cgrid111.xg = cgrid111.yg = cgrid111.zg = NULL;
4387 cgrid111.nx = cgrid111.ny = cgrid111.nz = 0;
4388 cgrid211.xg = cgrid211.yg = cgrid211.zg = NULL;
4389 cgrid211.nx = cgrid211.ny = 0;
4390 }
4391 {
4392 arg10 = NULL;
4393 }
4394 {
4395 arg11 = NULL;
4396 }
4397 SWIG_check_num_args("plcont",6,8)
4398 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcont",2,"PLINT");
4399 if(!lua_isnumber(L,3)) SWIG_fail_arg("plcont",3,"PLINT");
4400 if(!lua_isnumber(L,4)) SWIG_fail_arg("plcont",4,"PLINT");
4401 if(!lua_isnumber(L,5)) SWIG_fail_arg("plcont",5,"PLINT");
4402 {
4403 int jj;
4404
4405 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
4406 if ( !arg1 )
4407 SWIG_fail;
4408 Xlen = arg2 = ii1;
4409 Ylen = arg3 = jj;
4410 }
4411 arg4 = (PLINT)lua_tonumber(L, 2);
4412 arg5 = (PLINT)lua_tonumber(L, 3);
4413 arg6 = (PLINT)lua_tonumber(L, 4);
4414 arg7 = (PLINT)lua_tonumber(L, 5);
4415 {
4416 int temp;
4417 arg8 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp );
4418 if ( !arg8 )
4419 SWIG_fail;
4420 arg9 = Alen = temp;
4421 }
4422 if(lua_gettop(L)>=7){
4423 {
4424 arg10 = NULL;
4425 mypltr_funcstr[0] = '\0';
4426
4427 if ( lua_isstring( L, 7 ) )
4428 {
4429 const char* funcstr = lua_tostring( L, 7 );
4430 if ( strcmp( "pltr0", funcstr ) == 0 )
4431 {
4432 arg10 = pltr0;
4433 }
4434 else if ( strcmp( "pltr1", funcstr ) == 0 )
4435 {
4436 arg10 = pltr1;
4437 }
4438 else if ( strcmp( "pltr2", funcstr ) == 0 )
4439 {
4440 arg10 = pltr2;
4441 }
4442 else
4443 {
4444 arg10 = mypltr;
4445 strncpy( mypltr_funcstr, funcstr, 255 );
4446 myL = L;
4447 }
4448 }
4449 else
4450 SWIG_fail_arg( "cont", 10, "pltr_func" );
4451 }
4452 }
4453 if(lua_gettop(L)>=8){
4454 {
4455 int nx, ny;
4456 int gridmode = 0;
4457
4458 lua_pushstring( L, "xg" );
4459 lua_gettable( L, 8 );
4460 if ( !lua_istable( L, -1 ) )
4461 {
4462 lua_pop( L, 1 ); // pop "xg"
4463 lua_pushstring( L, "expected a table xg" );
4464 SWIG_fail;
4465 }
4466 lua_rawgeti( L, -1, 1 );
4467 if ( lua_istable( L, -1 ) )
4468 gridmode = 2; // two dimensional array
4469 else if ( lua_isnumber( L, -1 ) )
4470 gridmode = 1; // one dimensional array
4471 else
4472 {
4473 lua_pop( L, 1 ); // pop "1"
4474 lua_pop( L, 1 ); // pop "xg"
4475 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
4476 SWIG_fail;
4477 }
4478 lua_pop( L, 1 ); // pop test element
4479 if ( gridmode == 1 )
4480 {
4481 cgrid111.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
4482 if ( !cgrid111.xg )
4483 {
4484 lua_pop( L, 1 ); // pop "xg"
4485 SWIG_fail;
4486 }
4487 if ( nx != Xlen )
4488 {
4489 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
4490 SWIG_fail;
4491 }
4492 cgrid111.nx = nx;
4493 }
4494 else
4495 {
4496 cgrid211.xg = read_double_Matrix( L, -1, &nx, &ny );
4497 if ( !cgrid211.xg )
4498 {
4499 lua_pop( L, 1 ); // pop "xg"
4500 SWIG_fail;
4501 }
4502 if ( ( nx != Xlen ) || ( ny != Ylen ) )
4503 {
4504 lua_pop( L, 1 ); // pop "xg"
4505 lua_pushfstring( L, "Vectors must match matrix." );
4506 SWIG_fail;
4507 }
4508 cgrid211.nx = nx;
4509 cgrid211.ny = ny;
4510 }
4511 lua_pop( L, 1 ); // pop "xg"
4512
4513 lua_pushstring( L, "yg" );
4514 lua_gettable( L, 8 );
4515 if ( !lua_istable( L, -1 ) )
4516 {
4517 lua_pop( L, 1 );
4518 lua_pushstring( L, "expected a table yg" );
4519 SWIG_fail;
4520 }
4521 lua_rawgeti( L, -1, 1 );
4522 if ( gridmode == 2 )
4523 {
4524 if ( !lua_istable( L, -1 ) )
4525 {
4526 lua_pop( L, 1 ); // pop "1"
4527 lua_pop( L, 1 ); // pop "yg"
4528 lua_pushstring( L, "expected a two dimensional array/table in yg" );
4529 SWIG_fail;
4530 }
4531 }
4532 else
4533 {
4534 if ( !lua_isnumber( L, -1 ) )
4535 {
4536 lua_pop( L, 1 ); // pop "1"
4537 lua_pop( L, 1 ); // pop "yg"
4538 lua_pushstring( L, "expected a one dimensional array/table in yg" );
4539 SWIG_fail;
4540 }
4541 }
4542 lua_pop( L, 1 ); // pop "1"
4543 if ( gridmode == 1 )
4544 {
4545 cgrid111.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
4546 if ( !cgrid111.yg )
4547 {
4548 lua_pop( L, 1 ); // pop "yg"
4549 SWIG_fail;
4550 }
4551 if ( ny != Ylen )
4552 {
4553 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
4554 SWIG_fail;
4555 }
4556 cgrid111.ny = ny;
4557 }
4558 else
4559 {
4560 cgrid211.yg = read_double_Matrix( L, -1, &nx, &ny );
4561 if ( !cgrid211.yg )
4562 {
4563 lua_pop( L, 1 ); // pop "xg"
4564 SWIG_fail;
4565 }
4566 if ( ( nx != Xlen ) || ( ny != Ylen ) )
4567 {
4568 lua_pop( L, 1 ); // pop "xg"
4569 lua_pushfstring( L, "Vectors must match matrix." );
4570 SWIG_fail;
4571 }
4572 // cgrid211.nx/ny already set
4573 }
4574 lua_pop( L, 1 ); // pop "yg"
4575
4576 if ( gridmode == 1 )
4577 arg11 = &cgrid111;
4578 else if ( gridmode == 2 )
4579 arg11 = &cgrid211;
4580 }
4581 }
4582 plcont((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,(double const *)arg8,arg9,arg10,arg11);
4583
4584 {
4585 int i;
4586
4587 if ( arg1 )
4588 {
4589 for ( i = 0; i < ii1; i++ )
4590 LUA_FREE_ARRAY( arg1[i] );
4591 LUA_FREE_ARRAY( arg1 );
4592 }
4593 }
4594 {
4595 LUA_FREE_ARRAY( arg8 );
4596 }
4597 {
4598 mypltr_funcstr[0] = '\0';
4599 }
4600 {
4601 int i;
4602
4603 LUA_FREE_ARRAY( cgrid111.xg );
4604 LUA_FREE_ARRAY( cgrid111.yg );
4605
4606 if ( cgrid211.xg )
4607 {
4608 for ( i = 0; i < Xlen; i++ )
4609 LUA_FREE_ARRAY( cgrid211.xg[i] );
4610 LUA_FREE_ARRAY( cgrid211.xg );
4611 }
4612 if ( cgrid211.yg )
4613 {
4614 for ( i = 0; i < Xlen; i++ )
4615 LUA_FREE_ARRAY( cgrid211.yg[i] );
4616 LUA_FREE_ARRAY( cgrid211.yg );
4617 }
4618 }
4619 return SWIG_arg;
4620
4621 fail: SWIGUNUSED;
4622 {
4623 int i;
4624
4625 if ( arg1 )
4626 {
4627 for ( i = 0; i < ii1; i++ )
4628 LUA_FREE_ARRAY( arg1[i] );
4629 LUA_FREE_ARRAY( arg1 );
4630 }
4631 }
4632 {
4633 LUA_FREE_ARRAY( arg8 );
4634 }
4635 {
4636 mypltr_funcstr[0] = '\0';
4637 }
4638 {
4639 int i;
4640
4641 LUA_FREE_ARRAY( cgrid111.xg );
4642 LUA_FREE_ARRAY( cgrid111.yg );
4643
4644 if ( cgrid211.xg )
4645 {
4646 for ( i = 0; i < Xlen; i++ )
4647 LUA_FREE_ARRAY( cgrid211.xg[i] );
4648 LUA_FREE_ARRAY( cgrid211.xg );
4649 }
4650 if ( cgrid211.yg )
4651 {
4652 for ( i = 0; i < Xlen; i++ )
4653 LUA_FREE_ARRAY( cgrid211.yg[i] );
4654 LUA_FREE_ARRAY( cgrid211.yg );
4655 }
4656 }
4657 lua_error(L);
4658 return 0;
4659}
4660
4661
4662static int _wrap_ctime(lua_State* L) {
4663 int SWIG_arg = 0;
4664 PLINT arg1 ;
4665 PLINT arg2 ;
4666 PLINT arg3 ;
4667 PLINT arg4 ;
4668 PLINT arg5 ;
4669 PLFLT arg6 ;
4670 PLFLT *arg7 = (PLFLT *) 0 ;
4671 PLFLT temp7 ;
4672
4673 arg7 = &temp7;
4674 SWIG_check_num_args("plctime",6,6)
4675 if(!lua_isnumber(L,1)) SWIG_fail_arg("plctime",1,"PLINT");
4676 if(!lua_isnumber(L,2)) SWIG_fail_arg("plctime",2,"PLINT");
4677 if(!lua_isnumber(L,3)) SWIG_fail_arg("plctime",3,"PLINT");
4678 if(!lua_isnumber(L,4)) SWIG_fail_arg("plctime",4,"PLINT");
4679 if(!lua_isnumber(L,5)) SWIG_fail_arg("plctime",5,"PLINT");
4680 if(!lua_isnumber(L,6)) SWIG_fail_arg("plctime",6,"PLFLT");
4681 arg1 = (PLINT)lua_tonumber(L, 1);
4682 arg2 = (PLINT)lua_tonumber(L, 2);
4683 arg3 = (PLINT)lua_tonumber(L, 3);
4684 arg4 = (PLINT)lua_tonumber(L, 4);
4685 arg5 = (PLINT)lua_tonumber(L, 5);
4686 arg6 = (PLFLT)lua_tonumber(L, 6);
4687 plctime(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
4688
4689 lua_pushnumber(L, (lua_Number) *arg7); SWIG_arg++;
4690 return SWIG_arg;
4691
4692 fail: SWIGUNUSED;
4693 lua_error(L);
4694 return 0;
4695}
4696
4697
4698static int _wrap_cpstrm(lua_State* L) {
4699 int SWIG_arg = 0;
4700 PLINT arg1 ;
4701 PLBOOL arg2 ;
4702
4703 SWIG_check_num_args("plcpstrm",2,2)
4704 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcpstrm",1,"PLINT");
4705 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcpstrm",2,"PLBOOL");
4706 arg1 = (PLINT)lua_tonumber(L, 1);
4707 arg2 = (PLBOOL)lua_tonumber(L, 2);
4708 plcpstrm(arg1,arg2);
4709
4710 return SWIG_arg;
4711
4712 fail: SWIGUNUSED;
4713 lua_error(L);
4714 return 0;
4715}
4716
4717
4718static int _wrap_plend(lua_State* L) {
4719 int SWIG_arg = 0;
4720
4721 SWIG_check_num_args("plend",0,0)
4722 plend();
4723
4724 return SWIG_arg;
4725
4726 fail: SWIGUNUSED;
4727 lua_error(L);
4728 return 0;
4729}
4730
4731
4732static int _wrap_plend1(lua_State* L) {
4733 int SWIG_arg = 0;
4734
4735 SWIG_check_num_args("plend1",0,0)
4736 plend1();
4737
4738 return SWIG_arg;
4739
4740 fail: SWIGUNUSED;
4741 lua_error(L);
4742 return 0;
4743}
4744
4745
4746static int _wrap_env(lua_State* L) {
4747 int SWIG_arg = 0;
4748 PLFLT arg1 ;
4749 PLFLT arg2 ;
4750 PLFLT arg3 ;
4751 PLFLT arg4 ;
4752 PLINT arg5 ;
4753 PLINT arg6 ;
4754
4755 SWIG_check_num_args("plenv",6,6)
4756 if(!lua_isnumber(L,1)) SWIG_fail_arg("plenv",1,"PLFLT");
4757 if(!lua_isnumber(L,2)) SWIG_fail_arg("plenv",2,"PLFLT");
4758 if(!lua_isnumber(L,3)) SWIG_fail_arg("plenv",3,"PLFLT");
4759 if(!lua_isnumber(L,4)) SWIG_fail_arg("plenv",4,"PLFLT");
4760 if(!lua_isnumber(L,5)) SWIG_fail_arg("plenv",5,"PLINT");
4761 if(!lua_isnumber(L,6)) SWIG_fail_arg("plenv",6,"PLINT");
4762 arg1 = (PLFLT)lua_tonumber(L, 1);
4763 arg2 = (PLFLT)lua_tonumber(L, 2);
4764 arg3 = (PLFLT)lua_tonumber(L, 3);
4765 arg4 = (PLFLT)lua_tonumber(L, 4);
4766 arg5 = (PLINT)lua_tonumber(L, 5);
4767 arg6 = (PLINT)lua_tonumber(L, 6);
4768 plenv(arg1,arg2,arg3,arg4,arg5,arg6);
4769
4770 return SWIG_arg;
4771
4772 fail: SWIGUNUSED;
4773 lua_error(L);
4774 return 0;
4775}
4776
4777
4778static int _wrap_env0(lua_State* L) {
4779 int SWIG_arg = 0;
4780 PLFLT arg1 ;
4781 PLFLT arg2 ;
4782 PLFLT arg3 ;
4783 PLFLT arg4 ;
4784 PLINT arg5 ;
4785 PLINT arg6 ;
4786
4787 SWIG_check_num_args("plenv0",6,6)
4788 if(!lua_isnumber(L,1)) SWIG_fail_arg("plenv0",1,"PLFLT");
4789 if(!lua_isnumber(L,2)) SWIG_fail_arg("plenv0",2,"PLFLT");
4790 if(!lua_isnumber(L,3)) SWIG_fail_arg("plenv0",3,"PLFLT");
4791 if(!lua_isnumber(L,4)) SWIG_fail_arg("plenv0",4,"PLFLT");
4792 if(!lua_isnumber(L,5)) SWIG_fail_arg("plenv0",5,"PLINT");
4793 if(!lua_isnumber(L,6)) SWIG_fail_arg("plenv0",6,"PLINT");
4794 arg1 = (PLFLT)lua_tonumber(L, 1);
4795 arg2 = (PLFLT)lua_tonumber(L, 2);
4796 arg3 = (PLFLT)lua_tonumber(L, 3);
4797 arg4 = (PLFLT)lua_tonumber(L, 4);
4798 arg5 = (PLINT)lua_tonumber(L, 5);
4799 arg6 = (PLINT)lua_tonumber(L, 6);
4800 plenv0(arg1,arg2,arg3,arg4,arg5,arg6);
4801
4802 return SWIG_arg;
4803
4804 fail: SWIGUNUSED;
4805 lua_error(L);
4806 return 0;
4807}
4808
4809
4810static int _wrap_eop(lua_State* L) {
4811 int SWIG_arg = 0;
4812
4813 SWIG_check_num_args("pleop",0,0)
4814 pleop();
4815
4816 return SWIG_arg;
4817
4818 fail: SWIGUNUSED;
4819 lua_error(L);
4820 return 0;
4821}
4822
4823
4824static int _wrap_errx(lua_State* L) {
4825 int SWIG_arg = 0;
4826 PLINT arg1 ;
4827 PLFLT *arg2 = (PLFLT *) 0 ;
4828 PLFLT *arg3 = (PLFLT *) 0 ;
4829 PLFLT *arg4 = (PLFLT *) 0 ;
4830 int temp3 ;
4831 int temp4 ;
4832
4833 SWIG_check_num_args("plerrx",3,3)
4834 {
4835 int temp;
4836 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4837 if ( !arg2 )
4838 SWIG_fail;
4839 arg1 = Alen = temp;
4840 }
4841 {
4842 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4843 if ( !arg3 )
4844 SWIG_fail;
4845 if ( temp3 != Alen )
4846 {
4847 lua_pushfstring( L, "Tables must be of same length." );
4848 SWIG_fail;
4849 }
4850 }
4851 {
4852 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
4853 if ( !arg4 )
4854 SWIG_fail;
4855 if ( temp4 != Alen )
4856 {
4857 lua_pushfstring( L, "Tables must be of same length." );
4858 SWIG_fail;
4859 }
4860 }
4861 plerrx(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
4862
4863 {
4864 LUA_FREE_ARRAY( arg2 );
4865 }
4866 {
4867 LUA_FREE_ARRAY( arg3 );
4868 }
4869 {
4870 LUA_FREE_ARRAY( arg4 );
4871 }
4872 return SWIG_arg;
4873
4874 fail: SWIGUNUSED;
4875 {
4876 LUA_FREE_ARRAY( arg2 );
4877 }
4878 {
4879 LUA_FREE_ARRAY( arg3 );
4880 }
4881 {
4882 LUA_FREE_ARRAY( arg4 );
4883 }
4884 lua_error(L);
4885 return 0;
4886}
4887
4888
4889static int _wrap_erry(lua_State* L) {
4890 int SWIG_arg = 0;
4891 PLINT arg1 ;
4892 PLFLT *arg2 = (PLFLT *) 0 ;
4893 PLFLT *arg3 = (PLFLT *) 0 ;
4894 PLFLT *arg4 = (PLFLT *) 0 ;
4895 int temp3 ;
4896 int temp4 ;
4897
4898 SWIG_check_num_args("plerry",3,3)
4899 {
4900 int temp;
4901 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4902 if ( !arg2 )
4903 SWIG_fail;
4904 arg1 = Alen = temp;
4905 }
4906 {
4907 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4908 if ( !arg3 )
4909 SWIG_fail;
4910 if ( temp3 != Alen )
4911 {
4912 lua_pushfstring( L, "Tables must be of same length." );
4913 SWIG_fail;
4914 }
4915 }
4916 {
4917 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
4918 if ( !arg4 )
4919 SWIG_fail;
4920 if ( temp4 != Alen )
4921 {
4922 lua_pushfstring( L, "Tables must be of same length." );
4923 SWIG_fail;
4924 }
4925 }
4926 plerry(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
4927
4928 {
4929 LUA_FREE_ARRAY( arg2 );
4930 }
4931 {
4932 LUA_FREE_ARRAY( arg3 );
4933 }
4934 {
4935 LUA_FREE_ARRAY( arg4 );
4936 }
4937 return SWIG_arg;
4938
4939 fail: SWIGUNUSED;
4940 {
4941 LUA_FREE_ARRAY( arg2 );
4942 }
4943 {
4944 LUA_FREE_ARRAY( arg3 );
4945 }
4946 {
4947 LUA_FREE_ARRAY( arg4 );
4948 }
4949 lua_error(L);
4950 return 0;
4951}
4952
4953
4954static int _wrap_famadv(lua_State* L) {
4955 int SWIG_arg = 0;
4956
4957 SWIG_check_num_args("plfamadv",0,0)
4958 plfamadv();
4959
4960 return SWIG_arg;
4961
4962 fail: SWIGUNUSED;
4963 lua_error(L);
4964 return 0;
4965}
4966
4967
4968static int _wrap_fill(lua_State* L) {
4969 int SWIG_arg = 0;
4970 PLINT arg1 ;
4971 PLFLT *arg2 = (PLFLT *) 0 ;
4972 PLFLT *arg3 = (PLFLT *) 0 ;
4973 int temp3 ;
4974
4975 SWIG_check_num_args("plfill",2,2)
4976 {
4977 int temp;
4978 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4979 if ( !arg2 )
4980 SWIG_fail;
4981 arg1 = Alen = temp;
4982 }
4983 {
4984 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4985 if ( !arg3 )
4986 SWIG_fail;
4987 if ( temp3 != Alen )
4988 {
4989 lua_pushfstring( L, "Tables must be of same length." );
4990 SWIG_fail;
4991 }
4992 }
4993 plfill(arg1,(double const *)arg2,(double const *)arg3);
4994
4995 {
4996 LUA_FREE_ARRAY( arg2 );
4997 }
4998 {
4999 LUA_FREE_ARRAY( arg3 );
5000 }
5001 return SWIG_arg;
5002
5003 fail: SWIGUNUSED;
5004 {
5005 LUA_FREE_ARRAY( arg2 );
5006 }
5007 {
5008 LUA_FREE_ARRAY( arg3 );
5009 }
5010 lua_error(L);
5011 return 0;
5012}
5013
5014
5015static int _wrap_fill3(lua_State* L) {
5016 int SWIG_arg = 0;
5017 PLINT arg1 ;
5018 PLFLT *arg2 = (PLFLT *) 0 ;
5019 PLFLT *arg3 = (PLFLT *) 0 ;
5020 PLFLT *arg4 = (PLFLT *) 0 ;
5021 int temp3 ;
5022 int temp4 ;
5023
5024 SWIG_check_num_args("plfill3",3,3)
5025 {
5026 int temp;
5027 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5028 if ( !arg2 )
5029 SWIG_fail;
5030 arg1 = Alen = temp;
5031 }
5032 {
5033 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
5034 if ( !arg3 )
5035 SWIG_fail;
5036 if ( temp3 != Alen )
5037 {
5038 lua_pushfstring( L, "Tables must be of same length." );
5039 SWIG_fail;
5040 }
5041 }
5042 {
5043 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
5044 if ( !arg4 )
5045 SWIG_fail;
5046 if ( temp4 != Alen )
5047 {
5048 lua_pushfstring( L, "Tables must be of same length." );
5049 SWIG_fail;
5050 }
5051 }
5052 plfill3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
5053
5054 {
5055 LUA_FREE_ARRAY( arg2 );
5056 }
5057 {
5058 LUA_FREE_ARRAY( arg3 );
5059 }
5060 {
5061 LUA_FREE_ARRAY( arg4 );
5062 }
5063 return SWIG_arg;
5064
5065 fail: SWIGUNUSED;
5066 {
5067 LUA_FREE_ARRAY( arg2 );
5068 }
5069 {
5070 LUA_FREE_ARRAY( arg3 );
5071 }
5072 {
5073 LUA_FREE_ARRAY( arg4 );
5074 }
5075 lua_error(L);
5076 return 0;
5077}
5078
5079
5080static int _wrap_gradient(lua_State* L) {
5081 int SWIG_arg = 0;
5082 PLINT arg1 ;
5083 PLFLT *arg2 = (PLFLT *) 0 ;
5084 PLFLT *arg3 = (PLFLT *) 0 ;
5085 PLFLT arg4 ;
5086 int temp3 ;
5087
5088 SWIG_check_num_args("plgradient",3,3)
5089 if(!lua_isnumber(L,3)) SWIG_fail_arg("plgradient",3,"PLFLT");
5090 {
5091 int temp;
5092 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5093 if ( !arg2 )
5094 SWIG_fail;
5095 arg1 = Alen = temp;
5096 }
5097 {
5098 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
5099 if ( !arg3 )
5100 SWIG_fail;
5101 if ( temp3 != Alen )
5102 {
5103 lua_pushfstring( L, "Tables must be of same length." );
5104 SWIG_fail;
5105 }
5106 }
5107 arg4 = (PLFLT)lua_tonumber(L, 3);
5108 plgradient(arg1,(double const *)arg2,(double const *)arg3,arg4);
5109
5110 {
5111 LUA_FREE_ARRAY( arg2 );
5112 }
5113 {
5114 LUA_FREE_ARRAY( arg3 );
5115 }
5116 return SWIG_arg;
5117
5118 fail: SWIGUNUSED;
5119 {
5120 LUA_FREE_ARRAY( arg2 );
5121 }
5122 {
5123 LUA_FREE_ARRAY( arg3 );
5124 }
5125 lua_error(L);
5126 return 0;
5127}
5128
5129
5130static int _wrap_flush(lua_State* L) {
5131 int SWIG_arg = 0;
5132
5133 SWIG_check_num_args("plflush",0,0)
5134 plflush();
5135
5136 return SWIG_arg;
5137
5138 fail: SWIGUNUSED;
5139 lua_error(L);
5140 return 0;
5141}
5142
5143
5144static int _wrap_font(lua_State* L) {
5145 int SWIG_arg = 0;
5146 PLINT arg1 ;
5147
5148 SWIG_check_num_args("plfont",1,1)
5149 if(!lua_isnumber(L,1)) SWIG_fail_arg("plfont",1,"PLINT");
5150 arg1 = (PLINT)lua_tonumber(L, 1);
5151 plfont(arg1);
5152
5153 return SWIG_arg;
5154
5155 fail: SWIGUNUSED;
5156 lua_error(L);
5157 return 0;
5158}
5159
5160
5161static int _wrap_fontld(lua_State* L) {
5162 int SWIG_arg = 0;
5163 PLINT arg1 ;
5164
5165 SWIG_check_num_args("plfontld",1,1)
5166 if(!lua_isnumber(L,1)) SWIG_fail_arg("plfontld",1,"PLINT");
5167 arg1 = (PLINT)lua_tonumber(L, 1);
5168 plfontld(arg1);
5169
5170 return SWIG_arg;
5171
5172 fail: SWIGUNUSED;
5173 lua_error(L);
5174 return 0;
5175}
5176
5177
5178static int _wrap_gchr(lua_State* L) {
5179 int SWIG_arg = 0;
5180 PLFLT *arg1 = (PLFLT *) 0 ;
5181 PLFLT *arg2 = (PLFLT *) 0 ;
5182 PLFLT temp1 ;
5183 PLFLT temp2 ;
5184
5185 arg1 = &temp1;
5186 arg2 = &temp2;
5187 SWIG_check_num_args("plgchr",0,0)
5188 plgchr(arg1,arg2);
5189
5190 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5191 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5192 return SWIG_arg;
5193
5194 fail: SWIGUNUSED;
5195 lua_error(L);
5196 return 0;
5197}
5198
5199
5200static int _wrap_gcol0(lua_State* L) {
5201 int SWIG_arg = 0;
5202 PLINT arg1 ;
5203 PLINT *arg2 = (PLINT *) 0 ;
5204 PLINT *arg3 = (PLINT *) 0 ;
5205 PLINT *arg4 = (PLINT *) 0 ;
5206 PLINT temp2 ;
5207 PLINT temp3 ;
5208 PLINT temp4 ;
5209
5210 arg2 = &temp2;
5211 arg3 = &temp3;
5212 arg4 = &temp4;
5213 SWIG_check_num_args("plgcol0",1,1)
5214 if(!lua_isnumber(L,1)) SWIG_fail_arg("plgcol0",1,"PLINT");
5215 arg1 = (PLINT)lua_tonumber(L, 1);
5216 plgcol0(arg1,arg2,arg3,arg4);
5217
5218 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5219 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5220 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5221 return SWIG_arg;
5222
5223 fail: SWIGUNUSED;
5224 lua_error(L);
5225 return 0;
5226}
5227
5228
5229static int _wrap_gcol0a(lua_State* L) {
5230 int SWIG_arg = 0;
5231 PLINT arg1 ;
5232 PLINT *arg2 = (PLINT *) 0 ;
5233 PLINT *arg3 = (PLINT *) 0 ;
5234 PLINT *arg4 = (PLINT *) 0 ;
5235 PLFLT *arg5 = (PLFLT *) 0 ;
5236 PLINT temp2 ;
5237 PLINT temp3 ;
5238 PLINT temp4 ;
5239 PLFLT temp5 ;
5240
5241 arg2 = &temp2;
5242 arg3 = &temp3;
5243 arg4 = &temp4;
5244 arg5 = &temp5;
5245 SWIG_check_num_args("plgcol0a",1,1)
5246 if(!lua_isnumber(L,1)) SWIG_fail_arg("plgcol0a",1,"PLINT");
5247 arg1 = (PLINT)lua_tonumber(L, 1);
5248 plgcol0a(arg1,arg2,arg3,arg4,arg5);
5249
5250 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5251 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5252 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5253 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
5254 return SWIG_arg;
5255
5256 fail: SWIGUNUSED;
5257 lua_error(L);
5258 return 0;
5259}
5260
5261
5262static int _wrap_gcolbg(lua_State* L) {
5263 int SWIG_arg = 0;
5264 PLINT *arg1 = (PLINT *) 0 ;
5265 PLINT *arg2 = (PLINT *) 0 ;
5266 PLINT *arg3 = (PLINT *) 0 ;
5267 PLINT temp1 ;
5268 PLINT temp2 ;
5269 PLINT temp3 ;
5270
5271 arg1 = &temp1;
5272 arg2 = &temp2;
5273 arg3 = &temp3;
5274 SWIG_check_num_args("plgcolbg",0,0)
5275 plgcolbg(arg1,arg2,arg3);
5276
5277 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5278 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5279 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5280 return SWIG_arg;
5281
5282 fail: SWIGUNUSED;
5283 lua_error(L);
5284 return 0;
5285}
5286
5287
5288static int _wrap_gcolbga(lua_State* L) {
5289 int SWIG_arg = 0;
5290 PLINT *arg1 = (PLINT *) 0 ;
5291 PLINT *arg2 = (PLINT *) 0 ;
5292 PLINT *arg3 = (PLINT *) 0 ;
5293 PLFLT *arg4 = (PLFLT *) 0 ;
5294 PLINT temp1 ;
5295 PLINT temp2 ;
5296 PLINT temp3 ;
5297 PLFLT temp4 ;
5298
5299 arg1 = &temp1;
5300 arg2 = &temp2;
5301 arg3 = &temp3;
5302 arg4 = &temp4;
5303 SWIG_check_num_args("plgcolbga",0,0)
5304 plgcolbga(arg1,arg2,arg3,arg4);
5305
5306 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5307 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5308 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5309 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5310 return SWIG_arg;
5311
5312 fail: SWIGUNUSED;
5313 lua_error(L);
5314 return 0;
5315}
5316
5317
5318static int _wrap_gcompression(lua_State* L) {
5319 int SWIG_arg = 0;
5320 PLINT *arg1 = (PLINT *) 0 ;
5321 PLINT temp1 ;
5322
5323 arg1 = &temp1;
5324 SWIG_check_num_args("plgcompression",0,0)
5325 plgcompression(arg1);
5326
5327 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5328 return SWIG_arg;
5329
5330 fail: SWIGUNUSED;
5331 lua_error(L);
5332 return 0;
5333}
5334
5335
5336static int _wrap_gdev(lua_State* L) {
5337 int SWIG_arg = 0;
5338 char *arg1 = (char *) 0 ;
5339 char buff1[1000] ;
5340
5341 {
5342 arg1 = buff1;
5343 }
5344 SWIG_check_num_args("plgdev",0,0)
5345 plgdev(arg1);
5346
5347 {
5348 lua_pushstring( L, arg1 );
5349 SWIG_arg++;
5350 }
5351 return SWIG_arg;
5352
5353 fail: SWIGUNUSED;
5354 lua_error(L);
5355 return 0;
5356}
5357
5358
5359static int _wrap_gdidev(lua_State* L) {
5360 int SWIG_arg = 0;
5361 PLFLT *arg1 = (PLFLT *) 0 ;
5362 PLFLT *arg2 = (PLFLT *) 0 ;
5363 PLFLT *arg3 = (PLFLT *) 0 ;
5364 PLFLT *arg4 = (PLFLT *) 0 ;
5365 PLFLT temp1 ;
5366 PLFLT temp2 ;
5367 PLFLT temp3 ;
5368 PLFLT temp4 ;
5369
5370 arg1 = &temp1;
5371 arg2 = &temp2;
5372 arg3 = &temp3;
5373 arg4 = &temp4;
5374 SWIG_check_num_args("plgdidev",0,0)
5375 plgdidev(arg1,arg2,arg3,arg4);
5376
5377 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5378 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5379 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5380 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5381 return SWIG_arg;
5382
5383 fail: SWIGUNUSED;
5384 lua_error(L);
5385 return 0;
5386}
5387
5388
5389static int _wrap_gdiori(lua_State* L) {
5390 int SWIG_arg = 0;
5391 PLFLT *arg1 = (PLFLT *) 0 ;
5392 PLFLT temp1 ;
5393
5394 arg1 = &temp1;
5395 SWIG_check_num_args("plgdiori",0,0)
5396 plgdiori(arg1);
5397
5398 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5399 return SWIG_arg;
5400
5401 fail: SWIGUNUSED;
5402 lua_error(L);
5403 return 0;
5404}
5405
5406
5407static int _wrap_gdiplt(lua_State* L) {
5408 int SWIG_arg = 0;
5409 PLFLT *arg1 = (PLFLT *) 0 ;
5410 PLFLT *arg2 = (PLFLT *) 0 ;
5411 PLFLT *arg3 = (PLFLT *) 0 ;
5412 PLFLT *arg4 = (PLFLT *) 0 ;
5413 PLFLT temp1 ;
5414 PLFLT temp2 ;
5415 PLFLT temp3 ;
5416 PLFLT temp4 ;
5417
5418 arg1 = &temp1;
5419 arg2 = &temp2;
5420 arg3 = &temp3;
5421 arg4 = &temp4;
5422 SWIG_check_num_args("plgdiplt",0,0)
5423 plgdiplt(arg1,arg2,arg3,arg4);
5424
5425 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5426 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5427 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5428 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5429 return SWIG_arg;
5430
5431 fail: SWIGUNUSED;
5432 lua_error(L);
5433 return 0;
5434}
5435
5436
5437static int _wrap_gfam(lua_State* L) {
5438 int SWIG_arg = 0;
5439 PLINT *arg1 = (PLINT *) 0 ;
5440 PLINT *arg2 = (PLINT *) 0 ;
5441 PLINT *arg3 = (PLINT *) 0 ;
5442 PLINT temp1 ;
5443 PLINT temp2 ;
5444 PLINT temp3 ;
5445
5446 arg1 = &temp1;
5447 arg2 = &temp2;
5448 arg3 = &temp3;
5449 SWIG_check_num_args("plgfam",0,0)
5450 plgfam(arg1,arg2,arg3);
5451
5452 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5453 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5454 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5455 return SWIG_arg;
5456
5457 fail: SWIGUNUSED;
5458 lua_error(L);
5459 return 0;
5460}
5461
5462
5463static int _wrap_gfci(lua_State* L) {
5464 int SWIG_arg = 0;
5465 PLUNICODE *arg1 = (PLUNICODE *) 0 ;
5466 PLUNICODE temp1 ;
5467
5468 arg1 = &temp1;
5469 SWIG_check_num_args("plgfci",0,0)
5470 plgfci(arg1);
5471
5472 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5473 return SWIG_arg;
5474
5475 fail: SWIGUNUSED;
5476 lua_error(L);
5477 return 0;
5478}
5479
5480
5481static int _wrap_gfnam(lua_State* L) {
5482 int SWIG_arg = 0;
5483 char *arg1 = (char *) 0 ;
5484 char buff1[1000] ;
5485
5486 {
5487 arg1 = buff1;
5488 }
5489 SWIG_check_num_args("plgfnam",0,0)
5490 plgfnam(arg1);
5491
5492 {
5493 lua_pushstring( L, arg1 );
5494 SWIG_arg++;
5495 }
5496 return SWIG_arg;
5497
5498 fail: SWIGUNUSED;
5499 lua_error(L);
5500 return 0;
5501}
5502
5503
5504static int _wrap_gfont(lua_State* L) {
5505 int SWIG_arg = 0;
5506 PLINT *arg1 = (PLINT *) 0 ;
5507 PLINT *arg2 = (PLINT *) 0 ;
5508 PLINT *arg3 = (PLINT *) 0 ;
5509 PLINT temp1 ;
5510 PLINT temp2 ;
5511 PLINT temp3 ;
5512
5513 arg1 = &temp1;
5514 arg2 = &temp2;
5515 arg3 = &temp3;
5516 SWIG_check_num_args("plgfont",0,0)
5517 plgfont(arg1,arg2,arg3);
5518
5519 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5520 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5521 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5522 return SWIG_arg;
5523
5524 fail: SWIGUNUSED;
5525 lua_error(L);
5526 return 0;
5527}
5528
5529
5530static int _wrap_glevel(lua_State* L) {
5531 int SWIG_arg = 0;
5532 PLINT *arg1 = (PLINT *) 0 ;
5533 PLINT temp1 ;
5534
5535 arg1 = &temp1;
5536 SWIG_check_num_args("plglevel",0,0)
5537 plglevel(arg1);
5538
5539 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5540 return SWIG_arg;
5541
5542 fail: SWIGUNUSED;
5543 lua_error(L);
5544 return 0;
5545}
5546
5547
5548static int _wrap_gpage(lua_State* L) {
5549 int SWIG_arg = 0;
5550 PLFLT *arg1 = (PLFLT *) 0 ;
5551 PLFLT *arg2 = (PLFLT *) 0 ;
5552 PLINT *arg3 = (PLINT *) 0 ;
5553 PLINT *arg4 = (PLINT *) 0 ;
5554 PLINT *arg5 = (PLINT *) 0 ;
5555 PLINT *arg6 = (PLINT *) 0 ;
5556 PLFLT temp1 ;
5557 PLFLT temp2 ;
5558 PLINT temp3 ;
5559 PLINT temp4 ;
5560 PLINT temp5 ;
5561 PLINT temp6 ;
5562
5563 arg1 = &temp1;
5564 arg2 = &temp2;
5565 arg3 = &temp3;
5566 arg4 = &temp4;
5567 arg5 = &temp5;
5568 arg6 = &temp6;
5569 SWIG_check_num_args("plgpage",0,0)
5570 plgpage(arg1,arg2,arg3,arg4,arg5,arg6);
5571
5572 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5573 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5574 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5575 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5576 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
5577 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
5578 return SWIG_arg;
5579
5580 fail: SWIGUNUSED;
5581 lua_error(L);
5582 return 0;
5583}
5584
5585
5586static int _wrap_gra(lua_State* L) {
5587 int SWIG_arg = 0;
5588
5589 SWIG_check_num_args("plgra",0,0)
5590 plgra();
5591
5592 return SWIG_arg;
5593
5594 fail: SWIGUNUSED;
5595 lua_error(L);
5596 return 0;
5597}
5598
5599
5600static int _wrap_griddata(lua_State* L) {
5601 int SWIG_arg = 0;
5602 PLFLT *arg1 = (PLFLT *) 0 ;
5603 PLFLT *arg2 = (PLFLT *) 0 ;
5604 PLFLT *arg3 = (PLFLT *) 0 ;
5605 PLINT arg4 ;
5606 PLFLT *arg5 = (PLFLT *) 0 ;
5607 PLINT arg6 ;
5608 PLFLT *arg7 = (PLFLT *) 0 ;
5609 PLINT arg8 ;
5610 PLFLT **arg9 = (PLFLT **) 0 ;
5611 PLINT arg10 ;
5612 PLFLT arg11 ;
5613 int temp2 ;
5614
5615 SWIG_check_num_args("plgriddata",7,7)
5616 if(!lua_isnumber(L,6)) SWIG_fail_arg("plgriddata",6,"PLINT");
5617 if(!lua_isnumber(L,7)) SWIG_fail_arg("plgriddata",7,"PLFLT");
5618 {
5619 int temp;
5620 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5621 if ( !arg1 )
5622 SWIG_fail;
5623 Alen = temp;
5624 }
5625 {
5626 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp2 );
5627 if ( !arg2 )
5628 SWIG_fail;
5629 if ( temp2 != Alen )
5630 {
5631 lua_pushfstring( L, "Tables must be of same length." );
5632 SWIG_fail;
5633 }
5634 }
5635 {
5636 int temp;
5637 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp );
5638 if ( !arg3 )
5639 SWIG_fail;
5640 if ( temp != Alen )
5641 {
5642 lua_pushfstring( L, "Tables must be of same length." );
5643 SWIG_fail;
5644 }
5645 arg4 = temp;
5646 }
5647 {
5648 int temp;
5649 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
5650 if ( !arg5 )
5651 SWIG_fail;
5652 arg6 = Xlen = temp;
5653 }
5654 {
5655 int temp, i;
5656
5657 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
5658 if ( !arg7 )
5659 SWIG_fail;
5660 arg8 = Ylen = temp;
5661
5662 arg9 = LUA_ALLOC_ARRAY( PLFLT *, Xlen );
5663 if ( !arg9 )
5664 SWIG_fail;
5665 for ( i = 0; i < Xlen; i++ )
5666 arg9[i] = NULL;
5667
5668 for ( i = 0; i < Xlen; i++ )
5669 {
5670 arg9[i] = LUA_ALLOC_ARRAY( PLFLT, Ylen );
5671 if ( !arg9[i] )
5672 SWIG_fail;
5673 }
5674 }
5675 arg10 = (PLINT)lua_tonumber(L, 6);
5676 arg11 = (PLFLT)lua_tonumber(L, 7);
5677 plgriddata((double const *)arg1,(double const *)arg2,(double const *)arg3,arg4,(double const *)arg5,arg6,(double const *)arg7,arg8,arg9,arg10,arg11);
5678
5679 {
5680 int i;
5681
5682 if ( arg9 )
5683 {
5684 lua_newtable( L );
5685 for ( i = 0; i < Xlen; i++ )
5686 {
5687 SWIG_write_double_num_array( L, arg9[i], Ylen );
5688 lua_rawseti( L, -2, i + 1 ); // -1 is the inner table, -2 is the outer table
5689 }
5690 SWIG_arg++;
5691 }
5692 }
5693 {
5694 LUA_FREE_ARRAY( arg1 );
5695 }
5696 {
5697 LUA_FREE_ARRAY( arg2 );
5698 }
5699 {
5700 LUA_FREE_ARRAY( arg3 );
5701 }
5702 {
5703 LUA_FREE_ARRAY( arg5 );
5704 }
5705 {
5706 int i;
5707
5708 LUA_FREE_ARRAY( arg7 );
5709
5710 if ( arg9 )
5711 {
5712 for ( i = 0; i < Xlen; i++ )
5713 LUA_FREE_ARRAY( arg9[i] );
5714 LUA_FREE_ARRAY( arg9 );
5715 }
5716 }
5717 return SWIG_arg;
5718
5719 fail: SWIGUNUSED;
5720 {
5721 LUA_FREE_ARRAY( arg1 );
5722 }
5723 {
5724 LUA_FREE_ARRAY( arg2 );
5725 }
5726 {
5727 LUA_FREE_ARRAY( arg3 );
5728 }
5729 {
5730 LUA_FREE_ARRAY( arg5 );
5731 }
5732 {
5733 int i;
5734
5735 LUA_FREE_ARRAY( arg7 );
5736
5737 if ( arg9 )
5738 {
5739 for ( i = 0; i < Xlen; i++ )
5740 LUA_FREE_ARRAY( arg9[i] );
5741 LUA_FREE_ARRAY( arg9 );
5742 }
5743 }
5744 lua_error(L);
5745 return 0;
5746}
5747
5748
5749static int _wrap_gspa(lua_State* L) {
5750 int SWIG_arg = 0;
5751 PLFLT *arg1 = (PLFLT *) 0 ;
5752 PLFLT *arg2 = (PLFLT *) 0 ;
5753 PLFLT *arg3 = (PLFLT *) 0 ;
5754 PLFLT *arg4 = (PLFLT *) 0 ;
5755 PLFLT temp1 ;
5756 PLFLT temp2 ;
5757 PLFLT temp3 ;
5758 PLFLT temp4 ;
5759
5760 arg1 = &temp1;
5761 arg2 = &temp2;
5762 arg3 = &temp3;
5763 arg4 = &temp4;
5764 SWIG_check_num_args("plgspa",0,0)
5765 plgspa(arg1,arg2,arg3,arg4);
5766
5767 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5768 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5769 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5770 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5771 return SWIG_arg;
5772
5773 fail: SWIGUNUSED;
5774 lua_error(L);
5775 return 0;
5776}
5777
5778
5779static int _wrap_gstrm(lua_State* L) {
5780 int SWIG_arg = 0;
5781 PLINT *arg1 = (PLINT *) 0 ;
5782 PLINT temp1 ;
5783
5784 arg1 = &temp1;
5785 SWIG_check_num_args("plgstrm",0,0)
5786 plgstrm(arg1);
5787
5788 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5789 return SWIG_arg;
5790
5791 fail: SWIGUNUSED;
5792 lua_error(L);
5793 return 0;
5794}
5795
5796
5797static int _wrap_gver(lua_State* L) {
5798 int SWIG_arg = 0;
5799 char *arg1 = (char *) 0 ;
5800 char buff1[1000] ;
5801
5802 {
5803 arg1 = buff1;
5804 }
5805 SWIG_check_num_args("plgver",0,0)
5806 plgver(arg1);
5807
5808 {
5809 lua_pushstring( L, arg1 );
5810 SWIG_arg++;
5811 }
5812 return SWIG_arg;
5813
5814 fail: SWIGUNUSED;
5815 lua_error(L);
5816 return 0;
5817}
5818
5819
5820static int _wrap_gvpd(lua_State* L) {
5821 int SWIG_arg = 0;
5822 PLFLT *arg1 = (PLFLT *) 0 ;
5823 PLFLT *arg2 = (PLFLT *) 0 ;
5824 PLFLT *arg3 = (PLFLT *) 0 ;
5825 PLFLT *arg4 = (PLFLT *) 0 ;
5826 PLFLT temp1 ;
5827 PLFLT temp2 ;
5828 PLFLT temp3 ;
5829 PLFLT temp4 ;
5830
5831 arg1 = &temp1;
5832 arg2 = &temp2;
5833 arg3 = &temp3;
5834 arg4 = &temp4;
5835 SWIG_check_num_args("plgvpd",0,0)
5836 plgvpd(arg1,arg2,arg3,arg4);
5837
5838 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5839 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5840 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5841 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5842 return SWIG_arg;
5843
5844 fail: SWIGUNUSED;
5845 lua_error(L);
5846 return 0;
5847}
5848
5849
5850static int _wrap_gvpw(lua_State* L) {
5851 int SWIG_arg = 0;
5852 PLFLT *arg1 = (PLFLT *) 0 ;
5853 PLFLT *arg2 = (PLFLT *) 0 ;
5854 PLFLT *arg3 = (PLFLT *) 0 ;
5855 PLFLT *arg4 = (PLFLT *) 0 ;
5856 PLFLT temp1 ;
5857 PLFLT temp2 ;
5858 PLFLT temp3 ;
5859 PLFLT temp4 ;
5860
5861 arg1 = &temp1;
5862 arg2 = &temp2;
5863 arg3 = &temp3;
5864 arg4 = &temp4;
5865 SWIG_check_num_args("plgvpw",0,0)
5866 plgvpw(arg1,arg2,arg3,arg4);
5867
5868 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5869 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5870 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5871 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5872 return SWIG_arg;
5873
5874 fail: SWIGUNUSED;
5875 lua_error(L);
5876 return 0;
5877}
5878
5879
5880static int _wrap_gxax(lua_State* L) {
5881 int SWIG_arg = 0;
5882 PLINT *arg1 = (PLINT *) 0 ;
5883 PLINT *arg2 = (PLINT *) 0 ;
5884 PLINT temp1 ;
5885 PLINT temp2 ;
5886
5887 arg1 = &temp1;
5888 arg2 = &temp2;
5889 SWIG_check_num_args("plgxax",0,0)
5890 plgxax(arg1,arg2);
5891
5892 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5893 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5894 return SWIG_arg;
5895
5896 fail: SWIGUNUSED;
5897 lua_error(L);
5898 return 0;
5899}
5900
5901
5902static int _wrap_gyax(lua_State* L) {
5903 int SWIG_arg = 0;
5904 PLINT *arg1 = (PLINT *) 0 ;
5905 PLINT *arg2 = (PLINT *) 0 ;
5906 PLINT temp1 ;
5907 PLINT temp2 ;
5908
5909 arg1 = &temp1;
5910 arg2 = &temp2;
5911 SWIG_check_num_args("plgyax",0,0)
5912 plgyax(arg1,arg2);
5913
5914 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5915 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5916 return SWIG_arg;
5917
5918 fail: SWIGUNUSED;
5919 lua_error(L);
5920 return 0;
5921}
5922
5923
5924static int _wrap_gzax(lua_State* L) {
5925 int SWIG_arg = 0;
5926 PLINT *arg1 = (PLINT *) 0 ;
5927 PLINT *arg2 = (PLINT *) 0 ;
5928 PLINT temp1 ;
5929 PLINT temp2 ;
5930
5931 arg1 = &temp1;
5932 arg2 = &temp2;
5933 SWIG_check_num_args("plgzax",0,0)
5934 plgzax(arg1,arg2);
5935
5936 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5937 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5938 return SWIG_arg;
5939
5940 fail: SWIGUNUSED;
5941 lua_error(L);
5942 return 0;
5943}
5944
5945
5946static int _wrap_hist(lua_State* L) {
5947 int SWIG_arg = 0;
5948 PLINT arg1 ;
5949 PLFLT *arg2 = (PLFLT *) 0 ;
5950 PLFLT arg3 ;
5951 PLFLT arg4 ;
5952 PLINT arg5 ;
5953 PLINT arg6 ;
5954
5955 SWIG_check_num_args("plhist",5,5)
5956 if(!lua_isnumber(L,2)) SWIG_fail_arg("plhist",2,"PLFLT");
5957 if(!lua_isnumber(L,3)) SWIG_fail_arg("plhist",3,"PLFLT");
5958 if(!lua_isnumber(L,4)) SWIG_fail_arg("plhist",4,"PLINT");
5959 if(!lua_isnumber(L,5)) SWIG_fail_arg("plhist",5,"PLINT");
5960 {
5961 int temp;
5962 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5963 if ( !arg2 )
5964 SWIG_fail;
5965 arg1 = Alen = temp;
5966 }
5967 arg3 = (PLFLT)lua_tonumber(L, 2);
5968 arg4 = (PLFLT)lua_tonumber(L, 3);
5969 arg5 = (PLINT)lua_tonumber(L, 4);
5970 arg6 = (PLINT)lua_tonumber(L, 5);
5971 plhist(arg1,(double const *)arg2,arg3,arg4,arg5,arg6);
5972
5973 {
5974 LUA_FREE_ARRAY( arg2 );
5975 }
5976 return SWIG_arg;
5977
5978 fail: SWIGUNUSED;
5979 {
5980 LUA_FREE_ARRAY( arg2 );
5981 }
5982 lua_error(L);
5983 return 0;
5984}
5985
5986
5987static int _wrap_hlsrgb(lua_State* L) {
5988 int SWIG_arg = 0;
5989 PLFLT arg1 ;
5990 PLFLT arg2 ;
5991 PLFLT arg3 ;
5992 PLFLT *arg4 = (PLFLT *) 0 ;
5993 PLFLT *arg5 = (PLFLT *) 0 ;
5994 PLFLT *arg6 = (PLFLT *) 0 ;
5995 PLFLT temp4 ;
5996 PLFLT temp5 ;
5997 PLFLT temp6 ;
5998
5999 arg4 = &temp4;
6000 arg5 = &temp5;
6001 arg6 = &temp6;
6002 SWIG_check_num_args("plhlsrgb",3,3)
6003 if(!lua_isnumber(L,1)) SWIG_fail_arg("plhlsrgb",1,"PLFLT");
6004 if(!lua_isnumber(L,2)) SWIG_fail_arg("plhlsrgb",2,"PLFLT");
6005 if(!lua_isnumber(L,3)) SWIG_fail_arg("plhlsrgb",3,"PLFLT");
6006 arg1 = (PLFLT)lua_tonumber(L, 1);
6007 arg2 = (PLFLT)lua_tonumber(L, 2);
6008 arg3 = (PLFLT)lua_tonumber(L, 3);
6009 plhlsrgb(arg1,arg2,arg3,arg4,arg5,arg6);
6010
6011 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
6012 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
6013 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
6014 return SWIG_arg;
6015
6016 fail: SWIGUNUSED;
6017 lua_error(L);
6018 return 0;
6019}
6020
6021
6022static int _wrap_init(lua_State* L) {
6023 int SWIG_arg = 0;
6024
6025 SWIG_check_num_args("plinit",0,0)
6026 plinit();
6027
6028 return SWIG_arg;
6029
6030 fail: SWIGUNUSED;
6031 lua_error(L);
6032 return 0;
6033}
6034
6035
6036static int _wrap_join(lua_State* L) {
6037 int SWIG_arg = 0;
6038 PLFLT arg1 ;
6039 PLFLT arg2 ;
6040 PLFLT arg3 ;
6041 PLFLT arg4 ;
6042
6043 SWIG_check_num_args("pljoin",4,4)
6044 if(!lua_isnumber(L,1)) SWIG_fail_arg("pljoin",1,"PLFLT");
6045 if(!lua_isnumber(L,2)) SWIG_fail_arg("pljoin",2,"PLFLT");
6046 if(!lua_isnumber(L,3)) SWIG_fail_arg("pljoin",3,"PLFLT");
6047 if(!lua_isnumber(L,4)) SWIG_fail_arg("pljoin",4,"PLFLT");
6048 arg1 = (PLFLT)lua_tonumber(L, 1);
6049 arg2 = (PLFLT)lua_tonumber(L, 2);
6050 arg3 = (PLFLT)lua_tonumber(L, 3);
6051 arg4 = (PLFLT)lua_tonumber(L, 4);
6052 pljoin(arg1,arg2,arg3,arg4);
6053
6054 return SWIG_arg;
6055
6056 fail: SWIGUNUSED;
6057 lua_error(L);
6058 return 0;
6059}
6060
6061
6062static int _wrap_lab(lua_State* L) {
6063 int SWIG_arg = 0;
6064 char *arg1 = (char *) 0 ;
6065 char *arg2 = (char *) 0 ;
6066 char *arg3 = (char *) 0 ;
6067
6068 SWIG_check_num_args("pllab",3,3)
6069 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("pllab",1,"char const *");
6070 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("pllab",2,"char const *");
6071 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("pllab",3,"char const *");
6072 arg1 = (char *)lua_tostring(L, 1);
6073 arg2 = (char *)lua_tostring(L, 2);
6074 arg3 = (char *)lua_tostring(L, 3);
6075 pllab((char const *)arg1,(char const *)arg2,(char const *)arg3);
6076
6077 return SWIG_arg;
6078
6079 fail: SWIGUNUSED;
6080 lua_error(L);
6081 return 0;
6082}
6083
6084
6085static int _wrap_legend(lua_State* L) {
6086 int SWIG_arg = 0;
6087 PLFLT *arg1 = (PLFLT *) 0 ;
6088 PLFLT *arg2 = (PLFLT *) 0 ;
6089 PLINT arg3 ;
6090 PLINT arg4 ;
6091 PLFLT arg5 ;
6092 PLFLT arg6 ;
6093 PLFLT arg7 ;
6094 PLINT arg8 ;
6095 PLINT arg9 ;
6096 PLINT arg10 ;
6097 PLINT arg11 ;
6098 PLINT arg12 ;
6099 PLINT arg13 ;
6100 PLINT *arg14 = (PLINT *) 0 ;
6101 PLFLT arg15 ;
6102 PLFLT arg16 ;
6103 PLFLT arg17 ;
6104 PLFLT arg18 ;
6105 PLINT *arg19 = (PLINT *) 0 ;
6106 char **arg20 = (char **) 0 ;
6107 PLINT *arg21 = (PLINT *) 0 ;
6108 PLINT *arg22 = (PLINT *) 0 ;
6109 PLFLT *arg23 = (PLFLT *) 0 ;
6110 PLFLT *arg24 = (PLFLT *) 0 ;
6111 PLINT *arg25 = (PLINT *) 0 ;
6112 PLINT *arg26 = (PLINT *) 0 ;
6113 PLFLT *arg27 = (PLFLT *) 0 ;
6114 PLINT *arg28 = (PLINT *) 0 ;
6115 PLFLT *arg29 = (PLFLT *) 0 ;
6116 PLINT *arg30 = (PLINT *) 0 ;
6117 char **arg31 = (char **) 0 ;
6118 PLFLT temp1 ;
6119 PLFLT temp2 ;
6120 int temp19 ;
6121 int temp21 ;
6122 int temp22 ;
6123 int temp23 ;
6124 int temp24 ;
6125 int temp25 ;
6126 int temp26 ;
6127 int temp27 ;
6128 int temp28 ;
6129 int temp29 ;
6130 int temp30 ;
6131
6132 {
6133 arg21 = NULL;
6134 }
6135 {
6136 arg22 = NULL;
6137 }
6138 {
6139 arg23 = NULL;
6140 }
6141 {
6142 arg24 = NULL;
6143 }
6144 {
6145 arg25 = NULL;
6146 }
6147 {
6148 arg26 = NULL;
6149 }
6150 {
6151 arg27 = NULL;
6152 }
6153 {
6154 arg28 = NULL;
6155 }
6156 {
6157 arg29 = NULL;
6158 }
6159 {
6160 arg30 = NULL;
6161 }
6162 arg1 = &temp1;
6163 arg2 = &temp2;
6164 SWIG_check_num_args("pllegend",17,28)
6165 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllegend",1,"PLINT");
6166 if(!lua_isnumber(L,2)) SWIG_fail_arg("pllegend",2,"PLINT");
6167 if(!lua_isnumber(L,3)) SWIG_fail_arg("pllegend",3,"PLFLT");
6168 if(!lua_isnumber(L,4)) SWIG_fail_arg("pllegend",4,"PLFLT");
6169 if(!lua_isnumber(L,5)) SWIG_fail_arg("pllegend",5,"PLFLT");
6170 if(!lua_isnumber(L,6)) SWIG_fail_arg("pllegend",6,"PLINT");
6171 if(!lua_isnumber(L,7)) SWIG_fail_arg("pllegend",7,"PLINT");
6172 if(!lua_isnumber(L,8)) SWIG_fail_arg("pllegend",8,"PLINT");
6173 if(!lua_isnumber(L,9)) SWIG_fail_arg("pllegend",9,"PLINT");
6174 if(!lua_isnumber(L,10)) SWIG_fail_arg("pllegend",10,"PLINT");
6175 if(!lua_isnumber(L,12)) SWIG_fail_arg("pllegend",12,"PLFLT");
6176 if(!lua_isnumber(L,13)) SWIG_fail_arg("pllegend",13,"PLFLT");
6177 if(!lua_isnumber(L,14)) SWIG_fail_arg("pllegend",14,"PLFLT");
6178 if(!lua_isnumber(L,15)) SWIG_fail_arg("pllegend",15,"PLFLT");
6179 if(!lua_istable(L,17)) SWIG_fail_arg("pllegend",17,"char const **");
6180 if(lua_gettop(L)>=28 && !lua_istable(L,28)) SWIG_fail_arg("pllegend",28,"char const **");
6181 arg3 = (PLINT)lua_tonumber(L, 1);
6182 arg4 = (PLINT)lua_tonumber(L, 2);
6183 arg5 = (PLFLT)lua_tonumber(L, 3);
6184 arg6 = (PLFLT)lua_tonumber(L, 4);
6185 arg7 = (PLFLT)lua_tonumber(L, 5);
6186 arg8 = (PLINT)lua_tonumber(L, 6);
6187 arg9 = (PLINT)lua_tonumber(L, 7);
6188 arg10 = (PLINT)lua_tonumber(L, 8);
6189 arg11 = (PLINT)lua_tonumber(L, 9);
6190 arg12 = (PLINT)lua_tonumber(L, 10);
6191 {
6192 arg14 = (PLINT *) LUA_get_int_num_array_var( L, 11, &arg13 );
6193 if ( !arg14 )
6194 SWIG_fail;
6195 Alen = arg13;
6196 }
6197 arg15 = (PLFLT)lua_tonumber(L, 12);
6198 arg16 = (PLFLT)lua_tonumber(L, 13);
6199 arg17 = (PLFLT)lua_tonumber(L, 14);
6200 arg18 = (PLFLT)lua_tonumber(L, 15);
6201 {
6202 arg19 = (PLINT *) LUA_get_int_num_array_var( L, 16, &temp19 );
6203 if ( !arg19 )
6204 SWIG_fail;
6205 if ( temp19 != Alen )
6206 {
6207 lua_pushfstring( L, "Tables must be of same length." );
6208 SWIG_fail;
6209 }
6210 }
6211 {
6212 int i;
6213 arg20 = NULL;
6214
6215 if ( SWIG_table_size( L, 17 ) != Alen )
6216 {
6217 lua_pushfstring( L, "Tables must be of same length." );
6218 SWIG_fail;
6219 }
6220 arg20 = malloc( sizeof ( char* ) * Alen );
6221 for ( i = 1; i <= Alen; i++ )
6222 {
6223 lua_rawgeti( L, 17, i );
6224 if ( lua_isstring( L, -1 ) )
6225 {
6226 arg20[i - 1] = (char *) lua_tostring( L, -1 );
6227 }
6228 else
6229 {
6230 lua_pop( L, 1 );
6231 lua_pushfstring( L, "Requires a sequence of strings." );
6232 SWIG_fail;
6233 // arg20 array is freed after 'fail:'
6234 }
6235 lua_pop( L, 1 );
6236 }
6237 }
6238 if(lua_gettop(L)>=18){
6239 {
6240 if ( lua_isnil( L, 18 ) )
6241 {
6242 arg21 = NULL;
6243 }
6244 else
6245 {
6246 arg21 = (PLINT *) LUA_get_int_num_array_var( L, 18, &temp21 );
6247 if ( !arg21 )
6248 SWIG_fail;
6249 if ( temp21 != Alen )
6250 {
6251 lua_pushfstring( L, "Tables must be of same length." );
6252 SWIG_fail;
6253 }
6254 }
6255 }
6256 }
6257 if(lua_gettop(L)>=19){
6258 {
6259 if ( lua_isnil( L, 19 ) )
6260 {
6261 arg22 = NULL;
6262 }
6263 else
6264 {
6265 arg22 = (PLINT *) LUA_get_int_num_array_var( L, 19, &temp22 );
6266 if ( !arg22 )
6267 SWIG_fail;
6268 if ( temp22 != Alen )
6269 {
6270 lua_pushfstring( L, "Tables must be of same length." );
6271 SWIG_fail;
6272 }
6273 }
6274 }
6275 }
6276 if(lua_gettop(L)>=20){
6277 {
6278 if ( lua_isnil( L, 20 ) )
6279 {
6280 arg23 = NULL;
6281 }
6282 else
6283 {
6284 arg23 = (PLFLT *) LUA_get_double_num_array_var( L, 20, &temp23 );
6285 if ( !arg23 )
6286 SWIG_fail;
6287 if ( temp23 != Alen )
6288 {
6289 lua_pushfstring( L, "Tables must be of same length." );
6290 SWIG_fail;
6291 }
6292 }
6293 }
6294 }
6295 if(lua_gettop(L)>=21){
6296 {
6297 if ( lua_isnil( L, 21 ) )
6298 {
6299 arg24 = NULL;
6300 }
6301 else
6302 {
6303 arg24 = (PLFLT *) LUA_get_double_num_array_var( L, 21, &temp24 );
6304 if ( !arg24 )
6305 SWIG_fail;
6306 if ( temp24 != Alen )
6307 {
6308 lua_pushfstring( L, "Tables must be of same length." );
6309 SWIG_fail;
6310 }
6311 }
6312 }
6313 }
6314 if(lua_gettop(L)>=22){
6315 {
6316 if ( lua_isnil( L, 22 ) )
6317 {
6318 arg25 = NULL;
6319 }
6320 else
6321 {
6322 arg25 = (PLINT *) LUA_get_int_num_array_var( L, 22, &temp25 );
6323 if ( !arg25 )
6324 SWIG_fail;
6325 if ( temp25 != Alen )
6326 {
6327 lua_pushfstring( L, "Tables must be of same length." );
6328 SWIG_fail;
6329 }
6330 }
6331 }
6332 }
6333 if(lua_gettop(L)>=23){
6334 {
6335 if ( lua_isnil( L, 23 ) )
6336 {
6337 arg26 = NULL;
6338 }
6339 else
6340 {
6341 arg26 = (PLINT *) LUA_get_int_num_array_var( L, 23, &temp26 );
6342 if ( !arg26 )
6343 SWIG_fail;
6344 if ( temp26 != Alen )
6345 {
6346 lua_pushfstring( L, "Tables must be of same length." );
6347 SWIG_fail;
6348 }
6349 }
6350 }
6351 }
6352 if(lua_gettop(L)>=24){
6353 {
6354 if ( lua_isnil( L, 24 ) )
6355 {
6356 arg27 = NULL;
6357 }
6358 else
6359 {
6360 arg27 = (PLFLT *) LUA_get_double_num_array_var( L, 24, &temp27 );
6361 if ( !arg27 )
6362 SWIG_fail;
6363 if ( temp27 != Alen )
6364 {
6365 lua_pushfstring( L, "Tables must be of same length." );
6366 SWIG_fail;
6367 }
6368 }
6369 }
6370 }
6371 if(lua_gettop(L)>=25){
6372 {
6373 if ( lua_isnil( L, 25 ) )
6374 {
6375 arg28 = NULL;
6376 }
6377 else
6378 {
6379 arg28 = (PLINT *) LUA_get_int_num_array_var( L, 25, &temp28 );
6380 if ( !arg28 )
6381 SWIG_fail;
6382 if ( temp28 != Alen )
6383 {
6384 lua_pushfstring( L, "Tables must be of same length." );
6385 SWIG_fail;
6386 }
6387 }
6388 }
6389 }
6390 if(lua_gettop(L)>=26){
6391 {
6392 if ( lua_isnil( L, 26 ) )
6393 {
6394 arg29 = NULL;
6395 }
6396 else
6397 {
6398 arg29 = (PLFLT *) LUA_get_double_num_array_var( L, 26, &temp29 );
6399 if ( !arg29 )
6400 SWIG_fail;
6401 if ( temp29 != Alen )
6402 {
6403 lua_pushfstring( L, "Tables must be of same length." );
6404 SWIG_fail;
6405 }
6406 }
6407 }
6408 }
6409 if(lua_gettop(L)>=27){
6410 {
6411 if ( lua_isnil( L, 27 ) )
6412 {
6413 arg30 = NULL;
6414 }
6415 else
6416 {
6417 arg30 = (PLINT *) LUA_get_int_num_array_var( L, 27, &temp30 );
6418 if ( !arg30 )
6419 SWIG_fail;
6420 if ( temp30 != Alen )
6421 {
6422 lua_pushfstring( L, "Tables must be of same length." );
6423 SWIG_fail;
6424 }
6425 }
6426 }
6427 }
6428 if(lua_gettop(L)>=28){
6429 {
6430 int i;
6431 arg31 = NULL;
6432
6433 if ( SWIG_table_size( L, 28 ) != Alen )
6434 {
6435 lua_pushfstring( L, "Tables must be of same length." );
6436 SWIG_fail;
6437 }
6438 arg31 = malloc( sizeof ( char* ) * Alen );
6439 for ( i = 1; i <= Alen; i++ )
6440 {
6441 lua_rawgeti( L, 28, i );
6442 if ( lua_isstring( L, -1 ) )
6443 {
6444 arg31[i - 1] = (char *) lua_tostring( L, -1 );
6445 }
6446 else
6447 {
6448 lua_pop( L, 1 );
6449 lua_pushfstring( L, "Requires a sequence of strings." );
6450 SWIG_fail;
6451 // arg31 array is freed after 'fail:'
6452 }
6453 lua_pop( L, 1 );
6454 }
6455 }
6456 }
6457 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);
6458
6459 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6460 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
6461 {
6462 LUA_FREE_ARRAY( arg14 );
6463 }
6464 {
6465 LUA_FREE_ARRAY( arg19 );
6466 }
6467 {
6468 if ( arg20 )
6469 {
6470 free( arg20 ); arg20 = NULL;
6471 }
6472 }
6473 {
6474 LUA_FREE_ARRAY( arg21 );
6475 }
6476 {
6477 LUA_FREE_ARRAY( arg22 );
6478 }
6479 {
6480 LUA_FREE_ARRAY( arg23 );
6481 }
6482 {
6483 LUA_FREE_ARRAY( arg24 );
6484 }
6485 {
6486 LUA_FREE_ARRAY( arg25 );
6487 }
6488 {
6489 LUA_FREE_ARRAY( arg26 );
6490 }
6491 {
6492 LUA_FREE_ARRAY( arg27 );
6493 }
6494 {
6495 LUA_FREE_ARRAY( arg28 );
6496 }
6497 {
6498 LUA_FREE_ARRAY( arg29 );
6499 }
6500 {
6501 LUA_FREE_ARRAY( arg30 );
6502 }
6503 {
6504 if ( arg31 )
6505 {
6506 free( arg31 ); arg31 = NULL;
6507 }
6508 }
6509 return SWIG_arg;
6510
6511 fail: SWIGUNUSED;
6512 {
6513 LUA_FREE_ARRAY( arg14 );
6514 }
6515 {
6516 LUA_FREE_ARRAY( arg19 );
6517 }
6518 {
6519 if ( arg20 )
6520 {
6521 free( arg20 ); arg20 = NULL;
6522 }
6523 }
6524 {
6525 LUA_FREE_ARRAY( arg21 );
6526 }
6527 {
6528 LUA_FREE_ARRAY( arg22 );
6529 }
6530 {
6531 LUA_FREE_ARRAY( arg23 );
6532 }
6533 {
6534 LUA_FREE_ARRAY( arg24 );
6535 }
6536 {
6537 LUA_FREE_ARRAY( arg25 );
6538 }
6539 {
6540 LUA_FREE_ARRAY( arg26 );
6541 }
6542 {
6543 LUA_FREE_ARRAY( arg27 );
6544 }
6545 {
6546 LUA_FREE_ARRAY( arg28 );
6547 }
6548 {
6549 LUA_FREE_ARRAY( arg29 );
6550 }
6551 {
6552 LUA_FREE_ARRAY( arg30 );
6553 }
6554 {
6555 if ( arg31 )
6556 {
6557 free( arg31 ); arg31 = NULL;
6558 }
6559 }
6560 lua_error(L);
6561 return 0;
6562}
6563
6564
6565static int _wrap_colorbar(lua_State* L) {
6566 int SWIG_arg = 0;
6567 PLFLT *arg1 = (PLFLT *) 0 ;
6568 PLFLT *arg2 = (PLFLT *) 0 ;
6569 PLINT arg3 ;
6570 PLINT arg4 ;
6571 PLFLT arg5 ;
6572 PLFLT arg6 ;
6573 PLFLT arg7 ;
6574 PLFLT arg8 ;
6575 PLINT arg9 ;
6576 PLINT arg10 ;
6577 PLINT arg11 ;
6578 PLFLT arg12 ;
6579 PLFLT arg13 ;
6580 PLINT arg14 ;
6581 PLFLT arg15 ;
6582 PLINT arg16 ;
6583 PLINT *arg17 = (PLINT *) 0 ;
6584 char **arg18 = (char **) 0 ;
6585 PLINT arg19 ;
6586 char **arg20 = (char **) 0 ;
6587 PLFLT *arg21 = (PLFLT *) 0 ;
6588 PLINT *arg22 = (PLINT *) 0 ;
6589 PLINT *arg23 = (PLINT *) 0 ;
6590 PLFLT **arg24 = (PLFLT **) 0 ;
6591 PLFLT temp1 ;
6592 PLFLT temp2 ;
6593 int temp21 ;
6594 int temp22 ;
6595 int temp23 ;
6596 int ii24 ;
6597
6598 arg1 = &temp1;
6599 arg2 = &temp2;
6600 SWIG_check_num_args("plcolorbar",20,20)
6601 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcolorbar",1,"PLINT");
6602 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcolorbar",2,"PLINT");
6603 if(!lua_isnumber(L,3)) SWIG_fail_arg("plcolorbar",3,"PLFLT");
6604 if(!lua_isnumber(L,4)) SWIG_fail_arg("plcolorbar",4,"PLFLT");
6605 if(!lua_isnumber(L,5)) SWIG_fail_arg("plcolorbar",5,"PLFLT");
6606 if(!lua_isnumber(L,6)) SWIG_fail_arg("plcolorbar",6,"PLFLT");
6607 if(!lua_isnumber(L,7)) SWIG_fail_arg("plcolorbar",7,"PLINT");
6608 if(!lua_isnumber(L,8)) SWIG_fail_arg("plcolorbar",8,"PLINT");
6609 if(!lua_isnumber(L,9)) SWIG_fail_arg("plcolorbar",9,"PLINT");
6610 if(!lua_isnumber(L,10)) SWIG_fail_arg("plcolorbar",10,"PLFLT");
6611 if(!lua_isnumber(L,11)) SWIG_fail_arg("plcolorbar",11,"PLFLT");
6612 if(!lua_isnumber(L,12)) SWIG_fail_arg("plcolorbar",12,"PLINT");
6613 if(!lua_isnumber(L,13)) SWIG_fail_arg("plcolorbar",13,"PLFLT");
6614 if(!lua_istable(L,15)) SWIG_fail_arg("plcolorbar",15,"char const **");
6615 arg3 = (PLINT)lua_tonumber(L, 1);
6616 arg4 = (PLINT)lua_tonumber(L, 2);
6617 arg5 = (PLFLT)lua_tonumber(L, 3);
6618 arg6 = (PLFLT)lua_tonumber(L, 4);
6619 arg7 = (PLFLT)lua_tonumber(L, 5);
6620 arg8 = (PLFLT)lua_tonumber(L, 6);
6621 arg9 = (PLINT)lua_tonumber(L, 7);
6622 arg10 = (PLINT)lua_tonumber(L, 8);
6623 arg11 = (PLINT)lua_tonumber(L, 9);
6624 arg12 = (PLFLT)lua_tonumber(L, 10);
6625 arg13 = (PLFLT)lua_tonumber(L, 11);
6626 arg14 = (PLINT)lua_tonumber(L, 12);
6627 arg15 = (PLFLT)lua_tonumber(L, 13);
6628 {
6629 arg17 = (PLINT *) LUA_get_int_num_array_var( L, 14, &arg16 );
6630 if ( !arg17 )
6631 SWIG_fail;
6632 Alen = arg16;
6633 }
6634 {
6635 int i;
6636 arg18 = NULL;
6637
6638 if ( SWIG_table_size( L, 15 ) != Alen )
6639 {
6640 lua_pushfstring( L, "Tables must be of same length." );
6641 SWIG_fail;
6642 }
6643 arg18 = malloc( sizeof ( char* ) * Alen );
6644 for ( i = 1; i <= Alen; i++ )
6645 {
6646 lua_rawgeti( L, 15, i );
6647 if ( lua_isstring( L, -1 ) )
6648 {
6649 arg18[i - 1] = (char *) lua_tostring( L, -1 );
6650 }
6651 else
6652 {
6653 lua_pop( L, 1 );
6654 lua_pushfstring( L, "Requires a sequence of strings." );
6655 SWIG_fail;
6656 // arg18 array is freed after 'fail:'
6657 }
6658 lua_pop( L, 1 );
6659 }
6660 }
6661 {
6662 int i;
6663 arg19 = SWIG_table_size( L, 16 );
6664 Alen = arg19;
6665
6666 arg20 = malloc( sizeof ( char* ) * Alen );
6667 for ( i = 1; i <= Alen; i++ )
6668 {
6669 lua_rawgeti( L, 16, i );
6670 if ( lua_isstring( L, -1 ) )
6671 {
6672 arg20[i - 1] = (char *) lua_tostring( L, -1 );
6673 }
6674 else
6675 {
6676 lua_pop( L, 1 );
6677 lua_pushfstring( L, "Requires a sequence of strings." );
6678 SWIG_fail;
6679 }
6680 lua_pop( L, 1 );
6681 }
6682 }
6683 {
6684 arg21 = (PLFLT *) LUA_get_double_num_array_var( L, 17, &temp21 );
6685 if ( !arg21 )
6686 SWIG_fail;
6687 if ( temp21 != Alen )
6688 {
6689 lua_pushfstring( L, "Tables must be of same length." );
6690 SWIG_fail;
6691 }
6692 }
6693 {
6694 arg22 = (PLINT *) LUA_get_int_num_array_var( L, 18, &temp22 );
6695 if ( !arg22 )
6696 SWIG_fail;
6697 if ( temp22 != Alen )
6698 {
6699 lua_pushfstring( L, "Tables must be of same length." );
6700 SWIG_fail;
6701 }
6702 }
6703 {
6704 int i;
6705
6706 arg23 = (PLINT *) LUA_get_int_num_array_var( L, 19, &temp23 );
6707 if ( !arg23 )
6708 SWIG_fail;
6709 if ( temp23 != Alen )
6710 {
6711 lua_pushfstring( L, "Tables must be of same length." );
6712 SWIG_fail;
6713 }
6714
6715 Xlen = temp23;
6716 Ylen = -1;
6717 for ( i = 0; i < Xlen; i++ )
6718 if ( arg23[i] > Ylen )
6719 Ylen = arg23[i];
6720 }
6721 {
6722 int jj;
6723
6724 arg24 = read_double_Matrix( L, 20, &ii24, &jj );
6725 if ( !arg24 )
6726 SWIG_fail;
6727 if ( ( ii24 != Xlen ) || ( jj != Ylen ) )
6728 {
6729 lua_pushfstring( L, "Vectors must match matrix." );
6730 SWIG_fail;
6731 }
6732 }
6733 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);
6734
6735 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6736 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
6737 {
6738 LUA_FREE_ARRAY( arg17 );
6739 }
6740 {
6741 if ( arg18 )
6742 {
6743 free( arg18 ); arg18 = NULL;
6744 }
6745 }
6746 {
6747 if ( arg20 )
6748 {
6749 free( arg20 ); arg20 = NULL;
6750 }
6751 }
6752 {
6753 LUA_FREE_ARRAY( arg21 );
6754 }
6755 {
6756 LUA_FREE_ARRAY( arg22 );
6757 }
6758 {
6759 LUA_FREE_ARRAY( arg23 );
6760 }
6761 {
6762 int i;
6763
6764 if ( arg24 )
6765 {
6766 for ( i = 0; i < ii24; i++ )
6767 LUA_FREE_ARRAY( arg24[i] );
6768 LUA_FREE_ARRAY( arg24 );
6769 }
6770 }
6771 return SWIG_arg;
6772
6773 fail: SWIGUNUSED;
6774 {
6775 LUA_FREE_ARRAY( arg17 );
6776 }
6777 {
6778 if ( arg18 )
6779 {
6780 free( arg18 ); arg18 = NULL;
6781 }
6782 }
6783 {
6784 if ( arg20 )
6785 {
6786 free( arg20 ); arg20 = NULL;
6787 }
6788 }
6789 {
6790 LUA_FREE_ARRAY( arg21 );
6791 }
6792 {
6793 LUA_FREE_ARRAY( arg22 );
6794 }
6795 {
6796 LUA_FREE_ARRAY( arg23 );
6797 }
6798 {
6799 int i;
6800
6801 if ( arg24 )
6802 {
6803 for ( i = 0; i < ii24; i++ )
6804 LUA_FREE_ARRAY( arg24[i] );
6805 LUA_FREE_ARRAY( arg24 );
6806 }
6807 }
6808 lua_error(L);
6809 return 0;
6810}
6811
6812
6813static int _wrap_lightsource(lua_State* L) {
6814 int SWIG_arg = 0;
6815 PLFLT arg1 ;
6816 PLFLT arg2 ;
6817 PLFLT arg3 ;
6818
6819 SWIG_check_num_args("pllightsource",3,3)
6820 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllightsource",1,"PLFLT");
6821 if(!lua_isnumber(L,2)) SWIG_fail_arg("pllightsource",2,"PLFLT");
6822 if(!lua_isnumber(L,3)) SWIG_fail_arg("pllightsource",3,"PLFLT");
6823 arg1 = (PLFLT)lua_tonumber(L, 1);
6824 arg2 = (PLFLT)lua_tonumber(L, 2);
6825 arg3 = (PLFLT)lua_tonumber(L, 3);
6826 pllightsource(arg1,arg2,arg3);
6827
6828 return SWIG_arg;
6829
6830 fail: SWIGUNUSED;
6831 lua_error(L);
6832 return 0;
6833}
6834
6835
6836static int _wrap_line(lua_State* L) {
6837 int SWIG_arg = 0;
6838 PLINT arg1 ;
6839 PLFLT *arg2 = (PLFLT *) 0 ;
6840 PLFLT *arg3 = (PLFLT *) 0 ;
6841 int temp3 ;
6842
6843 SWIG_check_num_args("plline",2,2)
6844 {
6845 int temp;
6846 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6847 if ( !arg2 )
6848 SWIG_fail;
6849 arg1 = Alen = temp;
6850 }
6851 {
6852 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
6853 if ( !arg3 )
6854 SWIG_fail;
6855 if ( temp3 != Alen )
6856 {
6857 lua_pushfstring( L, "Tables must be of same length." );
6858 SWIG_fail;
6859 }
6860 }
6861 plline(arg1,(double const *)arg2,(double const *)arg3);
6862
6863 {
6864 LUA_FREE_ARRAY( arg2 );
6865 }
6866 {
6867 LUA_FREE_ARRAY( arg3 );
6868 }
6869 return SWIG_arg;
6870
6871 fail: SWIGUNUSED;
6872 {
6873 LUA_FREE_ARRAY( arg2 );
6874 }
6875 {
6876 LUA_FREE_ARRAY( arg3 );
6877 }
6878 lua_error(L);
6879 return 0;
6880}
6881
6882
6883static int _wrap_line3(lua_State* L) {
6884 int SWIG_arg = 0;
6885 PLINT arg1 ;
6886 PLFLT *arg2 = (PLFLT *) 0 ;
6887 PLFLT *arg3 = (PLFLT *) 0 ;
6888 PLFLT *arg4 = (PLFLT *) 0 ;
6889 int temp3 ;
6890 int temp4 ;
6891
6892 SWIG_check_num_args("plline3",3,3)
6893 {
6894 int temp;
6895 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6896 if ( !arg2 )
6897 SWIG_fail;
6898 arg1 = Alen = temp;
6899 }
6900 {
6901 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
6902 if ( !arg3 )
6903 SWIG_fail;
6904 if ( temp3 != Alen )
6905 {
6906 lua_pushfstring( L, "Tables must be of same length." );
6907 SWIG_fail;
6908 }
6909 }
6910 {
6911 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
6912 if ( !arg4 )
6913 SWIG_fail;
6914 if ( temp4 != Alen )
6915 {
6916 lua_pushfstring( L, "Tables must be of same length." );
6917 SWIG_fail;
6918 }
6919 }
6920 plline3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
6921
6922 {
6923 LUA_FREE_ARRAY( arg2 );
6924 }
6925 {
6926 LUA_FREE_ARRAY( arg3 );
6927 }
6928 {
6929 LUA_FREE_ARRAY( arg4 );
6930 }
6931 return SWIG_arg;
6932
6933 fail: SWIGUNUSED;
6934 {
6935 LUA_FREE_ARRAY( arg2 );
6936 }
6937 {
6938 LUA_FREE_ARRAY( arg3 );
6939 }
6940 {
6941 LUA_FREE_ARRAY( arg4 );
6942 }
6943 lua_error(L);
6944 return 0;
6945}
6946
6947
6948static int _wrap_lsty(lua_State* L) {
6949 int SWIG_arg = 0;
6950 PLINT arg1 ;
6951
6952 SWIG_check_num_args("pllsty",1,1)
6953 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllsty",1,"PLINT");
6954 arg1 = (PLINT)lua_tonumber(L, 1);
6955 pllsty(arg1);
6956
6957 return SWIG_arg;
6958
6959 fail: SWIGUNUSED;
6960 lua_error(L);
6961 return 0;
6962}
6963
6964
6965static int _wrap_mesh(lua_State* L) {
6966 int SWIG_arg = 0;
6967 PLFLT *arg1 = (PLFLT *) 0 ;
6968 PLFLT *arg2 = (PLFLT *) 0 ;
6969 PLFLT **arg3 = (PLFLT **) 0 ;
6970 PLINT arg4 ;
6971 PLINT arg5 ;
6972 PLINT arg6 ;
6973 int ii3 ;
6974
6975 SWIG_check_num_args("plmesh",4,4)
6976 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmesh",4,"PLINT");
6977 {
6978 int temp;
6979 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6980 if ( !arg1 )
6981 SWIG_fail;
6982 Xlen = temp;
6983 }
6984 {
6985 int temp;
6986 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6987 if ( !arg2 )
6988 SWIG_fail;
6989 Ylen = temp;
6990 }
6991 {
6992 int jj;
6993
6994 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6995 if ( !arg3 )
6996 SWIG_fail;
6997 arg4 = ii3;
6998 arg5 = jj;
6999 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7000 {
7001 lua_pushfstring( L, "Vectors must match matrix." );
7002 SWIG_fail;
7003 }
7004 }
7005 arg6 = (PLINT)lua_tonumber(L, 4);
7006 plmesh((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6);
7007
7008 {
7009 LUA_FREE_ARRAY( arg1 );
7010 }
7011 {
7012 LUA_FREE_ARRAY( arg2 );
7013 }
7014 {
7015 int i;
7016
7017 if ( arg3 )
7018 {
7019 for ( i = 0; i < ii3; i++ )
7020 LUA_FREE_ARRAY( arg3[i] );
7021 LUA_FREE_ARRAY( arg3 );
7022 }
7023 }
7024 return SWIG_arg;
7025
7026 fail: SWIGUNUSED;
7027 {
7028 LUA_FREE_ARRAY( arg1 );
7029 }
7030 {
7031 LUA_FREE_ARRAY( arg2 );
7032 }
7033 {
7034 int i;
7035
7036 if ( arg3 )
7037 {
7038 for ( i = 0; i < ii3; i++ )
7039 LUA_FREE_ARRAY( arg3[i] );
7040 LUA_FREE_ARRAY( arg3 );
7041 }
7042 }
7043 lua_error(L);
7044 return 0;
7045}
7046
7047
7048static int _wrap_meshc(lua_State* L) {
7049 int SWIG_arg = 0;
7050 PLFLT *arg1 = (PLFLT *) 0 ;
7051 PLFLT *arg2 = (PLFLT *) 0 ;
7052 PLFLT **arg3 = (PLFLT **) 0 ;
7053 PLINT arg4 ;
7054 PLINT arg5 ;
7055 PLINT arg6 ;
7056 PLFLT *arg7 = (PLFLT *) 0 ;
7057 PLINT arg8 ;
7058 int ii3 ;
7059
7060 SWIG_check_num_args("plmeshc",5,5)
7061 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmeshc",4,"PLINT");
7062 {
7063 int temp;
7064 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7065 if ( !arg1 )
7066 SWIG_fail;
7067 Xlen = temp;
7068 }
7069 {
7070 int temp;
7071 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7072 if ( !arg2 )
7073 SWIG_fail;
7074 Ylen = temp;
7075 }
7076 {
7077 int jj;
7078
7079 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7080 if ( !arg3 )
7081 SWIG_fail;
7082 arg4 = ii3;
7083 arg5 = jj;
7084 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7085 {
7086 lua_pushfstring( L, "Vectors must match matrix." );
7087 SWIG_fail;
7088 }
7089 }
7090 arg6 = (PLINT)lua_tonumber(L, 4);
7091 {
7092 int temp;
7093 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7094 if ( !arg7 )
7095 SWIG_fail;
7096 arg8 = Alen = temp;
7097 }
7098 plmeshc((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7099
7100 {
7101 LUA_FREE_ARRAY( arg1 );
7102 }
7103 {
7104 LUA_FREE_ARRAY( arg2 );
7105 }
7106 {
7107 int i;
7108
7109 if ( arg3 )
7110 {
7111 for ( i = 0; i < ii3; i++ )
7112 LUA_FREE_ARRAY( arg3[i] );
7113 LUA_FREE_ARRAY( arg3 );
7114 }
7115 }
7116 {
7117 LUA_FREE_ARRAY( arg7 );
7118 }
7119 return SWIG_arg;
7120
7121 fail: SWIGUNUSED;
7122 {
7123 LUA_FREE_ARRAY( arg1 );
7124 }
7125 {
7126 LUA_FREE_ARRAY( arg2 );
7127 }
7128 {
7129 int i;
7130
7131 if ( arg3 )
7132 {
7133 for ( i = 0; i < ii3; i++ )
7134 LUA_FREE_ARRAY( arg3[i] );
7135 LUA_FREE_ARRAY( arg3 );
7136 }
7137 }
7138 {
7139 LUA_FREE_ARRAY( arg7 );
7140 }
7141 lua_error(L);
7142 return 0;
7143}
7144
7145
7146static int _wrap_mkstrm(lua_State* L) {
7147 int SWIG_arg = 0;
7148 PLINT *arg1 = (PLINT *) 0 ;
7149 PLINT temp1 ;
7150
7151 arg1 = &temp1;
7152 SWIG_check_num_args("plmkstrm",0,0)
7153 plmkstrm(arg1);
7154
7155 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
7156 return SWIG_arg;
7157
7158 fail: SWIGUNUSED;
7159 lua_error(L);
7160 return 0;
7161}
7162
7163
7164static int _wrap_mtex(lua_State* L) {
7165 int SWIG_arg = 0;
7166 char *arg1 = (char *) 0 ;
7167 PLFLT arg2 ;
7168 PLFLT arg3 ;
7169 PLFLT arg4 ;
7170 char *arg5 = (char *) 0 ;
7171
7172 SWIG_check_num_args("plmtex",5,5)
7173 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plmtex",1,"char const *");
7174 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmtex",2,"PLFLT");
7175 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmtex",3,"PLFLT");
7176 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmtex",4,"PLFLT");
7177 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plmtex",5,"char const *");
7178 arg1 = (char *)lua_tostring(L, 1);
7179 arg2 = (PLFLT)lua_tonumber(L, 2);
7180 arg3 = (PLFLT)lua_tonumber(L, 3);
7181 arg4 = (PLFLT)lua_tonumber(L, 4);
7182 arg5 = (char *)lua_tostring(L, 5);
7183 plmtex((char const *)arg1,arg2,arg3,arg4,(char const *)arg5);
7184
7185 return SWIG_arg;
7186
7187 fail: SWIGUNUSED;
7188 lua_error(L);
7189 return 0;
7190}
7191
7192
7193static int _wrap_mtex3(lua_State* L) {
7194 int SWIG_arg = 0;
7195 char *arg1 = (char *) 0 ;
7196 PLFLT arg2 ;
7197 PLFLT arg3 ;
7198 PLFLT arg4 ;
7199 char *arg5 = (char *) 0 ;
7200
7201 SWIG_check_num_args("plmtex3",5,5)
7202 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plmtex3",1,"char const *");
7203 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmtex3",2,"PLFLT");
7204 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmtex3",3,"PLFLT");
7205 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmtex3",4,"PLFLT");
7206 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plmtex3",5,"char const *");
7207 arg1 = (char *)lua_tostring(L, 1);
7208 arg2 = (PLFLT)lua_tonumber(L, 2);
7209 arg3 = (PLFLT)lua_tonumber(L, 3);
7210 arg4 = (PLFLT)lua_tonumber(L, 4);
7211 arg5 = (char *)lua_tostring(L, 5);
7212 plmtex3((char const *)arg1,arg2,arg3,arg4,(char const *)arg5);
7213
7214 return SWIG_arg;
7215
7216 fail: SWIGUNUSED;
7217 lua_error(L);
7218 return 0;
7219}
7220
7221
7222static int _wrap_plot3d(lua_State* L) {
7223 int SWIG_arg = 0;
7224 PLFLT *arg1 = (PLFLT *) 0 ;
7225 PLFLT *arg2 = (PLFLT *) 0 ;
7226 PLFLT **arg3 = (PLFLT **) 0 ;
7227 PLINT arg4 ;
7228 PLINT arg5 ;
7229 PLINT arg6 ;
7230 PLBOOL arg7 ;
7231 int ii3 ;
7232
7233 SWIG_check_num_args("plot3d",5,5)
7234 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3d",4,"PLINT");
7235 if(!lua_isnumber(L,5)) SWIG_fail_arg("plot3d",5,"PLBOOL");
7236 {
7237 int temp;
7238 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7239 if ( !arg1 )
7240 SWIG_fail;
7241 Xlen = temp;
7242 }
7243 {
7244 int temp;
7245 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7246 if ( !arg2 )
7247 SWIG_fail;
7248 Ylen = temp;
7249 }
7250 {
7251 int jj;
7252
7253 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7254 if ( !arg3 )
7255 SWIG_fail;
7256 arg4 = ii3;
7257 arg5 = jj;
7258 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7259 {
7260 lua_pushfstring( L, "Vectors must match matrix." );
7261 SWIG_fail;
7262 }
7263 }
7264 arg6 = (PLINT)lua_tonumber(L, 4);
7265 arg7 = (PLBOOL)lua_tonumber(L, 5);
7266 plot3d((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,arg7);
7267
7268 {
7269 LUA_FREE_ARRAY( arg1 );
7270 }
7271 {
7272 LUA_FREE_ARRAY( arg2 );
7273 }
7274 {
7275 int i;
7276
7277 if ( arg3 )
7278 {
7279 for ( i = 0; i < ii3; i++ )
7280 LUA_FREE_ARRAY( arg3[i] );
7281 LUA_FREE_ARRAY( arg3 );
7282 }
7283 }
7284 return SWIG_arg;
7285
7286 fail: SWIGUNUSED;
7287 {
7288 LUA_FREE_ARRAY( arg1 );
7289 }
7290 {
7291 LUA_FREE_ARRAY( arg2 );
7292 }
7293 {
7294 int i;
7295
7296 if ( arg3 )
7297 {
7298 for ( i = 0; i < ii3; i++ )
7299 LUA_FREE_ARRAY( arg3[i] );
7300 LUA_FREE_ARRAY( arg3 );
7301 }
7302 }
7303 lua_error(L);
7304 return 0;
7305}
7306
7307
7308static int _wrap_plot3dc(lua_State* L) {
7309 int SWIG_arg = 0;
7310 PLFLT *arg1 = (PLFLT *) 0 ;
7311 PLFLT *arg2 = (PLFLT *) 0 ;
7312 PLFLT **arg3 = (PLFLT **) 0 ;
7313 PLINT arg4 ;
7314 PLINT arg5 ;
7315 PLINT arg6 ;
7316 PLFLT *arg7 = (PLFLT *) 0 ;
7317 PLINT arg8 ;
7318 int ii3 ;
7319
7320 SWIG_check_num_args("plot3dc",5,5)
7321 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3dc",4,"PLINT");
7322 {
7323 int temp;
7324 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7325 if ( !arg1 )
7326 SWIG_fail;
7327 Xlen = temp;
7328 }
7329 {
7330 int temp;
7331 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7332 if ( !arg2 )
7333 SWIG_fail;
7334 Ylen = temp;
7335 }
7336 {
7337 int jj;
7338
7339 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7340 if ( !arg3 )
7341 SWIG_fail;
7342 arg4 = ii3;
7343 arg5 = jj;
7344 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7345 {
7346 lua_pushfstring( L, "Vectors must match matrix." );
7347 SWIG_fail;
7348 }
7349 }
7350 arg6 = (PLINT)lua_tonumber(L, 4);
7351 {
7352 int temp;
7353 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7354 if ( !arg7 )
7355 SWIG_fail;
7356 arg8 = Alen = temp;
7357 }
7358 plot3dc((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7359
7360 {
7361 LUA_FREE_ARRAY( arg1 );
7362 }
7363 {
7364 LUA_FREE_ARRAY( arg2 );
7365 }
7366 {
7367 int i;
7368
7369 if ( arg3 )
7370 {
7371 for ( i = 0; i < ii3; i++ )
7372 LUA_FREE_ARRAY( arg3[i] );
7373 LUA_FREE_ARRAY( arg3 );
7374 }
7375 }
7376 {
7377 LUA_FREE_ARRAY( arg7 );
7378 }
7379 return SWIG_arg;
7380
7381 fail: SWIGUNUSED;
7382 {
7383 LUA_FREE_ARRAY( arg1 );
7384 }
7385 {
7386 LUA_FREE_ARRAY( arg2 );
7387 }
7388 {
7389 int i;
7390
7391 if ( arg3 )
7392 {
7393 for ( i = 0; i < ii3; i++ )
7394 LUA_FREE_ARRAY( arg3[i] );
7395 LUA_FREE_ARRAY( arg3 );
7396 }
7397 }
7398 {
7399 LUA_FREE_ARRAY( arg7 );
7400 }
7401 lua_error(L);
7402 return 0;
7403}
7404
7405
7406static int _wrap_plot3dcl(lua_State* L) {
7407 int SWIG_arg = 0;
7408 PLFLT *arg1 = (PLFLT *) 0 ;
7409 PLFLT *arg2 = (PLFLT *) 0 ;
7410 PLFLT **arg3 = (PLFLT **) 0 ;
7411 PLINT arg4 ;
7412 PLINT arg5 ;
7413 PLINT arg6 ;
7414 PLFLT *arg7 = (PLFLT *) 0 ;
7415 PLINT arg8 ;
7416 PLINT arg9 ;
7417 PLINT arg10 ;
7418 PLINT *arg11 = (PLINT *) 0 ;
7419 PLINT *arg12 = (PLINT *) 0 ;
7420 int ii3 ;
7421 int temp12 ;
7422
7423 SWIG_check_num_args("plot3dcl",8,8)
7424 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3dcl",4,"PLINT");
7425 if(!lua_isnumber(L,6)) SWIG_fail_arg("plot3dcl",6,"PLINT");
7426 {
7427 int temp;
7428 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7429 if ( !arg1 )
7430 SWIG_fail;
7431 Xlen = temp;
7432 }
7433 {
7434 int temp;
7435 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7436 if ( !arg2 )
7437 SWIG_fail;
7438 Ylen = temp;
7439 }
7440 {
7441 int jj;
7442
7443 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7444 if ( !arg3 )
7445 SWIG_fail;
7446 arg4 = ii3;
7447 arg5 = jj;
7448 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7449 {
7450 lua_pushfstring( L, "Vectors must match matrix." );
7451 SWIG_fail;
7452 }
7453 }
7454 arg6 = (PLINT)lua_tonumber(L, 4);
7455 {
7456 int temp;
7457 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7458 if ( !arg7 )
7459 SWIG_fail;
7460 arg8 = Alen = temp;
7461 }
7462 arg9 = (PLINT)lua_tonumber(L, 6);
7463 {
7464 arg11 = (PLINT *) LUA_get_int_num_array_var( L, 7, &arg10 );
7465 if ( !arg11 )
7466 SWIG_fail;
7467 Alen = arg10;
7468 }
7469 {
7470 arg12 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp12 );
7471 if ( !arg12 )
7472 SWIG_fail;
7473 if ( temp12 != Alen )
7474 {
7475 lua_pushfstring( L, "Tables must be of same length." );
7476 SWIG_fail;
7477 }
7478 }
7479 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);
7480
7481 {
7482 LUA_FREE_ARRAY( arg1 );
7483 }
7484 {
7485 LUA_FREE_ARRAY( arg2 );
7486 }
7487 {
7488 int i;
7489
7490 if ( arg3 )
7491 {
7492 for ( i = 0; i < ii3; i++ )
7493 LUA_FREE_ARRAY( arg3[i] );
7494 LUA_FREE_ARRAY( arg3 );
7495 }
7496 }
7497 {
7498 LUA_FREE_ARRAY( arg7 );
7499 }
7500 {
7501 LUA_FREE_ARRAY( arg11 );
7502 }
7503 {
7504 LUA_FREE_ARRAY( arg12 );
7505 }
7506 return SWIG_arg;
7507
7508 fail: SWIGUNUSED;
7509 {
7510 LUA_FREE_ARRAY( arg1 );
7511 }
7512 {
7513 LUA_FREE_ARRAY( arg2 );
7514 }
7515 {
7516 int i;
7517
7518 if ( arg3 )
7519 {
7520 for ( i = 0; i < ii3; i++ )
7521 LUA_FREE_ARRAY( arg3[i] );
7522 LUA_FREE_ARRAY( arg3 );
7523 }
7524 }
7525 {
7526 LUA_FREE_ARRAY( arg7 );
7527 }
7528 {
7529 LUA_FREE_ARRAY( arg11 );
7530 }
7531 {
7532 LUA_FREE_ARRAY( arg12 );
7533 }
7534 lua_error(L);
7535 return 0;
7536}
7537
7538
7539static int _wrap_surf3d(lua_State* L) {
7540 int SWIG_arg = 0;
7541 PLFLT *arg1 = (PLFLT *) 0 ;
7542 PLFLT *arg2 = (PLFLT *) 0 ;
7543 PLFLT **arg3 = (PLFLT **) 0 ;
7544 PLINT arg4 ;
7545 PLINT arg5 ;
7546 PLINT arg6 ;
7547 PLFLT *arg7 = (PLFLT *) 0 ;
7548 PLINT arg8 ;
7549 int ii3 ;
7550
7551 SWIG_check_num_args("plsurf3d",5,5)
7552 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsurf3d",4,"PLINT");
7553 {
7554 int temp;
7555 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7556 if ( !arg1 )
7557 SWIG_fail;
7558 Xlen = temp;
7559 }
7560 {
7561 int temp;
7562 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7563 if ( !arg2 )
7564 SWIG_fail;
7565 Ylen = temp;
7566 }
7567 {
7568 int jj;
7569
7570 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7571 if ( !arg3 )
7572 SWIG_fail;
7573 arg4 = ii3;
7574 arg5 = jj;
7575 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7576 {
7577 lua_pushfstring( L, "Vectors must match matrix." );
7578 SWIG_fail;
7579 }
7580 }
7581 arg6 = (PLINT)lua_tonumber(L, 4);
7582 {
7583 int temp;
7584 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7585 if ( !arg7 )
7586 SWIG_fail;
7587 arg8 = Alen = temp;
7588 }
7589 plsurf3d((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7590
7591 {
7592 LUA_FREE_ARRAY( arg1 );
7593 }
7594 {
7595 LUA_FREE_ARRAY( arg2 );
7596 }
7597 {
7598 int i;
7599
7600 if ( arg3 )
7601 {
7602 for ( i = 0; i < ii3; i++ )
7603 LUA_FREE_ARRAY( arg3[i] );
7604 LUA_FREE_ARRAY( arg3 );
7605 }
7606 }
7607 {
7608 LUA_FREE_ARRAY( arg7 );
7609 }
7610 return SWIG_arg;
7611
7612 fail: SWIGUNUSED;
7613 {
7614 LUA_FREE_ARRAY( arg1 );
7615 }
7616 {
7617 LUA_FREE_ARRAY( arg2 );
7618 }
7619 {
7620 int i;
7621
7622 if ( arg3 )
7623 {
7624 for ( i = 0; i < ii3; i++ )
7625 LUA_FREE_ARRAY( arg3[i] );
7626 LUA_FREE_ARRAY( arg3 );
7627 }
7628 }
7629 {
7630 LUA_FREE_ARRAY( arg7 );
7631 }
7632 lua_error(L);
7633 return 0;
7634}
7635
7636
7637static int _wrap_surf3dl(lua_State* L) {
7638 int SWIG_arg = 0;
7639 PLFLT *arg1 = (PLFLT *) 0 ;
7640 PLFLT *arg2 = (PLFLT *) 0 ;
7641 PLFLT **arg3 = (PLFLT **) 0 ;
7642 PLINT arg4 ;
7643 PLINT arg5 ;
7644 PLINT arg6 ;
7645 PLFLT *arg7 = (PLFLT *) 0 ;
7646 PLINT arg8 ;
7647 PLINT arg9 ;
7648 PLINT arg10 ;
7649 PLINT *arg11 = (PLINT *) 0 ;
7650 PLINT *arg12 = (PLINT *) 0 ;
7651 int ii3 ;
7652 int temp12 ;
7653
7654 SWIG_check_num_args("plsurf3dl",8,8)
7655 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsurf3dl",4,"PLINT");
7656 if(!lua_isnumber(L,6)) SWIG_fail_arg("plsurf3dl",6,"PLINT");
7657 {
7658 int temp;
7659 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7660 if ( !arg1 )
7661 SWIG_fail;
7662 Xlen = temp;
7663 }
7664 {
7665 int temp;
7666 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7667 if ( !arg2 )
7668 SWIG_fail;
7669 Ylen = temp;
7670 }
7671 {
7672 int jj;
7673
7674 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7675 if ( !arg3 )
7676 SWIG_fail;
7677 arg4 = ii3;
7678 arg5 = jj;
7679 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7680 {
7681 lua_pushfstring( L, "Vectors must match matrix." );
7682 SWIG_fail;
7683 }
7684 }
7685 arg6 = (PLINT)lua_tonumber(L, 4);
7686 {
7687 int temp;
7688 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7689 if ( !arg7 )
7690 SWIG_fail;
7691 arg8 = Alen = temp;
7692 }
7693 arg9 = (PLINT)lua_tonumber(L, 6);
7694 {
7695 arg11 = (PLINT *) LUA_get_int_num_array_var( L, 7, &arg10 );
7696 if ( !arg11 )
7697 SWIG_fail;
7698 Alen = arg10;
7699 }
7700 {
7701 arg12 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp12 );
7702 if ( !arg12 )
7703 SWIG_fail;
7704 if ( temp12 != Alen )
7705 {
7706 lua_pushfstring( L, "Tables must be of same length." );
7707 SWIG_fail;
7708 }
7709 }
7710 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);
7711
7712 {
7713 LUA_FREE_ARRAY( arg1 );
7714 }
7715 {
7716 LUA_FREE_ARRAY( arg2 );
7717 }
7718 {
7719 int i;
7720
7721 if ( arg3 )
7722 {
7723 for ( i = 0; i < ii3; i++ )
7724 LUA_FREE_ARRAY( arg3[i] );
7725 LUA_FREE_ARRAY( arg3 );
7726 }
7727 }
7728 {
7729 LUA_FREE_ARRAY( arg7 );
7730 }
7731 {
7732 LUA_FREE_ARRAY( arg11 );
7733 }
7734 {
7735 LUA_FREE_ARRAY( arg12 );
7736 }
7737 return SWIG_arg;
7738
7739 fail: SWIGUNUSED;
7740 {
7741 LUA_FREE_ARRAY( arg1 );
7742 }
7743 {
7744 LUA_FREE_ARRAY( arg2 );
7745 }
7746 {
7747 int i;
7748
7749 if ( arg3 )
7750 {
7751 for ( i = 0; i < ii3; i++ )
7752 LUA_FREE_ARRAY( arg3[i] );
7753 LUA_FREE_ARRAY( arg3 );
7754 }
7755 }
7756 {
7757 LUA_FREE_ARRAY( arg7 );
7758 }
7759 {
7760 LUA_FREE_ARRAY( arg11 );
7761 }
7762 {
7763 LUA_FREE_ARRAY( arg12 );
7764 }
7765 lua_error(L);
7766 return 0;
7767}
7768
7769
7770static int _wrap_parseopts(lua_State* L) {
7771 int SWIG_arg = 0;
7772 int *arg1 = (int *) 0 ;
7773 char **arg2 = (char **) 0 ;
7774 PLINT arg3 ;
7775 PLINT result;
7776
7777 SWIG_check_num_args("plparseopts",2,2)
7778 if(!lua_istable(L,1)) SWIG_fail_arg("plparseopts",1,"int *");
7779 if(!lua_isnumber(L,2)) SWIG_fail_arg("plparseopts",2,"PLINT");
7780 {
7781 int i, n;
7782
7783 // from lua 5.1 on there is no element "n" anymore,
7784 // so we need to find out the number of command line
7785 // options manually
7786 for ( i = 1;; i++ )
7787 {
7788 lua_rawgeti( L, 1, i );
7789 if ( lua_isnil( L, -1 ) )
7790 {
7791 // ok, this index doesn't exist anymore, we have i-1
7792 // command line options
7793 lua_pop( L, 1 );
7794 break;
7795 }
7796 }
7797 n = i;
7798 arg1 = &n;
7799
7800 arg2 = LUA_ALLOC_ARRAY( char*, ( n + 1 ) );
7801
7802 for ( i = 0; i < n; i++ )
7803 {
7804 lua_rawgeti( L, 1, i );
7805 if ( lua_isstring( L, -1 ) )
7806 {
7807 arg2[i] = (char *) lua_tostring( L, -1 );
7808 }
7809 else
7810 {
7811 lua_pop( L, 1 );
7812 lua_pushfstring( L, "List items must be strings" );
7813 SWIG_fail;
7814 // arg2 array is freed after 'fail:'
7815 }
7816 lua_pop( L, 1 );
7817 }
7818 arg2[n] = NULL;
7819 }
7820 arg3 = (PLINT)lua_tonumber(L, 2);
7821 result = (PLINT)plparseopts(arg1,arg2,arg3);
7822 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
7823 {
7824 LUA_FREE_ARRAY( arg2 );
7825 }
7826 return SWIG_arg;
7827
7828 fail: SWIGUNUSED;
7829 {
7830 LUA_FREE_ARRAY( arg2 );
7831 }
7832 lua_error(L);
7833 return 0;
7834}
7835
7836
7837static int _wrap_pat(lua_State* L) {
7838 int SWIG_arg = 0;
7839 PLINT arg1 ;
7840 PLINT *arg2 = (PLINT *) 0 ;
7841 PLINT *arg3 = (PLINT *) 0 ;
7842 int temp3 ;
7843
7844 SWIG_check_num_args("plpat",2,2)
7845 {
7846 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 1, &arg1 );
7847 if ( !arg2 )
7848 SWIG_fail;
7849 Alen = arg1;
7850 }
7851 {
7852 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp3 );
7853 if ( !arg3 )
7854 SWIG_fail;
7855 if ( temp3 != Alen )
7856 {
7857 lua_pushfstring( L, "Tables must be of same length." );
7858 SWIG_fail;
7859 }
7860 }
7861 plpat(arg1,(int const *)arg2,(int const *)arg3);
7862
7863 {
7864 LUA_FREE_ARRAY( arg2 );
7865 }
7866 {
7867 LUA_FREE_ARRAY( arg3 );
7868 }
7869 return SWIG_arg;
7870
7871 fail: SWIGUNUSED;
7872 {
7873 LUA_FREE_ARRAY( arg2 );
7874 }
7875 {
7876 LUA_FREE_ARRAY( arg3 );
7877 }
7878 lua_error(L);
7879 return 0;
7880}
7881
7882
7883static int _wrap_path(lua_State* L) {
7884 int SWIG_arg = 0;
7885 PLINT arg1 ;
7886 PLFLT arg2 ;
7887 PLFLT arg3 ;
7888 PLFLT arg4 ;
7889 PLFLT arg5 ;
7890
7891 SWIG_check_num_args("plpath",5,5)
7892 if(!lua_isnumber(L,1)) SWIG_fail_arg("plpath",1,"PLINT");
7893 if(!lua_isnumber(L,2)) SWIG_fail_arg("plpath",2,"PLFLT");
7894 if(!lua_isnumber(L,3)) SWIG_fail_arg("plpath",3,"PLFLT");
7895 if(!lua_isnumber(L,4)) SWIG_fail_arg("plpath",4,"PLFLT");
7896 if(!lua_isnumber(L,5)) SWIG_fail_arg("plpath",5,"PLFLT");
7897 arg1 = (PLINT)lua_tonumber(L, 1);
7898 arg2 = (PLFLT)lua_tonumber(L, 2);
7899 arg3 = (PLFLT)lua_tonumber(L, 3);
7900 arg4 = (PLFLT)lua_tonumber(L, 4);
7901 arg5 = (PLFLT)lua_tonumber(L, 5);
7902 plpath(arg1,arg2,arg3,arg4,arg5);
7903
7904 return SWIG_arg;
7905
7906 fail: SWIGUNUSED;
7907 lua_error(L);
7908 return 0;
7909}
7910
7911
7912static int _wrap_poin(lua_State* L) {
7913 int SWIG_arg = 0;
7914 PLINT arg1 ;
7915 PLFLT *arg2 = (PLFLT *) 0 ;
7916 PLFLT *arg3 = (PLFLT *) 0 ;
7917 PLINT arg4 ;
7918 int temp3 ;
7919
7920 SWIG_check_num_args("plpoin",3,3)
7921 if(!lua_isnumber(L,3)) SWIG_fail_arg("plpoin",3,"PLINT");
7922 {
7923 int temp;
7924 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7925 if ( !arg2 )
7926 SWIG_fail;
7927 arg1 = Alen = temp;
7928 }
7929 {
7930 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
7931 if ( !arg3 )
7932 SWIG_fail;
7933 if ( temp3 != Alen )
7934 {
7935 lua_pushfstring( L, "Tables must be of same length." );
7936 SWIG_fail;
7937 }
7938 }
7939 arg4 = (PLINT)lua_tonumber(L, 3);
7940 plpoin(arg1,(double const *)arg2,(double const *)arg3,arg4);
7941
7942 {
7943 LUA_FREE_ARRAY( arg2 );
7944 }
7945 {
7946 LUA_FREE_ARRAY( arg3 );
7947 }
7948 return SWIG_arg;
7949
7950 fail: SWIGUNUSED;
7951 {
7952 LUA_FREE_ARRAY( arg2 );
7953 }
7954 {
7955 LUA_FREE_ARRAY( arg3 );
7956 }
7957 lua_error(L);
7958 return 0;
7959}
7960
7961
7962static int _wrap_poin3(lua_State* L) {
7963 int SWIG_arg = 0;
7964 PLINT arg1 ;
7965 PLFLT *arg2 = (PLFLT *) 0 ;
7966 PLFLT *arg3 = (PLFLT *) 0 ;
7967 PLFLT *arg4 = (PLFLT *) 0 ;
7968 PLINT arg5 ;
7969 int temp3 ;
7970 int temp4 ;
7971
7972 SWIG_check_num_args("plpoin3",4,4)
7973 if(!lua_isnumber(L,4)) SWIG_fail_arg("plpoin3",4,"PLINT");
7974 {
7975 int temp;
7976 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7977 if ( !arg2 )
7978 SWIG_fail;
7979 arg1 = Alen = temp;
7980 }
7981 {
7982 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
7983 if ( !arg3 )
7984 SWIG_fail;
7985 if ( temp3 != Alen )
7986 {
7987 lua_pushfstring( L, "Tables must be of same length." );
7988 SWIG_fail;
7989 }
7990 }
7991 {
7992 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
7993 if ( !arg4 )
7994 SWIG_fail;
7995 if ( temp4 != Alen )
7996 {
7997 lua_pushfstring( L, "Tables must be of same length." );
7998 SWIG_fail;
7999 }
8000 }
8001 arg5 = (PLINT)lua_tonumber(L, 4);
8002 plpoin3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,arg5);
8003
8004 {
8005 LUA_FREE_ARRAY( arg2 );
8006 }
8007 {
8008 LUA_FREE_ARRAY( arg3 );
8009 }
8010 {
8011 LUA_FREE_ARRAY( arg4 );
8012 }
8013 return SWIG_arg;
8014
8015 fail: SWIGUNUSED;
8016 {
8017 LUA_FREE_ARRAY( arg2 );
8018 }
8019 {
8020 LUA_FREE_ARRAY( arg3 );
8021 }
8022 {
8023 LUA_FREE_ARRAY( arg4 );
8024 }
8025 lua_error(L);
8026 return 0;
8027}
8028
8029
8030static int _wrap_poly3(lua_State* L) {
8031 int SWIG_arg = 0;
8032 PLINT arg1 ;
8033 PLFLT *arg2 = (PLFLT *) 0 ;
8034 PLFLT *arg3 = (PLFLT *) 0 ;
8035 PLFLT *arg4 = (PLFLT *) 0 ;
8036 PLBOOL *arg5 = (PLBOOL *) 0 ;
8037 PLBOOL arg6 ;
8038 int temp3 ;
8039 int temp4 ;
8040 int temp5 ;
8041
8042 SWIG_check_num_args("plpoly3",5,5)
8043 if(!lua_isnumber(L,5)) SWIG_fail_arg("plpoly3",5,"PLBOOL");
8044 {
8045 int temp;
8046 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
8047 if ( !arg2 )
8048 SWIG_fail;
8049 arg1 = Alen = temp;
8050 }
8051 {
8052 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
8053 if ( !arg3 )
8054 SWIG_fail;
8055 if ( temp3 != Alen )
8056 {
8057 lua_pushfstring( L, "Tables must be of same length." );
8058 SWIG_fail;
8059 }
8060 }
8061 {
8062 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8063 if ( !arg4 )
8064 SWIG_fail;
8065 if ( temp4 != Alen )
8066 {
8067 lua_pushfstring( L, "Tables must be of same length." );
8068 SWIG_fail;
8069 }
8070 }
8071 {
8072 arg5 = (PLINT *) LUA_get_int_num_array_var( L, 4, &temp5 );
8073 if ( !arg5 )
8074 SWIG_fail;
8075 if ( temp5 < Alen - 1 )
8076 {
8077 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8078 SWIG_fail;
8079 }
8080 }
8081 arg6 = (PLBOOL)lua_tonumber(L, 5);
8082 plpoly3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,(int const *)arg5,arg6);
8083
8084 {
8085 LUA_FREE_ARRAY( arg2 );
8086 }
8087 {
8088 LUA_FREE_ARRAY( arg3 );
8089 }
8090 {
8091 LUA_FREE_ARRAY( arg4 );
8092 }
8093 {
8094 LUA_FREE_ARRAY( arg5 );
8095 }
8096 return SWIG_arg;
8097
8098 fail: SWIGUNUSED;
8099 {
8100 LUA_FREE_ARRAY( arg2 );
8101 }
8102 {
8103 LUA_FREE_ARRAY( arg3 );
8104 }
8105 {
8106 LUA_FREE_ARRAY( arg4 );
8107 }
8108 {
8109 LUA_FREE_ARRAY( arg5 );
8110 }
8111 lua_error(L);
8112 return 0;
8113}
8114
8115
8116static int _wrap_prec(lua_State* L) {
8117 int SWIG_arg = 0;
8118 PLINT arg1 ;
8119 PLINT arg2 ;
8120
8121 SWIG_check_num_args("plprec",2,2)
8122 if(!lua_isnumber(L,1)) SWIG_fail_arg("plprec",1,"PLINT");
8123 if(!lua_isnumber(L,2)) SWIG_fail_arg("plprec",2,"PLINT");
8124 arg1 = (PLINT)lua_tonumber(L, 1);
8125 arg2 = (PLINT)lua_tonumber(L, 2);
8126 plprec(arg1,arg2);
8127
8128 return SWIG_arg;
8129
8130 fail: SWIGUNUSED;
8131 lua_error(L);
8132 return 0;
8133}
8134
8135
8136static int _wrap_psty(lua_State* L) {
8137 int SWIG_arg = 0;
8138 PLINT arg1 ;
8139
8140 SWIG_check_num_args("plpsty",1,1)
8141 if(!lua_isnumber(L,1)) SWIG_fail_arg("plpsty",1,"PLINT");
8142 arg1 = (PLINT)lua_tonumber(L, 1);
8143 plpsty(arg1);
8144
8145 return SWIG_arg;
8146
8147 fail: SWIGUNUSED;
8148 lua_error(L);
8149 return 0;
8150}
8151
8152
8153static int _wrap_ptex(lua_State* L) {
8154 int SWIG_arg = 0;
8155 PLFLT arg1 ;
8156 PLFLT arg2 ;
8157 PLFLT arg3 ;
8158 PLFLT arg4 ;
8159 PLFLT arg5 ;
8160 char *arg6 = (char *) 0 ;
8161
8162 SWIG_check_num_args("plptex",6,6)
8163 if(!lua_isnumber(L,1)) SWIG_fail_arg("plptex",1,"PLFLT");
8164 if(!lua_isnumber(L,2)) SWIG_fail_arg("plptex",2,"PLFLT");
8165 if(!lua_isnumber(L,3)) SWIG_fail_arg("plptex",3,"PLFLT");
8166 if(!lua_isnumber(L,4)) SWIG_fail_arg("plptex",4,"PLFLT");
8167 if(!lua_isnumber(L,5)) SWIG_fail_arg("plptex",5,"PLFLT");
8168 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plptex",6,"char const *");
8169 arg1 = (PLFLT)lua_tonumber(L, 1);
8170 arg2 = (PLFLT)lua_tonumber(L, 2);
8171 arg3 = (PLFLT)lua_tonumber(L, 3);
8172 arg4 = (PLFLT)lua_tonumber(L, 4);
8173 arg5 = (PLFLT)lua_tonumber(L, 5);
8174 arg6 = (char *)lua_tostring(L, 6);
8175 plptex(arg1,arg2,arg3,arg4,arg5,(char const *)arg6);
8176
8177 return SWIG_arg;
8178
8179 fail: SWIGUNUSED;
8180 lua_error(L);
8181 return 0;
8182}
8183
8184
8185static int _wrap_ptex3(lua_State* L) {
8186 int SWIG_arg = 0;
8187 PLFLT arg1 ;
8188 PLFLT arg2 ;
8189 PLFLT arg3 ;
8190 PLFLT arg4 ;
8191 PLFLT arg5 ;
8192 PLFLT arg6 ;
8193 PLFLT arg7 ;
8194 PLFLT arg8 ;
8195 PLFLT arg9 ;
8196 PLFLT arg10 ;
8197 char *arg11 = (char *) 0 ;
8198
8199 SWIG_check_num_args("plptex3",11,11)
8200 if(!lua_isnumber(L,1)) SWIG_fail_arg("plptex3",1,"PLFLT");
8201 if(!lua_isnumber(L,2)) SWIG_fail_arg("plptex3",2,"PLFLT");
8202 if(!lua_isnumber(L,3)) SWIG_fail_arg("plptex3",3,"PLFLT");
8203 if(!lua_isnumber(L,4)) SWIG_fail_arg("plptex3",4,"PLFLT");
8204 if(!lua_isnumber(L,5)) SWIG_fail_arg("plptex3",5,"PLFLT");
8205 if(!lua_isnumber(L,6)) SWIG_fail_arg("plptex3",6,"PLFLT");
8206 if(!lua_isnumber(L,7)) SWIG_fail_arg("plptex3",7,"PLFLT");
8207 if(!lua_isnumber(L,8)) SWIG_fail_arg("plptex3",8,"PLFLT");
8208 if(!lua_isnumber(L,9)) SWIG_fail_arg("plptex3",9,"PLFLT");
8209 if(!lua_isnumber(L,10)) SWIG_fail_arg("plptex3",10,"PLFLT");
8210 if(!SWIG_lua_isnilstring(L,11)) SWIG_fail_arg("plptex3",11,"char const *");
8211 arg1 = (PLFLT)lua_tonumber(L, 1);
8212 arg2 = (PLFLT)lua_tonumber(L, 2);
8213 arg3 = (PLFLT)lua_tonumber(L, 3);
8214 arg4 = (PLFLT)lua_tonumber(L, 4);
8215 arg5 = (PLFLT)lua_tonumber(L, 5);
8216 arg6 = (PLFLT)lua_tonumber(L, 6);
8217 arg7 = (PLFLT)lua_tonumber(L, 7);
8218 arg8 = (PLFLT)lua_tonumber(L, 8);
8219 arg9 = (PLFLT)lua_tonumber(L, 9);
8220 arg10 = (PLFLT)lua_tonumber(L, 10);
8221 arg11 = (char *)lua_tostring(L, 11);
8222 plptex3(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,(char const *)arg11);
8223
8224 return SWIG_arg;
8225
8226 fail: SWIGUNUSED;
8227 lua_error(L);
8228 return 0;
8229}
8230
8231
8232static int _wrap_randd(lua_State* L) {
8233 int SWIG_arg = 0;
8234 PLFLT result;
8235
8236 SWIG_check_num_args("plrandd",0,0)
8237 result = (PLFLT)plrandd();
8238 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
8239 return SWIG_arg;
8240
8241 fail: SWIGUNUSED;
8242 lua_error(L);
8243 return 0;
8244}
8245
8246
8247static int _wrap_replot(lua_State* L) {
8248 int SWIG_arg = 0;
8249
8250 SWIG_check_num_args("plreplot",0,0)
8251 plreplot();
8252
8253 return SWIG_arg;
8254
8255 fail: SWIGUNUSED;
8256 lua_error(L);
8257 return 0;
8258}
8259
8260
8261static int _wrap_rgbhls(lua_State* L) {
8262 int SWIG_arg = 0;
8263 PLFLT arg1 ;
8264 PLFLT arg2 ;
8265 PLFLT arg3 ;
8266 PLFLT *arg4 = (PLFLT *) 0 ;
8267 PLFLT *arg5 = (PLFLT *) 0 ;
8268 PLFLT *arg6 = (PLFLT *) 0 ;
8269 PLFLT temp4 ;
8270 PLFLT temp5 ;
8271 PLFLT temp6 ;
8272
8273 arg4 = &temp4;
8274 arg5 = &temp5;
8275 arg6 = &temp6;
8276 SWIG_check_num_args("plrgbhls",3,3)
8277 if(!lua_isnumber(L,1)) SWIG_fail_arg("plrgbhls",1,"PLFLT");
8278 if(!lua_isnumber(L,2)) SWIG_fail_arg("plrgbhls",2,"PLFLT");
8279 if(!lua_isnumber(L,3)) SWIG_fail_arg("plrgbhls",3,"PLFLT");
8280 arg1 = (PLFLT)lua_tonumber(L, 1);
8281 arg2 = (PLFLT)lua_tonumber(L, 2);
8282 arg3 = (PLFLT)lua_tonumber(L, 3);
8283 plrgbhls(arg1,arg2,arg3,arg4,arg5,arg6);
8284
8285 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
8286 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
8287 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
8288 return SWIG_arg;
8289
8290 fail: SWIGUNUSED;
8291 lua_error(L);
8292 return 0;
8293}
8294
8295
8296static int _wrap_schr(lua_State* L) {
8297 int SWIG_arg = 0;
8298 PLFLT arg1 ;
8299 PLFLT arg2 ;
8300
8301 SWIG_check_num_args("plschr",2,2)
8302 if(!lua_isnumber(L,1)) SWIG_fail_arg("plschr",1,"PLFLT");
8303 if(!lua_isnumber(L,2)) SWIG_fail_arg("plschr",2,"PLFLT");
8304 arg1 = (PLFLT)lua_tonumber(L, 1);
8305 arg2 = (PLFLT)lua_tonumber(L, 2);
8306 plschr(arg1,arg2);
8307
8308 return SWIG_arg;
8309
8310 fail: SWIGUNUSED;
8311 lua_error(L);
8312 return 0;
8313}
8314
8315
8316static int _wrap_scmap0(lua_State* L) {
8317 int SWIG_arg = 0;
8318 PLINT *arg1 = (PLINT *) 0 ;
8319 PLINT *arg2 = (PLINT *) 0 ;
8320 PLINT *arg3 = (PLINT *) 0 ;
8321 PLINT arg4 ;
8322 int temp1 ;
8323 int temp2 ;
8324 int temp3 ;
8325
8326 SWIG_check_num_args("plscmap0",3,3)
8327 {
8328 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8329 if ( !arg1 )
8330 SWIG_fail;
8331 Alen = temp1;
8332 }
8333 {
8334 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8335 if ( !arg2 )
8336 SWIG_fail;
8337 if ( temp2 != Alen )
8338 {
8339 lua_pushfstring( L, "Tables must be of same length." );
8340 SWIG_fail;
8341 }
8342 }
8343 {
8344 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8345 if ( !arg3 )
8346 SWIG_fail;
8347 if ( temp3 != Alen )
8348 {
8349 lua_pushfstring( L, "Tables must be of same length." );
8350 SWIG_fail;
8351 }
8352 arg4 = temp3;
8353 }
8354 plscmap0((int const *)arg1,(int const *)arg2,(int const *)arg3,arg4);
8355
8356 {
8357 LUA_FREE_ARRAY( arg1 );
8358 }
8359 {
8360 LUA_FREE_ARRAY( arg2 );
8361 }
8362 {
8363 LUA_FREE_ARRAY( arg3 );
8364 }
8365 return SWIG_arg;
8366
8367 fail: SWIGUNUSED;
8368 {
8369 LUA_FREE_ARRAY( arg1 );
8370 }
8371 {
8372 LUA_FREE_ARRAY( arg2 );
8373 }
8374 {
8375 LUA_FREE_ARRAY( arg3 );
8376 }
8377 lua_error(L);
8378 return 0;
8379}
8380
8381
8382static int _wrap_scmap0a(lua_State* L) {
8383 int SWIG_arg = 0;
8384 PLINT *arg1 = (PLINT *) 0 ;
8385 PLINT *arg2 = (PLINT *) 0 ;
8386 PLINT *arg3 = (PLINT *) 0 ;
8387 PLFLT *arg4 = (PLFLT *) 0 ;
8388 PLINT arg5 ;
8389 int temp1 ;
8390 int temp2 ;
8391 int temp3 ;
8392
8393 SWIG_check_num_args("plscmap0a",4,4)
8394 {
8395 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8396 if ( !arg1 )
8397 SWIG_fail;
8398 Alen = temp1;
8399 }
8400 {
8401 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8402 if ( !arg2 )
8403 SWIG_fail;
8404 if ( temp2 != Alen )
8405 {
8406 lua_pushfstring( L, "Tables must be of same length." );
8407 SWIG_fail;
8408 }
8409 }
8410 {
8411 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8412 if ( !arg3 )
8413 SWIG_fail;
8414 if ( temp3 != Alen )
8415 {
8416 lua_pushfstring( L, "Tables must be of same length." );
8417 SWIG_fail;
8418 }
8419 }
8420 {
8421 int temp;
8422 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
8423 if ( !arg4 )
8424 SWIG_fail;
8425 if ( temp != Alen )
8426 {
8427 lua_pushfstring( L, "Tables must be of same length." );
8428 SWIG_fail;
8429 }
8430 arg5 = temp;
8431 }
8432 plscmap0a((int const *)arg1,(int const *)arg2,(int const *)arg3,(double const *)arg4,arg5);
8433
8434 {
8435 LUA_FREE_ARRAY( arg1 );
8436 }
8437 {
8438 LUA_FREE_ARRAY( arg2 );
8439 }
8440 {
8441 LUA_FREE_ARRAY( arg3 );
8442 }
8443 {
8444 LUA_FREE_ARRAY( arg4 );
8445 }
8446 return SWIG_arg;
8447
8448 fail: SWIGUNUSED;
8449 {
8450 LUA_FREE_ARRAY( arg1 );
8451 }
8452 {
8453 LUA_FREE_ARRAY( arg2 );
8454 }
8455 {
8456 LUA_FREE_ARRAY( arg3 );
8457 }
8458 {
8459 LUA_FREE_ARRAY( arg4 );
8460 }
8461 lua_error(L);
8462 return 0;
8463}
8464
8465
8466static int _wrap_scmap0n(lua_State* L) {
8467 int SWIG_arg = 0;
8468 PLINT arg1 ;
8469
8470 SWIG_check_num_args("plscmap0n",1,1)
8471 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap0n",1,"PLINT");
8472 arg1 = (PLINT)lua_tonumber(L, 1);
8473 plscmap0n(arg1);
8474
8475 return SWIG_arg;
8476
8477 fail: SWIGUNUSED;
8478 lua_error(L);
8479 return 0;
8480}
8481
8482
8483static int _wrap_scmap1(lua_State* L) {
8484 int SWIG_arg = 0;
8485 PLINT *arg1 = (PLINT *) 0 ;
8486 PLINT *arg2 = (PLINT *) 0 ;
8487 PLINT *arg3 = (PLINT *) 0 ;
8488 PLINT arg4 ;
8489 int temp1 ;
8490 int temp2 ;
8491 int temp3 ;
8492
8493 SWIG_check_num_args("plscmap1",3,3)
8494 {
8495 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8496 if ( !arg1 )
8497 SWIG_fail;
8498 Alen = temp1;
8499 }
8500 {
8501 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8502 if ( !arg2 )
8503 SWIG_fail;
8504 if ( temp2 != Alen )
8505 {
8506 lua_pushfstring( L, "Tables must be of same length." );
8507 SWIG_fail;
8508 }
8509 }
8510 {
8511 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8512 if ( !arg3 )
8513 SWIG_fail;
8514 if ( temp3 != Alen )
8515 {
8516 lua_pushfstring( L, "Tables must be of same length." );
8517 SWIG_fail;
8518 }
8519 arg4 = temp3;
8520 }
8521 plscmap1((int const *)arg1,(int const *)arg2,(int const *)arg3,arg4);
8522
8523 {
8524 LUA_FREE_ARRAY( arg1 );
8525 }
8526 {
8527 LUA_FREE_ARRAY( arg2 );
8528 }
8529 {
8530 LUA_FREE_ARRAY( arg3 );
8531 }
8532 return SWIG_arg;
8533
8534 fail: SWIGUNUSED;
8535 {
8536 LUA_FREE_ARRAY( arg1 );
8537 }
8538 {
8539 LUA_FREE_ARRAY( arg2 );
8540 }
8541 {
8542 LUA_FREE_ARRAY( arg3 );
8543 }
8544 lua_error(L);
8545 return 0;
8546}
8547
8548
8549static int _wrap_scmap1a(lua_State* L) {
8550 int SWIG_arg = 0;
8551 PLINT *arg1 = (PLINT *) 0 ;
8552 PLINT *arg2 = (PLINT *) 0 ;
8553 PLINT *arg3 = (PLINT *) 0 ;
8554 PLFLT *arg4 = (PLFLT *) 0 ;
8555 PLINT arg5 ;
8556 int temp1 ;
8557 int temp2 ;
8558 int temp3 ;
8559
8560 SWIG_check_num_args("plscmap1a",4,4)
8561 {
8562 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8563 if ( !arg1 )
8564 SWIG_fail;
8565 Alen = temp1;
8566 }
8567 {
8568 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8569 if ( !arg2 )
8570 SWIG_fail;
8571 if ( temp2 != Alen )
8572 {
8573 lua_pushfstring( L, "Tables must be of same length." );
8574 SWIG_fail;
8575 }
8576 }
8577 {
8578 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8579 if ( !arg3 )
8580 SWIG_fail;
8581 if ( temp3 != Alen )
8582 {
8583 lua_pushfstring( L, "Tables must be of same length." );
8584 SWIG_fail;
8585 }
8586 }
8587 {
8588 int temp;
8589 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
8590 if ( !arg4 )
8591 SWIG_fail;
8592 if ( temp != Alen )
8593 {
8594 lua_pushfstring( L, "Tables must be of same length." );
8595 SWIG_fail;
8596 }
8597 arg5 = temp;
8598 }
8599 plscmap1a((int const *)arg1,(int const *)arg2,(int const *)arg3,(double const *)arg4,arg5);
8600
8601 {
8602 LUA_FREE_ARRAY( arg1 );
8603 }
8604 {
8605 LUA_FREE_ARRAY( arg2 );
8606 }
8607 {
8608 LUA_FREE_ARRAY( arg3 );
8609 }
8610 {
8611 LUA_FREE_ARRAY( arg4 );
8612 }
8613 return SWIG_arg;
8614
8615 fail: SWIGUNUSED;
8616 {
8617 LUA_FREE_ARRAY( arg1 );
8618 }
8619 {
8620 LUA_FREE_ARRAY( arg2 );
8621 }
8622 {
8623 LUA_FREE_ARRAY( arg3 );
8624 }
8625 {
8626 LUA_FREE_ARRAY( arg4 );
8627 }
8628 lua_error(L);
8629 return 0;
8630}
8631
8632
8633static int _wrap_scmap1l(lua_State* L) {
8634 int SWIG_arg = 0;
8635 PLBOOL arg1 ;
8636 PLINT arg2 ;
8637 PLFLT *arg3 = (PLFLT *) 0 ;
8638 PLFLT *arg4 = (PLFLT *) 0 ;
8639 PLFLT *arg5 = (PLFLT *) 0 ;
8640 PLFLT *arg6 = (PLFLT *) 0 ;
8641 PLBOOL *arg7 = (PLBOOL *) 0 ;
8642 int temp4 ;
8643 int temp5 ;
8644 int temp6 ;
8645 int temp7 ;
8646
8647 {
8648 arg7 = NULL;
8649 }
8650 SWIG_check_num_args("plscmap1l",5,6)
8651 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1l",1,"PLBOOL");
8652 arg1 = (PLBOOL)lua_tonumber(L, 1);
8653 {
8654 int temp;
8655 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
8656 if ( !arg3 )
8657 SWIG_fail;
8658 arg2 = Alen = temp;
8659 }
8660 {
8661 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8662 if ( !arg4 )
8663 SWIG_fail;
8664 if ( temp4 != Alen )
8665 {
8666 lua_pushfstring( L, "Tables must be of same length." );
8667 SWIG_fail;
8668 }
8669 }
8670 {
8671 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp5 );
8672 if ( !arg5 )
8673 SWIG_fail;
8674 if ( temp5 != Alen )
8675 {
8676 lua_pushfstring( L, "Tables must be of same length." );
8677 SWIG_fail;
8678 }
8679 }
8680 {
8681 arg6 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp6 );
8682 if ( !arg6 )
8683 SWIG_fail;
8684 if ( temp6 != Alen )
8685 {
8686 lua_pushfstring( L, "Tables must be of same length." );
8687 SWIG_fail;
8688 }
8689 }
8690 if(lua_gettop(L)>=6){
8691 {
8692 if ( lua_isnil( L, 6 ) )
8693 {
8694 arg7 = NULL;
8695 }
8696 else
8697 {
8698 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 6, &temp7 );
8699 if ( !arg7 )
8700 SWIG_fail;
8701 if ( temp7 < Alen - 1 )
8702 {
8703 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8704 SWIG_fail;
8705 }
8706 }
8707 }
8708 }
8709 plscmap1l(arg1,arg2,(double const *)arg3,(double const *)arg4,(double const *)arg5,(double const *)arg6,(int const *)arg7);
8710
8711 {
8712 LUA_FREE_ARRAY( arg3 );
8713 }
8714 {
8715 LUA_FREE_ARRAY( arg4 );
8716 }
8717 {
8718 LUA_FREE_ARRAY( arg5 );
8719 }
8720 {
8721 LUA_FREE_ARRAY( arg6 );
8722 }
8723 {
8724 LUA_FREE_ARRAY( arg7 );
8725 }
8726 return SWIG_arg;
8727
8728 fail: SWIGUNUSED;
8729 {
8730 LUA_FREE_ARRAY( arg3 );
8731 }
8732 {
8733 LUA_FREE_ARRAY( arg4 );
8734 }
8735 {
8736 LUA_FREE_ARRAY( arg5 );
8737 }
8738 {
8739 LUA_FREE_ARRAY( arg6 );
8740 }
8741 {
8742 LUA_FREE_ARRAY( arg7 );
8743 }
8744 lua_error(L);
8745 return 0;
8746}
8747
8748
8749static int _wrap_scmap1la(lua_State* L) {
8750 int SWIG_arg = 0;
8751 PLBOOL arg1 ;
8752 PLINT arg2 ;
8753 PLFLT *arg3 = (PLFLT *) 0 ;
8754 PLFLT *arg4 = (PLFLT *) 0 ;
8755 PLFLT *arg5 = (PLFLT *) 0 ;
8756 PLFLT *arg6 = (PLFLT *) 0 ;
8757 PLFLT *arg7 = (PLFLT *) 0 ;
8758 PLBOOL *arg8 = (PLBOOL *) 0 ;
8759 int temp4 ;
8760 int temp5 ;
8761 int temp6 ;
8762 int temp7 ;
8763 int temp8 ;
8764
8765 {
8766 arg8 = NULL;
8767 }
8768 SWIG_check_num_args("plscmap1la",6,7)
8769 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1la",1,"PLBOOL");
8770 arg1 = (PLBOOL)lua_tonumber(L, 1);
8771 {
8772 int temp;
8773 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
8774 if ( !arg3 )
8775 SWIG_fail;
8776 arg2 = Alen = temp;
8777 }
8778 {
8779 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8780 if ( !arg4 )
8781 SWIG_fail;
8782 if ( temp4 != Alen )
8783 {
8784 lua_pushfstring( L, "Tables must be of same length." );
8785 SWIG_fail;
8786 }
8787 }
8788 {
8789 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp5 );
8790 if ( !arg5 )
8791 SWIG_fail;
8792 if ( temp5 != Alen )
8793 {
8794 lua_pushfstring( L, "Tables must be of same length." );
8795 SWIG_fail;
8796 }
8797 }
8798 {
8799 arg6 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp6 );
8800 if ( !arg6 )
8801 SWIG_fail;
8802 if ( temp6 != Alen )
8803 {
8804 lua_pushfstring( L, "Tables must be of same length." );
8805 SWIG_fail;
8806 }
8807 }
8808 {
8809 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp7 );
8810 if ( !arg7 )
8811 SWIG_fail;
8812 if ( temp7 != Alen )
8813 {
8814 lua_pushfstring( L, "Tables must be of same length." );
8815 SWIG_fail;
8816 }
8817 }
8818 if(lua_gettop(L)>=7){
8819 {
8820 if ( lua_isnil( L, 7 ) )
8821 {
8822 arg8 = NULL;
8823 }
8824 else
8825 {
8826 arg8 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp8 );
8827 if ( !arg8 )
8828 SWIG_fail;
8829 if ( temp8 < Alen - 1 )
8830 {
8831 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8832 SWIG_fail;
8833 }
8834 }
8835 }
8836 }
8837 plscmap1la(arg1,arg2,(double const *)arg3,(double const *)arg4,(double const *)arg5,(double const *)arg6,(double const *)arg7,(int const *)arg8);
8838
8839 {
8840 LUA_FREE_ARRAY( arg3 );
8841 }
8842 {
8843 LUA_FREE_ARRAY( arg4 );
8844 }
8845 {
8846 LUA_FREE_ARRAY( arg5 );
8847 }
8848 {
8849 LUA_FREE_ARRAY( arg6 );
8850 }
8851 {
8852 LUA_FREE_ARRAY( arg7 );
8853 }
8854 {
8855 LUA_FREE_ARRAY( arg8 );
8856 }
8857 return SWIG_arg;
8858
8859 fail: SWIGUNUSED;
8860 {
8861 LUA_FREE_ARRAY( arg3 );
8862 }
8863 {
8864 LUA_FREE_ARRAY( arg4 );
8865 }
8866 {
8867 LUA_FREE_ARRAY( arg5 );
8868 }
8869 {
8870 LUA_FREE_ARRAY( arg6 );
8871 }
8872 {
8873 LUA_FREE_ARRAY( arg7 );
8874 }
8875 {
8876 LUA_FREE_ARRAY( arg8 );
8877 }
8878 lua_error(L);
8879 return 0;
8880}
8881
8882
8883static int _wrap_scmap1n(lua_State* L) {
8884 int SWIG_arg = 0;
8885 PLINT arg1 ;
8886
8887 SWIG_check_num_args("plscmap1n",1,1)
8888 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1n",1,"PLINT");
8889 arg1 = (PLINT)lua_tonumber(L, 1);
8890 plscmap1n(arg1);
8891
8892 return SWIG_arg;
8893
8894 fail: SWIGUNUSED;
8895 lua_error(L);
8896 return 0;
8897}
8898
8899
8900static int _wrap_scmap1_range(lua_State* L) {
8901 int SWIG_arg = 0;
8902 PLFLT arg1 ;
8903 PLFLT arg2 ;
8904
8905 SWIG_check_num_args("plscmap1_range",2,2)
8906 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1_range",1,"PLFLT");
8907 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscmap1_range",2,"PLFLT");
8908 arg1 = (PLFLT)lua_tonumber(L, 1);
8909 arg2 = (PLFLT)lua_tonumber(L, 2);
8910 plscmap1_range(arg1,arg2);
8911
8912 return SWIG_arg;
8913
8914 fail: SWIGUNUSED;
8915 lua_error(L);
8916 return 0;
8917}
8918
8919
8920static int _wrap_gcmap1_range(lua_State* L) {
8921 int SWIG_arg = 0;
8922 PLFLT *arg1 = (PLFLT *) 0 ;
8923 PLFLT *arg2 = (PLFLT *) 0 ;
8924 PLFLT temp1 ;
8925 PLFLT temp2 ;
8926
8927 arg1 = &temp1;
8928 arg2 = &temp2;
8929 SWIG_check_num_args("plgcmap1_range",0,0)
8930 plgcmap1_range(arg1,arg2);
8931
8932 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
8933 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
8934 return SWIG_arg;
8935
8936 fail: SWIGUNUSED;
8937 lua_error(L);
8938 return 0;
8939}
8940
8941
8942static int _wrap_scol0(lua_State* L) {
8943 int SWIG_arg = 0;
8944 PLINT arg1 ;
8945 PLINT arg2 ;
8946 PLINT arg3 ;
8947 PLINT arg4 ;
8948
8949 SWIG_check_num_args("plscol0",4,4)
8950 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscol0",1,"PLINT");
8951 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscol0",2,"PLINT");
8952 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscol0",3,"PLINT");
8953 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscol0",4,"PLINT");
8954 arg1 = (PLINT)lua_tonumber(L, 1);
8955 arg2 = (PLINT)lua_tonumber(L, 2);
8956 arg3 = (PLINT)lua_tonumber(L, 3);
8957 arg4 = (PLINT)lua_tonumber(L, 4);
8958 plscol0(arg1,arg2,arg3,arg4);
8959
8960 return SWIG_arg;
8961
8962 fail: SWIGUNUSED;
8963 lua_error(L);
8964 return 0;
8965}
8966
8967
8968static int _wrap_scol0a(lua_State* L) {
8969 int SWIG_arg = 0;
8970 PLINT arg1 ;
8971 PLINT arg2 ;
8972 PLINT arg3 ;
8973 PLINT arg4 ;
8974 PLFLT arg5 ;
8975
8976 SWIG_check_num_args("plscol0a",5,5)
8977 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscol0a",1,"PLINT");
8978 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscol0a",2,"PLINT");
8979 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscol0a",3,"PLINT");
8980 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscol0a",4,"PLINT");
8981 if(!lua_isnumber(L,5)) SWIG_fail_arg("plscol0a",5,"PLFLT");
8982 arg1 = (PLINT)lua_tonumber(L, 1);
8983 arg2 = (PLINT)lua_tonumber(L, 2);
8984 arg3 = (PLINT)lua_tonumber(L, 3);
8985 arg4 = (PLINT)lua_tonumber(L, 4);
8986 arg5 = (PLFLT)lua_tonumber(L, 5);
8987 plscol0a(arg1,arg2,arg3,arg4,arg5);
8988
8989 return SWIG_arg;
8990
8991 fail: SWIGUNUSED;
8992 lua_error(L);
8993 return 0;
8994}
8995
8996
8997static int _wrap_scolbg(lua_State* L) {
8998 int SWIG_arg = 0;
8999 PLINT arg1 ;
9000 PLINT arg2 ;
9001 PLINT arg3 ;
9002
9003 SWIG_check_num_args("plscolbg",3,3)
9004 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolbg",1,"PLINT");
9005 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscolbg",2,"PLINT");
9006 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscolbg",3,"PLINT");
9007 arg1 = (PLINT)lua_tonumber(L, 1);
9008 arg2 = (PLINT)lua_tonumber(L, 2);
9009 arg3 = (PLINT)lua_tonumber(L, 3);
9010 plscolbg(arg1,arg2,arg3);
9011
9012 return SWIG_arg;
9013
9014 fail: SWIGUNUSED;
9015 lua_error(L);
9016 return 0;
9017}
9018
9019
9020static int _wrap_scolbga(lua_State* L) {
9021 int SWIG_arg = 0;
9022 PLINT arg1 ;
9023 PLINT arg2 ;
9024 PLINT arg3 ;
9025 PLFLT arg4 ;
9026
9027 SWIG_check_num_args("plscolbga",4,4)
9028 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolbga",1,"PLINT");
9029 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscolbga",2,"PLINT");
9030 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscolbga",3,"PLINT");
9031 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscolbga",4,"PLFLT");
9032 arg1 = (PLINT)lua_tonumber(L, 1);
9033 arg2 = (PLINT)lua_tonumber(L, 2);
9034 arg3 = (PLINT)lua_tonumber(L, 3);
9035 arg4 = (PLFLT)lua_tonumber(L, 4);
9036 plscolbga(arg1,arg2,arg3,arg4);
9037
9038 return SWIG_arg;
9039
9040 fail: SWIGUNUSED;
9041 lua_error(L);
9042 return 0;
9043}
9044
9045
9046static int _wrap_scolor(lua_State* L) {
9047 int SWIG_arg = 0;
9048 PLINT arg1 ;
9049
9050 SWIG_check_num_args("plscolor",1,1)
9051 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolor",1,"PLINT");
9052 arg1 = (PLINT)lua_tonumber(L, 1);
9053 plscolor(arg1);
9054
9055 return SWIG_arg;
9056
9057 fail: SWIGUNUSED;
9058 lua_error(L);
9059 return 0;
9060}
9061
9062
9063static int _wrap_scompression(lua_State* L) {
9064 int SWIG_arg = 0;
9065 PLINT arg1 ;
9066
9067 SWIG_check_num_args("plscompression",1,1)
9068 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscompression",1,"PLINT");
9069 arg1 = (PLINT)lua_tonumber(L, 1);
9070 plscompression(arg1);
9071
9072 return SWIG_arg;
9073
9074 fail: SWIGUNUSED;
9075 lua_error(L);
9076 return 0;
9077}
9078
9079
9080static int _wrap_sdev(lua_State* L) {
9081 int SWIG_arg = 0;
9082 char *arg1 = (char *) 0 ;
9083
9084 SWIG_check_num_args("plsdev",1,1)
9085 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsdev",1,"char const *");
9086 arg1 = (char *)lua_tostring(L, 1);
9087 plsdev((char const *)arg1);
9088
9089 return SWIG_arg;
9090
9091 fail: SWIGUNUSED;
9092 lua_error(L);
9093 return 0;
9094}
9095
9096
9097static int _wrap_sdidev(lua_State* L) {
9098 int SWIG_arg = 0;
9099 PLFLT arg1 ;
9100 PLFLT arg2 ;
9101 PLFLT arg3 ;
9102 PLFLT arg4 ;
9103
9104 SWIG_check_num_args("plsdidev",4,4)
9105 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdidev",1,"PLFLT");
9106 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdidev",2,"PLFLT");
9107 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdidev",3,"PLFLT");
9108 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdidev",4,"PLFLT");
9109 arg1 = (PLFLT)lua_tonumber(L, 1);
9110 arg2 = (PLFLT)lua_tonumber(L, 2);
9111 arg3 = (PLFLT)lua_tonumber(L, 3);
9112 arg4 = (PLFLT)lua_tonumber(L, 4);
9113 plsdidev(arg1,arg2,arg3,arg4);
9114
9115 return SWIG_arg;
9116
9117 fail: SWIGUNUSED;
9118 lua_error(L);
9119 return 0;
9120}
9121
9122
9123static int _wrap_sdimap(lua_State* L) {
9124 int SWIG_arg = 0;
9125 PLINT arg1 ;
9126 PLINT arg2 ;
9127 PLINT arg3 ;
9128 PLINT arg4 ;
9129 PLFLT arg5 ;
9130 PLFLT arg6 ;
9131
9132 SWIG_check_num_args("plsdimap",6,6)
9133 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdimap",1,"PLINT");
9134 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdimap",2,"PLINT");
9135 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdimap",3,"PLINT");
9136 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdimap",4,"PLINT");
9137 if(!lua_isnumber(L,5)) SWIG_fail_arg("plsdimap",5,"PLFLT");
9138 if(!lua_isnumber(L,6)) SWIG_fail_arg("plsdimap",6,"PLFLT");
9139 arg1 = (PLINT)lua_tonumber(L, 1);
9140 arg2 = (PLINT)lua_tonumber(L, 2);
9141 arg3 = (PLINT)lua_tonumber(L, 3);
9142 arg4 = (PLINT)lua_tonumber(L, 4);
9143 arg5 = (PLFLT)lua_tonumber(L, 5);
9144 arg6 = (PLFLT)lua_tonumber(L, 6);
9145 plsdimap(arg1,arg2,arg3,arg4,arg5,arg6);
9146
9147 return SWIG_arg;
9148
9149 fail: SWIGUNUSED;
9150 lua_error(L);
9151 return 0;
9152}
9153
9154
9155static int _wrap_sdiori(lua_State* L) {
9156 int SWIG_arg = 0;
9157 PLFLT arg1 ;
9158
9159 SWIG_check_num_args("plsdiori",1,1)
9160 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiori",1,"PLFLT");
9161 arg1 = (PLFLT)lua_tonumber(L, 1);
9162 plsdiori(arg1);
9163
9164 return SWIG_arg;
9165
9166 fail: SWIGUNUSED;
9167 lua_error(L);
9168 return 0;
9169}
9170
9171
9172static int _wrap_sdiplt(lua_State* L) {
9173 int SWIG_arg = 0;
9174 PLFLT arg1 ;
9175 PLFLT arg2 ;
9176 PLFLT arg3 ;
9177 PLFLT arg4 ;
9178
9179 SWIG_check_num_args("plsdiplt",4,4)
9180 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiplt",1,"PLFLT");
9181 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdiplt",2,"PLFLT");
9182 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdiplt",3,"PLFLT");
9183 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdiplt",4,"PLFLT");
9184 arg1 = (PLFLT)lua_tonumber(L, 1);
9185 arg2 = (PLFLT)lua_tonumber(L, 2);
9186 arg3 = (PLFLT)lua_tonumber(L, 3);
9187 arg4 = (PLFLT)lua_tonumber(L, 4);
9188 plsdiplt(arg1,arg2,arg3,arg4);
9189
9190 return SWIG_arg;
9191
9192 fail: SWIGUNUSED;
9193 lua_error(L);
9194 return 0;
9195}
9196
9197
9198static int _wrap_sdiplz(lua_State* L) {
9199 int SWIG_arg = 0;
9200 PLFLT arg1 ;
9201 PLFLT arg2 ;
9202 PLFLT arg3 ;
9203 PLFLT arg4 ;
9204
9205 SWIG_check_num_args("plsdiplz",4,4)
9206 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiplz",1,"PLFLT");
9207 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdiplz",2,"PLFLT");
9208 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdiplz",3,"PLFLT");
9209 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdiplz",4,"PLFLT");
9210 arg1 = (PLFLT)lua_tonumber(L, 1);
9211 arg2 = (PLFLT)lua_tonumber(L, 2);
9212 arg3 = (PLFLT)lua_tonumber(L, 3);
9213 arg4 = (PLFLT)lua_tonumber(L, 4);
9214 plsdiplz(arg1,arg2,arg3,arg4);
9215
9216 return SWIG_arg;
9217
9218 fail: SWIGUNUSED;
9219 lua_error(L);
9220 return 0;
9221}
9222
9223
9224static int _wrap_seed(lua_State* L) {
9225 int SWIG_arg = 0;
9226 unsigned int arg1 ;
9227
9228 SWIG_check_num_args("plseed",1,1)
9229 if(!lua_isnumber(L,1)) SWIG_fail_arg("plseed",1,"unsigned int");
9230 SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
9231 arg1 = (unsigned int)lua_tonumber(L, 1);
9232 plseed(arg1);
9233
9234 return SWIG_arg;
9235
9236 fail: SWIGUNUSED;
9237 lua_error(L);
9238 return 0;
9239}
9240
9241
9242static int _wrap_sesc(lua_State* L) {
9243 int SWIG_arg = 0;
9244 char arg1 ;
9245
9246 SWIG_check_num_args("plsesc",1,1)
9247 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsesc",1,"char");
9248 arg1 = (lua_tostring(L, 1))[0];
9249 plsesc(arg1);
9250
9251 return SWIG_arg;
9252
9253 fail: SWIGUNUSED;
9254 lua_error(L);
9255 return 0;
9256}
9257
9258
9259static int _wrap_setopt(lua_State* L) {
9260 int SWIG_arg = 0;
9261 char *arg1 = (char *) 0 ;
9262 char *arg2 = (char *) 0 ;
9263 PLINT result;
9264
9265 SWIG_check_num_args("plsetopt",2,2)
9266 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsetopt",1,"char const *");
9267 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plsetopt",2,"char const *");
9268 arg1 = (char *)lua_tostring(L, 1);
9269 arg2 = (char *)lua_tostring(L, 2);
9270 result = (PLINT)plsetopt((char const *)arg1,(char const *)arg2);
9271 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
9272 return SWIG_arg;
9273
9274 fail: SWIGUNUSED;
9275 lua_error(L);
9276 return 0;
9277}
9278
9279
9280static int _wrap_sfam(lua_State* L) {
9281 int SWIG_arg = 0;
9282 PLINT arg1 ;
9283 PLINT arg2 ;
9284 PLINT arg3 ;
9285
9286 SWIG_check_num_args("plsfam",3,3)
9287 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfam",1,"PLINT");
9288 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsfam",2,"PLINT");
9289 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsfam",3,"PLINT");
9290 arg1 = (PLINT)lua_tonumber(L, 1);
9291 arg2 = (PLINT)lua_tonumber(L, 2);
9292 arg3 = (PLINT)lua_tonumber(L, 3);
9293 plsfam(arg1,arg2,arg3);
9294
9295 return SWIG_arg;
9296
9297 fail: SWIGUNUSED;
9298 lua_error(L);
9299 return 0;
9300}
9301
9302
9303static int _wrap_sfci(lua_State* L) {
9304 int SWIG_arg = 0;
9305 PLUNICODE arg1 ;
9306
9307 SWIG_check_num_args("plsfci",1,1)
9308 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfci",1,"PLUNICODE");
9309 SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
9310 arg1 = (PLUNICODE)lua_tonumber(L, 1);
9311 plsfci(arg1);
9312
9313 return SWIG_arg;
9314
9315 fail: SWIGUNUSED;
9316 lua_error(L);
9317 return 0;
9318}
9319
9320
9321static int _wrap_sfnam(lua_State* L) {
9322 int SWIG_arg = 0;
9323 char *arg1 = (char *) 0 ;
9324
9325 SWIG_check_num_args("plsfnam",1,1)
9326 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsfnam",1,"char const *");
9327 arg1 = (char *)lua_tostring(L, 1);
9328 plsfnam((char const *)arg1);
9329
9330 return SWIG_arg;
9331
9332 fail: SWIGUNUSED;
9333 lua_error(L);
9334 return 0;
9335}
9336
9337
9338static int _wrap_sfont(lua_State* L) {
9339 int SWIG_arg = 0;
9340 PLINT arg1 ;
9341 PLINT arg2 ;
9342 PLINT arg3 ;
9343
9344 SWIG_check_num_args("plsfont",3,3)
9345 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfont",1,"PLINT");
9346 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsfont",2,"PLINT");
9347 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsfont",3,"PLINT");
9348 arg1 = (PLINT)lua_tonumber(L, 1);
9349 arg2 = (PLINT)lua_tonumber(L, 2);
9350 arg3 = (PLINT)lua_tonumber(L, 3);
9351 plsfont(arg1,arg2,arg3);
9352
9353 return SWIG_arg;
9354
9355 fail: SWIGUNUSED;
9356 lua_error(L);
9357 return 0;
9358}
9359
9360
9361static int _wrap_shades(lua_State* L) {
9362 int SWIG_arg = 0;
9363 PLFLT **arg1 = (PLFLT **) 0 ;
9364 PLINT arg2 ;
9365 PLINT arg3 ;
9366 defined_func arg4 = (defined_func) 0 ;
9367 PLFLT arg5 ;
9368 PLFLT arg6 ;
9369 PLFLT arg7 ;
9370 PLFLT arg8 ;
9371 PLFLT *arg9 = (PLFLT *) 0 ;
9372 PLINT arg10 ;
9373 PLFLT arg11 ;
9374 PLINT arg12 ;
9375 PLFLT arg13 ;
9376 fill_func arg14 = (fill_func) 0 ;
9377 PLBOOL arg15 ;
9378 pltr_func arg16 = (pltr_func) 0 ;
9379 PLPointer arg17 = (PLPointer) 0 ;
9380 int ii1 ;
9381 PLcGrid cgrid117 ;
9382 PLcGrid2 cgrid217 ;
9383
9384 {
9385 cgrid117.xg = cgrid117.yg = cgrid117.zg = NULL;
9386 cgrid117.nx = cgrid117.ny = cgrid117.nz = 0;
9387 cgrid217.xg = cgrid217.yg = cgrid217.zg = NULL;
9388 cgrid217.nx = cgrid217.ny = 0;
9389 }
9390 {
9391 arg16 = NULL;
9392 }
9393 {
9394 arg17 = NULL;
9395 }
9396 {
9397 arg4 = NULL;
9398 }
9399 {
9400 arg14 = plfill;
9401 }
9402 SWIG_check_num_args("plshades",10,12)
9403 if(!lua_isnumber(L,2)) SWIG_fail_arg("plshades",2,"PLFLT");
9404 if(!lua_isnumber(L,3)) SWIG_fail_arg("plshades",3,"PLFLT");
9405 if(!lua_isnumber(L,4)) SWIG_fail_arg("plshades",4,"PLFLT");
9406 if(!lua_isnumber(L,5)) SWIG_fail_arg("plshades",5,"PLFLT");
9407 if(!lua_isnumber(L,7)) SWIG_fail_arg("plshades",7,"PLFLT");
9408 if(!lua_isnumber(L,8)) SWIG_fail_arg("plshades",8,"PLINT");
9409 if(!lua_isnumber(L,9)) SWIG_fail_arg("plshades",9,"PLFLT");
9410 if(!lua_isnumber(L,10)) SWIG_fail_arg("plshades",10,"PLBOOL");
9411 {
9412 int jj;
9413
9414 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
9415 if ( !arg1 )
9416 SWIG_fail;
9417 Xlen = arg2 = ii1;
9418 Ylen = arg3 = jj;
9419 }
9420 arg5 = (PLFLT)lua_tonumber(L, 2);
9421 arg6 = (PLFLT)lua_tonumber(L, 3);
9422 arg7 = (PLFLT)lua_tonumber(L, 4);
9423 arg8 = (PLFLT)lua_tonumber(L, 5);
9424 {
9425 int temp;
9426 arg9 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp );
9427 if ( !arg9 )
9428 SWIG_fail;
9429 arg10 = Alen = temp;
9430 }
9431 arg11 = (PLFLT)lua_tonumber(L, 7);
9432 arg12 = (PLINT)lua_tonumber(L, 8);
9433 arg13 = (PLFLT)lua_tonumber(L, 9);
9434 arg15 = (PLBOOL)lua_tonumber(L, 10);
9435 if(lua_gettop(L)>=11){
9436 {
9437 arg16 = NULL;
9438 mypltr_funcstr[0] = '\0';
9439
9440 if ( lua_isstring( L, 11 ) )
9441 {
9442 const char* funcstr = lua_tostring( L, 11 );
9443 if ( strcmp( "pltr0", funcstr ) == 0 )
9444 {
9445 arg16 = pltr0;
9446 }
9447 else if ( strcmp( "pltr1", funcstr ) == 0 )
9448 {
9449 arg16 = pltr1;
9450 }
9451 else if ( strcmp( "pltr2", funcstr ) == 0 )
9452 {
9453 arg16 = pltr2;
9454 }
9455 else
9456 {
9457 arg16 = mypltr;
9458 strncpy( mypltr_funcstr, funcstr, 255 );
9459 myL = L;
9460 }
9461 }
9462 else
9463 SWIG_fail_arg( "shades", 16, "pltr_func" );
9464 }
9465 }
9466 if(lua_gettop(L)>=12){
9467 {
9468 int nx, ny;
9469 int gridmode = 0;
9470
9471 lua_pushstring( L, "xg" );
9472 lua_gettable( L, 12 );
9473 if ( !lua_istable( L, -1 ) )
9474 {
9475 lua_pop( L, 1 ); // pop "xg"
9476 lua_pushstring( L, "expected a table xg" );
9477 SWIG_fail;
9478 }
9479 lua_rawgeti( L, -1, 1 );
9480 if ( lua_istable( L, -1 ) )
9481 gridmode = 2; // two dimensional array
9482 else if ( lua_isnumber( L, -1 ) )
9483 gridmode = 1; // one dimensional array
9484 else
9485 {
9486 lua_pop( L, 1 ); // pop "1"
9487 lua_pop( L, 1 ); // pop "xg"
9488 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
9489 SWIG_fail;
9490 }
9491 lua_pop( L, 1 ); // pop test element
9492 if ( gridmode == 1 )
9493 {
9494 cgrid117.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
9495 if ( !cgrid117.xg )
9496 {
9497 lua_pop( L, 1 ); // pop "xg"
9498 SWIG_fail;
9499 }
9500 if ( nx != Xlen )
9501 {
9502 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
9503 SWIG_fail;
9504 }
9505 cgrid117.nx = nx;
9506 }
9507 else
9508 {
9509 cgrid217.xg = read_double_Matrix( L, -1, &nx, &ny );
9510 if ( !cgrid217.xg )
9511 {
9512 lua_pop( L, 1 ); // pop "xg"
9513 SWIG_fail;
9514 }
9515 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9516 {
9517 lua_pop( L, 1 ); // pop "xg"
9518 lua_pushfstring( L, "Vectors must match matrix." );
9519 SWIG_fail;
9520 }
9521 cgrid217.nx = nx;
9522 cgrid217.ny = ny;
9523 }
9524 lua_pop( L, 1 ); // pop "xg"
9525
9526 lua_pushstring( L, "yg" );
9527 lua_gettable( L, 12 );
9528 if ( !lua_istable( L, -1 ) )
9529 {
9530 lua_pop( L, 1 );
9531 lua_pushstring( L, "expected a table yg" );
9532 SWIG_fail;
9533 }
9534 lua_rawgeti( L, -1, 1 );
9535 if ( gridmode == 2 )
9536 {
9537 if ( !lua_istable( L, -1 ) )
9538 {
9539 lua_pop( L, 1 ); // pop "1"
9540 lua_pop( L, 1 ); // pop "yg"
9541 lua_pushstring( L, "expected a two dimensional array/table in yg" );
9542 SWIG_fail;
9543 }
9544 }
9545 else
9546 {
9547 if ( !lua_isnumber( L, -1 ) )
9548 {
9549 lua_pop( L, 1 ); // pop "1"
9550 lua_pop( L, 1 ); // pop "yg"
9551 lua_pushstring( L, "expected a one dimensional array/table in yg" );
9552 SWIG_fail;
9553 }
9554 }
9555 lua_pop( L, 1 ); // pop "1"
9556 if ( gridmode == 1 )
9557 {
9558 cgrid117.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
9559 if ( !cgrid117.yg )
9560 {
9561 lua_pop( L, 1 ); // pop "yg"
9562 SWIG_fail;
9563 }
9564 if ( ny != Ylen )
9565 {
9566 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
9567 SWIG_fail;
9568 }
9569 cgrid117.ny = ny;
9570 }
9571 else
9572 {
9573 cgrid217.yg = read_double_Matrix( L, -1, &nx, &ny );
9574 if ( !cgrid217.yg )
9575 {
9576 lua_pop( L, 1 ); // pop "xg"
9577 SWIG_fail;
9578 }
9579 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9580 {
9581 lua_pop( L, 1 ); // pop "xg"
9582 lua_pushfstring( L, "Vectors must match matrix." );
9583 SWIG_fail;
9584 }
9585 // cgrid217.nx/ny already set
9586 }
9587 lua_pop( L, 1 ); // pop "yg"
9588
9589 if ( gridmode == 1 )
9590 arg17 = &cgrid117;
9591 else if ( gridmode == 2 )
9592 arg17 = &cgrid217;
9593 }
9594 }
9595 plshades((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,(double const *)arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
9596
9597 {
9598 int i;
9599
9600 if ( arg1 )
9601 {
9602 for ( i = 0; i < ii1; i++ )
9603 LUA_FREE_ARRAY( arg1[i] );
9604 LUA_FREE_ARRAY( arg1 );
9605 }
9606 }
9607 {
9608 LUA_FREE_ARRAY( arg9 );
9609 }
9610 {
9611 mypltr_funcstr[0] = '\0';
9612 }
9613 {
9614 int i;
9615
9616 LUA_FREE_ARRAY( cgrid117.xg );
9617 LUA_FREE_ARRAY( cgrid117.yg );
9618
9619 if ( cgrid217.xg )
9620 {
9621 for ( i = 0; i < Xlen; i++ )
9622 LUA_FREE_ARRAY( cgrid217.xg[i] );
9623 LUA_FREE_ARRAY( cgrid217.xg );
9624 }
9625 if ( cgrid217.yg )
9626 {
9627 for ( i = 0; i < Xlen; i++ )
9628 LUA_FREE_ARRAY( cgrid217.yg[i] );
9629 LUA_FREE_ARRAY( cgrid217.yg );
9630 }
9631 }
9632 return SWIG_arg;
9633
9634 fail: SWIGUNUSED;
9635 {
9636 int i;
9637
9638 if ( arg1 )
9639 {
9640 for ( i = 0; i < ii1; i++ )
9641 LUA_FREE_ARRAY( arg1[i] );
9642 LUA_FREE_ARRAY( arg1 );
9643 }
9644 }
9645 {
9646 LUA_FREE_ARRAY( arg9 );
9647 }
9648 {
9649 mypltr_funcstr[0] = '\0';
9650 }
9651 {
9652 int i;
9653
9654 LUA_FREE_ARRAY( cgrid117.xg );
9655 LUA_FREE_ARRAY( cgrid117.yg );
9656
9657 if ( cgrid217.xg )
9658 {
9659 for ( i = 0; i < Xlen; i++ )
9660 LUA_FREE_ARRAY( cgrid217.xg[i] );
9661 LUA_FREE_ARRAY( cgrid217.xg );
9662 }
9663 if ( cgrid217.yg )
9664 {
9665 for ( i = 0; i < Xlen; i++ )
9666 LUA_FREE_ARRAY( cgrid217.yg[i] );
9667 LUA_FREE_ARRAY( cgrid217.yg );
9668 }
9669 }
9670 lua_error(L);
9671 return 0;
9672}
9673
9674
9675static int _wrap_shade(lua_State* L) {
9676 int SWIG_arg = 0;
9677 PLFLT **arg1 = (PLFLT **) 0 ;
9678 PLINT arg2 ;
9679 PLINT arg3 ;
9680 defined_func arg4 = (defined_func) 0 ;
9681 PLFLT arg5 ;
9682 PLFLT arg6 ;
9683 PLFLT arg7 ;
9684 PLFLT arg8 ;
9685 PLFLT arg9 ;
9686 PLFLT arg10 ;
9687 PLINT arg11 ;
9688 PLFLT arg12 ;
9689 PLFLT arg13 ;
9690 PLINT arg14 ;
9691 PLFLT arg15 ;
9692 PLINT arg16 ;
9693 PLFLT arg17 ;
9694 fill_func arg18 = (fill_func) 0 ;
9695 PLBOOL arg19 ;
9696 pltr_func arg20 = (pltr_func) 0 ;
9697 PLPointer arg21 = (PLPointer) 0 ;
9698 int ii1 ;
9699 PLcGrid cgrid121 ;
9700 PLcGrid2 cgrid221 ;
9701
9702 {
9703 cgrid121.xg = cgrid121.yg = cgrid121.zg = NULL;
9704 cgrid121.nx = cgrid121.ny = cgrid121.nz = 0;
9705 cgrid221.xg = cgrid221.yg = cgrid221.zg = NULL;
9706 cgrid221.nx = cgrid221.ny = 0;
9707 }
9708 {
9709 arg20 = NULL;
9710 }
9711 {
9712 arg21 = NULL;
9713 }
9714 {
9715 arg4 = NULL;
9716 }
9717 {
9718 arg18 = plfill;
9719 }
9720 SWIG_check_num_args("plshade",15,17)
9721 if(!lua_isnumber(L,2)) SWIG_fail_arg("plshade",2,"PLFLT");
9722 if(!lua_isnumber(L,3)) SWIG_fail_arg("plshade",3,"PLFLT");
9723 if(!lua_isnumber(L,4)) SWIG_fail_arg("plshade",4,"PLFLT");
9724 if(!lua_isnumber(L,5)) SWIG_fail_arg("plshade",5,"PLFLT");
9725 if(!lua_isnumber(L,6)) SWIG_fail_arg("plshade",6,"PLFLT");
9726 if(!lua_isnumber(L,7)) SWIG_fail_arg("plshade",7,"PLFLT");
9727 if(!lua_isnumber(L,8)) SWIG_fail_arg("plshade",8,"PLINT");
9728 if(!lua_isnumber(L,9)) SWIG_fail_arg("plshade",9,"PLFLT");
9729 if(!lua_isnumber(L,10)) SWIG_fail_arg("plshade",10,"PLFLT");
9730 if(!lua_isnumber(L,11)) SWIG_fail_arg("plshade",11,"PLINT");
9731 if(!lua_isnumber(L,12)) SWIG_fail_arg("plshade",12,"PLFLT");
9732 if(!lua_isnumber(L,13)) SWIG_fail_arg("plshade",13,"PLINT");
9733 if(!lua_isnumber(L,14)) SWIG_fail_arg("plshade",14,"PLFLT");
9734 if(!lua_isnumber(L,15)) SWIG_fail_arg("plshade",15,"PLBOOL");
9735 {
9736 int jj;
9737
9738 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
9739 if ( !arg1 )
9740 SWIG_fail;
9741 Xlen = arg2 = ii1;
9742 Ylen = arg3 = jj;
9743 }
9744 arg5 = (PLFLT)lua_tonumber(L, 2);
9745 arg6 = (PLFLT)lua_tonumber(L, 3);
9746 arg7 = (PLFLT)lua_tonumber(L, 4);
9747 arg8 = (PLFLT)lua_tonumber(L, 5);
9748 arg9 = (PLFLT)lua_tonumber(L, 6);
9749 arg10 = (PLFLT)lua_tonumber(L, 7);
9750 arg11 = (PLINT)lua_tonumber(L, 8);
9751 arg12 = (PLFLT)lua_tonumber(L, 9);
9752 arg13 = (PLFLT)lua_tonumber(L, 10);
9753 arg14 = (PLINT)lua_tonumber(L, 11);
9754 arg15 = (PLFLT)lua_tonumber(L, 12);
9755 arg16 = (PLINT)lua_tonumber(L, 13);
9756 arg17 = (PLFLT)lua_tonumber(L, 14);
9757 arg19 = (PLBOOL)lua_tonumber(L, 15);
9758 if(lua_gettop(L)>=16){
9759 {
9760 arg20 = NULL;
9761 mypltr_funcstr[0] = '\0';
9762
9763 if ( lua_isstring( L, 16 ) )
9764 {
9765 const char* funcstr = lua_tostring( L, 16 );
9766 if ( strcmp( "pltr0", funcstr ) == 0 )
9767 {
9768 arg20 = pltr0;
9769 }
9770 else if ( strcmp( "pltr1", funcstr ) == 0 )
9771 {
9772 arg20 = pltr1;
9773 }
9774 else if ( strcmp( "pltr2", funcstr ) == 0 )
9775 {
9776 arg20 = pltr2;
9777 }
9778 else
9779 {
9780 arg20 = mypltr;
9781 strncpy( mypltr_funcstr, funcstr, 255 );
9782 myL = L;
9783 }
9784 }
9785 else
9786 SWIG_fail_arg( "shade", 20, "pltr_func" );
9787 }
9788 }
9789 if(lua_gettop(L)>=17){
9790 {
9791 int nx, ny;
9792 int gridmode = 0;
9793
9794 lua_pushstring( L, "xg" );
9795 lua_gettable( L, 17 );
9796 if ( !lua_istable( L, -1 ) )
9797 {
9798 lua_pop( L, 1 ); // pop "xg"
9799 lua_pushstring( L, "expected a table xg" );
9800 SWIG_fail;
9801 }
9802 lua_rawgeti( L, -1, 1 );
9803 if ( lua_istable( L, -1 ) )
9804 gridmode = 2; // two dimensional array
9805 else if ( lua_isnumber( L, -1 ) )
9806 gridmode = 1; // one dimensional array
9807 else
9808 {
9809 lua_pop( L, 1 ); // pop "1"
9810 lua_pop( L, 1 ); // pop "xg"
9811 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
9812 SWIG_fail;
9813 }
9814 lua_pop( L, 1 ); // pop test element
9815 if ( gridmode == 1 )
9816 {
9817 cgrid121.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
9818 if ( !cgrid121.xg )
9819 {
9820 lua_pop( L, 1 ); // pop "xg"
9821 SWIG_fail;
9822 }
9823 if ( nx != Xlen )
9824 {
9825 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
9826 SWIG_fail;
9827 }
9828 cgrid121.nx = nx;
9829 }
9830 else
9831 {
9832 cgrid221.xg = read_double_Matrix( L, -1, &nx, &ny );
9833 if ( !cgrid221.xg )
9834 {
9835 lua_pop( L, 1 ); // pop "xg"
9836 SWIG_fail;
9837 }
9838 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9839 {
9840 lua_pop( L, 1 ); // pop "xg"
9841 lua_pushfstring( L, "Vectors must match matrix." );
9842 SWIG_fail;
9843 }
9844 cgrid221.nx = nx;
9845 cgrid221.ny = ny;
9846 }
9847 lua_pop( L, 1 ); // pop "xg"
9848
9849 lua_pushstring( L, "yg" );
9850 lua_gettable( L, 17 );
9851 if ( !lua_istable( L, -1 ) )
9852 {
9853 lua_pop( L, 1 );
9854 lua_pushstring( L, "expected a table yg" );
9855 SWIG_fail;
9856 }
9857 lua_rawgeti( L, -1, 1 );
9858 if ( gridmode == 2 )
9859 {
9860 if ( !lua_istable( L, -1 ) )
9861 {
9862 lua_pop( L, 1 ); // pop "1"
9863 lua_pop( L, 1 ); // pop "yg"
9864 lua_pushstring( L, "expected a two dimensional array/table in yg" );
9865 SWIG_fail;
9866 }
9867 }
9868 else
9869 {
9870 if ( !lua_isnumber( L, -1 ) )
9871 {
9872 lua_pop( L, 1 ); // pop "1"
9873 lua_pop( L, 1 ); // pop "yg"
9874 lua_pushstring( L, "expected a one dimensional array/table in yg" );
9875 SWIG_fail;
9876 }
9877 }
9878 lua_pop( L, 1 ); // pop "1"
9879 if ( gridmode == 1 )
9880 {
9881 cgrid121.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
9882 if ( !cgrid121.yg )
9883 {
9884 lua_pop( L, 1 ); // pop "yg"
9885 SWIG_fail;
9886 }
9887 if ( ny != Ylen )
9888 {
9889 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
9890 SWIG_fail;
9891 }
9892 cgrid121.ny = ny;
9893 }
9894 else
9895 {
9896 cgrid221.yg = read_double_Matrix( L, -1, &nx, &ny );
9897 if ( !cgrid221.yg )
9898 {
9899 lua_pop( L, 1 ); // pop "xg"
9900 SWIG_fail;
9901 }
9902 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9903 {
9904 lua_pop( L, 1 ); // pop "xg"
9905 lua_pushfstring( L, "Vectors must match matrix." );
9906 SWIG_fail;
9907 }
9908 // cgrid221.nx/ny already set
9909 }
9910 lua_pop( L, 1 ); // pop "yg"
9911
9912 if ( gridmode == 1 )
9913 arg21 = &cgrid121;
9914 else if ( gridmode == 2 )
9915 arg21 = &cgrid221;
9916 }
9917 }
9918 plshade((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21);
9919
9920 {
9921 int i;
9922
9923 if ( arg1 )
9924 {
9925 for ( i = 0; i < ii1; i++ )
9926 LUA_FREE_ARRAY( arg1[i] );
9927 LUA_FREE_ARRAY( arg1 );
9928 }
9929 }
9930 {
9931 mypltr_funcstr[0] = '\0';
9932 }
9933 {
9934 int i;
9935
9936 LUA_FREE_ARRAY( cgrid121.xg );
9937 LUA_FREE_ARRAY( cgrid121.yg );
9938
9939 if ( cgrid221.xg )
9940 {
9941 for ( i = 0; i < Xlen; i++ )
9942 LUA_FREE_ARRAY( cgrid221.xg[i] );
9943 LUA_FREE_ARRAY( cgrid221.xg );
9944 }
9945 if ( cgrid221.yg )
9946 {
9947 for ( i = 0; i < Xlen; i++ )
9948 LUA_FREE_ARRAY( cgrid221.yg[i] );
9949 LUA_FREE_ARRAY( cgrid221.yg );
9950 }
9951 }
9952 return SWIG_arg;
9953
9954 fail: SWIGUNUSED;
9955 {
9956 int i;
9957
9958 if ( arg1 )
9959 {
9960 for ( i = 0; i < ii1; i++ )
9961 LUA_FREE_ARRAY( arg1[i] );
9962 LUA_FREE_ARRAY( arg1 );
9963 }
9964 }
9965 {
9966 mypltr_funcstr[0] = '\0';
9967 }
9968 {
9969 int i;
9970
9971 LUA_FREE_ARRAY( cgrid121.xg );
9972 LUA_FREE_ARRAY( cgrid121.yg );
9973
9974 if ( cgrid221.xg )
9975 {
9976 for ( i = 0; i < Xlen; i++ )
9977 LUA_FREE_ARRAY( cgrid221.xg[i] );
9978 LUA_FREE_ARRAY( cgrid221.xg );
9979 }
9980 if ( cgrid221.yg )
9981 {
9982 for ( i = 0; i < Xlen; i++ )
9983 LUA_FREE_ARRAY( cgrid221.yg[i] );
9984 LUA_FREE_ARRAY( cgrid221.yg );
9985 }
9986 }
9987 lua_error(L);
9988 return 0;
9989}
9990
9991
9992static int _wrap_slabelfunc(lua_State* L) {
9993 int SWIG_arg = 0;
9994 label_func arg1 = (label_func) 0 ;
9995 PLPointer arg2 = (PLPointer) 0 ;
9996
9997 {
9998 arg2 = NULL;
9999 }
10000 SWIG_check_num_args("plslabelfunc",1,1)
10001 {
10002 arg1 = NULL;
10003 mylabel_funcstr[0] = '\0';
10004
10005 if ( lua_isnil( L, 1 ) )
10006 {
10007 arg1 = NULL;
10008 }
10009 else if ( lua_isstring( L, 1 ) )
10010 {
10011 arg1 = mylabel;
10012 strncpy( mylabel_funcstr, lua_tostring( L, 1 ), 255 );
10013 myL = L;
10014 }
10015 else
10016 SWIG_fail_arg( "slabelfunc", 1, "label_func" );
10017 }
10018 plslabelfunc(arg1,arg2);
10019
10020 {
10021
10022 }
10023 return SWIG_arg;
10024
10025 fail: SWIGUNUSED;
10026 {
10027
10028 }
10029 lua_error(L);
10030 return 0;
10031}
10032
10033
10034static int _wrap_smaj(lua_State* L) {
10035 int SWIG_arg = 0;
10036 PLFLT arg1 ;
10037 PLFLT arg2 ;
10038
10039 SWIG_check_num_args("plsmaj",2,2)
10040 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsmaj",1,"PLFLT");
10041 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsmaj",2,"PLFLT");
10042 arg1 = (PLFLT)lua_tonumber(L, 1);
10043 arg2 = (PLFLT)lua_tonumber(L, 2);
10044 plsmaj(arg1,arg2);
10045
10046 return SWIG_arg;
10047
10048 fail: SWIGUNUSED;
10049 lua_error(L);
10050 return 0;
10051}
10052
10053
10054static int _wrap_smin(lua_State* L) {
10055 int SWIG_arg = 0;
10056 PLFLT arg1 ;
10057 PLFLT arg2 ;
10058
10059 SWIG_check_num_args("plsmin",2,2)
10060 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsmin",1,"PLFLT");
10061 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsmin",2,"PLFLT");
10062 arg1 = (PLFLT)lua_tonumber(L, 1);
10063 arg2 = (PLFLT)lua_tonumber(L, 2);
10064 plsmin(arg1,arg2);
10065
10066 return SWIG_arg;
10067
10068 fail: SWIGUNUSED;
10069 lua_error(L);
10070 return 0;
10071}
10072
10073
10074static int _wrap_sori(lua_State* L) {
10075 int SWIG_arg = 0;
10076 PLINT arg1 ;
10077
10078 SWIG_check_num_args("plsori",1,1)
10079 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsori",1,"PLINT");
10080 arg1 = (PLINT)lua_tonumber(L, 1);
10081 plsori(arg1);
10082
10083 return SWIG_arg;
10084
10085 fail: SWIGUNUSED;
10086 lua_error(L);
10087 return 0;
10088}
10089
10090
10091static int _wrap_spage(lua_State* L) {
10092 int SWIG_arg = 0;
10093 PLFLT arg1 ;
10094 PLFLT arg2 ;
10095 PLINT arg3 ;
10096 PLINT arg4 ;
10097 PLINT arg5 ;
10098 PLINT arg6 ;
10099
10100 SWIG_check_num_args("plspage",6,6)
10101 if(!lua_isnumber(L,1)) SWIG_fail_arg("plspage",1,"PLFLT");
10102 if(!lua_isnumber(L,2)) SWIG_fail_arg("plspage",2,"PLFLT");
10103 if(!lua_isnumber(L,3)) SWIG_fail_arg("plspage",3,"PLINT");
10104 if(!lua_isnumber(L,4)) SWIG_fail_arg("plspage",4,"PLINT");
10105 if(!lua_isnumber(L,5)) SWIG_fail_arg("plspage",5,"PLINT");
10106 if(!lua_isnumber(L,6)) SWIG_fail_arg("plspage",6,"PLINT");
10107 arg1 = (PLFLT)lua_tonumber(L, 1);
10108 arg2 = (PLFLT)lua_tonumber(L, 2);
10109 arg3 = (PLINT)lua_tonumber(L, 3);
10110 arg4 = (PLINT)lua_tonumber(L, 4);
10111 arg5 = (PLINT)lua_tonumber(L, 5);
10112 arg6 = (PLINT)lua_tonumber(L, 6);
10113 plspage(arg1,arg2,arg3,arg4,arg5,arg6);
10114
10115 return SWIG_arg;
10116
10117 fail: SWIGUNUSED;
10118 lua_error(L);
10119 return 0;
10120}
10121
10122
10123static int _wrap_spal0(lua_State* L) {
10124 int SWIG_arg = 0;
10125 char *arg1 = (char *) 0 ;
10126
10127 SWIG_check_num_args("plspal0",1,1)
10128 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plspal0",1,"char const *");
10129 arg1 = (char *)lua_tostring(L, 1);
10130 plspal0((char const *)arg1);
10131
10132 return SWIG_arg;
10133
10134 fail: SWIGUNUSED;
10135 lua_error(L);
10136 return 0;
10137}
10138
10139
10140static int _wrap_spal1(lua_State* L) {
10141 int SWIG_arg = 0;
10142 char *arg1 = (char *) 0 ;
10143 PLBOOL arg2 ;
10144
10145 SWIG_check_num_args("plspal1",2,2)
10146 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plspal1",1,"char const *");
10147 if(!lua_isnumber(L,2)) SWIG_fail_arg("plspal1",2,"PLBOOL");
10148 arg1 = (char *)lua_tostring(L, 1);
10149 arg2 = (PLBOOL)lua_tonumber(L, 2);
10150 plspal1((char const *)arg1,arg2);
10151
10152 return SWIG_arg;
10153
10154 fail: SWIGUNUSED;
10155 lua_error(L);
10156 return 0;
10157}
10158
10159
10160static int _wrap_spause(lua_State* L) {
10161 int SWIG_arg = 0;
10162 PLBOOL arg1 ;
10163
10164 SWIG_check_num_args("plspause",1,1)
10165 if(!lua_isnumber(L,1)) SWIG_fail_arg("plspause",1,"PLBOOL");
10166 arg1 = (PLBOOL)lua_tonumber(L, 1);
10167 plspause(arg1);
10168
10169 return SWIG_arg;
10170
10171 fail: SWIGUNUSED;
10172 lua_error(L);
10173 return 0;
10174}
10175
10176
10177static int _wrap_sstrm(lua_State* L) {
10178 int SWIG_arg = 0;
10179 PLINT arg1 ;
10180
10181 SWIG_check_num_args("plsstrm",1,1)
10182 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsstrm",1,"PLINT");
10183 arg1 = (PLINT)lua_tonumber(L, 1);
10184 plsstrm(arg1);
10185
10186 return SWIG_arg;
10187
10188 fail: SWIGUNUSED;
10189 lua_error(L);
10190 return 0;
10191}
10192
10193
10194static int _wrap_ssub(lua_State* L) {
10195 int SWIG_arg = 0;
10196 PLINT arg1 ;
10197 PLINT arg2 ;
10198
10199 SWIG_check_num_args("plssub",2,2)
10200 if(!lua_isnumber(L,1)) SWIG_fail_arg("plssub",1,"PLINT");
10201 if(!lua_isnumber(L,2)) SWIG_fail_arg("plssub",2,"PLINT");
10202 arg1 = (PLINT)lua_tonumber(L, 1);
10203 arg2 = (PLINT)lua_tonumber(L, 2);
10204 plssub(arg1,arg2);
10205
10206 return SWIG_arg;
10207
10208 fail: SWIGUNUSED;
10209 lua_error(L);
10210 return 0;
10211}
10212
10213
10214static int _wrap_ssym(lua_State* L) {
10215 int SWIG_arg = 0;
10216 PLFLT arg1 ;
10217 PLFLT arg2 ;
10218
10219 SWIG_check_num_args("plssym",2,2)
10220 if(!lua_isnumber(L,1)) SWIG_fail_arg("plssym",1,"PLFLT");
10221 if(!lua_isnumber(L,2)) SWIG_fail_arg("plssym",2,"PLFLT");
10222 arg1 = (PLFLT)lua_tonumber(L, 1);
10223 arg2 = (PLFLT)lua_tonumber(L, 2);
10224 plssym(arg1,arg2);
10225
10226 return SWIG_arg;
10227
10228 fail: SWIGUNUSED;
10229 lua_error(L);
10230 return 0;
10231}
10232
10233
10234static int _wrap_star(lua_State* L) {
10235 int SWIG_arg = 0;
10236 PLINT arg1 ;
10237 PLINT arg2 ;
10238
10239 SWIG_check_num_args("plstar",2,2)
10240 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstar",1,"PLINT");
10241 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstar",2,"PLINT");
10242 arg1 = (PLINT)lua_tonumber(L, 1);
10243 arg2 = (PLINT)lua_tonumber(L, 2);
10244 plstar(arg1,arg2);
10245
10246 return SWIG_arg;
10247
10248 fail: SWIGUNUSED;
10249 lua_error(L);
10250 return 0;
10251}
10252
10253
10254static int _wrap_start(lua_State* L) {
10255 int SWIG_arg = 0;
10256 char *arg1 = (char *) 0 ;
10257 PLINT arg2 ;
10258 PLINT arg3 ;
10259
10260 SWIG_check_num_args("plstart",3,3)
10261 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plstart",1,"char const *");
10262 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstart",2,"PLINT");
10263 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstart",3,"PLINT");
10264 arg1 = (char *)lua_tostring(L, 1);
10265 arg2 = (PLINT)lua_tonumber(L, 2);
10266 arg3 = (PLINT)lua_tonumber(L, 3);
10267 plstart((char const *)arg1,arg2,arg3);
10268
10269 return SWIG_arg;
10270
10271 fail: SWIGUNUSED;
10272 lua_error(L);
10273 return 0;
10274}
10275
10276
10277static int _wrap_stransform(lua_State* L) {
10278 int SWIG_arg = 0;
10279 ct_func arg1 = (ct_func) 0 ;
10280 PLPointer arg2 = (PLPointer) 0 ;
10281
10282 {
10283 arg1 = NULL;
10284 myct_funcstr[0] = '\0';
10285 }
10286 {
10287 arg2 = NULL;
10288 }
10289 SWIG_check_num_args("plstransform",0,1)
10290 if(lua_gettop(L)>=1){
10291 {
10292 arg1 = NULL;
10293 myct_funcstr[0] = '\0';
10294
10295 if ( lua_isstring( L, 1 ) )
10296 {
10297 const char* funcstr = lua_tostring( L, 1 );
10298 arg1 = myct;
10299 strncpy( myct_funcstr, funcstr, 255 );
10300 myL = L;
10301 }
10302 else
10303 SWIG_fail_arg( "stransform", 1, "ct_func" );
10304 }
10305 }
10306 plstransform(arg1,arg2);
10307
10308 return SWIG_arg;
10309
10310 fail: SWIGUNUSED;
10311 lua_error(L);
10312 return 0;
10313}
10314
10315
10316static int _wrap_string(lua_State* L) {
10317 int SWIG_arg = 0;
10318 PLINT arg1 ;
10319 PLFLT *arg2 = (PLFLT *) 0 ;
10320 PLFLT *arg3 = (PLFLT *) 0 ;
10321 char *arg4 = (char *) 0 ;
10322 int temp3 ;
10323
10324 SWIG_check_num_args("plstring",3,3)
10325 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plstring",3,"char const *");
10326 {
10327 int temp;
10328 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10329 if ( !arg2 )
10330 SWIG_fail;
10331 arg1 = Alen = temp;
10332 }
10333 {
10334 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10335 if ( !arg3 )
10336 SWIG_fail;
10337 if ( temp3 != Alen )
10338 {
10339 lua_pushfstring( L, "Tables must be of same length." );
10340 SWIG_fail;
10341 }
10342 }
10343 arg4 = (char *)lua_tostring(L, 3);
10344 plstring(arg1,(double const *)arg2,(double const *)arg3,(char const *)arg4);
10345
10346 {
10347 LUA_FREE_ARRAY( arg2 );
10348 }
10349 {
10350 LUA_FREE_ARRAY( arg3 );
10351 }
10352 return SWIG_arg;
10353
10354 fail: SWIGUNUSED;
10355 {
10356 LUA_FREE_ARRAY( arg2 );
10357 }
10358 {
10359 LUA_FREE_ARRAY( arg3 );
10360 }
10361 lua_error(L);
10362 return 0;
10363}
10364
10365
10366static int _wrap_string3(lua_State* L) {
10367 int SWIG_arg = 0;
10368 PLINT arg1 ;
10369 PLFLT *arg2 = (PLFLT *) 0 ;
10370 PLFLT *arg3 = (PLFLT *) 0 ;
10371 PLFLT *arg4 = (PLFLT *) 0 ;
10372 char *arg5 = (char *) 0 ;
10373 int temp3 ;
10374 int temp4 ;
10375
10376 SWIG_check_num_args("plstring3",4,4)
10377 if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("plstring3",4,"char const *");
10378 {
10379 int temp;
10380 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10381 if ( !arg2 )
10382 SWIG_fail;
10383 arg1 = Alen = temp;
10384 }
10385 {
10386 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10387 if ( !arg3 )
10388 SWIG_fail;
10389 if ( temp3 != Alen )
10390 {
10391 lua_pushfstring( L, "Tables must be of same length." );
10392 SWIG_fail;
10393 }
10394 }
10395 {
10396 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
10397 if ( !arg4 )
10398 SWIG_fail;
10399 if ( temp4 != Alen )
10400 {
10401 lua_pushfstring( L, "Tables must be of same length." );
10402 SWIG_fail;
10403 }
10404 }
10405 arg5 = (char *)lua_tostring(L, 4);
10406 plstring3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,(char const *)arg5);
10407
10408 {
10409 LUA_FREE_ARRAY( arg2 );
10410 }
10411 {
10412 LUA_FREE_ARRAY( arg3 );
10413 }
10414 {
10415 LUA_FREE_ARRAY( arg4 );
10416 }
10417 return SWIG_arg;
10418
10419 fail: SWIGUNUSED;
10420 {
10421 LUA_FREE_ARRAY( arg2 );
10422 }
10423 {
10424 LUA_FREE_ARRAY( arg3 );
10425 }
10426 {
10427 LUA_FREE_ARRAY( arg4 );
10428 }
10429 lua_error(L);
10430 return 0;
10431}
10432
10433
10434static int _wrap_stripa(lua_State* L) {
10435 int SWIG_arg = 0;
10436 PLINT arg1 ;
10437 PLINT arg2 ;
10438 PLFLT arg3 ;
10439 PLFLT arg4 ;
10440
10441 SWIG_check_num_args("plstripa",4,4)
10442 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstripa",1,"PLINT");
10443 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstripa",2,"PLINT");
10444 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstripa",3,"PLFLT");
10445 if(!lua_isnumber(L,4)) SWIG_fail_arg("plstripa",4,"PLFLT");
10446 arg1 = (PLINT)lua_tonumber(L, 1);
10447 arg2 = (PLINT)lua_tonumber(L, 2);
10448 arg3 = (PLFLT)lua_tonumber(L, 3);
10449 arg4 = (PLFLT)lua_tonumber(L, 4);
10450 plstripa(arg1,arg2,arg3,arg4);
10451
10452 return SWIG_arg;
10453
10454 fail: SWIGUNUSED;
10455 lua_error(L);
10456 return 0;
10457}
10458
10459
10460static int _wrap_stripc(lua_State* L) {
10461 int SWIG_arg = 0;
10462 PLINT *arg1 = (PLINT *) 0 ;
10463 char *arg2 = (char *) 0 ;
10464 char *arg3 = (char *) 0 ;
10465 PLFLT arg4 ;
10466 PLFLT arg5 ;
10467 PLFLT arg6 ;
10468 PLFLT arg7 ;
10469 PLFLT arg8 ;
10470 PLFLT arg9 ;
10471 PLFLT arg10 ;
10472 PLBOOL arg11 ;
10473 PLBOOL arg12 ;
10474 PLINT arg13 ;
10475 PLINT arg14 ;
10476 PLINT *arg15 = (PLINT *) 0 ;
10477 PLINT *arg16 = (PLINT *) 0 ;
10478 char **arg17 = (char **) (char **)0 ;
10479 char *arg18 = (char *) 0 ;
10480 char *arg19 = (char *) 0 ;
10481 char *arg20 = (char *) 0 ;
10482 PLINT temp1 ;
10483 int temp15 ;
10484 int temp16 ;
10485
10486 {
10487 arg17 = NULL;
10488 }
10489 arg1 = &temp1;
10490 SWIG_check_num_args("plstripc",15,19)
10491 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plstripc",1,"char const *");
10492 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plstripc",2,"char const *");
10493 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstripc",3,"PLFLT");
10494 if(!lua_isnumber(L,4)) SWIG_fail_arg("plstripc",4,"PLFLT");
10495 if(!lua_isnumber(L,5)) SWIG_fail_arg("plstripc",5,"PLFLT");
10496 if(!lua_isnumber(L,6)) SWIG_fail_arg("plstripc",6,"PLFLT");
10497 if(!lua_isnumber(L,7)) SWIG_fail_arg("plstripc",7,"PLFLT");
10498 if(!lua_isnumber(L,8)) SWIG_fail_arg("plstripc",8,"PLFLT");
10499 if(!lua_isnumber(L,9)) SWIG_fail_arg("plstripc",9,"PLFLT");
10500 if(!lua_isnumber(L,10)) SWIG_fail_arg("plstripc",10,"PLBOOL");
10501 if(!lua_isnumber(L,11)) SWIG_fail_arg("plstripc",11,"PLBOOL");
10502 if(!lua_isnumber(L,12)) SWIG_fail_arg("plstripc",12,"PLINT");
10503 if(!lua_isnumber(L,13)) SWIG_fail_arg("plstripc",13,"PLINT");
10504 if(lua_gettop(L)>=16 && !lua_istable(L,16)) SWIG_fail_arg("plstripc",16,"char const *[4]");
10505 if(lua_gettop(L)>=17 && !SWIG_lua_isnilstring(L,17)) SWIG_fail_arg("plstripc",17,"char const *");
10506 if(lua_gettop(L)>=18 && !SWIG_lua_isnilstring(L,18)) SWIG_fail_arg("plstripc",18,"char const *");
10507 if(lua_gettop(L)>=19 && !SWIG_lua_isnilstring(L,19)) SWIG_fail_arg("plstripc",19,"char const *");
10508 arg2 = (char *)lua_tostring(L, 1);
10509 arg3 = (char *)lua_tostring(L, 2);
10510 arg4 = (PLFLT)lua_tonumber(L, 3);
10511 arg5 = (PLFLT)lua_tonumber(L, 4);
10512 arg6 = (PLFLT)lua_tonumber(L, 5);
10513 arg7 = (PLFLT)lua_tonumber(L, 6);
10514 arg8 = (PLFLT)lua_tonumber(L, 7);
10515 arg9 = (PLFLT)lua_tonumber(L, 8);
10516 arg10 = (PLFLT)lua_tonumber(L, 9);
10517 arg11 = (PLBOOL)lua_tonumber(L, 10);
10518 arg12 = (PLBOOL)lua_tonumber(L, 11);
10519 arg13 = (PLINT)lua_tonumber(L, 12);
10520 arg14 = (PLINT)lua_tonumber(L, 13);
10521 {
10522 arg15 = (PLINT *) LUA_get_int_num_array_var( L, 14, &temp15 );
10523 if ( !arg15 )
10524 SWIG_fail;
10525 Alen = temp15;
10526 }
10527 {
10528 arg16 = (PLINT *) LUA_get_int_num_array_var( L, 15, &temp16 );
10529 if ( !arg16 )
10530 SWIG_fail;
10531 if ( temp16 != Alen )
10532 {
10533 lua_pushfstring( L, "Tables must be of same length." );
10534 SWIG_fail;
10535 }
10536 }
10537 if(lua_gettop(L)>=16){
10538 {
10539 int i;
10540 arg17 = NULL;
10541
10542 if ( SWIG_table_size( L, 16 ) != 4 )
10543 {
10544 lua_pushfstring( L, "Requires a sequence of 4 strings." );
10545 SWIG_fail;
10546 }
10547 if ( Alen != 4 )
10548 {
10549 lua_pushfstring( L, "colline and styline args must be length 4." );
10550 SWIG_fail;
10551 }
10552
10553 arg17 = malloc( sizeof ( char* ) * 4 );
10554 for ( i = 1; i <= 4; i++ )
10555 {
10556 lua_rawgeti( L, 16, i );
10557 if ( lua_isstring( L, -1 ) )
10558 {
10559 arg17[i - 1] = (char *) lua_tostring( L, -1 );
10560 }
10561 else
10562 {
10563 lua_pop( L, 1 );
10564 lua_pushfstring( L, "Requires a sequence of 4 strings." );
10565 SWIG_fail;
10566 // arg17 array is freed after 'fail:'
10567 }
10568 lua_pop( L, 1 );
10569 }
10570 }
10571 }
10572 if(lua_gettop(L)>=17){
10573 arg18 = (char *)lua_tostring(L, 17);
10574 }
10575 if(lua_gettop(L)>=18){
10576 arg19 = (char *)lua_tostring(L, 18);
10577 }
10578 if(lua_gettop(L)>=19){
10579 arg20 = (char *)lua_tostring(L, 19);
10580 }
10581 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);
10582
10583 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
10584 {
10585 LUA_FREE_ARRAY( arg15 );
10586 }
10587 {
10588 LUA_FREE_ARRAY( arg16 );
10589 }
10590 {
10591 if ( arg17 )
10592 {
10593 free( arg17 ); arg17 = NULL;
10594 }
10595 }
10596 return SWIG_arg;
10597
10598 fail: SWIGUNUSED;
10599 {
10600 LUA_FREE_ARRAY( arg15 );
10601 }
10602 {
10603 LUA_FREE_ARRAY( arg16 );
10604 }
10605 {
10606 if ( arg17 )
10607 {
10608 free( arg17 ); arg17 = NULL;
10609 }
10610 }
10611 lua_error(L);
10612 return 0;
10613}
10614
10615
10616static int _wrap_stripd(lua_State* L) {
10617 int SWIG_arg = 0;
10618 PLINT arg1 ;
10619
10620 SWIG_check_num_args("plstripd",1,1)
10621 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstripd",1,"PLINT");
10622 arg1 = (PLINT)lua_tonumber(L, 1);
10623 plstripd(arg1);
10624
10625 return SWIG_arg;
10626
10627 fail: SWIGUNUSED;
10628 lua_error(L);
10629 return 0;
10630}
10631
10632
10633static int _wrap_styl(lua_State* L) {
10634 int SWIG_arg = 0;
10635 PLINT arg1 ;
10636 PLINT *arg2 = (PLINT *) 0 ;
10637 PLINT *arg3 = (PLINT *) 0 ;
10638 int temp3 ;
10639
10640 SWIG_check_num_args("plstyl",2,2)
10641 {
10642 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 1, &arg1 );
10643 if ( !arg2 )
10644 SWIG_fail;
10645 Alen = arg1;
10646 }
10647 {
10648 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp3 );
10649 if ( !arg3 )
10650 SWIG_fail;
10651 if ( temp3 != Alen )
10652 {
10653 lua_pushfstring( L, "Tables must be of same length." );
10654 SWIG_fail;
10655 }
10656 }
10657 plstyl(arg1,(int const *)arg2,(int const *)arg3);
10658
10659 {
10660 LUA_FREE_ARRAY( arg2 );
10661 }
10662 {
10663 LUA_FREE_ARRAY( arg3 );
10664 }
10665 return SWIG_arg;
10666
10667 fail: SWIGUNUSED;
10668 {
10669 LUA_FREE_ARRAY( arg2 );
10670 }
10671 {
10672 LUA_FREE_ARRAY( arg3 );
10673 }
10674 lua_error(L);
10675 return 0;
10676}
10677
10678
10679static int _wrap_svect(lua_State* L) {
10680 int SWIG_arg = 0;
10681 PLFLT *arg1 = (PLFLT *) 0 ;
10682 PLFLT *arg2 = (PLFLT *) 0 ;
10683 PLINT arg3 ;
10684 PLBOOL arg4 ;
10685
10686 {
10687 arg2 = NULL; arg3 = 0;
10688 }
10689 {
10690 arg4 = 0;
10691 }
10692 SWIG_check_num_args("plsvect",1,3)
10693 if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("plsvect",3,"PLBOOL");
10694 {
10695 int temp;
10696 if ( lua_isnil( L, 1 ) )
10697 {
10698 arg1 = NULL;
10699 Alen = 0;
10700 }
10701 else
10702 {
10703 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10704 if ( !arg1 )
10705 SWIG_fail;
10706 Alen = temp;
10707 }
10708 }
10709 if(lua_gettop(L)>=2){
10710 {
10711 int temp = 0;
10712 if ( lua_isnil( L, 2 ) )
10713 {
10714 arg2 = NULL;
10715 }
10716 else
10717 {
10718 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
10719 if ( !arg2 )
10720 SWIG_fail;
10721 if ( temp != Alen )
10722 {
10723 lua_pushfstring( L, "Tables must be of same length." );
10724 SWIG_fail;
10725 }
10726 }
10727 arg3 = temp;
10728 }
10729 }
10730 if(lua_gettop(L)>=3){
10731 arg4 = (PLBOOL)lua_tonumber(L, 3);
10732 }
10733 plsvect((double const *)arg1,(double const *)arg2,arg3,arg4);
10734
10735 {
10736 LUA_FREE_ARRAY( arg2 );
10737 }
10738 return SWIG_arg;
10739
10740 fail: SWIGUNUSED;
10741 {
10742 LUA_FREE_ARRAY( arg2 );
10743 }
10744 lua_error(L);
10745 return 0;
10746}
10747
10748
10749static int _wrap_svpa(lua_State* L) {
10750 int SWIG_arg = 0;
10751 PLFLT arg1 ;
10752 PLFLT arg2 ;
10753 PLFLT arg3 ;
10754 PLFLT arg4 ;
10755
10756 SWIG_check_num_args("plsvpa",4,4)
10757 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsvpa",1,"PLFLT");
10758 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsvpa",2,"PLFLT");
10759 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsvpa",3,"PLFLT");
10760 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsvpa",4,"PLFLT");
10761 arg1 = (PLFLT)lua_tonumber(L, 1);
10762 arg2 = (PLFLT)lua_tonumber(L, 2);
10763 arg3 = (PLFLT)lua_tonumber(L, 3);
10764 arg4 = (PLFLT)lua_tonumber(L, 4);
10765 plsvpa(arg1,arg2,arg3,arg4);
10766
10767 return SWIG_arg;
10768
10769 fail: SWIGUNUSED;
10770 lua_error(L);
10771 return 0;
10772}
10773
10774
10775static int _wrap_sxax(lua_State* L) {
10776 int SWIG_arg = 0;
10777 PLINT arg1 ;
10778 PLINT arg2 ;
10779
10780 SWIG_check_num_args("plsxax",2,2)
10781 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsxax",1,"PLINT");
10782 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsxax",2,"PLINT");
10783 arg1 = (PLINT)lua_tonumber(L, 1);
10784 arg2 = (PLINT)lua_tonumber(L, 2);
10785 plsxax(arg1,arg2);
10786
10787 return SWIG_arg;
10788
10789 fail: SWIGUNUSED;
10790 lua_error(L);
10791 return 0;
10792}
10793
10794
10795static int _wrap_syax(lua_State* L) {
10796 int SWIG_arg = 0;
10797 PLINT arg1 ;
10798 PLINT arg2 ;
10799
10800 SWIG_check_num_args("plsyax",2,2)
10801 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsyax",1,"PLINT");
10802 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsyax",2,"PLINT");
10803 arg1 = (PLINT)lua_tonumber(L, 1);
10804 arg2 = (PLINT)lua_tonumber(L, 2);
10805 plsyax(arg1,arg2);
10806
10807 return SWIG_arg;
10808
10809 fail: SWIGUNUSED;
10810 lua_error(L);
10811 return 0;
10812}
10813
10814
10815static int _wrap_sym(lua_State* L) {
10816 int SWIG_arg = 0;
10817 PLINT arg1 ;
10818 PLFLT *arg2 = (PLFLT *) 0 ;
10819 PLFLT *arg3 = (PLFLT *) 0 ;
10820 PLINT arg4 ;
10821 int temp3 ;
10822
10823 SWIG_check_num_args("plsym",3,3)
10824 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsym",3,"PLINT");
10825 {
10826 int temp;
10827 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10828 if ( !arg2 )
10829 SWIG_fail;
10830 arg1 = Alen = temp;
10831 }
10832 {
10833 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10834 if ( !arg3 )
10835 SWIG_fail;
10836 if ( temp3 != Alen )
10837 {
10838 lua_pushfstring( L, "Tables must be of same length." );
10839 SWIG_fail;
10840 }
10841 }
10842 arg4 = (PLINT)lua_tonumber(L, 3);
10843 plsym(arg1,(double const *)arg2,(double const *)arg3,arg4);
10844
10845 {
10846 LUA_FREE_ARRAY( arg2 );
10847 }
10848 {
10849 LUA_FREE_ARRAY( arg3 );
10850 }
10851 return SWIG_arg;
10852
10853 fail: SWIGUNUSED;
10854 {
10855 LUA_FREE_ARRAY( arg2 );
10856 }
10857 {
10858 LUA_FREE_ARRAY( arg3 );
10859 }
10860 lua_error(L);
10861 return 0;
10862}
10863
10864
10865static int _wrap_szax(lua_State* L) {
10866 int SWIG_arg = 0;
10867 PLINT arg1 ;
10868 PLINT arg2 ;
10869
10870 SWIG_check_num_args("plszax",2,2)
10871 if(!lua_isnumber(L,1)) SWIG_fail_arg("plszax",1,"PLINT");
10872 if(!lua_isnumber(L,2)) SWIG_fail_arg("plszax",2,"PLINT");
10873 arg1 = (PLINT)lua_tonumber(L, 1);
10874 arg2 = (PLINT)lua_tonumber(L, 2);
10875 plszax(arg1,arg2);
10876
10877 return SWIG_arg;
10878
10879 fail: SWIGUNUSED;
10880 lua_error(L);
10881 return 0;
10882}
10883
10884
10885static int _wrap_text(lua_State* L) {
10886 int SWIG_arg = 0;
10887
10888 SWIG_check_num_args("pltext",0,0)
10889 pltext();
10890
10891 return SWIG_arg;
10892
10893 fail: SWIGUNUSED;
10894 lua_error(L);
10895 return 0;
10896}
10897
10898
10899static int _wrap_timefmt(lua_State* L) {
10900 int SWIG_arg = 0;
10901 char *arg1 = (char *) 0 ;
10902
10903 SWIG_check_num_args("pltimefmt",1,1)
10904 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("pltimefmt",1,"char const *");
10905 arg1 = (char *)lua_tostring(L, 1);
10906 pltimefmt((char const *)arg1);
10907
10908 return SWIG_arg;
10909
10910 fail: SWIGUNUSED;
10911 lua_error(L);
10912 return 0;
10913}
10914
10915
10916static int _wrap_vasp(lua_State* L) {
10917 int SWIG_arg = 0;
10918 PLFLT arg1 ;
10919
10920 SWIG_check_num_args("plvasp",1,1)
10921 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvasp",1,"PLFLT");
10922 arg1 = (PLFLT)lua_tonumber(L, 1);
10923 plvasp(arg1);
10924
10925 return SWIG_arg;
10926
10927 fail: SWIGUNUSED;
10928 lua_error(L);
10929 return 0;
10930}
10931
10932
10933static int _wrap_vect(lua_State* L) {
10934 int SWIG_arg = 0;
10935 PLFLT **arg1 = (PLFLT **) 0 ;
10936 PLFLT **arg2 = (PLFLT **) 0 ;
10937 PLINT arg3 ;
10938 PLINT arg4 ;
10939 PLFLT arg5 ;
10940 pltr_func arg6 = (pltr_func) 0 ;
10941 PLPointer arg7 = (PLPointer) 0 ;
10942 int ii1 ;
10943 int ii2 ;
10944 PLcGrid cgrid17 ;
10945 PLcGrid2 cgrid27 ;
10946
10947 {
10948 cgrid17.xg = cgrid17.yg = cgrid17.zg = NULL;
10949 cgrid17.nx = cgrid17.ny = cgrid17.nz = 0;
10950 cgrid27.xg = cgrid27.yg = cgrid27.zg = NULL;
10951 cgrid27.nx = cgrid27.ny = 0;
10952 }
10953 {
10954 arg6 = NULL;
10955 }
10956 {
10957 arg7 = NULL;
10958 }
10959 SWIG_check_num_args("plvect",3,5)
10960 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvect",3,"PLFLT");
10961 {
10962 int jj;
10963
10964 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
10965 if ( !arg1 )
10966 SWIG_fail;
10967 Xlen = ii1;
10968 Ylen = jj;
10969 }
10970 {
10971 int jj;
10972
10973 arg2 = read_double_Matrix( L, 2, &ii2, &jj );
10974 if ( !arg2 )
10975 SWIG_fail;
10976 arg3 = ii2;
10977 arg4 = jj;
10978 if ( ( arg3 != Xlen ) || ( arg4 != Ylen ) )
10979 {
10980 lua_pushfstring( L, "Vectors must match matrix." );
10981 SWIG_fail;
10982 }
10983 }
10984 arg5 = (PLFLT)lua_tonumber(L, 3);
10985 if(lua_gettop(L)>=4){
10986 {
10987 arg6 = NULL;
10988 mypltr_funcstr[0] = '\0';
10989
10990 if ( lua_isstring( L, 4 ) )
10991 {
10992 const char* funcstr = lua_tostring( L, 4 );
10993 if ( strcmp( "pltr0", funcstr ) == 0 )
10994 {
10995 arg6 = pltr0;
10996 }
10997 else if ( strcmp( "pltr1", funcstr ) == 0 )
10998 {
10999 arg6 = pltr1;
11000 }
11001 else if ( strcmp( "pltr2", funcstr ) == 0 )
11002 {
11003 arg6 = pltr2;
11004 }
11005 else
11006 {
11007 arg6 = mypltr;
11008 strncpy( mypltr_funcstr, funcstr, 255 );
11009 myL = L;
11010 }
11011 }
11012 else
11013 SWIG_fail_arg( "vect", 6, "pltr_func" );
11014 }
11015 }
11016 if(lua_gettop(L)>=5){
11017 {
11018 int nx, ny;
11019 int gridmode = 0;
11020
11021 lua_pushstring( L, "xg" );
11022 lua_gettable( L, 5 );
11023 if ( !lua_istable( L, -1 ) )
11024 {
11025 lua_pop( L, 1 ); // pop "xg"
11026 lua_pushstring( L, "expected a table xg" );
11027 SWIG_fail;
11028 }
11029 lua_rawgeti( L, -1, 1 );
11030 if ( lua_istable( L, -1 ) )
11031 gridmode = 2; // two dimensional array
11032 else if ( lua_isnumber( L, -1 ) )
11033 gridmode = 1; // one dimensional array
11034 else
11035 {
11036 lua_pop( L, 1 ); // pop "1"
11037 lua_pop( L, 1 ); // pop "xg"
11038 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
11039 SWIG_fail;
11040 }
11041 lua_pop( L, 1 ); // pop test element
11042 if ( gridmode == 1 )
11043 {
11044 cgrid17.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
11045 if ( !cgrid17.xg )
11046 {
11047 lua_pop( L, 1 ); // pop "xg"
11048 SWIG_fail;
11049 }
11050 if ( nx != Xlen )
11051 {
11052 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
11053 SWIG_fail;
11054 }
11055 cgrid17.nx = nx;
11056 }
11057 else
11058 {
11059 cgrid27.xg = read_double_Matrix( L, -1, &nx, &ny );
11060 if ( !cgrid27.xg )
11061 {
11062 lua_pop( L, 1 ); // pop "xg"
11063 SWIG_fail;
11064 }
11065 if ( ( nx != Xlen ) || ( ny != Ylen ) )
11066 {
11067 lua_pop( L, 1 ); // pop "xg"
11068 lua_pushfstring( L, "Vectors must match matrix." );
11069 SWIG_fail;
11070 }
11071 cgrid27.nx = nx;
11072 cgrid27.ny = ny;
11073 }
11074 lua_pop( L, 1 ); // pop "xg"
11075
11076 lua_pushstring( L, "yg" );
11077 lua_gettable( L, 5 );
11078 if ( !lua_istable( L, -1 ) )
11079 {
11080 lua_pop( L, 1 );
11081 lua_pushstring( L, "expected a table yg" );
11082 SWIG_fail;
11083 }
11084 lua_rawgeti( L, -1, 1 );
11085 if ( gridmode == 2 )
11086 {
11087 if ( !lua_istable( L, -1 ) )
11088 {
11089 lua_pop( L, 1 ); // pop "1"
11090 lua_pop( L, 1 ); // pop "yg"
11091 lua_pushstring( L, "expected a two dimensional array/table in yg" );
11092 SWIG_fail;
11093 }
11094 }
11095 else
11096 {
11097 if ( !lua_isnumber( L, -1 ) )
11098 {
11099 lua_pop( L, 1 ); // pop "1"
11100 lua_pop( L, 1 ); // pop "yg"
11101 lua_pushstring( L, "expected a one dimensional array/table in yg" );
11102 SWIG_fail;
11103 }
11104 }
11105 lua_pop( L, 1 ); // pop "1"
11106 if ( gridmode == 1 )
11107 {
11108 cgrid17.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
11109 if ( !cgrid17.yg )
11110 {
11111 lua_pop( L, 1 ); // pop "yg"
11112 SWIG_fail;
11113 }
11114 if ( ny != Ylen )
11115 {
11116 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
11117 SWIG_fail;
11118 }
11119 cgrid17.ny = ny;
11120 }
11121 else
11122 {
11123 cgrid27.yg = read_double_Matrix( L, -1, &nx, &ny );
11124 if ( !cgrid27.yg )
11125 {
11126 lua_pop( L, 1 ); // pop "xg"
11127 SWIG_fail;
11128 }
11129 if ( ( nx != Xlen ) || ( ny != Ylen ) )
11130 {
11131 lua_pop( L, 1 ); // pop "xg"
11132 lua_pushfstring( L, "Vectors must match matrix." );
11133 SWIG_fail;
11134 }
11135 // cgrid27.nx/ny already set
11136 }
11137 lua_pop( L, 1 ); // pop "yg"
11138
11139 if ( gridmode == 1 )
11140 arg7 = &cgrid17;
11141 else if ( gridmode == 2 )
11142 arg7 = &cgrid27;
11143 }
11144 }
11145 plvect((double const **)arg1,(double const **)arg2,arg3,arg4,arg5,arg6,arg7);
11146
11147 {
11148 int i;
11149
11150 if ( arg1 )
11151 {
11152 for ( i = 0; i < ii1; i++ )
11153 LUA_FREE_ARRAY( arg1[i] );
11154 LUA_FREE_ARRAY( arg1 );
11155 }
11156 }
11157 {
11158 int i;
11159
11160 if ( arg2 )
11161 {
11162 for ( i = 0; i < ii2; i++ )
11163 LUA_FREE_ARRAY( arg2[i] );
11164 LUA_FREE_ARRAY( arg2 );
11165 }
11166 }
11167 {
11168 mypltr_funcstr[0] = '\0';
11169 }
11170 {
11171 int i;
11172
11173 LUA_FREE_ARRAY( cgrid17.xg );
11174 LUA_FREE_ARRAY( cgrid17.yg );
11175
11176 if ( cgrid27.xg )
11177 {
11178 for ( i = 0; i < Xlen; i++ )
11179 LUA_FREE_ARRAY( cgrid27.xg[i] );
11180 LUA_FREE_ARRAY( cgrid27.xg );
11181 }
11182 if ( cgrid27.yg )
11183 {
11184 for ( i = 0; i < Xlen; i++ )
11185 LUA_FREE_ARRAY( cgrid27.yg[i] );
11186 LUA_FREE_ARRAY( cgrid27.yg );
11187 }
11188 }
11189 return SWIG_arg;
11190
11191 fail: SWIGUNUSED;
11192 {
11193 int i;
11194
11195 if ( arg1 )
11196 {
11197 for ( i = 0; i < ii1; i++ )
11198 LUA_FREE_ARRAY( arg1[i] );
11199 LUA_FREE_ARRAY( arg1 );
11200 }
11201 }
11202 {
11203 int i;
11204
11205 if ( arg2 )
11206 {
11207 for ( i = 0; i < ii2; i++ )
11208 LUA_FREE_ARRAY( arg2[i] );
11209 LUA_FREE_ARRAY( arg2 );
11210 }
11211 }
11212 {
11213 mypltr_funcstr[0] = '\0';
11214 }
11215 {
11216 int i;
11217
11218 LUA_FREE_ARRAY( cgrid17.xg );
11219 LUA_FREE_ARRAY( cgrid17.yg );
11220
11221 if ( cgrid27.xg )
11222 {
11223 for ( i = 0; i < Xlen; i++ )
11224 LUA_FREE_ARRAY( cgrid27.xg[i] );
11225 LUA_FREE_ARRAY( cgrid27.xg );
11226 }
11227 if ( cgrid27.yg )
11228 {
11229 for ( i = 0; i < Xlen; i++ )
11230 LUA_FREE_ARRAY( cgrid27.yg[i] );
11231 LUA_FREE_ARRAY( cgrid27.yg );
11232 }
11233 }
11234 lua_error(L);
11235 return 0;
11236}
11237
11238
11239static int _wrap_vpas(lua_State* L) {
11240 int SWIG_arg = 0;
11241 PLFLT arg1 ;
11242 PLFLT arg2 ;
11243 PLFLT arg3 ;
11244 PLFLT arg4 ;
11245 PLFLT arg5 ;
11246
11247 SWIG_check_num_args("plvpas",5,5)
11248 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvpas",1,"PLFLT");
11249 if(!lua_isnumber(L,2)) SWIG_fail_arg("plvpas",2,"PLFLT");
11250 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvpas",3,"PLFLT");
11251 if(!lua_isnumber(L,4)) SWIG_fail_arg("plvpas",4,"PLFLT");
11252 if(!lua_isnumber(L,5)) SWIG_fail_arg("plvpas",5,"PLFLT");
11253 arg1 = (PLFLT)lua_tonumber(L, 1);
11254 arg2 = (PLFLT)lua_tonumber(L, 2);
11255 arg3 = (PLFLT)lua_tonumber(L, 3);
11256 arg4 = (PLFLT)lua_tonumber(L, 4);
11257 arg5 = (PLFLT)lua_tonumber(L, 5);
11258 plvpas(arg1,arg2,arg3,arg4,arg5);
11259
11260 return SWIG_arg;
11261
11262 fail: SWIGUNUSED;
11263 lua_error(L);
11264 return 0;
11265}
11266
11267
11268static int _wrap_vpor(lua_State* L) {
11269 int SWIG_arg = 0;
11270 PLFLT arg1 ;
11271 PLFLT arg2 ;
11272 PLFLT arg3 ;
11273 PLFLT arg4 ;
11274
11275 SWIG_check_num_args("plvpor",4,4)
11276 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvpor",1,"PLFLT");
11277 if(!lua_isnumber(L,2)) SWIG_fail_arg("plvpor",2,"PLFLT");
11278 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvpor",3,"PLFLT");
11279 if(!lua_isnumber(L,4)) SWIG_fail_arg("plvpor",4,"PLFLT");
11280 arg1 = (PLFLT)lua_tonumber(L, 1);
11281 arg2 = (PLFLT)lua_tonumber(L, 2);
11282 arg3 = (PLFLT)lua_tonumber(L, 3);
11283 arg4 = (PLFLT)lua_tonumber(L, 4);
11284 plvpor(arg1,arg2,arg3,arg4);
11285
11286 return SWIG_arg;
11287
11288 fail: SWIGUNUSED;
11289 lua_error(L);
11290 return 0;
11291}
11292
11293
11294static int _wrap_vsta(lua_State* L) {
11295 int SWIG_arg = 0;
11296
11297 SWIG_check_num_args("plvsta",0,0)
11298 plvsta();
11299
11300 return SWIG_arg;
11301
11302 fail: SWIGUNUSED;
11303 lua_error(L);
11304 return 0;
11305}
11306
11307
11308static int _wrap_w3d(lua_State* L) {
11309 int SWIG_arg = 0;
11310 PLFLT arg1 ;
11311 PLFLT arg2 ;
11312 PLFLT arg3 ;
11313 PLFLT arg4 ;
11314 PLFLT arg5 ;
11315 PLFLT arg6 ;
11316 PLFLT arg7 ;
11317 PLFLT arg8 ;
11318 PLFLT arg9 ;
11319 PLFLT arg10 ;
11320 PLFLT arg11 ;
11321
11322 SWIG_check_num_args("plw3d",11,11)
11323 if(!lua_isnumber(L,1)) SWIG_fail_arg("plw3d",1,"PLFLT");
11324 if(!lua_isnumber(L,2)) SWIG_fail_arg("plw3d",2,"PLFLT");
11325 if(!lua_isnumber(L,3)) SWIG_fail_arg("plw3d",3,"PLFLT");
11326 if(!lua_isnumber(L,4)) SWIG_fail_arg("plw3d",4,"PLFLT");
11327 if(!lua_isnumber(L,5)) SWIG_fail_arg("plw3d",5,"PLFLT");
11328 if(!lua_isnumber(L,6)) SWIG_fail_arg("plw3d",6,"PLFLT");
11329 if(!lua_isnumber(L,7)) SWIG_fail_arg("plw3d",7,"PLFLT");
11330 if(!lua_isnumber(L,8)) SWIG_fail_arg("plw3d",8,"PLFLT");
11331 if(!lua_isnumber(L,9)) SWIG_fail_arg("plw3d",9,"PLFLT");
11332 if(!lua_isnumber(L,10)) SWIG_fail_arg("plw3d",10,"PLFLT");
11333 if(!lua_isnumber(L,11)) SWIG_fail_arg("plw3d",11,"PLFLT");
11334 arg1 = (PLFLT)lua_tonumber(L, 1);
11335 arg2 = (PLFLT)lua_tonumber(L, 2);
11336 arg3 = (PLFLT)lua_tonumber(L, 3);
11337 arg4 = (PLFLT)lua_tonumber(L, 4);
11338 arg5 = (PLFLT)lua_tonumber(L, 5);
11339 arg6 = (PLFLT)lua_tonumber(L, 6);
11340 arg7 = (PLFLT)lua_tonumber(L, 7);
11341 arg8 = (PLFLT)lua_tonumber(L, 8);
11342 arg9 = (PLFLT)lua_tonumber(L, 9);
11343 arg10 = (PLFLT)lua_tonumber(L, 10);
11344 arg11 = (PLFLT)lua_tonumber(L, 11);
11345 plw3d(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
11346
11347 return SWIG_arg;
11348
11349 fail: SWIGUNUSED;
11350 lua_error(L);
11351 return 0;
11352}
11353
11354
11355static int _wrap_width(lua_State* L) {
11356 int SWIG_arg = 0;
11357 PLFLT arg1 ;
11358
11359 SWIG_check_num_args("plwidth",1,1)
11360 if(!lua_isnumber(L,1)) SWIG_fail_arg("plwidth",1,"PLFLT");
11361 arg1 = (PLFLT)lua_tonumber(L, 1);
11362 plwidth(arg1);
11363
11364 return SWIG_arg;
11365
11366 fail: SWIGUNUSED;
11367 lua_error(L);
11368 return 0;
11369}
11370
11371
11372static int _wrap_wind(lua_State* L) {
11373 int SWIG_arg = 0;
11374 PLFLT arg1 ;
11375 PLFLT arg2 ;
11376 PLFLT arg3 ;
11377 PLFLT arg4 ;
11378
11379 SWIG_check_num_args("plwind",4,4)
11380 if(!lua_isnumber(L,1)) SWIG_fail_arg("plwind",1,"PLFLT");
11381 if(!lua_isnumber(L,2)) SWIG_fail_arg("plwind",2,"PLFLT");
11382 if(!lua_isnumber(L,3)) SWIG_fail_arg("plwind",3,"PLFLT");
11383 if(!lua_isnumber(L,4)) SWIG_fail_arg("plwind",4,"PLFLT");
11384 arg1 = (PLFLT)lua_tonumber(L, 1);
11385 arg2 = (PLFLT)lua_tonumber(L, 2);
11386 arg3 = (PLFLT)lua_tonumber(L, 3);
11387 arg4 = (PLFLT)lua_tonumber(L, 4);
11388 plwind(arg1,arg2,arg3,arg4);
11389
11390 return SWIG_arg;
11391
11392 fail: SWIGUNUSED;
11393 lua_error(L);
11394 return 0;
11395}
11396
11397
11398static int _wrap_xormod(lua_State* L) {
11399 int SWIG_arg = 0;
11400 PLBOOL arg1 ;
11401 PLBOOL *arg2 = (PLBOOL *) 0 ;
11402 PLBOOL temp2 ;
11403
11404 arg2 = &temp2;
11405 SWIG_check_num_args("plxormod",1,1)
11406 if(!lua_isnumber(L,1)) SWIG_fail_arg("plxormod",1,"PLBOOL");
11407 arg1 = (PLBOOL)lua_tonumber(L, 1);
11408 plxormod(arg1,arg2);
11409
11410 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
11411 return SWIG_arg;
11412
11413 fail: SWIGUNUSED;
11414 lua_error(L);
11415 return 0;
11416}
11417
11418
11419static int _wrap_map(lua_State* L) {
11420 int SWIG_arg = 0;
11421 mapform_func arg1 = (mapform_func) 0 ;
11422 char *arg2 = (char *) 0 ;
11423 PLFLT arg3 ;
11424 PLFLT arg4 ;
11425 PLFLT arg5 ;
11426 PLFLT arg6 ;
11427
11428 SWIG_check_num_args("plmap",6,6)
11429 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmap",2,"char const *");
11430 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmap",3,"PLFLT");
11431 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmap",4,"PLFLT");
11432 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmap",5,"PLFLT");
11433 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmap",6,"PLFLT");
11434 {
11435 arg1 = NULL;
11436 mapform_funcstr[0] = '\0';
11437
11438 if ( lua_isnil( L, 1 ) )
11439 {
11440 arg1 = NULL;
11441 }
11442 else if ( lua_isstring( L, 1 ) )
11443 {
11444 arg1 = mapform;
11445 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11446 myL = L;
11447 }
11448 else
11449 SWIG_fail_arg( "map", 1, "mapform_func" );
11450 }
11451 arg2 = (char *)lua_tostring(L, 2);
11452 arg3 = (PLFLT)lua_tonumber(L, 3);
11453 arg4 = (PLFLT)lua_tonumber(L, 4);
11454 arg5 = (PLFLT)lua_tonumber(L, 5);
11455 arg6 = (PLFLT)lua_tonumber(L, 6);
11456 plmap(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
11457
11458 {
11459 mapform_funcstr[0] = '\0';
11460 }
11461 return SWIG_arg;
11462
11463 fail: SWIGUNUSED;
11464 {
11465 mapform_funcstr[0] = '\0';
11466 }
11467 lua_error(L);
11468 return 0;
11469}
11470
11471
11472static int _wrap_mapline(lua_State* L) {
11473 int SWIG_arg = 0;
11474 mapform_func arg1 = (mapform_func) 0 ;
11475 char *arg2 = (char *) 0 ;
11476 PLFLT arg3 ;
11477 PLFLT arg4 ;
11478 PLFLT arg5 ;
11479 PLFLT arg6 ;
11480 PLINT *arg7 = (PLINT *) 0 ;
11481 PLINT arg8 ;
11482 int temp7 ;
11483
11484 SWIG_check_num_args("plmapline",7,7)
11485 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapline",2,"char const *");
11486 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmapline",3,"PLFLT");
11487 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapline",4,"PLFLT");
11488 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapline",5,"PLFLT");
11489 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapline",6,"PLFLT");
11490 {
11491 arg1 = NULL;
11492 mapform_funcstr[0] = '\0';
11493
11494 if ( lua_isnil( L, 1 ) )
11495 {
11496 arg1 = NULL;
11497 }
11498 else if ( lua_isstring( L, 1 ) )
11499 {
11500 arg1 = mapform;
11501 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11502 myL = L;
11503 }
11504 else
11505 SWIG_fail_arg( "mapline", 1, "mapform_func" );
11506 }
11507 arg2 = (char *)lua_tostring(L, 2);
11508 arg3 = (PLFLT)lua_tonumber(L, 3);
11509 arg4 = (PLFLT)lua_tonumber(L, 4);
11510 arg5 = (PLFLT)lua_tonumber(L, 5);
11511 arg6 = (PLFLT)lua_tonumber(L, 6);
11512 {
11513 if ( lua_isnil( L, 7 ) )
11514 {
11515 arg7 = NULL;
11516 arg8 = 0;
11517 }
11518 else
11519 {
11520 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp7 );
11521 if ( !arg7 )
11522 SWIG_fail;
11523 arg8 = temp7;
11524 }
11525 }
11526 plmapline(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,(int const *)arg7,arg8);
11527
11528 {
11529 mapform_funcstr[0] = '\0';
11530 }
11531 {
11532 LUA_FREE_ARRAY( arg7 );
11533 }
11534 return SWIG_arg;
11535
11536 fail: SWIGUNUSED;
11537 {
11538 mapform_funcstr[0] = '\0';
11539 }
11540 {
11541 LUA_FREE_ARRAY( arg7 );
11542 }
11543 lua_error(L);
11544 return 0;
11545}
11546
11547
11548static int _wrap_mapstring(lua_State* L) {
11549 int SWIG_arg = 0;
11550 mapform_func arg1 = (mapform_func) 0 ;
11551 char *arg2 = (char *) 0 ;
11552 char *arg3 = (char *) 0 ;
11553 PLFLT arg4 ;
11554 PLFLT arg5 ;
11555 PLFLT arg6 ;
11556 PLFLT arg7 ;
11557 PLINT *arg8 = (PLINT *) 0 ;
11558 PLINT arg9 ;
11559 int temp8 ;
11560
11561 SWIG_check_num_args("plmapstring",8,8)
11562 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapstring",2,"char const *");
11563 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plmapstring",3,"char const *");
11564 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapstring",4,"PLFLT");
11565 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapstring",5,"PLFLT");
11566 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapstring",6,"PLFLT");
11567 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmapstring",7,"PLFLT");
11568 {
11569 arg1 = NULL;
11570 mapform_funcstr[0] = '\0';
11571
11572 if ( lua_isnil( L, 1 ) )
11573 {
11574 arg1 = NULL;
11575 }
11576 else if ( lua_isstring( L, 1 ) )
11577 {
11578 arg1 = mapform;
11579 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11580 myL = L;
11581 }
11582 else
11583 SWIG_fail_arg( "mapstring", 1, "mapform_func" );
11584 }
11585 arg2 = (char *)lua_tostring(L, 2);
11586 arg3 = (char *)lua_tostring(L, 3);
11587 arg4 = (PLFLT)lua_tonumber(L, 4);
11588 arg5 = (PLFLT)lua_tonumber(L, 5);
11589 arg6 = (PLFLT)lua_tonumber(L, 6);
11590 arg7 = (PLFLT)lua_tonumber(L, 7);
11591 {
11592 if ( lua_isnil( L, 8 ) )
11593 {
11594 arg8 = NULL;
11595 arg9 = 0;
11596 }
11597 else
11598 {
11599 arg8 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp8 );
11600 if ( !arg8 )
11601 SWIG_fail;
11602 arg9 = temp8;
11603 }
11604 }
11605 plmapstring(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7,(int const *)arg8,arg9);
11606
11607 {
11608 mapform_funcstr[0] = '\0';
11609 }
11610 {
11611 LUA_FREE_ARRAY( arg8 );
11612 }
11613 return SWIG_arg;
11614
11615 fail: SWIGUNUSED;
11616 {
11617 mapform_funcstr[0] = '\0';
11618 }
11619 {
11620 LUA_FREE_ARRAY( arg8 );
11621 }
11622 lua_error(L);
11623 return 0;
11624}
11625
11626
11627static int _wrap_maptex(lua_State* L) {
11628 int SWIG_arg = 0;
11629 mapform_func arg1 = (mapform_func) 0 ;
11630 char *arg2 = (char *) 0 ;
11631 PLFLT arg3 ;
11632 PLFLT arg4 ;
11633 PLFLT arg5 ;
11634 char *arg6 = (char *) 0 ;
11635 PLFLT arg7 ;
11636 PLFLT arg8 ;
11637 PLFLT arg9 ;
11638 PLFLT arg10 ;
11639 PLINT arg11 ;
11640
11641 SWIG_check_num_args("plmaptex",11,11)
11642 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmaptex",2,"char const *");
11643 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmaptex",3,"PLFLT");
11644 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmaptex",4,"PLFLT");
11645 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmaptex",5,"PLFLT");
11646 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plmaptex",6,"char const *");
11647 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmaptex",7,"PLFLT");
11648 if(!lua_isnumber(L,8)) SWIG_fail_arg("plmaptex",8,"PLFLT");
11649 if(!lua_isnumber(L,9)) SWIG_fail_arg("plmaptex",9,"PLFLT");
11650 if(!lua_isnumber(L,10)) SWIG_fail_arg("plmaptex",10,"PLFLT");
11651 if(!lua_isnumber(L,11)) SWIG_fail_arg("plmaptex",11,"PLINT");
11652 {
11653 arg1 = NULL;
11654 mapform_funcstr[0] = '\0';
11655
11656 if ( lua_isnil( L, 1 ) )
11657 {
11658 arg1 = NULL;
11659 }
11660 else if ( lua_isstring( L, 1 ) )
11661 {
11662 arg1 = mapform;
11663 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11664 myL = L;
11665 }
11666 else
11667 SWIG_fail_arg( "maptex", 1, "mapform_func" );
11668 }
11669 arg2 = (char *)lua_tostring(L, 2);
11670 arg3 = (PLFLT)lua_tonumber(L, 3);
11671 arg4 = (PLFLT)lua_tonumber(L, 4);
11672 arg5 = (PLFLT)lua_tonumber(L, 5);
11673 arg6 = (char *)lua_tostring(L, 6);
11674 arg7 = (PLFLT)lua_tonumber(L, 7);
11675 arg8 = (PLFLT)lua_tonumber(L, 8);
11676 arg9 = (PLFLT)lua_tonumber(L, 9);
11677 arg10 = (PLFLT)lua_tonumber(L, 10);
11678 arg11 = (PLINT)lua_tonumber(L, 11);
11679 plmaptex(arg1,(char const *)arg2,arg3,arg4,arg5,(char const *)arg6,arg7,arg8,arg9,arg10,arg11);
11680
11681 {
11682 mapform_funcstr[0] = '\0';
11683 }
11684 return SWIG_arg;
11685
11686 fail: SWIGUNUSED;
11687 {
11688 mapform_funcstr[0] = '\0';
11689 }
11690 lua_error(L);
11691 return 0;
11692}
11693
11694
11695static int _wrap_mapfill(lua_State* L) {
11696 int SWIG_arg = 0;
11697 mapform_func arg1 = (mapform_func) 0 ;
11698 char *arg2 = (char *) 0 ;
11699 PLFLT arg3 ;
11700 PLFLT arg4 ;
11701 PLFLT arg5 ;
11702 PLFLT arg6 ;
11703 PLINT *arg7 = (PLINT *) 0 ;
11704 PLINT arg8 ;
11705 int temp7 ;
11706
11707 SWIG_check_num_args("plmapfill",7,7)
11708 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapfill",2,"char const *");
11709 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmapfill",3,"PLFLT");
11710 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapfill",4,"PLFLT");
11711 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapfill",5,"PLFLT");
11712 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapfill",6,"PLFLT");
11713 {
11714 arg1 = NULL;
11715 mapform_funcstr[0] = '\0';
11716
11717 if ( lua_isnil( L, 1 ) )
11718 {
11719 arg1 = NULL;
11720 }
11721 else if ( lua_isstring( L, 1 ) )
11722 {
11723 arg1 = mapform;
11724 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11725 myL = L;
11726 }
11727 else
11728 SWIG_fail_arg( "mapfill", 1, "mapform_func" );
11729 }
11730 arg2 = (char *)lua_tostring(L, 2);
11731 arg3 = (PLFLT)lua_tonumber(L, 3);
11732 arg4 = (PLFLT)lua_tonumber(L, 4);
11733 arg5 = (PLFLT)lua_tonumber(L, 5);
11734 arg6 = (PLFLT)lua_tonumber(L, 6);
11735 {
11736 if ( lua_isnil( L, 7 ) )
11737 {
11738 arg7 = NULL;
11739 arg8 = 0;
11740 }
11741 else
11742 {
11743 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp7 );
11744 if ( !arg7 )
11745 SWIG_fail;
11746 arg8 = temp7;
11747 }
11748 }
11749 plmapfill(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,(int const *)arg7,arg8);
11750
11751 {
11752 mapform_funcstr[0] = '\0';
11753 }
11754 {
11755 LUA_FREE_ARRAY( arg7 );
11756 }
11757 return SWIG_arg;
11758
11759 fail: SWIGUNUSED;
11760 {
11761 mapform_funcstr[0] = '\0';
11762 }
11763 {
11764 LUA_FREE_ARRAY( arg7 );
11765 }
11766 lua_error(L);
11767 return 0;
11768}
11769
11770
11771static int _wrap_meridians(lua_State* L) {
11772 int SWIG_arg = 0;
11773 mapform_func arg1 = (mapform_func) 0 ;
11774 PLFLT arg2 ;
11775 PLFLT arg3 ;
11776 PLFLT arg4 ;
11777 PLFLT arg5 ;
11778 PLFLT arg6 ;
11779 PLFLT arg7 ;
11780
11781 SWIG_check_num_args("plmeridians",7,7)
11782 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmeridians",2,"PLFLT");
11783 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmeridians",3,"PLFLT");
11784 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmeridians",4,"PLFLT");
11785 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmeridians",5,"PLFLT");
11786 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmeridians",6,"PLFLT");
11787 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmeridians",7,"PLFLT");
11788 {
11789 arg1 = NULL;
11790 mapform_funcstr[0] = '\0';
11791
11792 if ( lua_isnil( L, 1 ) )
11793 {
11794 arg1 = NULL;
11795 }
11796 else if ( lua_isstring( L, 1 ) )
11797 {
11798 arg1 = mapform;
11799 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11800 myL = L;
11801 }
11802 else
11803 SWIG_fail_arg( "meridians", 1, "mapform_func" );
11804 }
11805 arg2 = (PLFLT)lua_tonumber(L, 2);
11806 arg3 = (PLFLT)lua_tonumber(L, 3);
11807 arg4 = (PLFLT)lua_tonumber(L, 4);
11808 arg5 = (PLFLT)lua_tonumber(L, 5);
11809 arg6 = (PLFLT)lua_tonumber(L, 6);
11810 arg7 = (PLFLT)lua_tonumber(L, 7);
11811 plmeridians(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
11812
11813 {
11814 mapform_funcstr[0] = '\0';
11815 }
11816 return SWIG_arg;
11817
11818 fail: SWIGUNUSED;
11819 {
11820 mapform_funcstr[0] = '\0';
11821 }
11822 lua_error(L);
11823 return 0;
11824}
11825
11826
11827static int _wrap_image(lua_State* L) {
11828 int SWIG_arg = 0;
11829 PLFLT **arg1 = (PLFLT **) 0 ;
11830 PLINT arg2 ;
11831 PLINT arg3 ;
11832 PLFLT arg4 ;
11833 PLFLT arg5 ;
11834 PLFLT arg6 ;
11835 PLFLT arg7 ;
11836 PLFLT arg8 ;
11837 PLFLT arg9 ;
11838 PLFLT arg10 ;
11839 PLFLT arg11 ;
11840 PLFLT arg12 ;
11841 PLFLT arg13 ;
11842 int ii1 ;
11843
11844 SWIG_check_num_args("plimage",11,11)
11845 if(!lua_isnumber(L,2)) SWIG_fail_arg("plimage",2,"PLFLT");
11846 if(!lua_isnumber(L,3)) SWIG_fail_arg("plimage",3,"PLFLT");
11847 if(!lua_isnumber(L,4)) SWIG_fail_arg("plimage",4,"PLFLT");
11848 if(!lua_isnumber(L,5)) SWIG_fail_arg("plimage",5,"PLFLT");
11849 if(!lua_isnumber(L,6)) SWIG_fail_arg("plimage",6,"PLFLT");
11850 if(!lua_isnumber(L,7)) SWIG_fail_arg("plimage",7,"PLFLT");
11851 if(!lua_isnumber(L,8)) SWIG_fail_arg("plimage",8,"PLFLT");
11852 if(!lua_isnumber(L,9)) SWIG_fail_arg("plimage",9,"PLFLT");
11853 if(!lua_isnumber(L,10)) SWIG_fail_arg("plimage",10,"PLFLT");
11854 if(!lua_isnumber(L,11)) SWIG_fail_arg("plimage",11,"PLFLT");
11855 {
11856 int jj;
11857
11858 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
11859 if ( !arg1 )
11860 SWIG_fail;
11861 Xlen = arg2 = ii1;
11862 Ylen = arg3 = jj;
11863 }
11864 arg4 = (PLFLT)lua_tonumber(L, 2);
11865 arg5 = (PLFLT)lua_tonumber(L, 3);
11866 arg6 = (PLFLT)lua_tonumber(L, 4);
11867 arg7 = (PLFLT)lua_tonumber(L, 5);
11868 arg8 = (PLFLT)lua_tonumber(L, 6);
11869 arg9 = (PLFLT)lua_tonumber(L, 7);
11870 arg10 = (PLFLT)lua_tonumber(L, 8);
11871 arg11 = (PLFLT)lua_tonumber(L, 9);
11872 arg12 = (PLFLT)lua_tonumber(L, 10);
11873 arg13 = (PLFLT)lua_tonumber(L, 11);
11874 plimage((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
11875
11876 {
11877 int i;
11878
11879 if ( arg1 )
11880 {
11881 for ( i = 0; i < ii1; i++ )
11882 LUA_FREE_ARRAY( arg1[i] );
11883 LUA_FREE_ARRAY( arg1 );
11884 }
11885 }
11886 return SWIG_arg;
11887
11888 fail: SWIGUNUSED;
11889 {
11890 int i;
11891
11892 if ( arg1 )
11893 {
11894 for ( i = 0; i < ii1; i++ )
11895 LUA_FREE_ARRAY( arg1[i] );
11896 LUA_FREE_ARRAY( arg1 );
11897 }
11898 }
11899 lua_error(L);
11900 return 0;
11901}
11902
11903
11904static int _wrap_imagefr(lua_State* L) {
11905 int SWIG_arg = 0;
11906 PLFLT **arg1 = (PLFLT **) 0 ;
11907 PLINT arg2 ;
11908 PLINT arg3 ;
11909 PLFLT arg4 ;
11910 PLFLT arg5 ;
11911 PLFLT arg6 ;
11912 PLFLT arg7 ;
11913 PLFLT arg8 ;
11914 PLFLT arg9 ;
11915 PLFLT arg10 ;
11916 PLFLT arg11 ;
11917 pltr_func arg12 = (pltr_func) 0 ;
11918 PLPointer arg13 = (PLPointer) 0 ;
11919 int ii1 ;
11920 PLcGrid cgrid113 ;
11921 PLcGrid2 cgrid213 ;
11922
11923 {
11924 cgrid113.xg = cgrid113.yg = cgrid113.zg = NULL;
11925 cgrid113.nx = cgrid113.ny = cgrid113.nz = 0;
11926 cgrid213.xg = cgrid213.yg = cgrid213.zg = NULL;
11927 cgrid213.nx = cgrid213.ny = 0;
11928 }
11929 {
11930 arg12 = NULL;
11931 }
11932 {
11933 arg13 = NULL;
11934 }
11935 SWIG_check_num_args("plimagefr",9,11)
11936 if(!lua_isnumber(L,2)) SWIG_fail_arg("plimagefr",2,"PLFLT");
11937 if(!lua_isnumber(L,3)) SWIG_fail_arg("plimagefr",3,"PLFLT");
11938 if(!lua_isnumber(L,4)) SWIG_fail_arg("plimagefr",4,"PLFLT");
11939 if(!lua_isnumber(L,5)) SWIG_fail_arg("plimagefr",5,"PLFLT");
11940 if(!lua_isnumber(L,6)) SWIG_fail_arg("plimagefr",6,"PLFLT");
11941 if(!lua_isnumber(L,7)) SWIG_fail_arg("plimagefr",7,"PLFLT");
11942 if(!lua_isnumber(L,8)) SWIG_fail_arg("plimagefr",8,"PLFLT");
11943 if(!lua_isnumber(L,9)) SWIG_fail_arg("plimagefr",9,"PLFLT");
11944 {
11945 int jj;
11946
11947 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
11948 if ( !arg1 )
11949 SWIG_fail;
11950 Xlen = arg2 = ii1;
11951 Ylen = arg3 = jj;
11952 }
11953 arg4 = (PLFLT)lua_tonumber(L, 2);
11954 arg5 = (PLFLT)lua_tonumber(L, 3);
11955 arg6 = (PLFLT)lua_tonumber(L, 4);
11956 arg7 = (PLFLT)lua_tonumber(L, 5);
11957 arg8 = (PLFLT)lua_tonumber(L, 6);
11958 arg9 = (PLFLT)lua_tonumber(L, 7);
11959 arg10 = (PLFLT)lua_tonumber(L, 8);
11960 arg11 = (PLFLT)lua_tonumber(L, 9);
11961 if(lua_gettop(L)>=10){
11962 {
11963 arg12 = NULL;
11964 mypltr_funcstr[0] = '\0';
11965
11966 if ( lua_isstring( L, 10 ) )
11967 {
11968 const char* funcstr = lua_tostring( L, 10 );
11969 if ( strcmp( "pltr0", funcstr ) == 0 )
11970 {
11971 arg12 = pltr0;
11972 }
11973 else if ( strcmp( "pltr1", funcstr ) == 0 )
11974 {
11975 arg12 = pltr1;
11976 }
11977 else if ( strcmp( "pltr2", funcstr ) == 0 )
11978 {
11979 arg12 = pltr2;
11980 }
11981 else
11982 {
11983 arg12 = mypltr;
11984 strncpy( mypltr_funcstr, funcstr, 255 );
11985 myL = L;
11986 }
11987 }
11988 else
11989 SWIG_fail_arg( "imagefr", 12, "pltr_func" );
11990 }
11991 }
11992 if(lua_gettop(L)>=11){
11993 {
11994 int nx, ny;
11995 int gridmode = 0;
11996
11997 lua_pushstring( L, "xg" );
11998 lua_gettable( L, 11 );
11999 if ( !lua_istable( L, -1 ) )
12000 {
12001 lua_pop( L, 1 ); // pop "xg"
12002 lua_pushstring( L, "expected a table xg" );
12003 SWIG_fail;
12004 }
12005 lua_rawgeti( L, -1, 1 );
12006 if ( lua_istable( L, -1 ) )
12007 gridmode = 2; // two dimensional array
12008 else if ( lua_isnumber( L, -1 ) )
12009 gridmode = 1; // one dimensional array
12010 else
12011 {
12012 lua_pop( L, 1 ); // pop "1"
12013 lua_pop( L, 1 ); // pop "xg"
12014 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
12015 SWIG_fail;
12016 }
12017 lua_pop( L, 1 ); // pop test element
12018 if ( gridmode == 1 )
12019 {
12020 cgrid113.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
12021 if ( !cgrid113.xg )
12022 {
12023 lua_pop( L, 1 ); // pop "xg"
12024 SWIG_fail;
12025 }
12026 if ( nx != Xlen )
12027 {
12028 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
12029 SWIG_fail;
12030 }
12031 cgrid113.nx = nx;
12032 }
12033 else
12034 {
12035 cgrid213.xg = read_double_Matrix( L, -1, &nx, &ny );
12036 if ( !cgrid213.xg )
12037 {
12038 lua_pop( L, 1 ); // pop "xg"
12039 SWIG_fail;
12040 }
12041 if ( ( nx != Xlen ) || ( ny != Ylen ) )
12042 {
12043 lua_pop( L, 1 ); // pop "xg"
12044 lua_pushfstring( L, "Vectors must match matrix." );
12045 SWIG_fail;
12046 }
12047 cgrid213.nx = nx;
12048 cgrid213.ny = ny;
12049 }
12050 lua_pop( L, 1 ); // pop "xg"
12051
12052 lua_pushstring( L, "yg" );
12053 lua_gettable( L, 11 );
12054 if ( !lua_istable( L, -1 ) )
12055 {
12056 lua_pop( L, 1 );
12057 lua_pushstring( L, "expected a table yg" );
12058 SWIG_fail;
12059 }
12060 lua_rawgeti( L, -1, 1 );
12061 if ( gridmode == 2 )
12062 {
12063 if ( !lua_istable( L, -1 ) )
12064 {
12065 lua_pop( L, 1 ); // pop "1"
12066 lua_pop( L, 1 ); // pop "yg"
12067 lua_pushstring( L, "expected a two dimensional array/table in yg" );
12068 SWIG_fail;
12069 }
12070 }
12071 else
12072 {
12073 if ( !lua_isnumber( L, -1 ) )
12074 {
12075 lua_pop( L, 1 ); // pop "1"
12076 lua_pop( L, 1 ); // pop "yg"
12077 lua_pushstring( L, "expected a one dimensional array/table in yg" );
12078 SWIG_fail;
12079 }
12080 }
12081 lua_pop( L, 1 ); // pop "1"
12082 if ( gridmode == 1 )
12083 {
12084 cgrid113.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
12085 if ( !cgrid113.yg )
12086 {
12087 lua_pop( L, 1 ); // pop "yg"
12088 SWIG_fail;
12089 }
12090 if ( ny != Ylen )
12091 {
12092 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
12093 SWIG_fail;
12094 }
12095 cgrid113.ny = ny;
12096 }
12097 else
12098 {
12099 cgrid213.yg = read_double_Matrix( L, -1, &nx, &ny );
12100 if ( !cgrid213.yg )
12101 {
12102 lua_pop( L, 1 ); // pop "xg"
12103 SWIG_fail;
12104 }
12105 if ( ( nx != Xlen ) || ( ny != Ylen ) )
12106 {
12107 lua_pop( L, 1 ); // pop "xg"
12108 lua_pushfstring( L, "Vectors must match matrix." );
12109 SWIG_fail;
12110 }
12111 // cgrid213.nx/ny already set
12112 }
12113 lua_pop( L, 1 ); // pop "yg"
12114
12115 if ( gridmode == 1 )
12116 arg13 = &cgrid113;
12117 else if ( gridmode == 2 )
12118 arg13 = &cgrid213;
12119 }
12120 }
12121 plimagefr((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
12122
12123 {
12124 int i;
12125
12126 if ( arg1 )
12127 {
12128 for ( i = 0; i < ii1; i++ )
12129 LUA_FREE_ARRAY( arg1[i] );
12130 LUA_FREE_ARRAY( arg1 );
12131 }
12132 }
12133 {
12134 mypltr_funcstr[0] = '\0';
12135 }
12136 {
12137 int i;
12138
12139 LUA_FREE_ARRAY( cgrid113.xg );
12140 LUA_FREE_ARRAY( cgrid113.yg );
12141
12142 if ( cgrid213.xg )
12143 {
12144 for ( i = 0; i < Xlen; i++ )
12145 LUA_FREE_ARRAY( cgrid213.xg[i] );
12146 LUA_FREE_ARRAY( cgrid213.xg );
12147 }
12148 if ( cgrid213.yg )
12149 {
12150 for ( i = 0; i < Xlen; i++ )
12151 LUA_FREE_ARRAY( cgrid213.yg[i] );
12152 LUA_FREE_ARRAY( cgrid213.yg );
12153 }
12154 }
12155 return SWIG_arg;
12156
12157 fail: SWIGUNUSED;
12158 {
12159 int i;
12160
12161 if ( arg1 )
12162 {
12163 for ( i = 0; i < ii1; i++ )
12164 LUA_FREE_ARRAY( arg1[i] );
12165 LUA_FREE_ARRAY( arg1 );
12166 }
12167 }
12168 {
12169 mypltr_funcstr[0] = '\0';
12170 }
12171 {
12172 int i;
12173
12174 LUA_FREE_ARRAY( cgrid113.xg );
12175 LUA_FREE_ARRAY( cgrid113.yg );
12176
12177 if ( cgrid213.xg )
12178 {
12179 for ( i = 0; i < Xlen; i++ )
12180 LUA_FREE_ARRAY( cgrid213.xg[i] );
12181 LUA_FREE_ARRAY( cgrid213.xg );
12182 }
12183 if ( cgrid213.yg )
12184 {
12185 for ( i = 0; i < Xlen; i++ )
12186 LUA_FREE_ARRAY( cgrid213.yg[i] );
12187 LUA_FREE_ARRAY( cgrid213.yg );
12188 }
12189 }
12190 lua_error(L);
12191 return 0;
12192}
12193
12194
12195static int _wrap_plClearOpts(lua_State* L) {
12196 int SWIG_arg = 0;
12197
12198 SWIG_check_num_args("plClearOpts",0,0)
12199 plClearOpts();
12200
12201 return SWIG_arg;
12202
12203 fail: SWIGUNUSED;
12204 lua_error(L);
12205 return 0;
12206}
12207
12208
12209static int _wrap_plResetOpts(lua_State* L) {
12210 int SWIG_arg = 0;
12211
12212 SWIG_check_num_args("plResetOpts",0,0)
12213 plResetOpts();
12214
12215 return SWIG_arg;
12216
12217 fail: SWIGUNUSED;
12218 lua_error(L);
12219 return 0;
12220}
12221
12222
12223static int _wrap_plSetUsage(lua_State* L) {
12224 int SWIG_arg = 0;
12225 char *arg1 = (char *) 0 ;
12226 char *arg2 = (char *) 0 ;
12227
12228 SWIG_check_num_args("plSetUsage",2,2)
12229 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plSetUsage",1,"char const *");
12230 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plSetUsage",2,"char const *");
12231 arg1 = (char *)lua_tostring(L, 1);
12232 arg2 = (char *)lua_tostring(L, 2);
12233 plSetUsage((char const *)arg1,(char const *)arg2);
12234
12235 return SWIG_arg;
12236
12237 fail: SWIGUNUSED;
12238 lua_error(L);
12239 return 0;
12240}
12241
12242
12243static int _wrap_plOptUsage(lua_State* L) {
12244 int SWIG_arg = 0;
12245
12246 SWIG_check_num_args("plOptUsage",0,0)
12247 plOptUsage();
12248
12249 return SWIG_arg;
12250
12251 fail: SWIGUNUSED;
12252 lua_error(L);
12253 return 0;
12254}
12255
12256
12257static int _wrap_MinMax2dGrid(lua_State* L) {
12258 int SWIG_arg = 0;
12259 PLFLT **arg1 = (PLFLT **) 0 ;
12260 PLINT arg2 ;
12261 PLINT arg3 ;
12262 PLFLT *arg4 = (PLFLT *) 0 ;
12263 PLFLT *arg5 = (PLFLT *) 0 ;
12264 int ii1 ;
12265 PLFLT temp4 ;
12266 PLFLT temp5 ;
12267
12268 arg4 = &temp4;
12269 arg5 = &temp5;
12270 SWIG_check_num_args("plMinMax2dGrid",1,1)
12271 {
12272 int jj;
12273
12274 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
12275 if ( !arg1 )
12276 SWIG_fail;
12277 Xlen = arg2 = ii1;
12278 Ylen = arg3 = jj;
12279 }
12280 plMinMax2dGrid((double const **)arg1,arg2,arg3,arg4,arg5);
12281
12282 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
12283 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
12284 {
12285 int i;
12286
12287 if ( arg1 )
12288 {
12289 for ( i = 0; i < ii1; i++ )
12290 LUA_FREE_ARRAY( arg1[i] );
12291 LUA_FREE_ARRAY( arg1 );
12292 }
12293 }
12294 return SWIG_arg;
12295
12296 fail: SWIGUNUSED;
12297 {
12298 int i;
12299
12300 if ( arg1 )
12301 {
12302 for ( i = 0; i < ii1; i++ )
12303 LUA_FREE_ARRAY( arg1[i] );
12304 LUA_FREE_ARRAY( arg1 );
12305 }
12306 }
12307 lua_error(L);
12308 return 0;
12309}
12310
12311
12312static int _wrap_plGetCursor(lua_State* L) {
12313 int SWIG_arg = 0;
12314 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
12315 PLINT result;
12316
12317 SWIG_check_num_args("plGetCursor",1,1)
12318 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("plGetCursor",1,"PLGraphicsIn *");
12319
12320 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
12321 SWIG_fail_ptr("plGetCursor",1,SWIGTYPE_p_PLGraphicsIn);
12322 }
12323
12324 result = (PLINT)plGetCursor(arg1);
12325 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
12326 return SWIG_arg;
12327
12328 fail: SWIGUNUSED;
12329 lua_error(L);
12330 return 0;
12331}
12332
12333
12334static int _wrap_warn(lua_State* L) {
12335 int SWIG_arg = 0;
12336 char *arg1 = (char *) 0 ;
12337
12338 SWIG_check_num_args("plwarn",1,1)
12339 if(!lua_isstring(L,1)) SWIG_fail_arg("plwarn",1,"char const *");
12340 {
12341 arg1 = (char *) lua_tostring( L, 1 );
12342 }
12343 plwarn((char const *)arg1);
12344
12345 return SWIG_arg;
12346
12347 fail: SWIGUNUSED;
12348 lua_error(L);
12349 return 0;
12350}
12351
12352
12353static int _wrap_abort(lua_State* L) {
12354 int SWIG_arg = 0;
12355 char *arg1 = (char *) 0 ;
12356
12357 SWIG_check_num_args("plabort",1,1)
12358 if(!lua_isstring(L,1)) SWIG_fail_arg("plabort",1,"char const *");
12359 {
12360 arg1 = (char *) lua_tostring( L, 1 );
12361 }
12362 plabort((char const *)arg1);
12363
12364 return SWIG_arg;
12365
12366 fail: SWIGUNUSED;
12367 lua_error(L);
12368 return 0;
12369}
12370
12371
12373 {0,0,0}
12374};
12376 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_RGB", (1))},
12377 {SWIG_LUA_CONSTTAB_INT("PLESC_ALLOC_NCOL", (2))},
12378 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_LPB", (3))},
12379 {SWIG_LUA_CONSTTAB_INT("PLESC_EXPOSE", (4))},
12380 {SWIG_LUA_CONSTTAB_INT("PLESC_RESIZE", (5))},
12381 {SWIG_LUA_CONSTTAB_INT("PLESC_REDRAW", (6))},
12382 {SWIG_LUA_CONSTTAB_INT("PLESC_TEXT", (7))},
12383 {SWIG_LUA_CONSTTAB_INT("PLESC_GRAPH", (8))},
12384 {SWIG_LUA_CONSTTAB_INT("PLESC_FILL", (9))},
12385 {SWIG_LUA_CONSTTAB_INT("PLESC_DI", (10))},
12386 {SWIG_LUA_CONSTTAB_INT("PLESC_FLUSH", (11))},
12387 {SWIG_LUA_CONSTTAB_INT("PLESC_EH", (12))},
12388 {SWIG_LUA_CONSTTAB_INT("PLESC_GETC", (13))},
12389 {SWIG_LUA_CONSTTAB_INT("PLESC_SWIN", (14))},
12390 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING", (15))},
12391 {SWIG_LUA_CONSTTAB_INT("PLESC_XORMOD", (16))},
12392 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_COMPRESSION", (17))},
12393 {SWIG_LUA_CONSTTAB_INT("PLESC_CLEAR", (18))},
12394 {SWIG_LUA_CONSTTAB_INT("PLESC_DASH", (19))},
12395 {SWIG_LUA_CONSTTAB_INT("PLESC_HAS_TEXT", (20))},
12396 {SWIG_LUA_CONSTTAB_INT("PLESC_IMAGE", (21))},
12397 {SWIG_LUA_CONSTTAB_INT("PLESC_IMAGEOPS", (22))},
12398 {SWIG_LUA_CONSTTAB_INT("PLESC_PL2DEVCOL", (23))},
12399 {SWIG_LUA_CONSTTAB_INT("PLESC_DEV2PLCOL", (24))},
12400 {SWIG_LUA_CONSTTAB_INT("PLESC_SETBGFG", (25))},
12401 {SWIG_LUA_CONSTTAB_INT("PLESC_DEVINIT", (26))},
12402 {SWIG_LUA_CONSTTAB_INT("PLESC_GETBACKEND", (27))},
12403 {SWIG_LUA_CONSTTAB_INT("PLESC_BEGIN_TEXT", (28))},
12404 {SWIG_LUA_CONSTTAB_INT("PLESC_TEXT_CHAR", (29))},
12405 {SWIG_LUA_CONSTTAB_INT("PLESC_CONTROL_CHAR", (30))},
12406 {SWIG_LUA_CONSTTAB_INT("PLESC_END_TEXT", (31))},
12407 {SWIG_LUA_CONSTTAB_INT("PLESC_START_RASTERIZE", (32))},
12408 {SWIG_LUA_CONSTTAB_INT("PLESC_END_RASTERIZE", (33))},
12409 {SWIG_LUA_CONSTTAB_INT("PLESC_ARC", (34))},
12410 {SWIG_LUA_CONSTTAB_INT("PLESC_GRADIENT", (35))},
12411 {SWIG_LUA_CONSTTAB_INT("PLESC_MODESET", (36))},
12412 {SWIG_LUA_CONSTTAB_INT("PLESC_MODEGET", (37))},
12413 {SWIG_LUA_CONSTTAB_INT("PLESC_FIXASPECT", (38))},
12414 {SWIG_LUA_CONSTTAB_INT("PLESC_IMPORT_BUFFER", (39))},
12415 {SWIG_LUA_CONSTTAB_INT("PLESC_APPEND_BUFFER", (40))},
12416 {SWIG_LUA_CONSTTAB_INT("PLESC_FLUSH_REMAINING_BUFFER", (41))},
12417 {SWIG_LUA_CONSTTAB_INT("PLTEXT_FONTCHANGE", (0))},
12418 {SWIG_LUA_CONSTTAB_INT("PLTEXT_SUPERSCRIPT", (1))},
12419 {SWIG_LUA_CONSTTAB_INT("PLTEXT_SUBSCRIPT", (2))},
12420 {SWIG_LUA_CONSTTAB_INT("PLTEXT_BACKCHAR", (3))},
12421 {SWIG_LUA_CONSTTAB_INT("PLTEXT_OVERLINE", (4))},
12422 {SWIG_LUA_CONSTTAB_INT("PLTEXT_UNDERLINE", (5))},
12423 {SWIG_LUA_CONSTTAB_INT("ZEROW2B", (1))},
12424 {SWIG_LUA_CONSTTAB_INT("ZEROW2D", (2))},
12425 {SWIG_LUA_CONSTTAB_INT("ONEW2B", (3))},
12426 {SWIG_LUA_CONSTTAB_INT("ONEW2D", (4))},
12427 {SWIG_LUA_CONSTTAB_INT("PLSWIN_DEVICE", (1))},
12428 {SWIG_LUA_CONSTTAB_INT("PLSWIN_WORLD", (2))},
12429 {SWIG_LUA_CONSTTAB_INT("PL_X_AXIS", (1))},
12430 {SWIG_LUA_CONSTTAB_INT("PL_Y_AXIS", (2))},
12431 {SWIG_LUA_CONSTTAB_INT("PL_Z_AXIS", (3))},
12432 {SWIG_LUA_CONSTTAB_INT("PL_OPT_ENABLED", (0x0001))},
12433 {SWIG_LUA_CONSTTAB_INT("PL_OPT_ARG", (0x0002))},
12434 {SWIG_LUA_CONSTTAB_INT("PL_OPT_NODELETE", (0x0004))},
12435 {SWIG_LUA_CONSTTAB_INT("PL_OPT_INVISIBLE", (0x0008))},
12436 {SWIG_LUA_CONSTTAB_INT("PL_OPT_DISABLED", (0x0010))},
12437 {SWIG_LUA_CONSTTAB_INT("PL_OPT_FUNC", (0x0100))},
12438 {SWIG_LUA_CONSTTAB_INT("PL_OPT_BOOL", (0x0200))},
12439 {SWIG_LUA_CONSTTAB_INT("PL_OPT_INT", (0x0400))},
12440 {SWIG_LUA_CONSTTAB_INT("PL_OPT_FLOAT", (0x0800))},
12441 {SWIG_LUA_CONSTTAB_INT("PL_OPT_STRING", (0x1000))},
12442 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_PARTIAL", (0x0000))},
12443 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_FULL", (0x0001))},
12444 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_QUIET", (0x0002))},
12445 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NODELETE", (0x0004))},
12446 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_SHOWALL", (0x0008))},
12447 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_OVERRIDE", (0x0010))},
12448 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NOPROGRAM", (0x0020))},
12449 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NODASH", (0x0040))},
12450 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_SKIP", (0x0080))},
12451 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MARK", (0x80000000))},
12452 {SWIG_LUA_CONSTTAB_INT("PL_FCI_IMPOSSIBLE", (0x00000000))},
12453 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXDIGIT_MASK", (0xf))},
12454 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXPOWER_MASK", (0x7))},
12455 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXPOWER_IMPOSSIBLE", (0xf))},
12456 {SWIG_LUA_CONSTTAB_INT("PL_FCI_FAMILY", (0x0))},
12457 {SWIG_LUA_CONSTTAB_INT("PL_FCI_STYLE", (0x1))},
12458 {SWIG_LUA_CONSTTAB_INT("PL_FCI_WEIGHT", (0x2))},
12459 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SANS", (0x0))},
12460 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SERIF", (0x1))},
12461 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MONO", (0x2))},
12462 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SCRIPT", (0x3))},
12463 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SYMBOL", (0x4))},
12464 {SWIG_LUA_CONSTTAB_INT("PL_FCI_UPRIGHT", (0x0))},
12465 {SWIG_LUA_CONSTTAB_INT("PL_FCI_ITALIC", (0x1))},
12466 {SWIG_LUA_CONSTTAB_INT("PL_FCI_OBLIQUE", (0x2))},
12467 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MEDIUM", (0x0))},
12468 {SWIG_LUA_CONSTTAB_INT("PL_FCI_BOLD", (0x1))},
12469 {SWIG_LUA_CONSTTAB_INT("PL_MAXKEY", (16))},
12470 {SWIG_LUA_CONSTTAB_INT("PL_MASK_SHIFT", (0x1))},
12471 {SWIG_LUA_CONSTTAB_INT("PL_MASK_CAPS", (0x2))},
12472 {SWIG_LUA_CONSTTAB_INT("PL_MASK_CONTROL", (0x4))},
12473 {SWIG_LUA_CONSTTAB_INT("PL_MASK_ALT", (0x8))},
12474 {SWIG_LUA_CONSTTAB_INT("PL_MASK_NUM", (0x10))},
12475 {SWIG_LUA_CONSTTAB_INT("PL_MASK_ALTGR", (0x20))},
12476 {SWIG_LUA_CONSTTAB_INT("PL_MASK_WIN", (0x40))},
12477 {SWIG_LUA_CONSTTAB_INT("PL_MASK_SCROLL", (0x80))},
12478 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON1", (0x100))},
12479 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON2", (0x200))},
12480 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON3", (0x400))},
12481 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON4", (0x800))},
12482 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON5", (0x1000))},
12483 {SWIG_LUA_CONSTTAB_INT("PL_MAXWINDOWS", (64))},
12484 {SWIG_LUA_CONSTTAB_INT("PL_NOTSET", ((-42)))},
12485 {SWIG_LUA_CONSTTAB_INT("PL_DEFAULT_NCOL0", (16))},
12486 {SWIG_LUA_CONSTTAB_INT("PL_DEFAULT_NCOL1", (128))},
12487 {SWIG_LUA_CONSTTAB_INT("MIN_PLINT_RGB", (0))},
12488 {SWIG_LUA_CONSTTAB_INT("MAX_PLINT_RGB", (255))},
12489 {SWIG_LUA_CONSTTAB_FLOAT("MIN_PLFLT_CMAP1", 0.)},
12490 {SWIG_LUA_CONSTTAB_FLOAT("MAX_PLFLT_CMAP1", 1.)},
12491 {SWIG_LUA_CONSTTAB_FLOAT("MIN_PLFLT_ALPHA", 0.)},
12492 {SWIG_LUA_CONSTTAB_FLOAT("MAX_PLFLT_ALPHA", 1.)},
12493 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_ENABLE", (1))},
12494 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_DISABLE", (2))},
12495 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_QUERY", (3))},
12496 {SWIG_LUA_CONSTTAB_INT("PL_BIN_DEFAULT", (0x0))},
12497 {SWIG_LUA_CONSTTAB_INT("PL_BIN_CENTRED", (0x1))},
12498 {SWIG_LUA_CONSTTAB_INT("PL_BIN_NOEXPAND", (0x2))},
12499 {SWIG_LUA_CONSTTAB_INT("PL_BIN_NOEMPTY", (0x4))},
12500 {SWIG_LUA_CONSTTAB_INT("GRID_CSA", (1))},
12501 {SWIG_LUA_CONSTTAB_INT("GRID_DTLI", (2))},
12502 {SWIG_LUA_CONSTTAB_INT("GRID_NNI", (3))},
12503 {SWIG_LUA_CONSTTAB_INT("GRID_NNIDW", (4))},
12504 {SWIG_LUA_CONSTTAB_INT("GRID_NNLI", (5))},
12505 {SWIG_LUA_CONSTTAB_INT("GRID_NNAIDW", (6))},
12506 {SWIG_LUA_CONSTTAB_INT("PL_HIST_DEFAULT", (0x00))},
12507 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOSCALING", (0x01))},
12508 {SWIG_LUA_CONSTTAB_INT("PL_HIST_IGNORE_OUTLIERS", (0x02))},
12509 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOEXPAND", (0x08))},
12510 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOEMPTY", (0x10))},
12511 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_NULL", (0x0))},
12512 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_LEFT", (0x1))},
12513 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_RIGHT", (0x2))},
12514 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_TOP", (0x4))},
12515 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_BOTTOM", (0x8))},
12516 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_INSIDE", (0x10))},
12517 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_OUTSIDE", (0x20))},
12518 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_VIEWPORT", (0x40))},
12519 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_SUBPAGE", (0x80))},
12520 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_NULL", (0x0))},
12521 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_NONE", (0x1))},
12522 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_COLOR_BOX", (0x2))},
12523 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_LINE", (0x4))},
12524 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_SYMBOL", (0x8))},
12525 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_TEXT_LEFT", (0x10))},
12526 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_BACKGROUND", (0x20))},
12527 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_BOUNDING_BOX", (0x40))},
12528 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_ROW_MAJOR", (0x80))},
12529 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_NULL", (0x0))},
12530 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_LEFT", (0x1))},
12531 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_RIGHT", (0x2))},
12532 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_TOP", (0x4))},
12533 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_BOTTOM", (0x8))},
12534 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_IMAGE", (0x10))},
12535 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_SHADE", (0x20))},
12536 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_GRADIENT", (0x40))},
12537 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_NONE", (0x80))},
12538 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_LOW", (0x100))},
12539 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_HIGH", (0x200))},
12540 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_SHADE_LABEL", (0x400))},
12541 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_RIGHT", (0x800))},
12542 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_TOP", (0x1000))},
12543 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_LEFT", (0x2000))},
12544 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_BOTTOM", (0x4000))},
12545 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_BACKGROUND", (0x8000))},
12546 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_BOUNDING_BOX", (0x10000))},
12547 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_UNKNOWN", (0x0))},
12548 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_DEFAULT", (0x1))},
12549 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_REPLACE", (0x2))},
12550 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_XOR", (0x4))},
12551 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEX", (0x001))},
12552 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEY", (0x002))},
12553 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEXY", (0x003))},
12554 {SWIG_LUA_CONSTTAB_INT("MAG_COLOR", (0x004))},
12555 {SWIG_LUA_CONSTTAB_INT("BASE_CONT", (0x008))},
12556 {SWIG_LUA_CONSTTAB_INT("TOP_CONT", (0x010))},
12557 {SWIG_LUA_CONSTTAB_INT("SURF_CONT", (0x020))},
12558 {SWIG_LUA_CONSTTAB_INT("DRAW_SIDES", (0x040))},
12559 {SWIG_LUA_CONSTTAB_INT("FACETED", (0x080))},
12560 {SWIG_LUA_CONSTTAB_INT("MESH", (0x100))},
12561 {0,0,0,0,0,0}
12562};
12564 { "setcontlabelformat", _wrap_setcontlabelformat},
12565 { "setcontlabelparam", _wrap_setcontlabelparam},
12566 { "adv", _wrap_adv},
12567 { "arc", _wrap_arc},
12568 { "axes", _wrap_axes},
12569 { "bin", _wrap_bin},
12570 { "btime", _wrap_btime},
12571 { "bop", _wrap_bop},
12572 { "box", _wrap_box},
12573 { "box3", _wrap_box3},
12574 { "calc_world", _wrap_calc_world},
12575 { "clear", _wrap_clear},
12576 { "col0", _wrap_col0},
12577 { "col1", _wrap_col1},
12578 { "configtime", _wrap_configtime},
12579 { "cont", _wrap_cont},
12580 { "ctime", _wrap_ctime},
12581 { "cpstrm", _wrap_cpstrm},
12582 { "plend", _wrap_plend},
12583 { "plend1", _wrap_plend1},
12584 { "env", _wrap_env},
12585 { "env0", _wrap_env0},
12586 { "eop", _wrap_eop},
12587 { "errx", _wrap_errx},
12588 { "erry", _wrap_erry},
12589 { "famadv", _wrap_famadv},
12590 { "fill", _wrap_fill},
12591 { "fill3", _wrap_fill3},
12592 { "gradient", _wrap_gradient},
12593 { "flush", _wrap_flush},
12594 { "font", _wrap_font},
12595 { "fontld", _wrap_fontld},
12596 { "gchr", _wrap_gchr},
12597 { "gcol0", _wrap_gcol0},
12598 { "gcol0a", _wrap_gcol0a},
12599 { "gcolbg", _wrap_gcolbg},
12600 { "gcolbga", _wrap_gcolbga},
12601 { "gcompression", _wrap_gcompression},
12602 { "gdev", _wrap_gdev},
12603 { "gdidev", _wrap_gdidev},
12604 { "gdiori", _wrap_gdiori},
12605 { "gdiplt", _wrap_gdiplt},
12606 { "gfam", _wrap_gfam},
12607 { "gfci", _wrap_gfci},
12608 { "gfnam", _wrap_gfnam},
12609 { "gfont", _wrap_gfont},
12610 { "glevel", _wrap_glevel},
12611 { "gpage", _wrap_gpage},
12612 { "gra", _wrap_gra},
12613 { "griddata", _wrap_griddata},
12614 { "gspa", _wrap_gspa},
12615 { "gstrm", _wrap_gstrm},
12616 { "gver", _wrap_gver},
12617 { "gvpd", _wrap_gvpd},
12618 { "gvpw", _wrap_gvpw},
12619 { "gxax", _wrap_gxax},
12620 { "gyax", _wrap_gyax},
12621 { "gzax", _wrap_gzax},
12622 { "hist", _wrap_hist},
12623 { "hlsrgb", _wrap_hlsrgb},
12624 { "init", _wrap_init},
12625 { "join", _wrap_join},
12626 { "lab", _wrap_lab},
12627 { "legend", _wrap_legend},
12628 { "colorbar", _wrap_colorbar},
12629 { "lightsource", _wrap_lightsource},
12630 { "line", _wrap_line},
12631 { "line3", _wrap_line3},
12632 { "lsty", _wrap_lsty},
12633 { "mesh", _wrap_mesh},
12634 { "meshc", _wrap_meshc},
12635 { "mkstrm", _wrap_mkstrm},
12636 { "mtex", _wrap_mtex},
12637 { "mtex3", _wrap_mtex3},
12638 { "plot3d", _wrap_plot3d},
12639 { "plot3dc", _wrap_plot3dc},
12640 { "plot3dcl", _wrap_plot3dcl},
12641 { "surf3d", _wrap_surf3d},
12642 { "surf3dl", _wrap_surf3dl},
12643 { "parseopts", _wrap_parseopts},
12644 { "pat", _wrap_pat},
12645 { "path", _wrap_path},
12646 { "poin", _wrap_poin},
12647 { "poin3", _wrap_poin3},
12648 { "poly3", _wrap_poly3},
12649 { "prec", _wrap_prec},
12650 { "psty", _wrap_psty},
12651 { "ptex", _wrap_ptex},
12652 { "ptex3", _wrap_ptex3},
12653 { "randd", _wrap_randd},
12654 { "replot", _wrap_replot},
12655 { "rgbhls", _wrap_rgbhls},
12656 { "schr", _wrap_schr},
12657 { "scmap0", _wrap_scmap0},
12658 { "scmap0a", _wrap_scmap0a},
12659 { "scmap0n", _wrap_scmap0n},
12660 { "scmap1", _wrap_scmap1},
12661 { "scmap1a", _wrap_scmap1a},
12662 { "scmap1l", _wrap_scmap1l},
12663 { "scmap1la", _wrap_scmap1la},
12664 { "scmap1n", _wrap_scmap1n},
12665 { "scmap1_range", _wrap_scmap1_range},
12666 { "gcmap1_range", _wrap_gcmap1_range},
12667 { "scol0", _wrap_scol0},
12668 { "scol0a", _wrap_scol0a},
12669 { "scolbg", _wrap_scolbg},
12670 { "scolbga", _wrap_scolbga},
12671 { "scolor", _wrap_scolor},
12672 { "scompression", _wrap_scompression},
12673 { "sdev", _wrap_sdev},
12674 { "sdidev", _wrap_sdidev},
12675 { "sdimap", _wrap_sdimap},
12676 { "sdiori", _wrap_sdiori},
12677 { "sdiplt", _wrap_sdiplt},
12678 { "sdiplz", _wrap_sdiplz},
12679 { "seed", _wrap_seed},
12680 { "sesc", _wrap_sesc},
12681 { "setopt", _wrap_setopt},
12682 { "sfam", _wrap_sfam},
12683 { "sfci", _wrap_sfci},
12684 { "sfnam", _wrap_sfnam},
12685 { "sfont", _wrap_sfont},
12686 { "shades", _wrap_shades},
12687 { "shade", _wrap_shade},
12688 { "slabelfunc", _wrap_slabelfunc},
12689 { "smaj", _wrap_smaj},
12690 { "smin", _wrap_smin},
12691 { "sori", _wrap_sori},
12692 { "spage", _wrap_spage},
12693 { "spal0", _wrap_spal0},
12694 { "spal1", _wrap_spal1},
12695 { "spause", _wrap_spause},
12696 { "sstrm", _wrap_sstrm},
12697 { "ssub", _wrap_ssub},
12698 { "ssym", _wrap_ssym},
12699 { "star", _wrap_star},
12700 { "start", _wrap_start},
12701 { "stransform", _wrap_stransform},
12702 { "string", _wrap_string},
12703 { "string3", _wrap_string3},
12704 { "stripa", _wrap_stripa},
12705 { "stripc", _wrap_stripc},
12706 { "stripd", _wrap_stripd},
12707 { "styl", _wrap_styl},
12708 { "svect", _wrap_svect},
12709 { "svpa", _wrap_svpa},
12710 { "sxax", _wrap_sxax},
12711 { "syax", _wrap_syax},
12712 { "sym", _wrap_sym},
12713 { "szax", _wrap_szax},
12714 { "text", _wrap_text},
12715 { "timefmt", _wrap_timefmt},
12716 { "vasp", _wrap_vasp},
12717 { "vect", _wrap_vect},
12718 { "vpas", _wrap_vpas},
12719 { "vpor", _wrap_vpor},
12720 { "vsta", _wrap_vsta},
12721 { "w3d", _wrap_w3d},
12722 { "width", _wrap_width},
12723 { "wind", _wrap_wind},
12724 { "xormod", _wrap_xormod},
12725 { "map", _wrap_map},
12726 { "mapline", _wrap_mapline},
12727 { "mapstring", _wrap_mapstring},
12728 { "maptex", _wrap_maptex},
12729 { "mapfill", _wrap_mapfill},
12730 { "meridians", _wrap_meridians},
12731 { "image", _wrap_image},
12732 { "imagefr", _wrap_imagefr},
12733 { "plClearOpts", _wrap_plClearOpts},
12734 { "plResetOpts", _wrap_plResetOpts},
12735 { "plSetUsage", _wrap_plSetUsage},
12736 { "plOptUsage", _wrap_plOptUsage},
12737 { "MinMax2dGrid", _wrap_MinMax2dGrid},
12738 { "plGetCursor", _wrap_plGetCursor},
12739 { "warn", _wrap_warn},
12740 { "abort", _wrap_abort},
12741 {0,0}
12742};
12748 0
12749};
12750
12759#ifdef __cplusplus
12760}
12761#endif
12762
12763/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
12764
12765static swig_type_info _swigt__p_PLGraphicsIn = {"_p_PLGraphicsIn", "PLGraphicsIn *", 0, 0, (void*)&_wrap_class_PLGraphicsIn, 0};
12766static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
12767static swig_type_info _swigt__p_double = {"_p_double", "PLFLT *|double *", 0, 0, (void*)0, 0};
12768static swig_type_info _swigt__p_f_double_double__int = {"_p_f_double_double__int", "defined_func|int (*)(double,double)", 0, 0, (void*)0, 0};
12769static 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};
12770static swig_type_info _swigt__p_f_int_double_p_char_int_p_void__void = {"_p_f_int_double_p_char_int_p_void__void", "label_func|void (*)(int,double,char *,int,void *)", 0, 0, (void*)0, 0};
12771static 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};
12772static 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", "fill_func|void (*)(int,double const *,double const *)", 0, 0, (void*)0, 0};
12773static swig_type_info _swigt__p_int = {"_p_int", "PLBOOL *|PLINT *|int *", 0, 0, (void*)0, 0};
12774static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
12775static swig_type_info _swigt__p_p_double = {"_p_p_double", "PLFLT **|double **", 0, 0, (void*)0, 0};
12776static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "PLUNICODE *|unsigned int *", 0, 0, (void*)0, 0};
12777
12792
12793static swig_cast_info _swigc__p_PLGraphicsIn[] = { {&_swigt__p_PLGraphicsIn, 0, 0, 0},{0, 0, 0, 0}};
12794static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
12795static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
12801static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
12802static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
12803static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
12804static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
12805
12820
12821
12822/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
12823
12824/* -----------------------------------------------------------------------------
12825 * Type initialization:
12826 * This problem is tough by the requirement that no dynamic
12827 * memory is used. Also, since swig_type_info structures store pointers to
12828 * swig_cast_info structures and swig_cast_info structures store pointers back
12829 * to swig_type_info structures, we need some lookup code at initialization.
12830 * The idea is that swig generates all the structures that are needed.
12831 * The runtime then collects these partially filled structures.
12832 * The SWIG_InitializeModule function takes these initial arrays out of
12833 * swig_module, and does all the lookup, filling in the swig_module.types
12834 * array with the correct data and linking the correct swig_cast_info
12835 * structures together.
12836 *
12837 * The generated swig_type_info structures are assigned statically to an initial
12838 * array. We just loop through that array, and handle each type individually.
12839 * First we lookup if this type has been already loaded, and if so, use the
12840 * loaded structure instead of the generated one. Then we have to fill in the
12841 * cast linked list. The cast data is initially stored in something like a
12842 * two-dimensional array. Each row corresponds to a type (there are the same
12843 * number of rows as there are in the swig_type_initial array). Each entry in
12844 * a column is one of the swig_cast_info structures for that type.
12845 * The cast_initial array is actually an array of arrays, because each row has
12846 * a variable number of columns. So to actually build the cast linked list,
12847 * we find the array of casts associated with the type, and loop through it
12848 * adding the casts to the list. The one last trick we need to do is making
12849 * sure the type pointer in the swig_cast_info struct is correct.
12850 *
12851 * First off, we lookup the cast->type name to see if it is already loaded.
12852 * There are three cases to handle:
12853 * 1) If the cast->type has already been loaded AND the type we are adding
12854 * casting info to has not been loaded (it is in this module), THEN we
12855 * replace the cast->type pointer with the type pointer that has already
12856 * been loaded.
12857 * 2) If BOTH types (the one we are adding casting info to, and the
12858 * cast->type) are loaded, THEN the cast info has already been loaded by
12859 * the previous module so we just ignore it.
12860 * 3) Finally, if cast->type has not already been loaded, then we add that
12861 * swig_cast_info to the linked list (because the cast->type) pointer will
12862 * be correct.
12863 * ----------------------------------------------------------------------------- */
12864
12865#ifdef __cplusplus
12866extern "C" {
12867#if 0
12868} /* c-mode */
12869#endif
12870#endif
12871
12872#if 0
12873#define SWIGRUNTIME_DEBUG
12874#endif
12875
12876#ifndef SWIG_INIT_CLIENT_DATA_TYPE
12877#define SWIG_INIT_CLIENT_DATA_TYPE void *
12878#endif
12879
12880SWIGRUNTIME void
12882 size_t i;
12883 swig_module_info *module_head, *iter;
12884 int init;
12885
12886 /* check to see if the circular list has been setup, if not, set it up */
12887 if (swig_module.next==0) {
12888 /* Initialize the swig_module */
12889 swig_module.type_initial = swig_type_initial;
12890 swig_module.cast_initial = swig_cast_initial;
12891 swig_module.next = &swig_module;
12892 init = 1;
12893 } else {
12894 init = 0;
12895 }
12896
12897 /* Try and load any already created modules */
12898 module_head = SWIG_GetModule(clientdata);
12899 if (!module_head) {
12900 /* This is the first module loaded for this interpreter */
12901 /* so set the swig module into the interpreter */
12902 SWIG_SetModule(clientdata, &swig_module);
12903 } else {
12904 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
12905 iter=module_head;
12906 do {
12907 if (iter==&swig_module) {
12908 /* Our module is already in the list, so there's nothing more to do. */
12909 return;
12910 }
12911 iter=iter->next;
12912 } while (iter!= module_head);
12913
12914 /* otherwise we must add our module into the list */
12915 swig_module.next = module_head->next;
12916 module_head->next = &swig_module;
12917 }
12918
12919 /* When multiple interpreters are used, a module could have already been initialized in
12920 a different interpreter, but not yet have a pointer in this interpreter.
12921 In this case, we do not want to continue adding types... everything should be
12922 set up already */
12923 if (init == 0) return;
12924
12925 /* Now work on filling in swig_module.types */
12926#ifdef SWIGRUNTIME_DEBUG
12927 printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
12928#endif
12929 for (i = 0; i < swig_module.size; ++i) {
12930 swig_type_info *type = 0;
12931 swig_type_info *ret;
12932 swig_cast_info *cast;
12933
12934#ifdef SWIGRUNTIME_DEBUG
12935 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
12936#endif
12937
12938 /* if there is another module already loaded */
12939 if (swig_module.next != &swig_module) {
12940 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
12941 }
12942 if (type) {
12943 /* Overwrite clientdata field */
12944#ifdef SWIGRUNTIME_DEBUG
12945 printf("SWIG_InitializeModule: found type %s\n", type->name);
12946#endif
12947 if (swig_module.type_initial[i]->clientdata) {
12948 type->clientdata = swig_module.type_initial[i]->clientdata;
12949#ifdef SWIGRUNTIME_DEBUG
12950 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
12951#endif
12952 }
12953 } else {
12954 type = swig_module.type_initial[i];
12955 }
12956
12957 /* Insert casting types */
12958 cast = swig_module.cast_initial[i];
12959 while (cast->type) {
12960
12961 /* Don't need to add information already in the list */
12962 ret = 0;
12963#ifdef SWIGRUNTIME_DEBUG
12964 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
12965#endif
12966 if (swig_module.next != &swig_module) {
12968#ifdef SWIGRUNTIME_DEBUG
12969 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
12970#endif
12971 }
12972 if (ret) {
12973 if (type == swig_module.type_initial[i]) {
12974#ifdef SWIGRUNTIME_DEBUG
12975 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
12976#endif
12977 cast->type = ret;
12978 ret = 0;
12979 } else {
12980 /* Check for casting already in the list */
12981 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
12982#ifdef SWIGRUNTIME_DEBUG
12983 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
12984#endif
12985 if (!ocast) ret = 0;
12986 }
12987 }
12988
12989 if (!ret) {
12990#ifdef SWIGRUNTIME_DEBUG
12991 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
12992#endif
12993 if (type->cast) {
12994 type->cast->prev = cast;
12995 cast->next = type->cast;
12996 }
12997 type->cast = cast;
12998 }
12999 cast++;
13000 }
13001 /* Set entry in modules->types array equal to the type */
13002 swig_module.types[i] = type;
13003 }
13004 swig_module.types[i] = 0;
13005
13006#ifdef SWIGRUNTIME_DEBUG
13007 printf("**** SWIG_InitializeModule: Cast List ******\n");
13008 for (i = 0; i < swig_module.size; ++i) {
13009 int j = 0;
13010 swig_cast_info *cast = swig_module.cast_initial[i];
13011 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
13012 while (cast->type) {
13013 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
13014 cast++;
13015 ++j;
13016 }
13017 printf("---- Total casts: %d\n",j);
13018 }
13019 printf("**** SWIG_InitializeModule: Cast List ******\n");
13020#endif
13021}
13022
13023/* This function will propagate the clientdata field of type to
13024* any new swig_type_info structures that have been added into the list
13025* of equivalent types. It is like calling
13026* SWIG_TypeClientData(type, clientdata) a second time.
13027*/
13028SWIGRUNTIME void
13030 size_t i;
13031 swig_cast_info *equiv;
13032 static int init_run = 0;
13033
13034 if (init_run) return;
13035 init_run = 1;
13036
13037 for (i = 0; i < swig_module.size; i++) {
13038 if (swig_module.types[i]->clientdata) {
13039 equiv = swig_module.types[i]->cast;
13040 while (equiv) {
13041 if (!equiv->converter) {
13042 if (equiv->type && !equiv->type->clientdata)
13043 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
13044 }
13045 equiv = equiv->next;
13046 }
13047 }
13048 }
13049}
13050
13051#ifdef __cplusplus
13052#if 0
13053{ /* c-mode */
13054#endif
13055}
13056#endif
13057
13058
13059
13060/* Forward declaration of where the user's %init{} gets inserted */
13061void SWIG_init_user(lua_State* L );
13062
13063#ifdef __cplusplus
13064extern "C" {
13065#endif
13066/* this is the initialization function
13067 added at the very end of the code
13068 the function is always called SWIG_init, but an earlier #define will rename it
13069*/
13070#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
13071LUALIB_API int SWIG_init(lua_State* L)
13072#else
13073SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
13074#endif
13075{
13076#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
13077 int i;
13078 int globalRegister = 0;
13079 /* start with global table */
13081 /* SWIG's internal initialisation */
13082 SWIG_InitializeModule((void*)L);
13084#endif
13085
13086#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)) || defined(SWIG_LUA_ELUA_EMULATE)
13087 /* add a global fn */
13088 SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
13090#endif
13091
13092#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
13093 /* set up base class pointers (the hierarchy) */
13094 for (i = 0; swig_types[i]; i++){
13095 if (swig_types[i]->clientdata){
13097 }
13098 }
13099#ifdef SWIG_LUA_MODULE_GLOBAL
13100 globalRegister = 1;
13101#endif
13102
13103
13104#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
13105 SWIG_Lua_namespace_register(L,&swig_SwigModule, globalRegister);
13106#endif
13107
13108#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
13109 for (i = 0; swig_types[i]; i++){
13110 if (swig_types[i]->clientdata){
13111 SWIG_Lua_elua_class_register_instance(L,(swig_lua_class*)(swig_types[i]->clientdata));
13112 }
13113 }
13114#endif
13115
13116#if defined(SWIG_LUA_ELUA_EMULATE)
13117 lua_newtable(L);
13118 SWIG_Lua_elua_emulate_register(L,swig_SwigModule.ns_methods);
13119 SWIG_Lua_elua_emulate_register_clear(L);
13120 if(globalRegister) {
13121 lua_pushstring(L,swig_SwigModule.name);
13122 lua_pushvalue(L,-2);
13123 lua_rawset(L,-4);
13124 }
13125#endif
13126
13127#endif
13128
13129#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
13130 /* invoke user-specific initialization */
13131 SWIG_init_user(L);
13132 /* end module */
13133 /* Note: We do not clean up the stack here (Lua will do this for us). At this
13134 point, we have the globals table and out module table on the stack. Returning
13135 one value makes the module table the result of the require command. */
13136 return 1;
13137#else
13138 return 0;
13139#endif
13140}
13141
13142#ifdef __cplusplus
13143}
13144#endif
13145
13146
13147const char* SWIG_LUACODE=
13148 "\n"
13149 " pl = plplotluac";
13150
13151void SWIG_init_user(lua_State* L)
13152{
13153 /* exec Lua code if applicable */
13155}
13156
unsigned int uint
Definition build/sip.h:101
alias void function(PLINT, PLFLT *, PLFLT *) fill_func
void plOptUsage(void)
Definition plargs.c:1304
void plClearOpts(void)
Definition plargs.c:830
void plResetOpts(void)
Definition plargs.c:843
void plSetUsage(PLCHAR_VECTOR program_string, PLCHAR_VECTOR usage_string)
Definition plargs.c:1287
void pltr2(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Definition plcont.c:941
void pltr1(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Definition plcont.c:874
void pltr0(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer PL_UNUSED(pltr_data))
Definition plcont.c:858
void plwarn(PLCHAR_VECTOR errormsg)
Definition plctrl.c:1863
static PLFLT value(double n1, double n2, double hue)
Definition plctrl.c:1219
void plabort(PLCHAR_VECTOR errormsg)
Definition plctrl.c:1894
void plMinMax2dGrid(PLFLT_MATRIX f, PLINT nx, PLINT ny, PLFLT *fnmax, PLFLT *fnmin)
Definition plmem.c:141
PLINT plGetCursor(PLGraphicsIn *plg)
Definition plpage.c:244
#define plgfci
Definition plplot.h:735
#define plgstrm
Definition plplot.h:744
#define plpat
Definition plplot.h:779
#define plschr
Definition plplot.h:790
#define plfontld
Definition plplot.h:721
#define plpath
Definition plplot.h:761
#define plerry
Definition plplot.h:715
#define plsfam
Definition plplot.h:816
#define plsmaj
Definition plplot.h:826
#define plsmin
Definition plplot.h:829
#define pleop
Definition plplot.h:713
#define plimage
Definition plplot.h:753
#define plstransform
Definition plplot.h:840
#define plmap
Definition plplot.h:764
#define plfill
Definition plplot.h:717
#define plvpas
Definition plplot.h:859
#define plgdiplt
Definition plplot.h:732
#define plerrx
Definition plplot.h:714
#define plinit
Definition plplot.h:755
#define plscmap1l
Definition plplot.h:796
#define plsori
Definition plplot.h:830
#define plbox3
Definition plplot.h:698
#define plmapfill
Definition plplot.h:768
#define plcol1
Definition plplot.h:703
#define pltimefmt
Definition plplot.h:856
PLUINT PLUNICODE
Definition plplot.h:201
#define plmaptex
Definition plplot.h:767
#define plvect
Definition plplot.h:858
#define plgchr
Definition plplot.h:722
float PLFLT
Definition plplot.h:163
#define pllegend
Definition plplot.h:758
#define plsyax
Definition plplot.h:852
#define plgver
Definition plplot.h:745
#define plscolbg
Definition plplot.h:802
#define plpsty
Definition plplot.h:784
#define plgfont
Definition plplot.h:737
#define plenv
Definition plplot.h:711
#define pllightsource
Definition plplot.h:759
#define plpoin3
Definition plplot.h:781
#define plgspa
Definition plplot.h:743
#define plscol0
Definition plplot.h:800
#define plptex
Definition plplot.h:785
#define plrgbhls
Definition plplot.h:789
#define plbop
Definition plplot.h:696
#define plgdidev
Definition plplot.h:730
#define plpoin
Definition plplot.h:780
#define plptex3
Definition plplot.h:786
#define plstripd
Definition plplot.h:845
#define plhist
Definition plplot.h:751
#define plmapline
Definition plplot.h:765
#define plgfnam
Definition plplot.h:736
#define plgdiori
Definition plplot.h:731
#define plszax
Definition plplot.h:854
#define plstripa
Definition plplot.h:843
#define plgxax
Definition plplot.h:748
#define plgra
Definition plplot.h:740
#define plenv0
Definition plplot.h:712
#define plspal1
Definition plplot.h:833
#define plstring3
Definition plplot.h:842
#define plxormod
Definition plplot.h:865
#define plspause
Definition plplot.h:834
#define plgdev
Definition plplot.h:729
#define plgradient
Definition plplot.h:741
#define plspal0
Definition plplot.h:832
#define plcalc_world
Definition plplot.h:700
#define plwidth
Definition plplot.h:863
#define pllab
Definition plplot.h:757
#define plsurf3d
Definition plplot.h:847
#define plsurf3dl
Definition plplot.h:848
#define plvasp
Definition plplot.h:857
#define plscmap0n
Definition plplot.h:793
#define plmtex3
Definition plplot.h:774
#define plctime
Definition plplot.h:708
#define plclear
Definition plplot.h:701
#define plsvpa
Definition plplot.h:850
#define plw3d
Definition plplot.h:862
#define plot3dcl
Definition plplot.h:777
#define plscmap1n
Definition plplot.h:798
#define plgvpd
Definition plplot.h:746
#define plhlsrgb
Definition plplot.h:752
#define pl_setcontlabelformat
Definition plplot.h:690
#define plsdev
Definition plplot.h:806
#define plconfigtime
Definition plplot.h:705
#define plscolbga
Definition plplot.h:803
#define PL_UNUSED(x)
Definition plplot.h:138
#define plscmap1
Definition plplot.h:794
#define plsdiplz
Definition plplot.h:811
#define plparseopts
Definition plplot.h:778
#define plmapstring
Definition plplot.h:766
#define plot3d
Definition plplot.h:775
#define plsesc
Definition plplot.h:814
#define plarc
Definition plplot.h:693
#define plsetopt
Definition plplot.h:815
#define plgvpw
Definition plplot.h:747
#define pltext
Definition plplot.h:855
#define plstring
Definition plplot.h:841
#define plsdiori
Definition plplot.h:809
#define plcont
Definition plplot.h:706
#define plspage
Definition plplot.h:831
#define plaxes
Definition plplot.h:694
#define pllsty
Definition plplot.h:763
#define plslabelfunc
Definition plplot.h:825
#define plshades
Definition plplot.h:824
#define plglevel
Definition plplot.h:738
#define plscompression
Definition plplot.h:805
#define plfamadv
Definition plplot.h:716
#define plfont
Definition plplot.h:720
#define plscmap0a
Definition plplot.h:792
#define plgcol0a
Definition plplot.h:725
#define plscmap1_range
Definition plplot.h:799
#define plmeshc
Definition plplot.h:771
#define plshade
Definition plplot.h:820
#define plsym
Definition plplot.h:853
#define plscmap1a
Definition plplot.h:795
#define plscmap0
Definition plplot.h:791
#define plgriddata
Definition plplot.h:742
#define plstripc
Definition plplot.h:844
#define pl_setcontlabelparam
Definition plplot.h:691
#define plsvect
Definition plplot.h:849
#define plstyl
Definition plplot.h:846
#define plline
Definition plplot.h:760
#define pljoin
Definition plplot.h:756
#define plgzax
Definition plplot.h:750
#define plsstrm
Definition plplot.h:835
#define plscmap1la
Definition plplot.h:797
#define plssym
Definition plplot.h:837
#define plscolor
Definition plplot.h:804
#define plcol0
Definition plplot.h:702
#define plsdiplt
Definition plplot.h:810
#define plcolorbar
Definition plplot.h:704
#define plvsta
Definition plplot.h:861
#define plmeridians
Definition plplot.h:769
#define plot3dc
Definition plplot.h:776
#define plcpstrm
Definition plplot.h:707
#define plmkstrm
Definition plplot.h:772
#define plgcol0
Definition plplot.h:724
#define pladv
Definition plplot.h:692
#define plgcolbga
Definition plplot.h:727
#define plline3
Definition plplot.h:762
#define plprec
Definition plplot.h:783
#define plfill3
Definition plplot.h:718
#define plseed
Definition plplot.h:813
#define plgcompression
Definition plplot.h:728
#define plimagefr
Definition plplot.h:754
#define plsfont
Definition plplot.h:819
int PLINT
Definition plplot.h:181
#define plgfam
Definition plplot.h:734
#define plscol0a
Definition plplot.h:801
#define plend1
Definition plplot.h:710
#define plrandd
Definition plplot.h:787
#define plbin
Definition plplot.h:695
#define plsdidev
Definition plplot.h:807
#define plsfnam
Definition plplot.h:818
void * PLPointer
Definition plplot.h:209
#define plflush
Definition plplot.h:719
#define plwind
Definition plplot.h:864
#define plstar
Definition plplot.h:838
#define plmtex
Definition plplot.h:773
PLINT PLBOOL
Definition plplot.h:204
#define plsdimap
Definition plplot.h:808
#define plsfci
Definition plplot.h:817
#define plend
Definition plplot.h:709
#define plmesh
Definition plplot.h:770
#define plreplot
Definition plplot.h:788
#define plgcolbg
Definition plplot.h:726
#define plgcmap1_range
Definition plplot.h:723
#define plstart
Definition plplot.h:839
#define plsxax
Definition plplot.h:851
#define plbox
Definition plplot.h:697
#define plbtime
Definition plplot.h:699
#define plgyax
Definition plplot.h:749
#define plvpor
Definition plplot.h:860
#define plpoly3
Definition plplot.h:782
#define plgpage
Definition plplot.h:739
#define plssub
Definition plplot.h:836
void *(* swig_converter_func)(void *, int *)
struct swig_type_info *(* swig_dycast_func)(void **)
SWIGRUNTIME int SWIG_Lua_class_equal(lua_State *L)
SWIGRUNTIME void SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata)
static int _wrap_ptex(lua_State *L)
static int _wrap_PLGraphicsIn_wX_get(lua_State *L)
static int _wrap_surf3dl(lua_State *L)
static int _wrap_scmap1(lua_State *L)
PLFLT ** read_double_Matrix(lua_State *L, int index, int *nx, int *ny)
static int _wrap_clear(lua_State *L)
SWIGRUNTIME void * SWIG_Lua_MustGetPtr(lua_State *L, int index, swig_type_info *type, int flags, int argnum, const char *func_name)
static int _wrap_szax(lua_State *L)
#define SWIG_DOSTRING_FAIL(S)
static int _wrap_wind(lua_State *L)
static swig_cast_info * swig_cast_initial[]
static int _wrap_PLGraphicsIn_button_get(lua_State *L)
#define lua_rawlen
void mylabel(PLINT axis, PLFLT value, char *label, PLINT length, PLPointer data)
static int _wrap_configtime(lua_State *L)
static int _wrap_sori(lua_State *L)
SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L, int index, void **ptr, swig_type_info *type, int flags)
static int _wrap_mesh(lua_State *L)
static int _wrap_gyax(lua_State *L)
static int _wrap_box(lua_State *L)
#define SWIG_ALLOC_ARRAY(TYPE, LEN)
static int _wrap_spage(lua_State *L)
static int _wrap_mkstrm(lua_State *L)
SWIGRUNTIME void SWIG_Lua_SetModule(lua_State *L, swig_module_info *module)
static int _wrap_PLGraphicsIn_keysym_get(lua_State *L)
SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx, int skip_check)
static swig_type_info _swigt__p_f_double_double_p_double_p_double_p_void__void
static int _wrap_PLGraphicsIn_subwindow_get(lua_State *L)
static int _wrap_rgbhls(lua_State *L)
static int _wrap_scmap1_range(lua_State *L)
SWIGRUNTIME void SWIG_Lua_pusherrstring(lua_State *L, const char *str)
static int _wrap_plend(lua_State *L)
SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
#define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME, TYPE)
SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L)
static int _wrap_hlsrgb(lua_State *L)
SWIGINTERN void SWIG_Lua_add_namespace_classes(lua_State *L, swig_lua_namespace *ns)
#define SWIG_CheckState(r)
static int _wrap_meridians(lua_State *L)
#define SWIG_fail_ptr(func_name, argnum, type)
static swig_cast_info _swigc__p_f_double_double__int[]
#define SWIG_NewMemberObj(L, ptr, sz, type)
static int _wrap_env0(lua_State *L)
static swig_cast_info _swigc__p_int[]
SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss)
static int _wrap_gcolbga(lua_State *L)
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
static int _wrap_gvpd(lua_State *L)
void myct(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data)
SWIGINTERN void SWIG_Lua_class_register_static(lua_State *L, swig_lua_class *clss)
SWIGRUNTIME const char * SWIG_Lua_typename(lua_State *L, int tp)
static int _wrap_ssym(lua_State *L)
static PLINT Alen
static swig_cast_info _swigc__p_double[]
static swig_lua_method swig_PLGraphicsIn_meta[]
#define SWIGTYPE_p_PLGraphicsIn
static int _wrap_plGetCursor(lua_State *L)
static int _wrap_gxax(lua_State *L)
void(* label_func)(PLINT, PLFLT, char *, PLINT, PLPointer)
static int _wrap_PLGraphicsIn_pY_set(lua_State *L)
static swig_lua_attribute swig_PLGraphicsIn_Sf_SwigStatic_attributes[]
#define SWIG_LUA_POINTER
SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
static int _wrap_seed(lua_State *L)
static int _wrap_sdiplt(lua_State *L)
static int _wrap_psty(lua_State *L)
static swig_lua_attribute swig_PLGraphicsIn_attributes[]
static int _wrap_cont(lua_State *L)
SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L, int index, void *ptr, size_t size, swig_type_info *type)
static int _wrap_scmap0a(lua_State *L)
static int _wrap_gradient(lua_State *L)
SWIGINTERN void SWIG_write_ptr_array(lua_State *L, void **array, int size, swig_type_info *type, int own)
static int _wrap_setcontlabelparam(lua_State *L)
SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info *SWIGUNUSED swig_type, int first_arg, swig_lua_base_iterator_func func, int *const ret)
void(* mapform_func)(PLINT, PLFLT *, PLFLT *)
void mypltr(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data)
static int _wrap_width(lua_State *L)
static int _wrap_hist(lua_State *L)
static int _wrap_text(lua_State *L)
#define SWIG_ConvertPtr(L, idx, ptr, type, flags)
static int _wrap_gspa(lua_State *L)
SWIGINTERN int SWIG_Lua_dostring(lua_State *L, const char *str)
static int _wrap_vpor(lua_State *L)
void(* pltr_func)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer)
static int _wrap_colorbar(lua_State *L)
static int _wrap_flush(lua_State *L)
static int _wrap_sym(lua_State *L)
static swig_cast_info _swigc__p_f_double_double_p_double_p_double_p_void__void[]
static int _wrap_PLGraphicsIn_state_get(lua_State *L)
static int _wrap_xormod(lua_State *L)
#define SWIG_fail_arg(func_name, argnum, type)
static int _wrap_spause(lua_State *L)
#define SWIGRUNTIME
#define SWIG_Lua_get_table(L, n)
static int _wrap_sdidev(lua_State *L)
static int _wrap_scmap1n(lua_State *L)
static int _wrap_setcontlabelformat(lua_State *L)
static int _wrap_gcmap1_range(lua_State *L)
#define SWIG_RUNTIME_VERSION
static int _wrap_sdimap(lua_State *L)
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
SWIGINTERN int SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
static int _wrap_ssub(lua_State *L)
static int _wrap_new_PLGraphicsIn(lua_State *L)
static int _wrap_scmap1a(lua_State *L)
#define SWIG_Lua_add_function(L, n, f)
static int _wrap_abort(lua_State *L)
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
static int _wrap_glevel(lua_State *L)
#define SWIG_AddCast(r)
#define SWIG_LUA_CHAR
static int _wrap_PLGraphicsIn_dX_get(lua_State *L)
static int _wrap_pat(lua_State *L)
static char mylabel_funcstr[255]
static int _wrap_gchr(lua_State *L)
SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index)
static int _wrap_PLGraphicsIn_pY_get(lua_State *L)
static int _wrap_sfci(lua_State *L)
static int _wrap_shade(lua_State *L)
SWIGINTERN void SWIG_Lua_populate_inheritable_metamethods(lua_State *L)
static swig_type_info * swig_types[13]
static int _wrap_gpage(lua_State *L)
static int _wrap_plResetOpts(lua_State *L)
static swig_cast_info _swigc__p_f_int_p_double_p_double__void[]
static int _wrap_lightsource(lua_State *L)
static int _wrap_sfont(lua_State *L)
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
static int _wrap_calc_world(lua_State *L)
static int _wrap_plot3dcl(lua_State *L)
static int _wrap_gvpw(lua_State *L)
static int _wrap_plOptUsage(lua_State *L)
static swig_module_info swig_module
static int _wrap_image(lua_State *L)
static const char * swig_PLGraphicsIn_base_names[]
static int _wrap_PLGraphicsIn_state_set(lua_State *L)
static swig_lua_class * swig_PLGraphicsIn_bases[]
static PLINT Ylen
static int _wrap_parseopts(lua_State *L)
static int _wrap_MinMax2dGrid(lua_State *L)
static swig_type_info _swigt__p_double
static int _wrap_gdiori(lua_State *L)
#define SWIG_SetModule(clientdata, pointer)
static int _wrap_famadv(lua_State *L)
#define SWIG_INIT_CLIENT_DATA_TYPE
static int _wrap_scolbga(lua_State *L)
static int _wrap_font(lua_State *L)
static int _wrap_gzax(lua_State *L)
static char mypltr_funcstr[255]
static int _wrap_scmap1la(lua_State *L)
static int _wrap_slabelfunc(lua_State *L)
#define SWIG_POINTER_RELEASE
static swig_lua_class * swig_SwigModule_classes[]
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
SWIGINTERN int SWIG_itable_size(lua_State *L, int index)
SWIGRUNTIME swig_module_info * SWIG_Lua_GetModule(lua_State *L)
#define SWIGUNUSED
static int _wrap_env(lua_State *L)
static int _wrap_PLGraphicsIn_string_get(lua_State *L)
static swig_type_info _swigt__p_p_char
#define lua_rawsetp(L, index, ptr)
static int _wrap_timefmt(lua_State *L)
static int _wrap_plend1(lua_State *L)
static int _wrap_box3(lua_State *L)
static int _wrap_map(lua_State *L)
SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
static int _wrap_gfam(lua_State *L)
static swig_type_info _swigt__p_p_double
#define SWIG_POINTER_CLEAR
SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb)
static int _wrap_stripc(lua_State *L)
SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
static int _wrap_scmap0n(lua_State *L)
static int _wrap_errx(lua_State *L)
static int _wrap_sstrm(lua_State *L)
void mapform(PLINT n, PLFLT *x, PLFLT *y)
static int _wrap_gstrm(lua_State *L)
SWIGINTERN void SWIG_Lua_get_inheritable_metamethods(lua_State *L)
static int _wrap_init(lua_State *L)
static int _wrap_sfam(lua_State *L)
static int _wrap_replot(lua_State *L)
SWIGINTERN void SWIG_Lua_add_variable(lua_State *L, const char *name, lua_CFunction getFn, lua_CFunction setFn)
static swig_lua_namespace * swig_SwigModule_namespaces[]
#define SWIG_check_num_args(func_name, a, b)
static swig_lua_class * swig_PLGraphicsIn_Sf_SwigStatic_classes[]
static int _wrap_svect(lua_State *L)
#define SWIG_LUA_CONSTTAB_INT(B, C)
static int _wrap_poin(lua_State *L)
static int _wrap_mapfill(lua_State *L)
SWIGINTERN int SWIG_Lua_namespace_get(lua_State *L)
static int _wrap_scol0a(lua_State *L)
static int _wrap_PLGraphicsIn_string_set(lua_State *L)
static int _wrap_star(lua_State *L)
static int _wrap_fontld(lua_State *L)
static int _wrap_line(lua_State *L)
SWIGINTERN int SWIG_Lua_class_get(lua_State *L)
SWIGRUNTIME int SWIG_Lua_type(lua_State *L)
SWIGINTERN void SWIG_Lua_namespace_register(lua_State *L, swig_lua_namespace *ns, int reg)
#define SWIG_LUA_CONSTTAB_FLOAT(B, C)
PLFLT(* f2eval_func)(PLINT, PLINT, PLPointer)
static int _wrap_plClearOpts(lua_State *L)
static int _wrap_legend(lua_State *L)
SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L)
static swig_cast_info _swigc__p_char[]
SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State *L, swig_lua_class *clss)
luaL_Reg swig_lua_method
static int _wrap_poin3(lua_State *L)
static int _wrap_plot3d(lua_State *L)
static swig_type_info _swigt__p_f_int_p_q_const__double_p_q_const__double__void
PLINT(* defined_func)(PLFLT, PLFLT)
static int _wrap_vasp(lua_State *L)
#define SWIG_NewPointerObj(L, ptr, type, owner)
static int _wrap_imagefr(lua_State *L)
static swig_cast_info _swigc__p_p_double[]
#define SWIGINTERN
static int _wrap_gver(lua_State *L)
SWIGINTERN void SWIG_Lua_AddMetatable(lua_State *L, swig_type_info *type)
static int _wrap_scolbg(lua_State *L)
#define SWIG_FREE_ARRAY(PTR)
static int _wrap_PLGraphicsIn_keysym_set(lua_State *L)
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
static int _wrap_w3d(lua_State *L)
static swig_lua_const_info swig_SwigModule_constants[]
static int _wrap_PLGraphicsIn_dY_get(lua_State *L)
static char mapform_funcstr[255]
static int _wrap_stransform(lua_State *L)
SWIGINTERN void SWIG_Lua_class_register(lua_State *L, swig_lua_class *clss)
SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L, void *ptr, swig_type_info *type, int own)
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
static int _wrap_scolor(lua_State *L)
static int _wrap_line3(lua_State *L)
SWIGINTERN int SWIG_Lua_set_immutable(lua_State *L)
static swig_lua_const_info swig_PLGraphicsIn_Sf_SwigStatic_constants[]
static lua_State * myL
void(* ct_func)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer)
#define SWIG_POINTER_NO_NULL
static const char * lua_tolstring(lua_State *L, int idx, size_t *len)
static int _wrap_gdidev(lua_State *L)
static int _wrap_axes(lua_State *L)
static int _wrap_PLGraphicsIn_type_get(lua_State *L)
#define lua_absindex(L, i)
#define SWIG_LUA_FLOAT
static int _wrap_warn(lua_State *L)
SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State *L, swig_lua_namespace *ns)
static int _wrap_randd(lua_State *L)
#define SWIG_NullReferenceError
static int _wrap_arc(lua_State *L)
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
static int _wrap_stripa(lua_State *L)
static int _wrap_PLGraphicsIn_type_set(lua_State *L)
static int _wrap_join(lua_State *L)
static void swig_delete_PLGraphicsIn(void *obj)
static int _wrap_cpstrm(lua_State *L)
static int _wrap_gdiplt(lua_State *L)
#define SWIG_POINTER_DISOWN
SWIGINTERN int SWIG_Lua_namespace_set(lua_State *L)
SWIGINTERN void ** SWIG_get_ptr_array_var(lua_State *L, int index, int *size, swig_type_info *type)
struct swig_type_info swig_type_info
static char myct_funcstr[255]
static int _wrap_gcompression(lua_State *L)
static int _wrap_string(lua_State *L)
SWIGINTERN int SWIG_Lua_class_disown(lua_State *L)
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
static swig_type_info _swigt__p_PLGraphicsIn
SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L, swig_lua_class *clss)
static int _wrap_path(lua_State *L)
static swig_type_info _swigt__p_f_double_double__int
static int _wrap_PLGraphicsIn_subwindow_set(lua_State *L)
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
static int _wrap_smaj(lua_State *L)
static int _wrap_gfci(lua_State *L)
static int _wrap_start(lua_State *L)
static int _wrap_meshc(lua_State *L)
static int _wrap_plot3dc(lua_State *L)
static int _wrap_PLGraphicsIn_wY_get(lua_State *L)
static int _wrap_ctime(lua_State *L)
SWIGINTERN int SWIG_read_ptr_array(lua_State *L, int index, void **array, int size, swig_type_info *type)
SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret)
static int _wrap_lsty(lua_State *L)
static int _wrap_gfnam(lua_State *L)
static int _wrap_bin(lua_State *L)
static int _wrap_mapline(lua_State *L)
static int _wrap_gcol0(lua_State *L)
static int _wrap_PLGraphicsIn_dX_set(lua_State *L)
SWIGINTERN int SWIG_Lua_class_set(lua_State *L)
SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx)
#define SWIG_GetModule(clientdata)
SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L, void *ptr, size_t size, swig_type_info *type)
static int _wrap_PLGraphicsIn_wX_set(lua_State *L)
static int _wrap_bop(lua_State *L)
SWIGINTERN int SWIG_Lua_class_destruct(lua_State *L)
static swig_cast_info _swigc__p_unsigned_int[]
#define SWIG_fail
static int _wrap_ptex3(lua_State *L)
static swig_type_info _swigt__p_int
static swig_lua_method swig_SwigModule_methods[]
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty)
static int _wrap_eop(lua_State *L)
SWIGRUNTIME void SWIG_PropagateClientData(void)
static swig_cast_info _swigc__p_f_int_double_p_char_int_p_void__void[]
static int _wrap_plSetUsage(lua_State *L)
#define lua_pushglobaltable(L)
static int _wrap_poly3(lua_State *L)
#define SWIG_init_user
static swig_lua_method swig_PLGraphicsIn_Sf_SwigStatic_methods[]
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
#define LUA_ALLOC_ARRAY(TYPE, LEN)
static int _wrap_prec(lua_State *L)
static int _wrap_sdev(lua_State *L)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
#define SWIG_isptrtype(L, I)
static int _wrap_PLGraphicsIn_pX_set(lua_State *L)
#define SWIG_ERROR_RELEASE_NOT_OWNED
#define LUA_DECLARE_TYPEMAP_ARR_FN(NAME, TYPE)
static int _wrap_string3(lua_State *L)
static int _wrap_spal1(lua_State *L)
#define SWIG_TYPE_TABLE_NAME
static int _wrap_surf3d(lua_State *L)
static swig_type_info _swigt__p_unsigned_int
static swig_lua_namespace swig_PLGraphicsIn_Sf_SwigStatic
SWIGINTERN void SWIG_Lua_init_base_class(lua_State *L, swig_lua_class *clss)
static int _wrap_spal0(lua_State *L)
static int _wrap_griddata(lua_State *L)
static PLINT Xlen
static swig_type_info _swigt__p_f_int_p_double_p_double__void
static int _wrap_adv(lua_State *L)
static int _wrap_gra(lua_State *L)
#define SWIG_contract_assert(expr, msg)
int(* swig_lua_base_iterator_func)(lua_State *, swig_type_info *, int, int *ret)
static int _wrap_smin(lua_State *L)
#define SWIG_init
SWIGINTERN void SWIG_Lua_create_class_registry(lua_State *L)
static int _wrap_gcol0a(lua_State *L)
#define SWIG_ERROR
static int _wrap_vect(lua_State *L)
static swig_lua_namespace swig_SwigModule
#define LUA_FREE_ARRAY(PTR)
static int _wrap_lab(lua_State *L)
static swig_type_info _swigt__p_f_int_double_p_char_int_p_void__void
static int _wrap_setopt(lua_State *L)
static int _wrap_shades(lua_State *L)
static int _wrap_PLGraphicsIn_button_set(lua_State *L)
SWIGRUNTIME void SWIG_Lua_pushferrstring(lua_State *L, const char *fmt,...)
static swig_type_info * swig_type_initial[]
static int _wrap_mapstring(lua_State *L)
static int _wrap_col1(lua_State *L)
static int _wrap_btime(lua_State *L)
SWIGINTERN int SWIG_table_size(lua_State *L, int index)
static int _wrap_mtex3(lua_State *L)
static int _wrap_sdiplz(lua_State *L)
static int _wrap_styl(lua_State *L)
static int _wrap_vsta(lua_State *L)
static swig_cast_info _swigc__p_PLGraphicsIn[]
static int _wrap_sfnam(lua_State *L)
static int _wrap_fill(lua_State *L)
static int _wrap_mtex(lua_State *L)
static int _wrap_scmap1l(lua_State *L)
static swig_cast_info _swigc__p_p_char[]
static int _wrap_erry(lua_State *L)
static swig_lua_attribute swig_SwigModule_attributes[]
static int _wrap_PLGraphicsIn_pX_get(lua_State *L)
#define SWIG_LUACODE
#define SWIG_LUA_INT
static swig_type_info _swigt__p_char
static int _wrap_col0(lua_State *L)
static swig_lua_method swig_PLGraphicsIn_methods[]
static int _wrap_gfont(lua_State *L)
#define SWIGEXPORT
#define SWIG_IsOK(r)
SWIGINTERN int SWIG_Lua_class_tostring(lua_State *L)
void(* fill_func)(PLINT, const PLFLT *, const PLFLT *)
static int _wrap_svpa(lua_State *L)
static int _wrap_scmap0(lua_State *L)
static int _wrap_vpas(lua_State *L)
#define SWIG_LUA_BINARY
static int _wrap_schr(lua_State *L)
static int _wrap_sxax(lua_State *L)
static int _wrap_stripd(lua_State *L)
static int _wrap_syax(lua_State *L)
static int _wrap_gcolbg(lua_State *L)
static swig_lua_class _wrap_class_PLGraphicsIn
static int _wrap_scompression(lua_State *L)
static int _wrap_maptex(lua_State *L)
static int _wrap_PLGraphicsIn_dY_set(lua_State *L)
static swig_cast_info _swigc__p_f_int_p_q_const__double_p_q_const__double__void[]
#define SWIG_LUA_STRING
static int _wrap_scol0(lua_State *L)
SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[])
static int _wrap_sesc(lua_State *L)
SWIGINTERN void ** SWIG_get_ptr_array_fixed(lua_State *L, int index, int size, swig_type_info *type)
static int _wrap_sdiori(lua_State *L)
static int _proxy__wrap_new_PLGraphicsIn(lua_State *L)
SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L, const char *cname)
#define SWIG_OK
static int _wrap_PLGraphicsIn_wY_set(lua_State *L)
SWIGINTERN void SWIG_Lua_add_class_instance_details(lua_State *L, swig_lua_class *clss)
#define SWIGINTERNINLINE
static int _wrap_gdev(lua_State *L)
#define SWIG_Lua_add_boolean(L, n, b)
static int _wrap_fill3(lua_State *L)
#define lua_rawgetp(L, index, ptr)
#define SWIGRUNTIMEINLINE
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
char string[PL_MAXKEY]
Definition plplot.h:440
PLINT nx
Definition plplot.h:521
PLFLT_NC_MATRIX xg
Definition plplot.h:520
PLINT ny
Definition plplot.h:521
PLFLT_NC_MATRIX zg
Definition plplot.h:520
PLFLT_NC_MATRIX yg
Definition plplot.h:520
PLFLT_NC_FE_POINTER xg
Definition plplot.h:508
PLFLT_NC_FE_POINTER yg
Definition plplot.h:508
PLINT nz
Definition plplot.h:509
PLINT nx
Definition plplot.h:509
PLFLT_NC_FE_POINTER zg
Definition plplot.h:508
PLINT ny
Definition plplot.h:509
swig_type_info * type
struct swig_cast_info * prev
struct swig_cast_info * next
swig_converter_func converter
swig_type_info ** type
void(* destructor)(void *)
const char ** base_names
swig_lua_attribute * attributes
swig_lua_namespace * cls_static
struct swig_lua_class ** bases
swig_lua_method * metatable
lua_CFunction constructor
swig_lua_method * methods
swig_type_info ** ptype
swig_lua_method * ns_methods
swig_lua_attribute * ns_attributes
struct swig_lua_class ** ns_classes
swig_lua_const_info * ns_constants
struct swig_lua_namespace ** ns_namespaces
swig_type_info * type
swig_type_info * type
swig_type_info ** types
swig_cast_info ** cast_initial
swig_type_info ** type_initial
struct swig_module_info * next
swig_dycast_func dcast
struct swig_cast_info * cast
void mapform(PLINT n, PLFLT *x, PLFLT *y)
Definition tclAPI.c:3693
static const char * name
Definition tkMain.c:135