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.1.1
4 *
5 * Do not make changes to this file unless you know what you are doing - modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
8
9
10#define SWIG_VERSION 0x040101
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/* -----------------------------------------------------------------------------
140 * swigrun.swg
141 *
142 * This file contains generic C API SWIG runtime support for pointer
143 * type checking.
144 * ----------------------------------------------------------------------------- */
145
146/* This should only be incremented when either the layout of swig_type_info changes,
147 or for whatever reason, the runtime changes incompatibly */
148#define SWIG_RUNTIME_VERSION "4"
149
150/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
151#ifdef SWIG_TYPE_TABLE
152# define SWIG_QUOTE_STRING(x) #x
153# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
154# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
155#else
156# define SWIG_TYPE_TABLE_NAME
157#endif
158
159/*
160 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
161 creating a static or dynamic library from the SWIG runtime code.
162 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
163
164 But only do this if strictly necessary, ie, if you have problems
165 with your compiler or suchlike.
166*/
167
168#ifndef SWIGRUNTIME
169# define SWIGRUNTIME SWIGINTERN
170#endif
171
172#ifndef SWIGRUNTIMEINLINE
173# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
174#endif
175
176/* Generic buffer size */
177#ifndef SWIG_BUFFER_SIZE
178# define SWIG_BUFFER_SIZE 1024
179#endif
180
181/* Flags for pointer conversions */
182#define SWIG_POINTER_DISOWN 0x1
183#define SWIG_CAST_NEW_MEMORY 0x2
184#define SWIG_POINTER_NO_NULL 0x4
185#define SWIG_POINTER_CLEAR 0x8
186#define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
187
188/* Flags for new pointer objects */
189#define SWIG_POINTER_OWN 0x1
190
191
192/*
193 Flags/methods for returning states.
194
195 The SWIG conversion methods, as ConvertPtr, return an integer
196 that tells if the conversion was successful or not. And if not,
197 an error code can be returned (see swigerrors.swg for the codes).
198
199 Use the following macros/flags to set or process the returning
200 states.
201
202 In old versions of SWIG, code such as the following was usually written:
203
204 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
205 // success code
206 } else {
207 //fail code
208 }
209
210 Now you can be more explicit:
211
212 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
213 if (SWIG_IsOK(res)) {
214 // success code
215 } else {
216 // fail code
217 }
218
219 which is the same really, but now you can also do
220
221 Type *ptr;
222 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
223 if (SWIG_IsOK(res)) {
224 // success code
225 if (SWIG_IsNewObj(res) {
226 ...
227 delete *ptr;
228 } else {
229 ...
230 }
231 } else {
232 // fail code
233 }
234
235 I.e., now SWIG_ConvertPtr can return new objects and you can
236 identify the case and take care of the deallocation. Of course that
237 also requires SWIG_ConvertPtr to return new result values, such as
238
239 int SWIG_ConvertPtr(obj, ptr,...) {
240 if (<obj is ok>) {
241 if (<need new object>) {
242 *ptr = <ptr to new allocated object>;
243 return SWIG_NEWOBJ;
244 } else {
245 *ptr = <ptr to old object>;
246 return SWIG_OLDOBJ;
247 }
248 } else {
249 return SWIG_BADOBJ;
250 }
251 }
252
253 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
254 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
255 SWIG errors code.
256
257 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
258 allows returning the 'cast rank', for example, if you have this
259
260 int food(double)
261 int fooi(int);
262
263 and you call
264
265 food(1) // cast rank '1' (1 -> 1.0)
266 fooi(1) // cast rank '0'
267
268 just use the SWIG_AddCast()/SWIG_CheckState()
269*/
270
271#define SWIG_OK (0)
272/* Runtime errors are < 0 */
273#define SWIG_ERROR (-1)
274/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
275/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
276/* Errors < -200 are generic runtime specific errors */
277#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
278
279#define SWIG_IsOK(r) (r >= 0)
280#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
281
282/* The CastRankLimit says how many bits are used for the cast rank */
283#define SWIG_CASTRANKLIMIT (1 << 8)
284/* The NewMask denotes the object was created (using new/malloc) */
285#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
286/* The TmpMask is for in/out typemaps that use temporal objects */
287#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
288/* Simple returning values */
289#define SWIG_BADOBJ (SWIG_ERROR)
290#define SWIG_OLDOBJ (SWIG_OK)
291#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
292#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
293/* Check, add and del object mask methods */
294#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
295#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
296#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
297#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
298#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
299#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
300
301/* Cast-Rank Mode */
302#if defined(SWIG_CASTRANK_MODE)
303# ifndef SWIG_TypeRank
304# define SWIG_TypeRank unsigned long
305# endif
306# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
307# define SWIG_MAXCASTRANK (2)
308# endif
309# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
310# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
312 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
313}
315 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
316}
317#else /* no cast-rank mode */
318# define SWIG_AddCast(r) (r)
319# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
320#endif
321
322
323#include <string.h>
324
325#ifdef __cplusplus
326extern "C" {
327#endif
328
329typedef void *(*swig_converter_func)(void *, int *);
330typedef struct swig_type_info *(*swig_dycast_func)(void **);
331
332/* Structure to store information on one type */
333typedef struct swig_type_info {
334 const char *name; /* mangled name of this type */
335 const char *str; /* human readable name of this type */
336 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
337 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
338 void *clientdata; /* language specific type data */
339 int owndata; /* flag if the structure owns the clientdata */
341
342/* Structure to store a type and conversion function used for casting */
343typedef struct swig_cast_info {
344 swig_type_info *type; /* pointer to type that is equivalent to this type */
345 swig_converter_func converter; /* function to cast the void pointers */
346 struct swig_cast_info *next; /* pointer to next cast in linked list */
347 struct swig_cast_info *prev; /* pointer to the previous cast */
349
350/* Structure used to store module information
351 * Each module generates one structure like this, and the runtime collects
352 * all of these structures and stores them in a circularly linked list.*/
353typedef struct swig_module_info {
354 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
355 size_t size; /* Number of types in this module */
356 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
357 swig_type_info **type_initial; /* Array of initially generated type structures */
358 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
359 void *clientdata; /* Language specific module data */
361
362/*
363 Compare two type names skipping the space characters, therefore
364 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
365
366 Return 0 when the two name types are equivalent, as in
367 strncmp, but skipping ' '.
368*/
369SWIGRUNTIME int
370SWIG_TypeNameComp(const char *f1, const char *l1,
371 const char *f2, const char *l2) {
372 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
373 while ((*f1 == ' ') && (f1 != l1)) ++f1;
374 while ((*f2 == ' ') && (f2 != l2)) ++f2;
375 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
376 }
377 return (int)((l1 - f1) - (l2 - f2));
378}
379
380/*
381 Check type equivalence in a name list like <name1>|<name2>|...
382 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
383*/
384SWIGRUNTIME int
385SWIG_TypeCmp(const char *nb, const char *tb) {
386 int equiv = 1;
387 const char* te = tb + strlen(tb);
388 const char* ne = nb;
389 while (equiv != 0 && *ne) {
390 for (nb = ne; *ne; ++ne) {
391 if (*ne == '|') break;
392 }
393 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
394 if (*ne) ++ne;
395 }
396 return equiv;
397}
398
399/*
400 Check type equivalence in a name list like <name1>|<name2>|...
401 Return 0 if not equal, 1 if equal
402*/
403SWIGRUNTIME int
404SWIG_TypeEquiv(const char *nb, const char *tb) {
405 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
406}
407
408/*
409 Check the typename
410*/
412SWIG_TypeCheck(const char *c, swig_type_info *ty) {
413 if (ty) {
414 swig_cast_info *iter = ty->cast;
415 while (iter) {
416 if (strcmp(iter->type->name, c) == 0) {
417 if (iter == ty->cast)
418 return iter;
419 /* Move iter to the top of the linked list */
420 iter->prev->next = iter->next;
421 if (iter->next)
422 iter->next->prev = iter->prev;
423 iter->next = ty->cast;
424 iter->prev = 0;
425 if (ty->cast) ty->cast->prev = iter;
426 ty->cast = iter;
427 return iter;
428 }
429 iter = iter->next;
430 }
431 }
432 return 0;
433}
434
435/*
436 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
437*/
440 if (ty) {
441 swig_cast_info *iter = ty->cast;
442 while (iter) {
443 if (iter->type == from) {
444 if (iter == ty->cast)
445 return iter;
446 /* Move iter to the top of the linked list */
447 iter->prev->next = iter->next;
448 if (iter->next)
449 iter->next->prev = iter->prev;
450 iter->next = ty->cast;
451 iter->prev = 0;
452 if (ty->cast) ty->cast->prev = iter;
453 ty->cast = iter;
454 return iter;
455 }
456 iter = iter->next;
457 }
458 }
459 return 0;
460}
461
462/*
463 Cast a pointer up an inheritance hierarchy
464*/
466SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
467 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
468}
469
470/*
471 Dynamic pointer casting. Down an inheritance hierarchy
472*/
475 swig_type_info *lastty = ty;
476 if (!ty || !ty->dcast) return ty;
477 while (ty && (ty->dcast)) {
478 ty = (*ty->dcast)(ptr);
479 if (ty) lastty = ty;
480 }
481 return lastty;
482}
483
484/*
485 Return the name associated with this type
486*/
487SWIGRUNTIMEINLINE const char *
489 return ty->name;
490}
491
492/*
493 Return the pretty name associated with this type,
494 that is an unmangled type name in a form presentable to the user.
495*/
496SWIGRUNTIME const char *
498 /* The "str" field contains the equivalent pretty names of the
499 type, separated by vertical-bar characters. Choose the last
500 name. It should be the most specific; a fully resolved name
501 but not necessarily with default template parameters expanded. */
502 if (!type) return NULL;
503 if (type->str != NULL) {
504 const char *last_name = type->str;
505 const char *s;
506 for (s = type->str; *s; s++)
507 if (*s == '|') last_name = s+1;
508 return last_name;
509 }
510 else
511 return type->name;
512}
513
514/*
515 Set the clientdata field for a type
516*/
517SWIGRUNTIME void
519 swig_cast_info *cast = ti->cast;
520 /* if (ti->clientdata == clientdata) return; */
522
523 while (cast) {
524 if (!cast->converter) {
525 swig_type_info *tc = cast->type;
526 if (!tc->clientdata) {
528 }
529 }
530 cast = cast->next;
531 }
532}
533SWIGRUNTIME void
536 ti->owndata = 1;
537}
538
539/*
540 Search for a swig_type_info structure only by mangled name
541 Search is a O(log #types)
542
543 We start searching at module start, and finish searching when start == end.
544 Note: if start == end at the beginning of the function, we go all the way around
545 the circular list.
546*/
549 swig_module_info *end,
550 const char *name) {
551 swig_module_info *iter = start;
552 do {
553 if (iter->size) {
554 size_t l = 0;
555 size_t r = iter->size - 1;
556 do {
557 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
558 size_t i = (l + r) >> 1;
559 const char *iname = iter->types[i]->name;
560 if (iname) {
561 int compare = strcmp(name, iname);
562 if (compare == 0) {
563 return iter->types[i];
564 } else if (compare < 0) {
565 if (i) {
566 r = i - 1;
567 } else {
568 break;
569 }
570 } else if (compare > 0) {
571 l = i + 1;
572 }
573 } else {
574 break; /* should never happen */
575 }
576 } while (l <= r);
577 }
578 iter = iter->next;
579 } while (iter != end);
580 return 0;
581}
582
583/*
584 Search for a swig_type_info structure for either a mangled name or a human readable name.
585 It first searches the mangled names of the types, which is a O(log #types)
586 If a type is not found it then searches the human readable names, which is O(#types).
587
588 We start searching at module start, and finish searching when start == end.
589 Note: if start == end at the beginning of the function, we go all the way around
590 the circular list.
591*/
594 swig_module_info *end,
595 const char *name) {
596 /* STEP 1: Search the name field using binary search */
598 if (ret) {
599 return ret;
600 } else {
601 /* STEP 2: If the type hasn't been found, do a complete search
602 of the str field (the human readable name) */
603 swig_module_info *iter = start;
604 do {
605 size_t i = 0;
606 for (; i < iter->size; ++i) {
607 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
608 return iter->types[i];
609 }
610 iter = iter->next;
611 } while (iter != end);
612 }
613
614 /* neither found a match */
615 return 0;
616}
617
618/*
619 Pack binary data into a string
620*/
621SWIGRUNTIME char *
622SWIG_PackData(char *c, void *ptr, size_t sz) {
623 static const char hex[17] = "0123456789abcdef";
624 const unsigned char *u = (unsigned char *) ptr;
625 const unsigned char *eu = u + sz;
626 for (; u != eu; ++u) {
627 unsigned char uu = *u;
628 *(c++) = hex[(uu & 0xf0) >> 4];
629 *(c++) = hex[uu & 0xf];
630 }
631 return c;
632}
633
634/*
635 Unpack binary data from a string
636*/
637SWIGRUNTIME const char *
638SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
639 unsigned char *u = (unsigned char *) ptr;
640 const unsigned char *eu = u + sz;
641 for (; u != eu; ++u) {
642 char d = *(c++);
643 unsigned char uu;
644 if ((d >= '0') && (d <= '9'))
645 uu = (unsigned char)((d - '0') << 4);
646 else if ((d >= 'a') && (d <= 'f'))
647 uu = (unsigned char)((d - ('a'-10)) << 4);
648 else
649 return (char *) 0;
650 d = *(c++);
651 if ((d >= '0') && (d <= '9'))
652 uu |= (unsigned char)(d - '0');
653 else if ((d >= 'a') && (d <= 'f'))
654 uu |= (unsigned char)(d - ('a'-10));
655 else
656 return (char *) 0;
657 *u = uu;
658 }
659 return c;
660}
661
662/*
663 Pack 'void *' into a string buffer.
664*/
665SWIGRUNTIME char *
666SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
667 char *r = buff;
668 if ((2*sizeof(void *) + 2) > bsz) return 0;
669 *(r++) = '_';
670 r = SWIG_PackData(r,&ptr,sizeof(void *));
671 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
672 strcpy(r,name);
673 return buff;
674}
675
676SWIGRUNTIME const char *
677SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
678 if (*c != '_') {
679 if (strcmp(c,"NULL") == 0) {
680 *ptr = (void *) 0;
681 return name;
682 } else {
683 return 0;
684 }
685 }
686 return SWIG_UnpackData(++c,ptr,sizeof(void *));
687}
688
689SWIGRUNTIME char *
690SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
691 char *r = buff;
692 size_t lname = (name ? strlen(name) : 0);
693 if ((2*sz + 2 + lname) > bsz) return 0;
694 *(r++) = '_';
695 r = SWIG_PackData(r,ptr,sz);
696 if (lname) {
697 strncpy(r,name,lname+1);
698 } else {
699 *r = 0;
700 }
701 return buff;
702}
703
704SWIGRUNTIME const char *
705SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
706 if (*c != '_') {
707 if (strcmp(c,"NULL") == 0) {
708 memset(ptr,0,sz);
709 return name;
710 } else {
711 return 0;
712 }
713 }
714 return SWIG_UnpackData(++c,ptr,sz);
715}
716
717#ifdef __cplusplus
718}
719#endif
720
721/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
722#define SWIG_UnknownError -1
723#define SWIG_IOError -2
724#define SWIG_RuntimeError -3
725#define SWIG_IndexError -4
726#define SWIG_TypeError -5
727#define SWIG_DivisionByZero -6
728#define SWIG_OverflowError -7
729#define SWIG_SyntaxError -8
730#define SWIG_ValueError -9
731#define SWIG_SystemError -10
732#define SWIG_AttributeError -11
733#define SWIG_MemoryError -12
734#define SWIG_NullReferenceError -13
735
736
737/* -----------------------------------------------------------------------------
738 * luarun.swg
739 *
740 * This file contains the runtime support for Lua modules
741 * and includes code for managing global variables and pointer
742 * type checking.
743 * ----------------------------------------------------------------------------- */
744
745#ifdef __cplusplus
746extern "C" {
747#endif
748
749#include "lua.h"
750#include "lauxlib.h"
751#include <stdlib.h> /* for malloc */
752#include <assert.h> /* for a few sanity tests */
753
754/* -----------------------------------------------------------------------------
755 * Lua flavors
756 * ----------------------------------------------------------------------------- */
757
758#define SWIG_LUA_FLAVOR_LUA 1
759#define SWIG_LUA_FLAVOR_ELUA 2
760#define SWIG_LUA_FLAVOR_ELUAC 3
761
762#if !defined(SWIG_LUA_TARGET)
763# error SWIG_LUA_TARGET not defined
764#endif
765
766#if defined(SWIG_LUA_ELUA_EMULATE)
767
768struct swig_elua_entry;
769
770typedef struct swig_elua_key {
771 int type;
772 union {
773 const char* strkey;
774 lua_Number numkey;
775 } key;
776} swig_elua_key;
777
778typedef struct swig_elua_val {
779 int type;
780 union {
781 lua_Number number;
782 const struct swig_elua_entry *table;
783 const char *string;
784 lua_CFunction function;
785 struct {
786 char member;
787 long lvalue;
788 void *pvalue;
789 swig_type_info **ptype;
790 } userdata;
791 } value;
792} swig_elua_val;
793
794typedef struct swig_elua_entry {
795 swig_elua_key key;
796 swig_elua_val value;
797} swig_elua_entry;
798
799#define LSTRKEY(x) {LUA_TSTRING, {.strkey = x} }
800#define LNUMKEY(x) {LUA_TNUMBER, {.numkey = x} }
801#define LNILKEY {LUA_TNIL, {.strkey = 0} }
802
803#define LNUMVAL(x) {LUA_TNUMBER, {.number = x} }
804#define LFUNCVAL(x) {LUA_TFUNCTION, {.function = x} }
805#define LROVAL(x) {LUA_TTABLE, {.table = x} }
806#define LNILVAL {LUA_TNIL, {.string = 0} }
807#define LSTRVAL(x) {LUA_TSTRING, {.string = x} }
808
809#define LUA_REG_TYPE swig_elua_entry
810
811#define SWIG_LUA_ELUA_EMUL_METATABLE_KEY "__metatable"
812
813#define lua_pushrotable(L,p)\
814 lua_newtable(L);\
815 assert(p);\
816 SWIG_Lua_elua_emulate_register(L,(swig_elua_entry*)(p));
817
818#define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
819 LSTRKEY(B), {LUA_TUSERDATA, { .userdata={0,0,(void*)(C),&D} } }
820
821#define SWIG_LUA_CONSTTAB_BINARY(B,S,C,D)\
822 LSTRKEY(B), {LUA_TUSERDATA, { .userdata={1,S,(void*)(C),&D} } }
823#endif
824
825#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
826# define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
827# define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
828# define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
829# define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
830 /* Those two types of constants are not supported in elua */
831
832#ifndef SWIG_LUA_CONSTTAB_POINTER
833#warning eLua does not support pointers as constants. By default, nil will be used as value
834#define SWIG_LUA_CONSTTAB_POINTER(B,C,D) LSTRKEY(B), LNILVAL
835#endif
836
837#ifndef SWIG_LUA_CONSTTAB_BINARY
838#warning eLua does not support pointers to member as constants. By default, nil will be used as value
839#define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D) LSTRKEY(B), LNILVAL
840#endif
841#else /* SWIG_LUA_FLAVOR_LUA */
842# define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
843# define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
844# define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
845# define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
846# define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
847 SWIG_LUA_POINTER, (char *)B, 0, 0, (void *)C, &D
848# define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D)\
849 SWIG_LUA_BINARY, (char *)B, S, 0, (void *)C, &D
850#endif
851
852#ifndef SWIG_LUA_ELUA_EMULATE
853#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
854# define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
855# define LSTRVAL LRO_STRVAL
856#endif
857#endif /* SWIG_LUA_ELUA_EMULATE*/
858
859#ifndef SWIG_LUA_ELUA_EMULATE
860#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
861
862#ifndef MIN_OPT_LEVEL
863#define MIN_OPT_LEVEL 2
864#endif
865
866#include "lrodefs.h"
867#include "lrotable.h"
868#endif
869#endif /* SWIG_LUA_ELUA_EMULATE*/
870/* -----------------------------------------------------------------------------
871 * compatibility defines
872 * ----------------------------------------------------------------------------- */
873
874/* History of Lua C API length functions: In Lua 5.0 (and before?)
875 there was "lua_strlen". In Lua 5.1, this was renamed "lua_objlen",
876 but a compatibility define of "lua_strlen" was added. In Lua 5.2,
877 this function was again renamed, to "lua_rawlen" (to emphasize that
878 it doesn't call the "__len" metamethod), and the compatibility
879 define of lua_strlen was removed. All SWIG uses have been updated
880 to "lua_rawlen", and we add our own defines of that here for older
881 versions of Lua. */
882#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
883# define lua_rawlen lua_strlen
884#elif LUA_VERSION_NUM == 501
885# define lua_rawlen lua_objlen
886#endif
887
888
889/* lua_pushglobaltable is the recommended "future-proof" way to get
890 the global table for Lua 5.2 and later. Here we define
891 lua_pushglobaltable ourselves for Lua versions before 5.2. */
892#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
893# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
894#endif
895
896/* lua_absindex was introduced in Lua 5.2 */
897#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
898# define lua_absindex(L,i) ((i)>0 || (i) <= LUA_REGISTRYINDEX ? (i) : lua_gettop(L) + (i) + 1)
899#endif
900
901/* lua_rawsetp was introduced in Lua 5.2 */
902#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
903#define lua_rawsetp(L,index,ptr)\
904 lua_pushlightuserdata(L,(void*)(ptr));\
905 lua_insert(L,-2);\
906 lua_rawset(L,index);
907
908#define lua_rawgetp(L,index,ptr)\
909 lua_pushlightuserdata(L,(void*)(ptr));\
910 lua_rawget(L,index);
911
912#endif
913
914/* --------------------------------------------------------------------------
915 * Helper functions for error handling
916 * -------------------------------------------------------------------------- */
917
918/* Push the string STR on the Lua stack, like lua_pushstring, but
919 prefixed with the location of the innermost Lua call-point
920 (as formatted by luaL_where). */
921SWIGRUNTIME void
922SWIG_Lua_pusherrstring (lua_State *L, const char *str)
923{
924 luaL_where (L, 1);
925 lua_pushstring (L, str);
926 lua_concat (L, 2);
927}
928
929/* Push a formatted string generated from FMT and following args on
930 the Lua stack, like lua_pushfstring, but prefixed with the
931 location of the innermost Lua call-point (as formatted by luaL_where). */
932SWIGRUNTIME void
933SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...)
934{
935 va_list argp;
936 va_start(argp, fmt);
937 luaL_where(L, 1);
938 lua_pushvfstring(L, fmt, argp);
939 va_end(argp);
940 lua_concat(L, 2);
941}
942
943
944/* -----------------------------------------------------------------------------
945 * global swig types
946 * ----------------------------------------------------------------------------- */
947/* Constant table */
948#define SWIG_LUA_INT 1
949#define SWIG_LUA_FLOAT 2
950#define SWIG_LUA_STRING 3
951#define SWIG_LUA_POINTER 4
952#define SWIG_LUA_BINARY 5
953#define SWIG_LUA_CHAR 6
954
955/* Structure for variable linking table */
956typedef struct {
957 const char *name;
958 lua_CFunction get;
959 lua_CFunction set;
961
962#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
963typedef const LUA_REG_TYPE swig_lua_method;
964typedef const LUA_REG_TYPE swig_lua_const_info;
965#else /* Normal lua */
966typedef luaL_Reg swig_lua_method;
967
968/* Constant information structure */
969typedef struct {
970 int type;
971 char *name;
972 long lvalue;
973 double dvalue;
974 void *pvalue;
977
978#endif
979
980typedef struct {
981 const char *name;
982 lua_CFunction getmethod;
983 lua_CFunction setmethod;
985
986
987struct swig_lua_class;
988/* Can be used to create namespaces. Currently used to wrap class static methods/variables/constants */
989typedef struct swig_lua_namespace {
990 const char *name;
997
998typedef struct swig_lua_class {
999 const char *name; /* Name that this class has in Lua */
1000 const char *fqname; /* Fully qualified name - Scope + class name */
1002 lua_CFunction constructor;
1003 void (*destructor)(void *);
1007 swig_lua_method *metatable; /* 0 for -eluac */
1009 const char **base_names;
1011
1012/* this is the struct for wrapping all pointers in SwigLua
1013*/
1014typedef struct {
1016 int own; /* 1 if owned & must be destroyed */
1017 void *ptr;
1019
1020/* this is the struct for wrapping arbitrary packed binary data
1021(currently it is only used for member function pointers)
1022the data ordering is similar to swig_lua_userdata, but it is currently not possible
1023to tell the two structures apart within SWIG, other than by looking at the type
1024*/
1025typedef struct {
1027 int own; /* 1 if owned & must be destroyed */
1028 char data[1]; /* arbitrary amount of data */
1030
1031/* Common SWIG API */
1032#define SWIG_NewPointerObj(L, ptr, type, owner) SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
1033#define SWIG_ConvertPtr(L,idx, ptr, type, flags) SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
1034#define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname) SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
1035/* for C++ member pointers, ie, member methods */
1036#define SWIG_ConvertMember(L, idx, ptr, sz, ty) SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
1037#define SWIG_NewMemberObj(L, ptr, sz, type) SWIG_Lua_NewPackedObj(L, ptr, sz, type)
1038
1039/* Runtime API */
1040#define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
1041#define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
1042#define SWIG_MODULE_CLIENTDATA_TYPE lua_State*
1043
1044/* Contract support */
1045#define SWIG_contract_assert(expr, msg) \
1046 do { if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } } while (0)
1047
1048
1049/* helper #defines */
1050#define SWIG_fail {goto fail;}
1051#define SWIG_fail_arg(func_name,argnum,type) \
1052 {SWIG_Lua_pushferrstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
1053 func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
1054 goto fail;}
1055#define SWIG_fail_ptr(func_name,argnum,type) \
1056 SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
1057#define SWIG_check_num_args(func_name,a,b) \
1058 if (lua_gettop(L)<a || lua_gettop(L)>b) \
1059 {SWIG_Lua_pushferrstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
1060 goto fail;}
1061
1062
1063#define SWIG_Lua_get_table(L,n) \
1064 (lua_pushstring(L, n), lua_rawget(L,-2))
1065
1066#define SWIG_Lua_add_function(L,n,f) \
1067 (lua_pushstring(L, n), \
1068 lua_pushcfunction(L, f), \
1069 lua_rawset(L,-3))
1070
1071#define SWIG_Lua_add_boolean(L,n,b) \
1072 (lua_pushstring(L, n), \
1073 lua_pushboolean(L, b), \
1074 lua_rawset(L,-3))
1075
1076/* special helper for allowing 'nil' for usertypes */
1077#define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))
1078
1079#ifdef __cplusplus
1080/* Special helper for member function pointers
1081it gets the address, casts it, then dereferences it */
1082/*#define SWIG_mem_fn_as_voidptr(a) (*((char**)&(a))) */
1083#endif
1084
1085/* storing/access of swig_module_info */
1087SWIG_Lua_GetModule(lua_State *L) {
1088 swig_module_info *ret = 0;
1089 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1090 lua_rawget(L,LUA_REGISTRYINDEX);
1091 if (lua_islightuserdata(L,-1))
1092 ret=(swig_module_info*)lua_touserdata(L,-1);
1093 lua_pop(L,1); /* tidy */
1094 return ret;
1095}
1096
1097SWIGRUNTIME void
1098SWIG_Lua_SetModule(lua_State *L, swig_module_info *module) {
1099 /* add this all into the Lua registry: */
1100 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1101 lua_pushlightuserdata(L,(void*)module);
1102 lua_rawset(L,LUA_REGISTRYINDEX);
1103}
1104
1105/* -----------------------------------------------------------------------------
1106 * global variable support code: modules
1107 * ----------------------------------------------------------------------------- */
1108
1109/* this function is called when trying to set an immutable.
1110default action is to print an error.
1111This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
1113{
1114/* there should be 1 param passed in: the new value */
1115#ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
1116 lua_pop(L,1); /* remove it */
1117 luaL_error(L,"This variable is immutable");
1118#endif
1119 return 0; /* should not return anything */
1120}
1121
1122#ifdef SWIG_LUA_ELUA_EMULATE
1123
1124SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own);
1125SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type);
1126static int swig_lua_elua_emulate_unique_key;
1127
1128/* This function emulates eLua rotables behaviour. It loads a rotable definition into the usual lua table. */
1129SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_entry *table)
1130{
1131 int i, table_parsed, parsed_tables_array, target_table;
1132 assert(lua_istable(L,-1));
1133 target_table = lua_gettop(L);
1134 /* Get the registry where we put all parsed tables to avoid loops */
1135 lua_rawgetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
1136 if(lua_isnil(L,-1)) {
1137 lua_pop(L,1);
1138 lua_newtable(L);
1139 lua_pushvalue(L,-1);
1140 lua_rawsetp(L,LUA_REGISTRYINDEX,(void*)(&swig_lua_elua_emulate_unique_key));
1141 }
1142 parsed_tables_array = lua_gettop(L);
1143 lua_pushvalue(L,target_table);
1144 lua_rawsetp(L, parsed_tables_array, table);
1145 table_parsed = 0;
1146 const int SWIGUNUSED pairs_start = lua_gettop(L);
1147 for(i = 0;table[i].key.type != LUA_TNIL || table[i].value.type != LUA_TNIL;i++)
1148 {
1149 const swig_elua_entry *entry = table + i;
1150 int is_metatable = 0;
1151 switch(entry->key.type) {
1152 case LUA_TSTRING:
1153 lua_pushstring(L,entry->key.key.strkey);
1154 if(strcmp(entry->key.key.strkey, SWIG_LUA_ELUA_EMUL_METATABLE_KEY) == 0)
1155 is_metatable = 1;
1156 break;
1157 case LUA_TNUMBER:
1158 lua_pushnumber(L,entry->key.key.numkey);
1159 break;
1160 case LUA_TNIL:
1161 lua_pushnil(L);
1162 break;
1163 default:
1164 assert(0);
1165 }
1166 switch(entry->value.type) {
1167 case LUA_TSTRING:
1168 lua_pushstring(L,entry->value.value.string);
1169 break;
1170 case LUA_TNUMBER:
1171 lua_pushnumber(L,entry->value.value.number);
1172 break;
1173 case LUA_TFUNCTION:
1174 lua_pushcfunction(L,entry->value.value.function);
1175 break;
1176 case LUA_TTABLE:
1177 lua_rawgetp(L,parsed_tables_array, entry->value.value.table);
1178 table_parsed = !lua_isnil(L,-1);
1179 if(!table_parsed) {
1180 lua_pop(L,1); /*remove nil */
1181 lua_newtable(L);
1182 SWIG_Lua_elua_emulate_register(L,entry->value.value.table);
1183 }
1184 if(is_metatable) {
1185 assert(lua_istable(L,-1));
1186 lua_pushvalue(L,-1);
1187 lua_setmetatable(L,target_table);
1188 }
1189
1190 break;
1191 case LUA_TUSERDATA:
1192 if(entry->value.value.userdata.member)
1193 SWIG_NewMemberObj(L,entry->value.value.userdata.pvalue,
1194 entry->value.value.userdata.lvalue,
1195 *(entry->value.value.userdata.ptype));
1196 else
1197 SWIG_NewPointerObj(L,entry->value.value.userdata.pvalue,
1198 *(entry->value.value.userdata.ptype),0);
1199 break;
1200 case LUA_TNIL:
1201 lua_pushnil(L);
1202 break;
1203 default:
1204 assert(0);
1205 }
1206 assert(lua_gettop(L) == pairs_start + 2);
1207 lua_rawset(L,target_table);
1208 }
1209 lua_pop(L,1); /* Removing parsed tables storage */
1210 assert(lua_gettop(L) == target_table);
1211}
1212
1213SWIGINTERN void SWIG_Lua_elua_emulate_register_clear(lua_State *L)
1214{
1215 lua_pushnil(L);
1216 lua_rawsetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
1217}
1218
1219SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L);
1220
1221SWIGINTERN int SWIG_Lua_emulate_elua_getmetatable(lua_State *L)
1222{
1223 SWIG_check_num_args("getmetatable(SWIG eLua emulation)", 1, 1);
1225 lua_getfield(L,-1,"lua_getmetatable");
1226 lua_remove(L,-2); /* remove the registry*/
1227 assert(!lua_isnil(L,-1));
1228 lua_pushvalue(L,1);
1229 assert(lua_gettop(L) == 3); /* object | function | object again */
1230 lua_call(L,1,1);
1231 if(!lua_isnil(L,-1)) /*There is an ordinary metatable */
1232 return 1;
1233 /*if it is a table, then emulate elua behaviour - check for __metatable attribute of a table*/
1234 assert(lua_gettop(L) == 2);
1235 if(lua_istable(L,-2)) {
1236 lua_pop(L,1); /*remove the nil*/
1237 lua_getfield(L,-1, SWIG_LUA_ELUA_EMUL_METATABLE_KEY);
1238 }
1239 assert(lua_gettop(L) == 2);
1240 return 1;
1241
1242fail:
1243 lua_error(L);
1244 return 0;
1245}
1246
1247SWIGINTERN void SWIG_Lua_emulate_elua_swap_getmetatable(lua_State *L)
1248{
1251 lua_pushstring(L,"lua_getmetatable");
1252 lua_getfield(L,-2,"getmetatable");
1253 assert(!lua_isnil(L,-1));
1254 lua_rawset(L,-4);
1255 lua_pushstring(L, "getmetatable");
1256 lua_pushcfunction(L, SWIG_Lua_emulate_elua_getmetatable);
1257 lua_rawset(L,-3);
1258 lua_pop(L,2);
1259
1260}
1261/* END OF REMOVE */
1262
1263#endif
1264/* -----------------------------------------------------------------------------
1265 * global variable support code: namespaces and modules (which are the same thing)
1266 * ----------------------------------------------------------------------------- */
1267
1269{
1270/* there should be 2 params passed in
1271 (1) table (not the meta table)
1272 (2) string name of the attribute
1273*/
1274 assert(lua_istable(L,-2)); /* just in case */
1275 lua_getmetatable(L,-2);
1276 assert(lua_istable(L,-1));
1277 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1278 assert(lua_istable(L,-1));
1279 /* look for the key in the .get table */
1280 lua_pushvalue(L,2); /* key */
1281 lua_rawget(L,-2);
1282 lua_remove(L,-2); /* stack tidy, remove .get table */
1283 if (lua_iscfunction(L,-1))
1284 { /* found it so call the fn & return its value */
1285 lua_call(L,0,1); /* 1 value in (userdata),1 out (result) */
1286 lua_remove(L,-2); /* stack tidy, remove metatable */
1287 return 1;
1288 }
1289 lua_pop(L,1); /* remove whatever was there */
1290 /* ok, so try the .fn table */
1291 SWIG_Lua_get_table(L,".fn"); /* find the .get table */
1292 assert(lua_istable(L,-1)); /* just in case */
1293 lua_pushvalue(L,2); /* key */
1294 lua_rawget(L,-2); /* look for the fn */
1295 lua_remove(L,-2); /* stack tidy, remove .fn table */
1296 if (lua_isfunction(L,-1)) /* note: whether it's a C function or lua function */
1297 { /* found it so return the fn & let lua call it */
1298 lua_remove(L,-2); /* stack tidy, remove metatable */
1299 return 1;
1300 }
1301 lua_pop(L,1); /* remove whatever was there */
1302 return 0;
1303}
1304
1306{
1307/* there should be 3 params passed in
1308 (1) table (not the meta table)
1309 (2) string name of the attribute
1310 (3) any for the new value
1311*/
1312
1313 assert(lua_istable(L,1));
1314 lua_getmetatable(L,1); /* get the meta table */
1315 assert(lua_istable(L,-1));
1316
1317 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1318 if (lua_istable(L,-1))
1319 {
1320 /* look for the key in the .set table */
1321 lua_pushvalue(L,2); /* key */
1322 lua_rawget(L,-2);
1323 if (lua_iscfunction(L,-1))
1324 { /* found it so call the fn & return its value */
1325 lua_pushvalue(L,3); /* value */
1326 lua_call(L,1,0);
1327 return 0;
1328 }
1329 lua_pop(L,1); /* remove the value */
1330 }
1331 lua_pop(L,1); /* remove the value .set table */
1332 lua_pop(L,1); /* remote metatable */
1333 lua_rawset(L,-3);
1334 return 0;
1335}
1336
1337#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
1338SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]); /* forward declaration */
1339SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn); /* forward declaration */
1340SWIGINTERN void SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss);
1341
1342/* helper function - register namespace methods and attributes into namespace */
1344{
1345 int i;
1346 /* There must be namespace table (not metatable) at the top of the stack */
1347 assert(lua_istable(L,-1));
1349
1350 /* add methods to the namespace/module table */
1351 for(i=0;ns->ns_methods[i].name;i++){
1352 SWIG_Lua_add_function(L,ns->ns_methods[i].name,ns->ns_methods[i].func);
1353 }
1354 lua_getmetatable(L,-1);
1355
1356 /* add fns */
1357 for(i=0;ns->ns_attributes[i].name;i++){
1359 }
1360
1361 /* clear stack - remove metatble */
1362 lua_pop(L,1);
1363 return 0;
1364}
1365
1366/* Register all classes in the namespace */
1368{
1369 swig_lua_class **classes;
1370
1371 /* There must be a module/namespace table at the top of the stack */
1372 assert(lua_istable(L,-1));
1373
1374 classes = ns->ns_classes;
1375
1376 if( classes != 0 ) {
1377 while(*classes != 0) {
1378 SWIG_Lua_class_register(L, *classes);
1379 classes++;
1380 }
1381 }
1382}
1383
1384/* Helper function. Creates namespace table and adds it to module table
1385 if 'reg' is true, then will register namespace table to parent one (must be on top of the stack
1386 when function is called).
1387 Function always returns newly registered table on top of the stack.
1388*/
1390{
1391 swig_lua_namespace **sub_namespace;
1392 /* 1 argument - table on the top of the stack */
1393 const int SWIGUNUSED begin = lua_gettop(L);
1394 assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table or parent namespace table */
1395 lua_checkstack(L,5);
1396 lua_newtable(L); /* namespace itself */
1397 lua_newtable(L); /* metatable for namespace */
1398
1399 /* add a table called ".get" */
1400 lua_pushstring(L,".get");
1401 lua_newtable(L);
1402 lua_rawset(L,-3);
1403 /* add a table called ".set" */
1404 lua_pushstring(L,".set");
1405 lua_newtable(L);
1406 lua_rawset(L,-3);
1407 /* add a table called ".fn" */
1408 lua_pushstring(L,".fn");
1409 lua_newtable(L);
1410 lua_rawset(L,-3);
1411
1412 /* add accessor fns for using the .get,.set&.fn */
1415
1416 lua_setmetatable(L,-2); /* set metatable */
1417
1418 /* Register all functions, variables etc */
1420 /* Register classes */
1422
1423 sub_namespace = ns->ns_namespaces;
1424 if( sub_namespace != 0) {
1425 while(*sub_namespace != 0) {
1426 SWIG_Lua_namespace_register(L, *sub_namespace, 1);
1427 lua_pop(L,1); /* removing sub-namespace table */
1428 sub_namespace++;
1429 }
1430 }
1431
1432 if (reg) {
1433 lua_pushstring(L,ns->name);
1434 lua_pushvalue(L,-2);
1435 lua_rawset(L,-4); /* add namespace to module table */
1436 }
1437 assert(lua_gettop(L) == begin+1);
1438}
1439#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */
1440
1441/* -----------------------------------------------------------------------------
1442 * global variable support code: classes
1443 * ----------------------------------------------------------------------------- */
1444
1445SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname);
1446
1447typedef int (*swig_lua_base_iterator_func)(lua_State*,swig_type_info*, int, int *ret);
1448
1450 int first_arg, swig_lua_base_iterator_func func, int *const ret)
1451{
1452 /* first_arg - position of the object in stack. Everything that is above are arguments
1453 * and is passed to every evocation of the func */
1454 int last_arg = lua_gettop(L);/* position of last argument */
1455 int original_metatable = last_arg + 1;
1456 size_t bases_count;
1457 int result = SWIG_ERROR;
1458 int bases_table;
1459 (void)swig_type;
1460 lua_getmetatable(L,first_arg);
1461
1462 /* initialise base search */
1463#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1464 SWIG_Lua_get_table(L,".bases");
1465 assert(lua_istable(L,-1));
1466 bases_count = lua_rawlen(L,-1);
1467 bases_table = lua_gettop(L);
1468#else
1469 /* In elua .bases table doesn't exist. Use table from swig_lua_class */
1470 (void)bases_table;
1471 assert(swig_type!=0);
1473 swig_lua_class **bases= ((swig_lua_class*)(swig_type->clientdata))->bases;
1474 const char **base_names= ((swig_lua_class*)(swig_type->clientdata))->base_names;
1475 bases_count = 0;
1476 for(;base_names[bases_count];
1477 bases_count++);/* get length of bases */
1478#endif
1479
1480 if(ret)
1481 *ret = 0;
1482 if(bases_count>0)
1483 {
1484 int to_remove;
1485 size_t i;
1486 int j;
1487 int subcall_last_arg;
1488 int subcall_first_arg = lua_gettop(L) + 1;/* Here a copy of first_arg and arguments begin */
1489 int valid = 1;
1490 swig_type_info *base_swig_type = 0;
1491 for(j=first_arg;j<=last_arg;j++)
1492 lua_pushvalue(L,j);
1493 subcall_last_arg = lua_gettop(L);
1494
1495 /* Trick: temporarily replacing original metatable with metatable for base class and call getter */
1496 for(i=0;i<bases_count;i++) {
1497 /* Iteration through class bases */
1498#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1499 lua_rawgeti(L,bases_table,i+1);
1500 base_swig_type = 0;
1501 if(lua_isnil(L,-1)) {
1502 valid = 0;
1503 lua_pop(L,1);
1504 } else {
1505 valid = 1;
1506 }
1507#else /* In elua .bases table doesn't exist. Use table from swig_lua_class */
1508 swig_lua_class *base_class = bases[i];
1509 if(!base_class) {
1510 valid = 0;
1511 } else {
1512 valid = 1;
1513 SWIG_Lua_get_class_metatable(L,base_class->fqname);
1514 base_swig_type = SWIG_TypeQueryModule(module,module,base_names[i]);
1515 assert(base_swig_type != 0);
1516 }
1517#endif
1518
1519 if(!valid)
1520 continue;
1521 assert(lua_isuserdata(L, subcall_first_arg));
1522 assert(lua_istable(L,-1));
1523 lua_setmetatable(L,subcall_first_arg); /* Set new metatable */
1524 assert(lua_gettop(L) == subcall_last_arg);
1525 result = func(L, base_swig_type,subcall_first_arg, ret); /* Forward call */
1526 if(result != SWIG_ERROR) {
1527 break;
1528 }
1529 }
1530 /* Restore original metatable */
1531 lua_pushvalue(L,original_metatable);
1532 lua_setmetatable(L,first_arg);
1533 /* Clear - remove everything between last_arg and subcall_last_arg including */
1534 to_remove = subcall_last_arg - last_arg;
1535 for(j=0;j<to_remove;j++)
1536 lua_remove(L,last_arg+1);
1537 } else {
1538 /* Remove everything after last_arg */
1539 lua_pop(L, lua_gettop(L) - last_arg);
1540 }
1541 if(ret) assert(lua_gettop(L) == last_arg + *ret);
1542 return result;
1543}
1544
1545/* The class.get method helper, performs the lookup of class attributes.
1546 * It returns an error code. Number of function return values is passed inside 'ret'.
1547 * first_arg is not used in this function because function always has 2 arguments.
1548 */
1549SWIGINTERN int SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
1550{
1551/* there should be 2 params passed in
1552 (1) userdata (not the meta table)
1553 (2) string name of the attribute
1554*/
1555 int bases_search_result;
1556 int substack_start = lua_gettop(L)-2;
1557 assert(first_arg == substack_start+1);
1558 lua_checkstack(L,5);
1559 assert(lua_isuserdata(L,-2)); /* just in case */
1560 lua_getmetatable(L,-2); /* get the meta table */
1561 assert(lua_istable(L,-1)); /* just in case */
1562 /* NEW: looks for the __getitem() fn
1563 this is a user provided get fn */
1564 SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
1565 if (lua_iscfunction(L,-1)) /* if it's there */
1566 { /* found it so call the fn & return its value */
1567 lua_pushvalue(L,substack_start+1); /* the userdata */
1568 lua_pushvalue(L,substack_start+2); /* the parameter */
1569 lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */
1570 lua_remove(L,-2); /* stack tidy, remove metatable */
1571 if(ret) *ret = 1;
1572 return SWIG_OK;
1573 }
1574 lua_pop(L,1);
1575 /* Remove the metatable */
1576 lua_pop(L,1);
1577 /* Search in base classes */
1578 bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get_item,ret);
1579 return bases_search_result; /* sorry not known */
1580}
1581
1582
1583/* The class.get method helper, performs the lookup of class attributes.
1584 * It returns an error code. Number of function return values is passed inside 'ret'.
1585 * first_arg is not used in this function because function always has 2 arguments.
1586 */
1587SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
1588{
1589/* there should be 2 params passed in
1590 (1) userdata (not the meta table)
1591 (2) string name of the attribute
1592*/
1593 int bases_search_result;
1594 int substack_start = lua_gettop(L)-2;
1595 assert(first_arg == substack_start+1);
1596 lua_checkstack(L,5);
1597 assert(lua_isuserdata(L,-2)); /* just in case */
1598 lua_getmetatable(L,-2); /* get the meta table */
1599 assert(lua_istable(L,-1)); /* just in case */
1600 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1601 assert(lua_istable(L,-1)); /* just in case */
1602 /* look for the key in the .get table */
1603 lua_pushvalue(L,substack_start+2); /* key */
1604 lua_rawget(L,-2);
1605 lua_remove(L,-2); /* stack tidy, remove .get table */
1606 if (lua_iscfunction(L,-1))
1607 { /* found it so call the fn & return its value */
1608 lua_pushvalue(L,substack_start+1); /* the userdata */
1609 lua_call(L,1,1); /* 1 value in (userdata),1 out (result) */
1610 lua_remove(L,-2); /* stack tidy, remove metatable */
1611 if(ret)
1612 *ret = 1;
1613 return SWIG_OK;
1614 }
1615 lua_pop(L,1); /* remove whatever was there */
1616 /* ok, so try the .fn table */
1617 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
1618 assert(lua_istable(L,-1)); /* just in case */
1619 lua_pushvalue(L,substack_start+2); /* key */
1620 lua_rawget(L,-2); /* look for the fn */
1621 lua_remove(L,-2); /* stack tidy, remove .fn table */
1622 if (lua_isfunction(L,-1)) /* note: if it's a C function or lua function */
1623 { /* found it so return the fn & let lua call it */
1624 lua_remove(L,-2); /* stack tidy, remove metatable */
1625 if(ret)
1626 *ret = 1;
1627 return SWIG_OK;
1628 }
1629 lua_pop(L,1); /* remove whatever was there */
1630 /* Remove the metatable */
1631 lua_pop(L,1);
1632 /* Search in base classes */
1633 bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get,ret);
1634 return bases_search_result; /* sorry not known */
1635}
1636
1637/* the class.get method, performs the lookup of class attributes
1638 */
1640{
1641/* there should be 2 params passed in
1642 (1) userdata (not the meta table)
1643 (2) string name of the attribute
1644*/
1645 int result;
1646 swig_lua_userdata *usr;
1647 swig_type_info *type;
1648 int ret = 0;
1649 assert(lua_isuserdata(L,1));
1650 usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1651 type = usr->type;
1652 result = SWIG_Lua_class_do_get(L,type,1,&ret);
1653 if(result == SWIG_OK)
1654 return ret;
1655
1656 result = SWIG_Lua_class_do_get_item(L,type,1,&ret);
1657 if(result == SWIG_OK)
1658 return ret;
1659
1660 return 0;
1661}
1662
1663/* helper for the class.set method, performs the lookup of class attributes
1664 * It returns error code. Number of function return values is passed inside 'ret'
1665 */
1666SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret)
1667{
1668/* there should be 3 params passed in
1669 (1) table (not the meta table)
1670 (2) string name of the attribute
1671 (3) any for the new value
1672 */
1673
1674 int bases_search_result;
1675 int substack_start = lua_gettop(L) - 3;
1676 lua_checkstack(L,5);
1677 assert(lua_isuserdata(L,substack_start+1)); /* just in case */
1678 lua_getmetatable(L,substack_start+1); /* get the meta table */
1679 assert(lua_istable(L,-1)); /* just in case */
1680 if(ret)
1681 *ret = 0; /* it is setter - number of return values is always 0 */
1682
1683 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1684 if (lua_istable(L,-1))
1685 {
1686 /* look for the key in the .set table */
1687 lua_pushvalue(L,substack_start+2); /* key */
1688 lua_rawget(L,-2);
1689 lua_remove(L,-2); /* tidy stack, remove .set table */
1690 if (lua_iscfunction(L,-1))
1691 { /* found it so call the fn & return its value */
1692 lua_pushvalue(L,substack_start+1); /* userdata */
1693 lua_pushvalue(L,substack_start+3); /* value */
1694 lua_call(L,2,0);
1695 lua_remove(L,substack_start+4); /*remove metatable*/
1696 return SWIG_OK;
1697 }
1698 lua_pop(L,1); /* remove the value */
1699 } else {
1700 lua_pop(L,1); /* remove the answer for .set table request*/
1701 }
1702 /* NEW: looks for the __setitem() fn
1703 this is a user provided set fn */
1704 SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
1705 if (lua_iscfunction(L,-1)) /* if it's there */
1706 { /* found it so call the fn & return its value */
1707 lua_pushvalue(L,substack_start+1); /* the userdata */
1708 lua_pushvalue(L,substack_start+2); /* the parameter */
1709 lua_pushvalue(L,substack_start+3); /* the value */
1710 lua_call(L,3,0); /* 3 values in ,0 out */
1711 lua_remove(L,-2); /* stack tidy, remove metatable */
1712 return SWIG_OK;
1713 }
1714 lua_pop(L,1); /* remove value */
1715
1716 lua_pop(L,1); /* remove metatable */
1717 /* Search among bases */
1718 bases_search_result = SWIG_Lua_iterate_bases(L,type,first_arg,SWIG_Lua_class_do_set,ret);
1719 if(ret)
1720 assert(*ret == 0);
1721 assert(lua_gettop(L) == substack_start + 3);
1722 return bases_search_result;
1723}
1724
1725/* This is the actual method exported to Lua. It calls SWIG_Lua_class_do_set and correctly
1726 * handles return values.
1727 */
1729{
1730/* There should be 3 params passed in
1731 (1) table (not the meta table)
1732 (2) string name of the attribute
1733 (3) any for the new value
1734 */
1735 int ret = 0;
1736 int result;
1737 swig_lua_userdata *usr;
1738 swig_type_info *type;
1739 assert(lua_isuserdata(L,1));
1740 usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1741 type = usr->type;
1742 result = SWIG_Lua_class_do_set(L,type,1,&ret);
1743 if(result != SWIG_OK) {
1744 SWIG_Lua_pushferrstring(L,"Assignment not possible. No setter/member with this name. For custom assignments implement __setitem method.");
1745 lua_error(L);
1746 } else {
1747 assert(ret==0);
1748 }
1749 return 0;
1750}
1751
1752/* the class.destruct method called by the interpreter */
1754{
1755/* there should be 1 params passed in
1756 (1) userdata (not the meta table) */
1757 swig_lua_userdata *usr;
1758 swig_lua_class *clss;
1759 assert(lua_isuserdata(L,-1)); /* just in case */
1760 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1761 /* if must be destroyed & has a destructor */
1762 if (usr->own) /* if must be destroyed */
1763 {
1764 clss=(swig_lua_class*)usr->type->clientdata; /* get the class */
1765 if (clss && clss->destructor) /* there is a destroy fn */
1766 {
1767 clss->destructor(usr->ptr); /* bye bye */
1768 }
1769 }
1770 return 0;
1771}
1772
1773/* the class.__tostring method called by the interpreter and print */
1775{
1776/* there should be 1 param passed in
1777 (1) userdata (not the metatable) */
1778 swig_lua_userdata* userData;
1779 assert(lua_isuserdata(L,1)); /* just in case */
1780 userData = (swig_lua_userdata*)lua_touserdata(L,1); /* get the userdata address */
1781
1782 lua_pushfstring(L, "<userdata of type '%s' at %p>", userData->type->str, userData->ptr);
1783 return 1;
1784}
1785
1786/* to manually disown some userdata */
1788{
1789/* there should be 1 params passed in
1790 (1) userdata (not the meta table) */
1791 swig_lua_userdata *usr;
1792 assert(lua_isuserdata(L,-1)); /* just in case */
1793 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1794
1795 usr->own = 0; /* clear our ownership */
1796 return 0;
1797}
1798
1799/* lua callable function to compare userdata's value
1800the issue is that two userdata may point to the same thing
1801but to lua, they are different objects */
1803{
1804 int result;
1805 swig_lua_userdata *usr1,*usr2;
1806 if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2)) /* just in case */
1807 return 0; /* nil reply */
1808 usr1=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1809 usr2=(swig_lua_userdata*)lua_touserdata(L,2); /* get data */
1810 /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
1811 result=(usr1->ptr==usr2->ptr);
1812 lua_pushboolean(L,result);
1813 return 1;
1814}
1815
1816/* populate table at the top of the stack with metamethods that ought to be inherited */
1818{
1819 SWIG_Lua_add_boolean(L, "__add", 1);
1820 SWIG_Lua_add_boolean(L, "__sub", 1);
1821 SWIG_Lua_add_boolean(L, "__mul", 1);
1822 SWIG_Lua_add_boolean(L, "__div", 1);
1823 SWIG_Lua_add_boolean(L, "__mod", 1);
1824 SWIG_Lua_add_boolean(L, "__pow", 1);
1825 SWIG_Lua_add_boolean(L, "__unm", 1);
1826 SWIG_Lua_add_boolean(L, "__len", 1 );
1827 SWIG_Lua_add_boolean(L, "__concat", 1 );
1828 SWIG_Lua_add_boolean(L, "__eq", 1);
1829 SWIG_Lua_add_boolean(L, "__lt", 1);
1830 SWIG_Lua_add_boolean(L, "__le", 1);
1831 SWIG_Lua_add_boolean(L, "__call", 1);
1832 SWIG_Lua_add_boolean(L, "__tostring", 1);
1833 SWIG_Lua_add_boolean(L, "__gc", 0);
1834}
1835
1836/* creates the swig registry */
1838{
1839 /* create main SWIG registry table */
1840 lua_pushstring(L,"SWIG");
1841 lua_newtable(L);
1842 /* populate it with some predefined data */
1843
1844 /* .library table. Placeholder */
1845 lua_pushstring(L,".library");
1846 lua_newtable(L);
1847 {
1848 /* list of metamethods that class inherits from its bases */
1849 lua_pushstring(L,"inheritable_metamethods");
1850 lua_newtable(L);
1851 /* populate with list of metamethods */
1853 lua_rawset(L,-3);
1854 }
1855 lua_rawset(L,-3);
1856
1857 lua_rawset(L,LUA_REGISTRYINDEX);
1858}
1859
1860/* gets the swig registry (or creates it) */
1862{
1863 /* add this all into the swig registry: */
1864 lua_pushstring(L,"SWIG");
1865 lua_rawget(L,LUA_REGISTRYINDEX); /* get the registry */
1866 if (!lua_istable(L,-1)) /* not there */
1867 { /* must be first time, so add it */
1868 lua_pop(L,1); /* remove the result */
1870 /* then get it */
1871 lua_pushstring(L,"SWIG");
1872 lua_rawget(L,LUA_REGISTRYINDEX);
1873 }
1874}
1875
1877{
1879 lua_pushstring(L, ".library");
1880 lua_rawget(L,-2);
1881 assert( !lua_isnil(L,-1) );
1882 lua_pushstring(L, "inheritable_metamethods");
1883 lua_rawget(L,-2);
1884
1885 /* Remove class registry and library table */
1886 lua_remove(L,-2);
1887 lua_remove(L,-2);
1888}
1889
1890/* Helper function to get the classes metatable from the register */
1891SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname)
1892{
1893 SWIG_Lua_get_class_registry(L); /* get the registry */
1894 lua_pushstring(L,cname); /* get the name */
1895 lua_rawget(L,-2); /* get it */
1896 lua_remove(L,-2); /* tidy up (remove registry) */
1897}
1898
1899/* Set up the base classes pointers.
1900Each class structure has a list of pointers to the base class structures.
1901This function fills them.
1902It cannot be done at compile time, as this will not work with hireachies
1903spread over more than one swig file.
1904Therefore it must be done at runtime, querying the SWIG type system.
1905*/
1907{
1908 int i=0;
1910 for(i=0;clss->base_names[i];i++)
1911 {
1912 if (clss->bases[i]==0) /* not found yet */
1913 {
1914 /* lookup and cache the base class */
1915 swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
1916 if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
1917 }
1918 }
1919}
1920
1921#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1922/* Merges two tables */
1923SWIGINTERN void SWIG_Lua_merge_tables_by_index(lua_State *L, int target, int source)
1924{
1925 /* iterating */
1926 lua_pushnil(L);
1927 while (lua_next(L,source) != 0) {
1928 /* -1 - value, -2 - index */
1929 /* have to copy to assign */
1930 lua_pushvalue(L,-2); /* copy of index */
1931 lua_pushvalue(L,-2); /* copy of value */
1932 lua_rawset(L, target);
1933 lua_pop(L,1);
1934 /* only key is left */
1935 }
1936}
1937
1938/* Merges two tables with given name. original - index of target metatable, base - index of source metatable */
1939SWIGINTERN void SWIG_Lua_merge_tables(lua_State *L, const char* name, int original, int base)
1940{
1941 /* push original[name], then base[name] */
1942 lua_pushstring(L,name);
1943 lua_rawget(L,original);
1944 int original_table = lua_gettop(L);
1945 lua_pushstring(L,name);
1946 lua_rawget(L,base);
1947 int base_table = lua_gettop(L);
1948 SWIG_Lua_merge_tables_by_index(L, original_table, base_table);
1949 /* clearing stack */
1950 lua_pop(L,2);
1951}
1952
1953/* Function takes all symbols from base and adds it to derived class. It's just a helper. */
1954SWIGINTERN void SWIG_Lua_class_squash_base(lua_State *L, swig_lua_class *base_cls)
1955{
1956 /* There is one parameter - original, i.e. 'derived' class metatable */
1957 assert(lua_istable(L,-1));
1958 int original = lua_gettop(L);
1960 int base = lua_gettop(L);
1961 SWIG_Lua_merge_tables(L, ".fn", original, base );
1962 SWIG_Lua_merge_tables(L, ".set", original, base );
1963 SWIG_Lua_merge_tables(L, ".get", original, base );
1964 lua_pop(L,1);
1965}
1966
1967/* Function squashes all symbols from 'clss' bases into itself */
1968SWIGINTERN void SWIG_Lua_class_squash_bases(lua_State *L, swig_lua_class *clss)
1969{
1970 int i;
1972 for(i=0;clss->base_names[i];i++)
1973 {
1974 if (clss->bases[i]==0) /* Somehow it's not found. Skip it */
1975 continue;
1976 /* Thing is: all bases are already registered. Thus they have already executed
1977 * this function. So we just need to squash them into us, because their bases
1978 * are already squashed into them. No need for recursion here!
1979 */
1980 SWIG_Lua_class_squash_base(L, clss->bases[i]);
1981 }
1982 lua_pop(L,1); /*tidy stack*/
1983}
1984#endif
1985
1986#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
1987/* helper add a variable to a registered class */
1988SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn)
1989{
1990 assert(lua_istable(L,-1)); /* just in case */
1991 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1992 assert(lua_istable(L,-1)); /* just in case */
1993 SWIG_Lua_add_function(L,name,getFn);
1994 lua_pop(L,1); /* tidy stack (remove table) */
1995 if (setFn)
1996 {
1997 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1998 assert(lua_istable(L,-1)); /* just in case */
1999 SWIG_Lua_add_function(L,name,setFn);
2000 lua_pop(L,1); /* tidy stack (remove table) */
2001 }
2002}
2003
2004/* helper to recursively add class static details (static attributes, operations and constants) */
2006{
2007 int i = 0;
2008 /* The class namespace table must be on the top of the stack */
2009 assert(lua_istable(L,-1));
2010 /* call all the base classes first: we can then override these later: */
2011 for(i=0;clss->bases[i];i++)
2012 {
2014 }
2015
2017}
2018
2019SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss); /* forward declaration */
2020
2021/* helper to recursively add class details (attributes & operations) */
2023{
2024 int i;
2025 size_t bases_count = 0;
2026 /* Add bases to .bases table */
2027 SWIG_Lua_get_table(L,".bases");
2028 assert(lua_istable(L,-1)); /* just in case */
2029 for(i=0;clss->bases[i];i++)
2030 {
2032 /* Base class must be already registered */
2033 assert(lua_istable(L,-1));
2034 lua_rawseti(L,-2,i+1); /* In lua indexing starts from 1 */
2035 bases_count++;
2036 }
2037 assert(lua_rawlen(L,-1) == bases_count);
2038 lua_pop(L,1); /* remove .bases table */
2039 /* add attributes */
2040 for(i=0;clss->attributes[i].name;i++){
2042 }
2043 /* add methods to the metatable */
2044 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
2045 assert(lua_istable(L,-1)); /* just in case */
2046 for(i=0;clss->methods[i].name;i++){
2047 SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].func);
2048 }
2049 lua_pop(L,1); /* tidy stack (remove table) */
2050 /* add operator overloads
2051 This adds methods from metatable array to metatable. Can mess up garbage
2052 collectind if someone defines __gc method
2053 */
2054 if(clss->metatable) {
2055 for(i=0;clss->metatable[i].name;i++) {
2056 SWIG_Lua_add_function(L,clss->metatable[i].name,clss->metatable[i].func);
2057 }
2058 }
2059
2060#if !defined(SWIG_LUA_SQUASH_BASES)
2061 /* Adding metamethods that are defined in base classes. If bases were squashed
2062 * then it is obviously unnecessary
2063 */
2065#endif
2066}
2067
2068/* Helpers to add user defined class metamedhods - __add, __sub etc. The helpers are needed
2069 for the following issue: Lua runtime checks for metamethod existence with rawget function
2070 ignoring our SWIG-provided __index and __newindex functions. Thus our inheritance-aware method
2071 search algorithm doesn't work in such case. (Not to say that Lua runtime queries metamethod directly
2072 in metatable and not in object).
2073 Current solution is this: if somewhere in hierarchy metamethod __x is defined, then all descendants
2074 are automatically given a special proxy __x that calls the real __x method.
2075 Obvious idea - to copy __x instead of creating __x-proxy is wrong because if someone changes __x in runtime,
2076 those changes must be reflected in all descendants.
2077*/
2078
2079SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L); /*forward declaration*/
2080
2081/* The real function that resolves a metamethod.
2082 * Function searches given class and all its bases (recursively) for first instance of something that is
2083 * not equal to SWIG_Lua_resolve_metamethod. (Almost always this 'something' is actual metamethod implementation
2084 * and it is a SWIG-generated C function.). It returns value on the top of the L and there is no garbage below the
2085 * answer.
2086 * Returns 1 if found, 0 otherwise.
2087 * clss is class which metatable we will search for method
2088 * metamethod_name_idx is index in L where metamethod name (as string) lies
2089 * skip_check allows skipping searching metamethod in the given class and immediately going to searching in bases. skip_check
2090 * is not carried to subsequent recursive calls - false is always passed. It is set to true only at first call from
2091 * SWIG_Lua_resolve_metamethod
2092 * */
2093SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx,
2094 int skip_check)
2095{
2096 /* This function is called recursively */
2097 int result = 0;
2098 int i = 0;
2099
2100 if (!skip_check) {
2102 lua_pushvalue(L, metamethod_name_idx);
2103 lua_rawget(L,-2);
2104 /* If this is cfunction and it is equal to SWIG_Lua_resolve_metamethod then
2105 * this isn't the function we are looking for :)
2106 * lua_tocfunction will return NULL if not cfunction
2107 */
2108 if (!lua_isnil(L,-1) && lua_tocfunction(L,-1) != SWIG_Lua_resolve_metamethod ) {
2109 lua_remove(L,-2); /* removing class metatable */
2110 return 1;
2111 }
2112 lua_pop(L,2); /* remove class metatable and query result */
2113 }
2114
2115 /* Forwarding calls to bases */
2116 for(i=0;clss->bases[i];i++)
2117 {
2118 result = SWIG_Lua_do_resolve_metamethod(L, clss->bases[i], metamethod_name_idx, 0);
2119 if (result)
2120 break;
2121 }
2122
2123 return result;
2124}
2125
2126/* The proxy function for metamethod. All parameters are passed as cclosure. Searches for actual method
2127 * and calls it */
2129{
2130 int numargs;
2131 int metamethod_name_idx;
2132 const swig_lua_class* clss;
2133 int result;
2134
2135 lua_checkstack(L,5);
2136 numargs = lua_gettop(L); /* number of arguments to pass to actual metamethod */
2137
2138 /* Get upvalues from closure */
2139 lua_pushvalue(L, lua_upvalueindex(1)); /*Get function name*/
2140 metamethod_name_idx = lua_gettop(L);
2141
2142 lua_pushvalue(L, lua_upvalueindex(2));
2143 clss = (const swig_lua_class*)(lua_touserdata(L,-1));
2144 lua_pop(L,1); /* remove lightuserdata with clss from stack */
2145
2146 /* Actual work */
2147 result = SWIG_Lua_do_resolve_metamethod(L, clss, metamethod_name_idx, 1);
2148 if (!result) {
2149 SWIG_Lua_pushferrstring(L,"The metamethod proxy is set, but it failed to find actual metamethod. Memory corruption is most likely explanation.");
2150 lua_error(L);
2151 return 0;
2152 }
2153
2154 lua_remove(L,-2); /* remove metamethod key */
2155 lua_insert(L,1); /* move function to correct position */
2156 lua_call(L, numargs, LUA_MULTRET);
2157 return lua_gettop(L); /* return all results */
2158}
2159
2160
2161/* If given metamethod must be present in given class, then creates appropriate proxy
2162 * Returns 1 if successfully added, 0 if not added because no base class has it, -1
2163 * if method is defined in the class metatable itself
2164 */
2165SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index)
2166{
2167 int key_index;
2168 int success = 0;
2169 int i = 0;
2170
2171 /* metamethod name - on the top of the stack */
2172 assert(lua_isstring(L,-1));
2173
2174 key_index = lua_gettop(L);
2175
2176 /* Check whether method is already defined in metatable */
2177 lua_pushvalue(L,key_index); /* copy of the key */
2178 lua_gettable(L,metatable_index);
2179 if( !lua_isnil(L,-1) ) {
2180 lua_pop(L,1);
2181 return -1;
2182 }
2183 lua_pop(L,1);
2184
2185 /* Iterating over immediate bases */
2186 for(i=0;clss->bases[i];i++)
2187 {
2188 const swig_lua_class *base = clss->bases[i];
2190 lua_pushvalue(L, key_index);
2191 lua_rawget(L, -2);
2192 if( !lua_isnil(L,-1) ) {
2193 lua_pushvalue(L, key_index);
2194
2195 /* Add proxy function */
2196 lua_pushvalue(L, key_index); /* first closure value is function name */
2197 lua_pushlightuserdata(L, clss); /* second closure value is swig_lua_class structure */
2198 lua_pushcclosure(L, SWIG_Lua_resolve_metamethod, 2);
2199
2200 lua_rawset(L, metatable_index);
2201 success = 1;
2202 }
2203 lua_pop(L,1); /* remove function or nil */
2204 lua_pop(L,1); /* remove base class metatable */
2205
2206 if( success )
2207 break;
2208 }
2209
2210 return success;
2211}
2212
2214{
2215 int metatable_index;
2216 int metamethods_info_index;
2217 int tostring_undefined;
2218 int eq_undefined = 0;
2219
2221 metatable_index = lua_gettop(L);
2223 assert(lua_istable(L,-1));
2224 metamethods_info_index = lua_gettop(L);
2225 lua_pushnil(L); /* first key */
2226 while(lua_next(L, metamethods_info_index) != 0 ) {
2227 /* key at index -2, value at index -1 */
2228 const int is_inheritable = lua_toboolean(L,-2);
2229 lua_pop(L,1); /* remove value - we don't need it anymore */
2230
2231 if(is_inheritable) { /* if metamethod is inheritable */
2232 SWIG_Lua_add_class_user_metamethod(L,clss,metatable_index);
2233 }
2234 }
2235
2236 lua_pop(L,1); /* remove inheritable metamethods table */
2237
2238 /* Special handling for __tostring method */
2239 lua_pushstring(L, "__tostring");
2240 lua_pushvalue(L,-1);
2241 lua_rawget(L,metatable_index);
2242 tostring_undefined = lua_isnil(L,-1);
2243 lua_pop(L,1);
2244 if( tostring_undefined ) {
2245 lua_pushcfunction(L, SWIG_Lua_class_tostring);
2246 lua_rawset(L, metatable_index);
2247 } else {
2248 lua_pop(L,1); /* remove copy of the key */
2249 }
2250
2251 /* Special handling for __eq method */
2252 lua_pushstring(L, "__eq");
2253 lua_pushvalue(L,-1);
2254 lua_rawget(L,metatable_index);
2255 eq_undefined = lua_isnil(L,-1);
2256 lua_pop(L,1);
2257 if( eq_undefined ) {
2258 lua_pushcfunction(L, SWIG_Lua_class_equal);
2259 lua_rawset(L, metatable_index);
2260 } else {
2261 lua_pop(L,1); /* remove copy of the key */
2262 }
2263 /* Warning: __index and __newindex are SWIG-defined. For user-defined operator[]
2264 * a __getitem/__setitem method should be defined
2265 */
2266 lua_pop(L,1); /* pop class metatable */
2267}
2268
2269/* Register class static methods,attributes etc as well as constructor proxy */
2271{
2272 const int SWIGUNUSED begin = lua_gettop(L);
2273 lua_checkstack(L,5); /* just in case */
2274 assert(lua_istable(L,-1)); /* just in case */
2275 assert(strcmp(clss->name, clss->cls_static->name) == 0); /* in class those 2 must be equal */
2276
2278
2279 assert(lua_istable(L,-1)); /* just in case */
2280
2281 /* add its constructor to module with the name of the class
2282 so you can do MyClass(...) as well as new_MyClass(...)
2283 BUT only if a constructor is defined
2284 (this overcomes the problem of pure virtual classes without constructors)*/
2285 if (clss->constructor)
2286 {
2287 lua_getmetatable(L,-1);
2288 assert(lua_istable(L,-1)); /* just in case */
2289 SWIG_Lua_add_function(L,"__call", clss->constructor);
2290 lua_pop(L,1);
2291 }
2292
2293 assert(lua_istable(L,-1)); /* just in case */
2295
2296 /* clear stack */
2297 lua_pop(L,1);
2298 assert( lua_gettop(L) == begin );
2299}
2300
2301/* Performs the instance (non-static) class registration process. Metatable for class is created
2302 * and added to the class registry.
2303 */
2305{
2306 const int SWIGUNUSED begin = lua_gettop(L);
2307 int i;
2308 /* if name already there (class is already registered) then do nothing */
2309 SWIG_Lua_get_class_registry(L); /* get the registry */
2310 lua_pushstring(L,clss->fqname); /* get the name */
2311 lua_rawget(L,-2);
2312 if(!lua_isnil(L,-1)) {
2313 lua_pop(L,2);
2314 assert(lua_gettop(L)==begin);
2315 return;
2316 }
2317 lua_pop(L,2); /* tidy stack */
2318 /* Recursively initialize all bases */
2319 for(i=0;clss->bases[i];i++)
2320 {
2322 }
2323 /* Again, get registry and push name */
2324 SWIG_Lua_get_class_registry(L); /* get the registry */
2325 lua_pushstring(L,clss->fqname); /* get the name */
2326 lua_newtable(L); /* create the metatable */
2327#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
2328 /* If squashing is requested, then merges all bases metatable into this one.
2329 * It would get us all special methods: __getitem, __add etc.
2330 * This would set .fn, .type, and other .xxx incorrectly, but we will overwrite it right away
2331 */
2332 {
2333 int new_metatable_index = lua_absindex(L,-1);
2334 for(i=0;clss->bases[i];i++)
2335 {
2336 int base_metatable;
2338 base_metatable = lua_absindex(L,-1);
2339 SWIG_Lua_merge_tables_by_index(L,new_metatable_index, base_metatable);
2340 lua_pop(L,1);
2341 }
2342 }
2343 /* And now we will overwrite all incorrectly set data */
2344#endif
2345 /* add string of class name called ".type" */
2346 lua_pushstring(L,".type");
2347 lua_pushstring(L,clss->fqname);
2348 lua_rawset(L,-3);
2349 /* add a table called bases */
2350 lua_pushstring(L,".bases");
2351 lua_newtable(L);
2352 lua_rawset(L,-3);
2353 /* add a table called ".get" */
2354 lua_pushstring(L,".get");
2355 lua_newtable(L);
2356 lua_rawset(L,-3);
2357 /* add a table called ".set" */
2358 lua_pushstring(L,".set");
2359 lua_newtable(L);
2360 lua_rawset(L,-3);
2361 /* add a table called ".fn" */
2362 lua_pushstring(L,".fn");
2363 lua_newtable(L);
2364 /* add manual disown method */
2366 lua_rawset(L,-3);
2367 /* add accessor fns for using the .get,.set&.fn */
2371 /* add it */
2372 lua_rawset(L,-3); /* metatable into registry */
2373 lua_pop(L,1); /* tidy stack (remove registry) */
2374 assert(lua_gettop(L) == begin);
2375
2376#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
2377 /* Now merge all symbols from .fn, .set, .get etc from bases to our tables */
2378 SWIG_Lua_class_squash_bases(L,clss);
2379#endif
2381 SWIG_Lua_add_class_instance_details(L,clss); /* recursive adding of details (atts & ops) */
2382 lua_pop(L,1); /* tidy stack (remove class metatable) */
2383 assert( lua_gettop(L) == begin );
2384}
2385
2387{
2388 int SWIGUNUSED begin;
2389 assert(lua_istable(L,-1)); /* This is a table (module or namespace) where classes will be added */
2392
2393 /* Add links from static part to instance part and vice versa */
2394 /* [SWIG registry] [Module]
2395 * "MyClass" ----> [MyClass metatable] <===== "MyClass" -+> [static part]
2396 * ".get" ----> ... | | getmetatable()----|
2397 * ".set" ----> ... | | |
2398 * ".static" --------------)----------------/ [static part metatable]
2399 * | ".get" --> ...
2400 * | ".set" --> ....
2401 * |=============================== ".instance"
2402 */
2403 begin = lua_gettop(L);
2404 lua_pushstring(L,clss->cls_static->name);
2405 lua_rawget(L,-2); /* get class static table */
2406 assert(lua_istable(L,-1));
2407 lua_getmetatable(L,-1);
2408 assert(lua_istable(L,-1)); /* get class static metatable */
2409 lua_pushstring(L,".instance"); /* prepare key */
2410
2411 SWIG_Lua_get_class_metatable(L,clss->fqname); /* get class metatable */
2412 assert(lua_istable(L,-1));
2413 lua_pushstring(L,".static"); /* prepare key */
2414 lua_pushvalue(L, -4); /* push static class TABLE */
2415 assert(lua_istable(L,-1));
2416 lua_rawset(L,-3); /* assign static class table(!NOT metatable) as ".static" member of class metatable */
2417 lua_rawset(L,-3); /* assign class metatable as ".instance" member of class static METATABLE */
2418 lua_pop(L,2);
2419 assert(lua_gettop(L) == begin);
2420}
2421#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */
2422
2423#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
2424SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_class *clss)
2425{
2426 const int SWIGUNUSED begin = lua_gettop(L);
2427 int i;
2428 /* if name already there (class is already registered) then do nothing */
2429 SWIG_Lua_get_class_registry(L); /* get the registry */
2430 lua_pushstring(L,clss->fqname); /* get the name */
2431 lua_rawget(L,-2);
2432 if(!lua_isnil(L,-1)) {
2433 lua_pop(L,2);
2434 assert(lua_gettop(L)==begin);
2435 return;
2436 }
2437 lua_pop(L,2); /* tidy stack */
2438 /* Recursively initialize all bases */
2439 for(i=0;clss->bases[i];i++)
2440 {
2441 SWIG_Lua_elua_class_register_instance(L,clss->bases[i]);
2442 }
2443 /* Again, get registry and push name */
2444 SWIG_Lua_get_class_registry(L); /* get the registry */
2445 lua_pushstring(L,clss->fqname); /* get the name */
2446 assert(clss->metatable);
2447 lua_pushrotable(L, (void*)(clss->metatable)); /* create the metatable */
2448 lua_rawset(L,-3);
2449 lua_pop(L,1);
2450 assert(lua_gettop(L) == begin);
2451}
2452#endif /* elua && eluac */
2453
2454/* -----------------------------------------------------------------------------
2455 * Class/structure conversion fns
2456 * ----------------------------------------------------------------------------- */
2457
2458/* helper to add metatable to new lua object */
2460{
2461 if (type->clientdata) /* there is clientdata: so add the metatable */
2462 {
2464 if (lua_istable(L,-1))
2465 {
2466 lua_setmetatable(L,-2);
2467 }
2468 else
2469 {
2470 lua_pop(L,1);
2471 }
2472 }
2473}
2474
2475/* pushes a new object into the lua stack */
2476SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own)
2477{
2478 swig_lua_userdata *usr;
2479 if (!ptr){
2480 lua_pushnil(L);
2481 return;
2482 }
2483 usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata)); /* get data */
2484 usr->ptr=ptr; /* set the ptr */
2485 usr->type=type;
2486 usr->own=own;
2487#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
2488 SWIG_Lua_AddMetatable(L,type); /* add metatable */
2489#endif
2490}
2491
2492/* takes a object from the lua stack & converts it into an object of the correct type
2493 (if possible) */
2494SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L,int index,void **ptr,swig_type_info *type,int flags)
2495{
2496 int ret = SWIG_ERROR;
2497 swig_lua_userdata *usr;
2498 swig_cast_info *cast;
2499 /* special case: lua nil => NULL pointer */
2500 if (lua_isnil(L,index))
2501 {
2502 *ptr=0;
2504 }
2505 if (lua_islightuserdata(L,index))
2506 {
2507 *ptr=lua_touserdata(L,index);
2509 }
2510 usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */
2511 if (usr)
2512 {
2513 if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !usr->own)
2514 {
2516 }
2517 if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
2518 {
2519 usr->own = 0;
2520 }
2521 if (!type) /* special cast void*, no casting fn */
2522 {
2523 *ptr=usr->ptr;
2524 ret = SWIG_OK;
2525 }
2526 else
2527 {
2528 cast=SWIG_TypeCheck(usr->type->name,type); /* performs normal type checking */
2529 if (cast)
2530 {
2531 int newmemory = 0;
2532 *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
2533 assert(!newmemory); /* newmemory handling not yet implemented */
2534 ret = SWIG_OK;
2535 }
2536 }
2537 if ((ret == SWIG_OK) && (flags & SWIG_POINTER_CLEAR))
2538 {
2539 usr->ptr = 0;
2540 }
2541 }
2542 return ret;
2543}
2544
2545SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State *L,int index,swig_type_info *type,int flags,
2546 int argnum,const char *func_name){
2547 void *result = 0;
2548 if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
2549 luaL_error (L,"Error in %s, expected a %s at argument number %d\n",
2550 func_name,(type && type->str)?type->str:"void*",argnum);
2551 }
2552 return result;
2553}
2554
2555/* pushes a packed userdata. user for member fn pointers only */
2556SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type)
2557{
2558 swig_lua_rawdata *raw;
2559 assert(ptr); /* not acceptable to pass in a NULL value */
2560 raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size); /* alloc data */
2561 raw->type=type;
2562 raw->own=0;
2563 memcpy(raw->data,ptr,size); /* copy the data */
2564 SWIG_Lua_AddMetatable(L,type); /* add metatable */
2565}
2566
2567/* converts a packed userdata. user for member fn pointers only */
2568SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L,int index,void *ptr,size_t size,swig_type_info *type)
2569{
2570 swig_lua_rawdata *raw;
2571 raw=(swig_lua_rawdata*)lua_touserdata(L,index); /* get data */
2572 if (!raw) return SWIG_ERROR; /* error */
2573 if (type==0 || type==raw->type) /* void* or identical type */
2574 {
2575 memcpy(ptr,raw->data,size); /* copy it */
2576 return SWIG_OK; /* ok */
2577 }
2578 return SWIG_ERROR; /* error */
2579}
2580
2581/* a function to get the typestring of a piece of data */
2582SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
2583{
2584 swig_lua_userdata *usr;
2585 if (lua_isuserdata(L,tp))
2586 {
2587 usr=(swig_lua_userdata*)lua_touserdata(L,tp); /* get data */
2588 if (usr && usr->type && usr->type->str)
2589 return usr->type->str;
2590 return "userdata (unknown type)";
2591 }
2592 return lua_typename(L,lua_type(L,tp));
2593}
2594
2595/* lua callable function to get the userdata's type */
2597{
2598 lua_pushstring(L,SWIG_Lua_typename(L,1));
2599 return 1;
2600}
2601
2602/* -----------------------------------------------------------------------------
2603 * global variable support code: class/struct typemap functions
2604 * ----------------------------------------------------------------------------- */
2605
2606#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
2607/* Install Constants */
2608SWIGINTERN void
2610 int i;
2611 for (i = 0; constants[i].type; i++) {
2612 switch(constants[i].type) {
2613 case SWIG_LUA_INT:
2614 lua_pushstring(L,constants[i].name);
2615 lua_pushinteger(L,(lua_Integer)constants[i].lvalue);
2616 lua_rawset(L,-3);
2617 break;
2618 case SWIG_LUA_FLOAT:
2619 lua_pushstring(L,constants[i].name);
2620 lua_pushnumber(L,(lua_Number)constants[i].dvalue);
2621 lua_rawset(L,-3);
2622 break;
2623 case SWIG_LUA_CHAR:
2624 lua_pushstring(L,constants[i].name);
2625 {
2626 char c = (char)constants[i].lvalue;
2627 lua_pushlstring(L,&c,1);
2628 }
2629 lua_rawset(L,-3);
2630 break;
2631 case SWIG_LUA_STRING:
2632 lua_pushstring(L,constants[i].name);
2633 lua_pushstring(L,(char *) constants[i].pvalue);
2634 lua_rawset(L,-3);
2635 break;
2636 case SWIG_LUA_POINTER:
2637 lua_pushstring(L,constants[i].name);
2638 SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
2639 lua_rawset(L,-3);
2640 break;
2641 case SWIG_LUA_BINARY:
2642 lua_pushstring(L,constants[i].name);
2643 SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
2644 lua_rawset(L,-3);
2645 break;
2646 default:
2647 break;
2648 }
2649 }
2650}
2651#endif
2652
2653/* -----------------------------------------------------------------------------
2654 * executing lua code from within the wrapper
2655 * ----------------------------------------------------------------------------- */
2656
2657#ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
2658#define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
2659#endif
2660/* Executes a C string in Lua which is a really simple way of calling lua from C
2661Unfortunately lua keeps changing its APIs, so we need a conditional compile
2662In lua 5.0.X it's lua_dostring()
2663In lua 5.1.X it's luaL_dostring()
2664*/
2665SWIGINTERN int
2666SWIG_Lua_dostring(lua_State *L, const char *str) {
2667 int ok,top;
2668 if (str==0 || str[0]==0) return 0; /* nothing to do */
2669 top=lua_gettop(L); /* save stack */
2670#if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
2671 ok=luaL_dostring(L,str); /* looks like this is lua 5.1.X or later, good */
2672#else
2673 ok=lua_dostring(L,str); /* might be lua 5.0.x, using lua_dostring */
2674#endif
2675 if (ok!=0) {
2676 SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
2677 }
2678 lua_settop(L,top); /* restore the stack */
2679 return ok;
2680}
2681
2682#ifdef __cplusplus
2683}
2684#endif
2685
2686/* ------------------------------ end luarun.swg ------------------------------ */
2687
2688
2689/* -------- TYPES TABLE (BEGIN) -------- */
2690
2691#define SWIGTYPE_p_PLGraphicsIn swig_types[0]
2692#define SWIGTYPE_p_char swig_types[1]
2693#define SWIGTYPE_p_double swig_types[2]
2694#define SWIGTYPE_p_f_double_double__int swig_types[3]
2695#define SWIGTYPE_p_f_double_double_p_double_p_double_p_void__void swig_types[4]
2696#define SWIGTYPE_p_f_int_double_p_char_int_p_void__void swig_types[5]
2697#define SWIGTYPE_p_f_int_p_double_p_double__void swig_types[6]
2698#define SWIGTYPE_p_f_int_p_q_const__double_p_q_const__double__void swig_types[7]
2699#define SWIGTYPE_p_int swig_types[8]
2700#define SWIGTYPE_p_p_char swig_types[9]
2701#define SWIGTYPE_p_p_double swig_types[10]
2702#define SWIGTYPE_p_unsigned_int swig_types[11]
2704static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
2705#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2706#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2707
2708/* -------- TYPES TABLE (END) -------- */
2709
2710#define SWIG_name "plplotluac"
2711#define SWIG_init luaopen_plplotluac
2712#define SWIG_init_user luaopen_plplotluac_user
2713
2714#define SWIG_LUACODE luaopen_plplotluac_luacode
2715
2716#include "plplotP.h"
2717
2718
2719#define LUA_ALLOC_ARRAY( TYPE, LEN ) (TYPE *) malloc( LEN * sizeof ( TYPE ) )
2720#define LUA_FREE_ARRAY( PTR ) if ( PTR ) { free( PTR ); PTR = NULL;}
2721
2722// super macro to declare array typemap helper fns
2723 SWIGINTERN int SWIG_itable_size( lua_State* L, int index );
2724#define LUA_DECLARE_TYPEMAP_ARR_FN( NAME, TYPE ) \
2725 SWIGINTERN int LUA_read_ ## NAME ## _num_array( lua_State * L, int index, TYPE * array, int size ){ \
2726 int i; \
2727 for ( i = 0; i < size; i++ ) { \
2728 lua_rawgeti( L, index, i + 1 ); \
2729 if ( lua_isnumber( L, -1 ) ) { \
2730 array[i] = (TYPE) lua_tonumber( L, -1 ); \
2731 } else { \
2732 lua_pop( L, 1 ); \
2733 return 0; \
2734 } \
2735 lua_pop( L, 1 ); \
2736 } \
2737 return 1; \
2738 } \
2739 SWIGINTERN TYPE* LUA_get_ ## NAME ## _num_array_var( lua_State * L, int index, int* size ) \
2740 { \
2741 TYPE *array; \
2742 if ( !lua_istable( L, index ) ) { \
2743 lua_pushstring( L, "expected a table" ); \
2744 return 0; \
2745 } \
2746 *size = SWIG_itable_size( L, index ); \
2747 if ( *size < 1 ) { \
2748 array = LUA_ALLOC_ARRAY( TYPE, 1 ); \
2749 array[0] = (TYPE) 0; \
2750 return array; \
2751 } \
2752 array = LUA_ALLOC_ARRAY( TYPE, *size ); \
2753 if ( !LUA_read_ ## NAME ## _num_array( L, index, array, *size ) ) { \
2754 lua_pushstring( L, "table must contain numbers" ); \
2755 LUA_FREE_ARRAY( array ); \
2756 return 0; \
2757 } \
2758 return array; \
2759 }
2760
2763
2764
2765 static PLINT Alen = 0;
2766 static PLINT Xlen = 0, Ylen = 0;
2767
2768
2769#ifdef __cplusplus /* generic alloc/dealloc fns*/
2770#define SWIG_ALLOC_ARRAY(TYPE,LEN) new TYPE[LEN]
2771#define SWIG_FREE_ARRAY(PTR) delete[] PTR
2772#else
2773#define SWIG_ALLOC_ARRAY(TYPE,LEN) (TYPE *)malloc(LEN*sizeof(TYPE))
2774#define SWIG_FREE_ARRAY(PTR) free(PTR)
2775#endif
2776/* counting the size of arrays:*/
2777SWIGINTERN int SWIG_itable_size(lua_State* L, int index)
2778{
2779 int n=0;
2780 while(1){
2781 lua_rawgeti(L,index,n+1);
2782 if (lua_isnil(L,-1))break;
2783 ++n;
2784 lua_pop(L,1);
2785 }
2786 lua_pop(L,1);
2787 return n;
2788}
2789
2790SWIGINTERN int SWIG_table_size(lua_State* L, int index)
2791{
2792 int n=0;
2793 lua_pushnil(L); /* first key*/
2794 while (lua_next(L, index) != 0) {
2795 ++n;
2796 lua_pop(L, 1); /* removes `value'; keeps `key' for next iteration*/
2797 }
2798 return n;
2799}
2800
2801/* super macro to declare array typemap helper fns */
2802#define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME,TYPE)\
2803 SWIGINTERN int SWIG_read_##NAME##_num_array(lua_State* L,int index,TYPE *array,int size){\
2804 int i;\
2805 for (i = 0; i < size; i++) {\
2806 lua_rawgeti(L,index,i+1);\
2807 if (lua_isnumber(L,-1)){\
2808 array[i] = (TYPE)lua_tonumber(L,-1);\
2809 } else {\
2810 lua_pop(L,1);\
2811 return 0;\
2812 }\
2813 lua_pop(L,1);\
2814 }\
2815 return 1;\
2816 }\
2817 SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_fixed(lua_State* L, int index, int size){\
2818 TYPE *array;\
2819 if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {\
2820 SWIG_Lua_pushferrstring(L,"expected a table of size %d",size);\
2821 return 0;\
2822 }\
2823 array=SWIG_ALLOC_ARRAY(TYPE,size);\
2824 if (!SWIG_read_##NAME##_num_array(L,index,array,size)){\
2825 SWIG_Lua_pusherrstring(L,"table must contain numbers");\
2826 SWIG_FREE_ARRAY(array);\
2827 return 0;\
2828 }\
2829 return array;\
2830 }\
2831 SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_var(lua_State* L, int index, int* size)\
2832 {\
2833 TYPE *array;\
2834 if (!lua_istable(L,index)) {\
2835 SWIG_Lua_pusherrstring(L,"expected a table");\
2836 return 0;\
2837 }\
2838 *size=SWIG_itable_size(L,index);\
2839 if (*size<1){\
2840 SWIG_Lua_pusherrstring(L,"table appears to be empty");\
2841 return 0;\
2842 }\
2843 array=SWIG_ALLOC_ARRAY(TYPE,*size);\
2844 if (!SWIG_read_##NAME##_num_array(L,index,array,*size)){\
2845 SWIG_Lua_pusherrstring(L,"table must contain numbers");\
2846 SWIG_FREE_ARRAY(array);\
2847 return 0;\
2848 }\
2849 return array;\
2850 }\
2851 SWIGINTERN void SWIG_write_##NAME##_num_array(lua_State* L,TYPE *array,int size){\
2852 int i;\
2853 lua_newtable(L);\
2854 for (i = 0; i < size; i++){\
2855 lua_pushnumber(L,(lua_Number)array[i]);\
2856 lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/ \
2857 }\
2858 }
2859
2860SWIG_DECLARE_TYPEMAP_ARR_FN(schar,signed char)
2861SWIG_DECLARE_TYPEMAP_ARR_FN(uchar,unsigned char)
2864SWIG_DECLARE_TYPEMAP_ARR_FN(short,short)
2865SWIG_DECLARE_TYPEMAP_ARR_FN(ushort,unsigned short)
2867SWIG_DECLARE_TYPEMAP_ARR_FN(ulong,unsigned long)
2868SWIG_DECLARE_TYPEMAP_ARR_FN(float,float)
2869SWIG_DECLARE_TYPEMAP_ARR_FN(double,double)
2870
2871SWIGINTERN int SWIG_read_ptr_array(lua_State* L,int index,void **array,int size,swig_type_info *type){
2872 int i;
2873 for (i = 0; i < size; i++) {
2874 lua_rawgeti(L,index,i+1);
2875 if (!lua_isuserdata(L,-1) || SWIG_ConvertPtr(L,-1,&array[i],type,0)==-1){
2876 lua_pop(L,1);
2877 return 0;
2878 }
2879 lua_pop(L,1);
2880 }
2881 return 1;
2882}
2883SWIGINTERN void** SWIG_get_ptr_array_fixed(lua_State* L, int index, int size,swig_type_info *type){
2884 void **array;
2885 if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {
2886 SWIG_Lua_pushferrstring(L,"expected a table of size %d",size);
2887 return 0;
2888 }
2889 array=SWIG_ALLOC_ARRAY(void*,size);
2890 if (!SWIG_read_ptr_array(L,index,array,size,type)){
2891 SWIG_Lua_pushferrstring(L,"table must contain pointers of type %s",type->name);
2892 SWIG_FREE_ARRAY(array);
2893 return 0;
2894 }
2895 return array;
2896}
2897SWIGINTERN void** SWIG_get_ptr_array_var(lua_State* L, int index, int* size,swig_type_info *type){
2898 void **array;
2899 if (!lua_istable(L,index)) {
2900 SWIG_Lua_pusherrstring(L,"expected a table");
2901 return 0;
2902 }
2903 *size=SWIG_itable_size(L,index);
2904 if (*size<1){
2905 SWIG_Lua_pusherrstring(L,"table appears to be empty");
2906 return 0;
2907 }
2908 array=SWIG_ALLOC_ARRAY(void*,*size);
2909 if (!SWIG_read_ptr_array(L,index,array,*size,type)){
2910 SWIG_Lua_pushferrstring(L,"table must contain pointers of type %s",type->name);
2911 SWIG_FREE_ARRAY(array);
2912 return 0;
2913 }
2914 return array;
2915}
2916SWIGINTERN void SWIG_write_ptr_array(lua_State* L,void **array,int size,swig_type_info *type,int own){
2917 int i;
2918 lua_newtable(L);
2919 for (i = 0; i < size; i++){
2920 SWIG_NewPointerObj(L,array[i],type,own);
2921 lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/
2922 }
2923}
2924
2925
2926 PLFLT** read_double_Matrix( lua_State* L, int index, int* nx, int *ny );
2927
2928 PLFLT** read_double_Matrix( lua_State* L, int index, int* nx, int *ny )
2929 {
2930 int i, j;
2931 PLFLT** matrix;
2932
2933 *nx = 0;
2934 *ny = 0;
2935
2936 if ( !lua_istable( L, index ) )
2937 {
2938 lua_pushstring( L, "expected a table" );
2939 return NULL;
2940 }
2941 *nx = SWIG_itable_size( L, index );
2942 if ( *nx < 1 )
2943 {
2944 lua_pushstring( L, "table appears to be empty" );
2945 return NULL;
2946 }
2947 matrix = LUA_ALLOC_ARRAY( PLFLT *, *nx );
2948 for ( i = 0; i < *nx; i++ )
2949 matrix[i] = NULL;
2950
2951 lua_rawgeti( L, index, 1 );
2952 if ( !lua_istable( L, -1 ) )
2953 {
2954 lua_pop( L, 1 );
2955 lua_pushstring( L, "expected a table" );
2956 LUA_FREE_ARRAY( matrix );
2957 return NULL;
2958 }
2959 *ny = SWIG_itable_size( L, -1 );
2960 if ( *ny < 1 )
2961 {
2962 lua_pushstring( L, "table appears to be empty" );
2963 LUA_FREE_ARRAY( matrix );
2964 return NULL;
2965 }
2966 lua_pop( L, 1 );
2967
2968 for ( i = 0; i < *nx; i++ )
2969 {
2970 lua_rawgeti( L, index, i + 1 );
2971 if ( !lua_istable( L, -1 ) )
2972 {
2973 lua_pop( L, 1 );
2974 lua_pushstring( L, "expected a table" );
2975 for ( j = 0; j < *ny; j++ )
2976 LUA_FREE_ARRAY( matrix[j] );
2977 LUA_FREE_ARRAY( matrix );
2978 return NULL;
2979 }
2980 if ( *ny != SWIG_itable_size( L, -1 ) )
2981 {
2982 lua_pop( L, 1 );
2983 lua_pushstring( L, "inconsistent table sizes" );
2984 for ( j = 0; j < i; j++ )
2985 LUA_FREE_ARRAY( matrix[j] );
2986 LUA_FREE_ARRAY( matrix );
2987 return NULL;
2988 }
2989 matrix[i] = LUA_ALLOC_ARRAY( PLFLT, *ny );
2990 for ( j = 0; j < *ny; j++ )
2991 {
2992 lua_rawgeti( L, -1, j + 1 );
2993 if ( lua_isnumber( L, -1 ) )
2994 {
2995 matrix[i][j] = (PLFLT) lua_tonumber( L, -1 );
2996 }
2997 else
2998 {
2999 lua_pop( L, 1 );
3000 lua_pushstring( L, "table must contain numbers" );
3001 for ( j = 0; j < i + 1; j++ )
3002 LUA_FREE_ARRAY( matrix[j] );
3003 LUA_FREE_ARRAY( matrix );
3004 return NULL;
3005 }
3006 lua_pop( L, 1 );
3007 }
3008 lua_pop( L, 1 );
3009 }
3010
3011 return matrix;
3012 }
3013
3014
3015 void mapform( PLINT n, PLFLT* x, PLFLT* y );
3016
3017 static lua_State* myL = NULL;
3018 static char mapform_funcstr[255];
3019
3020 void mapform( PLINT n, PLFLT* x, PLFLT* y )
3021 {
3022 PLFLT *xtemp, *ytemp;
3023 int len, i;
3024
3025 // check Lua state
3026 if ( myL == NULL )
3027 {
3028 fprintf( stderr, "Lua state is not set!" );
3029 return;
3030 }
3031
3032 // push functions and arguments
3033 lua_getglobal( myL, mapform_funcstr ); // function to be called
3034 lua_pushnumber( myL, n ); // push 1st argument
3035 SWIG_write_double_num_array( myL, x, n ); // push 2nd argument
3036 SWIG_write_double_num_array( myL, y, n ); // push 3rd argument
3037
3038 // do the call (3 arguments, 2 result)
3039 if ( lua_pcall( myL, 3, 2, 0 ) != 0 )
3040 fprintf( stderr, "error running function `%s':%s",
3041 mapform_funcstr, lua_tostring( myL, -1 ) );
3042
3043 // retrieve results
3044 if ( !lua_istable( myL, -2 ) )
3045 {
3046 fprintf( stderr, "function `%s' must return a table as 1st result", mapform_funcstr );
3047 return;
3048 }
3049 if ( !lua_istable( myL, -1 ) )
3050 {
3051 fprintf( stderr, "function `%s' must return a table as 2nd result", mapform_funcstr );
3052 return;
3053 }
3054 xtemp = (PLFLT *) LUA_get_double_num_array_var( myL, -2, &len );
3055 if ( !xtemp || len != n )
3056 {
3057 fprintf( stderr, "function `%s' must return a table of length%d", mapform_funcstr, n );
3058 return;
3059 }
3060 for ( i = 0; i < n; i++ )
3061 x[i] = xtemp[i];
3062 LUA_FREE_ARRAY( xtemp );
3063
3064 ytemp = (PLFLT *) LUA_get_double_num_array_var( myL, -1, &len );
3065 if ( !ytemp || len != n )
3066 {
3067 fprintf( stderr, "function `%s' must return a table of length%d", mapform_funcstr, n );
3068 return;
3069 }
3070 for ( i = 0; i < n; i++ )
3071 y[i] = ytemp[i];
3072 LUA_FREE_ARRAY( ytemp );
3073
3074 lua_pop( myL, 2 ); // pop returned values
3075
3076 return;
3077 }
3078
3079
3080 typedef PLINT ( *defined_func )( PLFLT, PLFLT );
3081 typedef void ( *fill_func )( PLINT, const PLFLT*, const PLFLT* );
3082 typedef void ( *pltr_func )( PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer );
3083 typedef void ( *ct_func )( PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer );
3084 typedef void ( *mapform_func )( PLINT, PLFLT *, PLFLT* );
3086 typedef void ( *label_func )( PLINT, PLFLT, char*, PLINT, PLPointer );
3087
3088// Function prototypes
3089 void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * pltr_data );
3090 void myct( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * pltr_data );
3091 void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer data );
3092
3093 static char mypltr_funcstr[255];
3094
3095// This is the callback that gets handed to the C code.
3096// It, in turn, calls the Lua callback
3097 void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * PL_UNUSED( pltr_data ) )
3098 {
3099 *tx = 0;
3100 *ty = 0;
3101
3102 // check Lua state
3103 if ( myL == NULL )
3104 {
3105 fprintf( stderr, "Lua state is not set!" );
3106 return;
3107 }
3108
3109 // push functions and arguments
3110 lua_getglobal( myL, mypltr_funcstr ); // function to be called
3111 lua_pushnumber( myL, x ); // push 1st argument
3112 lua_pushnumber( myL, y ); // push 2nd argument
3113
3114 // do the call (2 arguments, 2 result)
3115 if ( lua_pcall( myL, 2, 2, 0 ) != 0 )
3116 fprintf( stderr, "error running function `%s':%s",
3117 mypltr_funcstr, lua_tostring( myL, -1 ) );
3118
3119 // retrieve results
3120 if ( !lua_isnumber( myL, -2 ) )
3121 {
3122 fprintf( stderr, "function `%s' must return a number as 1st result", mypltr_funcstr );
3123 return;
3124 }
3125 if ( !lua_isnumber( myL, -1 ) )
3126 {
3127 fprintf( stderr, "function `%s' must return a number as 2nd result", mypltr_funcstr );
3128 return;
3129 }
3130 *tx = lua_tonumber( myL, -2 );
3131 *ty = lua_tonumber( myL, -1 );
3132 lua_pop( myL, 2 ); // pop returned values
3133
3134 return;
3135 }
3136
3137 static char myct_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 myct( 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, myct_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 myct_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", myct_funcstr );
3167 return;
3168 }
3169 if ( !lua_isnumber( myL, -1 ) )
3170 {
3171 fprintf( stderr, "function `%s' must return a number as 2nd result", myct_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 mylabel_funcstr[255];
3182
3183 void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer PL_UNUSED( data ) )
3184 {
3185 // check Lua state
3186 if ( myL == NULL )
3187 {
3188 fprintf( stderr, "Lua state is not set!" );
3189 return;
3190 }
3191
3192 // push functions and arguments
3193 lua_getglobal( myL, mylabel_funcstr ); // function to be called
3194 lua_pushnumber( myL, axis ); // push 1st argument
3195 lua_pushnumber( myL, value ); // push 1st argument
3196
3197 // do the call (2 arguments, 1 result)
3198 if ( lua_pcall( myL, 2, 1, 0 ) != 0 )
3199 fprintf( stderr, "error running function `%s':%s",
3200 mylabel_funcstr, lua_tostring( myL, -1 ) );
3201
3202 // retrieve results
3203 if ( !lua_isstring( myL, -1 ) )
3204 {
3205 fprintf( stderr, "function `%s' must return a string as result", mylabel_funcstr );
3206 return;
3207 }
3208 strncpy( label, lua_tostring( myL, -1 ), length );
3209
3210 lua_pop( myL, 1 ); // pop returned values
3211
3212 return;
3213 }
3214
3215
3216#include <string.h>
3217
3218
3219SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
3220 int ret = lua_isstring(L, idx);
3221 if (!ret)
3222 ret = lua_isnil(L, idx);
3223 return ret;
3224}
3225
3226#ifdef __cplusplus
3227extern "C" {
3228#endif
3229static int _wrap_PLGraphicsIn_type_set(lua_State* L) {
3230 int SWIG_arg = 0;
3231 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3232 int arg2 ;
3233
3234 SWIG_check_num_args("PLGraphicsIn::type",2,2)
3235 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::type",1,"PLGraphicsIn *");
3236 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::type",2,"int");
3237
3238 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3239 SWIG_fail_ptr("PLGraphicsIn_type_set",1,SWIGTYPE_p_PLGraphicsIn);
3240 }
3241
3242 arg2 = (int)lua_tonumber(L, 2);
3243 if (arg1) (arg1)->type = arg2;
3244
3245 return SWIG_arg;
3246
3247 fail: SWIGUNUSED;
3248 lua_error(L);
3249 return 0;
3250}
3251
3252
3253static int _wrap_PLGraphicsIn_type_get(lua_State* L) {
3254 int SWIG_arg = 0;
3255 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3256 int result;
3257
3258 SWIG_check_num_args("PLGraphicsIn::type",1,1)
3259 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::type",1,"PLGraphicsIn *");
3260
3261 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3262 SWIG_fail_ptr("PLGraphicsIn_type_get",1,SWIGTYPE_p_PLGraphicsIn);
3263 }
3264
3265 result = (int) ((arg1)->type);
3266 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3267 return SWIG_arg;
3268
3269 fail: SWIGUNUSED;
3270 lua_error(L);
3271 return 0;
3272}
3273
3274
3275static int _wrap_PLGraphicsIn_state_set(lua_State* L) {
3276 int SWIG_arg = 0;
3277 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3278 unsigned int arg2 ;
3279
3280 SWIG_check_num_args("PLGraphicsIn::state",2,2)
3281 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::state",1,"PLGraphicsIn *");
3282 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::state",2,"unsigned int");
3283
3284 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3285 SWIG_fail_ptr("PLGraphicsIn_state_set",1,SWIGTYPE_p_PLGraphicsIn);
3286 }
3287
3288 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
3289 arg2 = (unsigned int)lua_tonumber(L, 2);
3290 if (arg1) (arg1)->state = arg2;
3291
3292 return SWIG_arg;
3293
3294 fail: SWIGUNUSED;
3295 lua_error(L);
3296 return 0;
3297}
3298
3299
3300static int _wrap_PLGraphicsIn_state_get(lua_State* L) {
3301 int SWIG_arg = 0;
3302 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3303 unsigned int result;
3304
3305 SWIG_check_num_args("PLGraphicsIn::state",1,1)
3306 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::state",1,"PLGraphicsIn *");
3307
3308 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3309 SWIG_fail_ptr("PLGraphicsIn_state_get",1,SWIGTYPE_p_PLGraphicsIn);
3310 }
3311
3312 result = (unsigned int) ((arg1)->state);
3313 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3314 return SWIG_arg;
3315
3316 fail: SWIGUNUSED;
3317 lua_error(L);
3318 return 0;
3319}
3320
3321
3322static int _wrap_PLGraphicsIn_keysym_set(lua_State* L) {
3323 int SWIG_arg = 0;
3324 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3325 unsigned int arg2 ;
3326
3327 SWIG_check_num_args("PLGraphicsIn::keysym",2,2)
3328 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::keysym",1,"PLGraphicsIn *");
3329 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::keysym",2,"unsigned int");
3330
3331 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3332 SWIG_fail_ptr("PLGraphicsIn_keysym_set",1,SWIGTYPE_p_PLGraphicsIn);
3333 }
3334
3335 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
3336 arg2 = (unsigned int)lua_tonumber(L, 2);
3337 if (arg1) (arg1)->keysym = arg2;
3338
3339 return SWIG_arg;
3340
3341 fail: SWIGUNUSED;
3342 lua_error(L);
3343 return 0;
3344}
3345
3346
3347static int _wrap_PLGraphicsIn_keysym_get(lua_State* L) {
3348 int SWIG_arg = 0;
3349 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3350 unsigned int result;
3351
3352 SWIG_check_num_args("PLGraphicsIn::keysym",1,1)
3353 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::keysym",1,"PLGraphicsIn *");
3354
3355 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3356 SWIG_fail_ptr("PLGraphicsIn_keysym_get",1,SWIGTYPE_p_PLGraphicsIn);
3357 }
3358
3359 result = (unsigned int) ((arg1)->keysym);
3360 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3361 return SWIG_arg;
3362
3363 fail: SWIGUNUSED;
3364 lua_error(L);
3365 return 0;
3366}
3367
3368
3369static int _wrap_PLGraphicsIn_button_set(lua_State* L) {
3370 int SWIG_arg = 0;
3371 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3372 unsigned int arg2 ;
3373
3374 SWIG_check_num_args("PLGraphicsIn::button",2,2)
3375 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::button",1,"PLGraphicsIn *");
3376 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::button",2,"unsigned int");
3377
3378 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3379 SWIG_fail_ptr("PLGraphicsIn_button_set",1,SWIGTYPE_p_PLGraphicsIn);
3380 }
3381
3382 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
3383 arg2 = (unsigned int)lua_tonumber(L, 2);
3384 if (arg1) (arg1)->button = arg2;
3385
3386 return SWIG_arg;
3387
3388 fail: SWIGUNUSED;
3389 lua_error(L);
3390 return 0;
3391}
3392
3393
3394static int _wrap_PLGraphicsIn_button_get(lua_State* L) {
3395 int SWIG_arg = 0;
3396 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3397 unsigned int result;
3398
3399 SWIG_check_num_args("PLGraphicsIn::button",1,1)
3400 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::button",1,"PLGraphicsIn *");
3401
3402 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3403 SWIG_fail_ptr("PLGraphicsIn_button_get",1,SWIGTYPE_p_PLGraphicsIn);
3404 }
3405
3406 result = (unsigned int) ((arg1)->button);
3407 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3408 return SWIG_arg;
3409
3410 fail: SWIGUNUSED;
3411 lua_error(L);
3412 return 0;
3413}
3414
3415
3416static int _wrap_PLGraphicsIn_subwindow_set(lua_State* L) {
3417 int SWIG_arg = 0;
3418 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3419 PLINT arg2 ;
3420
3421 SWIG_check_num_args("PLGraphicsIn::subwindow",2,2)
3422 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::subwindow",1,"PLGraphicsIn *");
3423 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::subwindow",2,"PLINT");
3424
3425 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3426 SWIG_fail_ptr("PLGraphicsIn_subwindow_set",1,SWIGTYPE_p_PLGraphicsIn);
3427 }
3428
3429 arg2 = (PLINT)lua_tonumber(L, 2);
3430 if (arg1) (arg1)->subwindow = arg2;
3431
3432 return SWIG_arg;
3433
3434 fail: SWIGUNUSED;
3435 lua_error(L);
3436 return 0;
3437}
3438
3439
3440static int _wrap_PLGraphicsIn_subwindow_get(lua_State* L) {
3441 int SWIG_arg = 0;
3442 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3443 PLINT result;
3444
3445 SWIG_check_num_args("PLGraphicsIn::subwindow",1,1)
3446 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::subwindow",1,"PLGraphicsIn *");
3447
3448 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3449 SWIG_fail_ptr("PLGraphicsIn_subwindow_get",1,SWIGTYPE_p_PLGraphicsIn);
3450 }
3451
3452 result = (PLINT) ((arg1)->subwindow);
3453 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3454 return SWIG_arg;
3455
3456 fail: SWIGUNUSED;
3457 lua_error(L);
3458 return 0;
3459}
3460
3461
3462static int _wrap_PLGraphicsIn_string_set(lua_State* L) {
3463 int SWIG_arg = 0;
3464 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3465 char *arg2 ;
3466
3467 SWIG_check_num_args("PLGraphicsIn::string",2,2)
3468 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::string",1,"PLGraphicsIn *");
3469 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("PLGraphicsIn::string",2,"char [16]");
3470
3471 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3472 SWIG_fail_ptr("PLGraphicsIn_string_set",1,SWIGTYPE_p_PLGraphicsIn);
3473 }
3474
3475 arg2 = (char *)lua_tostring(L, 2);
3476 {
3477 if(arg2) {
3478 strncpy((char*)arg1->string, (const char *)arg2, 16-1);
3479 arg1->string[16-1] = 0;
3480 } else {
3481 arg1->string[0] = 0;
3482 }
3483 }
3484
3485 return SWIG_arg;
3486
3487 fail: SWIGUNUSED;
3488 lua_error(L);
3489 return 0;
3490}
3491
3492
3493static int _wrap_PLGraphicsIn_string_get(lua_State* L) {
3494 int SWIG_arg = 0;
3495 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3496 char *result = 0 ;
3497
3498 SWIG_check_num_args("PLGraphicsIn::string",1,1)
3499 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::string",1,"PLGraphicsIn *");
3500
3501 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3502 SWIG_fail_ptr("PLGraphicsIn_string_get",1,SWIGTYPE_p_PLGraphicsIn);
3503 }
3504
3505 result = (char *)(char *) ((arg1)->string);
3506 lua_pushstring(L,(const char *)result); SWIG_arg++;
3507 return SWIG_arg;
3508
3509 fail: SWIGUNUSED;
3510 lua_error(L);
3511 return 0;
3512}
3513
3514
3515static int _wrap_PLGraphicsIn_pX_set(lua_State* L) {
3516 int SWIG_arg = 0;
3517 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3518 int arg2 ;
3519
3520 SWIG_check_num_args("PLGraphicsIn::pX",2,2)
3521 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pX",1,"PLGraphicsIn *");
3522 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::pX",2,"int");
3523
3524 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3525 SWIG_fail_ptr("PLGraphicsIn_pX_set",1,SWIGTYPE_p_PLGraphicsIn);
3526 }
3527
3528 arg2 = (int)lua_tonumber(L, 2);
3529 if (arg1) (arg1)->pX = arg2;
3530
3531 return SWIG_arg;
3532
3533 fail: SWIGUNUSED;
3534 lua_error(L);
3535 return 0;
3536}
3537
3538
3539static int _wrap_PLGraphicsIn_pX_get(lua_State* L) {
3540 int SWIG_arg = 0;
3541 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3542 int result;
3543
3544 SWIG_check_num_args("PLGraphicsIn::pX",1,1)
3545 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pX",1,"PLGraphicsIn *");
3546
3547 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3548 SWIG_fail_ptr("PLGraphicsIn_pX_get",1,SWIGTYPE_p_PLGraphicsIn);
3549 }
3550
3551 result = (int) ((arg1)->pX);
3552 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3553 return SWIG_arg;
3554
3555 fail: SWIGUNUSED;
3556 lua_error(L);
3557 return 0;
3558}
3559
3560
3561static int _wrap_PLGraphicsIn_pY_set(lua_State* L) {
3562 int SWIG_arg = 0;
3563 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3564 int arg2 ;
3565
3566 SWIG_check_num_args("PLGraphicsIn::pY",2,2)
3567 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pY",1,"PLGraphicsIn *");
3568 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::pY",2,"int");
3569
3570 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3571 SWIG_fail_ptr("PLGraphicsIn_pY_set",1,SWIGTYPE_p_PLGraphicsIn);
3572 }
3573
3574 arg2 = (int)lua_tonumber(L, 2);
3575 if (arg1) (arg1)->pY = arg2;
3576
3577 return SWIG_arg;
3578
3579 fail: SWIGUNUSED;
3580 lua_error(L);
3581 return 0;
3582}
3583
3584
3585static int _wrap_PLGraphicsIn_pY_get(lua_State* L) {
3586 int SWIG_arg = 0;
3587 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3588 int result;
3589
3590 SWIG_check_num_args("PLGraphicsIn::pY",1,1)
3591 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pY",1,"PLGraphicsIn *");
3592
3593 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3594 SWIG_fail_ptr("PLGraphicsIn_pY_get",1,SWIGTYPE_p_PLGraphicsIn);
3595 }
3596
3597 result = (int) ((arg1)->pY);
3598 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3599 return SWIG_arg;
3600
3601 fail: SWIGUNUSED;
3602 lua_error(L);
3603 return 0;
3604}
3605
3606
3607static int _wrap_PLGraphicsIn_dX_set(lua_State* L) {
3608 int SWIG_arg = 0;
3609 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3610 PLFLT arg2 ;
3611
3612 SWIG_check_num_args("PLGraphicsIn::dX",2,2)
3613 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dX",1,"PLGraphicsIn *");
3614 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::dX",2,"PLFLT");
3615
3616 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3617 SWIG_fail_ptr("PLGraphicsIn_dX_set",1,SWIGTYPE_p_PLGraphicsIn);
3618 }
3619
3620 arg2 = (PLFLT)lua_tonumber(L, 2);
3621 if (arg1) (arg1)->dX = arg2;
3622
3623 return SWIG_arg;
3624
3625 fail: SWIGUNUSED;
3626 lua_error(L);
3627 return 0;
3628}
3629
3630
3631static int _wrap_PLGraphicsIn_dX_get(lua_State* L) {
3632 int SWIG_arg = 0;
3633 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3634 PLFLT result;
3635
3636 SWIG_check_num_args("PLGraphicsIn::dX",1,1)
3637 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dX",1,"PLGraphicsIn *");
3638
3639 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3640 SWIG_fail_ptr("PLGraphicsIn_dX_get",1,SWIGTYPE_p_PLGraphicsIn);
3641 }
3642
3643 result = (PLFLT) ((arg1)->dX);
3644 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3645 return SWIG_arg;
3646
3647 fail: SWIGUNUSED;
3648 lua_error(L);
3649 return 0;
3650}
3651
3652
3653static int _wrap_PLGraphicsIn_dY_set(lua_State* L) {
3654 int SWIG_arg = 0;
3655 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3656 PLFLT arg2 ;
3657
3658 SWIG_check_num_args("PLGraphicsIn::dY",2,2)
3659 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dY",1,"PLGraphicsIn *");
3660 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::dY",2,"PLFLT");
3661
3662 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3663 SWIG_fail_ptr("PLGraphicsIn_dY_set",1,SWIGTYPE_p_PLGraphicsIn);
3664 }
3665
3666 arg2 = (PLFLT)lua_tonumber(L, 2);
3667 if (arg1) (arg1)->dY = arg2;
3668
3669 return SWIG_arg;
3670
3671 fail: SWIGUNUSED;
3672 lua_error(L);
3673 return 0;
3674}
3675
3676
3677static int _wrap_PLGraphicsIn_dY_get(lua_State* L) {
3678 int SWIG_arg = 0;
3679 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3680 PLFLT result;
3681
3682 SWIG_check_num_args("PLGraphicsIn::dY",1,1)
3683 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dY",1,"PLGraphicsIn *");
3684
3685 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3686 SWIG_fail_ptr("PLGraphicsIn_dY_get",1,SWIGTYPE_p_PLGraphicsIn);
3687 }
3688
3689 result = (PLFLT) ((arg1)->dY);
3690 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3691 return SWIG_arg;
3692
3693 fail: SWIGUNUSED;
3694 lua_error(L);
3695 return 0;
3696}
3697
3698
3699static int _wrap_PLGraphicsIn_wX_set(lua_State* L) {
3700 int SWIG_arg = 0;
3701 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3702 PLFLT arg2 ;
3703
3704 SWIG_check_num_args("PLGraphicsIn::wX",2,2)
3705 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wX",1,"PLGraphicsIn *");
3706 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::wX",2,"PLFLT");
3707
3708 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3709 SWIG_fail_ptr("PLGraphicsIn_wX_set",1,SWIGTYPE_p_PLGraphicsIn);
3710 }
3711
3712 arg2 = (PLFLT)lua_tonumber(L, 2);
3713 if (arg1) (arg1)->wX = arg2;
3714
3715 return SWIG_arg;
3716
3717 fail: SWIGUNUSED;
3718 lua_error(L);
3719 return 0;
3720}
3721
3722
3723static int _wrap_PLGraphicsIn_wX_get(lua_State* L) {
3724 int SWIG_arg = 0;
3725 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3726 PLFLT result;
3727
3728 SWIG_check_num_args("PLGraphicsIn::wX",1,1)
3729 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wX",1,"PLGraphicsIn *");
3730
3731 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3732 SWIG_fail_ptr("PLGraphicsIn_wX_get",1,SWIGTYPE_p_PLGraphicsIn);
3733 }
3734
3735 result = (PLFLT) ((arg1)->wX);
3736 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3737 return SWIG_arg;
3738
3739 fail: SWIGUNUSED;
3740 lua_error(L);
3741 return 0;
3742}
3743
3744
3745static int _wrap_PLGraphicsIn_wY_set(lua_State* L) {
3746 int SWIG_arg = 0;
3747 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3748 PLFLT arg2 ;
3749
3750 SWIG_check_num_args("PLGraphicsIn::wY",2,2)
3751 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wY",1,"PLGraphicsIn *");
3752 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::wY",2,"PLFLT");
3753
3754 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3755 SWIG_fail_ptr("PLGraphicsIn_wY_set",1,SWIGTYPE_p_PLGraphicsIn);
3756 }
3757
3758 arg2 = (PLFLT)lua_tonumber(L, 2);
3759 if (arg1) (arg1)->wY = arg2;
3760
3761 return SWIG_arg;
3762
3763 fail: SWIGUNUSED;
3764 lua_error(L);
3765 return 0;
3766}
3767
3768
3769static int _wrap_PLGraphicsIn_wY_get(lua_State* L) {
3770 int SWIG_arg = 0;
3771 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3772 PLFLT result;
3773
3774 SWIG_check_num_args("PLGraphicsIn::wY",1,1)
3775 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wY",1,"PLGraphicsIn *");
3776
3777 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3778 SWIG_fail_ptr("PLGraphicsIn_wY_get",1,SWIGTYPE_p_PLGraphicsIn);
3779 }
3780
3781 result = (PLFLT) ((arg1)->wY);
3782 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3783 return SWIG_arg;
3784
3785 fail: SWIGUNUSED;
3786 lua_error(L);
3787 return 0;
3788}
3789
3790
3791static int _wrap_new_PLGraphicsIn(lua_State* L) {
3792 int SWIG_arg = 0;
3793 PLGraphicsIn *result = 0 ;
3794
3795 SWIG_check_num_args("PLGraphicsIn::PLGraphicsIn",0,0)
3796 result = (PLGraphicsIn *)calloc(1, sizeof(PLGraphicsIn));
3797 SWIG_NewPointerObj(L,result,SWIGTYPE_p_PLGraphicsIn,1); SWIG_arg++;
3798 return SWIG_arg;
3799
3800 fail: SWIGUNUSED;
3801 lua_error(L);
3802 return 0;
3803}
3804
3805
3806static void swig_delete_PLGraphicsIn(void *obj) {
3807PLGraphicsIn *arg1 = (PLGraphicsIn *) obj;
3808free((char *) arg1);
3809}
3810static int _proxy__wrap_new_PLGraphicsIn(lua_State *L) {
3811 assert(lua_istable(L,1));
3812 lua_pushcfunction(L,_wrap_new_PLGraphicsIn);
3813 assert(!lua_isnil(L,-1));
3814 lua_replace(L,1); /* replace our table with real constructor */
3815 lua_call(L,lua_gettop(L)-1,1);
3816 return 1;
3817}
3831 {0,0,0}
3832};
3834 {0,0}
3835};
3837 {0,0}
3838};
3839
3841 {0,0,0}
3842};
3844 {0,0,0,0,0,0}
3845};
3847 {0,0}
3848};
3850 0
3851};
3852
3854 "PLGraphicsIn",
3859 0
3860};
3862static const char *swig_PLGraphicsIn_base_names[] = {0};
3864
3865static int _wrap_setcontlabelformat(lua_State* L) {
3866 int SWIG_arg = 0;
3867 PLINT arg1 ;
3868 PLINT arg2 ;
3869
3870 SWIG_check_num_args("pl_setcontlabelformat",2,2)
3871 if(!lua_isnumber(L,1)) SWIG_fail_arg("pl_setcontlabelformat",1,"PLINT");
3872 if(!lua_isnumber(L,2)) SWIG_fail_arg("pl_setcontlabelformat",2,"PLINT");
3873 arg1 = (PLINT)lua_tonumber(L, 1);
3874 arg2 = (PLINT)lua_tonumber(L, 2);
3875 pl_setcontlabelformat(arg1,arg2);
3876
3877 return SWIG_arg;
3878
3879 fail: SWIGUNUSED;
3880 lua_error(L);
3881 return 0;
3882}
3883
3884
3885static int _wrap_setcontlabelparam(lua_State* L) {
3886 int SWIG_arg = 0;
3887 PLFLT arg1 ;
3888 PLFLT arg2 ;
3889 PLFLT arg3 ;
3890 PLINT arg4 ;
3891
3892 SWIG_check_num_args("pl_setcontlabelparam",4,4)
3893 if(!lua_isnumber(L,1)) SWIG_fail_arg("pl_setcontlabelparam",1,"PLFLT");
3894 if(!lua_isnumber(L,2)) SWIG_fail_arg("pl_setcontlabelparam",2,"PLFLT");
3895 if(!lua_isnumber(L,3)) SWIG_fail_arg("pl_setcontlabelparam",3,"PLFLT");
3896 if(!lua_isnumber(L,4)) SWIG_fail_arg("pl_setcontlabelparam",4,"PLINT");
3897 arg1 = (PLFLT)lua_tonumber(L, 1);
3898 arg2 = (PLFLT)lua_tonumber(L, 2);
3899 arg3 = (PLFLT)lua_tonumber(L, 3);
3900 arg4 = (PLINT)lua_tonumber(L, 4);
3901 pl_setcontlabelparam(arg1,arg2,arg3,arg4);
3902
3903 return SWIG_arg;
3904
3905 fail: SWIGUNUSED;
3906 lua_error(L);
3907 return 0;
3908}
3909
3910
3911static int _wrap_adv(lua_State* L) {
3912 int SWIG_arg = 0;
3913 PLINT arg1 ;
3914
3915 SWIG_check_num_args("pladv",1,1)
3916 if(!lua_isnumber(L,1)) SWIG_fail_arg("pladv",1,"PLINT");
3917 arg1 = (PLINT)lua_tonumber(L, 1);
3918 pladv(arg1);
3919
3920 return SWIG_arg;
3921
3922 fail: SWIGUNUSED;
3923 lua_error(L);
3924 return 0;
3925}
3926
3927
3928static int _wrap_arc(lua_State* L) {
3929 int SWIG_arg = 0;
3930 PLFLT arg1 ;
3931 PLFLT arg2 ;
3932 PLFLT arg3 ;
3933 PLFLT arg4 ;
3934 PLFLT arg5 ;
3935 PLFLT arg6 ;
3936 PLFLT arg7 ;
3937 PLBOOL arg8 ;
3938
3939 SWIG_check_num_args("plarc",8,8)
3940 if(!lua_isnumber(L,1)) SWIG_fail_arg("plarc",1,"PLFLT");
3941 if(!lua_isnumber(L,2)) SWIG_fail_arg("plarc",2,"PLFLT");
3942 if(!lua_isnumber(L,3)) SWIG_fail_arg("plarc",3,"PLFLT");
3943 if(!lua_isnumber(L,4)) SWIG_fail_arg("plarc",4,"PLFLT");
3944 if(!lua_isnumber(L,5)) SWIG_fail_arg("plarc",5,"PLFLT");
3945 if(!lua_isnumber(L,6)) SWIG_fail_arg("plarc",6,"PLFLT");
3946 if(!lua_isnumber(L,7)) SWIG_fail_arg("plarc",7,"PLFLT");
3947 if(!lua_isnumber(L,8)) SWIG_fail_arg("plarc",8,"PLBOOL");
3948 arg1 = (PLFLT)lua_tonumber(L, 1);
3949 arg2 = (PLFLT)lua_tonumber(L, 2);
3950 arg3 = (PLFLT)lua_tonumber(L, 3);
3951 arg4 = (PLFLT)lua_tonumber(L, 4);
3952 arg5 = (PLFLT)lua_tonumber(L, 5);
3953 arg6 = (PLFLT)lua_tonumber(L, 6);
3954 arg7 = (PLFLT)lua_tonumber(L, 7);
3955 arg8 = (PLBOOL)lua_tonumber(L, 8);
3956 plarc(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
3957
3958 return SWIG_arg;
3959
3960 fail: SWIGUNUSED;
3961 lua_error(L);
3962 return 0;
3963}
3964
3965
3966static int _wrap_axes(lua_State* L) {
3967 int SWIG_arg = 0;
3968 PLFLT arg1 ;
3969 PLFLT arg2 ;
3970 char *arg3 = (char *) 0 ;
3971 PLFLT arg4 ;
3972 PLINT arg5 ;
3973 char *arg6 = (char *) 0 ;
3974 PLFLT arg7 ;
3975 PLINT arg8 ;
3976
3977 SWIG_check_num_args("plaxes",8,8)
3978 if(!lua_isnumber(L,1)) SWIG_fail_arg("plaxes",1,"PLFLT");
3979 if(!lua_isnumber(L,2)) SWIG_fail_arg("plaxes",2,"PLFLT");
3980 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plaxes",3,"char const *");
3981 if(!lua_isnumber(L,4)) SWIG_fail_arg("plaxes",4,"PLFLT");
3982 if(!lua_isnumber(L,5)) SWIG_fail_arg("plaxes",5,"PLINT");
3983 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plaxes",6,"char const *");
3984 if(!lua_isnumber(L,7)) SWIG_fail_arg("plaxes",7,"PLFLT");
3985 if(!lua_isnumber(L,8)) SWIG_fail_arg("plaxes",8,"PLINT");
3986 arg1 = (PLFLT)lua_tonumber(L, 1);
3987 arg2 = (PLFLT)lua_tonumber(L, 2);
3988 arg3 = (char *)lua_tostring(L, 3);
3989 arg4 = (PLFLT)lua_tonumber(L, 4);
3990 arg5 = (PLINT)lua_tonumber(L, 5);
3991 arg6 = (char *)lua_tostring(L, 6);
3992 arg7 = (PLFLT)lua_tonumber(L, 7);
3993 arg8 = (PLINT)lua_tonumber(L, 8);
3994 plaxes(arg1,arg2,(char const *)arg3,arg4,arg5,(char const *)arg6,arg7,arg8);
3995
3996 return SWIG_arg;
3997
3998 fail: SWIGUNUSED;
3999 lua_error(L);
4000 return 0;
4001}
4002
4003
4004static int _wrap_bin(lua_State* L) {
4005 int SWIG_arg = 0;
4006 PLINT arg1 ;
4007 PLFLT *arg2 = (PLFLT *) 0 ;
4008 PLFLT *arg3 = (PLFLT *) 0 ;
4009 PLINT arg4 ;
4010 int temp3 ;
4011
4012 SWIG_check_num_args("plbin",3,3)
4013 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbin",3,"PLINT");
4014 {
4015 int temp;
4016 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4017 if ( !arg2 )
4018 SWIG_fail;
4019 arg1 = Alen = temp;
4020 }
4021 {
4022 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4023 if ( !arg3 )
4024 SWIG_fail;
4025 if ( temp3 != Alen )
4026 {
4027 lua_pushfstring( L, "Tables must be of same length." );
4028 SWIG_fail;
4029 }
4030 }
4031 arg4 = (PLINT)lua_tonumber(L, 3);
4032 plbin(arg1,(double const *)arg2,(double const *)arg3,arg4);
4033
4034 {
4035 LUA_FREE_ARRAY( arg2 );
4036 }
4037 {
4038 LUA_FREE_ARRAY( arg3 );
4039 }
4040 return SWIG_arg;
4041
4042 fail: SWIGUNUSED;
4043 {
4044 LUA_FREE_ARRAY( arg2 );
4045 }
4046 {
4047 LUA_FREE_ARRAY( arg3 );
4048 }
4049 lua_error(L);
4050 return 0;
4051}
4052
4053
4054static int _wrap_btime(lua_State* L) {
4055 int SWIG_arg = 0;
4056 PLINT *arg1 = (PLINT *) 0 ;
4057 PLINT *arg2 = (PLINT *) 0 ;
4058 PLINT *arg3 = (PLINT *) 0 ;
4059 PLINT *arg4 = (PLINT *) 0 ;
4060 PLINT *arg5 = (PLINT *) 0 ;
4061 PLFLT *arg6 = (PLFLT *) 0 ;
4062 PLFLT arg7 ;
4063 PLINT temp1 ;
4064 PLINT temp2 ;
4065 PLINT temp3 ;
4066 PLINT temp4 ;
4067 PLINT temp5 ;
4068 PLFLT temp6 ;
4069
4070 arg1 = &temp1;
4071 arg2 = &temp2;
4072 arg3 = &temp3;
4073 arg4 = &temp4;
4074 arg5 = &temp5;
4075 arg6 = &temp6;
4076 SWIG_check_num_args("plbtime",1,1)
4077 if(!lua_isnumber(L,1)) SWIG_fail_arg("plbtime",1,"PLFLT");
4078 arg7 = (PLFLT)lua_tonumber(L, 1);
4079 plbtime(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
4080
4081 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4082 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4083 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4084 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4085 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
4086 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
4087 return SWIG_arg;
4088
4089 fail: SWIGUNUSED;
4090 lua_error(L);
4091 return 0;
4092}
4093
4094
4095static int _wrap_bop(lua_State* L) {
4096 int SWIG_arg = 0;
4097
4098 SWIG_check_num_args("plbop",0,0)
4099 plbop();
4100
4101 return SWIG_arg;
4102
4103 fail: SWIGUNUSED;
4104 lua_error(L);
4105 return 0;
4106}
4107
4108
4109static int _wrap_box(lua_State* L) {
4110 int SWIG_arg = 0;
4111 char *arg1 = (char *) 0 ;
4112 PLFLT arg2 ;
4113 PLINT arg3 ;
4114 char *arg4 = (char *) 0 ;
4115 PLFLT arg5 ;
4116 PLINT arg6 ;
4117
4118 SWIG_check_num_args("plbox",6,6)
4119 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plbox",1,"char const *");
4120 if(!lua_isnumber(L,2)) SWIG_fail_arg("plbox",2,"PLFLT");
4121 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbox",3,"PLINT");
4122 if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("plbox",4,"char const *");
4123 if(!lua_isnumber(L,5)) SWIG_fail_arg("plbox",5,"PLFLT");
4124 if(!lua_isnumber(L,6)) SWIG_fail_arg("plbox",6,"PLINT");
4125 arg1 = (char *)lua_tostring(L, 1);
4126 arg2 = (PLFLT)lua_tonumber(L, 2);
4127 arg3 = (PLINT)lua_tonumber(L, 3);
4128 arg4 = (char *)lua_tostring(L, 4);
4129 arg5 = (PLFLT)lua_tonumber(L, 5);
4130 arg6 = (PLINT)lua_tonumber(L, 6);
4131 plbox((char const *)arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
4132
4133 return SWIG_arg;
4134
4135 fail: SWIGUNUSED;
4136 lua_error(L);
4137 return 0;
4138}
4139
4140
4141static int _wrap_box3(lua_State* L) {
4142 int SWIG_arg = 0;
4143 char *arg1 = (char *) 0 ;
4144 char *arg2 = (char *) 0 ;
4145 PLFLT arg3 ;
4146 PLINT arg4 ;
4147 char *arg5 = (char *) 0 ;
4148 char *arg6 = (char *) 0 ;
4149 PLFLT arg7 ;
4150 PLINT arg8 ;
4151 char *arg9 = (char *) 0 ;
4152 char *arg10 = (char *) 0 ;
4153 PLFLT arg11 ;
4154 PLINT arg12 ;
4155
4156 SWIG_check_num_args("plbox3",12,12)
4157 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plbox3",1,"char const *");
4158 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plbox3",2,"char const *");
4159 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbox3",3,"PLFLT");
4160 if(!lua_isnumber(L,4)) SWIG_fail_arg("plbox3",4,"PLINT");
4161 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plbox3",5,"char const *");
4162 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plbox3",6,"char const *");
4163 if(!lua_isnumber(L,7)) SWIG_fail_arg("plbox3",7,"PLFLT");
4164 if(!lua_isnumber(L,8)) SWIG_fail_arg("plbox3",8,"PLINT");
4165 if(!SWIG_lua_isnilstring(L,9)) SWIG_fail_arg("plbox3",9,"char const *");
4166 if(!SWIG_lua_isnilstring(L,10)) SWIG_fail_arg("plbox3",10,"char const *");
4167 if(!lua_isnumber(L,11)) SWIG_fail_arg("plbox3",11,"PLFLT");
4168 if(!lua_isnumber(L,12)) SWIG_fail_arg("plbox3",12,"PLINT");
4169 arg1 = (char *)lua_tostring(L, 1);
4170 arg2 = (char *)lua_tostring(L, 2);
4171 arg3 = (PLFLT)lua_tonumber(L, 3);
4172 arg4 = (PLINT)lua_tonumber(L, 4);
4173 arg5 = (char *)lua_tostring(L, 5);
4174 arg6 = (char *)lua_tostring(L, 6);
4175 arg7 = (PLFLT)lua_tonumber(L, 7);
4176 arg8 = (PLINT)lua_tonumber(L, 8);
4177 arg9 = (char *)lua_tostring(L, 9);
4178 arg10 = (char *)lua_tostring(L, 10);
4179 arg11 = (PLFLT)lua_tonumber(L, 11);
4180 arg12 = (PLINT)lua_tonumber(L, 12);
4181 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);
4182
4183 return SWIG_arg;
4184
4185 fail: SWIGUNUSED;
4186 lua_error(L);
4187 return 0;
4188}
4189
4190
4191static int _wrap_calc_world(lua_State* L) {
4192 int SWIG_arg = 0;
4193 PLFLT arg1 ;
4194 PLFLT arg2 ;
4195 PLFLT *arg3 = (PLFLT *) 0 ;
4196 PLFLT *arg4 = (PLFLT *) 0 ;
4197 PLINT *arg5 = (PLINT *) 0 ;
4198 PLFLT temp3 ;
4199 PLFLT temp4 ;
4200 PLINT temp5 ;
4201
4202 arg3 = &temp3;
4203 arg4 = &temp4;
4204 arg5 = &temp5;
4205 SWIG_check_num_args("plcalc_world",2,2)
4206 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcalc_world",1,"PLFLT");
4207 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcalc_world",2,"PLFLT");
4208 arg1 = (PLFLT)lua_tonumber(L, 1);
4209 arg2 = (PLFLT)lua_tonumber(L, 2);
4210 plcalc_world(arg1,arg2,arg3,arg4,arg5);
4211
4212 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4213 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4214 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
4215 return SWIG_arg;
4216
4217 fail: SWIGUNUSED;
4218 lua_error(L);
4219 return 0;
4220}
4221
4222
4223static int _wrap_clear(lua_State* L) {
4224 int SWIG_arg = 0;
4225
4226 SWIG_check_num_args("plclear",0,0)
4227 plclear();
4228
4229 return SWIG_arg;
4230
4231 fail: SWIGUNUSED;
4232 lua_error(L);
4233 return 0;
4234}
4235
4236
4237static int _wrap_col0(lua_State* L) {
4238 int SWIG_arg = 0;
4239 PLINT arg1 ;
4240
4241 SWIG_check_num_args("plcol0",1,1)
4242 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcol0",1,"PLINT");
4243 arg1 = (PLINT)lua_tonumber(L, 1);
4244 plcol0(arg1);
4245
4246 return SWIG_arg;
4247
4248 fail: SWIGUNUSED;
4249 lua_error(L);
4250 return 0;
4251}
4252
4253
4254static int _wrap_col1(lua_State* L) {
4255 int SWIG_arg = 0;
4256 PLFLT arg1 ;
4257
4258 SWIG_check_num_args("plcol1",1,1)
4259 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcol1",1,"PLFLT");
4260 arg1 = (PLFLT)lua_tonumber(L, 1);
4261 plcol1(arg1);
4262
4263 return SWIG_arg;
4264
4265 fail: SWIGUNUSED;
4266 lua_error(L);
4267 return 0;
4268}
4269
4270
4271static int _wrap_configtime(lua_State* L) {
4272 int SWIG_arg = 0;
4273 PLFLT arg1 ;
4274 PLFLT arg2 ;
4275 PLFLT arg3 ;
4276 PLINT arg4 ;
4277 PLBOOL arg5 ;
4278 PLINT arg6 ;
4279 PLINT arg7 ;
4280 PLINT arg8 ;
4281 PLINT arg9 ;
4282 PLINT arg10 ;
4283 PLFLT arg11 ;
4284
4285 SWIG_check_num_args("plconfigtime",11,11)
4286 if(!lua_isnumber(L,1)) SWIG_fail_arg("plconfigtime",1,"PLFLT");
4287 if(!lua_isnumber(L,2)) SWIG_fail_arg("plconfigtime",2,"PLFLT");
4288 if(!lua_isnumber(L,3)) SWIG_fail_arg("plconfigtime",3,"PLFLT");
4289 if(!lua_isnumber(L,4)) SWIG_fail_arg("plconfigtime",4,"PLINT");
4290 if(!lua_isnumber(L,5)) SWIG_fail_arg("plconfigtime",5,"PLBOOL");
4291 if(!lua_isnumber(L,6)) SWIG_fail_arg("plconfigtime",6,"PLINT");
4292 if(!lua_isnumber(L,7)) SWIG_fail_arg("plconfigtime",7,"PLINT");
4293 if(!lua_isnumber(L,8)) SWIG_fail_arg("plconfigtime",8,"PLINT");
4294 if(!lua_isnumber(L,9)) SWIG_fail_arg("plconfigtime",9,"PLINT");
4295 if(!lua_isnumber(L,10)) SWIG_fail_arg("plconfigtime",10,"PLINT");
4296 if(!lua_isnumber(L,11)) SWIG_fail_arg("plconfigtime",11,"PLFLT");
4297 arg1 = (PLFLT)lua_tonumber(L, 1);
4298 arg2 = (PLFLT)lua_tonumber(L, 2);
4299 arg3 = (PLFLT)lua_tonumber(L, 3);
4300 arg4 = (PLINT)lua_tonumber(L, 4);
4301 arg5 = (PLBOOL)lua_tonumber(L, 5);
4302 arg6 = (PLINT)lua_tonumber(L, 6);
4303 arg7 = (PLINT)lua_tonumber(L, 7);
4304 arg8 = (PLINT)lua_tonumber(L, 8);
4305 arg9 = (PLINT)lua_tonumber(L, 9);
4306 arg10 = (PLINT)lua_tonumber(L, 10);
4307 arg11 = (PLFLT)lua_tonumber(L, 11);
4308 plconfigtime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
4309
4310 return SWIG_arg;
4311
4312 fail: SWIGUNUSED;
4313 lua_error(L);
4314 return 0;
4315}
4316
4317
4318static int _wrap_cont(lua_State* L) {
4319 int SWIG_arg = 0;
4320 PLFLT **arg1 = (PLFLT **) 0 ;
4321 PLINT arg2 ;
4322 PLINT arg3 ;
4323 PLINT arg4 ;
4324 PLINT arg5 ;
4325 PLINT arg6 ;
4326 PLINT arg7 ;
4327 PLFLT *arg8 = (PLFLT *) 0 ;
4328 PLINT arg9 ;
4329 pltr_func arg10 = (pltr_func) 0 ;
4330 PLPointer arg11 = (PLPointer) 0 ;
4331 int ii1 ;
4332 PLcGrid cgrid111 ;
4333 PLcGrid2 cgrid211 ;
4334
4335 {
4336 cgrid111.xg = cgrid111.yg = cgrid111.zg = NULL;
4337 cgrid111.nx = cgrid111.ny = cgrid111.nz = 0;
4338 cgrid211.xg = cgrid211.yg = cgrid211.zg = NULL;
4339 cgrid211.nx = cgrid211.ny = 0;
4340 }
4341 {
4342 arg10 = NULL;
4343 }
4344 {
4345 arg11 = NULL;
4346 }
4347 SWIG_check_num_args("plcont",6,8)
4348 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcont",2,"PLINT");
4349 if(!lua_isnumber(L,3)) SWIG_fail_arg("plcont",3,"PLINT");
4350 if(!lua_isnumber(L,4)) SWIG_fail_arg("plcont",4,"PLINT");
4351 if(!lua_isnumber(L,5)) SWIG_fail_arg("plcont",5,"PLINT");
4352 {
4353 int jj;
4354
4355 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
4356 if ( !arg1 )
4357 SWIG_fail;
4358 Xlen = arg2 = ii1;
4359 Ylen = arg3 = jj;
4360 }
4361 arg4 = (PLINT)lua_tonumber(L, 2);
4362 arg5 = (PLINT)lua_tonumber(L, 3);
4363 arg6 = (PLINT)lua_tonumber(L, 4);
4364 arg7 = (PLINT)lua_tonumber(L, 5);
4365 {
4366 int temp;
4367 arg8 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp );
4368 if ( !arg8 )
4369 SWIG_fail;
4370 arg9 = Alen = temp;
4371 }
4372 if(lua_gettop(L)>=7){
4373 {
4374 arg10 = NULL;
4375 mypltr_funcstr[0] = '\0';
4376
4377 if ( lua_isstring( L, 7 ) )
4378 {
4379 const char* funcstr = lua_tostring( L, 7 );
4380 if ( strcmp( "pltr0", funcstr ) == 0 )
4381 {
4382 arg10 = pltr0;
4383 }
4384 else if ( strcmp( "pltr1", funcstr ) == 0 )
4385 {
4386 arg10 = pltr1;
4387 }
4388 else if ( strcmp( "pltr2", funcstr ) == 0 )
4389 {
4390 arg10 = pltr2;
4391 }
4392 else
4393 {
4394 arg10 = mypltr;
4395 strncpy( mypltr_funcstr, funcstr, 255 );
4396 myL = L;
4397 }
4398 }
4399 else
4400 SWIG_fail_arg( "cont", 10, "pltr_func" );
4401 }
4402 }
4403 if(lua_gettop(L)>=8){
4404 {
4405 int nx, ny;
4406 int gridmode = 0;
4407
4408 lua_pushstring( L, "xg" );
4409 lua_gettable( L, 8 );
4410 if ( !lua_istable( L, -1 ) )
4411 {
4412 lua_pop( L, 1 ); // pop "xg"
4413 lua_pushstring( L, "expected a table xg" );
4414 SWIG_fail;
4415 }
4416 lua_rawgeti( L, -1, 1 );
4417 if ( lua_istable( L, -1 ) )
4418 gridmode = 2; // two dimensional array
4419 else if ( lua_isnumber( L, -1 ) )
4420 gridmode = 1; // one dimensional array
4421 else
4422 {
4423 lua_pop( L, 1 ); // pop "1"
4424 lua_pop( L, 1 ); // pop "xg"
4425 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
4426 SWIG_fail;
4427 }
4428 lua_pop( L, 1 ); // pop test element
4429 if ( gridmode == 1 )
4430 {
4431 cgrid111.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
4432 if ( !cgrid111.xg )
4433 {
4434 lua_pop( L, 1 ); // pop "xg"
4435 SWIG_fail;
4436 }
4437 if ( nx != Xlen )
4438 {
4439 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
4440 SWIG_fail;
4441 }
4442 cgrid111.nx = nx;
4443 }
4444 else
4445 {
4446 cgrid211.xg = read_double_Matrix( L, -1, &nx, &ny );
4447 if ( !cgrid211.xg )
4448 {
4449 lua_pop( L, 1 ); // pop "xg"
4450 SWIG_fail;
4451 }
4452 if ( ( nx != Xlen ) || ( ny != Ylen ) )
4453 {
4454 lua_pop( L, 1 ); // pop "xg"
4455 lua_pushfstring( L, "Vectors must match matrix." );
4456 SWIG_fail;
4457 }
4458 cgrid211.nx = nx;
4459 cgrid211.ny = ny;
4460 }
4461 lua_pop( L, 1 ); // pop "xg"
4462
4463 lua_pushstring( L, "yg" );
4464 lua_gettable( L, 8 );
4465 if ( !lua_istable( L, -1 ) )
4466 {
4467 lua_pop( L, 1 );
4468 lua_pushstring( L, "expected a table yg" );
4469 SWIG_fail;
4470 }
4471 lua_rawgeti( L, -1, 1 );
4472 if ( gridmode == 2 )
4473 {
4474 if ( !lua_istable( L, -1 ) )
4475 {
4476 lua_pop( L, 1 ); // pop "1"
4477 lua_pop( L, 1 ); // pop "yg"
4478 lua_pushstring( L, "expected a two dimensional array/table in yg" );
4479 SWIG_fail;
4480 }
4481 }
4482 else
4483 {
4484 if ( !lua_isnumber( L, -1 ) )
4485 {
4486 lua_pop( L, 1 ); // pop "1"
4487 lua_pop( L, 1 ); // pop "yg"
4488 lua_pushstring( L, "expected a one dimensional array/table in yg" );
4489 SWIG_fail;
4490 }
4491 }
4492 lua_pop( L, 1 ); // pop "1"
4493 if ( gridmode == 1 )
4494 {
4495 cgrid111.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
4496 if ( !cgrid111.yg )
4497 {
4498 lua_pop( L, 1 ); // pop "yg"
4499 SWIG_fail;
4500 }
4501 if ( ny != Ylen )
4502 {
4503 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
4504 SWIG_fail;
4505 }
4506 cgrid111.ny = ny;
4507 }
4508 else
4509 {
4510 cgrid211.yg = read_double_Matrix( L, -1, &nx, &ny );
4511 if ( !cgrid211.yg )
4512 {
4513 lua_pop( L, 1 ); // pop "xg"
4514 SWIG_fail;
4515 }
4516 if ( ( nx != Xlen ) || ( ny != Ylen ) )
4517 {
4518 lua_pop( L, 1 ); // pop "xg"
4519 lua_pushfstring( L, "Vectors must match matrix." );
4520 SWIG_fail;
4521 }
4522 // cgrid211.nx/ny already set
4523 }
4524 lua_pop( L, 1 ); // pop "yg"
4525
4526 if ( gridmode == 1 )
4527 arg11 = &cgrid111;
4528 else if ( gridmode == 2 )
4529 arg11 = &cgrid211;
4530 }
4531 }
4532 plcont((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,(double const *)arg8,arg9,arg10,arg11);
4533
4534 {
4535 int i;
4536
4537 if ( arg1 )
4538 {
4539 for ( i = 0; i < ii1; i++ )
4540 LUA_FREE_ARRAY( arg1[i] );
4541 LUA_FREE_ARRAY( arg1 );
4542 }
4543 }
4544 {
4545 LUA_FREE_ARRAY( arg8 );
4546 }
4547 {
4548 mypltr_funcstr[0] = '\0';
4549 }
4550 {
4551 int i;
4552
4553 LUA_FREE_ARRAY( cgrid111.xg );
4554 LUA_FREE_ARRAY( cgrid111.yg );
4555
4556 if ( cgrid211.xg )
4557 {
4558 for ( i = 0; i < Xlen; i++ )
4559 LUA_FREE_ARRAY( cgrid211.xg[i] );
4560 LUA_FREE_ARRAY( cgrid211.xg );
4561 }
4562 if ( cgrid211.yg )
4563 {
4564 for ( i = 0; i < Xlen; i++ )
4565 LUA_FREE_ARRAY( cgrid211.yg[i] );
4566 LUA_FREE_ARRAY( cgrid211.yg );
4567 }
4568 }
4569 return SWIG_arg;
4570
4571 fail: SWIGUNUSED;
4572 {
4573 int i;
4574
4575 if ( arg1 )
4576 {
4577 for ( i = 0; i < ii1; i++ )
4578 LUA_FREE_ARRAY( arg1[i] );
4579 LUA_FREE_ARRAY( arg1 );
4580 }
4581 }
4582 {
4583 LUA_FREE_ARRAY( arg8 );
4584 }
4585 {
4586 mypltr_funcstr[0] = '\0';
4587 }
4588 {
4589 int i;
4590
4591 LUA_FREE_ARRAY( cgrid111.xg );
4592 LUA_FREE_ARRAY( cgrid111.yg );
4593
4594 if ( cgrid211.xg )
4595 {
4596 for ( i = 0; i < Xlen; i++ )
4597 LUA_FREE_ARRAY( cgrid211.xg[i] );
4598 LUA_FREE_ARRAY( cgrid211.xg );
4599 }
4600 if ( cgrid211.yg )
4601 {
4602 for ( i = 0; i < Xlen; i++ )
4603 LUA_FREE_ARRAY( cgrid211.yg[i] );
4604 LUA_FREE_ARRAY( cgrid211.yg );
4605 }
4606 }
4607 lua_error(L);
4608 return 0;
4609}
4610
4611
4612static int _wrap_ctime(lua_State* L) {
4613 int SWIG_arg = 0;
4614 PLINT arg1 ;
4615 PLINT arg2 ;
4616 PLINT arg3 ;
4617 PLINT arg4 ;
4618 PLINT arg5 ;
4619 PLFLT arg6 ;
4620 PLFLT *arg7 = (PLFLT *) 0 ;
4621 PLFLT temp7 ;
4622
4623 arg7 = &temp7;
4624 SWIG_check_num_args("plctime",6,6)
4625 if(!lua_isnumber(L,1)) SWIG_fail_arg("plctime",1,"PLINT");
4626 if(!lua_isnumber(L,2)) SWIG_fail_arg("plctime",2,"PLINT");
4627 if(!lua_isnumber(L,3)) SWIG_fail_arg("plctime",3,"PLINT");
4628 if(!lua_isnumber(L,4)) SWIG_fail_arg("plctime",4,"PLINT");
4629 if(!lua_isnumber(L,5)) SWIG_fail_arg("plctime",5,"PLINT");
4630 if(!lua_isnumber(L,6)) SWIG_fail_arg("plctime",6,"PLFLT");
4631 arg1 = (PLINT)lua_tonumber(L, 1);
4632 arg2 = (PLINT)lua_tonumber(L, 2);
4633 arg3 = (PLINT)lua_tonumber(L, 3);
4634 arg4 = (PLINT)lua_tonumber(L, 4);
4635 arg5 = (PLINT)lua_tonumber(L, 5);
4636 arg6 = (PLFLT)lua_tonumber(L, 6);
4637 plctime(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
4638
4639 lua_pushnumber(L, (lua_Number) *arg7); SWIG_arg++;
4640 return SWIG_arg;
4641
4642 fail: SWIGUNUSED;
4643 lua_error(L);
4644 return 0;
4645}
4646
4647
4648static int _wrap_cpstrm(lua_State* L) {
4649 int SWIG_arg = 0;
4650 PLINT arg1 ;
4651 PLBOOL arg2 ;
4652
4653 SWIG_check_num_args("plcpstrm",2,2)
4654 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcpstrm",1,"PLINT");
4655 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcpstrm",2,"PLBOOL");
4656 arg1 = (PLINT)lua_tonumber(L, 1);
4657 arg2 = (PLBOOL)lua_tonumber(L, 2);
4658 plcpstrm(arg1,arg2);
4659
4660 return SWIG_arg;
4661
4662 fail: SWIGUNUSED;
4663 lua_error(L);
4664 return 0;
4665}
4666
4667
4668static int _wrap_plend(lua_State* L) {
4669 int SWIG_arg = 0;
4670
4671 SWIG_check_num_args("plend",0,0)
4672 plend();
4673
4674 return SWIG_arg;
4675
4676 fail: SWIGUNUSED;
4677 lua_error(L);
4678 return 0;
4679}
4680
4681
4682static int _wrap_plend1(lua_State* L) {
4683 int SWIG_arg = 0;
4684
4685 SWIG_check_num_args("plend1",0,0)
4686 plend1();
4687
4688 return SWIG_arg;
4689
4690 fail: SWIGUNUSED;
4691 lua_error(L);
4692 return 0;
4693}
4694
4695
4696static int _wrap_env(lua_State* L) {
4697 int SWIG_arg = 0;
4698 PLFLT arg1 ;
4699 PLFLT arg2 ;
4700 PLFLT arg3 ;
4701 PLFLT arg4 ;
4702 PLINT arg5 ;
4703 PLINT arg6 ;
4704
4705 SWIG_check_num_args("plenv",6,6)
4706 if(!lua_isnumber(L,1)) SWIG_fail_arg("plenv",1,"PLFLT");
4707 if(!lua_isnumber(L,2)) SWIG_fail_arg("plenv",2,"PLFLT");
4708 if(!lua_isnumber(L,3)) SWIG_fail_arg("plenv",3,"PLFLT");
4709 if(!lua_isnumber(L,4)) SWIG_fail_arg("plenv",4,"PLFLT");
4710 if(!lua_isnumber(L,5)) SWIG_fail_arg("plenv",5,"PLINT");
4711 if(!lua_isnumber(L,6)) SWIG_fail_arg("plenv",6,"PLINT");
4712 arg1 = (PLFLT)lua_tonumber(L, 1);
4713 arg2 = (PLFLT)lua_tonumber(L, 2);
4714 arg3 = (PLFLT)lua_tonumber(L, 3);
4715 arg4 = (PLFLT)lua_tonumber(L, 4);
4716 arg5 = (PLINT)lua_tonumber(L, 5);
4717 arg6 = (PLINT)lua_tonumber(L, 6);
4718 plenv(arg1,arg2,arg3,arg4,arg5,arg6);
4719
4720 return SWIG_arg;
4721
4722 fail: SWIGUNUSED;
4723 lua_error(L);
4724 return 0;
4725}
4726
4727
4728static int _wrap_env0(lua_State* L) {
4729 int SWIG_arg = 0;
4730 PLFLT arg1 ;
4731 PLFLT arg2 ;
4732 PLFLT arg3 ;
4733 PLFLT arg4 ;
4734 PLINT arg5 ;
4735 PLINT arg6 ;
4736
4737 SWIG_check_num_args("plenv0",6,6)
4738 if(!lua_isnumber(L,1)) SWIG_fail_arg("plenv0",1,"PLFLT");
4739 if(!lua_isnumber(L,2)) SWIG_fail_arg("plenv0",2,"PLFLT");
4740 if(!lua_isnumber(L,3)) SWIG_fail_arg("plenv0",3,"PLFLT");
4741 if(!lua_isnumber(L,4)) SWIG_fail_arg("plenv0",4,"PLFLT");
4742 if(!lua_isnumber(L,5)) SWIG_fail_arg("plenv0",5,"PLINT");
4743 if(!lua_isnumber(L,6)) SWIG_fail_arg("plenv0",6,"PLINT");
4744 arg1 = (PLFLT)lua_tonumber(L, 1);
4745 arg2 = (PLFLT)lua_tonumber(L, 2);
4746 arg3 = (PLFLT)lua_tonumber(L, 3);
4747 arg4 = (PLFLT)lua_tonumber(L, 4);
4748 arg5 = (PLINT)lua_tonumber(L, 5);
4749 arg6 = (PLINT)lua_tonumber(L, 6);
4750 plenv0(arg1,arg2,arg3,arg4,arg5,arg6);
4751
4752 return SWIG_arg;
4753
4754 fail: SWIGUNUSED;
4755 lua_error(L);
4756 return 0;
4757}
4758
4759
4760static int _wrap_eop(lua_State* L) {
4761 int SWIG_arg = 0;
4762
4763 SWIG_check_num_args("pleop",0,0)
4764 pleop();
4765
4766 return SWIG_arg;
4767
4768 fail: SWIGUNUSED;
4769 lua_error(L);
4770 return 0;
4771}
4772
4773
4774static int _wrap_errx(lua_State* L) {
4775 int SWIG_arg = 0;
4776 PLINT arg1 ;
4777 PLFLT *arg2 = (PLFLT *) 0 ;
4778 PLFLT *arg3 = (PLFLT *) 0 ;
4779 PLFLT *arg4 = (PLFLT *) 0 ;
4780 int temp3 ;
4781 int temp4 ;
4782
4783 SWIG_check_num_args("plerrx",3,3)
4784 {
4785 int temp;
4786 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4787 if ( !arg2 )
4788 SWIG_fail;
4789 arg1 = Alen = temp;
4790 }
4791 {
4792 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4793 if ( !arg3 )
4794 SWIG_fail;
4795 if ( temp3 != Alen )
4796 {
4797 lua_pushfstring( L, "Tables must be of same length." );
4798 SWIG_fail;
4799 }
4800 }
4801 {
4802 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
4803 if ( !arg4 )
4804 SWIG_fail;
4805 if ( temp4 != Alen )
4806 {
4807 lua_pushfstring( L, "Tables must be of same length." );
4808 SWIG_fail;
4809 }
4810 }
4811 plerrx(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
4812
4813 {
4814 LUA_FREE_ARRAY( arg2 );
4815 }
4816 {
4817 LUA_FREE_ARRAY( arg3 );
4818 }
4819 {
4820 LUA_FREE_ARRAY( arg4 );
4821 }
4822 return SWIG_arg;
4823
4824 fail: SWIGUNUSED;
4825 {
4826 LUA_FREE_ARRAY( arg2 );
4827 }
4828 {
4829 LUA_FREE_ARRAY( arg3 );
4830 }
4831 {
4832 LUA_FREE_ARRAY( arg4 );
4833 }
4834 lua_error(L);
4835 return 0;
4836}
4837
4838
4839static int _wrap_erry(lua_State* L) {
4840 int SWIG_arg = 0;
4841 PLINT arg1 ;
4842 PLFLT *arg2 = (PLFLT *) 0 ;
4843 PLFLT *arg3 = (PLFLT *) 0 ;
4844 PLFLT *arg4 = (PLFLT *) 0 ;
4845 int temp3 ;
4846 int temp4 ;
4847
4848 SWIG_check_num_args("plerry",3,3)
4849 {
4850 int temp;
4851 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4852 if ( !arg2 )
4853 SWIG_fail;
4854 arg1 = Alen = temp;
4855 }
4856 {
4857 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4858 if ( !arg3 )
4859 SWIG_fail;
4860 if ( temp3 != Alen )
4861 {
4862 lua_pushfstring( L, "Tables must be of same length." );
4863 SWIG_fail;
4864 }
4865 }
4866 {
4867 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
4868 if ( !arg4 )
4869 SWIG_fail;
4870 if ( temp4 != Alen )
4871 {
4872 lua_pushfstring( L, "Tables must be of same length." );
4873 SWIG_fail;
4874 }
4875 }
4876 plerry(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
4877
4878 {
4879 LUA_FREE_ARRAY( arg2 );
4880 }
4881 {
4882 LUA_FREE_ARRAY( arg3 );
4883 }
4884 {
4885 LUA_FREE_ARRAY( arg4 );
4886 }
4887 return SWIG_arg;
4888
4889 fail: SWIGUNUSED;
4890 {
4891 LUA_FREE_ARRAY( arg2 );
4892 }
4893 {
4894 LUA_FREE_ARRAY( arg3 );
4895 }
4896 {
4897 LUA_FREE_ARRAY( arg4 );
4898 }
4899 lua_error(L);
4900 return 0;
4901}
4902
4903
4904static int _wrap_famadv(lua_State* L) {
4905 int SWIG_arg = 0;
4906
4907 SWIG_check_num_args("plfamadv",0,0)
4908 plfamadv();
4909
4910 return SWIG_arg;
4911
4912 fail: SWIGUNUSED;
4913 lua_error(L);
4914 return 0;
4915}
4916
4917
4918static int _wrap_fill(lua_State* L) {
4919 int SWIG_arg = 0;
4920 PLINT arg1 ;
4921 PLFLT *arg2 = (PLFLT *) 0 ;
4922 PLFLT *arg3 = (PLFLT *) 0 ;
4923 int temp3 ;
4924
4925 SWIG_check_num_args("plfill",2,2)
4926 {
4927 int temp;
4928 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4929 if ( !arg2 )
4930 SWIG_fail;
4931 arg1 = Alen = temp;
4932 }
4933 {
4934 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4935 if ( !arg3 )
4936 SWIG_fail;
4937 if ( temp3 != Alen )
4938 {
4939 lua_pushfstring( L, "Tables must be of same length." );
4940 SWIG_fail;
4941 }
4942 }
4943 plfill(arg1,(double const *)arg2,(double const *)arg3);
4944
4945 {
4946 LUA_FREE_ARRAY( arg2 );
4947 }
4948 {
4949 LUA_FREE_ARRAY( arg3 );
4950 }
4951 return SWIG_arg;
4952
4953 fail: SWIGUNUSED;
4954 {
4955 LUA_FREE_ARRAY( arg2 );
4956 }
4957 {
4958 LUA_FREE_ARRAY( arg3 );
4959 }
4960 lua_error(L);
4961 return 0;
4962}
4963
4964
4965static int _wrap_fill3(lua_State* L) {
4966 int SWIG_arg = 0;
4967 PLINT arg1 ;
4968 PLFLT *arg2 = (PLFLT *) 0 ;
4969 PLFLT *arg3 = (PLFLT *) 0 ;
4970 PLFLT *arg4 = (PLFLT *) 0 ;
4971 int temp3 ;
4972 int temp4 ;
4973
4974 SWIG_check_num_args("plfill3",3,3)
4975 {
4976 int temp;
4977 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4978 if ( !arg2 )
4979 SWIG_fail;
4980 arg1 = Alen = temp;
4981 }
4982 {
4983 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4984 if ( !arg3 )
4985 SWIG_fail;
4986 if ( temp3 != Alen )
4987 {
4988 lua_pushfstring( L, "Tables must be of same length." );
4989 SWIG_fail;
4990 }
4991 }
4992 {
4993 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
4994 if ( !arg4 )
4995 SWIG_fail;
4996 if ( temp4 != Alen )
4997 {
4998 lua_pushfstring( L, "Tables must be of same length." );
4999 SWIG_fail;
5000 }
5001 }
5002 plfill3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
5003
5004 {
5005 LUA_FREE_ARRAY( arg2 );
5006 }
5007 {
5008 LUA_FREE_ARRAY( arg3 );
5009 }
5010 {
5011 LUA_FREE_ARRAY( arg4 );
5012 }
5013 return SWIG_arg;
5014
5015 fail: SWIGUNUSED;
5016 {
5017 LUA_FREE_ARRAY( arg2 );
5018 }
5019 {
5020 LUA_FREE_ARRAY( arg3 );
5021 }
5022 {
5023 LUA_FREE_ARRAY( arg4 );
5024 }
5025 lua_error(L);
5026 return 0;
5027}
5028
5029
5030static int _wrap_gradient(lua_State* L) {
5031 int SWIG_arg = 0;
5032 PLINT arg1 ;
5033 PLFLT *arg2 = (PLFLT *) 0 ;
5034 PLFLT *arg3 = (PLFLT *) 0 ;
5035 PLFLT arg4 ;
5036 int temp3 ;
5037
5038 SWIG_check_num_args("plgradient",3,3)
5039 if(!lua_isnumber(L,3)) SWIG_fail_arg("plgradient",3,"PLFLT");
5040 {
5041 int temp;
5042 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5043 if ( !arg2 )
5044 SWIG_fail;
5045 arg1 = Alen = temp;
5046 }
5047 {
5048 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
5049 if ( !arg3 )
5050 SWIG_fail;
5051 if ( temp3 != Alen )
5052 {
5053 lua_pushfstring( L, "Tables must be of same length." );
5054 SWIG_fail;
5055 }
5056 }
5057 arg4 = (PLFLT)lua_tonumber(L, 3);
5058 plgradient(arg1,(double const *)arg2,(double const *)arg3,arg4);
5059
5060 {
5061 LUA_FREE_ARRAY( arg2 );
5062 }
5063 {
5064 LUA_FREE_ARRAY( arg3 );
5065 }
5066 return SWIG_arg;
5067
5068 fail: SWIGUNUSED;
5069 {
5070 LUA_FREE_ARRAY( arg2 );
5071 }
5072 {
5073 LUA_FREE_ARRAY( arg3 );
5074 }
5075 lua_error(L);
5076 return 0;
5077}
5078
5079
5080static int _wrap_flush(lua_State* L) {
5081 int SWIG_arg = 0;
5082
5083 SWIG_check_num_args("plflush",0,0)
5084 plflush();
5085
5086 return SWIG_arg;
5087
5088 fail: SWIGUNUSED;
5089 lua_error(L);
5090 return 0;
5091}
5092
5093
5094static int _wrap_font(lua_State* L) {
5095 int SWIG_arg = 0;
5096 PLINT arg1 ;
5097
5098 SWIG_check_num_args("plfont",1,1)
5099 if(!lua_isnumber(L,1)) SWIG_fail_arg("plfont",1,"PLINT");
5100 arg1 = (PLINT)lua_tonumber(L, 1);
5101 plfont(arg1);
5102
5103 return SWIG_arg;
5104
5105 fail: SWIGUNUSED;
5106 lua_error(L);
5107 return 0;
5108}
5109
5110
5111static int _wrap_fontld(lua_State* L) {
5112 int SWIG_arg = 0;
5113 PLINT arg1 ;
5114
5115 SWIG_check_num_args("plfontld",1,1)
5116 if(!lua_isnumber(L,1)) SWIG_fail_arg("plfontld",1,"PLINT");
5117 arg1 = (PLINT)lua_tonumber(L, 1);
5118 plfontld(arg1);
5119
5120 return SWIG_arg;
5121
5122 fail: SWIGUNUSED;
5123 lua_error(L);
5124 return 0;
5125}
5126
5127
5128static int _wrap_gchr(lua_State* L) {
5129 int SWIG_arg = 0;
5130 PLFLT *arg1 = (PLFLT *) 0 ;
5131 PLFLT *arg2 = (PLFLT *) 0 ;
5132 PLFLT temp1 ;
5133 PLFLT temp2 ;
5134
5135 arg1 = &temp1;
5136 arg2 = &temp2;
5137 SWIG_check_num_args("plgchr",0,0)
5138 plgchr(arg1,arg2);
5139
5140 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5141 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5142 return SWIG_arg;
5143
5144 fail: SWIGUNUSED;
5145 lua_error(L);
5146 return 0;
5147}
5148
5149
5150static int _wrap_gcol0(lua_State* L) {
5151 int SWIG_arg = 0;
5152 PLINT arg1 ;
5153 PLINT *arg2 = (PLINT *) 0 ;
5154 PLINT *arg3 = (PLINT *) 0 ;
5155 PLINT *arg4 = (PLINT *) 0 ;
5156 PLINT temp2 ;
5157 PLINT temp3 ;
5158 PLINT temp4 ;
5159
5160 arg2 = &temp2;
5161 arg3 = &temp3;
5162 arg4 = &temp4;
5163 SWIG_check_num_args("plgcol0",1,1)
5164 if(!lua_isnumber(L,1)) SWIG_fail_arg("plgcol0",1,"PLINT");
5165 arg1 = (PLINT)lua_tonumber(L, 1);
5166 plgcol0(arg1,arg2,arg3,arg4);
5167
5168 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5169 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5170 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5171 return SWIG_arg;
5172
5173 fail: SWIGUNUSED;
5174 lua_error(L);
5175 return 0;
5176}
5177
5178
5179static int _wrap_gcol0a(lua_State* L) {
5180 int SWIG_arg = 0;
5181 PLINT arg1 ;
5182 PLINT *arg2 = (PLINT *) 0 ;
5183 PLINT *arg3 = (PLINT *) 0 ;
5184 PLINT *arg4 = (PLINT *) 0 ;
5185 PLFLT *arg5 = (PLFLT *) 0 ;
5186 PLINT temp2 ;
5187 PLINT temp3 ;
5188 PLINT temp4 ;
5189 PLFLT temp5 ;
5190
5191 arg2 = &temp2;
5192 arg3 = &temp3;
5193 arg4 = &temp4;
5194 arg5 = &temp5;
5195 SWIG_check_num_args("plgcol0a",1,1)
5196 if(!lua_isnumber(L,1)) SWIG_fail_arg("plgcol0a",1,"PLINT");
5197 arg1 = (PLINT)lua_tonumber(L, 1);
5198 plgcol0a(arg1,arg2,arg3,arg4,arg5);
5199
5200 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5201 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5202 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5203 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
5204 return SWIG_arg;
5205
5206 fail: SWIGUNUSED;
5207 lua_error(L);
5208 return 0;
5209}
5210
5211
5212static int _wrap_gcolbg(lua_State* L) {
5213 int SWIG_arg = 0;
5214 PLINT *arg1 = (PLINT *) 0 ;
5215 PLINT *arg2 = (PLINT *) 0 ;
5216 PLINT *arg3 = (PLINT *) 0 ;
5217 PLINT temp1 ;
5218 PLINT temp2 ;
5219 PLINT temp3 ;
5220
5221 arg1 = &temp1;
5222 arg2 = &temp2;
5223 arg3 = &temp3;
5224 SWIG_check_num_args("plgcolbg",0,0)
5225 plgcolbg(arg1,arg2,arg3);
5226
5227 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5228 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5229 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5230 return SWIG_arg;
5231
5232 fail: SWIGUNUSED;
5233 lua_error(L);
5234 return 0;
5235}
5236
5237
5238static int _wrap_gcolbga(lua_State* L) {
5239 int SWIG_arg = 0;
5240 PLINT *arg1 = (PLINT *) 0 ;
5241 PLINT *arg2 = (PLINT *) 0 ;
5242 PLINT *arg3 = (PLINT *) 0 ;
5243 PLFLT *arg4 = (PLFLT *) 0 ;
5244 PLINT temp1 ;
5245 PLINT temp2 ;
5246 PLINT temp3 ;
5247 PLFLT temp4 ;
5248
5249 arg1 = &temp1;
5250 arg2 = &temp2;
5251 arg3 = &temp3;
5252 arg4 = &temp4;
5253 SWIG_check_num_args("plgcolbga",0,0)
5254 plgcolbga(arg1,arg2,arg3,arg4);
5255
5256 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5257 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5258 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5259 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5260 return SWIG_arg;
5261
5262 fail: SWIGUNUSED;
5263 lua_error(L);
5264 return 0;
5265}
5266
5267
5268static int _wrap_gcompression(lua_State* L) {
5269 int SWIG_arg = 0;
5270 PLINT *arg1 = (PLINT *) 0 ;
5271 PLINT temp1 ;
5272
5273 arg1 = &temp1;
5274 SWIG_check_num_args("plgcompression",0,0)
5275 plgcompression(arg1);
5276
5277 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5278 return SWIG_arg;
5279
5280 fail: SWIGUNUSED;
5281 lua_error(L);
5282 return 0;
5283}
5284
5285
5286static int _wrap_gdev(lua_State* L) {
5287 int SWIG_arg = 0;
5288 char *arg1 = (char *) 0 ;
5289 char buff1[1000] ;
5290
5291 {
5292 arg1 = buff1;
5293 }
5294 SWIG_check_num_args("plgdev",0,0)
5295 plgdev(arg1);
5296
5297 {
5298 lua_pushstring( L, arg1 );
5299 SWIG_arg++;
5300 }
5301 return SWIG_arg;
5302
5303 fail: SWIGUNUSED;
5304 lua_error(L);
5305 return 0;
5306}
5307
5308
5309static int _wrap_gdidev(lua_State* L) {
5310 int SWIG_arg = 0;
5311 PLFLT *arg1 = (PLFLT *) 0 ;
5312 PLFLT *arg2 = (PLFLT *) 0 ;
5313 PLFLT *arg3 = (PLFLT *) 0 ;
5314 PLFLT *arg4 = (PLFLT *) 0 ;
5315 PLFLT temp1 ;
5316 PLFLT temp2 ;
5317 PLFLT temp3 ;
5318 PLFLT temp4 ;
5319
5320 arg1 = &temp1;
5321 arg2 = &temp2;
5322 arg3 = &temp3;
5323 arg4 = &temp4;
5324 SWIG_check_num_args("plgdidev",0,0)
5325 plgdidev(arg1,arg2,arg3,arg4);
5326
5327 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5328 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5329 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5330 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5331 return SWIG_arg;
5332
5333 fail: SWIGUNUSED;
5334 lua_error(L);
5335 return 0;
5336}
5337
5338
5339static int _wrap_gdiori(lua_State* L) {
5340 int SWIG_arg = 0;
5341 PLFLT *arg1 = (PLFLT *) 0 ;
5342 PLFLT temp1 ;
5343
5344 arg1 = &temp1;
5345 SWIG_check_num_args("plgdiori",0,0)
5346 plgdiori(arg1);
5347
5348 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5349 return SWIG_arg;
5350
5351 fail: SWIGUNUSED;
5352 lua_error(L);
5353 return 0;
5354}
5355
5356
5357static int _wrap_gdiplt(lua_State* L) {
5358 int SWIG_arg = 0;
5359 PLFLT *arg1 = (PLFLT *) 0 ;
5360 PLFLT *arg2 = (PLFLT *) 0 ;
5361 PLFLT *arg3 = (PLFLT *) 0 ;
5362 PLFLT *arg4 = (PLFLT *) 0 ;
5363 PLFLT temp1 ;
5364 PLFLT temp2 ;
5365 PLFLT temp3 ;
5366 PLFLT temp4 ;
5367
5368 arg1 = &temp1;
5369 arg2 = &temp2;
5370 arg3 = &temp3;
5371 arg4 = &temp4;
5372 SWIG_check_num_args("plgdiplt",0,0)
5373 plgdiplt(arg1,arg2,arg3,arg4);
5374
5375 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5376 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5377 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5378 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5379 return SWIG_arg;
5380
5381 fail: SWIGUNUSED;
5382 lua_error(L);
5383 return 0;
5384}
5385
5386
5387static int _wrap_gfam(lua_State* L) {
5388 int SWIG_arg = 0;
5389 PLINT *arg1 = (PLINT *) 0 ;
5390 PLINT *arg2 = (PLINT *) 0 ;
5391 PLINT *arg3 = (PLINT *) 0 ;
5392 PLINT temp1 ;
5393 PLINT temp2 ;
5394 PLINT temp3 ;
5395
5396 arg1 = &temp1;
5397 arg2 = &temp2;
5398 arg3 = &temp3;
5399 SWIG_check_num_args("plgfam",0,0)
5400 plgfam(arg1,arg2,arg3);
5401
5402 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5403 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5404 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5405 return SWIG_arg;
5406
5407 fail: SWIGUNUSED;
5408 lua_error(L);
5409 return 0;
5410}
5411
5412
5413static int _wrap_gfci(lua_State* L) {
5414 int SWIG_arg = 0;
5415 PLUNICODE *arg1 = (PLUNICODE *) 0 ;
5416 PLUNICODE temp1 ;
5417
5418 arg1 = &temp1;
5419 SWIG_check_num_args("plgfci",0,0)
5420 plgfci(arg1);
5421
5422 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5423 return SWIG_arg;
5424
5425 fail: SWIGUNUSED;
5426 lua_error(L);
5427 return 0;
5428}
5429
5430
5431static int _wrap_gfnam(lua_State* L) {
5432 int SWIG_arg = 0;
5433 char *arg1 = (char *) 0 ;
5434 char buff1[1000] ;
5435
5436 {
5437 arg1 = buff1;
5438 }
5439 SWIG_check_num_args("plgfnam",0,0)
5440 plgfnam(arg1);
5441
5442 {
5443 lua_pushstring( L, arg1 );
5444 SWIG_arg++;
5445 }
5446 return SWIG_arg;
5447
5448 fail: SWIGUNUSED;
5449 lua_error(L);
5450 return 0;
5451}
5452
5453
5454static int _wrap_gfont(lua_State* L) {
5455 int SWIG_arg = 0;
5456 PLINT *arg1 = (PLINT *) 0 ;
5457 PLINT *arg2 = (PLINT *) 0 ;
5458 PLINT *arg3 = (PLINT *) 0 ;
5459 PLINT temp1 ;
5460 PLINT temp2 ;
5461 PLINT temp3 ;
5462
5463 arg1 = &temp1;
5464 arg2 = &temp2;
5465 arg3 = &temp3;
5466 SWIG_check_num_args("plgfont",0,0)
5467 plgfont(arg1,arg2,arg3);
5468
5469 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5470 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5471 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5472 return SWIG_arg;
5473
5474 fail: SWIGUNUSED;
5475 lua_error(L);
5476 return 0;
5477}
5478
5479
5480static int _wrap_glevel(lua_State* L) {
5481 int SWIG_arg = 0;
5482 PLINT *arg1 = (PLINT *) 0 ;
5483 PLINT temp1 ;
5484
5485 arg1 = &temp1;
5486 SWIG_check_num_args("plglevel",0,0)
5487 plglevel(arg1);
5488
5489 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5490 return SWIG_arg;
5491
5492 fail: SWIGUNUSED;
5493 lua_error(L);
5494 return 0;
5495}
5496
5497
5498static int _wrap_gpage(lua_State* L) {
5499 int SWIG_arg = 0;
5500 PLFLT *arg1 = (PLFLT *) 0 ;
5501 PLFLT *arg2 = (PLFLT *) 0 ;
5502 PLINT *arg3 = (PLINT *) 0 ;
5503 PLINT *arg4 = (PLINT *) 0 ;
5504 PLINT *arg5 = (PLINT *) 0 ;
5505 PLINT *arg6 = (PLINT *) 0 ;
5506 PLFLT temp1 ;
5507 PLFLT temp2 ;
5508 PLINT temp3 ;
5509 PLINT temp4 ;
5510 PLINT temp5 ;
5511 PLINT temp6 ;
5512
5513 arg1 = &temp1;
5514 arg2 = &temp2;
5515 arg3 = &temp3;
5516 arg4 = &temp4;
5517 arg5 = &temp5;
5518 arg6 = &temp6;
5519 SWIG_check_num_args("plgpage",0,0)
5520 plgpage(arg1,arg2,arg3,arg4,arg5,arg6);
5521
5522 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5523 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5524 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5525 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5526 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
5527 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
5528 return SWIG_arg;
5529
5530 fail: SWIGUNUSED;
5531 lua_error(L);
5532 return 0;
5533}
5534
5535
5536static int _wrap_gra(lua_State* L) {
5537 int SWIG_arg = 0;
5538
5539 SWIG_check_num_args("plgra",0,0)
5540 plgra();
5541
5542 return SWIG_arg;
5543
5544 fail: SWIGUNUSED;
5545 lua_error(L);
5546 return 0;
5547}
5548
5549
5550static int _wrap_griddata(lua_State* L) {
5551 int SWIG_arg = 0;
5552 PLFLT *arg1 = (PLFLT *) 0 ;
5553 PLFLT *arg2 = (PLFLT *) 0 ;
5554 PLFLT *arg3 = (PLFLT *) 0 ;
5555 PLINT arg4 ;
5556 PLFLT *arg5 = (PLFLT *) 0 ;
5557 PLINT arg6 ;
5558 PLFLT *arg7 = (PLFLT *) 0 ;
5559 PLINT arg8 ;
5560 PLFLT **arg9 = (PLFLT **) 0 ;
5561 PLINT arg10 ;
5562 PLFLT arg11 ;
5563 int temp2 ;
5564
5565 SWIG_check_num_args("plgriddata",7,7)
5566 if(!lua_isnumber(L,6)) SWIG_fail_arg("plgriddata",6,"PLINT");
5567 if(!lua_isnumber(L,7)) SWIG_fail_arg("plgriddata",7,"PLFLT");
5568 {
5569 int temp;
5570 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5571 if ( !arg1 )
5572 SWIG_fail;
5573 Alen = temp;
5574 }
5575 {
5576 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp2 );
5577 if ( !arg2 )
5578 SWIG_fail;
5579 if ( temp2 != Alen )
5580 {
5581 lua_pushfstring( L, "Tables must be of same length." );
5582 SWIG_fail;
5583 }
5584 }
5585 {
5586 int temp;
5587 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp );
5588 if ( !arg3 )
5589 SWIG_fail;
5590 if ( temp != Alen )
5591 {
5592 lua_pushfstring( L, "Tables must be of same length." );
5593 SWIG_fail;
5594 }
5595 arg4 = temp;
5596 }
5597 {
5598 int temp;
5599 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
5600 if ( !arg5 )
5601 SWIG_fail;
5602 arg6 = Xlen = temp;
5603 }
5604 {
5605 int temp, i;
5606
5607 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
5608 if ( !arg7 )
5609 SWIG_fail;
5610 arg8 = Ylen = temp;
5611
5612 arg9 = LUA_ALLOC_ARRAY( PLFLT *, Xlen );
5613 if ( !arg9 )
5614 SWIG_fail;
5615 for ( i = 0; i < Xlen; i++ )
5616 arg9[i] = NULL;
5617
5618 for ( i = 0; i < Xlen; i++ )
5619 {
5620 arg9[i] = LUA_ALLOC_ARRAY( PLFLT, Ylen );
5621 if ( !arg9[i] )
5622 SWIG_fail;
5623 }
5624 }
5625 arg10 = (PLINT)lua_tonumber(L, 6);
5626 arg11 = (PLFLT)lua_tonumber(L, 7);
5627 plgriddata((double const *)arg1,(double const *)arg2,(double const *)arg3,arg4,(double const *)arg5,arg6,(double const *)arg7,arg8,arg9,arg10,arg11);
5628
5629 {
5630 int i;
5631
5632 if ( arg9 )
5633 {
5634 lua_newtable( L );
5635 for ( i = 0; i < Xlen; i++ )
5636 {
5637 SWIG_write_double_num_array( L, arg9[i], Ylen );
5638 lua_rawseti( L, -2, i + 1 ); // -1 is the inner table, -2 is the outer table
5639 }
5640 SWIG_arg++;
5641 }
5642 }
5643 {
5644 LUA_FREE_ARRAY( arg1 );
5645 }
5646 {
5647 LUA_FREE_ARRAY( arg2 );
5648 }
5649 {
5650 LUA_FREE_ARRAY( arg3 );
5651 }
5652 {
5653 LUA_FREE_ARRAY( arg5 );
5654 }
5655 {
5656 int i;
5657
5658 LUA_FREE_ARRAY( arg7 );
5659
5660 if ( arg9 )
5661 {
5662 for ( i = 0; i < Xlen; i++ )
5663 LUA_FREE_ARRAY( arg9[i] );
5664 LUA_FREE_ARRAY( arg9 );
5665 }
5666 }
5667 return SWIG_arg;
5668
5669 fail: SWIGUNUSED;
5670 {
5671 LUA_FREE_ARRAY( arg1 );
5672 }
5673 {
5674 LUA_FREE_ARRAY( arg2 );
5675 }
5676 {
5677 LUA_FREE_ARRAY( arg3 );
5678 }
5679 {
5680 LUA_FREE_ARRAY( arg5 );
5681 }
5682 {
5683 int i;
5684
5685 LUA_FREE_ARRAY( arg7 );
5686
5687 if ( arg9 )
5688 {
5689 for ( i = 0; i < Xlen; i++ )
5690 LUA_FREE_ARRAY( arg9[i] );
5691 LUA_FREE_ARRAY( arg9 );
5692 }
5693 }
5694 lua_error(L);
5695 return 0;
5696}
5697
5698
5699static int _wrap_gspa(lua_State* L) {
5700 int SWIG_arg = 0;
5701 PLFLT *arg1 = (PLFLT *) 0 ;
5702 PLFLT *arg2 = (PLFLT *) 0 ;
5703 PLFLT *arg3 = (PLFLT *) 0 ;
5704 PLFLT *arg4 = (PLFLT *) 0 ;
5705 PLFLT temp1 ;
5706 PLFLT temp2 ;
5707 PLFLT temp3 ;
5708 PLFLT temp4 ;
5709
5710 arg1 = &temp1;
5711 arg2 = &temp2;
5712 arg3 = &temp3;
5713 arg4 = &temp4;
5714 SWIG_check_num_args("plgspa",0,0)
5715 plgspa(arg1,arg2,arg3,arg4);
5716
5717 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5718 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5719 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5720 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5721 return SWIG_arg;
5722
5723 fail: SWIGUNUSED;
5724 lua_error(L);
5725 return 0;
5726}
5727
5728
5729static int _wrap_gstrm(lua_State* L) {
5730 int SWIG_arg = 0;
5731 PLINT *arg1 = (PLINT *) 0 ;
5732 PLINT temp1 ;
5733
5734 arg1 = &temp1;
5735 SWIG_check_num_args("plgstrm",0,0)
5736 plgstrm(arg1);
5737
5738 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5739 return SWIG_arg;
5740
5741 fail: SWIGUNUSED;
5742 lua_error(L);
5743 return 0;
5744}
5745
5746
5747static int _wrap_gver(lua_State* L) {
5748 int SWIG_arg = 0;
5749 char *arg1 = (char *) 0 ;
5750 char buff1[1000] ;
5751
5752 {
5753 arg1 = buff1;
5754 }
5755 SWIG_check_num_args("plgver",0,0)
5756 plgver(arg1);
5757
5758 {
5759 lua_pushstring( L, arg1 );
5760 SWIG_arg++;
5761 }
5762 return SWIG_arg;
5763
5764 fail: SWIGUNUSED;
5765 lua_error(L);
5766 return 0;
5767}
5768
5769
5770static int _wrap_gvpd(lua_State* L) {
5771 int SWIG_arg = 0;
5772 PLFLT *arg1 = (PLFLT *) 0 ;
5773 PLFLT *arg2 = (PLFLT *) 0 ;
5774 PLFLT *arg3 = (PLFLT *) 0 ;
5775 PLFLT *arg4 = (PLFLT *) 0 ;
5776 PLFLT temp1 ;
5777 PLFLT temp2 ;
5778 PLFLT temp3 ;
5779 PLFLT temp4 ;
5780
5781 arg1 = &temp1;
5782 arg2 = &temp2;
5783 arg3 = &temp3;
5784 arg4 = &temp4;
5785 SWIG_check_num_args("plgvpd",0,0)
5786 plgvpd(arg1,arg2,arg3,arg4);
5787
5788 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5789 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5790 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5791 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5792 return SWIG_arg;
5793
5794 fail: SWIGUNUSED;
5795 lua_error(L);
5796 return 0;
5797}
5798
5799
5800static int _wrap_gvpw(lua_State* L) {
5801 int SWIG_arg = 0;
5802 PLFLT *arg1 = (PLFLT *) 0 ;
5803 PLFLT *arg2 = (PLFLT *) 0 ;
5804 PLFLT *arg3 = (PLFLT *) 0 ;
5805 PLFLT *arg4 = (PLFLT *) 0 ;
5806 PLFLT temp1 ;
5807 PLFLT temp2 ;
5808 PLFLT temp3 ;
5809 PLFLT temp4 ;
5810
5811 arg1 = &temp1;
5812 arg2 = &temp2;
5813 arg3 = &temp3;
5814 arg4 = &temp4;
5815 SWIG_check_num_args("plgvpw",0,0)
5816 plgvpw(arg1,arg2,arg3,arg4);
5817
5818 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5819 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5820 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5821 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5822 return SWIG_arg;
5823
5824 fail: SWIGUNUSED;
5825 lua_error(L);
5826 return 0;
5827}
5828
5829
5830static int _wrap_gxax(lua_State* L) {
5831 int SWIG_arg = 0;
5832 PLINT *arg1 = (PLINT *) 0 ;
5833 PLINT *arg2 = (PLINT *) 0 ;
5834 PLINT temp1 ;
5835 PLINT temp2 ;
5836
5837 arg1 = &temp1;
5838 arg2 = &temp2;
5839 SWIG_check_num_args("plgxax",0,0)
5840 plgxax(arg1,arg2);
5841
5842 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5843 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5844 return SWIG_arg;
5845
5846 fail: SWIGUNUSED;
5847 lua_error(L);
5848 return 0;
5849}
5850
5851
5852static int _wrap_gyax(lua_State* L) {
5853 int SWIG_arg = 0;
5854 PLINT *arg1 = (PLINT *) 0 ;
5855 PLINT *arg2 = (PLINT *) 0 ;
5856 PLINT temp1 ;
5857 PLINT temp2 ;
5858
5859 arg1 = &temp1;
5860 arg2 = &temp2;
5861 SWIG_check_num_args("plgyax",0,0)
5862 plgyax(arg1,arg2);
5863
5864 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5865 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5866 return SWIG_arg;
5867
5868 fail: SWIGUNUSED;
5869 lua_error(L);
5870 return 0;
5871}
5872
5873
5874static int _wrap_gzax(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("plgzax",0,0)
5884 plgzax(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_hist(lua_State* L) {
5897 int SWIG_arg = 0;
5898 PLINT arg1 ;
5899 PLFLT *arg2 = (PLFLT *) 0 ;
5900 PLFLT arg3 ;
5901 PLFLT arg4 ;
5902 PLINT arg5 ;
5903 PLINT arg6 ;
5904
5905 SWIG_check_num_args("plhist",5,5)
5906 if(!lua_isnumber(L,2)) SWIG_fail_arg("plhist",2,"PLFLT");
5907 if(!lua_isnumber(L,3)) SWIG_fail_arg("plhist",3,"PLFLT");
5908 if(!lua_isnumber(L,4)) SWIG_fail_arg("plhist",4,"PLINT");
5909 if(!lua_isnumber(L,5)) SWIG_fail_arg("plhist",5,"PLINT");
5910 {
5911 int temp;
5912 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5913 if ( !arg2 )
5914 SWIG_fail;
5915 arg1 = Alen = temp;
5916 }
5917 arg3 = (PLFLT)lua_tonumber(L, 2);
5918 arg4 = (PLFLT)lua_tonumber(L, 3);
5919 arg5 = (PLINT)lua_tonumber(L, 4);
5920 arg6 = (PLINT)lua_tonumber(L, 5);
5921 plhist(arg1,(double const *)arg2,arg3,arg4,arg5,arg6);
5922
5923 {
5924 LUA_FREE_ARRAY( arg2 );
5925 }
5926 return SWIG_arg;
5927
5928 fail: SWIGUNUSED;
5929 {
5930 LUA_FREE_ARRAY( arg2 );
5931 }
5932 lua_error(L);
5933 return 0;
5934}
5935
5936
5937static int _wrap_hlsrgb(lua_State* L) {
5938 int SWIG_arg = 0;
5939 PLFLT arg1 ;
5940 PLFLT arg2 ;
5941 PLFLT arg3 ;
5942 PLFLT *arg4 = (PLFLT *) 0 ;
5943 PLFLT *arg5 = (PLFLT *) 0 ;
5944 PLFLT *arg6 = (PLFLT *) 0 ;
5945 PLFLT temp4 ;
5946 PLFLT temp5 ;
5947 PLFLT temp6 ;
5948
5949 arg4 = &temp4;
5950 arg5 = &temp5;
5951 arg6 = &temp6;
5952 SWIG_check_num_args("plhlsrgb",3,3)
5953 if(!lua_isnumber(L,1)) SWIG_fail_arg("plhlsrgb",1,"PLFLT");
5954 if(!lua_isnumber(L,2)) SWIG_fail_arg("plhlsrgb",2,"PLFLT");
5955 if(!lua_isnumber(L,3)) SWIG_fail_arg("plhlsrgb",3,"PLFLT");
5956 arg1 = (PLFLT)lua_tonumber(L, 1);
5957 arg2 = (PLFLT)lua_tonumber(L, 2);
5958 arg3 = (PLFLT)lua_tonumber(L, 3);
5959 plhlsrgb(arg1,arg2,arg3,arg4,arg5,arg6);
5960
5961 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5962 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
5963 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
5964 return SWIG_arg;
5965
5966 fail: SWIGUNUSED;
5967 lua_error(L);
5968 return 0;
5969}
5970
5971
5972static int _wrap_init(lua_State* L) {
5973 int SWIG_arg = 0;
5974
5975 SWIG_check_num_args("plinit",0,0)
5976 plinit();
5977
5978 return SWIG_arg;
5979
5980 fail: SWIGUNUSED;
5981 lua_error(L);
5982 return 0;
5983}
5984
5985
5986static int _wrap_join(lua_State* L) {
5987 int SWIG_arg = 0;
5988 PLFLT arg1 ;
5989 PLFLT arg2 ;
5990 PLFLT arg3 ;
5991 PLFLT arg4 ;
5992
5993 SWIG_check_num_args("pljoin",4,4)
5994 if(!lua_isnumber(L,1)) SWIG_fail_arg("pljoin",1,"PLFLT");
5995 if(!lua_isnumber(L,2)) SWIG_fail_arg("pljoin",2,"PLFLT");
5996 if(!lua_isnumber(L,3)) SWIG_fail_arg("pljoin",3,"PLFLT");
5997 if(!lua_isnumber(L,4)) SWIG_fail_arg("pljoin",4,"PLFLT");
5998 arg1 = (PLFLT)lua_tonumber(L, 1);
5999 arg2 = (PLFLT)lua_tonumber(L, 2);
6000 arg3 = (PLFLT)lua_tonumber(L, 3);
6001 arg4 = (PLFLT)lua_tonumber(L, 4);
6002 pljoin(arg1,arg2,arg3,arg4);
6003
6004 return SWIG_arg;
6005
6006 fail: SWIGUNUSED;
6007 lua_error(L);
6008 return 0;
6009}
6010
6011
6012static int _wrap_lab(lua_State* L) {
6013 int SWIG_arg = 0;
6014 char *arg1 = (char *) 0 ;
6015 char *arg2 = (char *) 0 ;
6016 char *arg3 = (char *) 0 ;
6017
6018 SWIG_check_num_args("pllab",3,3)
6019 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("pllab",1,"char const *");
6020 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("pllab",2,"char const *");
6021 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("pllab",3,"char const *");
6022 arg1 = (char *)lua_tostring(L, 1);
6023 arg2 = (char *)lua_tostring(L, 2);
6024 arg3 = (char *)lua_tostring(L, 3);
6025 pllab((char const *)arg1,(char const *)arg2,(char const *)arg3);
6026
6027 return SWIG_arg;
6028
6029 fail: SWIGUNUSED;
6030 lua_error(L);
6031 return 0;
6032}
6033
6034
6035static int _wrap_legend(lua_State* L) {
6036 int SWIG_arg = 0;
6037 PLFLT *arg1 = (PLFLT *) 0 ;
6038 PLFLT *arg2 = (PLFLT *) 0 ;
6039 PLINT arg3 ;
6040 PLINT arg4 ;
6041 PLFLT arg5 ;
6042 PLFLT arg6 ;
6043 PLFLT arg7 ;
6044 PLINT arg8 ;
6045 PLINT arg9 ;
6046 PLINT arg10 ;
6047 PLINT arg11 ;
6048 PLINT arg12 ;
6049 PLINT arg13 ;
6050 PLINT *arg14 = (PLINT *) 0 ;
6051 PLFLT arg15 ;
6052 PLFLT arg16 ;
6053 PLFLT arg17 ;
6054 PLFLT arg18 ;
6055 PLINT *arg19 = (PLINT *) 0 ;
6056 char **arg20 = (char **) 0 ;
6057 PLINT *arg21 = (PLINT *) 0 ;
6058 PLINT *arg22 = (PLINT *) 0 ;
6059 PLFLT *arg23 = (PLFLT *) 0 ;
6060 PLFLT *arg24 = (PLFLT *) 0 ;
6061 PLINT *arg25 = (PLINT *) 0 ;
6062 PLINT *arg26 = (PLINT *) 0 ;
6063 PLFLT *arg27 = (PLFLT *) 0 ;
6064 PLINT *arg28 = (PLINT *) 0 ;
6065 PLFLT *arg29 = (PLFLT *) 0 ;
6066 PLINT *arg30 = (PLINT *) 0 ;
6067 char **arg31 = (char **) 0 ;
6068 PLFLT temp1 ;
6069 PLFLT temp2 ;
6070 int temp19 ;
6071 int temp21 ;
6072 int temp22 ;
6073 int temp23 ;
6074 int temp24 ;
6075 int temp25 ;
6076 int temp26 ;
6077 int temp27 ;
6078 int temp28 ;
6079 int temp29 ;
6080 int temp30 ;
6081
6082 {
6083 arg21 = NULL;
6084 }
6085 {
6086 arg22 = NULL;
6087 }
6088 {
6089 arg23 = NULL;
6090 }
6091 {
6092 arg24 = NULL;
6093 }
6094 {
6095 arg25 = NULL;
6096 }
6097 {
6098 arg26 = NULL;
6099 }
6100 {
6101 arg27 = NULL;
6102 }
6103 {
6104 arg28 = NULL;
6105 }
6106 {
6107 arg29 = NULL;
6108 }
6109 {
6110 arg30 = NULL;
6111 }
6112 arg1 = &temp1;
6113 arg2 = &temp2;
6114 SWIG_check_num_args("pllegend",17,28)
6115 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllegend",1,"PLINT");
6116 if(!lua_isnumber(L,2)) SWIG_fail_arg("pllegend",2,"PLINT");
6117 if(!lua_isnumber(L,3)) SWIG_fail_arg("pllegend",3,"PLFLT");
6118 if(!lua_isnumber(L,4)) SWIG_fail_arg("pllegend",4,"PLFLT");
6119 if(!lua_isnumber(L,5)) SWIG_fail_arg("pllegend",5,"PLFLT");
6120 if(!lua_isnumber(L,6)) SWIG_fail_arg("pllegend",6,"PLINT");
6121 if(!lua_isnumber(L,7)) SWIG_fail_arg("pllegend",7,"PLINT");
6122 if(!lua_isnumber(L,8)) SWIG_fail_arg("pllegend",8,"PLINT");
6123 if(!lua_isnumber(L,9)) SWIG_fail_arg("pllegend",9,"PLINT");
6124 if(!lua_isnumber(L,10)) SWIG_fail_arg("pllegend",10,"PLINT");
6125 if(!lua_isnumber(L,12)) SWIG_fail_arg("pllegend",12,"PLFLT");
6126 if(!lua_isnumber(L,13)) SWIG_fail_arg("pllegend",13,"PLFLT");
6127 if(!lua_isnumber(L,14)) SWIG_fail_arg("pllegend",14,"PLFLT");
6128 if(!lua_isnumber(L,15)) SWIG_fail_arg("pllegend",15,"PLFLT");
6129 if(!lua_istable(L,17)) SWIG_fail_arg("pllegend",17,"char const **");
6130 if(lua_gettop(L)>=28 && !lua_istable(L,28)) SWIG_fail_arg("pllegend",28,"char const **");
6131 arg3 = (PLINT)lua_tonumber(L, 1);
6132 arg4 = (PLINT)lua_tonumber(L, 2);
6133 arg5 = (PLFLT)lua_tonumber(L, 3);
6134 arg6 = (PLFLT)lua_tonumber(L, 4);
6135 arg7 = (PLFLT)lua_tonumber(L, 5);
6136 arg8 = (PLINT)lua_tonumber(L, 6);
6137 arg9 = (PLINT)lua_tonumber(L, 7);
6138 arg10 = (PLINT)lua_tonumber(L, 8);
6139 arg11 = (PLINT)lua_tonumber(L, 9);
6140 arg12 = (PLINT)lua_tonumber(L, 10);
6141 {
6142 arg14 = (PLINT *) LUA_get_int_num_array_var( L, 11, &arg13 );
6143 if ( !arg14 )
6144 SWIG_fail;
6145 Alen = arg13;
6146 }
6147 arg15 = (PLFLT)lua_tonumber(L, 12);
6148 arg16 = (PLFLT)lua_tonumber(L, 13);
6149 arg17 = (PLFLT)lua_tonumber(L, 14);
6150 arg18 = (PLFLT)lua_tonumber(L, 15);
6151 {
6152 arg19 = (PLINT *) LUA_get_int_num_array_var( L, 16, &temp19 );
6153 if ( !arg19 )
6154 SWIG_fail;
6155 if ( temp19 != Alen )
6156 {
6157 lua_pushfstring( L, "Tables must be of same length." );
6158 SWIG_fail;
6159 }
6160 }
6161 {
6162 int i;
6163 arg20 = NULL;
6164
6165 if ( SWIG_table_size( L, 17 ) != Alen )
6166 {
6167 lua_pushfstring( L, "Tables must be of same length." );
6168 SWIG_fail;
6169 }
6170 arg20 = malloc( sizeof ( char* ) * Alen );
6171 for ( i = 1; i <= Alen; i++ )
6172 {
6173 lua_rawgeti( L, 17, i );
6174 if ( lua_isstring( L, -1 ) )
6175 {
6176 arg20[i - 1] = (char *) lua_tostring( L, -1 );
6177 }
6178 else
6179 {
6180 lua_pop( L, 1 );
6181 lua_pushfstring( L, "Requires a sequence of strings." );
6182 SWIG_fail;
6183 // arg20 array is freed after 'fail:'
6184 }
6185 lua_pop( L, 1 );
6186 }
6187 }
6188 if(lua_gettop(L)>=18){
6189 {
6190 if ( lua_isnil( L, 18 ) )
6191 {
6192 arg21 = NULL;
6193 }
6194 else
6195 {
6196 arg21 = (PLINT *) LUA_get_int_num_array_var( L, 18, &temp21 );
6197 if ( !arg21 )
6198 SWIG_fail;
6199 if ( temp21 != Alen )
6200 {
6201 lua_pushfstring( L, "Tables must be of same length." );
6202 SWIG_fail;
6203 }
6204 }
6205 }
6206 }
6207 if(lua_gettop(L)>=19){
6208 {
6209 if ( lua_isnil( L, 19 ) )
6210 {
6211 arg22 = NULL;
6212 }
6213 else
6214 {
6215 arg22 = (PLINT *) LUA_get_int_num_array_var( L, 19, &temp22 );
6216 if ( !arg22 )
6217 SWIG_fail;
6218 if ( temp22 != Alen )
6219 {
6220 lua_pushfstring( L, "Tables must be of same length." );
6221 SWIG_fail;
6222 }
6223 }
6224 }
6225 }
6226 if(lua_gettop(L)>=20){
6227 {
6228 if ( lua_isnil( L, 20 ) )
6229 {
6230 arg23 = NULL;
6231 }
6232 else
6233 {
6234 arg23 = (PLFLT *) LUA_get_double_num_array_var( L, 20, &temp23 );
6235 if ( !arg23 )
6236 SWIG_fail;
6237 if ( temp23 != Alen )
6238 {
6239 lua_pushfstring( L, "Tables must be of same length." );
6240 SWIG_fail;
6241 }
6242 }
6243 }
6244 }
6245 if(lua_gettop(L)>=21){
6246 {
6247 if ( lua_isnil( L, 21 ) )
6248 {
6249 arg24 = NULL;
6250 }
6251 else
6252 {
6253 arg24 = (PLFLT *) LUA_get_double_num_array_var( L, 21, &temp24 );
6254 if ( !arg24 )
6255 SWIG_fail;
6256 if ( temp24 != Alen )
6257 {
6258 lua_pushfstring( L, "Tables must be of same length." );
6259 SWIG_fail;
6260 }
6261 }
6262 }
6263 }
6264 if(lua_gettop(L)>=22){
6265 {
6266 if ( lua_isnil( L, 22 ) )
6267 {
6268 arg25 = NULL;
6269 }
6270 else
6271 {
6272 arg25 = (PLINT *) LUA_get_int_num_array_var( L, 22, &temp25 );
6273 if ( !arg25 )
6274 SWIG_fail;
6275 if ( temp25 != Alen )
6276 {
6277 lua_pushfstring( L, "Tables must be of same length." );
6278 SWIG_fail;
6279 }
6280 }
6281 }
6282 }
6283 if(lua_gettop(L)>=23){
6284 {
6285 if ( lua_isnil( L, 23 ) )
6286 {
6287 arg26 = NULL;
6288 }
6289 else
6290 {
6291 arg26 = (PLINT *) LUA_get_int_num_array_var( L, 23, &temp26 );
6292 if ( !arg26 )
6293 SWIG_fail;
6294 if ( temp26 != Alen )
6295 {
6296 lua_pushfstring( L, "Tables must be of same length." );
6297 SWIG_fail;
6298 }
6299 }
6300 }
6301 }
6302 if(lua_gettop(L)>=24){
6303 {
6304 if ( lua_isnil( L, 24 ) )
6305 {
6306 arg27 = NULL;
6307 }
6308 else
6309 {
6310 arg27 = (PLFLT *) LUA_get_double_num_array_var( L, 24, &temp27 );
6311 if ( !arg27 )
6312 SWIG_fail;
6313 if ( temp27 != Alen )
6314 {
6315 lua_pushfstring( L, "Tables must be of same length." );
6316 SWIG_fail;
6317 }
6318 }
6319 }
6320 }
6321 if(lua_gettop(L)>=25){
6322 {
6323 if ( lua_isnil( L, 25 ) )
6324 {
6325 arg28 = NULL;
6326 }
6327 else
6328 {
6329 arg28 = (PLINT *) LUA_get_int_num_array_var( L, 25, &temp28 );
6330 if ( !arg28 )
6331 SWIG_fail;
6332 if ( temp28 != Alen )
6333 {
6334 lua_pushfstring( L, "Tables must be of same length." );
6335 SWIG_fail;
6336 }
6337 }
6338 }
6339 }
6340 if(lua_gettop(L)>=26){
6341 {
6342 if ( lua_isnil( L, 26 ) )
6343 {
6344 arg29 = NULL;
6345 }
6346 else
6347 {
6348 arg29 = (PLFLT *) LUA_get_double_num_array_var( L, 26, &temp29 );
6349 if ( !arg29 )
6350 SWIG_fail;
6351 if ( temp29 != Alen )
6352 {
6353 lua_pushfstring( L, "Tables must be of same length." );
6354 SWIG_fail;
6355 }
6356 }
6357 }
6358 }
6359 if(lua_gettop(L)>=27){
6360 {
6361 if ( lua_isnil( L, 27 ) )
6362 {
6363 arg30 = NULL;
6364 }
6365 else
6366 {
6367 arg30 = (PLINT *) LUA_get_int_num_array_var( L, 27, &temp30 );
6368 if ( !arg30 )
6369 SWIG_fail;
6370 if ( temp30 != Alen )
6371 {
6372 lua_pushfstring( L, "Tables must be of same length." );
6373 SWIG_fail;
6374 }
6375 }
6376 }
6377 }
6378 if(lua_gettop(L)>=28){
6379 {
6380 int i;
6381 arg31 = NULL;
6382
6383 if ( SWIG_table_size( L, 28 ) != Alen )
6384 {
6385 lua_pushfstring( L, "Tables must be of same length." );
6386 SWIG_fail;
6387 }
6388 arg31 = malloc( sizeof ( char* ) * Alen );
6389 for ( i = 1; i <= Alen; i++ )
6390 {
6391 lua_rawgeti( L, 28, i );
6392 if ( lua_isstring( L, -1 ) )
6393 {
6394 arg31[i - 1] = (char *) lua_tostring( L, -1 );
6395 }
6396 else
6397 {
6398 lua_pop( L, 1 );
6399 lua_pushfstring( L, "Requires a sequence of strings." );
6400 SWIG_fail;
6401 // arg31 array is freed after 'fail:'
6402 }
6403 lua_pop( L, 1 );
6404 }
6405 }
6406 }
6407 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);
6408
6409 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6410 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
6411 {
6412 LUA_FREE_ARRAY( arg14 );
6413 }
6414 {
6415 LUA_FREE_ARRAY( arg19 );
6416 }
6417 {
6418 if ( arg20 )
6419 {
6420 free( arg20 ); arg20 = NULL;
6421 }
6422 }
6423 {
6424 LUA_FREE_ARRAY( arg21 );
6425 }
6426 {
6427 LUA_FREE_ARRAY( arg22 );
6428 }
6429 {
6430 LUA_FREE_ARRAY( arg23 );
6431 }
6432 {
6433 LUA_FREE_ARRAY( arg24 );
6434 }
6435 {
6436 LUA_FREE_ARRAY( arg25 );
6437 }
6438 {
6439 LUA_FREE_ARRAY( arg26 );
6440 }
6441 {
6442 LUA_FREE_ARRAY( arg27 );
6443 }
6444 {
6445 LUA_FREE_ARRAY( arg28 );
6446 }
6447 {
6448 LUA_FREE_ARRAY( arg29 );
6449 }
6450 {
6451 LUA_FREE_ARRAY( arg30 );
6452 }
6453 {
6454 if ( arg31 )
6455 {
6456 free( arg31 ); arg31 = NULL;
6457 }
6458 }
6459 return SWIG_arg;
6460
6461 fail: SWIGUNUSED;
6462 {
6463 LUA_FREE_ARRAY( arg14 );
6464 }
6465 {
6466 LUA_FREE_ARRAY( arg19 );
6467 }
6468 {
6469 if ( arg20 )
6470 {
6471 free( arg20 ); arg20 = NULL;
6472 }
6473 }
6474 {
6475 LUA_FREE_ARRAY( arg21 );
6476 }
6477 {
6478 LUA_FREE_ARRAY( arg22 );
6479 }
6480 {
6481 LUA_FREE_ARRAY( arg23 );
6482 }
6483 {
6484 LUA_FREE_ARRAY( arg24 );
6485 }
6486 {
6487 LUA_FREE_ARRAY( arg25 );
6488 }
6489 {
6490 LUA_FREE_ARRAY( arg26 );
6491 }
6492 {
6493 LUA_FREE_ARRAY( arg27 );
6494 }
6495 {
6496 LUA_FREE_ARRAY( arg28 );
6497 }
6498 {
6499 LUA_FREE_ARRAY( arg29 );
6500 }
6501 {
6502 LUA_FREE_ARRAY( arg30 );
6503 }
6504 {
6505 if ( arg31 )
6506 {
6507 free( arg31 ); arg31 = NULL;
6508 }
6509 }
6510 lua_error(L);
6511 return 0;
6512}
6513
6514
6515static int _wrap_colorbar(lua_State* L) {
6516 int SWIG_arg = 0;
6517 PLFLT *arg1 = (PLFLT *) 0 ;
6518 PLFLT *arg2 = (PLFLT *) 0 ;
6519 PLINT arg3 ;
6520 PLINT arg4 ;
6521 PLFLT arg5 ;
6522 PLFLT arg6 ;
6523 PLFLT arg7 ;
6524 PLFLT arg8 ;
6525 PLINT arg9 ;
6526 PLINT arg10 ;
6527 PLINT arg11 ;
6528 PLFLT arg12 ;
6529 PLFLT arg13 ;
6530 PLINT arg14 ;
6531 PLFLT arg15 ;
6532 PLINT arg16 ;
6533 PLINT *arg17 = (PLINT *) 0 ;
6534 char **arg18 = (char **) 0 ;
6535 PLINT arg19 ;
6536 char **arg20 = (char **) 0 ;
6537 PLFLT *arg21 = (PLFLT *) 0 ;
6538 PLINT *arg22 = (PLINT *) 0 ;
6539 PLINT *arg23 = (PLINT *) 0 ;
6540 PLFLT **arg24 = (PLFLT **) 0 ;
6541 PLFLT temp1 ;
6542 PLFLT temp2 ;
6543 int temp21 ;
6544 int temp22 ;
6545 int temp23 ;
6546 int ii24 ;
6547
6548 arg1 = &temp1;
6549 arg2 = &temp2;
6550 SWIG_check_num_args("plcolorbar",20,20)
6551 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcolorbar",1,"PLINT");
6552 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcolorbar",2,"PLINT");
6553 if(!lua_isnumber(L,3)) SWIG_fail_arg("plcolorbar",3,"PLFLT");
6554 if(!lua_isnumber(L,4)) SWIG_fail_arg("plcolorbar",4,"PLFLT");
6555 if(!lua_isnumber(L,5)) SWIG_fail_arg("plcolorbar",5,"PLFLT");
6556 if(!lua_isnumber(L,6)) SWIG_fail_arg("plcolorbar",6,"PLFLT");
6557 if(!lua_isnumber(L,7)) SWIG_fail_arg("plcolorbar",7,"PLINT");
6558 if(!lua_isnumber(L,8)) SWIG_fail_arg("plcolorbar",8,"PLINT");
6559 if(!lua_isnumber(L,9)) SWIG_fail_arg("plcolorbar",9,"PLINT");
6560 if(!lua_isnumber(L,10)) SWIG_fail_arg("plcolorbar",10,"PLFLT");
6561 if(!lua_isnumber(L,11)) SWIG_fail_arg("plcolorbar",11,"PLFLT");
6562 if(!lua_isnumber(L,12)) SWIG_fail_arg("plcolorbar",12,"PLINT");
6563 if(!lua_isnumber(L,13)) SWIG_fail_arg("plcolorbar",13,"PLFLT");
6564 if(!lua_istable(L,15)) SWIG_fail_arg("plcolorbar",15,"char const **");
6565 arg3 = (PLINT)lua_tonumber(L, 1);
6566 arg4 = (PLINT)lua_tonumber(L, 2);
6567 arg5 = (PLFLT)lua_tonumber(L, 3);
6568 arg6 = (PLFLT)lua_tonumber(L, 4);
6569 arg7 = (PLFLT)lua_tonumber(L, 5);
6570 arg8 = (PLFLT)lua_tonumber(L, 6);
6571 arg9 = (PLINT)lua_tonumber(L, 7);
6572 arg10 = (PLINT)lua_tonumber(L, 8);
6573 arg11 = (PLINT)lua_tonumber(L, 9);
6574 arg12 = (PLFLT)lua_tonumber(L, 10);
6575 arg13 = (PLFLT)lua_tonumber(L, 11);
6576 arg14 = (PLINT)lua_tonumber(L, 12);
6577 arg15 = (PLFLT)lua_tonumber(L, 13);
6578 {
6579 arg17 = (PLINT *) LUA_get_int_num_array_var( L, 14, &arg16 );
6580 if ( !arg17 )
6581 SWIG_fail;
6582 Alen = arg16;
6583 }
6584 {
6585 int i;
6586 arg18 = NULL;
6587
6588 if ( SWIG_table_size( L, 15 ) != Alen )
6589 {
6590 lua_pushfstring( L, "Tables must be of same length." );
6591 SWIG_fail;
6592 }
6593 arg18 = malloc( sizeof ( char* ) * Alen );
6594 for ( i = 1; i <= Alen; i++ )
6595 {
6596 lua_rawgeti( L, 15, i );
6597 if ( lua_isstring( L, -1 ) )
6598 {
6599 arg18[i - 1] = (char *) lua_tostring( L, -1 );
6600 }
6601 else
6602 {
6603 lua_pop( L, 1 );
6604 lua_pushfstring( L, "Requires a sequence of strings." );
6605 SWIG_fail;
6606 // arg18 array is freed after 'fail:'
6607 }
6608 lua_pop( L, 1 );
6609 }
6610 }
6611 {
6612 int i;
6613 arg19 = SWIG_table_size( L, 16 );
6614 Alen = arg19;
6615
6616 arg20 = malloc( sizeof ( char* ) * Alen );
6617 for ( i = 1; i <= Alen; i++ )
6618 {
6619 lua_rawgeti( L, 16, i );
6620 if ( lua_isstring( L, -1 ) )
6621 {
6622 arg20[i - 1] = (char *) lua_tostring( L, -1 );
6623 }
6624 else
6625 {
6626 lua_pop( L, 1 );
6627 lua_pushfstring( L, "Requires a sequence of strings." );
6628 SWIG_fail;
6629 }
6630 lua_pop( L, 1 );
6631 }
6632 }
6633 {
6634 arg21 = (PLFLT *) LUA_get_double_num_array_var( L, 17, &temp21 );
6635 if ( !arg21 )
6636 SWIG_fail;
6637 if ( temp21 != Alen )
6638 {
6639 lua_pushfstring( L, "Tables must be of same length." );
6640 SWIG_fail;
6641 }
6642 }
6643 {
6644 arg22 = (PLINT *) LUA_get_int_num_array_var( L, 18, &temp22 );
6645 if ( !arg22 )
6646 SWIG_fail;
6647 if ( temp22 != Alen )
6648 {
6649 lua_pushfstring( L, "Tables must be of same length." );
6650 SWIG_fail;
6651 }
6652 }
6653 {
6654 int i;
6655
6656 arg23 = (PLINT *) LUA_get_int_num_array_var( L, 19, &temp23 );
6657 if ( !arg23 )
6658 SWIG_fail;
6659 if ( temp23 != Alen )
6660 {
6661 lua_pushfstring( L, "Tables must be of same length." );
6662 SWIG_fail;
6663 }
6664
6665 Xlen = temp23;
6666 Ylen = -1;
6667 for ( i = 0; i < Xlen; i++ )
6668 if ( arg23[i] > Ylen )
6669 Ylen = arg23[i];
6670 }
6671 {
6672 int jj;
6673
6674 arg24 = read_double_Matrix( L, 20, &ii24, &jj );
6675 if ( !arg24 )
6676 SWIG_fail;
6677 if ( ( ii24 != Xlen ) || ( jj != Ylen ) )
6678 {
6679 lua_pushfstring( L, "Vectors must match matrix." );
6680 SWIG_fail;
6681 }
6682 }
6683 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);
6684
6685 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6686 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
6687 {
6688 LUA_FREE_ARRAY( arg17 );
6689 }
6690 {
6691 if ( arg18 )
6692 {
6693 free( arg18 ); arg18 = NULL;
6694 }
6695 }
6696 {
6697 if ( arg20 )
6698 {
6699 free( arg20 ); arg20 = NULL;
6700 }
6701 }
6702 {
6703 LUA_FREE_ARRAY( arg21 );
6704 }
6705 {
6706 LUA_FREE_ARRAY( arg22 );
6707 }
6708 {
6709 LUA_FREE_ARRAY( arg23 );
6710 }
6711 {
6712 int i;
6713
6714 if ( arg24 )
6715 {
6716 for ( i = 0; i < ii24; i++ )
6717 LUA_FREE_ARRAY( arg24[i] );
6718 LUA_FREE_ARRAY( arg24 );
6719 }
6720 }
6721 return SWIG_arg;
6722
6723 fail: SWIGUNUSED;
6724 {
6725 LUA_FREE_ARRAY( arg17 );
6726 }
6727 {
6728 if ( arg18 )
6729 {
6730 free( arg18 ); arg18 = NULL;
6731 }
6732 }
6733 {
6734 if ( arg20 )
6735 {
6736 free( arg20 ); arg20 = NULL;
6737 }
6738 }
6739 {
6740 LUA_FREE_ARRAY( arg21 );
6741 }
6742 {
6743 LUA_FREE_ARRAY( arg22 );
6744 }
6745 {
6746 LUA_FREE_ARRAY( arg23 );
6747 }
6748 {
6749 int i;
6750
6751 if ( arg24 )
6752 {
6753 for ( i = 0; i < ii24; i++ )
6754 LUA_FREE_ARRAY( arg24[i] );
6755 LUA_FREE_ARRAY( arg24 );
6756 }
6757 }
6758 lua_error(L);
6759 return 0;
6760}
6761
6762
6763static int _wrap_lightsource(lua_State* L) {
6764 int SWIG_arg = 0;
6765 PLFLT arg1 ;
6766 PLFLT arg2 ;
6767 PLFLT arg3 ;
6768
6769 SWIG_check_num_args("pllightsource",3,3)
6770 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllightsource",1,"PLFLT");
6771 if(!lua_isnumber(L,2)) SWIG_fail_arg("pllightsource",2,"PLFLT");
6772 if(!lua_isnumber(L,3)) SWIG_fail_arg("pllightsource",3,"PLFLT");
6773 arg1 = (PLFLT)lua_tonumber(L, 1);
6774 arg2 = (PLFLT)lua_tonumber(L, 2);
6775 arg3 = (PLFLT)lua_tonumber(L, 3);
6776 pllightsource(arg1,arg2,arg3);
6777
6778 return SWIG_arg;
6779
6780 fail: SWIGUNUSED;
6781 lua_error(L);
6782 return 0;
6783}
6784
6785
6786static int _wrap_line(lua_State* L) {
6787 int SWIG_arg = 0;
6788 PLINT arg1 ;
6789 PLFLT *arg2 = (PLFLT *) 0 ;
6790 PLFLT *arg3 = (PLFLT *) 0 ;
6791 int temp3 ;
6792
6793 SWIG_check_num_args("plline",2,2)
6794 {
6795 int temp;
6796 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6797 if ( !arg2 )
6798 SWIG_fail;
6799 arg1 = Alen = temp;
6800 }
6801 {
6802 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
6803 if ( !arg3 )
6804 SWIG_fail;
6805 if ( temp3 != Alen )
6806 {
6807 lua_pushfstring( L, "Tables must be of same length." );
6808 SWIG_fail;
6809 }
6810 }
6811 plline(arg1,(double const *)arg2,(double const *)arg3);
6812
6813 {
6814 LUA_FREE_ARRAY( arg2 );
6815 }
6816 {
6817 LUA_FREE_ARRAY( arg3 );
6818 }
6819 return SWIG_arg;
6820
6821 fail: SWIGUNUSED;
6822 {
6823 LUA_FREE_ARRAY( arg2 );
6824 }
6825 {
6826 LUA_FREE_ARRAY( arg3 );
6827 }
6828 lua_error(L);
6829 return 0;
6830}
6831
6832
6833static int _wrap_line3(lua_State* L) {
6834 int SWIG_arg = 0;
6835 PLINT arg1 ;
6836 PLFLT *arg2 = (PLFLT *) 0 ;
6837 PLFLT *arg3 = (PLFLT *) 0 ;
6838 PLFLT *arg4 = (PLFLT *) 0 ;
6839 int temp3 ;
6840 int temp4 ;
6841
6842 SWIG_check_num_args("plline3",3,3)
6843 {
6844 int temp;
6845 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6846 if ( !arg2 )
6847 SWIG_fail;
6848 arg1 = Alen = temp;
6849 }
6850 {
6851 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
6852 if ( !arg3 )
6853 SWIG_fail;
6854 if ( temp3 != Alen )
6855 {
6856 lua_pushfstring( L, "Tables must be of same length." );
6857 SWIG_fail;
6858 }
6859 }
6860 {
6861 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
6862 if ( !arg4 )
6863 SWIG_fail;
6864 if ( temp4 != Alen )
6865 {
6866 lua_pushfstring( L, "Tables must be of same length." );
6867 SWIG_fail;
6868 }
6869 }
6870 plline3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
6871
6872 {
6873 LUA_FREE_ARRAY( arg2 );
6874 }
6875 {
6876 LUA_FREE_ARRAY( arg3 );
6877 }
6878 {
6879 LUA_FREE_ARRAY( arg4 );
6880 }
6881 return SWIG_arg;
6882
6883 fail: SWIGUNUSED;
6884 {
6885 LUA_FREE_ARRAY( arg2 );
6886 }
6887 {
6888 LUA_FREE_ARRAY( arg3 );
6889 }
6890 {
6891 LUA_FREE_ARRAY( arg4 );
6892 }
6893 lua_error(L);
6894 return 0;
6895}
6896
6897
6898static int _wrap_lsty(lua_State* L) {
6899 int SWIG_arg = 0;
6900 PLINT arg1 ;
6901
6902 SWIG_check_num_args("pllsty",1,1)
6903 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllsty",1,"PLINT");
6904 arg1 = (PLINT)lua_tonumber(L, 1);
6905 pllsty(arg1);
6906
6907 return SWIG_arg;
6908
6909 fail: SWIGUNUSED;
6910 lua_error(L);
6911 return 0;
6912}
6913
6914
6915static int _wrap_mesh(lua_State* L) {
6916 int SWIG_arg = 0;
6917 PLFLT *arg1 = (PLFLT *) 0 ;
6918 PLFLT *arg2 = (PLFLT *) 0 ;
6919 PLFLT **arg3 = (PLFLT **) 0 ;
6920 PLINT arg4 ;
6921 PLINT arg5 ;
6922 PLINT arg6 ;
6923 int ii3 ;
6924
6925 SWIG_check_num_args("plmesh",4,4)
6926 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmesh",4,"PLINT");
6927 {
6928 int temp;
6929 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6930 if ( !arg1 )
6931 SWIG_fail;
6932 Xlen = temp;
6933 }
6934 {
6935 int temp;
6936 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6937 if ( !arg2 )
6938 SWIG_fail;
6939 Ylen = temp;
6940 }
6941 {
6942 int jj;
6943
6944 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6945 if ( !arg3 )
6946 SWIG_fail;
6947 arg4 = ii3;
6948 arg5 = jj;
6949 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6950 {
6951 lua_pushfstring( L, "Vectors must match matrix." );
6952 SWIG_fail;
6953 }
6954 }
6955 arg6 = (PLINT)lua_tonumber(L, 4);
6956 plmesh((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6);
6957
6958 {
6959 LUA_FREE_ARRAY( arg1 );
6960 }
6961 {
6962 LUA_FREE_ARRAY( arg2 );
6963 }
6964 {
6965 int i;
6966
6967 if ( arg3 )
6968 {
6969 for ( i = 0; i < ii3; i++ )
6970 LUA_FREE_ARRAY( arg3[i] );
6971 LUA_FREE_ARRAY( arg3 );
6972 }
6973 }
6974 return SWIG_arg;
6975
6976 fail: SWIGUNUSED;
6977 {
6978 LUA_FREE_ARRAY( arg1 );
6979 }
6980 {
6981 LUA_FREE_ARRAY( arg2 );
6982 }
6983 {
6984 int i;
6985
6986 if ( arg3 )
6987 {
6988 for ( i = 0; i < ii3; i++ )
6989 LUA_FREE_ARRAY( arg3[i] );
6990 LUA_FREE_ARRAY( arg3 );
6991 }
6992 }
6993 lua_error(L);
6994 return 0;
6995}
6996
6997
6998static int _wrap_meshc(lua_State* L) {
6999 int SWIG_arg = 0;
7000 PLFLT *arg1 = (PLFLT *) 0 ;
7001 PLFLT *arg2 = (PLFLT *) 0 ;
7002 PLFLT **arg3 = (PLFLT **) 0 ;
7003 PLINT arg4 ;
7004 PLINT arg5 ;
7005 PLINT arg6 ;
7006 PLFLT *arg7 = (PLFLT *) 0 ;
7007 PLINT arg8 ;
7008 int ii3 ;
7009
7010 SWIG_check_num_args("plmeshc",5,5)
7011 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmeshc",4,"PLINT");
7012 {
7013 int temp;
7014 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7015 if ( !arg1 )
7016 SWIG_fail;
7017 Xlen = temp;
7018 }
7019 {
7020 int temp;
7021 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7022 if ( !arg2 )
7023 SWIG_fail;
7024 Ylen = temp;
7025 }
7026 {
7027 int jj;
7028
7029 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7030 if ( !arg3 )
7031 SWIG_fail;
7032 arg4 = ii3;
7033 arg5 = jj;
7034 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7035 {
7036 lua_pushfstring( L, "Vectors must match matrix." );
7037 SWIG_fail;
7038 }
7039 }
7040 arg6 = (PLINT)lua_tonumber(L, 4);
7041 {
7042 int temp;
7043 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7044 if ( !arg7 )
7045 SWIG_fail;
7046 arg8 = Alen = temp;
7047 }
7048 plmeshc((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7049
7050 {
7051 LUA_FREE_ARRAY( arg1 );
7052 }
7053 {
7054 LUA_FREE_ARRAY( arg2 );
7055 }
7056 {
7057 int i;
7058
7059 if ( arg3 )
7060 {
7061 for ( i = 0; i < ii3; i++ )
7062 LUA_FREE_ARRAY( arg3[i] );
7063 LUA_FREE_ARRAY( arg3 );
7064 }
7065 }
7066 {
7067 LUA_FREE_ARRAY( arg7 );
7068 }
7069 return SWIG_arg;
7070
7071 fail: SWIGUNUSED;
7072 {
7073 LUA_FREE_ARRAY( arg1 );
7074 }
7075 {
7076 LUA_FREE_ARRAY( arg2 );
7077 }
7078 {
7079 int i;
7080
7081 if ( arg3 )
7082 {
7083 for ( i = 0; i < ii3; i++ )
7084 LUA_FREE_ARRAY( arg3[i] );
7085 LUA_FREE_ARRAY( arg3 );
7086 }
7087 }
7088 {
7089 LUA_FREE_ARRAY( arg7 );
7090 }
7091 lua_error(L);
7092 return 0;
7093}
7094
7095
7096static int _wrap_mkstrm(lua_State* L) {
7097 int SWIG_arg = 0;
7098 PLINT *arg1 = (PLINT *) 0 ;
7099 PLINT temp1 ;
7100
7101 arg1 = &temp1;
7102 SWIG_check_num_args("plmkstrm",0,0)
7103 plmkstrm(arg1);
7104
7105 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
7106 return SWIG_arg;
7107
7108 fail: SWIGUNUSED;
7109 lua_error(L);
7110 return 0;
7111}
7112
7113
7114static int _wrap_mtex(lua_State* L) {
7115 int SWIG_arg = 0;
7116 char *arg1 = (char *) 0 ;
7117 PLFLT arg2 ;
7118 PLFLT arg3 ;
7119 PLFLT arg4 ;
7120 char *arg5 = (char *) 0 ;
7121
7122 SWIG_check_num_args("plmtex",5,5)
7123 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plmtex",1,"char const *");
7124 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmtex",2,"PLFLT");
7125 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmtex",3,"PLFLT");
7126 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmtex",4,"PLFLT");
7127 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plmtex",5,"char const *");
7128 arg1 = (char *)lua_tostring(L, 1);
7129 arg2 = (PLFLT)lua_tonumber(L, 2);
7130 arg3 = (PLFLT)lua_tonumber(L, 3);
7131 arg4 = (PLFLT)lua_tonumber(L, 4);
7132 arg5 = (char *)lua_tostring(L, 5);
7133 plmtex((char const *)arg1,arg2,arg3,arg4,(char const *)arg5);
7134
7135 return SWIG_arg;
7136
7137 fail: SWIGUNUSED;
7138 lua_error(L);
7139 return 0;
7140}
7141
7142
7143static int _wrap_mtex3(lua_State* L) {
7144 int SWIG_arg = 0;
7145 char *arg1 = (char *) 0 ;
7146 PLFLT arg2 ;
7147 PLFLT arg3 ;
7148 PLFLT arg4 ;
7149 char *arg5 = (char *) 0 ;
7150
7151 SWIG_check_num_args("plmtex3",5,5)
7152 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plmtex3",1,"char const *");
7153 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmtex3",2,"PLFLT");
7154 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmtex3",3,"PLFLT");
7155 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmtex3",4,"PLFLT");
7156 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plmtex3",5,"char const *");
7157 arg1 = (char *)lua_tostring(L, 1);
7158 arg2 = (PLFLT)lua_tonumber(L, 2);
7159 arg3 = (PLFLT)lua_tonumber(L, 3);
7160 arg4 = (PLFLT)lua_tonumber(L, 4);
7161 arg5 = (char *)lua_tostring(L, 5);
7162 plmtex3((char const *)arg1,arg2,arg3,arg4,(char const *)arg5);
7163
7164 return SWIG_arg;
7165
7166 fail: SWIGUNUSED;
7167 lua_error(L);
7168 return 0;
7169}
7170
7171
7172static int _wrap_plot3d(lua_State* L) {
7173 int SWIG_arg = 0;
7174 PLFLT *arg1 = (PLFLT *) 0 ;
7175 PLFLT *arg2 = (PLFLT *) 0 ;
7176 PLFLT **arg3 = (PLFLT **) 0 ;
7177 PLINT arg4 ;
7178 PLINT arg5 ;
7179 PLINT arg6 ;
7180 PLBOOL arg7 ;
7181 int ii3 ;
7182
7183 SWIG_check_num_args("plot3d",5,5)
7184 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3d",4,"PLINT");
7185 if(!lua_isnumber(L,5)) SWIG_fail_arg("plot3d",5,"PLBOOL");
7186 {
7187 int temp;
7188 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7189 if ( !arg1 )
7190 SWIG_fail;
7191 Xlen = temp;
7192 }
7193 {
7194 int temp;
7195 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7196 if ( !arg2 )
7197 SWIG_fail;
7198 Ylen = temp;
7199 }
7200 {
7201 int jj;
7202
7203 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7204 if ( !arg3 )
7205 SWIG_fail;
7206 arg4 = ii3;
7207 arg5 = jj;
7208 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7209 {
7210 lua_pushfstring( L, "Vectors must match matrix." );
7211 SWIG_fail;
7212 }
7213 }
7214 arg6 = (PLINT)lua_tonumber(L, 4);
7215 arg7 = (PLBOOL)lua_tonumber(L, 5);
7216 plot3d((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,arg7);
7217
7218 {
7219 LUA_FREE_ARRAY( arg1 );
7220 }
7221 {
7222 LUA_FREE_ARRAY( arg2 );
7223 }
7224 {
7225 int i;
7226
7227 if ( arg3 )
7228 {
7229 for ( i = 0; i < ii3; i++ )
7230 LUA_FREE_ARRAY( arg3[i] );
7231 LUA_FREE_ARRAY( arg3 );
7232 }
7233 }
7234 return SWIG_arg;
7235
7236 fail: SWIGUNUSED;
7237 {
7238 LUA_FREE_ARRAY( arg1 );
7239 }
7240 {
7241 LUA_FREE_ARRAY( arg2 );
7242 }
7243 {
7244 int i;
7245
7246 if ( arg3 )
7247 {
7248 for ( i = 0; i < ii3; i++ )
7249 LUA_FREE_ARRAY( arg3[i] );
7250 LUA_FREE_ARRAY( arg3 );
7251 }
7252 }
7253 lua_error(L);
7254 return 0;
7255}
7256
7257
7258static int _wrap_plot3dc(lua_State* L) {
7259 int SWIG_arg = 0;
7260 PLFLT *arg1 = (PLFLT *) 0 ;
7261 PLFLT *arg2 = (PLFLT *) 0 ;
7262 PLFLT **arg3 = (PLFLT **) 0 ;
7263 PLINT arg4 ;
7264 PLINT arg5 ;
7265 PLINT arg6 ;
7266 PLFLT *arg7 = (PLFLT *) 0 ;
7267 PLINT arg8 ;
7268 int ii3 ;
7269
7270 SWIG_check_num_args("plot3dc",5,5)
7271 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3dc",4,"PLINT");
7272 {
7273 int temp;
7274 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7275 if ( !arg1 )
7276 SWIG_fail;
7277 Xlen = temp;
7278 }
7279 {
7280 int temp;
7281 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7282 if ( !arg2 )
7283 SWIG_fail;
7284 Ylen = temp;
7285 }
7286 {
7287 int jj;
7288
7289 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7290 if ( !arg3 )
7291 SWIG_fail;
7292 arg4 = ii3;
7293 arg5 = jj;
7294 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7295 {
7296 lua_pushfstring( L, "Vectors must match matrix." );
7297 SWIG_fail;
7298 }
7299 }
7300 arg6 = (PLINT)lua_tonumber(L, 4);
7301 {
7302 int temp;
7303 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7304 if ( !arg7 )
7305 SWIG_fail;
7306 arg8 = Alen = temp;
7307 }
7308 plot3dc((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7309
7310 {
7311 LUA_FREE_ARRAY( arg1 );
7312 }
7313 {
7314 LUA_FREE_ARRAY( arg2 );
7315 }
7316 {
7317 int i;
7318
7319 if ( arg3 )
7320 {
7321 for ( i = 0; i < ii3; i++ )
7322 LUA_FREE_ARRAY( arg3[i] );
7323 LUA_FREE_ARRAY( arg3 );
7324 }
7325 }
7326 {
7327 LUA_FREE_ARRAY( arg7 );
7328 }
7329 return SWIG_arg;
7330
7331 fail: SWIGUNUSED;
7332 {
7333 LUA_FREE_ARRAY( arg1 );
7334 }
7335 {
7336 LUA_FREE_ARRAY( arg2 );
7337 }
7338 {
7339 int i;
7340
7341 if ( arg3 )
7342 {
7343 for ( i = 0; i < ii3; i++ )
7344 LUA_FREE_ARRAY( arg3[i] );
7345 LUA_FREE_ARRAY( arg3 );
7346 }
7347 }
7348 {
7349 LUA_FREE_ARRAY( arg7 );
7350 }
7351 lua_error(L);
7352 return 0;
7353}
7354
7355
7356static int _wrap_plot3dcl(lua_State* L) {
7357 int SWIG_arg = 0;
7358 PLFLT *arg1 = (PLFLT *) 0 ;
7359 PLFLT *arg2 = (PLFLT *) 0 ;
7360 PLFLT **arg3 = (PLFLT **) 0 ;
7361 PLINT arg4 ;
7362 PLINT arg5 ;
7363 PLINT arg6 ;
7364 PLFLT *arg7 = (PLFLT *) 0 ;
7365 PLINT arg8 ;
7366 PLINT arg9 ;
7367 PLINT arg10 ;
7368 PLINT *arg11 = (PLINT *) 0 ;
7369 PLINT *arg12 = (PLINT *) 0 ;
7370 int ii3 ;
7371 int temp12 ;
7372
7373 SWIG_check_num_args("plot3dcl",8,8)
7374 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3dcl",4,"PLINT");
7375 if(!lua_isnumber(L,6)) SWIG_fail_arg("plot3dcl",6,"PLINT");
7376 {
7377 int temp;
7378 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7379 if ( !arg1 )
7380 SWIG_fail;
7381 Xlen = temp;
7382 }
7383 {
7384 int temp;
7385 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7386 if ( !arg2 )
7387 SWIG_fail;
7388 Ylen = temp;
7389 }
7390 {
7391 int jj;
7392
7393 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7394 if ( !arg3 )
7395 SWIG_fail;
7396 arg4 = ii3;
7397 arg5 = jj;
7398 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7399 {
7400 lua_pushfstring( L, "Vectors must match matrix." );
7401 SWIG_fail;
7402 }
7403 }
7404 arg6 = (PLINT)lua_tonumber(L, 4);
7405 {
7406 int temp;
7407 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7408 if ( !arg7 )
7409 SWIG_fail;
7410 arg8 = Alen = temp;
7411 }
7412 arg9 = (PLINT)lua_tonumber(L, 6);
7413 {
7414 arg11 = (PLINT *) LUA_get_int_num_array_var( L, 7, &arg10 );
7415 if ( !arg11 )
7416 SWIG_fail;
7417 Alen = arg10;
7418 }
7419 {
7420 arg12 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp12 );
7421 if ( !arg12 )
7422 SWIG_fail;
7423 if ( temp12 != Alen )
7424 {
7425 lua_pushfstring( L, "Tables must be of same length." );
7426 SWIG_fail;
7427 }
7428 }
7429 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);
7430
7431 {
7432 LUA_FREE_ARRAY( arg1 );
7433 }
7434 {
7435 LUA_FREE_ARRAY( arg2 );
7436 }
7437 {
7438 int i;
7439
7440 if ( arg3 )
7441 {
7442 for ( i = 0; i < ii3; i++ )
7443 LUA_FREE_ARRAY( arg3[i] );
7444 LUA_FREE_ARRAY( arg3 );
7445 }
7446 }
7447 {
7448 LUA_FREE_ARRAY( arg7 );
7449 }
7450 {
7451 LUA_FREE_ARRAY( arg11 );
7452 }
7453 {
7454 LUA_FREE_ARRAY( arg12 );
7455 }
7456 return SWIG_arg;
7457
7458 fail: SWIGUNUSED;
7459 {
7460 LUA_FREE_ARRAY( arg1 );
7461 }
7462 {
7463 LUA_FREE_ARRAY( arg2 );
7464 }
7465 {
7466 int i;
7467
7468 if ( arg3 )
7469 {
7470 for ( i = 0; i < ii3; i++ )
7471 LUA_FREE_ARRAY( arg3[i] );
7472 LUA_FREE_ARRAY( arg3 );
7473 }
7474 }
7475 {
7476 LUA_FREE_ARRAY( arg7 );
7477 }
7478 {
7479 LUA_FREE_ARRAY( arg11 );
7480 }
7481 {
7482 LUA_FREE_ARRAY( arg12 );
7483 }
7484 lua_error(L);
7485 return 0;
7486}
7487
7488
7489static int _wrap_surf3d(lua_State* L) {
7490 int SWIG_arg = 0;
7491 PLFLT *arg1 = (PLFLT *) 0 ;
7492 PLFLT *arg2 = (PLFLT *) 0 ;
7493 PLFLT **arg3 = (PLFLT **) 0 ;
7494 PLINT arg4 ;
7495 PLINT arg5 ;
7496 PLINT arg6 ;
7497 PLFLT *arg7 = (PLFLT *) 0 ;
7498 PLINT arg8 ;
7499 int ii3 ;
7500
7501 SWIG_check_num_args("plsurf3d",5,5)
7502 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsurf3d",4,"PLINT");
7503 {
7504 int temp;
7505 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7506 if ( !arg1 )
7507 SWIG_fail;
7508 Xlen = temp;
7509 }
7510 {
7511 int temp;
7512 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7513 if ( !arg2 )
7514 SWIG_fail;
7515 Ylen = temp;
7516 }
7517 {
7518 int jj;
7519
7520 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7521 if ( !arg3 )
7522 SWIG_fail;
7523 arg4 = ii3;
7524 arg5 = jj;
7525 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7526 {
7527 lua_pushfstring( L, "Vectors must match matrix." );
7528 SWIG_fail;
7529 }
7530 }
7531 arg6 = (PLINT)lua_tonumber(L, 4);
7532 {
7533 int temp;
7534 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7535 if ( !arg7 )
7536 SWIG_fail;
7537 arg8 = Alen = temp;
7538 }
7539 plsurf3d((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7540
7541 {
7542 LUA_FREE_ARRAY( arg1 );
7543 }
7544 {
7545 LUA_FREE_ARRAY( arg2 );
7546 }
7547 {
7548 int i;
7549
7550 if ( arg3 )
7551 {
7552 for ( i = 0; i < ii3; i++ )
7553 LUA_FREE_ARRAY( arg3[i] );
7554 LUA_FREE_ARRAY( arg3 );
7555 }
7556 }
7557 {
7558 LUA_FREE_ARRAY( arg7 );
7559 }
7560 return SWIG_arg;
7561
7562 fail: SWIGUNUSED;
7563 {
7564 LUA_FREE_ARRAY( arg1 );
7565 }
7566 {
7567 LUA_FREE_ARRAY( arg2 );
7568 }
7569 {
7570 int i;
7571
7572 if ( arg3 )
7573 {
7574 for ( i = 0; i < ii3; i++ )
7575 LUA_FREE_ARRAY( arg3[i] );
7576 LUA_FREE_ARRAY( arg3 );
7577 }
7578 }
7579 {
7580 LUA_FREE_ARRAY( arg7 );
7581 }
7582 lua_error(L);
7583 return 0;
7584}
7585
7586
7587static int _wrap_surf3dl(lua_State* L) {
7588 int SWIG_arg = 0;
7589 PLFLT *arg1 = (PLFLT *) 0 ;
7590 PLFLT *arg2 = (PLFLT *) 0 ;
7591 PLFLT **arg3 = (PLFLT **) 0 ;
7592 PLINT arg4 ;
7593 PLINT arg5 ;
7594 PLINT arg6 ;
7595 PLFLT *arg7 = (PLFLT *) 0 ;
7596 PLINT arg8 ;
7597 PLINT arg9 ;
7598 PLINT arg10 ;
7599 PLINT *arg11 = (PLINT *) 0 ;
7600 PLINT *arg12 = (PLINT *) 0 ;
7601 int ii3 ;
7602 int temp12 ;
7603
7604 SWIG_check_num_args("plsurf3dl",8,8)
7605 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsurf3dl",4,"PLINT");
7606 if(!lua_isnumber(L,6)) SWIG_fail_arg("plsurf3dl",6,"PLINT");
7607 {
7608 int temp;
7609 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7610 if ( !arg1 )
7611 SWIG_fail;
7612 Xlen = temp;
7613 }
7614 {
7615 int temp;
7616 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7617 if ( !arg2 )
7618 SWIG_fail;
7619 Ylen = temp;
7620 }
7621 {
7622 int jj;
7623
7624 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7625 if ( !arg3 )
7626 SWIG_fail;
7627 arg4 = ii3;
7628 arg5 = jj;
7629 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7630 {
7631 lua_pushfstring( L, "Vectors must match matrix." );
7632 SWIG_fail;
7633 }
7634 }
7635 arg6 = (PLINT)lua_tonumber(L, 4);
7636 {
7637 int temp;
7638 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7639 if ( !arg7 )
7640 SWIG_fail;
7641 arg8 = Alen = temp;
7642 }
7643 arg9 = (PLINT)lua_tonumber(L, 6);
7644 {
7645 arg11 = (PLINT *) LUA_get_int_num_array_var( L, 7, &arg10 );
7646 if ( !arg11 )
7647 SWIG_fail;
7648 Alen = arg10;
7649 }
7650 {
7651 arg12 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp12 );
7652 if ( !arg12 )
7653 SWIG_fail;
7654 if ( temp12 != Alen )
7655 {
7656 lua_pushfstring( L, "Tables must be of same length." );
7657 SWIG_fail;
7658 }
7659 }
7660 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);
7661
7662 {
7663 LUA_FREE_ARRAY( arg1 );
7664 }
7665 {
7666 LUA_FREE_ARRAY( arg2 );
7667 }
7668 {
7669 int i;
7670
7671 if ( arg3 )
7672 {
7673 for ( i = 0; i < ii3; i++ )
7674 LUA_FREE_ARRAY( arg3[i] );
7675 LUA_FREE_ARRAY( arg3 );
7676 }
7677 }
7678 {
7679 LUA_FREE_ARRAY( arg7 );
7680 }
7681 {
7682 LUA_FREE_ARRAY( arg11 );
7683 }
7684 {
7685 LUA_FREE_ARRAY( arg12 );
7686 }
7687 return SWIG_arg;
7688
7689 fail: SWIGUNUSED;
7690 {
7691 LUA_FREE_ARRAY( arg1 );
7692 }
7693 {
7694 LUA_FREE_ARRAY( arg2 );
7695 }
7696 {
7697 int i;
7698
7699 if ( arg3 )
7700 {
7701 for ( i = 0; i < ii3; i++ )
7702 LUA_FREE_ARRAY( arg3[i] );
7703 LUA_FREE_ARRAY( arg3 );
7704 }
7705 }
7706 {
7707 LUA_FREE_ARRAY( arg7 );
7708 }
7709 {
7710 LUA_FREE_ARRAY( arg11 );
7711 }
7712 {
7713 LUA_FREE_ARRAY( arg12 );
7714 }
7715 lua_error(L);
7716 return 0;
7717}
7718
7719
7720static int _wrap_parseopts(lua_State* L) {
7721 int SWIG_arg = 0;
7722 int *arg1 = (int *) 0 ;
7723 char **arg2 = (char **) 0 ;
7724 PLINT arg3 ;
7725 PLINT result;
7726
7727 SWIG_check_num_args("plparseopts",2,2)
7728 if(!lua_istable(L,1)) SWIG_fail_arg("plparseopts",1,"int *");
7729 if(!lua_isnumber(L,2)) SWIG_fail_arg("plparseopts",2,"PLINT");
7730 {
7731 int i, n;
7732
7733 // from lua 5.1 on there is no element "n" anymore,
7734 // so we need to find out the number of command line
7735 // options manually
7736 for ( i = 1;; i++ )
7737 {
7738 lua_rawgeti( L, 1, i );
7739 if ( lua_isnil( L, -1 ) )
7740 {
7741 // ok, this index doesn't exist anymore, we have i-1
7742 // command line options
7743 lua_pop( L, 1 );
7744 break;
7745 }
7746 }
7747 n = i;
7748 arg1 = &n;
7749
7750 arg2 = LUA_ALLOC_ARRAY( char*, ( n + 1 ) );
7751
7752 for ( i = 0; i < n; i++ )
7753 {
7754 lua_rawgeti( L, 1, i );
7755 if ( lua_isstring( L, -1 ) )
7756 {
7757 arg2[i] = (char *) lua_tostring( L, -1 );
7758 }
7759 else
7760 {
7761 lua_pop( L, 1 );
7762 lua_pushfstring( L, "List items must be strings" );
7763 SWIG_fail;
7764 // arg2 array is freed after 'fail:'
7765 }
7766 lua_pop( L, 1 );
7767 }
7768 arg2[n] = NULL;
7769 }
7770 arg3 = (PLINT)lua_tonumber(L, 2);
7771 result = (PLINT)plparseopts(arg1,arg2,arg3);
7772 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
7773 {
7774 LUA_FREE_ARRAY( arg2 );
7775 }
7776 return SWIG_arg;
7777
7778 fail: SWIGUNUSED;
7779 {
7780 LUA_FREE_ARRAY( arg2 );
7781 }
7782 lua_error(L);
7783 return 0;
7784}
7785
7786
7787static int _wrap_pat(lua_State* L) {
7788 int SWIG_arg = 0;
7789 PLINT arg1 ;
7790 PLINT *arg2 = (PLINT *) 0 ;
7791 PLINT *arg3 = (PLINT *) 0 ;
7792 int temp3 ;
7793
7794 SWIG_check_num_args("plpat",2,2)
7795 {
7796 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 1, &arg1 );
7797 if ( !arg2 )
7798 SWIG_fail;
7799 Alen = arg1;
7800 }
7801 {
7802 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp3 );
7803 if ( !arg3 )
7804 SWIG_fail;
7805 if ( temp3 != Alen )
7806 {
7807 lua_pushfstring( L, "Tables must be of same length." );
7808 SWIG_fail;
7809 }
7810 }
7811 plpat(arg1,(int const *)arg2,(int const *)arg3);
7812
7813 {
7814 LUA_FREE_ARRAY( arg2 );
7815 }
7816 {
7817 LUA_FREE_ARRAY( arg3 );
7818 }
7819 return SWIG_arg;
7820
7821 fail: SWIGUNUSED;
7822 {
7823 LUA_FREE_ARRAY( arg2 );
7824 }
7825 {
7826 LUA_FREE_ARRAY( arg3 );
7827 }
7828 lua_error(L);
7829 return 0;
7830}
7831
7832
7833static int _wrap_path(lua_State* L) {
7834 int SWIG_arg = 0;
7835 PLINT arg1 ;
7836 PLFLT arg2 ;
7837 PLFLT arg3 ;
7838 PLFLT arg4 ;
7839 PLFLT arg5 ;
7840
7841 SWIG_check_num_args("plpath",5,5)
7842 if(!lua_isnumber(L,1)) SWIG_fail_arg("plpath",1,"PLINT");
7843 if(!lua_isnumber(L,2)) SWIG_fail_arg("plpath",2,"PLFLT");
7844 if(!lua_isnumber(L,3)) SWIG_fail_arg("plpath",3,"PLFLT");
7845 if(!lua_isnumber(L,4)) SWIG_fail_arg("plpath",4,"PLFLT");
7846 if(!lua_isnumber(L,5)) SWIG_fail_arg("plpath",5,"PLFLT");
7847 arg1 = (PLINT)lua_tonumber(L, 1);
7848 arg2 = (PLFLT)lua_tonumber(L, 2);
7849 arg3 = (PLFLT)lua_tonumber(L, 3);
7850 arg4 = (PLFLT)lua_tonumber(L, 4);
7851 arg5 = (PLFLT)lua_tonumber(L, 5);
7852 plpath(arg1,arg2,arg3,arg4,arg5);
7853
7854 return SWIG_arg;
7855
7856 fail: SWIGUNUSED;
7857 lua_error(L);
7858 return 0;
7859}
7860
7861
7862static int _wrap_poin(lua_State* L) {
7863 int SWIG_arg = 0;
7864 PLINT arg1 ;
7865 PLFLT *arg2 = (PLFLT *) 0 ;
7866 PLFLT *arg3 = (PLFLT *) 0 ;
7867 PLINT arg4 ;
7868 int temp3 ;
7869
7870 SWIG_check_num_args("plpoin",3,3)
7871 if(!lua_isnumber(L,3)) SWIG_fail_arg("plpoin",3,"PLINT");
7872 {
7873 int temp;
7874 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7875 if ( !arg2 )
7876 SWIG_fail;
7877 arg1 = Alen = temp;
7878 }
7879 {
7880 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
7881 if ( !arg3 )
7882 SWIG_fail;
7883 if ( temp3 != Alen )
7884 {
7885 lua_pushfstring( L, "Tables must be of same length." );
7886 SWIG_fail;
7887 }
7888 }
7889 arg4 = (PLINT)lua_tonumber(L, 3);
7890 plpoin(arg1,(double const *)arg2,(double const *)arg3,arg4);
7891
7892 {
7893 LUA_FREE_ARRAY( arg2 );
7894 }
7895 {
7896 LUA_FREE_ARRAY( arg3 );
7897 }
7898 return SWIG_arg;
7899
7900 fail: SWIGUNUSED;
7901 {
7902 LUA_FREE_ARRAY( arg2 );
7903 }
7904 {
7905 LUA_FREE_ARRAY( arg3 );
7906 }
7907 lua_error(L);
7908 return 0;
7909}
7910
7911
7912static int _wrap_poin3(lua_State* L) {
7913 int SWIG_arg = 0;
7914 PLINT arg1 ;
7915 PLFLT *arg2 = (PLFLT *) 0 ;
7916 PLFLT *arg3 = (PLFLT *) 0 ;
7917 PLFLT *arg4 = (PLFLT *) 0 ;
7918 PLINT arg5 ;
7919 int temp3 ;
7920 int temp4 ;
7921
7922 SWIG_check_num_args("plpoin3",4,4)
7923 if(!lua_isnumber(L,4)) SWIG_fail_arg("plpoin3",4,"PLINT");
7924 {
7925 int temp;
7926 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7927 if ( !arg2 )
7928 SWIG_fail;
7929 arg1 = Alen = temp;
7930 }
7931 {
7932 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
7933 if ( !arg3 )
7934 SWIG_fail;
7935 if ( temp3 != Alen )
7936 {
7937 lua_pushfstring( L, "Tables must be of same length." );
7938 SWIG_fail;
7939 }
7940 }
7941 {
7942 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
7943 if ( !arg4 )
7944 SWIG_fail;
7945 if ( temp4 != Alen )
7946 {
7947 lua_pushfstring( L, "Tables must be of same length." );
7948 SWIG_fail;
7949 }
7950 }
7951 arg5 = (PLINT)lua_tonumber(L, 4);
7952 plpoin3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,arg5);
7953
7954 {
7955 LUA_FREE_ARRAY( arg2 );
7956 }
7957 {
7958 LUA_FREE_ARRAY( arg3 );
7959 }
7960 {
7961 LUA_FREE_ARRAY( arg4 );
7962 }
7963 return SWIG_arg;
7964
7965 fail: SWIGUNUSED;
7966 {
7967 LUA_FREE_ARRAY( arg2 );
7968 }
7969 {
7970 LUA_FREE_ARRAY( arg3 );
7971 }
7972 {
7973 LUA_FREE_ARRAY( arg4 );
7974 }
7975 lua_error(L);
7976 return 0;
7977}
7978
7979
7980static int _wrap_poly3(lua_State* L) {
7981 int SWIG_arg = 0;
7982 PLINT arg1 ;
7983 PLFLT *arg2 = (PLFLT *) 0 ;
7984 PLFLT *arg3 = (PLFLT *) 0 ;
7985 PLFLT *arg4 = (PLFLT *) 0 ;
7986 PLBOOL *arg5 = (PLBOOL *) 0 ;
7987 PLBOOL arg6 ;
7988 int temp3 ;
7989 int temp4 ;
7990 int temp5 ;
7991
7992 SWIG_check_num_args("plpoly3",5,5)
7993 if(!lua_isnumber(L,5)) SWIG_fail_arg("plpoly3",5,"PLBOOL");
7994 {
7995 int temp;
7996 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7997 if ( !arg2 )
7998 SWIG_fail;
7999 arg1 = Alen = temp;
8000 }
8001 {
8002 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
8003 if ( !arg3 )
8004 SWIG_fail;
8005 if ( temp3 != Alen )
8006 {
8007 lua_pushfstring( L, "Tables must be of same length." );
8008 SWIG_fail;
8009 }
8010 }
8011 {
8012 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8013 if ( !arg4 )
8014 SWIG_fail;
8015 if ( temp4 != Alen )
8016 {
8017 lua_pushfstring( L, "Tables must be of same length." );
8018 SWIG_fail;
8019 }
8020 }
8021 {
8022 arg5 = (PLINT *) LUA_get_int_num_array_var( L, 4, &temp5 );
8023 if ( !arg5 )
8024 SWIG_fail;
8025 if ( temp5 < Alen - 1 )
8026 {
8027 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8028 SWIG_fail;
8029 }
8030 }
8031 arg6 = (PLBOOL)lua_tonumber(L, 5);
8032 plpoly3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,(int const *)arg5,arg6);
8033
8034 {
8035 LUA_FREE_ARRAY( arg2 );
8036 }
8037 {
8038 LUA_FREE_ARRAY( arg3 );
8039 }
8040 {
8041 LUA_FREE_ARRAY( arg4 );
8042 }
8043 {
8044 LUA_FREE_ARRAY( arg5 );
8045 }
8046 return SWIG_arg;
8047
8048 fail: SWIGUNUSED;
8049 {
8050 LUA_FREE_ARRAY( arg2 );
8051 }
8052 {
8053 LUA_FREE_ARRAY( arg3 );
8054 }
8055 {
8056 LUA_FREE_ARRAY( arg4 );
8057 }
8058 {
8059 LUA_FREE_ARRAY( arg5 );
8060 }
8061 lua_error(L);
8062 return 0;
8063}
8064
8065
8066static int _wrap_prec(lua_State* L) {
8067 int SWIG_arg = 0;
8068 PLINT arg1 ;
8069 PLINT arg2 ;
8070
8071 SWIG_check_num_args("plprec",2,2)
8072 if(!lua_isnumber(L,1)) SWIG_fail_arg("plprec",1,"PLINT");
8073 if(!lua_isnumber(L,2)) SWIG_fail_arg("plprec",2,"PLINT");
8074 arg1 = (PLINT)lua_tonumber(L, 1);
8075 arg2 = (PLINT)lua_tonumber(L, 2);
8076 plprec(arg1,arg2);
8077
8078 return SWIG_arg;
8079
8080 fail: SWIGUNUSED;
8081 lua_error(L);
8082 return 0;
8083}
8084
8085
8086static int _wrap_psty(lua_State* L) {
8087 int SWIG_arg = 0;
8088 PLINT arg1 ;
8089
8090 SWIG_check_num_args("plpsty",1,1)
8091 if(!lua_isnumber(L,1)) SWIG_fail_arg("plpsty",1,"PLINT");
8092 arg1 = (PLINT)lua_tonumber(L, 1);
8093 plpsty(arg1);
8094
8095 return SWIG_arg;
8096
8097 fail: SWIGUNUSED;
8098 lua_error(L);
8099 return 0;
8100}
8101
8102
8103static int _wrap_ptex(lua_State* L) {
8104 int SWIG_arg = 0;
8105 PLFLT arg1 ;
8106 PLFLT arg2 ;
8107 PLFLT arg3 ;
8108 PLFLT arg4 ;
8109 PLFLT arg5 ;
8110 char *arg6 = (char *) 0 ;
8111
8112 SWIG_check_num_args("plptex",6,6)
8113 if(!lua_isnumber(L,1)) SWIG_fail_arg("plptex",1,"PLFLT");
8114 if(!lua_isnumber(L,2)) SWIG_fail_arg("plptex",2,"PLFLT");
8115 if(!lua_isnumber(L,3)) SWIG_fail_arg("plptex",3,"PLFLT");
8116 if(!lua_isnumber(L,4)) SWIG_fail_arg("plptex",4,"PLFLT");
8117 if(!lua_isnumber(L,5)) SWIG_fail_arg("plptex",5,"PLFLT");
8118 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plptex",6,"char const *");
8119 arg1 = (PLFLT)lua_tonumber(L, 1);
8120 arg2 = (PLFLT)lua_tonumber(L, 2);
8121 arg3 = (PLFLT)lua_tonumber(L, 3);
8122 arg4 = (PLFLT)lua_tonumber(L, 4);
8123 arg5 = (PLFLT)lua_tonumber(L, 5);
8124 arg6 = (char *)lua_tostring(L, 6);
8125 plptex(arg1,arg2,arg3,arg4,arg5,(char const *)arg6);
8126
8127 return SWIG_arg;
8128
8129 fail: SWIGUNUSED;
8130 lua_error(L);
8131 return 0;
8132}
8133
8134
8135static int _wrap_ptex3(lua_State* L) {
8136 int SWIG_arg = 0;
8137 PLFLT arg1 ;
8138 PLFLT arg2 ;
8139 PLFLT arg3 ;
8140 PLFLT arg4 ;
8141 PLFLT arg5 ;
8142 PLFLT arg6 ;
8143 PLFLT arg7 ;
8144 PLFLT arg8 ;
8145 PLFLT arg9 ;
8146 PLFLT arg10 ;
8147 char *arg11 = (char *) 0 ;
8148
8149 SWIG_check_num_args("plptex3",11,11)
8150 if(!lua_isnumber(L,1)) SWIG_fail_arg("plptex3",1,"PLFLT");
8151 if(!lua_isnumber(L,2)) SWIG_fail_arg("plptex3",2,"PLFLT");
8152 if(!lua_isnumber(L,3)) SWIG_fail_arg("plptex3",3,"PLFLT");
8153 if(!lua_isnumber(L,4)) SWIG_fail_arg("plptex3",4,"PLFLT");
8154 if(!lua_isnumber(L,5)) SWIG_fail_arg("plptex3",5,"PLFLT");
8155 if(!lua_isnumber(L,6)) SWIG_fail_arg("plptex3",6,"PLFLT");
8156 if(!lua_isnumber(L,7)) SWIG_fail_arg("plptex3",7,"PLFLT");
8157 if(!lua_isnumber(L,8)) SWIG_fail_arg("plptex3",8,"PLFLT");
8158 if(!lua_isnumber(L,9)) SWIG_fail_arg("plptex3",9,"PLFLT");
8159 if(!lua_isnumber(L,10)) SWIG_fail_arg("plptex3",10,"PLFLT");
8160 if(!SWIG_lua_isnilstring(L,11)) SWIG_fail_arg("plptex3",11,"char const *");
8161 arg1 = (PLFLT)lua_tonumber(L, 1);
8162 arg2 = (PLFLT)lua_tonumber(L, 2);
8163 arg3 = (PLFLT)lua_tonumber(L, 3);
8164 arg4 = (PLFLT)lua_tonumber(L, 4);
8165 arg5 = (PLFLT)lua_tonumber(L, 5);
8166 arg6 = (PLFLT)lua_tonumber(L, 6);
8167 arg7 = (PLFLT)lua_tonumber(L, 7);
8168 arg8 = (PLFLT)lua_tonumber(L, 8);
8169 arg9 = (PLFLT)lua_tonumber(L, 9);
8170 arg10 = (PLFLT)lua_tonumber(L, 10);
8171 arg11 = (char *)lua_tostring(L, 11);
8172 plptex3(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,(char const *)arg11);
8173
8174 return SWIG_arg;
8175
8176 fail: SWIGUNUSED;
8177 lua_error(L);
8178 return 0;
8179}
8180
8181
8182static int _wrap_randd(lua_State* L) {
8183 int SWIG_arg = 0;
8184 PLFLT result;
8185
8186 SWIG_check_num_args("plrandd",0,0)
8187 result = (PLFLT)plrandd();
8188 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
8189 return SWIG_arg;
8190
8191 fail: SWIGUNUSED;
8192 lua_error(L);
8193 return 0;
8194}
8195
8196
8197static int _wrap_replot(lua_State* L) {
8198 int SWIG_arg = 0;
8199
8200 SWIG_check_num_args("plreplot",0,0)
8201 plreplot();
8202
8203 return SWIG_arg;
8204
8205 fail: SWIGUNUSED;
8206 lua_error(L);
8207 return 0;
8208}
8209
8210
8211static int _wrap_rgbhls(lua_State* L) {
8212 int SWIG_arg = 0;
8213 PLFLT arg1 ;
8214 PLFLT arg2 ;
8215 PLFLT arg3 ;
8216 PLFLT *arg4 = (PLFLT *) 0 ;
8217 PLFLT *arg5 = (PLFLT *) 0 ;
8218 PLFLT *arg6 = (PLFLT *) 0 ;
8219 PLFLT temp4 ;
8220 PLFLT temp5 ;
8221 PLFLT temp6 ;
8222
8223 arg4 = &temp4;
8224 arg5 = &temp5;
8225 arg6 = &temp6;
8226 SWIG_check_num_args("plrgbhls",3,3)
8227 if(!lua_isnumber(L,1)) SWIG_fail_arg("plrgbhls",1,"PLFLT");
8228 if(!lua_isnumber(L,2)) SWIG_fail_arg("plrgbhls",2,"PLFLT");
8229 if(!lua_isnumber(L,3)) SWIG_fail_arg("plrgbhls",3,"PLFLT");
8230 arg1 = (PLFLT)lua_tonumber(L, 1);
8231 arg2 = (PLFLT)lua_tonumber(L, 2);
8232 arg3 = (PLFLT)lua_tonumber(L, 3);
8233 plrgbhls(arg1,arg2,arg3,arg4,arg5,arg6);
8234
8235 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
8236 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
8237 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
8238 return SWIG_arg;
8239
8240 fail: SWIGUNUSED;
8241 lua_error(L);
8242 return 0;
8243}
8244
8245
8246static int _wrap_schr(lua_State* L) {
8247 int SWIG_arg = 0;
8248 PLFLT arg1 ;
8249 PLFLT arg2 ;
8250
8251 SWIG_check_num_args("plschr",2,2)
8252 if(!lua_isnumber(L,1)) SWIG_fail_arg("plschr",1,"PLFLT");
8253 if(!lua_isnumber(L,2)) SWIG_fail_arg("plschr",2,"PLFLT");
8254 arg1 = (PLFLT)lua_tonumber(L, 1);
8255 arg2 = (PLFLT)lua_tonumber(L, 2);
8256 plschr(arg1,arg2);
8257
8258 return SWIG_arg;
8259
8260 fail: SWIGUNUSED;
8261 lua_error(L);
8262 return 0;
8263}
8264
8265
8266static int _wrap_scmap0(lua_State* L) {
8267 int SWIG_arg = 0;
8268 PLINT *arg1 = (PLINT *) 0 ;
8269 PLINT *arg2 = (PLINT *) 0 ;
8270 PLINT *arg3 = (PLINT *) 0 ;
8271 PLINT arg4 ;
8272 int temp1 ;
8273 int temp2 ;
8274 int temp3 ;
8275
8276 SWIG_check_num_args("plscmap0",3,3)
8277 {
8278 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8279 if ( !arg1 )
8280 SWIG_fail;
8281 Alen = temp1;
8282 }
8283 {
8284 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8285 if ( !arg2 )
8286 SWIG_fail;
8287 if ( temp2 != Alen )
8288 {
8289 lua_pushfstring( L, "Tables must be of same length." );
8290 SWIG_fail;
8291 }
8292 }
8293 {
8294 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8295 if ( !arg3 )
8296 SWIG_fail;
8297 if ( temp3 != Alen )
8298 {
8299 lua_pushfstring( L, "Tables must be of same length." );
8300 SWIG_fail;
8301 }
8302 arg4 = temp3;
8303 }
8304 plscmap0((int const *)arg1,(int const *)arg2,(int const *)arg3,arg4);
8305
8306 {
8307 LUA_FREE_ARRAY( arg1 );
8308 }
8309 {
8310 LUA_FREE_ARRAY( arg2 );
8311 }
8312 {
8313 LUA_FREE_ARRAY( arg3 );
8314 }
8315 return SWIG_arg;
8316
8317 fail: SWIGUNUSED;
8318 {
8319 LUA_FREE_ARRAY( arg1 );
8320 }
8321 {
8322 LUA_FREE_ARRAY( arg2 );
8323 }
8324 {
8325 LUA_FREE_ARRAY( arg3 );
8326 }
8327 lua_error(L);
8328 return 0;
8329}
8330
8331
8332static int _wrap_scmap0a(lua_State* L) {
8333 int SWIG_arg = 0;
8334 PLINT *arg1 = (PLINT *) 0 ;
8335 PLINT *arg2 = (PLINT *) 0 ;
8336 PLINT *arg3 = (PLINT *) 0 ;
8337 PLFLT *arg4 = (PLFLT *) 0 ;
8338 PLINT arg5 ;
8339 int temp1 ;
8340 int temp2 ;
8341 int temp3 ;
8342
8343 SWIG_check_num_args("plscmap0a",4,4)
8344 {
8345 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8346 if ( !arg1 )
8347 SWIG_fail;
8348 Alen = temp1;
8349 }
8350 {
8351 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8352 if ( !arg2 )
8353 SWIG_fail;
8354 if ( temp2 != Alen )
8355 {
8356 lua_pushfstring( L, "Tables must be of same length." );
8357 SWIG_fail;
8358 }
8359 }
8360 {
8361 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8362 if ( !arg3 )
8363 SWIG_fail;
8364 if ( temp3 != Alen )
8365 {
8366 lua_pushfstring( L, "Tables must be of same length." );
8367 SWIG_fail;
8368 }
8369 }
8370 {
8371 int temp;
8372 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
8373 if ( !arg4 )
8374 SWIG_fail;
8375 if ( temp != Alen )
8376 {
8377 lua_pushfstring( L, "Tables must be of same length." );
8378 SWIG_fail;
8379 }
8380 arg5 = temp;
8381 }
8382 plscmap0a((int const *)arg1,(int const *)arg2,(int const *)arg3,(double const *)arg4,arg5);
8383
8384 {
8385 LUA_FREE_ARRAY( arg1 );
8386 }
8387 {
8388 LUA_FREE_ARRAY( arg2 );
8389 }
8390 {
8391 LUA_FREE_ARRAY( arg3 );
8392 }
8393 {
8394 LUA_FREE_ARRAY( arg4 );
8395 }
8396 return SWIG_arg;
8397
8398 fail: SWIGUNUSED;
8399 {
8400 LUA_FREE_ARRAY( arg1 );
8401 }
8402 {
8403 LUA_FREE_ARRAY( arg2 );
8404 }
8405 {
8406 LUA_FREE_ARRAY( arg3 );
8407 }
8408 {
8409 LUA_FREE_ARRAY( arg4 );
8410 }
8411 lua_error(L);
8412 return 0;
8413}
8414
8415
8416static int _wrap_scmap0n(lua_State* L) {
8417 int SWIG_arg = 0;
8418 PLINT arg1 ;
8419
8420 SWIG_check_num_args("plscmap0n",1,1)
8421 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap0n",1,"PLINT");
8422 arg1 = (PLINT)lua_tonumber(L, 1);
8423 plscmap0n(arg1);
8424
8425 return SWIG_arg;
8426
8427 fail: SWIGUNUSED;
8428 lua_error(L);
8429 return 0;
8430}
8431
8432
8433static int _wrap_scmap1(lua_State* L) {
8434 int SWIG_arg = 0;
8435 PLINT *arg1 = (PLINT *) 0 ;
8436 PLINT *arg2 = (PLINT *) 0 ;
8437 PLINT *arg3 = (PLINT *) 0 ;
8438 PLINT arg4 ;
8439 int temp1 ;
8440 int temp2 ;
8441 int temp3 ;
8442
8443 SWIG_check_num_args("plscmap1",3,3)
8444 {
8445 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8446 if ( !arg1 )
8447 SWIG_fail;
8448 Alen = temp1;
8449 }
8450 {
8451 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8452 if ( !arg2 )
8453 SWIG_fail;
8454 if ( temp2 != Alen )
8455 {
8456 lua_pushfstring( L, "Tables must be of same length." );
8457 SWIG_fail;
8458 }
8459 }
8460 {
8461 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8462 if ( !arg3 )
8463 SWIG_fail;
8464 if ( temp3 != Alen )
8465 {
8466 lua_pushfstring( L, "Tables must be of same length." );
8467 SWIG_fail;
8468 }
8469 arg4 = temp3;
8470 }
8471 plscmap1((int const *)arg1,(int const *)arg2,(int const *)arg3,arg4);
8472
8473 {
8474 LUA_FREE_ARRAY( arg1 );
8475 }
8476 {
8477 LUA_FREE_ARRAY( arg2 );
8478 }
8479 {
8480 LUA_FREE_ARRAY( arg3 );
8481 }
8482 return SWIG_arg;
8483
8484 fail: SWIGUNUSED;
8485 {
8486 LUA_FREE_ARRAY( arg1 );
8487 }
8488 {
8489 LUA_FREE_ARRAY( arg2 );
8490 }
8491 {
8492 LUA_FREE_ARRAY( arg3 );
8493 }
8494 lua_error(L);
8495 return 0;
8496}
8497
8498
8499static int _wrap_scmap1a(lua_State* L) {
8500 int SWIG_arg = 0;
8501 PLINT *arg1 = (PLINT *) 0 ;
8502 PLINT *arg2 = (PLINT *) 0 ;
8503 PLINT *arg3 = (PLINT *) 0 ;
8504 PLFLT *arg4 = (PLFLT *) 0 ;
8505 PLINT arg5 ;
8506 int temp1 ;
8507 int temp2 ;
8508 int temp3 ;
8509
8510 SWIG_check_num_args("plscmap1a",4,4)
8511 {
8512 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8513 if ( !arg1 )
8514 SWIG_fail;
8515 Alen = temp1;
8516 }
8517 {
8518 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8519 if ( !arg2 )
8520 SWIG_fail;
8521 if ( temp2 != Alen )
8522 {
8523 lua_pushfstring( L, "Tables must be of same length." );
8524 SWIG_fail;
8525 }
8526 }
8527 {
8528 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8529 if ( !arg3 )
8530 SWIG_fail;
8531 if ( temp3 != Alen )
8532 {
8533 lua_pushfstring( L, "Tables must be of same length." );
8534 SWIG_fail;
8535 }
8536 }
8537 {
8538 int temp;
8539 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
8540 if ( !arg4 )
8541 SWIG_fail;
8542 if ( temp != Alen )
8543 {
8544 lua_pushfstring( L, "Tables must be of same length." );
8545 SWIG_fail;
8546 }
8547 arg5 = temp;
8548 }
8549 plscmap1a((int const *)arg1,(int const *)arg2,(int const *)arg3,(double const *)arg4,arg5);
8550
8551 {
8552 LUA_FREE_ARRAY( arg1 );
8553 }
8554 {
8555 LUA_FREE_ARRAY( arg2 );
8556 }
8557 {
8558 LUA_FREE_ARRAY( arg3 );
8559 }
8560 {
8561 LUA_FREE_ARRAY( arg4 );
8562 }
8563 return SWIG_arg;
8564
8565 fail: SWIGUNUSED;
8566 {
8567 LUA_FREE_ARRAY( arg1 );
8568 }
8569 {
8570 LUA_FREE_ARRAY( arg2 );
8571 }
8572 {
8573 LUA_FREE_ARRAY( arg3 );
8574 }
8575 {
8576 LUA_FREE_ARRAY( arg4 );
8577 }
8578 lua_error(L);
8579 return 0;
8580}
8581
8582
8583static int _wrap_scmap1l(lua_State* L) {
8584 int SWIG_arg = 0;
8585 PLBOOL arg1 ;
8586 PLINT arg2 ;
8587 PLFLT *arg3 = (PLFLT *) 0 ;
8588 PLFLT *arg4 = (PLFLT *) 0 ;
8589 PLFLT *arg5 = (PLFLT *) 0 ;
8590 PLFLT *arg6 = (PLFLT *) 0 ;
8591 PLBOOL *arg7 = (PLBOOL *) 0 ;
8592 int temp4 ;
8593 int temp5 ;
8594 int temp6 ;
8595 int temp7 ;
8596
8597 {
8598 arg7 = NULL;
8599 }
8600 SWIG_check_num_args("plscmap1l",5,6)
8601 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1l",1,"PLBOOL");
8602 arg1 = (PLBOOL)lua_tonumber(L, 1);
8603 {
8604 int temp;
8605 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
8606 if ( !arg3 )
8607 SWIG_fail;
8608 arg2 = Alen = temp;
8609 }
8610 {
8611 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8612 if ( !arg4 )
8613 SWIG_fail;
8614 if ( temp4 != Alen )
8615 {
8616 lua_pushfstring( L, "Tables must be of same length." );
8617 SWIG_fail;
8618 }
8619 }
8620 {
8621 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp5 );
8622 if ( !arg5 )
8623 SWIG_fail;
8624 if ( temp5 != Alen )
8625 {
8626 lua_pushfstring( L, "Tables must be of same length." );
8627 SWIG_fail;
8628 }
8629 }
8630 {
8631 arg6 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp6 );
8632 if ( !arg6 )
8633 SWIG_fail;
8634 if ( temp6 != Alen )
8635 {
8636 lua_pushfstring( L, "Tables must be of same length." );
8637 SWIG_fail;
8638 }
8639 }
8640 if(lua_gettop(L)>=6){
8641 {
8642 if ( lua_isnil( L, 6 ) )
8643 {
8644 arg7 = NULL;
8645 }
8646 else
8647 {
8648 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 6, &temp7 );
8649 if ( !arg7 )
8650 SWIG_fail;
8651 if ( temp7 < Alen - 1 )
8652 {
8653 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8654 SWIG_fail;
8655 }
8656 }
8657 }
8658 }
8659 plscmap1l(arg1,arg2,(double const *)arg3,(double const *)arg4,(double const *)arg5,(double const *)arg6,(int const *)arg7);
8660
8661 {
8662 LUA_FREE_ARRAY( arg3 );
8663 }
8664 {
8665 LUA_FREE_ARRAY( arg4 );
8666 }
8667 {
8668 LUA_FREE_ARRAY( arg5 );
8669 }
8670 {
8671 LUA_FREE_ARRAY( arg6 );
8672 }
8673 {
8674 LUA_FREE_ARRAY( arg7 );
8675 }
8676 return SWIG_arg;
8677
8678 fail: SWIGUNUSED;
8679 {
8680 LUA_FREE_ARRAY( arg3 );
8681 }
8682 {
8683 LUA_FREE_ARRAY( arg4 );
8684 }
8685 {
8686 LUA_FREE_ARRAY( arg5 );
8687 }
8688 {
8689 LUA_FREE_ARRAY( arg6 );
8690 }
8691 {
8692 LUA_FREE_ARRAY( arg7 );
8693 }
8694 lua_error(L);
8695 return 0;
8696}
8697
8698
8699static int _wrap_scmap1la(lua_State* L) {
8700 int SWIG_arg = 0;
8701 PLBOOL arg1 ;
8702 PLINT arg2 ;
8703 PLFLT *arg3 = (PLFLT *) 0 ;
8704 PLFLT *arg4 = (PLFLT *) 0 ;
8705 PLFLT *arg5 = (PLFLT *) 0 ;
8706 PLFLT *arg6 = (PLFLT *) 0 ;
8707 PLFLT *arg7 = (PLFLT *) 0 ;
8708 PLBOOL *arg8 = (PLBOOL *) 0 ;
8709 int temp4 ;
8710 int temp5 ;
8711 int temp6 ;
8712 int temp7 ;
8713 int temp8 ;
8714
8715 {
8716 arg8 = NULL;
8717 }
8718 SWIG_check_num_args("plscmap1la",6,7)
8719 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1la",1,"PLBOOL");
8720 arg1 = (PLBOOL)lua_tonumber(L, 1);
8721 {
8722 int temp;
8723 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
8724 if ( !arg3 )
8725 SWIG_fail;
8726 arg2 = Alen = temp;
8727 }
8728 {
8729 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8730 if ( !arg4 )
8731 SWIG_fail;
8732 if ( temp4 != Alen )
8733 {
8734 lua_pushfstring( L, "Tables must be of same length." );
8735 SWIG_fail;
8736 }
8737 }
8738 {
8739 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp5 );
8740 if ( !arg5 )
8741 SWIG_fail;
8742 if ( temp5 != Alen )
8743 {
8744 lua_pushfstring( L, "Tables must be of same length." );
8745 SWIG_fail;
8746 }
8747 }
8748 {
8749 arg6 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp6 );
8750 if ( !arg6 )
8751 SWIG_fail;
8752 if ( temp6 != Alen )
8753 {
8754 lua_pushfstring( L, "Tables must be of same length." );
8755 SWIG_fail;
8756 }
8757 }
8758 {
8759 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp7 );
8760 if ( !arg7 )
8761 SWIG_fail;
8762 if ( temp7 != Alen )
8763 {
8764 lua_pushfstring( L, "Tables must be of same length." );
8765 SWIG_fail;
8766 }
8767 }
8768 if(lua_gettop(L)>=7){
8769 {
8770 if ( lua_isnil( L, 7 ) )
8771 {
8772 arg8 = NULL;
8773 }
8774 else
8775 {
8776 arg8 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp8 );
8777 if ( !arg8 )
8778 SWIG_fail;
8779 if ( temp8 < Alen - 1 )
8780 {
8781 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8782 SWIG_fail;
8783 }
8784 }
8785 }
8786 }
8787 plscmap1la(arg1,arg2,(double const *)arg3,(double const *)arg4,(double const *)arg5,(double const *)arg6,(double const *)arg7,(int const *)arg8);
8788
8789 {
8790 LUA_FREE_ARRAY( arg3 );
8791 }
8792 {
8793 LUA_FREE_ARRAY( arg4 );
8794 }
8795 {
8796 LUA_FREE_ARRAY( arg5 );
8797 }
8798 {
8799 LUA_FREE_ARRAY( arg6 );
8800 }
8801 {
8802 LUA_FREE_ARRAY( arg7 );
8803 }
8804 {
8805 LUA_FREE_ARRAY( arg8 );
8806 }
8807 return SWIG_arg;
8808
8809 fail: SWIGUNUSED;
8810 {
8811 LUA_FREE_ARRAY( arg3 );
8812 }
8813 {
8814 LUA_FREE_ARRAY( arg4 );
8815 }
8816 {
8817 LUA_FREE_ARRAY( arg5 );
8818 }
8819 {
8820 LUA_FREE_ARRAY( arg6 );
8821 }
8822 {
8823 LUA_FREE_ARRAY( arg7 );
8824 }
8825 {
8826 LUA_FREE_ARRAY( arg8 );
8827 }
8828 lua_error(L);
8829 return 0;
8830}
8831
8832
8833static int _wrap_scmap1n(lua_State* L) {
8834 int SWIG_arg = 0;
8835 PLINT arg1 ;
8836
8837 SWIG_check_num_args("plscmap1n",1,1)
8838 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1n",1,"PLINT");
8839 arg1 = (PLINT)lua_tonumber(L, 1);
8840 plscmap1n(arg1);
8841
8842 return SWIG_arg;
8843
8844 fail: SWIGUNUSED;
8845 lua_error(L);
8846 return 0;
8847}
8848
8849
8850static int _wrap_scmap1_range(lua_State* L) {
8851 int SWIG_arg = 0;
8852 PLFLT arg1 ;
8853 PLFLT arg2 ;
8854
8855 SWIG_check_num_args("plscmap1_range",2,2)
8856 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1_range",1,"PLFLT");
8857 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscmap1_range",2,"PLFLT");
8858 arg1 = (PLFLT)lua_tonumber(L, 1);
8859 arg2 = (PLFLT)lua_tonumber(L, 2);
8860 plscmap1_range(arg1,arg2);
8861
8862 return SWIG_arg;
8863
8864 fail: SWIGUNUSED;
8865 lua_error(L);
8866 return 0;
8867}
8868
8869
8870static int _wrap_gcmap1_range(lua_State* L) {
8871 int SWIG_arg = 0;
8872 PLFLT *arg1 = (PLFLT *) 0 ;
8873 PLFLT *arg2 = (PLFLT *) 0 ;
8874 PLFLT temp1 ;
8875 PLFLT temp2 ;
8876
8877 arg1 = &temp1;
8878 arg2 = &temp2;
8879 SWIG_check_num_args("plgcmap1_range",0,0)
8880 plgcmap1_range(arg1,arg2);
8881
8882 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
8883 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
8884 return SWIG_arg;
8885
8886 fail: SWIGUNUSED;
8887 lua_error(L);
8888 return 0;
8889}
8890
8891
8892static int _wrap_scol0(lua_State* L) {
8893 int SWIG_arg = 0;
8894 PLINT arg1 ;
8895 PLINT arg2 ;
8896 PLINT arg3 ;
8897 PLINT arg4 ;
8898
8899 SWIG_check_num_args("plscol0",4,4)
8900 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscol0",1,"PLINT");
8901 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscol0",2,"PLINT");
8902 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscol0",3,"PLINT");
8903 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscol0",4,"PLINT");
8904 arg1 = (PLINT)lua_tonumber(L, 1);
8905 arg2 = (PLINT)lua_tonumber(L, 2);
8906 arg3 = (PLINT)lua_tonumber(L, 3);
8907 arg4 = (PLINT)lua_tonumber(L, 4);
8908 plscol0(arg1,arg2,arg3,arg4);
8909
8910 return SWIG_arg;
8911
8912 fail: SWIGUNUSED;
8913 lua_error(L);
8914 return 0;
8915}
8916
8917
8918static int _wrap_scol0a(lua_State* L) {
8919 int SWIG_arg = 0;
8920 PLINT arg1 ;
8921 PLINT arg2 ;
8922 PLINT arg3 ;
8923 PLINT arg4 ;
8924 PLFLT arg5 ;
8925
8926 SWIG_check_num_args("plscol0a",5,5)
8927 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscol0a",1,"PLINT");
8928 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscol0a",2,"PLINT");
8929 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscol0a",3,"PLINT");
8930 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscol0a",4,"PLINT");
8931 if(!lua_isnumber(L,5)) SWIG_fail_arg("plscol0a",5,"PLFLT");
8932 arg1 = (PLINT)lua_tonumber(L, 1);
8933 arg2 = (PLINT)lua_tonumber(L, 2);
8934 arg3 = (PLINT)lua_tonumber(L, 3);
8935 arg4 = (PLINT)lua_tonumber(L, 4);
8936 arg5 = (PLFLT)lua_tonumber(L, 5);
8937 plscol0a(arg1,arg2,arg3,arg4,arg5);
8938
8939 return SWIG_arg;
8940
8941 fail: SWIGUNUSED;
8942 lua_error(L);
8943 return 0;
8944}
8945
8946
8947static int _wrap_scolbg(lua_State* L) {
8948 int SWIG_arg = 0;
8949 PLINT arg1 ;
8950 PLINT arg2 ;
8951 PLINT arg3 ;
8952
8953 SWIG_check_num_args("plscolbg",3,3)
8954 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolbg",1,"PLINT");
8955 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscolbg",2,"PLINT");
8956 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscolbg",3,"PLINT");
8957 arg1 = (PLINT)lua_tonumber(L, 1);
8958 arg2 = (PLINT)lua_tonumber(L, 2);
8959 arg3 = (PLINT)lua_tonumber(L, 3);
8960 plscolbg(arg1,arg2,arg3);
8961
8962 return SWIG_arg;
8963
8964 fail: SWIGUNUSED;
8965 lua_error(L);
8966 return 0;
8967}
8968
8969
8970static int _wrap_scolbga(lua_State* L) {
8971 int SWIG_arg = 0;
8972 PLINT arg1 ;
8973 PLINT arg2 ;
8974 PLINT arg3 ;
8975 PLFLT arg4 ;
8976
8977 SWIG_check_num_args("plscolbga",4,4)
8978 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolbga",1,"PLINT");
8979 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscolbga",2,"PLINT");
8980 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscolbga",3,"PLINT");
8981 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscolbga",4,"PLFLT");
8982 arg1 = (PLINT)lua_tonumber(L, 1);
8983 arg2 = (PLINT)lua_tonumber(L, 2);
8984 arg3 = (PLINT)lua_tonumber(L, 3);
8985 arg4 = (PLFLT)lua_tonumber(L, 4);
8986 plscolbga(arg1,arg2,arg3,arg4);
8987
8988 return SWIG_arg;
8989
8990 fail: SWIGUNUSED;
8991 lua_error(L);
8992 return 0;
8993}
8994
8995
8996static int _wrap_scolor(lua_State* L) {
8997 int SWIG_arg = 0;
8998 PLINT arg1 ;
8999
9000 SWIG_check_num_args("plscolor",1,1)
9001 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolor",1,"PLINT");
9002 arg1 = (PLINT)lua_tonumber(L, 1);
9003 plscolor(arg1);
9004
9005 return SWIG_arg;
9006
9007 fail: SWIGUNUSED;
9008 lua_error(L);
9009 return 0;
9010}
9011
9012
9013static int _wrap_scompression(lua_State* L) {
9014 int SWIG_arg = 0;
9015 PLINT arg1 ;
9016
9017 SWIG_check_num_args("plscompression",1,1)
9018 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscompression",1,"PLINT");
9019 arg1 = (PLINT)lua_tonumber(L, 1);
9020 plscompression(arg1);
9021
9022 return SWIG_arg;
9023
9024 fail: SWIGUNUSED;
9025 lua_error(L);
9026 return 0;
9027}
9028
9029
9030static int _wrap_sdev(lua_State* L) {
9031 int SWIG_arg = 0;
9032 char *arg1 = (char *) 0 ;
9033
9034 SWIG_check_num_args("plsdev",1,1)
9035 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsdev",1,"char const *");
9036 arg1 = (char *)lua_tostring(L, 1);
9037 plsdev((char const *)arg1);
9038
9039 return SWIG_arg;
9040
9041 fail: SWIGUNUSED;
9042 lua_error(L);
9043 return 0;
9044}
9045
9046
9047static int _wrap_sdidev(lua_State* L) {
9048 int SWIG_arg = 0;
9049 PLFLT arg1 ;
9050 PLFLT arg2 ;
9051 PLFLT arg3 ;
9052 PLFLT arg4 ;
9053
9054 SWIG_check_num_args("plsdidev",4,4)
9055 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdidev",1,"PLFLT");
9056 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdidev",2,"PLFLT");
9057 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdidev",3,"PLFLT");
9058 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdidev",4,"PLFLT");
9059 arg1 = (PLFLT)lua_tonumber(L, 1);
9060 arg2 = (PLFLT)lua_tonumber(L, 2);
9061 arg3 = (PLFLT)lua_tonumber(L, 3);
9062 arg4 = (PLFLT)lua_tonumber(L, 4);
9063 plsdidev(arg1,arg2,arg3,arg4);
9064
9065 return SWIG_arg;
9066
9067 fail: SWIGUNUSED;
9068 lua_error(L);
9069 return 0;
9070}
9071
9072
9073static int _wrap_sdimap(lua_State* L) {
9074 int SWIG_arg = 0;
9075 PLINT arg1 ;
9076 PLINT arg2 ;
9077 PLINT arg3 ;
9078 PLINT arg4 ;
9079 PLFLT arg5 ;
9080 PLFLT arg6 ;
9081
9082 SWIG_check_num_args("plsdimap",6,6)
9083 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdimap",1,"PLINT");
9084 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdimap",2,"PLINT");
9085 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdimap",3,"PLINT");
9086 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdimap",4,"PLINT");
9087 if(!lua_isnumber(L,5)) SWIG_fail_arg("plsdimap",5,"PLFLT");
9088 if(!lua_isnumber(L,6)) SWIG_fail_arg("plsdimap",6,"PLFLT");
9089 arg1 = (PLINT)lua_tonumber(L, 1);
9090 arg2 = (PLINT)lua_tonumber(L, 2);
9091 arg3 = (PLINT)lua_tonumber(L, 3);
9092 arg4 = (PLINT)lua_tonumber(L, 4);
9093 arg5 = (PLFLT)lua_tonumber(L, 5);
9094 arg6 = (PLFLT)lua_tonumber(L, 6);
9095 plsdimap(arg1,arg2,arg3,arg4,arg5,arg6);
9096
9097 return SWIG_arg;
9098
9099 fail: SWIGUNUSED;
9100 lua_error(L);
9101 return 0;
9102}
9103
9104
9105static int _wrap_sdiori(lua_State* L) {
9106 int SWIG_arg = 0;
9107 PLFLT arg1 ;
9108
9109 SWIG_check_num_args("plsdiori",1,1)
9110 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiori",1,"PLFLT");
9111 arg1 = (PLFLT)lua_tonumber(L, 1);
9112 plsdiori(arg1);
9113
9114 return SWIG_arg;
9115
9116 fail: SWIGUNUSED;
9117 lua_error(L);
9118 return 0;
9119}
9120
9121
9122static int _wrap_sdiplt(lua_State* L) {
9123 int SWIG_arg = 0;
9124 PLFLT arg1 ;
9125 PLFLT arg2 ;
9126 PLFLT arg3 ;
9127 PLFLT arg4 ;
9128
9129 SWIG_check_num_args("plsdiplt",4,4)
9130 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiplt",1,"PLFLT");
9131 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdiplt",2,"PLFLT");
9132 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdiplt",3,"PLFLT");
9133 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdiplt",4,"PLFLT");
9134 arg1 = (PLFLT)lua_tonumber(L, 1);
9135 arg2 = (PLFLT)lua_tonumber(L, 2);
9136 arg3 = (PLFLT)lua_tonumber(L, 3);
9137 arg4 = (PLFLT)lua_tonumber(L, 4);
9138 plsdiplt(arg1,arg2,arg3,arg4);
9139
9140 return SWIG_arg;
9141
9142 fail: SWIGUNUSED;
9143 lua_error(L);
9144 return 0;
9145}
9146
9147
9148static int _wrap_sdiplz(lua_State* L) {
9149 int SWIG_arg = 0;
9150 PLFLT arg1 ;
9151 PLFLT arg2 ;
9152 PLFLT arg3 ;
9153 PLFLT arg4 ;
9154
9155 SWIG_check_num_args("plsdiplz",4,4)
9156 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiplz",1,"PLFLT");
9157 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdiplz",2,"PLFLT");
9158 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdiplz",3,"PLFLT");
9159 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdiplz",4,"PLFLT");
9160 arg1 = (PLFLT)lua_tonumber(L, 1);
9161 arg2 = (PLFLT)lua_tonumber(L, 2);
9162 arg3 = (PLFLT)lua_tonumber(L, 3);
9163 arg4 = (PLFLT)lua_tonumber(L, 4);
9164 plsdiplz(arg1,arg2,arg3,arg4);
9165
9166 return SWIG_arg;
9167
9168 fail: SWIGUNUSED;
9169 lua_error(L);
9170 return 0;
9171}
9172
9173
9174static int _wrap_seed(lua_State* L) {
9175 int SWIG_arg = 0;
9176 unsigned int arg1 ;
9177
9178 SWIG_check_num_args("plseed",1,1)
9179 if(!lua_isnumber(L,1)) SWIG_fail_arg("plseed",1,"unsigned int");
9180 SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
9181 arg1 = (unsigned int)lua_tonumber(L, 1);
9182 plseed(arg1);
9183
9184 return SWIG_arg;
9185
9186 fail: SWIGUNUSED;
9187 lua_error(L);
9188 return 0;
9189}
9190
9191
9192static int _wrap_sesc(lua_State* L) {
9193 int SWIG_arg = 0;
9194 char arg1 ;
9195
9196 SWIG_check_num_args("plsesc",1,1)
9197 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsesc",1,"char");
9198 arg1 = (lua_tostring(L, 1))[0];
9199 plsesc(arg1);
9200
9201 return SWIG_arg;
9202
9203 fail: SWIGUNUSED;
9204 lua_error(L);
9205 return 0;
9206}
9207
9208
9209static int _wrap_setopt(lua_State* L) {
9210 int SWIG_arg = 0;
9211 char *arg1 = (char *) 0 ;
9212 char *arg2 = (char *) 0 ;
9213 PLINT result;
9214
9215 SWIG_check_num_args("plsetopt",2,2)
9216 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsetopt",1,"char const *");
9217 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plsetopt",2,"char const *");
9218 arg1 = (char *)lua_tostring(L, 1);
9219 arg2 = (char *)lua_tostring(L, 2);
9220 result = (PLINT)plsetopt((char const *)arg1,(char const *)arg2);
9221 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
9222 return SWIG_arg;
9223
9224 fail: SWIGUNUSED;
9225 lua_error(L);
9226 return 0;
9227}
9228
9229
9230static int _wrap_sfam(lua_State* L) {
9231 int SWIG_arg = 0;
9232 PLINT arg1 ;
9233 PLINT arg2 ;
9234 PLINT arg3 ;
9235
9236 SWIG_check_num_args("plsfam",3,3)
9237 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfam",1,"PLINT");
9238 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsfam",2,"PLINT");
9239 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsfam",3,"PLINT");
9240 arg1 = (PLINT)lua_tonumber(L, 1);
9241 arg2 = (PLINT)lua_tonumber(L, 2);
9242 arg3 = (PLINT)lua_tonumber(L, 3);
9243 plsfam(arg1,arg2,arg3);
9244
9245 return SWIG_arg;
9246
9247 fail: SWIGUNUSED;
9248 lua_error(L);
9249 return 0;
9250}
9251
9252
9253static int _wrap_sfci(lua_State* L) {
9254 int SWIG_arg = 0;
9255 PLUNICODE arg1 ;
9256
9257 SWIG_check_num_args("plsfci",1,1)
9258 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfci",1,"PLUNICODE");
9259 SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
9260 arg1 = (PLUNICODE)lua_tonumber(L, 1);
9261 plsfci(arg1);
9262
9263 return SWIG_arg;
9264
9265 fail: SWIGUNUSED;
9266 lua_error(L);
9267 return 0;
9268}
9269
9270
9271static int _wrap_sfnam(lua_State* L) {
9272 int SWIG_arg = 0;
9273 char *arg1 = (char *) 0 ;
9274
9275 SWIG_check_num_args("plsfnam",1,1)
9276 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsfnam",1,"char const *");
9277 arg1 = (char *)lua_tostring(L, 1);
9278 plsfnam((char const *)arg1);
9279
9280 return SWIG_arg;
9281
9282 fail: SWIGUNUSED;
9283 lua_error(L);
9284 return 0;
9285}
9286
9287
9288static int _wrap_sfont(lua_State* L) {
9289 int SWIG_arg = 0;
9290 PLINT arg1 ;
9291 PLINT arg2 ;
9292 PLINT arg3 ;
9293
9294 SWIG_check_num_args("plsfont",3,3)
9295 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfont",1,"PLINT");
9296 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsfont",2,"PLINT");
9297 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsfont",3,"PLINT");
9298 arg1 = (PLINT)lua_tonumber(L, 1);
9299 arg2 = (PLINT)lua_tonumber(L, 2);
9300 arg3 = (PLINT)lua_tonumber(L, 3);
9301 plsfont(arg1,arg2,arg3);
9302
9303 return SWIG_arg;
9304
9305 fail: SWIGUNUSED;
9306 lua_error(L);
9307 return 0;
9308}
9309
9310
9311static int _wrap_shades(lua_State* L) {
9312 int SWIG_arg = 0;
9313 PLFLT **arg1 = (PLFLT **) 0 ;
9314 PLINT arg2 ;
9315 PLINT arg3 ;
9316 defined_func arg4 = (defined_func) 0 ;
9317 PLFLT arg5 ;
9318 PLFLT arg6 ;
9319 PLFLT arg7 ;
9320 PLFLT arg8 ;
9321 PLFLT *arg9 = (PLFLT *) 0 ;
9322 PLINT arg10 ;
9323 PLFLT arg11 ;
9324 PLINT arg12 ;
9325 PLFLT arg13 ;
9326 fill_func arg14 = (fill_func) 0 ;
9327 PLBOOL arg15 ;
9328 pltr_func arg16 = (pltr_func) 0 ;
9329 PLPointer arg17 = (PLPointer) 0 ;
9330 int ii1 ;
9331 PLcGrid cgrid117 ;
9332 PLcGrid2 cgrid217 ;
9333
9334 {
9335 cgrid117.xg = cgrid117.yg = cgrid117.zg = NULL;
9336 cgrid117.nx = cgrid117.ny = cgrid117.nz = 0;
9337 cgrid217.xg = cgrid217.yg = cgrid217.zg = NULL;
9338 cgrid217.nx = cgrid217.ny = 0;
9339 }
9340 {
9341 arg16 = NULL;
9342 }
9343 {
9344 arg17 = NULL;
9345 }
9346 {
9347 arg4 = NULL;
9348 }
9349 {
9350 arg14 = plfill;
9351 }
9352 SWIG_check_num_args("plshades",10,12)
9353 if(!lua_isnumber(L,2)) SWIG_fail_arg("plshades",2,"PLFLT");
9354 if(!lua_isnumber(L,3)) SWIG_fail_arg("plshades",3,"PLFLT");
9355 if(!lua_isnumber(L,4)) SWIG_fail_arg("plshades",4,"PLFLT");
9356 if(!lua_isnumber(L,5)) SWIG_fail_arg("plshades",5,"PLFLT");
9357 if(!lua_isnumber(L,7)) SWIG_fail_arg("plshades",7,"PLFLT");
9358 if(!lua_isnumber(L,8)) SWIG_fail_arg("plshades",8,"PLINT");
9359 if(!lua_isnumber(L,9)) SWIG_fail_arg("plshades",9,"PLFLT");
9360 if(!lua_isnumber(L,10)) SWIG_fail_arg("plshades",10,"PLBOOL");
9361 {
9362 int jj;
9363
9364 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
9365 if ( !arg1 )
9366 SWIG_fail;
9367 Xlen = arg2 = ii1;
9368 Ylen = arg3 = jj;
9369 }
9370 arg5 = (PLFLT)lua_tonumber(L, 2);
9371 arg6 = (PLFLT)lua_tonumber(L, 3);
9372 arg7 = (PLFLT)lua_tonumber(L, 4);
9373 arg8 = (PLFLT)lua_tonumber(L, 5);
9374 {
9375 int temp;
9376 arg9 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp );
9377 if ( !arg9 )
9378 SWIG_fail;
9379 arg10 = Alen = temp;
9380 }
9381 arg11 = (PLFLT)lua_tonumber(L, 7);
9382 arg12 = (PLINT)lua_tonumber(L, 8);
9383 arg13 = (PLFLT)lua_tonumber(L, 9);
9384 arg15 = (PLBOOL)lua_tonumber(L, 10);
9385 if(lua_gettop(L)>=11){
9386 {
9387 arg16 = NULL;
9388 mypltr_funcstr[0] = '\0';
9389
9390 if ( lua_isstring( L, 11 ) )
9391 {
9392 const char* funcstr = lua_tostring( L, 11 );
9393 if ( strcmp( "pltr0", funcstr ) == 0 )
9394 {
9395 arg16 = pltr0;
9396 }
9397 else if ( strcmp( "pltr1", funcstr ) == 0 )
9398 {
9399 arg16 = pltr1;
9400 }
9401 else if ( strcmp( "pltr2", funcstr ) == 0 )
9402 {
9403 arg16 = pltr2;
9404 }
9405 else
9406 {
9407 arg16 = mypltr;
9408 strncpy( mypltr_funcstr, funcstr, 255 );
9409 myL = L;
9410 }
9411 }
9412 else
9413 SWIG_fail_arg( "shades", 16, "pltr_func" );
9414 }
9415 }
9416 if(lua_gettop(L)>=12){
9417 {
9418 int nx, ny;
9419 int gridmode = 0;
9420
9421 lua_pushstring( L, "xg" );
9422 lua_gettable( L, 12 );
9423 if ( !lua_istable( L, -1 ) )
9424 {
9425 lua_pop( L, 1 ); // pop "xg"
9426 lua_pushstring( L, "expected a table xg" );
9427 SWIG_fail;
9428 }
9429 lua_rawgeti( L, -1, 1 );
9430 if ( lua_istable( L, -1 ) )
9431 gridmode = 2; // two dimensional array
9432 else if ( lua_isnumber( L, -1 ) )
9433 gridmode = 1; // one dimensional array
9434 else
9435 {
9436 lua_pop( L, 1 ); // pop "1"
9437 lua_pop( L, 1 ); // pop "xg"
9438 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
9439 SWIG_fail;
9440 }
9441 lua_pop( L, 1 ); // pop test element
9442 if ( gridmode == 1 )
9443 {
9444 cgrid117.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
9445 if ( !cgrid117.xg )
9446 {
9447 lua_pop( L, 1 ); // pop "xg"
9448 SWIG_fail;
9449 }
9450 if ( nx != Xlen )
9451 {
9452 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
9453 SWIG_fail;
9454 }
9455 cgrid117.nx = nx;
9456 }
9457 else
9458 {
9459 cgrid217.xg = read_double_Matrix( L, -1, &nx, &ny );
9460 if ( !cgrid217.xg )
9461 {
9462 lua_pop( L, 1 ); // pop "xg"
9463 SWIG_fail;
9464 }
9465 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9466 {
9467 lua_pop( L, 1 ); // pop "xg"
9468 lua_pushfstring( L, "Vectors must match matrix." );
9469 SWIG_fail;
9470 }
9471 cgrid217.nx = nx;
9472 cgrid217.ny = ny;
9473 }
9474 lua_pop( L, 1 ); // pop "xg"
9475
9476 lua_pushstring( L, "yg" );
9477 lua_gettable( L, 12 );
9478 if ( !lua_istable( L, -1 ) )
9479 {
9480 lua_pop( L, 1 );
9481 lua_pushstring( L, "expected a table yg" );
9482 SWIG_fail;
9483 }
9484 lua_rawgeti( L, -1, 1 );
9485 if ( gridmode == 2 )
9486 {
9487 if ( !lua_istable( L, -1 ) )
9488 {
9489 lua_pop( L, 1 ); // pop "1"
9490 lua_pop( L, 1 ); // pop "yg"
9491 lua_pushstring( L, "expected a two dimensional array/table in yg" );
9492 SWIG_fail;
9493 }
9494 }
9495 else
9496 {
9497 if ( !lua_isnumber( L, -1 ) )
9498 {
9499 lua_pop( L, 1 ); // pop "1"
9500 lua_pop( L, 1 ); // pop "yg"
9501 lua_pushstring( L, "expected a one dimensional array/table in yg" );
9502 SWIG_fail;
9503 }
9504 }
9505 lua_pop( L, 1 ); // pop "1"
9506 if ( gridmode == 1 )
9507 {
9508 cgrid117.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
9509 if ( !cgrid117.yg )
9510 {
9511 lua_pop( L, 1 ); // pop "yg"
9512 SWIG_fail;
9513 }
9514 if ( ny != Ylen )
9515 {
9516 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
9517 SWIG_fail;
9518 }
9519 cgrid117.ny = ny;
9520 }
9521 else
9522 {
9523 cgrid217.yg = read_double_Matrix( L, -1, &nx, &ny );
9524 if ( !cgrid217.yg )
9525 {
9526 lua_pop( L, 1 ); // pop "xg"
9527 SWIG_fail;
9528 }
9529 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9530 {
9531 lua_pop( L, 1 ); // pop "xg"
9532 lua_pushfstring( L, "Vectors must match matrix." );
9533 SWIG_fail;
9534 }
9535 // cgrid217.nx/ny already set
9536 }
9537 lua_pop( L, 1 ); // pop "yg"
9538
9539 if ( gridmode == 1 )
9540 arg17 = &cgrid117;
9541 else if ( gridmode == 2 )
9542 arg17 = &cgrid217;
9543 }
9544 }
9545 plshades((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,(double const *)arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
9546
9547 {
9548 int i;
9549
9550 if ( arg1 )
9551 {
9552 for ( i = 0; i < ii1; i++ )
9553 LUA_FREE_ARRAY( arg1[i] );
9554 LUA_FREE_ARRAY( arg1 );
9555 }
9556 }
9557 {
9558 LUA_FREE_ARRAY( arg9 );
9559 }
9560 {
9561 mypltr_funcstr[0] = '\0';
9562 }
9563 {
9564 int i;
9565
9566 LUA_FREE_ARRAY( cgrid117.xg );
9567 LUA_FREE_ARRAY( cgrid117.yg );
9568
9569 if ( cgrid217.xg )
9570 {
9571 for ( i = 0; i < Xlen; i++ )
9572 LUA_FREE_ARRAY( cgrid217.xg[i] );
9573 LUA_FREE_ARRAY( cgrid217.xg );
9574 }
9575 if ( cgrid217.yg )
9576 {
9577 for ( i = 0; i < Xlen; i++ )
9578 LUA_FREE_ARRAY( cgrid217.yg[i] );
9579 LUA_FREE_ARRAY( cgrid217.yg );
9580 }
9581 }
9582 return SWIG_arg;
9583
9584 fail: SWIGUNUSED;
9585 {
9586 int i;
9587
9588 if ( arg1 )
9589 {
9590 for ( i = 0; i < ii1; i++ )
9591 LUA_FREE_ARRAY( arg1[i] );
9592 LUA_FREE_ARRAY( arg1 );
9593 }
9594 }
9595 {
9596 LUA_FREE_ARRAY( arg9 );
9597 }
9598 {
9599 mypltr_funcstr[0] = '\0';
9600 }
9601 {
9602 int i;
9603
9604 LUA_FREE_ARRAY( cgrid117.xg );
9605 LUA_FREE_ARRAY( cgrid117.yg );
9606
9607 if ( cgrid217.xg )
9608 {
9609 for ( i = 0; i < Xlen; i++ )
9610 LUA_FREE_ARRAY( cgrid217.xg[i] );
9611 LUA_FREE_ARRAY( cgrid217.xg );
9612 }
9613 if ( cgrid217.yg )
9614 {
9615 for ( i = 0; i < Xlen; i++ )
9616 LUA_FREE_ARRAY( cgrid217.yg[i] );
9617 LUA_FREE_ARRAY( cgrid217.yg );
9618 }
9619 }
9620 lua_error(L);
9621 return 0;
9622}
9623
9624
9625static int _wrap_shade(lua_State* L) {
9626 int SWIG_arg = 0;
9627 PLFLT **arg1 = (PLFLT **) 0 ;
9628 PLINT arg2 ;
9629 PLINT arg3 ;
9630 defined_func arg4 = (defined_func) 0 ;
9631 PLFLT arg5 ;
9632 PLFLT arg6 ;
9633 PLFLT arg7 ;
9634 PLFLT arg8 ;
9635 PLFLT arg9 ;
9636 PLFLT arg10 ;
9637 PLINT arg11 ;
9638 PLFLT arg12 ;
9639 PLFLT arg13 ;
9640 PLINT arg14 ;
9641 PLFLT arg15 ;
9642 PLINT arg16 ;
9643 PLFLT arg17 ;
9644 fill_func arg18 = (fill_func) 0 ;
9645 PLBOOL arg19 ;
9646 pltr_func arg20 = (pltr_func) 0 ;
9647 PLPointer arg21 = (PLPointer) 0 ;
9648 int ii1 ;
9649 PLcGrid cgrid121 ;
9650 PLcGrid2 cgrid221 ;
9651
9652 {
9653 cgrid121.xg = cgrid121.yg = cgrid121.zg = NULL;
9654 cgrid121.nx = cgrid121.ny = cgrid121.nz = 0;
9655 cgrid221.xg = cgrid221.yg = cgrid221.zg = NULL;
9656 cgrid221.nx = cgrid221.ny = 0;
9657 }
9658 {
9659 arg20 = NULL;
9660 }
9661 {
9662 arg21 = NULL;
9663 }
9664 {
9665 arg4 = NULL;
9666 }
9667 {
9668 arg18 = plfill;
9669 }
9670 SWIG_check_num_args("plshade",15,17)
9671 if(!lua_isnumber(L,2)) SWIG_fail_arg("plshade",2,"PLFLT");
9672 if(!lua_isnumber(L,3)) SWIG_fail_arg("plshade",3,"PLFLT");
9673 if(!lua_isnumber(L,4)) SWIG_fail_arg("plshade",4,"PLFLT");
9674 if(!lua_isnumber(L,5)) SWIG_fail_arg("plshade",5,"PLFLT");
9675 if(!lua_isnumber(L,6)) SWIG_fail_arg("plshade",6,"PLFLT");
9676 if(!lua_isnumber(L,7)) SWIG_fail_arg("plshade",7,"PLFLT");
9677 if(!lua_isnumber(L,8)) SWIG_fail_arg("plshade",8,"PLINT");
9678 if(!lua_isnumber(L,9)) SWIG_fail_arg("plshade",9,"PLFLT");
9679 if(!lua_isnumber(L,10)) SWIG_fail_arg("plshade",10,"PLFLT");
9680 if(!lua_isnumber(L,11)) SWIG_fail_arg("plshade",11,"PLINT");
9681 if(!lua_isnumber(L,12)) SWIG_fail_arg("plshade",12,"PLFLT");
9682 if(!lua_isnumber(L,13)) SWIG_fail_arg("plshade",13,"PLINT");
9683 if(!lua_isnumber(L,14)) SWIG_fail_arg("plshade",14,"PLFLT");
9684 if(!lua_isnumber(L,15)) SWIG_fail_arg("plshade",15,"PLBOOL");
9685 {
9686 int jj;
9687
9688 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
9689 if ( !arg1 )
9690 SWIG_fail;
9691 Xlen = arg2 = ii1;
9692 Ylen = arg3 = jj;
9693 }
9694 arg5 = (PLFLT)lua_tonumber(L, 2);
9695 arg6 = (PLFLT)lua_tonumber(L, 3);
9696 arg7 = (PLFLT)lua_tonumber(L, 4);
9697 arg8 = (PLFLT)lua_tonumber(L, 5);
9698 arg9 = (PLFLT)lua_tonumber(L, 6);
9699 arg10 = (PLFLT)lua_tonumber(L, 7);
9700 arg11 = (PLINT)lua_tonumber(L, 8);
9701 arg12 = (PLFLT)lua_tonumber(L, 9);
9702 arg13 = (PLFLT)lua_tonumber(L, 10);
9703 arg14 = (PLINT)lua_tonumber(L, 11);
9704 arg15 = (PLFLT)lua_tonumber(L, 12);
9705 arg16 = (PLINT)lua_tonumber(L, 13);
9706 arg17 = (PLFLT)lua_tonumber(L, 14);
9707 arg19 = (PLBOOL)lua_tonumber(L, 15);
9708 if(lua_gettop(L)>=16){
9709 {
9710 arg20 = NULL;
9711 mypltr_funcstr[0] = '\0';
9712
9713 if ( lua_isstring( L, 16 ) )
9714 {
9715 const char* funcstr = lua_tostring( L, 16 );
9716 if ( strcmp( "pltr0", funcstr ) == 0 )
9717 {
9718 arg20 = pltr0;
9719 }
9720 else if ( strcmp( "pltr1", funcstr ) == 0 )
9721 {
9722 arg20 = pltr1;
9723 }
9724 else if ( strcmp( "pltr2", funcstr ) == 0 )
9725 {
9726 arg20 = pltr2;
9727 }
9728 else
9729 {
9730 arg20 = mypltr;
9731 strncpy( mypltr_funcstr, funcstr, 255 );
9732 myL = L;
9733 }
9734 }
9735 else
9736 SWIG_fail_arg( "shade", 20, "pltr_func" );
9737 }
9738 }
9739 if(lua_gettop(L)>=17){
9740 {
9741 int nx, ny;
9742 int gridmode = 0;
9743
9744 lua_pushstring( L, "xg" );
9745 lua_gettable( L, 17 );
9746 if ( !lua_istable( L, -1 ) )
9747 {
9748 lua_pop( L, 1 ); // pop "xg"
9749 lua_pushstring( L, "expected a table xg" );
9750 SWIG_fail;
9751 }
9752 lua_rawgeti( L, -1, 1 );
9753 if ( lua_istable( L, -1 ) )
9754 gridmode = 2; // two dimensional array
9755 else if ( lua_isnumber( L, -1 ) )
9756 gridmode = 1; // one dimensional array
9757 else
9758 {
9759 lua_pop( L, 1 ); // pop "1"
9760 lua_pop( L, 1 ); // pop "xg"
9761 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
9762 SWIG_fail;
9763 }
9764 lua_pop( L, 1 ); // pop test element
9765 if ( gridmode == 1 )
9766 {
9767 cgrid121.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
9768 if ( !cgrid121.xg )
9769 {
9770 lua_pop( L, 1 ); // pop "xg"
9771 SWIG_fail;
9772 }
9773 if ( nx != Xlen )
9774 {
9775 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
9776 SWIG_fail;
9777 }
9778 cgrid121.nx = nx;
9779 }
9780 else
9781 {
9782 cgrid221.xg = read_double_Matrix( L, -1, &nx, &ny );
9783 if ( !cgrid221.xg )
9784 {
9785 lua_pop( L, 1 ); // pop "xg"
9786 SWIG_fail;
9787 }
9788 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9789 {
9790 lua_pop( L, 1 ); // pop "xg"
9791 lua_pushfstring( L, "Vectors must match matrix." );
9792 SWIG_fail;
9793 }
9794 cgrid221.nx = nx;
9795 cgrid221.ny = ny;
9796 }
9797 lua_pop( L, 1 ); // pop "xg"
9798
9799 lua_pushstring( L, "yg" );
9800 lua_gettable( L, 17 );
9801 if ( !lua_istable( L, -1 ) )
9802 {
9803 lua_pop( L, 1 );
9804 lua_pushstring( L, "expected a table yg" );
9805 SWIG_fail;
9806 }
9807 lua_rawgeti( L, -1, 1 );
9808 if ( gridmode == 2 )
9809 {
9810 if ( !lua_istable( L, -1 ) )
9811 {
9812 lua_pop( L, 1 ); // pop "1"
9813 lua_pop( L, 1 ); // pop "yg"
9814 lua_pushstring( L, "expected a two dimensional array/table in yg" );
9815 SWIG_fail;
9816 }
9817 }
9818 else
9819 {
9820 if ( !lua_isnumber( L, -1 ) )
9821 {
9822 lua_pop( L, 1 ); // pop "1"
9823 lua_pop( L, 1 ); // pop "yg"
9824 lua_pushstring( L, "expected a one dimensional array/table in yg" );
9825 SWIG_fail;
9826 }
9827 }
9828 lua_pop( L, 1 ); // pop "1"
9829 if ( gridmode == 1 )
9830 {
9831 cgrid121.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
9832 if ( !cgrid121.yg )
9833 {
9834 lua_pop( L, 1 ); // pop "yg"
9835 SWIG_fail;
9836 }
9837 if ( ny != Ylen )
9838 {
9839 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
9840 SWIG_fail;
9841 }
9842 cgrid121.ny = ny;
9843 }
9844 else
9845 {
9846 cgrid221.yg = read_double_Matrix( L, -1, &nx, &ny );
9847 if ( !cgrid221.yg )
9848 {
9849 lua_pop( L, 1 ); // pop "xg"
9850 SWIG_fail;
9851 }
9852 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9853 {
9854 lua_pop( L, 1 ); // pop "xg"
9855 lua_pushfstring( L, "Vectors must match matrix." );
9856 SWIG_fail;
9857 }
9858 // cgrid221.nx/ny already set
9859 }
9860 lua_pop( L, 1 ); // pop "yg"
9861
9862 if ( gridmode == 1 )
9863 arg21 = &cgrid121;
9864 else if ( gridmode == 2 )
9865 arg21 = &cgrid221;
9866 }
9867 }
9868 plshade((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21);
9869
9870 {
9871 int i;
9872
9873 if ( arg1 )
9874 {
9875 for ( i = 0; i < ii1; i++ )
9876 LUA_FREE_ARRAY( arg1[i] );
9877 LUA_FREE_ARRAY( arg1 );
9878 }
9879 }
9880 {
9881 mypltr_funcstr[0] = '\0';
9882 }
9883 {
9884 int i;
9885
9886 LUA_FREE_ARRAY( cgrid121.xg );
9887 LUA_FREE_ARRAY( cgrid121.yg );
9888
9889 if ( cgrid221.xg )
9890 {
9891 for ( i = 0; i < Xlen; i++ )
9892 LUA_FREE_ARRAY( cgrid221.xg[i] );
9893 LUA_FREE_ARRAY( cgrid221.xg );
9894 }
9895 if ( cgrid221.yg )
9896 {
9897 for ( i = 0; i < Xlen; i++ )
9898 LUA_FREE_ARRAY( cgrid221.yg[i] );
9899 LUA_FREE_ARRAY( cgrid221.yg );
9900 }
9901 }
9902 return SWIG_arg;
9903
9904 fail: SWIGUNUSED;
9905 {
9906 int i;
9907
9908 if ( arg1 )
9909 {
9910 for ( i = 0; i < ii1; i++ )
9911 LUA_FREE_ARRAY( arg1[i] );
9912 LUA_FREE_ARRAY( arg1 );
9913 }
9914 }
9915 {
9916 mypltr_funcstr[0] = '\0';
9917 }
9918 {
9919 int i;
9920
9921 LUA_FREE_ARRAY( cgrid121.xg );
9922 LUA_FREE_ARRAY( cgrid121.yg );
9923
9924 if ( cgrid221.xg )
9925 {
9926 for ( i = 0; i < Xlen; i++ )
9927 LUA_FREE_ARRAY( cgrid221.xg[i] );
9928 LUA_FREE_ARRAY( cgrid221.xg );
9929 }
9930 if ( cgrid221.yg )
9931 {
9932 for ( i = 0; i < Xlen; i++ )
9933 LUA_FREE_ARRAY( cgrid221.yg[i] );
9934 LUA_FREE_ARRAY( cgrid221.yg );
9935 }
9936 }
9937 lua_error(L);
9938 return 0;
9939}
9940
9941
9942static int _wrap_slabelfunc(lua_State* L) {
9943 int SWIG_arg = 0;
9944 label_func arg1 = (label_func) 0 ;
9945 PLPointer arg2 = (PLPointer) 0 ;
9946
9947 {
9948 arg2 = NULL;
9949 }
9950 SWIG_check_num_args("plslabelfunc",1,1)
9951 {
9952 arg1 = NULL;
9953 mylabel_funcstr[0] = '\0';
9954
9955 if ( lua_isnil( L, 1 ) )
9956 {
9957 arg1 = NULL;
9958 }
9959 else if ( lua_isstring( L, 1 ) )
9960 {
9961 arg1 = mylabel;
9962 strncpy( mylabel_funcstr, lua_tostring( L, 1 ), 255 );
9963 myL = L;
9964 }
9965 else
9966 SWIG_fail_arg( "slabelfunc", 1, "label_func" );
9967 }
9968 plslabelfunc(arg1,arg2);
9969
9970 {
9971
9972 }
9973 return SWIG_arg;
9974
9975 fail: SWIGUNUSED;
9976 {
9977
9978 }
9979 lua_error(L);
9980 return 0;
9981}
9982
9983
9984static int _wrap_smaj(lua_State* L) {
9985 int SWIG_arg = 0;
9986 PLFLT arg1 ;
9987 PLFLT arg2 ;
9988
9989 SWIG_check_num_args("plsmaj",2,2)
9990 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsmaj",1,"PLFLT");
9991 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsmaj",2,"PLFLT");
9992 arg1 = (PLFLT)lua_tonumber(L, 1);
9993 arg2 = (PLFLT)lua_tonumber(L, 2);
9994 plsmaj(arg1,arg2);
9995
9996 return SWIG_arg;
9997
9998 fail: SWIGUNUSED;
9999 lua_error(L);
10000 return 0;
10001}
10002
10003
10004static int _wrap_smin(lua_State* L) {
10005 int SWIG_arg = 0;
10006 PLFLT arg1 ;
10007 PLFLT arg2 ;
10008
10009 SWIG_check_num_args("plsmin",2,2)
10010 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsmin",1,"PLFLT");
10011 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsmin",2,"PLFLT");
10012 arg1 = (PLFLT)lua_tonumber(L, 1);
10013 arg2 = (PLFLT)lua_tonumber(L, 2);
10014 plsmin(arg1,arg2);
10015
10016 return SWIG_arg;
10017
10018 fail: SWIGUNUSED;
10019 lua_error(L);
10020 return 0;
10021}
10022
10023
10024static int _wrap_sori(lua_State* L) {
10025 int SWIG_arg = 0;
10026 PLINT arg1 ;
10027
10028 SWIG_check_num_args("plsori",1,1)
10029 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsori",1,"PLINT");
10030 arg1 = (PLINT)lua_tonumber(L, 1);
10031 plsori(arg1);
10032
10033 return SWIG_arg;
10034
10035 fail: SWIGUNUSED;
10036 lua_error(L);
10037 return 0;
10038}
10039
10040
10041static int _wrap_spage(lua_State* L) {
10042 int SWIG_arg = 0;
10043 PLFLT arg1 ;
10044 PLFLT arg2 ;
10045 PLINT arg3 ;
10046 PLINT arg4 ;
10047 PLINT arg5 ;
10048 PLINT arg6 ;
10049
10050 SWIG_check_num_args("plspage",6,6)
10051 if(!lua_isnumber(L,1)) SWIG_fail_arg("plspage",1,"PLFLT");
10052 if(!lua_isnumber(L,2)) SWIG_fail_arg("plspage",2,"PLFLT");
10053 if(!lua_isnumber(L,3)) SWIG_fail_arg("plspage",3,"PLINT");
10054 if(!lua_isnumber(L,4)) SWIG_fail_arg("plspage",4,"PLINT");
10055 if(!lua_isnumber(L,5)) SWIG_fail_arg("plspage",5,"PLINT");
10056 if(!lua_isnumber(L,6)) SWIG_fail_arg("plspage",6,"PLINT");
10057 arg1 = (PLFLT)lua_tonumber(L, 1);
10058 arg2 = (PLFLT)lua_tonumber(L, 2);
10059 arg3 = (PLINT)lua_tonumber(L, 3);
10060 arg4 = (PLINT)lua_tonumber(L, 4);
10061 arg5 = (PLINT)lua_tonumber(L, 5);
10062 arg6 = (PLINT)lua_tonumber(L, 6);
10063 plspage(arg1,arg2,arg3,arg4,arg5,arg6);
10064
10065 return SWIG_arg;
10066
10067 fail: SWIGUNUSED;
10068 lua_error(L);
10069 return 0;
10070}
10071
10072
10073static int _wrap_spal0(lua_State* L) {
10074 int SWIG_arg = 0;
10075 char *arg1 = (char *) 0 ;
10076
10077 SWIG_check_num_args("plspal0",1,1)
10078 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plspal0",1,"char const *");
10079 arg1 = (char *)lua_tostring(L, 1);
10080 plspal0((char const *)arg1);
10081
10082 return SWIG_arg;
10083
10084 fail: SWIGUNUSED;
10085 lua_error(L);
10086 return 0;
10087}
10088
10089
10090static int _wrap_spal1(lua_State* L) {
10091 int SWIG_arg = 0;
10092 char *arg1 = (char *) 0 ;
10093 PLBOOL arg2 ;
10094
10095 SWIG_check_num_args("plspal1",2,2)
10096 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plspal1",1,"char const *");
10097 if(!lua_isnumber(L,2)) SWIG_fail_arg("plspal1",2,"PLBOOL");
10098 arg1 = (char *)lua_tostring(L, 1);
10099 arg2 = (PLBOOL)lua_tonumber(L, 2);
10100 plspal1((char const *)arg1,arg2);
10101
10102 return SWIG_arg;
10103
10104 fail: SWIGUNUSED;
10105 lua_error(L);
10106 return 0;
10107}
10108
10109
10110static int _wrap_spause(lua_State* L) {
10111 int SWIG_arg = 0;
10112 PLBOOL arg1 ;
10113
10114 SWIG_check_num_args("plspause",1,1)
10115 if(!lua_isnumber(L,1)) SWIG_fail_arg("plspause",1,"PLBOOL");
10116 arg1 = (PLBOOL)lua_tonumber(L, 1);
10117 plspause(arg1);
10118
10119 return SWIG_arg;
10120
10121 fail: SWIGUNUSED;
10122 lua_error(L);
10123 return 0;
10124}
10125
10126
10127static int _wrap_sstrm(lua_State* L) {
10128 int SWIG_arg = 0;
10129 PLINT arg1 ;
10130
10131 SWIG_check_num_args("plsstrm",1,1)
10132 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsstrm",1,"PLINT");
10133 arg1 = (PLINT)lua_tonumber(L, 1);
10134 plsstrm(arg1);
10135
10136 return SWIG_arg;
10137
10138 fail: SWIGUNUSED;
10139 lua_error(L);
10140 return 0;
10141}
10142
10143
10144static int _wrap_ssub(lua_State* L) {
10145 int SWIG_arg = 0;
10146 PLINT arg1 ;
10147 PLINT arg2 ;
10148
10149 SWIG_check_num_args("plssub",2,2)
10150 if(!lua_isnumber(L,1)) SWIG_fail_arg("plssub",1,"PLINT");
10151 if(!lua_isnumber(L,2)) SWIG_fail_arg("plssub",2,"PLINT");
10152 arg1 = (PLINT)lua_tonumber(L, 1);
10153 arg2 = (PLINT)lua_tonumber(L, 2);
10154 plssub(arg1,arg2);
10155
10156 return SWIG_arg;
10157
10158 fail: SWIGUNUSED;
10159 lua_error(L);
10160 return 0;
10161}
10162
10163
10164static int _wrap_ssym(lua_State* L) {
10165 int SWIG_arg = 0;
10166 PLFLT arg1 ;
10167 PLFLT arg2 ;
10168
10169 SWIG_check_num_args("plssym",2,2)
10170 if(!lua_isnumber(L,1)) SWIG_fail_arg("plssym",1,"PLFLT");
10171 if(!lua_isnumber(L,2)) SWIG_fail_arg("plssym",2,"PLFLT");
10172 arg1 = (PLFLT)lua_tonumber(L, 1);
10173 arg2 = (PLFLT)lua_tonumber(L, 2);
10174 plssym(arg1,arg2);
10175
10176 return SWIG_arg;
10177
10178 fail: SWIGUNUSED;
10179 lua_error(L);
10180 return 0;
10181}
10182
10183
10184static int _wrap_star(lua_State* L) {
10185 int SWIG_arg = 0;
10186 PLINT arg1 ;
10187 PLINT arg2 ;
10188
10189 SWIG_check_num_args("plstar",2,2)
10190 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstar",1,"PLINT");
10191 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstar",2,"PLINT");
10192 arg1 = (PLINT)lua_tonumber(L, 1);
10193 arg2 = (PLINT)lua_tonumber(L, 2);
10194 plstar(arg1,arg2);
10195
10196 return SWIG_arg;
10197
10198 fail: SWIGUNUSED;
10199 lua_error(L);
10200 return 0;
10201}
10202
10203
10204static int _wrap_start(lua_State* L) {
10205 int SWIG_arg = 0;
10206 char *arg1 = (char *) 0 ;
10207 PLINT arg2 ;
10208 PLINT arg3 ;
10209
10210 SWIG_check_num_args("plstart",3,3)
10211 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plstart",1,"char const *");
10212 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstart",2,"PLINT");
10213 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstart",3,"PLINT");
10214 arg1 = (char *)lua_tostring(L, 1);
10215 arg2 = (PLINT)lua_tonumber(L, 2);
10216 arg3 = (PLINT)lua_tonumber(L, 3);
10217 plstart((char const *)arg1,arg2,arg3);
10218
10219 return SWIG_arg;
10220
10221 fail: SWIGUNUSED;
10222 lua_error(L);
10223 return 0;
10224}
10225
10226
10227static int _wrap_stransform(lua_State* L) {
10228 int SWIG_arg = 0;
10229 ct_func arg1 = (ct_func) 0 ;
10230 PLPointer arg2 = (PLPointer) 0 ;
10231
10232 {
10233 arg1 = NULL;
10234 myct_funcstr[0] = '\0';
10235 }
10236 {
10237 arg2 = NULL;
10238 }
10239 SWIG_check_num_args("plstransform",0,1)
10240 if(lua_gettop(L)>=1){
10241 {
10242 arg1 = NULL;
10243 myct_funcstr[0] = '\0';
10244
10245 if ( lua_isstring( L, 1 ) )
10246 {
10247 const char* funcstr = lua_tostring( L, 1 );
10248 arg1 = myct;
10249 strncpy( myct_funcstr, funcstr, 255 );
10250 myL = L;
10251 }
10252 else
10253 SWIG_fail_arg( "stransform", 1, "ct_func" );
10254 }
10255 }
10256 plstransform(arg1,arg2);
10257
10258 return SWIG_arg;
10259
10260 fail: SWIGUNUSED;
10261 lua_error(L);
10262 return 0;
10263}
10264
10265
10266static int _wrap_string(lua_State* L) {
10267 int SWIG_arg = 0;
10268 PLINT arg1 ;
10269 PLFLT *arg2 = (PLFLT *) 0 ;
10270 PLFLT *arg3 = (PLFLT *) 0 ;
10271 char *arg4 = (char *) 0 ;
10272 int temp3 ;
10273
10274 SWIG_check_num_args("plstring",3,3)
10275 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plstring",3,"char const *");
10276 {
10277 int temp;
10278 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10279 if ( !arg2 )
10280 SWIG_fail;
10281 arg1 = Alen = temp;
10282 }
10283 {
10284 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10285 if ( !arg3 )
10286 SWIG_fail;
10287 if ( temp3 != Alen )
10288 {
10289 lua_pushfstring( L, "Tables must be of same length." );
10290 SWIG_fail;
10291 }
10292 }
10293 arg4 = (char *)lua_tostring(L, 3);
10294 plstring(arg1,(double const *)arg2,(double const *)arg3,(char const *)arg4);
10295
10296 {
10297 LUA_FREE_ARRAY( arg2 );
10298 }
10299 {
10300 LUA_FREE_ARRAY( arg3 );
10301 }
10302 return SWIG_arg;
10303
10304 fail: SWIGUNUSED;
10305 {
10306 LUA_FREE_ARRAY( arg2 );
10307 }
10308 {
10309 LUA_FREE_ARRAY( arg3 );
10310 }
10311 lua_error(L);
10312 return 0;
10313}
10314
10315
10316static int _wrap_string3(lua_State* L) {
10317 int SWIG_arg = 0;
10318 PLINT arg1 ;
10319 PLFLT *arg2 = (PLFLT *) 0 ;
10320 PLFLT *arg3 = (PLFLT *) 0 ;
10321 PLFLT *arg4 = (PLFLT *) 0 ;
10322 char *arg5 = (char *) 0 ;
10323 int temp3 ;
10324 int temp4 ;
10325
10326 SWIG_check_num_args("plstring3",4,4)
10327 if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("plstring3",4,"char const *");
10328 {
10329 int temp;
10330 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10331 if ( !arg2 )
10332 SWIG_fail;
10333 arg1 = Alen = temp;
10334 }
10335 {
10336 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10337 if ( !arg3 )
10338 SWIG_fail;
10339 if ( temp3 != Alen )
10340 {
10341 lua_pushfstring( L, "Tables must be of same length." );
10342 SWIG_fail;
10343 }
10344 }
10345 {
10346 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
10347 if ( !arg4 )
10348 SWIG_fail;
10349 if ( temp4 != Alen )
10350 {
10351 lua_pushfstring( L, "Tables must be of same length." );
10352 SWIG_fail;
10353 }
10354 }
10355 arg5 = (char *)lua_tostring(L, 4);
10356 plstring3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,(char const *)arg5);
10357
10358 {
10359 LUA_FREE_ARRAY( arg2 );
10360 }
10361 {
10362 LUA_FREE_ARRAY( arg3 );
10363 }
10364 {
10365 LUA_FREE_ARRAY( arg4 );
10366 }
10367 return SWIG_arg;
10368
10369 fail: SWIGUNUSED;
10370 {
10371 LUA_FREE_ARRAY( arg2 );
10372 }
10373 {
10374 LUA_FREE_ARRAY( arg3 );
10375 }
10376 {
10377 LUA_FREE_ARRAY( arg4 );
10378 }
10379 lua_error(L);
10380 return 0;
10381}
10382
10383
10384static int _wrap_stripa(lua_State* L) {
10385 int SWIG_arg = 0;
10386 PLINT arg1 ;
10387 PLINT arg2 ;
10388 PLFLT arg3 ;
10389 PLFLT arg4 ;
10390
10391 SWIG_check_num_args("plstripa",4,4)
10392 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstripa",1,"PLINT");
10393 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstripa",2,"PLINT");
10394 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstripa",3,"PLFLT");
10395 if(!lua_isnumber(L,4)) SWIG_fail_arg("plstripa",4,"PLFLT");
10396 arg1 = (PLINT)lua_tonumber(L, 1);
10397 arg2 = (PLINT)lua_tonumber(L, 2);
10398 arg3 = (PLFLT)lua_tonumber(L, 3);
10399 arg4 = (PLFLT)lua_tonumber(L, 4);
10400 plstripa(arg1,arg2,arg3,arg4);
10401
10402 return SWIG_arg;
10403
10404 fail: SWIGUNUSED;
10405 lua_error(L);
10406 return 0;
10407}
10408
10409
10410static int _wrap_stripc(lua_State* L) {
10411 int SWIG_arg = 0;
10412 PLINT *arg1 = (PLINT *) 0 ;
10413 char *arg2 = (char *) 0 ;
10414 char *arg3 = (char *) 0 ;
10415 PLFLT arg4 ;
10416 PLFLT arg5 ;
10417 PLFLT arg6 ;
10418 PLFLT arg7 ;
10419 PLFLT arg8 ;
10420 PLFLT arg9 ;
10421 PLFLT arg10 ;
10422 PLBOOL arg11 ;
10423 PLBOOL arg12 ;
10424 PLINT arg13 ;
10425 PLINT arg14 ;
10426 PLINT *arg15 = (PLINT *) 0 ;
10427 PLINT *arg16 = (PLINT *) 0 ;
10428 char **arg17 ;
10429 char *arg18 = (char *) 0 ;
10430 char *arg19 = (char *) 0 ;
10431 char *arg20 = (char *) 0 ;
10432 PLINT temp1 ;
10433 int temp15 ;
10434 int temp16 ;
10435
10436 {
10437 arg17 = NULL;
10438 }
10439 arg1 = &temp1;
10440 SWIG_check_num_args("plstripc",15,19)
10441 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plstripc",1,"char const *");
10442 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plstripc",2,"char const *");
10443 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstripc",3,"PLFLT");
10444 if(!lua_isnumber(L,4)) SWIG_fail_arg("plstripc",4,"PLFLT");
10445 if(!lua_isnumber(L,5)) SWIG_fail_arg("plstripc",5,"PLFLT");
10446 if(!lua_isnumber(L,6)) SWIG_fail_arg("plstripc",6,"PLFLT");
10447 if(!lua_isnumber(L,7)) SWIG_fail_arg("plstripc",7,"PLFLT");
10448 if(!lua_isnumber(L,8)) SWIG_fail_arg("plstripc",8,"PLFLT");
10449 if(!lua_isnumber(L,9)) SWIG_fail_arg("plstripc",9,"PLFLT");
10450 if(!lua_isnumber(L,10)) SWIG_fail_arg("plstripc",10,"PLBOOL");
10451 if(!lua_isnumber(L,11)) SWIG_fail_arg("plstripc",11,"PLBOOL");
10452 if(!lua_isnumber(L,12)) SWIG_fail_arg("plstripc",12,"PLINT");
10453 if(!lua_isnumber(L,13)) SWIG_fail_arg("plstripc",13,"PLINT");
10454 if(lua_gettop(L)>=16 && !lua_istable(L,16)) SWIG_fail_arg("plstripc",16,"char const *[4]");
10455 if(lua_gettop(L)>=17 && !SWIG_lua_isnilstring(L,17)) SWIG_fail_arg("plstripc",17,"char const *");
10456 if(lua_gettop(L)>=18 && !SWIG_lua_isnilstring(L,18)) SWIG_fail_arg("plstripc",18,"char const *");
10457 if(lua_gettop(L)>=19 && !SWIG_lua_isnilstring(L,19)) SWIG_fail_arg("plstripc",19,"char const *");
10458 arg2 = (char *)lua_tostring(L, 1);
10459 arg3 = (char *)lua_tostring(L, 2);
10460 arg4 = (PLFLT)lua_tonumber(L, 3);
10461 arg5 = (PLFLT)lua_tonumber(L, 4);
10462 arg6 = (PLFLT)lua_tonumber(L, 5);
10463 arg7 = (PLFLT)lua_tonumber(L, 6);
10464 arg8 = (PLFLT)lua_tonumber(L, 7);
10465 arg9 = (PLFLT)lua_tonumber(L, 8);
10466 arg10 = (PLFLT)lua_tonumber(L, 9);
10467 arg11 = (PLBOOL)lua_tonumber(L, 10);
10468 arg12 = (PLBOOL)lua_tonumber(L, 11);
10469 arg13 = (PLINT)lua_tonumber(L, 12);
10470 arg14 = (PLINT)lua_tonumber(L, 13);
10471 {
10472 arg15 = (PLINT *) LUA_get_int_num_array_var( L, 14, &temp15 );
10473 if ( !arg15 )
10474 SWIG_fail;
10475 Alen = temp15;
10476 }
10477 {
10478 arg16 = (PLINT *) LUA_get_int_num_array_var( L, 15, &temp16 );
10479 if ( !arg16 )
10480 SWIG_fail;
10481 if ( temp16 != Alen )
10482 {
10483 lua_pushfstring( L, "Tables must be of same length." );
10484 SWIG_fail;
10485 }
10486 }
10487 if(lua_gettop(L)>=16){
10488 {
10489 int i;
10490 arg17 = NULL;
10491
10492 if ( SWIG_table_size( L, 16 ) != 4 )
10493 {
10494 lua_pushfstring( L, "Requires a sequence of 4 strings." );
10495 SWIG_fail;
10496 }
10497 if ( Alen != 4 )
10498 {
10499 lua_pushfstring( L, "colline and styline args must be length 4." );
10500 SWIG_fail;
10501 }
10502
10503 arg17 = malloc( sizeof ( char* ) * 4 );
10504 for ( i = 1; i <= 4; i++ )
10505 {
10506 lua_rawgeti( L, 16, i );
10507 if ( lua_isstring( L, -1 ) )
10508 {
10509 arg17[i - 1] = (char *) lua_tostring( L, -1 );
10510 }
10511 else
10512 {
10513 lua_pop( L, 1 );
10514 lua_pushfstring( L, "Requires a sequence of 4 strings." );
10515 SWIG_fail;
10516 // arg17 array is freed after 'fail:'
10517 }
10518 lua_pop( L, 1 );
10519 }
10520 }
10521 }
10522 if(lua_gettop(L)>=17){
10523 arg18 = (char *)lua_tostring(L, 17);
10524 }
10525 if(lua_gettop(L)>=18){
10526 arg19 = (char *)lua_tostring(L, 18);
10527 }
10528 if(lua_gettop(L)>=19){
10529 arg20 = (char *)lua_tostring(L, 19);
10530 }
10531 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);
10532
10533 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
10534 {
10535 LUA_FREE_ARRAY( arg15 );
10536 }
10537 {
10538 LUA_FREE_ARRAY( arg16 );
10539 }
10540 {
10541 if ( arg17 )
10542 {
10543 free( arg17 ); arg17 = NULL;
10544 }
10545 }
10546 return SWIG_arg;
10547
10548 fail: SWIGUNUSED;
10549 {
10550 LUA_FREE_ARRAY( arg15 );
10551 }
10552 {
10553 LUA_FREE_ARRAY( arg16 );
10554 }
10555 {
10556 if ( arg17 )
10557 {
10558 free( arg17 ); arg17 = NULL;
10559 }
10560 }
10561 lua_error(L);
10562 return 0;
10563}
10564
10565
10566static int _wrap_stripd(lua_State* L) {
10567 int SWIG_arg = 0;
10568 PLINT arg1 ;
10569
10570 SWIG_check_num_args("plstripd",1,1)
10571 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstripd",1,"PLINT");
10572 arg1 = (PLINT)lua_tonumber(L, 1);
10573 plstripd(arg1);
10574
10575 return SWIG_arg;
10576
10577 fail: SWIGUNUSED;
10578 lua_error(L);
10579 return 0;
10580}
10581
10582
10583static int _wrap_styl(lua_State* L) {
10584 int SWIG_arg = 0;
10585 PLINT arg1 ;
10586 PLINT *arg2 = (PLINT *) 0 ;
10587 PLINT *arg3 = (PLINT *) 0 ;
10588 int temp3 ;
10589
10590 SWIG_check_num_args("plstyl",2,2)
10591 {
10592 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 1, &arg1 );
10593 if ( !arg2 )
10594 SWIG_fail;
10595 Alen = arg1;
10596 }
10597 {
10598 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp3 );
10599 if ( !arg3 )
10600 SWIG_fail;
10601 if ( temp3 != Alen )
10602 {
10603 lua_pushfstring( L, "Tables must be of same length." );
10604 SWIG_fail;
10605 }
10606 }
10607 plstyl(arg1,(int const *)arg2,(int const *)arg3);
10608
10609 {
10610 LUA_FREE_ARRAY( arg2 );
10611 }
10612 {
10613 LUA_FREE_ARRAY( arg3 );
10614 }
10615 return SWIG_arg;
10616
10617 fail: SWIGUNUSED;
10618 {
10619 LUA_FREE_ARRAY( arg2 );
10620 }
10621 {
10622 LUA_FREE_ARRAY( arg3 );
10623 }
10624 lua_error(L);
10625 return 0;
10626}
10627
10628
10629static int _wrap_svect(lua_State* L) {
10630 int SWIG_arg = 0;
10631 PLFLT *arg1 = (PLFLT *) 0 ;
10632 PLFLT *arg2 = (PLFLT *) 0 ;
10633 PLINT arg3 ;
10634 PLBOOL arg4 ;
10635
10636 {
10637 arg2 = NULL; arg3 = 0;
10638 }
10639 {
10640 arg4 = 0;
10641 }
10642 SWIG_check_num_args("plsvect",1,3)
10643 if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("plsvect",3,"PLBOOL");
10644 {
10645 int temp;
10646 if ( lua_isnil( L, 1 ) )
10647 {
10648 arg1 = NULL;
10649 Alen = 0;
10650 }
10651 else
10652 {
10653 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10654 if ( !arg1 )
10655 SWIG_fail;
10656 Alen = temp;
10657 }
10658 }
10659 if(lua_gettop(L)>=2){
10660 {
10661 int temp = 0;
10662 if ( lua_isnil( L, 2 ) )
10663 {
10664 arg2 = NULL;
10665 }
10666 else
10667 {
10668 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
10669 if ( !arg2 )
10670 SWIG_fail;
10671 if ( temp != Alen )
10672 {
10673 lua_pushfstring( L, "Tables must be of same length." );
10674 SWIG_fail;
10675 }
10676 }
10677 arg3 = temp;
10678 }
10679 }
10680 if(lua_gettop(L)>=3){
10681 arg4 = (PLBOOL)lua_tonumber(L, 3);
10682 }
10683 plsvect((double const *)arg1,(double const *)arg2,arg3,arg4);
10684
10685 {
10686 LUA_FREE_ARRAY( arg2 );
10687 }
10688 return SWIG_arg;
10689
10690 fail: SWIGUNUSED;
10691 {
10692 LUA_FREE_ARRAY( arg2 );
10693 }
10694 lua_error(L);
10695 return 0;
10696}
10697
10698
10699static int _wrap_svpa(lua_State* L) {
10700 int SWIG_arg = 0;
10701 PLFLT arg1 ;
10702 PLFLT arg2 ;
10703 PLFLT arg3 ;
10704 PLFLT arg4 ;
10705
10706 SWIG_check_num_args("plsvpa",4,4)
10707 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsvpa",1,"PLFLT");
10708 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsvpa",2,"PLFLT");
10709 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsvpa",3,"PLFLT");
10710 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsvpa",4,"PLFLT");
10711 arg1 = (PLFLT)lua_tonumber(L, 1);
10712 arg2 = (PLFLT)lua_tonumber(L, 2);
10713 arg3 = (PLFLT)lua_tonumber(L, 3);
10714 arg4 = (PLFLT)lua_tonumber(L, 4);
10715 plsvpa(arg1,arg2,arg3,arg4);
10716
10717 return SWIG_arg;
10718
10719 fail: SWIGUNUSED;
10720 lua_error(L);
10721 return 0;
10722}
10723
10724
10725static int _wrap_sxax(lua_State* L) {
10726 int SWIG_arg = 0;
10727 PLINT arg1 ;
10728 PLINT arg2 ;
10729
10730 SWIG_check_num_args("plsxax",2,2)
10731 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsxax",1,"PLINT");
10732 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsxax",2,"PLINT");
10733 arg1 = (PLINT)lua_tonumber(L, 1);
10734 arg2 = (PLINT)lua_tonumber(L, 2);
10735 plsxax(arg1,arg2);
10736
10737 return SWIG_arg;
10738
10739 fail: SWIGUNUSED;
10740 lua_error(L);
10741 return 0;
10742}
10743
10744
10745static int _wrap_syax(lua_State* L) {
10746 int SWIG_arg = 0;
10747 PLINT arg1 ;
10748 PLINT arg2 ;
10749
10750 SWIG_check_num_args("plsyax",2,2)
10751 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsyax",1,"PLINT");
10752 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsyax",2,"PLINT");
10753 arg1 = (PLINT)lua_tonumber(L, 1);
10754 arg2 = (PLINT)lua_tonumber(L, 2);
10755 plsyax(arg1,arg2);
10756
10757 return SWIG_arg;
10758
10759 fail: SWIGUNUSED;
10760 lua_error(L);
10761 return 0;
10762}
10763
10764
10765static int _wrap_sym(lua_State* L) {
10766 int SWIG_arg = 0;
10767 PLINT arg1 ;
10768 PLFLT *arg2 = (PLFLT *) 0 ;
10769 PLFLT *arg3 = (PLFLT *) 0 ;
10770 PLINT arg4 ;
10771 int temp3 ;
10772
10773 SWIG_check_num_args("plsym",3,3)
10774 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsym",3,"PLINT");
10775 {
10776 int temp;
10777 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10778 if ( !arg2 )
10779 SWIG_fail;
10780 arg1 = Alen = temp;
10781 }
10782 {
10783 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10784 if ( !arg3 )
10785 SWIG_fail;
10786 if ( temp3 != Alen )
10787 {
10788 lua_pushfstring( L, "Tables must be of same length." );
10789 SWIG_fail;
10790 }
10791 }
10792 arg4 = (PLINT)lua_tonumber(L, 3);
10793 plsym(arg1,(double const *)arg2,(double const *)arg3,arg4);
10794
10795 {
10796 LUA_FREE_ARRAY( arg2 );
10797 }
10798 {
10799 LUA_FREE_ARRAY( arg3 );
10800 }
10801 return SWIG_arg;
10802
10803 fail: SWIGUNUSED;
10804 {
10805 LUA_FREE_ARRAY( arg2 );
10806 }
10807 {
10808 LUA_FREE_ARRAY( arg3 );
10809 }
10810 lua_error(L);
10811 return 0;
10812}
10813
10814
10815static int _wrap_szax(lua_State* L) {
10816 int SWIG_arg = 0;
10817 PLINT arg1 ;
10818 PLINT arg2 ;
10819
10820 SWIG_check_num_args("plszax",2,2)
10821 if(!lua_isnumber(L,1)) SWIG_fail_arg("plszax",1,"PLINT");
10822 if(!lua_isnumber(L,2)) SWIG_fail_arg("plszax",2,"PLINT");
10823 arg1 = (PLINT)lua_tonumber(L, 1);
10824 arg2 = (PLINT)lua_tonumber(L, 2);
10825 plszax(arg1,arg2);
10826
10827 return SWIG_arg;
10828
10829 fail: SWIGUNUSED;
10830 lua_error(L);
10831 return 0;
10832}
10833
10834
10835static int _wrap_text(lua_State* L) {
10836 int SWIG_arg = 0;
10837
10838 SWIG_check_num_args("pltext",0,0)
10839 pltext();
10840
10841 return SWIG_arg;
10842
10843 fail: SWIGUNUSED;
10844 lua_error(L);
10845 return 0;
10846}
10847
10848
10849static int _wrap_timefmt(lua_State* L) {
10850 int SWIG_arg = 0;
10851 char *arg1 = (char *) 0 ;
10852
10853 SWIG_check_num_args("pltimefmt",1,1)
10854 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("pltimefmt",1,"char const *");
10855 arg1 = (char *)lua_tostring(L, 1);
10856 pltimefmt((char const *)arg1);
10857
10858 return SWIG_arg;
10859
10860 fail: SWIGUNUSED;
10861 lua_error(L);
10862 return 0;
10863}
10864
10865
10866static int _wrap_vasp(lua_State* L) {
10867 int SWIG_arg = 0;
10868 PLFLT arg1 ;
10869
10870 SWIG_check_num_args("plvasp",1,1)
10871 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvasp",1,"PLFLT");
10872 arg1 = (PLFLT)lua_tonumber(L, 1);
10873 plvasp(arg1);
10874
10875 return SWIG_arg;
10876
10877 fail: SWIGUNUSED;
10878 lua_error(L);
10879 return 0;
10880}
10881
10882
10883static int _wrap_vect(lua_State* L) {
10884 int SWIG_arg = 0;
10885 PLFLT **arg1 = (PLFLT **) 0 ;
10886 PLFLT **arg2 = (PLFLT **) 0 ;
10887 PLINT arg3 ;
10888 PLINT arg4 ;
10889 PLFLT arg5 ;
10890 pltr_func arg6 = (pltr_func) 0 ;
10891 PLPointer arg7 = (PLPointer) 0 ;
10892 int ii1 ;
10893 int ii2 ;
10894 PLcGrid cgrid17 ;
10895 PLcGrid2 cgrid27 ;
10896
10897 {
10898 cgrid17.xg = cgrid17.yg = cgrid17.zg = NULL;
10899 cgrid17.nx = cgrid17.ny = cgrid17.nz = 0;
10900 cgrid27.xg = cgrid27.yg = cgrid27.zg = NULL;
10901 cgrid27.nx = cgrid27.ny = 0;
10902 }
10903 {
10904 arg6 = NULL;
10905 }
10906 {
10907 arg7 = NULL;
10908 }
10909 SWIG_check_num_args("plvect",3,5)
10910 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvect",3,"PLFLT");
10911 {
10912 int jj;
10913
10914 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
10915 if ( !arg1 )
10916 SWIG_fail;
10917 Xlen = ii1;
10918 Ylen = jj;
10919 }
10920 {
10921 int jj;
10922
10923 arg2 = read_double_Matrix( L, 2, &ii2, &jj );
10924 if ( !arg2 )
10925 SWIG_fail;
10926 arg3 = ii2;
10927 arg4 = jj;
10928 if ( ( arg3 != Xlen ) || ( arg4 != Ylen ) )
10929 {
10930 lua_pushfstring( L, "Vectors must match matrix." );
10931 SWIG_fail;
10932 }
10933 }
10934 arg5 = (PLFLT)lua_tonumber(L, 3);
10935 if(lua_gettop(L)>=4){
10936 {
10937 arg6 = NULL;
10938 mypltr_funcstr[0] = '\0';
10939
10940 if ( lua_isstring( L, 4 ) )
10941 {
10942 const char* funcstr = lua_tostring( L, 4 );
10943 if ( strcmp( "pltr0", funcstr ) == 0 )
10944 {
10945 arg6 = pltr0;
10946 }
10947 else if ( strcmp( "pltr1", funcstr ) == 0 )
10948 {
10949 arg6 = pltr1;
10950 }
10951 else if ( strcmp( "pltr2", funcstr ) == 0 )
10952 {
10953 arg6 = pltr2;
10954 }
10955 else
10956 {
10957 arg6 = mypltr;
10958 strncpy( mypltr_funcstr, funcstr, 255 );
10959 myL = L;
10960 }
10961 }
10962 else
10963 SWIG_fail_arg( "vect", 6, "pltr_func" );
10964 }
10965 }
10966 if(lua_gettop(L)>=5){
10967 {
10968 int nx, ny;
10969 int gridmode = 0;
10970
10971 lua_pushstring( L, "xg" );
10972 lua_gettable( L, 5 );
10973 if ( !lua_istable( L, -1 ) )
10974 {
10975 lua_pop( L, 1 ); // pop "xg"
10976 lua_pushstring( L, "expected a table xg" );
10977 SWIG_fail;
10978 }
10979 lua_rawgeti( L, -1, 1 );
10980 if ( lua_istable( L, -1 ) )
10981 gridmode = 2; // two dimensional array
10982 else if ( lua_isnumber( L, -1 ) )
10983 gridmode = 1; // one dimensional array
10984 else
10985 {
10986 lua_pop( L, 1 ); // pop "1"
10987 lua_pop( L, 1 ); // pop "xg"
10988 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
10989 SWIG_fail;
10990 }
10991 lua_pop( L, 1 ); // pop test element
10992 if ( gridmode == 1 )
10993 {
10994 cgrid17.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
10995 if ( !cgrid17.xg )
10996 {
10997 lua_pop( L, 1 ); // pop "xg"
10998 SWIG_fail;
10999 }
11000 if ( nx != Xlen )
11001 {
11002 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
11003 SWIG_fail;
11004 }
11005 cgrid17.nx = nx;
11006 }
11007 else
11008 {
11009 cgrid27.xg = read_double_Matrix( L, -1, &nx, &ny );
11010 if ( !cgrid27.xg )
11011 {
11012 lua_pop( L, 1 ); // pop "xg"
11013 SWIG_fail;
11014 }
11015 if ( ( nx != Xlen ) || ( ny != Ylen ) )
11016 {
11017 lua_pop( L, 1 ); // pop "xg"
11018 lua_pushfstring( L, "Vectors must match matrix." );
11019 SWIG_fail;
11020 }
11021 cgrid27.nx = nx;
11022 cgrid27.ny = ny;
11023 }
11024 lua_pop( L, 1 ); // pop "xg"
11025
11026 lua_pushstring( L, "yg" );
11027 lua_gettable( L, 5 );
11028 if ( !lua_istable( L, -1 ) )
11029 {
11030 lua_pop( L, 1 );
11031 lua_pushstring( L, "expected a table yg" );
11032 SWIG_fail;
11033 }
11034 lua_rawgeti( L, -1, 1 );
11035 if ( gridmode == 2 )
11036 {
11037 if ( !lua_istable( L, -1 ) )
11038 {
11039 lua_pop( L, 1 ); // pop "1"
11040 lua_pop( L, 1 ); // pop "yg"
11041 lua_pushstring( L, "expected a two dimensional array/table in yg" );
11042 SWIG_fail;
11043 }
11044 }
11045 else
11046 {
11047 if ( !lua_isnumber( L, -1 ) )
11048 {
11049 lua_pop( L, 1 ); // pop "1"
11050 lua_pop( L, 1 ); // pop "yg"
11051 lua_pushstring( L, "expected a one dimensional array/table in yg" );
11052 SWIG_fail;
11053 }
11054 }
11055 lua_pop( L, 1 ); // pop "1"
11056 if ( gridmode == 1 )
11057 {
11058 cgrid17.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
11059 if ( !cgrid17.yg )
11060 {
11061 lua_pop( L, 1 ); // pop "yg"
11062 SWIG_fail;
11063 }
11064 if ( ny != Ylen )
11065 {
11066 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
11067 SWIG_fail;
11068 }
11069 cgrid17.ny = ny;
11070 }
11071 else
11072 {
11073 cgrid27.yg = read_double_Matrix( L, -1, &nx, &ny );
11074 if ( !cgrid27.yg )
11075 {
11076 lua_pop( L, 1 ); // pop "xg"
11077 SWIG_fail;
11078 }
11079 if ( ( nx != Xlen ) || ( ny != Ylen ) )
11080 {
11081 lua_pop( L, 1 ); // pop "xg"
11082 lua_pushfstring( L, "Vectors must match matrix." );
11083 SWIG_fail;
11084 }
11085 // cgrid27.nx/ny already set
11086 }
11087 lua_pop( L, 1 ); // pop "yg"
11088
11089 if ( gridmode == 1 )
11090 arg7 = &cgrid17;
11091 else if ( gridmode == 2 )
11092 arg7 = &cgrid27;
11093 }
11094 }
11095 plvect((double const **)arg1,(double const **)arg2,arg3,arg4,arg5,arg6,arg7);
11096
11097 {
11098 int i;
11099
11100 if ( arg1 )
11101 {
11102 for ( i = 0; i < ii1; i++ )
11103 LUA_FREE_ARRAY( arg1[i] );
11104 LUA_FREE_ARRAY( arg1 );
11105 }
11106 }
11107 {
11108 int i;
11109
11110 if ( arg2 )
11111 {
11112 for ( i = 0; i < ii2; i++ )
11113 LUA_FREE_ARRAY( arg2[i] );
11114 LUA_FREE_ARRAY( arg2 );
11115 }
11116 }
11117 {
11118 mypltr_funcstr[0] = '\0';
11119 }
11120 {
11121 int i;
11122
11123 LUA_FREE_ARRAY( cgrid17.xg );
11124 LUA_FREE_ARRAY( cgrid17.yg );
11125
11126 if ( cgrid27.xg )
11127 {
11128 for ( i = 0; i < Xlen; i++ )
11129 LUA_FREE_ARRAY( cgrid27.xg[i] );
11130 LUA_FREE_ARRAY( cgrid27.xg );
11131 }
11132 if ( cgrid27.yg )
11133 {
11134 for ( i = 0; i < Xlen; i++ )
11135 LUA_FREE_ARRAY( cgrid27.yg[i] );
11136 LUA_FREE_ARRAY( cgrid27.yg );
11137 }
11138 }
11139 return SWIG_arg;
11140
11141 fail: SWIGUNUSED;
11142 {
11143 int i;
11144
11145 if ( arg1 )
11146 {
11147 for ( i = 0; i < ii1; i++ )
11148 LUA_FREE_ARRAY( arg1[i] );
11149 LUA_FREE_ARRAY( arg1 );
11150 }
11151 }
11152 {
11153 int i;
11154
11155 if ( arg2 )
11156 {
11157 for ( i = 0; i < ii2; i++ )
11158 LUA_FREE_ARRAY( arg2[i] );
11159 LUA_FREE_ARRAY( arg2 );
11160 }
11161 }
11162 {
11163 mypltr_funcstr[0] = '\0';
11164 }
11165 {
11166 int i;
11167
11168 LUA_FREE_ARRAY( cgrid17.xg );
11169 LUA_FREE_ARRAY( cgrid17.yg );
11170
11171 if ( cgrid27.xg )
11172 {
11173 for ( i = 0; i < Xlen; i++ )
11174 LUA_FREE_ARRAY( cgrid27.xg[i] );
11175 LUA_FREE_ARRAY( cgrid27.xg );
11176 }
11177 if ( cgrid27.yg )
11178 {
11179 for ( i = 0; i < Xlen; i++ )
11180 LUA_FREE_ARRAY( cgrid27.yg[i] );
11181 LUA_FREE_ARRAY( cgrid27.yg );
11182 }
11183 }
11184 lua_error(L);
11185 return 0;
11186}
11187
11188
11189static int _wrap_vpas(lua_State* L) {
11190 int SWIG_arg = 0;
11191 PLFLT arg1 ;
11192 PLFLT arg2 ;
11193 PLFLT arg3 ;
11194 PLFLT arg4 ;
11195 PLFLT arg5 ;
11196
11197 SWIG_check_num_args("plvpas",5,5)
11198 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvpas",1,"PLFLT");
11199 if(!lua_isnumber(L,2)) SWIG_fail_arg("plvpas",2,"PLFLT");
11200 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvpas",3,"PLFLT");
11201 if(!lua_isnumber(L,4)) SWIG_fail_arg("plvpas",4,"PLFLT");
11202 if(!lua_isnumber(L,5)) SWIG_fail_arg("plvpas",5,"PLFLT");
11203 arg1 = (PLFLT)lua_tonumber(L, 1);
11204 arg2 = (PLFLT)lua_tonumber(L, 2);
11205 arg3 = (PLFLT)lua_tonumber(L, 3);
11206 arg4 = (PLFLT)lua_tonumber(L, 4);
11207 arg5 = (PLFLT)lua_tonumber(L, 5);
11208 plvpas(arg1,arg2,arg3,arg4,arg5);
11209
11210 return SWIG_arg;
11211
11212 fail: SWIGUNUSED;
11213 lua_error(L);
11214 return 0;
11215}
11216
11217
11218static int _wrap_vpor(lua_State* L) {
11219 int SWIG_arg = 0;
11220 PLFLT arg1 ;
11221 PLFLT arg2 ;
11222 PLFLT arg3 ;
11223 PLFLT arg4 ;
11224
11225 SWIG_check_num_args("plvpor",4,4)
11226 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvpor",1,"PLFLT");
11227 if(!lua_isnumber(L,2)) SWIG_fail_arg("plvpor",2,"PLFLT");
11228 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvpor",3,"PLFLT");
11229 if(!lua_isnumber(L,4)) SWIG_fail_arg("plvpor",4,"PLFLT");
11230 arg1 = (PLFLT)lua_tonumber(L, 1);
11231 arg2 = (PLFLT)lua_tonumber(L, 2);
11232 arg3 = (PLFLT)lua_tonumber(L, 3);
11233 arg4 = (PLFLT)lua_tonumber(L, 4);
11234 plvpor(arg1,arg2,arg3,arg4);
11235
11236 return SWIG_arg;
11237
11238 fail: SWIGUNUSED;
11239 lua_error(L);
11240 return 0;
11241}
11242
11243
11244static int _wrap_vsta(lua_State* L) {
11245 int SWIG_arg = 0;
11246
11247 SWIG_check_num_args("plvsta",0,0)
11248 plvsta();
11249
11250 return SWIG_arg;
11251
11252 fail: SWIGUNUSED;
11253 lua_error(L);
11254 return 0;
11255}
11256
11257
11258static int _wrap_w3d(lua_State* L) {
11259 int SWIG_arg = 0;
11260 PLFLT arg1 ;
11261 PLFLT arg2 ;
11262 PLFLT arg3 ;
11263 PLFLT arg4 ;
11264 PLFLT arg5 ;
11265 PLFLT arg6 ;
11266 PLFLT arg7 ;
11267 PLFLT arg8 ;
11268 PLFLT arg9 ;
11269 PLFLT arg10 ;
11270 PLFLT arg11 ;
11271
11272 SWIG_check_num_args("plw3d",11,11)
11273 if(!lua_isnumber(L,1)) SWIG_fail_arg("plw3d",1,"PLFLT");
11274 if(!lua_isnumber(L,2)) SWIG_fail_arg("plw3d",2,"PLFLT");
11275 if(!lua_isnumber(L,3)) SWIG_fail_arg("plw3d",3,"PLFLT");
11276 if(!lua_isnumber(L,4)) SWIG_fail_arg("plw3d",4,"PLFLT");
11277 if(!lua_isnumber(L,5)) SWIG_fail_arg("plw3d",5,"PLFLT");
11278 if(!lua_isnumber(L,6)) SWIG_fail_arg("plw3d",6,"PLFLT");
11279 if(!lua_isnumber(L,7)) SWIG_fail_arg("plw3d",7,"PLFLT");
11280 if(!lua_isnumber(L,8)) SWIG_fail_arg("plw3d",8,"PLFLT");
11281 if(!lua_isnumber(L,9)) SWIG_fail_arg("plw3d",9,"PLFLT");
11282 if(!lua_isnumber(L,10)) SWIG_fail_arg("plw3d",10,"PLFLT");
11283 if(!lua_isnumber(L,11)) SWIG_fail_arg("plw3d",11,"PLFLT");
11284 arg1 = (PLFLT)lua_tonumber(L, 1);
11285 arg2 = (PLFLT)lua_tonumber(L, 2);
11286 arg3 = (PLFLT)lua_tonumber(L, 3);
11287 arg4 = (PLFLT)lua_tonumber(L, 4);
11288 arg5 = (PLFLT)lua_tonumber(L, 5);
11289 arg6 = (PLFLT)lua_tonumber(L, 6);
11290 arg7 = (PLFLT)lua_tonumber(L, 7);
11291 arg8 = (PLFLT)lua_tonumber(L, 8);
11292 arg9 = (PLFLT)lua_tonumber(L, 9);
11293 arg10 = (PLFLT)lua_tonumber(L, 10);
11294 arg11 = (PLFLT)lua_tonumber(L, 11);
11295 plw3d(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
11296
11297 return SWIG_arg;
11298
11299 fail: SWIGUNUSED;
11300 lua_error(L);
11301 return 0;
11302}
11303
11304
11305static int _wrap_width(lua_State* L) {
11306 int SWIG_arg = 0;
11307 PLFLT arg1 ;
11308
11309 SWIG_check_num_args("plwidth",1,1)
11310 if(!lua_isnumber(L,1)) SWIG_fail_arg("plwidth",1,"PLFLT");
11311 arg1 = (PLFLT)lua_tonumber(L, 1);
11312 plwidth(arg1);
11313
11314 return SWIG_arg;
11315
11316 fail: SWIGUNUSED;
11317 lua_error(L);
11318 return 0;
11319}
11320
11321
11322static int _wrap_wind(lua_State* L) {
11323 int SWIG_arg = 0;
11324 PLFLT arg1 ;
11325 PLFLT arg2 ;
11326 PLFLT arg3 ;
11327 PLFLT arg4 ;
11328
11329 SWIG_check_num_args("plwind",4,4)
11330 if(!lua_isnumber(L,1)) SWIG_fail_arg("plwind",1,"PLFLT");
11331 if(!lua_isnumber(L,2)) SWIG_fail_arg("plwind",2,"PLFLT");
11332 if(!lua_isnumber(L,3)) SWIG_fail_arg("plwind",3,"PLFLT");
11333 if(!lua_isnumber(L,4)) SWIG_fail_arg("plwind",4,"PLFLT");
11334 arg1 = (PLFLT)lua_tonumber(L, 1);
11335 arg2 = (PLFLT)lua_tonumber(L, 2);
11336 arg3 = (PLFLT)lua_tonumber(L, 3);
11337 arg4 = (PLFLT)lua_tonumber(L, 4);
11338 plwind(arg1,arg2,arg3,arg4);
11339
11340 return SWIG_arg;
11341
11342 fail: SWIGUNUSED;
11343 lua_error(L);
11344 return 0;
11345}
11346
11347
11348static int _wrap_xormod(lua_State* L) {
11349 int SWIG_arg = 0;
11350 PLBOOL arg1 ;
11351 PLBOOL *arg2 = (PLBOOL *) 0 ;
11352 PLBOOL temp2 ;
11353
11354 arg2 = &temp2;
11355 SWIG_check_num_args("plxormod",1,1)
11356 if(!lua_isnumber(L,1)) SWIG_fail_arg("plxormod",1,"PLBOOL");
11357 arg1 = (PLBOOL)lua_tonumber(L, 1);
11358 plxormod(arg1,arg2);
11359
11360 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
11361 return SWIG_arg;
11362
11363 fail: SWIGUNUSED;
11364 lua_error(L);
11365 return 0;
11366}
11367
11368
11369static int _wrap_map(lua_State* L) {
11370 int SWIG_arg = 0;
11371 mapform_func arg1 = (mapform_func) 0 ;
11372 char *arg2 = (char *) 0 ;
11373 PLFLT arg3 ;
11374 PLFLT arg4 ;
11375 PLFLT arg5 ;
11376 PLFLT arg6 ;
11377
11378 SWIG_check_num_args("plmap",6,6)
11379 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmap",2,"char const *");
11380 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmap",3,"PLFLT");
11381 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmap",4,"PLFLT");
11382 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmap",5,"PLFLT");
11383 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmap",6,"PLFLT");
11384 {
11385 arg1 = NULL;
11386 mapform_funcstr[0] = '\0';
11387
11388 if ( lua_isnil( L, 1 ) )
11389 {
11390 arg1 = NULL;
11391 }
11392 else if ( lua_isstring( L, 1 ) )
11393 {
11394 arg1 = mapform;
11395 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11396 myL = L;
11397 }
11398 else
11399 SWIG_fail_arg( "map", 1, "mapform_func" );
11400 }
11401 arg2 = (char *)lua_tostring(L, 2);
11402 arg3 = (PLFLT)lua_tonumber(L, 3);
11403 arg4 = (PLFLT)lua_tonumber(L, 4);
11404 arg5 = (PLFLT)lua_tonumber(L, 5);
11405 arg6 = (PLFLT)lua_tonumber(L, 6);
11406 plmap(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
11407
11408 {
11409 mapform_funcstr[0] = '\0';
11410 }
11411 return SWIG_arg;
11412
11413 fail: SWIGUNUSED;
11414 {
11415 mapform_funcstr[0] = '\0';
11416 }
11417 lua_error(L);
11418 return 0;
11419}
11420
11421
11422static int _wrap_mapline(lua_State* L) {
11423 int SWIG_arg = 0;
11424 mapform_func arg1 = (mapform_func) 0 ;
11425 char *arg2 = (char *) 0 ;
11426 PLFLT arg3 ;
11427 PLFLT arg4 ;
11428 PLFLT arg5 ;
11429 PLFLT arg6 ;
11430 PLINT *arg7 = (PLINT *) 0 ;
11431 PLINT arg8 ;
11432 int temp7 ;
11433
11434 SWIG_check_num_args("plmapline",7,7)
11435 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapline",2,"char const *");
11436 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmapline",3,"PLFLT");
11437 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapline",4,"PLFLT");
11438 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapline",5,"PLFLT");
11439 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapline",6,"PLFLT");
11440 {
11441 arg1 = NULL;
11442 mapform_funcstr[0] = '\0';
11443
11444 if ( lua_isnil( L, 1 ) )
11445 {
11446 arg1 = NULL;
11447 }
11448 else if ( lua_isstring( L, 1 ) )
11449 {
11450 arg1 = mapform;
11451 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11452 myL = L;
11453 }
11454 else
11455 SWIG_fail_arg( "mapline", 1, "mapform_func" );
11456 }
11457 arg2 = (char *)lua_tostring(L, 2);
11458 arg3 = (PLFLT)lua_tonumber(L, 3);
11459 arg4 = (PLFLT)lua_tonumber(L, 4);
11460 arg5 = (PLFLT)lua_tonumber(L, 5);
11461 arg6 = (PLFLT)lua_tonumber(L, 6);
11462 {
11463 if ( lua_isnil( L, 7 ) )
11464 {
11465 arg7 = NULL;
11466 arg8 = 0;
11467 }
11468 else
11469 {
11470 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp7 );
11471 if ( !arg7 )
11472 SWIG_fail;
11473 arg8 = temp7;
11474 }
11475 }
11476 plmapline(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,(int const *)arg7,arg8);
11477
11478 {
11479 mapform_funcstr[0] = '\0';
11480 }
11481 {
11482 LUA_FREE_ARRAY( arg7 );
11483 }
11484 return SWIG_arg;
11485
11486 fail: SWIGUNUSED;
11487 {
11488 mapform_funcstr[0] = '\0';
11489 }
11490 {
11491 LUA_FREE_ARRAY( arg7 );
11492 }
11493 lua_error(L);
11494 return 0;
11495}
11496
11497
11498static int _wrap_mapstring(lua_State* L) {
11499 int SWIG_arg = 0;
11500 mapform_func arg1 = (mapform_func) 0 ;
11501 char *arg2 = (char *) 0 ;
11502 char *arg3 = (char *) 0 ;
11503 PLFLT arg4 ;
11504 PLFLT arg5 ;
11505 PLFLT arg6 ;
11506 PLFLT arg7 ;
11507 PLINT *arg8 = (PLINT *) 0 ;
11508 PLINT arg9 ;
11509 int temp8 ;
11510
11511 SWIG_check_num_args("plmapstring",8,8)
11512 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapstring",2,"char const *");
11513 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plmapstring",3,"char const *");
11514 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapstring",4,"PLFLT");
11515 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapstring",5,"PLFLT");
11516 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapstring",6,"PLFLT");
11517 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmapstring",7,"PLFLT");
11518 {
11519 arg1 = NULL;
11520 mapform_funcstr[0] = '\0';
11521
11522 if ( lua_isnil( L, 1 ) )
11523 {
11524 arg1 = NULL;
11525 }
11526 else if ( lua_isstring( L, 1 ) )
11527 {
11528 arg1 = mapform;
11529 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11530 myL = L;
11531 }
11532 else
11533 SWIG_fail_arg( "mapstring", 1, "mapform_func" );
11534 }
11535 arg2 = (char *)lua_tostring(L, 2);
11536 arg3 = (char *)lua_tostring(L, 3);
11537 arg4 = (PLFLT)lua_tonumber(L, 4);
11538 arg5 = (PLFLT)lua_tonumber(L, 5);
11539 arg6 = (PLFLT)lua_tonumber(L, 6);
11540 arg7 = (PLFLT)lua_tonumber(L, 7);
11541 {
11542 if ( lua_isnil( L, 8 ) )
11543 {
11544 arg8 = NULL;
11545 arg9 = 0;
11546 }
11547 else
11548 {
11549 arg8 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp8 );
11550 if ( !arg8 )
11551 SWIG_fail;
11552 arg9 = temp8;
11553 }
11554 }
11555 plmapstring(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7,(int const *)arg8,arg9);
11556
11557 {
11558 mapform_funcstr[0] = '\0';
11559 }
11560 {
11561 LUA_FREE_ARRAY( arg8 );
11562 }
11563 return SWIG_arg;
11564
11565 fail: SWIGUNUSED;
11566 {
11567 mapform_funcstr[0] = '\0';
11568 }
11569 {
11570 LUA_FREE_ARRAY( arg8 );
11571 }
11572 lua_error(L);
11573 return 0;
11574}
11575
11576
11577static int _wrap_maptex(lua_State* L) {
11578 int SWIG_arg = 0;
11579 mapform_func arg1 = (mapform_func) 0 ;
11580 char *arg2 = (char *) 0 ;
11581 PLFLT arg3 ;
11582 PLFLT arg4 ;
11583 PLFLT arg5 ;
11584 char *arg6 = (char *) 0 ;
11585 PLFLT arg7 ;
11586 PLFLT arg8 ;
11587 PLFLT arg9 ;
11588 PLFLT arg10 ;
11589 PLINT arg11 ;
11590
11591 SWIG_check_num_args("plmaptex",11,11)
11592 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmaptex",2,"char const *");
11593 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmaptex",3,"PLFLT");
11594 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmaptex",4,"PLFLT");
11595 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmaptex",5,"PLFLT");
11596 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plmaptex",6,"char const *");
11597 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmaptex",7,"PLFLT");
11598 if(!lua_isnumber(L,8)) SWIG_fail_arg("plmaptex",8,"PLFLT");
11599 if(!lua_isnumber(L,9)) SWIG_fail_arg("plmaptex",9,"PLFLT");
11600 if(!lua_isnumber(L,10)) SWIG_fail_arg("plmaptex",10,"PLFLT");
11601 if(!lua_isnumber(L,11)) SWIG_fail_arg("plmaptex",11,"PLINT");
11602 {
11603 arg1 = NULL;
11604 mapform_funcstr[0] = '\0';
11605
11606 if ( lua_isnil( L, 1 ) )
11607 {
11608 arg1 = NULL;
11609 }
11610 else if ( lua_isstring( L, 1 ) )
11611 {
11612 arg1 = mapform;
11613 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11614 myL = L;
11615 }
11616 else
11617 SWIG_fail_arg( "maptex", 1, "mapform_func" );
11618 }
11619 arg2 = (char *)lua_tostring(L, 2);
11620 arg3 = (PLFLT)lua_tonumber(L, 3);
11621 arg4 = (PLFLT)lua_tonumber(L, 4);
11622 arg5 = (PLFLT)lua_tonumber(L, 5);
11623 arg6 = (char *)lua_tostring(L, 6);
11624 arg7 = (PLFLT)lua_tonumber(L, 7);
11625 arg8 = (PLFLT)lua_tonumber(L, 8);
11626 arg9 = (PLFLT)lua_tonumber(L, 9);
11627 arg10 = (PLFLT)lua_tonumber(L, 10);
11628 arg11 = (PLINT)lua_tonumber(L, 11);
11629 plmaptex(arg1,(char const *)arg2,arg3,arg4,arg5,(char const *)arg6,arg7,arg8,arg9,arg10,arg11);
11630
11631 {
11632 mapform_funcstr[0] = '\0';
11633 }
11634 return SWIG_arg;
11635
11636 fail: SWIGUNUSED;
11637 {
11638 mapform_funcstr[0] = '\0';
11639 }
11640 lua_error(L);
11641 return 0;
11642}
11643
11644
11645static int _wrap_mapfill(lua_State* L) {
11646 int SWIG_arg = 0;
11647 mapform_func arg1 = (mapform_func) 0 ;
11648 char *arg2 = (char *) 0 ;
11649 PLFLT arg3 ;
11650 PLFLT arg4 ;
11651 PLFLT arg5 ;
11652 PLFLT arg6 ;
11653 PLINT *arg7 = (PLINT *) 0 ;
11654 PLINT arg8 ;
11655 int temp7 ;
11656
11657 SWIG_check_num_args("plmapfill",7,7)
11658 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapfill",2,"char const *");
11659 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmapfill",3,"PLFLT");
11660 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapfill",4,"PLFLT");
11661 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapfill",5,"PLFLT");
11662 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapfill",6,"PLFLT");
11663 {
11664 arg1 = NULL;
11665 mapform_funcstr[0] = '\0';
11666
11667 if ( lua_isnil( L, 1 ) )
11668 {
11669 arg1 = NULL;
11670 }
11671 else if ( lua_isstring( L, 1 ) )
11672 {
11673 arg1 = mapform;
11674 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11675 myL = L;
11676 }
11677 else
11678 SWIG_fail_arg( "mapfill", 1, "mapform_func" );
11679 }
11680 arg2 = (char *)lua_tostring(L, 2);
11681 arg3 = (PLFLT)lua_tonumber(L, 3);
11682 arg4 = (PLFLT)lua_tonumber(L, 4);
11683 arg5 = (PLFLT)lua_tonumber(L, 5);
11684 arg6 = (PLFLT)lua_tonumber(L, 6);
11685 {
11686 if ( lua_isnil( L, 7 ) )
11687 {
11688 arg7 = NULL;
11689 arg8 = 0;
11690 }
11691 else
11692 {
11693 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp7 );
11694 if ( !arg7 )
11695 SWIG_fail;
11696 arg8 = temp7;
11697 }
11698 }
11699 plmapfill(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,(int const *)arg7,arg8);
11700
11701 {
11702 mapform_funcstr[0] = '\0';
11703 }
11704 {
11705 LUA_FREE_ARRAY( arg7 );
11706 }
11707 return SWIG_arg;
11708
11709 fail: SWIGUNUSED;
11710 {
11711 mapform_funcstr[0] = '\0';
11712 }
11713 {
11714 LUA_FREE_ARRAY( arg7 );
11715 }
11716 lua_error(L);
11717 return 0;
11718}
11719
11720
11721static int _wrap_meridians(lua_State* L) {
11722 int SWIG_arg = 0;
11723 mapform_func arg1 = (mapform_func) 0 ;
11724 PLFLT arg2 ;
11725 PLFLT arg3 ;
11726 PLFLT arg4 ;
11727 PLFLT arg5 ;
11728 PLFLT arg6 ;
11729 PLFLT arg7 ;
11730
11731 SWIG_check_num_args("plmeridians",7,7)
11732 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmeridians",2,"PLFLT");
11733 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmeridians",3,"PLFLT");
11734 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmeridians",4,"PLFLT");
11735 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmeridians",5,"PLFLT");
11736 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmeridians",6,"PLFLT");
11737 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmeridians",7,"PLFLT");
11738 {
11739 arg1 = NULL;
11740 mapform_funcstr[0] = '\0';
11741
11742 if ( lua_isnil( L, 1 ) )
11743 {
11744 arg1 = NULL;
11745 }
11746 else if ( lua_isstring( L, 1 ) )
11747 {
11748 arg1 = mapform;
11749 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11750 myL = L;
11751 }
11752 else
11753 SWIG_fail_arg( "meridians", 1, "mapform_func" );
11754 }
11755 arg2 = (PLFLT)lua_tonumber(L, 2);
11756 arg3 = (PLFLT)lua_tonumber(L, 3);
11757 arg4 = (PLFLT)lua_tonumber(L, 4);
11758 arg5 = (PLFLT)lua_tonumber(L, 5);
11759 arg6 = (PLFLT)lua_tonumber(L, 6);
11760 arg7 = (PLFLT)lua_tonumber(L, 7);
11761 plmeridians(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
11762
11763 {
11764 mapform_funcstr[0] = '\0';
11765 }
11766 return SWIG_arg;
11767
11768 fail: SWIGUNUSED;
11769 {
11770 mapform_funcstr[0] = '\0';
11771 }
11772 lua_error(L);
11773 return 0;
11774}
11775
11776
11777static int _wrap_image(lua_State* L) {
11778 int SWIG_arg = 0;
11779 PLFLT **arg1 = (PLFLT **) 0 ;
11780 PLINT arg2 ;
11781 PLINT arg3 ;
11782 PLFLT arg4 ;
11783 PLFLT arg5 ;
11784 PLFLT arg6 ;
11785 PLFLT arg7 ;
11786 PLFLT arg8 ;
11787 PLFLT arg9 ;
11788 PLFLT arg10 ;
11789 PLFLT arg11 ;
11790 PLFLT arg12 ;
11791 PLFLT arg13 ;
11792 int ii1 ;
11793
11794 SWIG_check_num_args("plimage",11,11)
11795 if(!lua_isnumber(L,2)) SWIG_fail_arg("plimage",2,"PLFLT");
11796 if(!lua_isnumber(L,3)) SWIG_fail_arg("plimage",3,"PLFLT");
11797 if(!lua_isnumber(L,4)) SWIG_fail_arg("plimage",4,"PLFLT");
11798 if(!lua_isnumber(L,5)) SWIG_fail_arg("plimage",5,"PLFLT");
11799 if(!lua_isnumber(L,6)) SWIG_fail_arg("plimage",6,"PLFLT");
11800 if(!lua_isnumber(L,7)) SWIG_fail_arg("plimage",7,"PLFLT");
11801 if(!lua_isnumber(L,8)) SWIG_fail_arg("plimage",8,"PLFLT");
11802 if(!lua_isnumber(L,9)) SWIG_fail_arg("plimage",9,"PLFLT");
11803 if(!lua_isnumber(L,10)) SWIG_fail_arg("plimage",10,"PLFLT");
11804 if(!lua_isnumber(L,11)) SWIG_fail_arg("plimage",11,"PLFLT");
11805 {
11806 int jj;
11807
11808 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
11809 if ( !arg1 )
11810 SWIG_fail;
11811 Xlen = arg2 = ii1;
11812 Ylen = arg3 = jj;
11813 }
11814 arg4 = (PLFLT)lua_tonumber(L, 2);
11815 arg5 = (PLFLT)lua_tonumber(L, 3);
11816 arg6 = (PLFLT)lua_tonumber(L, 4);
11817 arg7 = (PLFLT)lua_tonumber(L, 5);
11818 arg8 = (PLFLT)lua_tonumber(L, 6);
11819 arg9 = (PLFLT)lua_tonumber(L, 7);
11820 arg10 = (PLFLT)lua_tonumber(L, 8);
11821 arg11 = (PLFLT)lua_tonumber(L, 9);
11822 arg12 = (PLFLT)lua_tonumber(L, 10);
11823 arg13 = (PLFLT)lua_tonumber(L, 11);
11824 plimage((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
11825
11826 {
11827 int i;
11828
11829 if ( arg1 )
11830 {
11831 for ( i = 0; i < ii1; i++ )
11832 LUA_FREE_ARRAY( arg1[i] );
11833 LUA_FREE_ARRAY( arg1 );
11834 }
11835 }
11836 return SWIG_arg;
11837
11838 fail: SWIGUNUSED;
11839 {
11840 int i;
11841
11842 if ( arg1 )
11843 {
11844 for ( i = 0; i < ii1; i++ )
11845 LUA_FREE_ARRAY( arg1[i] );
11846 LUA_FREE_ARRAY( arg1 );
11847 }
11848 }
11849 lua_error(L);
11850 return 0;
11851}
11852
11853
11854static int _wrap_imagefr(lua_State* L) {
11855 int SWIG_arg = 0;
11856 PLFLT **arg1 = (PLFLT **) 0 ;
11857 PLINT arg2 ;
11858 PLINT arg3 ;
11859 PLFLT arg4 ;
11860 PLFLT arg5 ;
11861 PLFLT arg6 ;
11862 PLFLT arg7 ;
11863 PLFLT arg8 ;
11864 PLFLT arg9 ;
11865 PLFLT arg10 ;
11866 PLFLT arg11 ;
11867 pltr_func arg12 = (pltr_func) 0 ;
11868 PLPointer arg13 = (PLPointer) 0 ;
11869 int ii1 ;
11870 PLcGrid cgrid113 ;
11871 PLcGrid2 cgrid213 ;
11872
11873 {
11874 cgrid113.xg = cgrid113.yg = cgrid113.zg = NULL;
11875 cgrid113.nx = cgrid113.ny = cgrid113.nz = 0;
11876 cgrid213.xg = cgrid213.yg = cgrid213.zg = NULL;
11877 cgrid213.nx = cgrid213.ny = 0;
11878 }
11879 {
11880 arg12 = NULL;
11881 }
11882 {
11883 arg13 = NULL;
11884 }
11885 SWIG_check_num_args("plimagefr",9,11)
11886 if(!lua_isnumber(L,2)) SWIG_fail_arg("plimagefr",2,"PLFLT");
11887 if(!lua_isnumber(L,3)) SWIG_fail_arg("plimagefr",3,"PLFLT");
11888 if(!lua_isnumber(L,4)) SWIG_fail_arg("plimagefr",4,"PLFLT");
11889 if(!lua_isnumber(L,5)) SWIG_fail_arg("plimagefr",5,"PLFLT");
11890 if(!lua_isnumber(L,6)) SWIG_fail_arg("plimagefr",6,"PLFLT");
11891 if(!lua_isnumber(L,7)) SWIG_fail_arg("plimagefr",7,"PLFLT");
11892 if(!lua_isnumber(L,8)) SWIG_fail_arg("plimagefr",8,"PLFLT");
11893 if(!lua_isnumber(L,9)) SWIG_fail_arg("plimagefr",9,"PLFLT");
11894 {
11895 int jj;
11896
11897 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
11898 if ( !arg1 )
11899 SWIG_fail;
11900 Xlen = arg2 = ii1;
11901 Ylen = arg3 = jj;
11902 }
11903 arg4 = (PLFLT)lua_tonumber(L, 2);
11904 arg5 = (PLFLT)lua_tonumber(L, 3);
11905 arg6 = (PLFLT)lua_tonumber(L, 4);
11906 arg7 = (PLFLT)lua_tonumber(L, 5);
11907 arg8 = (PLFLT)lua_tonumber(L, 6);
11908 arg9 = (PLFLT)lua_tonumber(L, 7);
11909 arg10 = (PLFLT)lua_tonumber(L, 8);
11910 arg11 = (PLFLT)lua_tonumber(L, 9);
11911 if(lua_gettop(L)>=10){
11912 {
11913 arg12 = NULL;
11914 mypltr_funcstr[0] = '\0';
11915
11916 if ( lua_isstring( L, 10 ) )
11917 {
11918 const char* funcstr = lua_tostring( L, 10 );
11919 if ( strcmp( "pltr0", funcstr ) == 0 )
11920 {
11921 arg12 = pltr0;
11922 }
11923 else if ( strcmp( "pltr1", funcstr ) == 0 )
11924 {
11925 arg12 = pltr1;
11926 }
11927 else if ( strcmp( "pltr2", funcstr ) == 0 )
11928 {
11929 arg12 = pltr2;
11930 }
11931 else
11932 {
11933 arg12 = mypltr;
11934 strncpy( mypltr_funcstr, funcstr, 255 );
11935 myL = L;
11936 }
11937 }
11938 else
11939 SWIG_fail_arg( "imagefr", 12, "pltr_func" );
11940 }
11941 }
11942 if(lua_gettop(L)>=11){
11943 {
11944 int nx, ny;
11945 int gridmode = 0;
11946
11947 lua_pushstring( L, "xg" );
11948 lua_gettable( L, 11 );
11949 if ( !lua_istable( L, -1 ) )
11950 {
11951 lua_pop( L, 1 ); // pop "xg"
11952 lua_pushstring( L, "expected a table xg" );
11953 SWIG_fail;
11954 }
11955 lua_rawgeti( L, -1, 1 );
11956 if ( lua_istable( L, -1 ) )
11957 gridmode = 2; // two dimensional array
11958 else if ( lua_isnumber( L, -1 ) )
11959 gridmode = 1; // one dimensional array
11960 else
11961 {
11962 lua_pop( L, 1 ); // pop "1"
11963 lua_pop( L, 1 ); // pop "xg"
11964 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
11965 SWIG_fail;
11966 }
11967 lua_pop( L, 1 ); // pop test element
11968 if ( gridmode == 1 )
11969 {
11970 cgrid113.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
11971 if ( !cgrid113.xg )
11972 {
11973 lua_pop( L, 1 ); // pop "xg"
11974 SWIG_fail;
11975 }
11976 if ( nx != Xlen )
11977 {
11978 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
11979 SWIG_fail;
11980 }
11981 cgrid113.nx = nx;
11982 }
11983 else
11984 {
11985 cgrid213.xg = read_double_Matrix( L, -1, &nx, &ny );
11986 if ( !cgrid213.xg )
11987 {
11988 lua_pop( L, 1 ); // pop "xg"
11989 SWIG_fail;
11990 }
11991 if ( ( nx != Xlen ) || ( ny != Ylen ) )
11992 {
11993 lua_pop( L, 1 ); // pop "xg"
11994 lua_pushfstring( L, "Vectors must match matrix." );
11995 SWIG_fail;
11996 }
11997 cgrid213.nx = nx;
11998 cgrid213.ny = ny;
11999 }
12000 lua_pop( L, 1 ); // pop "xg"
12001
12002 lua_pushstring( L, "yg" );
12003 lua_gettable( L, 11 );
12004 if ( !lua_istable( L, -1 ) )
12005 {
12006 lua_pop( L, 1 );
12007 lua_pushstring( L, "expected a table yg" );
12008 SWIG_fail;
12009 }
12010 lua_rawgeti( L, -1, 1 );
12011 if ( gridmode == 2 )
12012 {
12013 if ( !lua_istable( L, -1 ) )
12014 {
12015 lua_pop( L, 1 ); // pop "1"
12016 lua_pop( L, 1 ); // pop "yg"
12017 lua_pushstring( L, "expected a two dimensional array/table in yg" );
12018 SWIG_fail;
12019 }
12020 }
12021 else
12022 {
12023 if ( !lua_isnumber( L, -1 ) )
12024 {
12025 lua_pop( L, 1 ); // pop "1"
12026 lua_pop( L, 1 ); // pop "yg"
12027 lua_pushstring( L, "expected a one dimensional array/table in yg" );
12028 SWIG_fail;
12029 }
12030 }
12031 lua_pop( L, 1 ); // pop "1"
12032 if ( gridmode == 1 )
12033 {
12034 cgrid113.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
12035 if ( !cgrid113.yg )
12036 {
12037 lua_pop( L, 1 ); // pop "yg"
12038 SWIG_fail;
12039 }
12040 if ( ny != Ylen )
12041 {
12042 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
12043 SWIG_fail;
12044 }
12045 cgrid113.ny = ny;
12046 }
12047 else
12048 {
12049 cgrid213.yg = read_double_Matrix( L, -1, &nx, &ny );
12050 if ( !cgrid213.yg )
12051 {
12052 lua_pop( L, 1 ); // pop "xg"
12053 SWIG_fail;
12054 }
12055 if ( ( nx != Xlen ) || ( ny != Ylen ) )
12056 {
12057 lua_pop( L, 1 ); // pop "xg"
12058 lua_pushfstring( L, "Vectors must match matrix." );
12059 SWIG_fail;
12060 }
12061 // cgrid213.nx/ny already set
12062 }
12063 lua_pop( L, 1 ); // pop "yg"
12064
12065 if ( gridmode == 1 )
12066 arg13 = &cgrid113;
12067 else if ( gridmode == 2 )
12068 arg13 = &cgrid213;
12069 }
12070 }
12071 plimagefr((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
12072
12073 {
12074 int i;
12075
12076 if ( arg1 )
12077 {
12078 for ( i = 0; i < ii1; i++ )
12079 LUA_FREE_ARRAY( arg1[i] );
12080 LUA_FREE_ARRAY( arg1 );
12081 }
12082 }
12083 {
12084 mypltr_funcstr[0] = '\0';
12085 }
12086 {
12087 int i;
12088
12089 LUA_FREE_ARRAY( cgrid113.xg );
12090 LUA_FREE_ARRAY( cgrid113.yg );
12091
12092 if ( cgrid213.xg )
12093 {
12094 for ( i = 0; i < Xlen; i++ )
12095 LUA_FREE_ARRAY( cgrid213.xg[i] );
12096 LUA_FREE_ARRAY( cgrid213.xg );
12097 }
12098 if ( cgrid213.yg )
12099 {
12100 for ( i = 0; i < Xlen; i++ )
12101 LUA_FREE_ARRAY( cgrid213.yg[i] );
12102 LUA_FREE_ARRAY( cgrid213.yg );
12103 }
12104 }
12105 return SWIG_arg;
12106
12107 fail: SWIGUNUSED;
12108 {
12109 int i;
12110
12111 if ( arg1 )
12112 {
12113 for ( i = 0; i < ii1; i++ )
12114 LUA_FREE_ARRAY( arg1[i] );
12115 LUA_FREE_ARRAY( arg1 );
12116 }
12117 }
12118 {
12119 mypltr_funcstr[0] = '\0';
12120 }
12121 {
12122 int i;
12123
12124 LUA_FREE_ARRAY( cgrid113.xg );
12125 LUA_FREE_ARRAY( cgrid113.yg );
12126
12127 if ( cgrid213.xg )
12128 {
12129 for ( i = 0; i < Xlen; i++ )
12130 LUA_FREE_ARRAY( cgrid213.xg[i] );
12131 LUA_FREE_ARRAY( cgrid213.xg );
12132 }
12133 if ( cgrid213.yg )
12134 {
12135 for ( i = 0; i < Xlen; i++ )
12136 LUA_FREE_ARRAY( cgrid213.yg[i] );
12137 LUA_FREE_ARRAY( cgrid213.yg );
12138 }
12139 }
12140 lua_error(L);
12141 return 0;
12142}
12143
12144
12145static int _wrap_plClearOpts(lua_State* L) {
12146 int SWIG_arg = 0;
12147
12148 SWIG_check_num_args("plClearOpts",0,0)
12149 plClearOpts();
12150
12151 return SWIG_arg;
12152
12153 fail: SWIGUNUSED;
12154 lua_error(L);
12155 return 0;
12156}
12157
12158
12159static int _wrap_plResetOpts(lua_State* L) {
12160 int SWIG_arg = 0;
12161
12162 SWIG_check_num_args("plResetOpts",0,0)
12163 plResetOpts();
12164
12165 return SWIG_arg;
12166
12167 fail: SWIGUNUSED;
12168 lua_error(L);
12169 return 0;
12170}
12171
12172
12173static int _wrap_plSetUsage(lua_State* L) {
12174 int SWIG_arg = 0;
12175 char *arg1 = (char *) 0 ;
12176 char *arg2 = (char *) 0 ;
12177
12178 SWIG_check_num_args("plSetUsage",2,2)
12179 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plSetUsage",1,"char const *");
12180 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plSetUsage",2,"char const *");
12181 arg1 = (char *)lua_tostring(L, 1);
12182 arg2 = (char *)lua_tostring(L, 2);
12183 plSetUsage((char const *)arg1,(char const *)arg2);
12184
12185 return SWIG_arg;
12186
12187 fail: SWIGUNUSED;
12188 lua_error(L);
12189 return 0;
12190}
12191
12192
12193static int _wrap_plOptUsage(lua_State* L) {
12194 int SWIG_arg = 0;
12195
12196 SWIG_check_num_args("plOptUsage",0,0)
12197 plOptUsage();
12198
12199 return SWIG_arg;
12200
12201 fail: SWIGUNUSED;
12202 lua_error(L);
12203 return 0;
12204}
12205
12206
12207static int _wrap_MinMax2dGrid(lua_State* L) {
12208 int SWIG_arg = 0;
12209 PLFLT **arg1 = (PLFLT **) 0 ;
12210 PLINT arg2 ;
12211 PLINT arg3 ;
12212 PLFLT *arg4 = (PLFLT *) 0 ;
12213 PLFLT *arg5 = (PLFLT *) 0 ;
12214 int ii1 ;
12215 PLFLT temp4 ;
12216 PLFLT temp5 ;
12217
12218 arg4 = &temp4;
12219 arg5 = &temp5;
12220 SWIG_check_num_args("plMinMax2dGrid",1,1)
12221 {
12222 int jj;
12223
12224 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
12225 if ( !arg1 )
12226 SWIG_fail;
12227 Xlen = arg2 = ii1;
12228 Ylen = arg3 = jj;
12229 }
12230 plMinMax2dGrid((double const **)arg1,arg2,arg3,arg4,arg5);
12231
12232 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
12233 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
12234 {
12235 int i;
12236
12237 if ( arg1 )
12238 {
12239 for ( i = 0; i < ii1; i++ )
12240 LUA_FREE_ARRAY( arg1[i] );
12241 LUA_FREE_ARRAY( arg1 );
12242 }
12243 }
12244 return SWIG_arg;
12245
12246 fail: SWIGUNUSED;
12247 {
12248 int i;
12249
12250 if ( arg1 )
12251 {
12252 for ( i = 0; i < ii1; i++ )
12253 LUA_FREE_ARRAY( arg1[i] );
12254 LUA_FREE_ARRAY( arg1 );
12255 }
12256 }
12257 lua_error(L);
12258 return 0;
12259}
12260
12261
12262static int _wrap_plGetCursor(lua_State* L) {
12263 int SWIG_arg = 0;
12264 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
12265 PLINT result;
12266
12267 SWIG_check_num_args("plGetCursor",1,1)
12268 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("plGetCursor",1,"PLGraphicsIn *");
12269
12270 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
12271 SWIG_fail_ptr("plGetCursor",1,SWIGTYPE_p_PLGraphicsIn);
12272 }
12273
12274 result = (PLINT)plGetCursor(arg1);
12275 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
12276 return SWIG_arg;
12277
12278 fail: SWIGUNUSED;
12279 lua_error(L);
12280 return 0;
12281}
12282
12283
12284static int _wrap_warn(lua_State* L) {
12285 int SWIG_arg = 0;
12286 char *arg1 = (char *) 0 ;
12287
12288 SWIG_check_num_args("plwarn",1,1)
12289 if(!lua_isstring(L,1)) SWIG_fail_arg("plwarn",1,"char const *");
12290 {
12291 arg1 = (char *) lua_tostring( L, 1 );
12292 }
12293 plwarn((char const *)arg1);
12294
12295 return SWIG_arg;
12296
12297 fail: SWIGUNUSED;
12298 lua_error(L);
12299 return 0;
12300}
12301
12302
12303static int _wrap_abort(lua_State* L) {
12304 int SWIG_arg = 0;
12305 char *arg1 = (char *) 0 ;
12306
12307 SWIG_check_num_args("plabort",1,1)
12308 if(!lua_isstring(L,1)) SWIG_fail_arg("plabort",1,"char const *");
12309 {
12310 arg1 = (char *) lua_tostring( L, 1 );
12311 }
12312 plabort((char const *)arg1);
12313
12314 return SWIG_arg;
12315
12316 fail: SWIGUNUSED;
12317 lua_error(L);
12318 return 0;
12319}
12320
12321
12323 {0,0,0}
12324};
12326 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_RGB", 1)},
12327 {SWIG_LUA_CONSTTAB_INT("PLESC_ALLOC_NCOL", 2)},
12328 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_LPB", 3)},
12329 {SWIG_LUA_CONSTTAB_INT("PLESC_EXPOSE", 4)},
12330 {SWIG_LUA_CONSTTAB_INT("PLESC_RESIZE", 5)},
12331 {SWIG_LUA_CONSTTAB_INT("PLESC_REDRAW", 6)},
12332 {SWIG_LUA_CONSTTAB_INT("PLESC_TEXT", 7)},
12333 {SWIG_LUA_CONSTTAB_INT("PLESC_GRAPH", 8)},
12334 {SWIG_LUA_CONSTTAB_INT("PLESC_FILL", 9)},
12335 {SWIG_LUA_CONSTTAB_INT("PLESC_DI", 10)},
12336 {SWIG_LUA_CONSTTAB_INT("PLESC_FLUSH", 11)},
12337 {SWIG_LUA_CONSTTAB_INT("PLESC_EH", 12)},
12338 {SWIG_LUA_CONSTTAB_INT("PLESC_GETC", 13)},
12339 {SWIG_LUA_CONSTTAB_INT("PLESC_SWIN", 14)},
12340 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING", 15)},
12341 {SWIG_LUA_CONSTTAB_INT("PLESC_XORMOD", 16)},
12342 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_COMPRESSION", 17)},
12343 {SWIG_LUA_CONSTTAB_INT("PLESC_CLEAR", 18)},
12344 {SWIG_LUA_CONSTTAB_INT("PLESC_DASH", 19)},
12345 {SWIG_LUA_CONSTTAB_INT("PLESC_HAS_TEXT", 20)},
12346 {SWIG_LUA_CONSTTAB_INT("PLESC_IMAGE", 21)},
12347 {SWIG_LUA_CONSTTAB_INT("PLESC_IMAGEOPS", 22)},
12348 {SWIG_LUA_CONSTTAB_INT("PLESC_PL2DEVCOL", 23)},
12349 {SWIG_LUA_CONSTTAB_INT("PLESC_DEV2PLCOL", 24)},
12350 {SWIG_LUA_CONSTTAB_INT("PLESC_SETBGFG", 25)},
12351 {SWIG_LUA_CONSTTAB_INT("PLESC_DEVINIT", 26)},
12352 {SWIG_LUA_CONSTTAB_INT("PLESC_GETBACKEND", 27)},
12353 {SWIG_LUA_CONSTTAB_INT("PLESC_BEGIN_TEXT", 28)},
12354 {SWIG_LUA_CONSTTAB_INT("PLESC_TEXT_CHAR", 29)},
12355 {SWIG_LUA_CONSTTAB_INT("PLESC_CONTROL_CHAR", 30)},
12356 {SWIG_LUA_CONSTTAB_INT("PLESC_END_TEXT", 31)},
12357 {SWIG_LUA_CONSTTAB_INT("PLESC_START_RASTERIZE", 32)},
12358 {SWIG_LUA_CONSTTAB_INT("PLESC_END_RASTERIZE", 33)},
12359 {SWIG_LUA_CONSTTAB_INT("PLESC_ARC", 34)},
12360 {SWIG_LUA_CONSTTAB_INT("PLESC_GRADIENT", 35)},
12361 {SWIG_LUA_CONSTTAB_INT("PLESC_MODESET", 36)},
12362 {SWIG_LUA_CONSTTAB_INT("PLESC_MODEGET", 37)},
12363 {SWIG_LUA_CONSTTAB_INT("PLESC_FIXASPECT", 38)},
12364 {SWIG_LUA_CONSTTAB_INT("PLESC_IMPORT_BUFFER", 39)},
12365 {SWIG_LUA_CONSTTAB_INT("PLESC_APPEND_BUFFER", 40)},
12366 {SWIG_LUA_CONSTTAB_INT("PLESC_FLUSH_REMAINING_BUFFER", 41)},
12367 {SWIG_LUA_CONSTTAB_INT("PLTEXT_FONTCHANGE", 0)},
12368 {SWIG_LUA_CONSTTAB_INT("PLTEXT_SUPERSCRIPT", 1)},
12369 {SWIG_LUA_CONSTTAB_INT("PLTEXT_SUBSCRIPT", 2)},
12370 {SWIG_LUA_CONSTTAB_INT("PLTEXT_BACKCHAR", 3)},
12371 {SWIG_LUA_CONSTTAB_INT("PLTEXT_OVERLINE", 4)},
12372 {SWIG_LUA_CONSTTAB_INT("PLTEXT_UNDERLINE", 5)},
12373 {SWIG_LUA_CONSTTAB_INT("ZEROW2B", 1)},
12374 {SWIG_LUA_CONSTTAB_INT("ZEROW2D", 2)},
12375 {SWIG_LUA_CONSTTAB_INT("ONEW2B", 3)},
12376 {SWIG_LUA_CONSTTAB_INT("ONEW2D", 4)},
12377 {SWIG_LUA_CONSTTAB_INT("PLSWIN_DEVICE", 1)},
12378 {SWIG_LUA_CONSTTAB_INT("PLSWIN_WORLD", 2)},
12379 {SWIG_LUA_CONSTTAB_INT("PL_X_AXIS", 1)},
12380 {SWIG_LUA_CONSTTAB_INT("PL_Y_AXIS", 2)},
12381 {SWIG_LUA_CONSTTAB_INT("PL_Z_AXIS", 3)},
12382 {SWIG_LUA_CONSTTAB_INT("PL_OPT_ENABLED", 0x0001)},
12383 {SWIG_LUA_CONSTTAB_INT("PL_OPT_ARG", 0x0002)},
12384 {SWIG_LUA_CONSTTAB_INT("PL_OPT_NODELETE", 0x0004)},
12385 {SWIG_LUA_CONSTTAB_INT("PL_OPT_INVISIBLE", 0x0008)},
12386 {SWIG_LUA_CONSTTAB_INT("PL_OPT_DISABLED", 0x0010)},
12387 {SWIG_LUA_CONSTTAB_INT("PL_OPT_FUNC", 0x0100)},
12388 {SWIG_LUA_CONSTTAB_INT("PL_OPT_BOOL", 0x0200)},
12389 {SWIG_LUA_CONSTTAB_INT("PL_OPT_INT", 0x0400)},
12390 {SWIG_LUA_CONSTTAB_INT("PL_OPT_FLOAT", 0x0800)},
12391 {SWIG_LUA_CONSTTAB_INT("PL_OPT_STRING", 0x1000)},
12392 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_PARTIAL", 0x0000)},
12393 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_FULL", 0x0001)},
12394 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_QUIET", 0x0002)},
12395 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NODELETE", 0x0004)},
12396 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_SHOWALL", 0x0008)},
12397 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_OVERRIDE", 0x0010)},
12398 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NOPROGRAM", 0x0020)},
12399 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NODASH", 0x0040)},
12400 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_SKIP", 0x0080)},
12401 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MARK", 0x80000000)},
12402 {SWIG_LUA_CONSTTAB_INT("PL_FCI_IMPOSSIBLE", 0x00000000)},
12403 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXDIGIT_MASK", 0xf)},
12404 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXPOWER_MASK", 0x7)},
12405 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXPOWER_IMPOSSIBLE", 0xf)},
12406 {SWIG_LUA_CONSTTAB_INT("PL_FCI_FAMILY", 0x0)},
12407 {SWIG_LUA_CONSTTAB_INT("PL_FCI_STYLE", 0x1)},
12408 {SWIG_LUA_CONSTTAB_INT("PL_FCI_WEIGHT", 0x2)},
12409 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SANS", 0x0)},
12410 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SERIF", 0x1)},
12411 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MONO", 0x2)},
12412 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SCRIPT", 0x3)},
12413 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SYMBOL", 0x4)},
12414 {SWIG_LUA_CONSTTAB_INT("PL_FCI_UPRIGHT", 0x0)},
12415 {SWIG_LUA_CONSTTAB_INT("PL_FCI_ITALIC", 0x1)},
12416 {SWIG_LUA_CONSTTAB_INT("PL_FCI_OBLIQUE", 0x2)},
12417 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MEDIUM", 0x0)},
12418 {SWIG_LUA_CONSTTAB_INT("PL_FCI_BOLD", 0x1)},
12419 {SWIG_LUA_CONSTTAB_INT("PL_MAXKEY", 16)},
12420 {SWIG_LUA_CONSTTAB_INT("PL_MASK_SHIFT", 0x1)},
12421 {SWIG_LUA_CONSTTAB_INT("PL_MASK_CAPS", 0x2)},
12422 {SWIG_LUA_CONSTTAB_INT("PL_MASK_CONTROL", 0x4)},
12423 {SWIG_LUA_CONSTTAB_INT("PL_MASK_ALT", 0x8)},
12424 {SWIG_LUA_CONSTTAB_INT("PL_MASK_NUM", 0x10)},
12425 {SWIG_LUA_CONSTTAB_INT("PL_MASK_ALTGR", 0x20)},
12426 {SWIG_LUA_CONSTTAB_INT("PL_MASK_WIN", 0x40)},
12427 {SWIG_LUA_CONSTTAB_INT("PL_MASK_SCROLL", 0x80)},
12428 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON1", 0x100)},
12429 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON2", 0x200)},
12430 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON3", 0x400)},
12431 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON4", 0x800)},
12432 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON5", 0x1000)},
12433 {SWIG_LUA_CONSTTAB_INT("PL_MAXWINDOWS", 64)},
12434 {SWIG_LUA_CONSTTAB_INT("PL_NOTSET", (-42))},
12435 {SWIG_LUA_CONSTTAB_INT("PL_DEFAULT_NCOL0", 16)},
12436 {SWIG_LUA_CONSTTAB_INT("PL_DEFAULT_NCOL1", 128)},
12437 {SWIG_LUA_CONSTTAB_INT("MIN_PLINT_RGB", 0)},
12438 {SWIG_LUA_CONSTTAB_INT("MAX_PLINT_RGB", 255)},
12439 {SWIG_LUA_CONSTTAB_FLOAT("MIN_PLFLT_CMAP1", 0.)},
12440 {SWIG_LUA_CONSTTAB_FLOAT("MAX_PLFLT_CMAP1", 1.)},
12441 {SWIG_LUA_CONSTTAB_FLOAT("MIN_PLFLT_ALPHA", 0.)},
12442 {SWIG_LUA_CONSTTAB_FLOAT("MAX_PLFLT_ALPHA", 1.)},
12443 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_ENABLE", 1)},
12444 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_DISABLE", 2)},
12445 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_QUERY", 3)},
12446 {SWIG_LUA_CONSTTAB_INT("PL_BIN_DEFAULT", 0x0)},
12447 {SWIG_LUA_CONSTTAB_INT("PL_BIN_CENTRED", 0x1)},
12448 {SWIG_LUA_CONSTTAB_INT("PL_BIN_NOEXPAND", 0x2)},
12449 {SWIG_LUA_CONSTTAB_INT("PL_BIN_NOEMPTY", 0x4)},
12450 {SWIG_LUA_CONSTTAB_INT("GRID_CSA", 1)},
12451 {SWIG_LUA_CONSTTAB_INT("GRID_DTLI", 2)},
12452 {SWIG_LUA_CONSTTAB_INT("GRID_NNI", 3)},
12453 {SWIG_LUA_CONSTTAB_INT("GRID_NNIDW", 4)},
12454 {SWIG_LUA_CONSTTAB_INT("GRID_NNLI", 5)},
12455 {SWIG_LUA_CONSTTAB_INT("GRID_NNAIDW", 6)},
12456 {SWIG_LUA_CONSTTAB_INT("PL_HIST_DEFAULT", 0x00)},
12457 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOSCALING", 0x01)},
12458 {SWIG_LUA_CONSTTAB_INT("PL_HIST_IGNORE_OUTLIERS", 0x02)},
12459 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOEXPAND", 0x08)},
12460 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOEMPTY", 0x10)},
12461 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_NULL", 0x0)},
12462 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_LEFT", 0x1)},
12463 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_RIGHT", 0x2)},
12464 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_TOP", 0x4)},
12465 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_BOTTOM", 0x8)},
12466 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_INSIDE", 0x10)},
12467 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_OUTSIDE", 0x20)},
12468 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_VIEWPORT", 0x40)},
12469 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_SUBPAGE", 0x80)},
12470 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_NULL", 0x0)},
12471 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_NONE", 0x1)},
12472 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_COLOR_BOX", 0x2)},
12473 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_LINE", 0x4)},
12474 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_SYMBOL", 0x8)},
12475 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_TEXT_LEFT", 0x10)},
12476 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_BACKGROUND", 0x20)},
12477 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_BOUNDING_BOX", 0x40)},
12478 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_ROW_MAJOR", 0x80)},
12479 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_NULL", 0x0)},
12480 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_LEFT", 0x1)},
12481 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_RIGHT", 0x2)},
12482 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_TOP", 0x4)},
12483 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_BOTTOM", 0x8)},
12484 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_IMAGE", 0x10)},
12485 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_SHADE", 0x20)},
12486 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_GRADIENT", 0x40)},
12487 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_NONE", 0x80)},
12488 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_LOW", 0x100)},
12489 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_HIGH", 0x200)},
12490 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_SHADE_LABEL", 0x400)},
12491 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_RIGHT", 0x800)},
12492 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_TOP", 0x1000)},
12493 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_LEFT", 0x2000)},
12494 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_BOTTOM", 0x4000)},
12495 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_BACKGROUND", 0x8000)},
12496 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_BOUNDING_BOX", 0x10000)},
12497 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_UNKNOWN", 0x0)},
12498 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_DEFAULT", 0x1)},
12499 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_REPLACE", 0x2)},
12500 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_XOR", 0x4)},
12501 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEX", 0x001)},
12502 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEY", 0x002)},
12503 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEXY", 0x003)},
12504 {SWIG_LUA_CONSTTAB_INT("MAG_COLOR", 0x004)},
12505 {SWIG_LUA_CONSTTAB_INT("BASE_CONT", 0x008)},
12506 {SWIG_LUA_CONSTTAB_INT("TOP_CONT", 0x010)},
12507 {SWIG_LUA_CONSTTAB_INT("SURF_CONT", 0x020)},
12508 {SWIG_LUA_CONSTTAB_INT("DRAW_SIDES", 0x040)},
12509 {SWIG_LUA_CONSTTAB_INT("FACETED", 0x080)},
12510 {SWIG_LUA_CONSTTAB_INT("MESH", 0x100)},
12511 {0,0,0,0,0,0}
12512};
12514 { "setcontlabelformat", _wrap_setcontlabelformat},
12515 { "setcontlabelparam", _wrap_setcontlabelparam},
12516 { "adv", _wrap_adv},
12517 { "arc", _wrap_arc},
12518 { "axes", _wrap_axes},
12519 { "bin", _wrap_bin},
12520 { "btime", _wrap_btime},
12521 { "bop", _wrap_bop},
12522 { "box", _wrap_box},
12523 { "box3", _wrap_box3},
12524 { "calc_world", _wrap_calc_world},
12525 { "clear", _wrap_clear},
12526 { "col0", _wrap_col0},
12527 { "col1", _wrap_col1},
12528 { "configtime", _wrap_configtime},
12529 { "cont", _wrap_cont},
12530 { "ctime", _wrap_ctime},
12531 { "cpstrm", _wrap_cpstrm},
12532 { "plend", _wrap_plend},
12533 { "plend1", _wrap_plend1},
12534 { "env", _wrap_env},
12535 { "env0", _wrap_env0},
12536 { "eop", _wrap_eop},
12537 { "errx", _wrap_errx},
12538 { "erry", _wrap_erry},
12539 { "famadv", _wrap_famadv},
12540 { "fill", _wrap_fill},
12541 { "fill3", _wrap_fill3},
12542 { "gradient", _wrap_gradient},
12543 { "flush", _wrap_flush},
12544 { "font", _wrap_font},
12545 { "fontld", _wrap_fontld},
12546 { "gchr", _wrap_gchr},
12547 { "gcol0", _wrap_gcol0},
12548 { "gcol0a", _wrap_gcol0a},
12549 { "gcolbg", _wrap_gcolbg},
12550 { "gcolbga", _wrap_gcolbga},
12551 { "gcompression", _wrap_gcompression},
12552 { "gdev", _wrap_gdev},
12553 { "gdidev", _wrap_gdidev},
12554 { "gdiori", _wrap_gdiori},
12555 { "gdiplt", _wrap_gdiplt},
12556 { "gfam", _wrap_gfam},
12557 { "gfci", _wrap_gfci},
12558 { "gfnam", _wrap_gfnam},
12559 { "gfont", _wrap_gfont},
12560 { "glevel", _wrap_glevel},
12561 { "gpage", _wrap_gpage},
12562 { "gra", _wrap_gra},
12563 { "griddata", _wrap_griddata},
12564 { "gspa", _wrap_gspa},
12565 { "gstrm", _wrap_gstrm},
12566 { "gver", _wrap_gver},
12567 { "gvpd", _wrap_gvpd},
12568 { "gvpw", _wrap_gvpw},
12569 { "gxax", _wrap_gxax},
12570 { "gyax", _wrap_gyax},
12571 { "gzax", _wrap_gzax},
12572 { "hist", _wrap_hist},
12573 { "hlsrgb", _wrap_hlsrgb},
12574 { "init", _wrap_init},
12575 { "join", _wrap_join},
12576 { "lab", _wrap_lab},
12577 { "legend", _wrap_legend},
12578 { "colorbar", _wrap_colorbar},
12579 { "lightsource", _wrap_lightsource},
12580 { "line", _wrap_line},
12581 { "line3", _wrap_line3},
12582 { "lsty", _wrap_lsty},
12583 { "mesh", _wrap_mesh},
12584 { "meshc", _wrap_meshc},
12585 { "mkstrm", _wrap_mkstrm},
12586 { "mtex", _wrap_mtex},
12587 { "mtex3", _wrap_mtex3},
12588 { "plot3d", _wrap_plot3d},
12589 { "plot3dc", _wrap_plot3dc},
12590 { "plot3dcl", _wrap_plot3dcl},
12591 { "surf3d", _wrap_surf3d},
12592 { "surf3dl", _wrap_surf3dl},
12593 { "parseopts", _wrap_parseopts},
12594 { "pat", _wrap_pat},
12595 { "path", _wrap_path},
12596 { "poin", _wrap_poin},
12597 { "poin3", _wrap_poin3},
12598 { "poly3", _wrap_poly3},
12599 { "prec", _wrap_prec},
12600 { "psty", _wrap_psty},
12601 { "ptex", _wrap_ptex},
12602 { "ptex3", _wrap_ptex3},
12603 { "randd", _wrap_randd},
12604 { "replot", _wrap_replot},
12605 { "rgbhls", _wrap_rgbhls},
12606 { "schr", _wrap_schr},
12607 { "scmap0", _wrap_scmap0},
12608 { "scmap0a", _wrap_scmap0a},
12609 { "scmap0n", _wrap_scmap0n},
12610 { "scmap1", _wrap_scmap1},
12611 { "scmap1a", _wrap_scmap1a},
12612 { "scmap1l", _wrap_scmap1l},
12613 { "scmap1la", _wrap_scmap1la},
12614 { "scmap1n", _wrap_scmap1n},
12615 { "scmap1_range", _wrap_scmap1_range},
12616 { "gcmap1_range", _wrap_gcmap1_range},
12617 { "scol0", _wrap_scol0},
12618 { "scol0a", _wrap_scol0a},
12619 { "scolbg", _wrap_scolbg},
12620 { "scolbga", _wrap_scolbga},
12621 { "scolor", _wrap_scolor},
12622 { "scompression", _wrap_scompression},
12623 { "sdev", _wrap_sdev},
12624 { "sdidev", _wrap_sdidev},
12625 { "sdimap", _wrap_sdimap},
12626 { "sdiori", _wrap_sdiori},
12627 { "sdiplt", _wrap_sdiplt},
12628 { "sdiplz", _wrap_sdiplz},
12629 { "seed", _wrap_seed},
12630 { "sesc", _wrap_sesc},
12631 { "setopt", _wrap_setopt},
12632 { "sfam", _wrap_sfam},
12633 { "sfci", _wrap_sfci},
12634 { "sfnam", _wrap_sfnam},
12635 { "sfont", _wrap_sfont},
12636 { "shades", _wrap_shades},
12637 { "shade", _wrap_shade},
12638 { "slabelfunc", _wrap_slabelfunc},
12639 { "smaj", _wrap_smaj},
12640 { "smin", _wrap_smin},
12641 { "sori", _wrap_sori},
12642 { "spage", _wrap_spage},
12643 { "spal0", _wrap_spal0},
12644 { "spal1", _wrap_spal1},
12645 { "spause", _wrap_spause},
12646 { "sstrm", _wrap_sstrm},
12647 { "ssub", _wrap_ssub},
12648 { "ssym", _wrap_ssym},
12649 { "star", _wrap_star},
12650 { "start", _wrap_start},
12651 { "stransform", _wrap_stransform},
12652 { "string", _wrap_string},
12653 { "string3", _wrap_string3},
12654 { "stripa", _wrap_stripa},
12655 { "stripc", _wrap_stripc},
12656 { "stripd", _wrap_stripd},
12657 { "styl", _wrap_styl},
12658 { "svect", _wrap_svect},
12659 { "svpa", _wrap_svpa},
12660 { "sxax", _wrap_sxax},
12661 { "syax", _wrap_syax},
12662 { "sym", _wrap_sym},
12663 { "szax", _wrap_szax},
12664 { "text", _wrap_text},
12665 { "timefmt", _wrap_timefmt},
12666 { "vasp", _wrap_vasp},
12667 { "vect", _wrap_vect},
12668 { "vpas", _wrap_vpas},
12669 { "vpor", _wrap_vpor},
12670 { "vsta", _wrap_vsta},
12671 { "w3d", _wrap_w3d},
12672 { "width", _wrap_width},
12673 { "wind", _wrap_wind},
12674 { "xormod", _wrap_xormod},
12675 { "map", _wrap_map},
12676 { "mapline", _wrap_mapline},
12677 { "mapstring", _wrap_mapstring},
12678 { "maptex", _wrap_maptex},
12679 { "mapfill", _wrap_mapfill},
12680 { "meridians", _wrap_meridians},
12681 { "image", _wrap_image},
12682 { "imagefr", _wrap_imagefr},
12683 { "plClearOpts", _wrap_plClearOpts},
12684 { "plResetOpts", _wrap_plResetOpts},
12685 { "plSetUsage", _wrap_plSetUsage},
12686 { "plOptUsage", _wrap_plOptUsage},
12687 { "MinMax2dGrid", _wrap_MinMax2dGrid},
12688 { "plGetCursor", _wrap_plGetCursor},
12689 { "warn", _wrap_warn},
12690 { "abort", _wrap_abort},
12691 {0,0}
12692};
12695 0
12696};
12698 0
12699};
12700
12702 "plplotluac",
12708};
12709#ifdef __cplusplus
12710}
12711#endif
12712
12713/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
12714
12715static swig_type_info _swigt__p_PLGraphicsIn = {"_p_PLGraphicsIn", "PLGraphicsIn *", 0, 0, (void*)&_wrap_class_PLGraphicsIn, 0};
12716static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
12717static swig_type_info _swigt__p_double = {"_p_double", "PLFLT *|double *", 0, 0, (void*)0, 0};
12718static swig_type_info _swigt__p_f_double_double__int = {"_p_f_double_double__int", "defined_func|int (*)(double,double)", 0, 0, (void*)0, 0};
12719static 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};
12720static 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};
12721static 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};
12722static 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};
12723static swig_type_info _swigt__p_int = {"_p_int", "PLBOOL *|PLINT *|int *", 0, 0, (void*)0, 0};
12724static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
12725static swig_type_info _swigt__p_p_double = {"_p_p_double", "PLFLT **|double **", 0, 0, (void*)0, 0};
12726static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "PLUNICODE *|unsigned int *", 0, 0, (void*)0, 0};
12727
12741};
12742
12743static swig_cast_info _swigc__p_PLGraphicsIn[] = { {&_swigt__p_PLGraphicsIn, 0, 0, 0},{0, 0, 0, 0}};
12744static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
12745static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
12751static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
12752static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
12753static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
12754static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
12755
12769};
12770
12771
12772/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
12773
12774/* -----------------------------------------------------------------------------
12775 * Type initialization:
12776 * This problem is tough by the requirement that no dynamic
12777 * memory is used. Also, since swig_type_info structures store pointers to
12778 * swig_cast_info structures and swig_cast_info structures store pointers back
12779 * to swig_type_info structures, we need some lookup code at initialization.
12780 * The idea is that swig generates all the structures that are needed.
12781 * The runtime then collects these partially filled structures.
12782 * The SWIG_InitializeModule function takes these initial arrays out of
12783 * swig_module, and does all the lookup, filling in the swig_module.types
12784 * array with the correct data and linking the correct swig_cast_info
12785 * structures together.
12786 *
12787 * The generated swig_type_info structures are assigned statically to an initial
12788 * array. We just loop through that array, and handle each type individually.
12789 * First we lookup if this type has been already loaded, and if so, use the
12790 * loaded structure instead of the generated one. Then we have to fill in the
12791 * cast linked list. The cast data is initially stored in something like a
12792 * two-dimensional array. Each row corresponds to a type (there are the same
12793 * number of rows as there are in the swig_type_initial array). Each entry in
12794 * a column is one of the swig_cast_info structures for that type.
12795 * The cast_initial array is actually an array of arrays, because each row has
12796 * a variable number of columns. So to actually build the cast linked list,
12797 * we find the array of casts associated with the type, and loop through it
12798 * adding the casts to the list. The one last trick we need to do is making
12799 * sure the type pointer in the swig_cast_info struct is correct.
12800 *
12801 * First off, we lookup the cast->type name to see if it is already loaded.
12802 * There are three cases to handle:
12803 * 1) If the cast->type has already been loaded AND the type we are adding
12804 * casting info to has not been loaded (it is in this module), THEN we
12805 * replace the cast->type pointer with the type pointer that has already
12806 * been loaded.
12807 * 2) If BOTH types (the one we are adding casting info to, and the
12808 * cast->type) are loaded, THEN the cast info has already been loaded by
12809 * the previous module so we just ignore it.
12810 * 3) Finally, if cast->type has not already been loaded, then we add that
12811 * swig_cast_info to the linked list (because the cast->type) pointer will
12812 * be correct.
12813 * ----------------------------------------------------------------------------- */
12814
12815#ifdef __cplusplus
12816extern "C" {
12817#if 0
12818} /* c-mode */
12819#endif
12820#endif
12821
12822#if 0
12823#define SWIGRUNTIME_DEBUG
12824#endif
12825
12826#ifndef SWIG_INIT_CLIENT_DATA_TYPE
12827#define SWIG_INIT_CLIENT_DATA_TYPE void *
12828#endif
12829
12830SWIGRUNTIME void
12832 size_t i;
12833 swig_module_info *module_head, *iter;
12834 int init;
12835
12836 /* check to see if the circular list has been setup, if not, set it up */
12837 if (swig_module.next==0) {
12838 /* Initialize the swig_module */
12842 init = 1;
12843 } else {
12844 init = 0;
12845 }
12846
12847 /* Try and load any already created modules */
12848 module_head = SWIG_GetModule(clientdata);
12849 if (!module_head) {
12850 /* This is the first module loaded for this interpreter */
12851 /* so set the swig module into the interpreter */
12852 SWIG_SetModule(clientdata, &swig_module);
12853 } else {
12854 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
12855 iter=module_head;
12856 do {
12857 if (iter==&swig_module) {
12858 /* Our module is already in the list, so there's nothing more to do. */
12859 return;
12860 }
12861 iter=iter->next;
12862 } while (iter!= module_head);
12863
12864 /* otherwise we must add our module into the list */
12865 swig_module.next = module_head->next;
12866 module_head->next = &swig_module;
12867 }
12868
12869 /* When multiple interpreters are used, a module could have already been initialized in
12870 a different interpreter, but not yet have a pointer in this interpreter.
12871 In this case, we do not want to continue adding types... everything should be
12872 set up already */
12873 if (init == 0) return;
12874
12875 /* Now work on filling in swig_module.types */
12876#ifdef SWIGRUNTIME_DEBUG
12877 printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
12878#endif
12879 for (i = 0; i < swig_module.size; ++i) {
12880 swig_type_info *type = 0;
12881 swig_type_info *ret;
12882 swig_cast_info *cast;
12883
12884#ifdef SWIGRUNTIME_DEBUG
12885 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
12886#endif
12887
12888 /* if there is another module already loaded */
12889 if (swig_module.next != &swig_module) {
12891 }
12892 if (type) {
12893 /* Overwrite clientdata field */
12894#ifdef SWIGRUNTIME_DEBUG
12895 printf("SWIG_InitializeModule: found type %s\n", type->name);
12896#endif
12899#ifdef SWIGRUNTIME_DEBUG
12900 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
12901#endif
12902 }
12903 } else {
12904 type = swig_module.type_initial[i];
12905 }
12906
12907 /* Insert casting types */
12908 cast = swig_module.cast_initial[i];
12909 while (cast->type) {
12910
12911 /* Don't need to add information already in the list */
12912 ret = 0;
12913#ifdef SWIGRUNTIME_DEBUG
12914 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
12915#endif
12916 if (swig_module.next != &swig_module) {
12918#ifdef SWIGRUNTIME_DEBUG
12919 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
12920#endif
12921 }
12922 if (ret) {
12923 if (type == swig_module.type_initial[i]) {
12924#ifdef SWIGRUNTIME_DEBUG
12925 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
12926#endif
12927 cast->type = ret;
12928 ret = 0;
12929 } else {
12930 /* Check for casting already in the list */
12931 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
12932#ifdef SWIGRUNTIME_DEBUG
12933 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
12934#endif
12935 if (!ocast) ret = 0;
12936 }
12937 }
12938
12939 if (!ret) {
12940#ifdef SWIGRUNTIME_DEBUG
12941 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
12942#endif
12943 if (type->cast) {
12944 type->cast->prev = cast;
12945 cast->next = type->cast;
12946 }
12947 type->cast = cast;
12948 }
12949 cast++;
12950 }
12951 /* Set entry in modules->types array equal to the type */
12952 swig_module.types[i] = type;
12953 }
12954 swig_module.types[i] = 0;
12955
12956#ifdef SWIGRUNTIME_DEBUG
12957 printf("**** SWIG_InitializeModule: Cast List ******\n");
12958 for (i = 0; i < swig_module.size; ++i) {
12959 int j = 0;
12961 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
12962 while (cast->type) {
12963 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
12964 cast++;
12965 ++j;
12966 }
12967 printf("---- Total casts: %d\n",j);
12968 }
12969 printf("**** SWIG_InitializeModule: Cast List ******\n");
12970#endif
12971}
12972
12973/* This function will propagate the clientdata field of type to
12974* any new swig_type_info structures that have been added into the list
12975* of equivalent types. It is like calling
12976* SWIG_TypeClientData(type, clientdata) a second time.
12977*/
12978SWIGRUNTIME void
12980 size_t i;
12981 swig_cast_info *equiv;
12982 static int init_run = 0;
12983
12984 if (init_run) return;
12985 init_run = 1;
12986
12987 for (i = 0; i < swig_module.size; i++) {
12988 if (swig_module.types[i]->clientdata) {
12989 equiv = swig_module.types[i]->cast;
12990 while (equiv) {
12991 if (!equiv->converter) {
12992 if (equiv->type && !equiv->type->clientdata)
12994 }
12995 equiv = equiv->next;
12996 }
12997 }
12998 }
12999}
13000
13001#ifdef __cplusplus
13002#if 0
13003{ /* c-mode */
13004#endif
13005}
13006#endif
13007
13008
13009
13010/* Forward declaration of where the user's %init{} gets inserted */
13011void SWIG_init_user(lua_State* L );
13012
13013#ifdef __cplusplus
13014extern "C" {
13015#endif
13016/* this is the initialization function
13017 added at the very end of the code
13018 the function is always called SWIG_init, but an earlier #define will rename it
13019*/
13020#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
13021LUALIB_API int SWIG_init(lua_State* L)
13022#else
13023SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
13024#endif
13025{
13026#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
13027 int i;
13028 int globalRegister = 0;
13029 /* start with global table */
13031 /* SWIG's internal initialisation */
13032 SWIG_InitializeModule((void*)L);
13034#endif
13035
13036#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)) || defined(SWIG_LUA_ELUA_EMULATE)
13037 /* add a global fn */
13038 SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
13040#endif
13041
13042#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
13043 /* set up base class pointers (the hierarchy) */
13044 for (i = 0; swig_types[i]; i++){
13045 if (swig_types[i]->clientdata){
13047 }
13048 }
13049#ifdef SWIG_LUA_MODULE_GLOBAL
13050 globalRegister = 1;
13051#endif
13052
13053
13054#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
13055 SWIG_Lua_namespace_register(L,&swig_SwigModule, globalRegister);
13056#endif
13057
13058#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
13059 for (i = 0; swig_types[i]; i++){
13060 if (swig_types[i]->clientdata){
13061 SWIG_Lua_elua_class_register_instance(L,(swig_lua_class*)(swig_types[i]->clientdata));
13062 }
13063 }
13064#endif
13065
13066#if defined(SWIG_LUA_ELUA_EMULATE)
13067 lua_newtable(L);
13068 SWIG_Lua_elua_emulate_register(L,swig_SwigModule.ns_methods);
13069 SWIG_Lua_elua_emulate_register_clear(L);
13070 if(globalRegister) {
13071 lua_pushstring(L,swig_SwigModule.name);
13072 lua_pushvalue(L,-2);
13073 lua_rawset(L,-4);
13074 }
13075#endif
13076
13077#endif
13078
13079#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
13080 /* invoke user-specific initialization */
13081 SWIG_init_user(L);
13082 /* end module */
13083 /* Note: We do not clean up the stack here (Lua will do this for us). At this
13084 point, we have the globals table and out module table on the stack. Returning
13085 one value makes the module table the result of the require command. */
13086 return 1;
13087#else
13088 return 0;
13089#endif
13090}
13091
13092#ifdef __cplusplus
13093}
13094#endif
13095
13096
13097const char* SWIG_LUACODE=
13098 "\n"
13099 " pl = plplotluac";
13100
13101void SWIG_init_user(lua_State* L)
13102{
13103 /* exec Lua code if applicable */
13105}
13106
unsigned int uint
Definition: build/sip.h:95
alias void function(PLINT, PLFLT *, PLFLT *) fill_func
void plOptUsage(void)
Definition: plargs.c:1304
void plClearOpts(void)
Definition: plargs.c:830
void plResetOpts(void)
Definition: plargs.c:843
void plSetUsage(PLCHAR_VECTOR program_string, PLCHAR_VECTOR usage_string)
Definition: plargs.c:1287
void pltr2(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Definition: plcont.c:941
void pltr1(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Definition: plcont.c:874
void pltr0(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer PL_UNUSED(pltr_data))
Definition: plcont.c:858
void plwarn(PLCHAR_VECTOR errormsg)
Definition: plctrl.c:1863
static PLFLT value(double n1, double n2, double hue)
Definition: plctrl.c:1219
void plabort(PLCHAR_VECTOR errormsg)
Definition: plctrl.c:1894
void plMinMax2dGrid(PLFLT_MATRIX f, PLINT nx, PLINT ny, PLFLT *fnmax, PLFLT *fnmin)
Definition: plmem.c:141
PLINT plGetCursor(PLGraphicsIn *plg)
Definition: plpage.c:244
#define plgfci
Definition: plplot.h:735
#define plgstrm
Definition: plplot.h:744
#define plpat
Definition: plplot.h:779
#define plschr
Definition: plplot.h:790
#define plfontld
Definition: plplot.h:721
#define plpath
Definition: plplot.h:761
#define plerry
Definition: plplot.h:715
#define plsfam
Definition: plplot.h:816
#define plsmaj
Definition: plplot.h:826
#define plsmin
Definition: plplot.h:829
#define pleop
Definition: plplot.h:713
#define plimage
Definition: plplot.h:753
#define plstransform
Definition: plplot.h:840
#define plmap
Definition: plplot.h:764
#define plfill
Definition: plplot.h:717
#define plvpas
Definition: plplot.h:859
#define plgdiplt
Definition: plplot.h:732
#define plerrx
Definition: plplot.h:714
#define plinit
Definition: plplot.h:755
#define plscmap1l
Definition: plplot.h:796
#define plsori
Definition: plplot.h:830
#define plbox3
Definition: plplot.h:698
#define plmapfill
Definition: plplot.h:768
#define plcol1
Definition: plplot.h:703
#define pltimefmt
Definition: plplot.h:856
PLUINT PLUNICODE
Definition: plplot.h:201
#define plmaptex
Definition: plplot.h:767
#define plvect
Definition: plplot.h:858
#define plgchr
Definition: plplot.h:722
float PLFLT
Definition: plplot.h:163
#define pllegend
Definition: plplot.h:758
#define plsyax
Definition: plplot.h:852
#define plgver
Definition: plplot.h:745
#define plscolbg
Definition: plplot.h:802
#define plpsty
Definition: plplot.h:784
#define plgfont
Definition: plplot.h:737
#define plenv
Definition: plplot.h:711
#define pllightsource
Definition: plplot.h:759
#define plpoin3
Definition: plplot.h:781
#define plgspa
Definition: plplot.h:743
#define plscol0
Definition: plplot.h:800
#define plptex
Definition: plplot.h:785
#define plrgbhls
Definition: plplot.h:789
#define plbop
Definition: plplot.h:696
#define plgdidev
Definition: plplot.h:730
#define plpoin
Definition: plplot.h:780
#define plptex3
Definition: plplot.h:786
#define plstripd
Definition: plplot.h:845
#define plhist
Definition: plplot.h:751
#define plmapline
Definition: plplot.h:765
#define plgfnam
Definition: plplot.h:736
#define plgdiori
Definition: plplot.h:731
#define plszax
Definition: plplot.h:854
#define plstripa
Definition: plplot.h:843
#define plgxax
Definition: plplot.h:748
#define plgra
Definition: plplot.h:740
#define plenv0
Definition: plplot.h:712
#define plspal1
Definition: plplot.h:833
#define plstring3
Definition: plplot.h:842
#define plxormod
Definition: plplot.h:865
#define plspause
Definition: plplot.h:834
#define plgdev
Definition: plplot.h:729
#define plgradient
Definition: plplot.h:741
#define plspal0
Definition: plplot.h:832
#define plcalc_world
Definition: plplot.h:700
#define plwidth
Definition: plplot.h:863
#define pllab
Definition: plplot.h:757
#define plsurf3d
Definition: plplot.h:847
#define plsurf3dl
Definition: plplot.h:848
#define plvasp
Definition: plplot.h:857
#define plscmap0n
Definition: plplot.h:793
#define plmtex3
Definition: plplot.h:774
#define plctime
Definition: plplot.h:708
#define plclear
Definition: plplot.h:701
#define plsvpa
Definition: plplot.h:850
#define plw3d
Definition: plplot.h:862
#define plot3dcl
Definition: plplot.h:777
#define plscmap1n
Definition: plplot.h:798
#define plgvpd
Definition: plplot.h:746
#define plhlsrgb
Definition: plplot.h:752
#define pl_setcontlabelformat
Definition: plplot.h:690
#define plsdev
Definition: plplot.h:806
#define plconfigtime
Definition: plplot.h:705
#define plscolbga
Definition: plplot.h:803
#define PL_UNUSED(x)
Definition: plplot.h:138
#define plscmap1
Definition: plplot.h:794
#define plsdiplz
Definition: plplot.h:811
#define plparseopts
Definition: plplot.h:778
#define plmapstring
Definition: plplot.h:766
#define plot3d
Definition: plplot.h:775
#define plsesc
Definition: plplot.h:814
#define plarc
Definition: plplot.h:693
#define plsetopt
Definition: plplot.h:815
#define plgvpw
Definition: plplot.h:747
#define pltext
Definition: plplot.h:855
#define plstring
Definition: plplot.h:841
#define plsdiori
Definition: plplot.h:809
#define plcont
Definition: plplot.h:706
#define plspage
Definition: plplot.h:831
#define plaxes
Definition: plplot.h:694
#define pllsty
Definition: plplot.h:763
#define plslabelfunc
Definition: plplot.h:825
#define plshades
Definition: plplot.h:824
#define plglevel
Definition: plplot.h:738
#define plscompression
Definition: plplot.h:805
#define plfamadv
Definition: plplot.h:716
#define plfont
Definition: plplot.h:720
#define plscmap0a
Definition: plplot.h:792
#define plgcol0a
Definition: plplot.h:725
#define plscmap1_range
Definition: plplot.h:799
#define plmeshc
Definition: plplot.h:771
#define plshade
Definition: plplot.h:820
#define plsym
Definition: plplot.h:853
#define plscmap1a
Definition: plplot.h:795
#define plscmap0
Definition: plplot.h:791
#define plgriddata
Definition: plplot.h:742
#define plstripc
Definition: plplot.h:844
#define pl_setcontlabelparam
Definition: plplot.h:691
#define plsvect
Definition: plplot.h:849
#define plstyl
Definition: plplot.h:846
#define plline
Definition: plplot.h:760
#define pljoin
Definition: plplot.h:756
#define plgzax
Definition: plplot.h:750
#define plsstrm
Definition: plplot.h:835
#define plscmap1la
Definition: plplot.h:797
#define plssym
Definition: plplot.h:837
#define plscolor
Definition: plplot.h:804
#define plcol0
Definition: plplot.h:702
#define plsdiplt
Definition: plplot.h:810
#define plcolorbar
Definition: plplot.h:704
#define plvsta
Definition: plplot.h:861
#define plmeridians
Definition: plplot.h:769
#define plot3dc
Definition: plplot.h:776
#define plcpstrm
Definition: plplot.h:707
#define plmkstrm
Definition: plplot.h:772
#define plgcol0
Definition: plplot.h:724
#define pladv
Definition: plplot.h:692
#define plgcolbga
Definition: plplot.h:727
#define plline3
Definition: plplot.h:762
#define plprec
Definition: plplot.h:783
#define plfill3
Definition: plplot.h:718
#define plseed
Definition: plplot.h:813
#define plgcompression
Definition: plplot.h:728
#define plimagefr
Definition: plplot.h:754
#define plsfont
Definition: plplot.h:819
int PLINT
Definition: plplot.h:181
#define plgfam
Definition: plplot.h:734
#define plscol0a
Definition: plplot.h:801
#define plend1
Definition: plplot.h:710
#define plrandd
Definition: plplot.h:787
#define plbin
Definition: plplot.h:695
#define plsdidev
Definition: plplot.h:807
#define plsfnam
Definition: plplot.h:818
void * PLPointer
Definition: plplot.h:209
#define plflush
Definition: plplot.h:719
#define plwind
Definition: plplot.h:864
#define plstar
Definition: plplot.h:838
#define plmtex
Definition: plplot.h:773
PLINT PLBOOL
Definition: plplot.h:204
#define plsdimap
Definition: plplot.h:808
#define plsfci
Definition: plplot.h:817
#define plend
Definition: plplot.h:709
#define plmesh
Definition: plplot.h:770
#define plreplot
Definition: plplot.h:788
#define plgcolbg
Definition: plplot.h:726
#define plgcmap1_range
Definition: plplot.h:723
#define plstart
Definition: plplot.h:839
#define plsxax
Definition: plplot.h:851
#define plbox
Definition: plplot.h:697
#define plbtime
Definition: plplot.h:699
#define plgyax
Definition: plplot.h:749
#define plvpor
Definition: plplot.h:860
#define plpoly3
Definition: plplot.h:782
#define plgpage
Definition: plplot.h:739
#define plssub
Definition: plplot.h:836
void *(* swig_converter_func)(void *, int *)
struct swig_type_info *(* swig_dycast_func)(void **)
SWIGRUNTIME int SWIG_Lua_class_equal(lua_State *L)
SWIGRUNTIME void SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata)
static int _wrap_ptex(lua_State *L)
static int _wrap_PLGraphicsIn_wX_get(lua_State *L)
static int _wrap_surf3dl(lua_State *L)
static int _wrap_scmap1(lua_State *L)
PLFLT ** read_double_Matrix(lua_State *L, int index, int *nx, int *ny)
static int _wrap_clear(lua_State *L)
SWIGRUNTIME void * SWIG_Lua_MustGetPtr(lua_State *L, int index, swig_type_info *type, int flags, int argnum, const char *func_name)
static int _wrap_szax(lua_State *L)
#define SWIG_DOSTRING_FAIL(S)
static int _wrap_wind(lua_State *L)
static swig_cast_info * swig_cast_initial[]
static int _wrap_PLGraphicsIn_button_get(lua_State *L)
#define lua_rawlen
void mylabel(PLINT axis, PLFLT value, char *label, PLINT length, PLPointer data)
static int _wrap_configtime(lua_State *L)
static int _wrap_sori(lua_State *L)
SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L, int index, void **ptr, swig_type_info *type, int flags)
static int _wrap_mesh(lua_State *L)
static int _wrap_gyax(lua_State *L)
static int _wrap_box(lua_State *L)
#define SWIG_ALLOC_ARRAY(TYPE, LEN)
static int _wrap_spage(lua_State *L)
static int _wrap_mkstrm(lua_State *L)
SWIGRUNTIME void SWIG_Lua_SetModule(lua_State *L, swig_module_info *module)
static int _wrap_PLGraphicsIn_keysym_get(lua_State *L)
SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx, int skip_check)
static swig_type_info _swigt__p_f_double_double_p_double_p_double_p_void__void
static int _wrap_PLGraphicsIn_subwindow_get(lua_State *L)
static int _wrap_rgbhls(lua_State *L)
static int _wrap_scmap1_range(lua_State *L)
SWIGRUNTIME void SWIG_Lua_pusherrstring(lua_State *L, const char *str)
static int _wrap_plend(lua_State *L)
SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
#define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME, TYPE)
SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L)
static int _wrap_hlsrgb(lua_State *L)
SWIGINTERN void SWIG_Lua_add_namespace_classes(lua_State *L, swig_lua_namespace *ns)
#define SWIG_CheckState(r)
static int _wrap_meridians(lua_State *L)
#define SWIG_fail_ptr(func_name, argnum, type)
static swig_cast_info _swigc__p_f_double_double__int[]
#define SWIG_NewMemberObj(L, ptr, sz, type)
static int _wrap_env0(lua_State *L)
static swig_cast_info _swigc__p_int[]
SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss)
static int _wrap_gcolbga(lua_State *L)
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
static int _wrap_gvpd(lua_State *L)
void myct(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data)
SWIGINTERN void SWIG_Lua_class_register_static(lua_State *L, swig_lua_class *clss)
SWIGRUNTIME const char * SWIG_Lua_typename(lua_State *L, int tp)
static int _wrap_ssym(lua_State *L)
static PLINT Alen
static swig_cast_info _swigc__p_double[]
static swig_lua_method swig_PLGraphicsIn_meta[]
#define SWIGTYPE_p_PLGraphicsIn
static int _wrap_plGetCursor(lua_State *L)
static int _wrap_gxax(lua_State *L)
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 int _wrap_gdidev(lua_State *L)
static int _wrap_axes(lua_State *L)
static int _wrap_PLGraphicsIn_type_get(lua_State *L)
#define lua_absindex(L, i)
#define SWIG_LUA_FLOAT
static int _wrap_warn(lua_State *L)
SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State *L, swig_lua_namespace *ns)
static int _wrap_randd(lua_State *L)
#define SWIG_NullReferenceError
static int _wrap_arc(lua_State *L)
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
static int _wrap_stripa(lua_State *L)
static int _wrap_PLGraphicsIn_type_set(lua_State *L)
static int _wrap_join(lua_State *L)
static void swig_delete_PLGraphicsIn(void *obj)
static int _wrap_cpstrm(lua_State *L)
static int _wrap_gdiplt(lua_State *L)
#define SWIG_POINTER_DISOWN
SWIGINTERN int SWIG_Lua_namespace_set(lua_State *L)
SWIGINTERN void ** SWIG_get_ptr_array_var(lua_State *L, int index, int *size, swig_type_info *type)
struct swig_type_info swig_type_info
static char myct_funcstr[255]
static int _wrap_gcompression(lua_State *L)
static int _wrap_string(lua_State *L)
SWIGINTERN int SWIG_Lua_class_disown(lua_State *L)
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
static swig_type_info _swigt__p_PLGraphicsIn
SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L, swig_lua_class *clss)
static int _wrap_path(lua_State *L)
static swig_type_info _swigt__p_f_double_double__int
static int _wrap_PLGraphicsIn_subwindow_set(lua_State *L)
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
static int _wrap_smaj(lua_State *L)
static int _wrap_gfci(lua_State *L)
static int _wrap_start(lua_State *L)
static int _wrap_meshc(lua_State *L)
static int _wrap_plot3dc(lua_State *L)
static int _wrap_PLGraphicsIn_wY_get(lua_State *L)
static int _wrap_ctime(lua_State *L)
SWIGINTERN int SWIG_read_ptr_array(lua_State *L, int index, void **array, int size, swig_type_info *type)
SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret)
static int _wrap_lsty(lua_State *L)
static int _wrap_gfnam(lua_State *L)
static int _wrap_bin(lua_State *L)
static int _wrap_mapline(lua_State *L)
static int _wrap_gcol0(lua_State *L)
static int _wrap_PLGraphicsIn_dX_set(lua_State *L)
SWIGINTERN int SWIG_Lua_class_set(lua_State *L)
SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx)
#define SWIG_GetModule(clientdata)
SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L, void *ptr, size_t size, swig_type_info *type)
static int _wrap_PLGraphicsIn_wX_set(lua_State *L)
static int _wrap_bop(lua_State *L)
SWIGINTERN int SWIG_Lua_class_destruct(lua_State *L)
static swig_cast_info _swigc__p_unsigned_int[]
#define SWIG_fail
static int _wrap_ptex3(lua_State *L)
static swig_type_info _swigt__p_int
static swig_lua_method swig_SwigModule_methods[]
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty)
static int _wrap_eop(lua_State *L)
SWIGRUNTIME void SWIG_PropagateClientData(void)
static swig_cast_info _swigc__p_f_int_double_p_char_int_p_void__void[]
static int _wrap_plSetUsage(lua_State *L)
#define lua_pushglobaltable(L)
static int _wrap_poly3(lua_State *L)
#define SWIG_init_user
static swig_lua_method swig_PLGraphicsIn_Sf_SwigStatic_methods[]
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
#define LUA_ALLOC_ARRAY(TYPE, LEN)
static int _wrap_prec(lua_State *L)
static int _wrap_sdev(lua_State *L)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
#define SWIG_isptrtype(L, I)
static int _wrap_PLGraphicsIn_pX_set(lua_State *L)
#define SWIG_ERROR_RELEASE_NOT_OWNED
#define LUA_DECLARE_TYPEMAP_ARR_FN(NAME, TYPE)
static int _wrap_string3(lua_State *L)
static int _wrap_spal1(lua_State *L)
#define SWIG_TYPE_TABLE_NAME
static int _wrap_surf3d(lua_State *L)
static swig_type_info _swigt__p_unsigned_int
static swig_lua_namespace swig_PLGraphicsIn_Sf_SwigStatic
SWIGINTERN void SWIG_Lua_init_base_class(lua_State *L, swig_lua_class *clss)
static int _wrap_spal0(lua_State *L)
static int _wrap_griddata(lua_State *L)
static PLINT Xlen
static swig_type_info _swigt__p_f_int_p_double_p_double__void
static int _wrap_adv(lua_State *L)
static int _wrap_gra(lua_State *L)
#define SWIG_contract_assert(expr, msg)
int(* swig_lua_base_iterator_func)(lua_State *, swig_type_info *, int, int *ret)
static int _wrap_smin(lua_State *L)
struct swig_module_info swig_module_info
#define SWIG_init
SWIGINTERN void SWIG_Lua_create_class_registry(lua_State *L)
static int _wrap_gcol0a(lua_State *L)
#define SWIG_ERROR
static int _wrap_vect(lua_State *L)
static swig_lua_namespace swig_SwigModule
#define LUA_FREE_ARRAY(PTR)
static int _wrap_lab(lua_State *L)
static swig_type_info _swigt__p_f_int_double_p_char_int_p_void__void
static int _wrap_setopt(lua_State *L)
static int _wrap_shades(lua_State *L)
static int _wrap_PLGraphicsIn_button_set(lua_State *L)
SWIGRUNTIME void SWIG_Lua_pushferrstring(lua_State *L, const char *fmt,...)
static swig_type_info * swig_type_initial[]
static int _wrap_mapstring(lua_State *L)
static int _wrap_col1(lua_State *L)
static int _wrap_btime(lua_State *L)
SWIGINTERN int SWIG_table_size(lua_State *L, int index)
static int _wrap_mtex3(lua_State *L)
static int _wrap_sdiplz(lua_State *L)
static int _wrap_styl(lua_State *L)
static int _wrap_vsta(lua_State *L)
static swig_cast_info _swigc__p_PLGraphicsIn[]
static int _wrap_sfnam(lua_State *L)
static int _wrap_fill(lua_State *L)
static int _wrap_mtex(lua_State *L)
static int _wrap_scmap1l(lua_State *L)
static swig_cast_info _swigc__p_p_char[]
static int _wrap_erry(lua_State *L)
static swig_lua_attribute swig_SwigModule_attributes[]
static int _wrap_PLGraphicsIn_pX_get(lua_State *L)
#define SWIG_LUACODE
#define SWIG_LUA_INT
static swig_type_info _swigt__p_char
static int _wrap_col0(lua_State *L)
static swig_lua_method swig_PLGraphicsIn_methods[]
static int _wrap_gfont(lua_State *L)
#define SWIGEXPORT
#define SWIG_IsOK(r)
SWIGINTERN int SWIG_Lua_class_tostring(lua_State *L)
void(* fill_func)(PLINT, const PLFLT *, const PLFLT *)
static int _wrap_svpa(lua_State *L)
static int _wrap_scmap0(lua_State *L)
static int _wrap_vpas(lua_State *L)
#define SWIG_LUA_BINARY
static int _wrap_schr(lua_State *L)
static int _wrap_sxax(lua_State *L)
static int _wrap_stripd(lua_State *L)
static int _wrap_syax(lua_State *L)
static int _wrap_gcolbg(lua_State *L)
static swig_lua_class _wrap_class_PLGraphicsIn
static int _wrap_scompression(lua_State *L)
static int _wrap_maptex(lua_State *L)
static int _wrap_PLGraphicsIn_dY_set(lua_State *L)
static swig_cast_info _swigc__p_f_int_p_q_const__double_p_q_const__double__void[]
#define SWIG_LUA_STRING
static int _wrap_scol0(lua_State *L)
SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[])
static int _wrap_sesc(lua_State *L)
SWIGINTERN void ** SWIG_get_ptr_array_fixed(lua_State *L, int index, int size, swig_type_info *type)
static int _wrap_sdiori(lua_State *L)
static int _proxy__wrap_new_PLGraphicsIn(lua_State *L)
SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L, const char *cname)
#define SWIG_OK
static int _wrap_PLGraphicsIn_wY_set(lua_State *L)
SWIGINTERN void SWIG_Lua_add_class_instance_details(lua_State *L, swig_lua_class *clss)
#define SWIGINTERNINLINE
static int _wrap_gdev(lua_State *L)
#define SWIG_Lua_add_boolean(L, n, b)
static int _wrap_fill3(lua_State *L)
#define lua_rawgetp(L, index, ptr)
#define SWIGRUNTIMEINLINE
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
char string[PL_MAXKEY]
Definition: plplot.h:440
PLINT nx
Definition: plplot.h:521
PLFLT_NC_MATRIX xg
Definition: plplot.h:520
PLINT ny
Definition: plplot.h:521
PLFLT_NC_MATRIX zg
Definition: plplot.h:520
PLFLT_NC_MATRIX yg
Definition: plplot.h:520
PLFLT_NC_FE_POINTER xg
Definition: plplot.h:508
PLFLT_NC_FE_POINTER yg
Definition: plplot.h:508
PLINT nz
Definition: plplot.h:509
PLINT nx
Definition: plplot.h:509
PLFLT_NC_FE_POINTER zg
Definition: plplot.h:508
PLINT ny
Definition: plplot.h:509
swig_type_info * type
struct swig_cast_info * prev
struct swig_cast_info * next
swig_converter_func converter
swig_type_info ** type
void(* destructor)(void *)
const char ** base_names
swig_lua_attribute * attributes
swig_lua_namespace * cls_static
struct swig_lua_class ** bases
swig_lua_method * metatable
lua_CFunction constructor
swig_lua_method * methods
swig_type_info ** ptype
swig_lua_method * ns_methods
swig_lua_attribute * ns_attributes
struct swig_lua_class ** ns_classes
swig_lua_const_info * ns_constants
struct swig_lua_namespace ** ns_namespaces
swig_type_info * type
swig_type_info * type
swig_type_info ** types
swig_cast_info ** cast_initial
swig_type_info ** type_initial
struct swig_module_info * next
swig_dycast_func dcast
struct swig_cast_info * cast
static const char * name
Definition: tkMain.c:135