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