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