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.4.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 0x040401
11#define SWIGLUA
12#define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA
13#define SWIG_LUA_MODULE_GLOBAL
14
15/* -----------------------------------------------------------------------------
16 * This section contains generic SWIG labels for method/variable
17 * declarations/attributes, and other compiler dependent labels.
18 * ----------------------------------------------------------------------------- */
19
20/* template workaround for compilers that cannot correctly implement the C++ standard */
21#ifndef SWIGTEMPLATEDISAMBIGUATOR
22# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
23# define SWIGTEMPLATEDISAMBIGUATOR template
24# elif defined(__HP_aCC)
25/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
26/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
27# define SWIGTEMPLATEDISAMBIGUATOR template
28# else
29# define SWIGTEMPLATEDISAMBIGUATOR
30# endif
31#endif
32
33/* inline attribute */
34#ifndef SWIGINLINE
35# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
36# define SWIGINLINE inline
37# else
38# define SWIGINLINE
39# endif
40#endif
41
42/* attribute recognised by some compilers to avoid 'unused' warnings */
43#ifndef SWIGUNUSED
44# if defined(__GNUC__)
45# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
46# define SWIGUNUSED __attribute__ ((__unused__))
47# else
48# define SWIGUNUSED
49# endif
50# elif defined(__ICC)
51# define SWIGUNUSED __attribute__ ((__unused__))
52# else
53# define SWIGUNUSED
54# endif
55#endif
56
57#ifndef SWIG_MSC_UNSUPPRESS_4505
58# if defined(_MSC_VER)
59# pragma warning(disable : 4505) /* unreferenced local function has been removed */
60# endif
61#endif
62
63#ifndef SWIGUNUSEDPARM
64# ifdef __cplusplus
65# define SWIGUNUSEDPARM(p)
66# else
67# define SWIGUNUSEDPARM(p) p SWIGUNUSED
68# endif
69#endif
70
71/* internal SWIG method */
72#ifndef SWIGINTERN
73# define SWIGINTERN static SWIGUNUSED
74#endif
75
76/* internal inline SWIG method */
77#ifndef SWIGINTERNINLINE
78# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
79#endif
80
81/* exporting methods */
82#if defined(__GNUC__)
83# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
84# ifndef GCC_HASCLASSVISIBILITY
85# define GCC_HASCLASSVISIBILITY
86# endif
87# endif
88#endif
89
90#ifndef SWIGEXPORT
91# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
92# if defined(STATIC_LINKED)
93# define SWIGEXPORT
94# else
95# define SWIGEXPORT __declspec(dllexport)
96# endif
97# else
98# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
99# define SWIGEXPORT __attribute__ ((visibility("default")))
100# else
101# define SWIGEXPORT
102# endif
103# endif
104#endif
105
106/* calling conventions for Windows */
107#ifndef SWIGSTDCALL
108# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
109# define SWIGSTDCALL __stdcall
110# else
111# define SWIGSTDCALL
112# endif
113#endif
114
115/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
116#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
117# define _CRT_SECURE_NO_DEPRECATE
118#endif
119
120/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
121#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
122# define _SCL_SECURE_NO_DEPRECATE
123#endif
124
125/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
126#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
127# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
128#endif
129
130/* Intel's compiler complains if a variable which was never initialised is
131 * cast to void, which is a common idiom which we use to indicate that we
132 * are aware a variable isn't used. So we just silence that warning.
133 * See: https://github.com/swig/swig/issues/192 for more discussion.
134 */
135#ifdef __INTEL_COMPILER
136# pragma warning disable 592
137#endif
138
139#if defined(__cplusplus) && __cplusplus >=201103L
140# define SWIG_NOEXCEPT noexcept
141#else
142# define SWIG_NOEXCEPT throw()
143#endif
144
145/* -----------------------------------------------------------------------------
146 * swigcompat.swg
147 *
148 * Macros to provide support compatibility with older C and C++ standards.
149 *
150 * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard.
151 * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option.
152 * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus.
153 * ----------------------------------------------------------------------------- */
154
155/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
156 * if you're missing it.
157 */
158#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
159 (defined __cplusplus && __cplusplus >= 201103L) || \
160 defined SWIG_HAVE_SNPRINTF) && \
161 !defined SWIG_NO_SNPRINTF
162# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
163# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
164#else
165/* Fallback versions ignore the buffer size, but most of our uses either have a
166 * fixed maximum possible size or dynamically allocate a buffer that's large
167 * enough.
168 */
169# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
170# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
171#endif
172
173/* -----------------------------------------------------------------------------
174 * swigrun.swg
175 *
176 * This file contains generic C API SWIG runtime support for pointer
177 * type checking.
178 * ----------------------------------------------------------------------------- */
179
180/* This should only be incremented when either the layout of swig_type_info changes,
181 or for whatever reason, the runtime changes incompatibly */
182#define SWIG_RUNTIME_VERSION "5"
183
184/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
185#ifdef SWIG_TYPE_TABLE
186# define SWIG_QUOTE_STRING(x) #x
187# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
188# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
189#else
190# define SWIG_TYPE_TABLE_NAME
191#endif
192
193/*
194 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
195 creating a static or dynamic library from the SWIG runtime code.
196 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
197
198 But only do this if strictly necessary, ie, if you have problems
199 with your compiler or suchlike.
200*/
201
202#ifndef SWIGRUNTIME
203# define SWIGRUNTIME SWIGINTERN
204#endif
205
206#ifndef SWIGRUNTIMEINLINE
207# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
208#endif
209
210/* Generic buffer size */
211#ifndef SWIG_BUFFER_SIZE
212# define SWIG_BUFFER_SIZE 1024
213#endif
214
215/* Flags for pointer conversions */
216#define SWIG_POINTER_DISOWN 0x1
217#define SWIG_CAST_NEW_MEMORY 0x2
218#define SWIG_POINTER_NO_NULL 0x4
219#define SWIG_POINTER_CLEAR 0x8
220#define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
221
222/* Flags for new pointer objects */
223#define SWIG_POINTER_OWN 0x1
224
225
226/*
227 Flags/methods for returning states.
228
229 The SWIG conversion methods, as ConvertPtr, return an integer
230 that tells if the conversion was successful or not. And if not,
231 an error code can be returned (see swigerrors.swg for the codes).
232
233 Use the following macros/flags to set or process the returning
234 states.
235
236 In old versions of SWIG, code such as the following was usually written:
237
238 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
239 // success code
240 } else {
241 //fail code
242 }
243
244 Now you can be more explicit:
245
246 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
247 if (SWIG_IsOK(res)) {
248 // success code
249 } else {
250 // fail code
251 }
252
253 which is the same really, but now you can also do
254
255 Type *ptr;
256 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
257 if (SWIG_IsOK(res)) {
258 // success code
259 if (SWIG_IsNewObj(res) {
260 ...
261 delete *ptr;
262 } else {
263 ...
264 }
265 } else {
266 // fail code
267 }
268
269 I.e., now SWIG_ConvertPtr can return new objects and you can
270 identify the case and take care of the deallocation. Of course that
271 also requires SWIG_ConvertPtr to return new result values, such as
272
273 int SWIG_ConvertPtr(obj, ptr,...) {
274 if (<obj is ok>) {
275 if (<need new object>) {
276 *ptr = <ptr to new allocated object>;
277 return SWIG_NEWOBJ;
278 } else {
279 *ptr = <ptr to old object>;
280 return SWIG_OLDOBJ;
281 }
282 } else {
283 return SWIG_BADOBJ;
284 }
285 }
286
287 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
288 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
289 SWIG errors code.
290
291 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
292 allows returning the 'cast rank', for example, if you have this
293
294 int food(double)
295 int fooi(int);
296
297 and you call
298
299 food(1) // cast rank '1' (1 -> 1.0)
300 fooi(1) // cast rank '0'
301
302 just use the SWIG_AddCast()/SWIG_CheckState()
303*/
304
305#define SWIG_OK (0)
306/* Runtime errors are < 0 */
307#define SWIG_ERROR (-1)
308/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
309/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
310/* Errors < -200 are generic runtime specific errors */
311#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
312
313#define SWIG_IsOK(r) (r >= 0)
314#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
315
316/* The CastRankLimit says how many bits are used for the cast rank */
317#define SWIG_CASTRANKLIMIT (1 << 8)
318/* The NewMask denotes the object was created (using new/malloc) */
319#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
320/* The TmpMask is for in/out typemaps that use temporary objects */
321#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
322/* Simple returning values */
323#define SWIG_BADOBJ (SWIG_ERROR)
324#define SWIG_OLDOBJ (SWIG_OK)
325#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
326#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
327/* Check, add and del object mask methods */
328#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
329#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
330#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
331#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
332#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
333#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
334
335/* Cast-Rank Mode */
336#if defined(SWIG_CASTRANK_MODE)
337# ifndef SWIG_TypeRank
338# define SWIG_TypeRank unsigned long
339# endif
340# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
341# define SWIG_MAXCASTRANK (2)
342# endif
343# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
344# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
346 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
347}
349 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
350}
351#else /* no cast-rank mode */
352# define SWIG_AddCast(r) (r)
353# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
354#endif
355
356
357#include <string.h>
358
359#ifdef __cplusplus
360extern "C" {
361#endif
362
363typedef void *(*swig_converter_func)(void *, int *);
364typedef struct swig_type_info *(*swig_dycast_func)(void **);
365
366/* Structure to store information on one type */
367typedef struct swig_type_info {
368 const char *name; /* mangled name of this type */
369 const char *str; /* human readable name of this type */
370 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
371 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
372 void *clientdata; /* language specific type data */
373 int owndata; /* flag if the structure owns the clientdata */
375
376/* Structure to store a type and conversion function used for casting */
377typedef struct swig_cast_info {
378 swig_type_info *type; /* pointer to type that is equivalent to this type */
379 swig_converter_func converter; /* function to cast the void pointers */
380 struct swig_cast_info *next; /* pointer to next array of casts | pointer to cast hashed by value */
381 unsigned int value; /* index of the last valid element in the array | typename hash value */
383
384/* Structure used to store module information
385 * Each module generates one structure like this, and the runtime collects
386 * all of these structures and stores them in a circularly linked list.*/
387typedef struct swig_module_info {
388 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
389 size_t size; /* Number of types in this module */
390 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
391 swig_type_info **type_initial; /* Array of initially generated type structures */
392 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
393 void *clientdata; /* Language specific module data */
395
396/*
397 Compare two type names skipping the space characters, therefore
398 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
399
400 Return 0 when the two name types are equivalent, as in
401 strncmp, but skipping ' '.
402*/
403SWIGRUNTIME int
404SWIG_TypeNameComp(const char *f1, const char *l1,
405 const char *f2, const char *l2) {
406 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
407 while ((*f1 == ' ') && (f1 != l1)) ++f1;
408 while ((*f2 == ' ') && (f2 != l2)) ++f2;
409 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
410 }
411 return (int)((l1 - f1) - (l2 - f2));
412}
413
414/*
415 Check type equivalence in a name list like <name1>|<name2>|...
416 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
417*/
418SWIGRUNTIME int
419SWIG_TypeCmp(const char *nb, const char *tb) {
420 int equiv = 1;
421 const char* te = tb + strlen(tb);
422 const char* ne = nb;
423 while (equiv != 0 && *ne) {
424 for (nb = ne; *ne; ++ne) {
425 if (*ne == '|') break;
426 }
427 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
428 if (*ne) ++ne;
429 }
430 return equiv;
431}
432
433/*
434 Check type equivalence in a name list like <name1>|<name2>|...
435 Return 0 if not equal, 1 if equal
436*/
437SWIGRUNTIME int
438SWIG_TypeEquiv(const char *nb, const char *tb) {
439 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
440}
441
442/*
443 * Hash function for type name strings, based on maRushPrime1Hash (http://amsoftware.narod.ru/algo2.html)
444 */
445SWIGRUNTIME unsigned int SWIG_Hash(const char *str, unsigned int len) {
446 const unsigned char *data = (const unsigned char *)str;
447 unsigned int hash = len, i = 0, k;
448 int rem = (int)len;
449
450 while (rem >= (int)sizeof(unsigned int)) {
451 memcpy(&k, data, sizeof(unsigned int));
452 k += i++;
453 hash ^= k;
454 hash *= 171717;
455 data += sizeof(unsigned int);
456 rem -= sizeof(unsigned int);
457 }
458
459 switch (rem) {
460 case 3: k = (unsigned int)(data[2]) << 16;
461 k |= (unsigned int)(data[1]) << 8;
462 k |= (unsigned int)(data[0]);
463 k += i++;
464 hash ^= k;
465 hash *= 171717;
466 break;
467 case 2: k = (unsigned int)(data[1]) << 8;
468 k |= (unsigned int)(data[0]);
469 k += i++;
470 hash ^= k;
471 hash *= 171717;
472 break;
473 case 1: k = (unsigned int)(data[0]);
474 k += i++;
475 hash ^= k;
476 hash *= 171717;
477 break;
478 }
479 return hash;
480}
481
482/*
483 Check the typename
484*/
486SWIG_TypeCheck(const char *c, swig_type_info *ty) {
487 static const unsigned int scan_threshold = 4;
488 if (ty) {
489 swig_cast_info *head = ty->cast;
490 unsigned int hash_value = 0;
491 int hashed = 0;
492
493 while (head) {
494
495 if (strcmp(head->type->name, c) == 0) {
496 return head;
497 }
498
499 if (head->value) {
500 swig_cast_info *iter;
501 swig_cast_info *last = head + head->value;
502 swig_cast_info *first = head + 1;
503 int search = 1;
504
505 if (!hashed) {
506 if (head->value < scan_threshold) {
507 for (iter = first; iter <= last; iter++) {
508 if (strcmp(iter->type->name, c) == 0) {
509 return iter;
510 }
511 }
512 search = 0;
513 } else {
514 hashed = 1;
515 hash_value = SWIG_Hash(c, (unsigned int)strlen(c));
516 }
517 }
518
519 if (search) {
520 /* Binary search over sorted <'next'|'value'> pairs */
521 do {
522 iter = first + ((last - first) >> 1);
523 if (iter->value < hash_value) {
524 first = iter + 1;
525 } else if (iter->value == hash_value) {
526
527 if (strcmp(iter->next->type->name, c) == 0) {
528 return iter->next;
529 }
530
531 /* Hash collision check */
532 for (last = iter + 1; last->next && last->value == hash_value; last++) {
533 if (strcmp(last->next->type->name, c) == 0) {
534 return last->next;
535 }
536 }
537 for (first = iter - 1; first != head && first->value == hash_value; first--) {
538 if (strcmp(first->next->type->name, c) == 0) {
539 return first->next;
540 }
541 }
542 break;
543 } else
544 last = iter - 1;
545 } while (first <= last);
546 }
547 }
548 head = head->next;
549 }
550 }
551 return 0;
552}
553
554/*
555 Check the type by type address
556*/
559 if (ty) {
560 swig_cast_info *head = ty->cast;
561 while (head) {
562 if (head->type == from) {
563 return head;
564 }
565
566 if (head->value) {
567 swig_cast_info *iter;
568 swig_cast_info *last = head + head->value;
569 swig_cast_info *first = head + 1;
570
571 /* Binary search over sorted array of casts */
572 do {
573 iter = first + ((last - first) >> 1);
574 if (iter->type < from) {
575 first = iter + 1;
576 } else if (iter->type == from) {
577 return iter;
578 } else
579 last = iter - 1;
580 } while (first <= last);
581 }
582 head = head->next;
583 }
584 }
585 return 0;
586}
587
588/*
589 Cast a pointer up an inheritance hierarchy
590*/
592SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
593 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
594}
595
596/*
597 Dynamic pointer casting. Down an inheritance hierarchy
598*/
601 swig_type_info *lastty = ty;
602 if (!ty || !ty->dcast) return ty;
603 while (ty && (ty->dcast)) {
604 ty = (*ty->dcast)(ptr);
605 if (ty) lastty = ty;
606 }
607 return lastty;
608}
609
610/*
611 Return the name associated with this type
612*/
613SWIGRUNTIMEINLINE const char *
615 return ty->name;
616}
617
618/*
619 Return the pretty name associated with this type,
620 that is an unmangled type name in a form presentable to the user.
621*/
622SWIGRUNTIME const char *
624 /* The "str" field contains the equivalent pretty names of the
625 type, separated by vertical-bar characters. Choose the last
626 name. It should be the most specific; a fully resolved name
627 but not necessarily with default template parameters expanded. */
628 if (!type) return NULL;
629 if (type->str != NULL) {
630 const char *last_name = type->str;
631 const char *s;
632 for (s = type->str; *s; s++)
633 if (*s == '|') last_name = s+1;
634 return last_name;
635 }
636 else
637 return type->name;
638}
639
640/*
641 Set the clientdata field for a type
642*/
643SWIGRUNTIME void
645 swig_cast_info *head = ti->cast;
646 /* if (ti->clientdata == clientdata) return; */
648
649 while (head) {
650 swig_cast_info *cast;
651 for (cast = head; (cast - head) <= head->value; cast++) {
652 if (!cast->converter) {
653 swig_type_info *tc = cast->type;
654 if (!tc->clientdata) {
656 }
657 }
658 }
659 head = head->next;
660 }
661}
662
663SWIGRUNTIME void
668
669/*
670 Search for a swig_type_info structure only by mangled name
671 Search is a O(log #types)
672
673 We start searching at module start, and finish searching when start == end.
674 Note: if start == end at the beginning of the function, we go all the way around
675 the circular list.
676*/
679 swig_module_info *end,
680 const char *name) {
681 swig_module_info *iter = start;
682 do {
683 if (iter->size) {
684 size_t l = 0;
685 size_t r = iter->size - 1;
686 do {
687 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
688 size_t i = (l + r) >> 1;
689 const char *iname = iter->types[i]->name;
690 if (iname) {
691 int compare = strcmp(name, iname);
692 if (compare == 0) {
693 return iter->types[i];
694 } else if (compare < 0) {
695 if (i) {
696 r = i - 1;
697 } else {
698 break;
699 }
700 } else if (compare > 0) {
701 l = i + 1;
702 }
703 } else {
704 break; /* should never happen */
705 }
706 } while (l <= r);
707 }
708 iter = iter->next;
709 } while (iter != end);
710 return 0;
711}
712
713/*
714 Search for a swig_type_info structure for either a mangled name or a human readable name.
715 It first searches the mangled names of the types, which is a O(log #types)
716 If a type is not found it then searches the human readable names, which is O(#types).
717
718 We start searching at module start, and finish searching when start == end.
719 Note: if start == end at the beginning of the function, we go all the way around
720 the circular list.
721*/
724 swig_module_info *end,
725 const char *name) {
726 /* STEP 1: Search the name field using binary search */
728 if (ret) {
729 return ret;
730 } else {
731 /* STEP 2: If the type hasn't been found, do a complete search
732 of the str field (the human readable name) */
733 swig_module_info *iter = start;
734 do {
735 size_t i = 0;
736 for (; i < iter->size; ++i) {
737 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
738 return iter->types[i];
739 }
740 iter = iter->next;
741 } while (iter != end);
742 }
743
744 /* neither found a match */
745 return 0;
746}
747
748/*
749 Pack binary data into a string
750*/
751SWIGRUNTIME char *
752SWIG_PackData(char *c, void *ptr, size_t sz) {
753 static const char hex[17] = "0123456789abcdef";
754 const unsigned char *u = (unsigned char *) ptr;
755 const unsigned char *eu = u + sz;
756 for (; u != eu; ++u) {
757 unsigned char uu = *u;
758 *(c++) = hex[(uu & 0xf0) >> 4];
759 *(c++) = hex[uu & 0xf];
760 }
761 return c;
762}
763
764/*
765 Unpack binary data from a string
766*/
767SWIGRUNTIME const char *
768SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
769 unsigned char *u = (unsigned char *) ptr;
770 const unsigned char *eu = u + sz;
771 for (; u != eu; ++u) {
772 char d = *(c++);
773 unsigned char uu;
774 if ((d >= '0') && (d <= '9'))
775 uu = (unsigned char)((d - '0') << 4);
776 else if ((d >= 'a') && (d <= 'f'))
777 uu = (unsigned char)((d - ('a'-10)) << 4);
778 else
779 return (char *) 0;
780 d = *(c++);
781 if ((d >= '0') && (d <= '9'))
782 uu |= (unsigned char)(d - '0');
783 else if ((d >= 'a') && (d <= 'f'))
784 uu |= (unsigned char)(d - ('a'-10));
785 else
786 return (char *) 0;
787 *u = uu;
788 }
789 return c;
790}
791
792/*
793 Pack 'void *' into a string buffer.
794*/
795SWIGRUNTIME char *
796SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
797 char *r = buff;
798 if ((2*sizeof(void *) + 2) > bsz) return 0;
799 *(r++) = '_';
800 r = SWIG_PackData(r,&ptr,sizeof(void *));
801 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
802 strcpy(r,name);
803 return buff;
804}
805
806SWIGRUNTIME const char *
807SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
808 if (*c != '_') {
809 if (strcmp(c,"NULL") == 0) {
810 *ptr = (void *) 0;
811 return name;
812 } else {
813 return 0;
814 }
815 }
816 return SWIG_UnpackData(++c,ptr,sizeof(void *));
817}
818
819SWIGRUNTIME char *
820SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
821 char *r = buff;
822 size_t lname = (name ? strlen(name) : 0);
823 if ((2*sz + 2 + lname) > bsz) return 0;
824 *(r++) = '_';
825 r = SWIG_PackData(r,ptr,sz);
826 if (lname) {
827 strncpy(r,name,lname+1);
828 } else {
829 *r = 0;
830 }
831 return buff;
832}
833
834SWIGRUNTIME const char *
835SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
836 if (*c != '_') {
837 if (strcmp(c,"NULL") == 0) {
838 memset(ptr,0,sz);
839 return name;
840 } else {
841 return 0;
842 }
843 }
844 return SWIG_UnpackData(++c,ptr,sz);
845}
846
847#ifdef __cplusplus
848}
849#endif
850
851/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
852#define SWIG_UnknownError -1
853#define SWIG_IOError -2
854#define SWIG_RuntimeError -3
855#define SWIG_IndexError -4
856#define SWIG_TypeError -5
857#define SWIG_DivisionByZero -6
858#define SWIG_OverflowError -7
859#define SWIG_SyntaxError -8
860#define SWIG_ValueError -9
861#define SWIG_SystemError -10
862#define SWIG_AttributeError -11
863#define SWIG_MemoryError -12
864#define SWIG_NullReferenceError -13
865
866
867/* -----------------------------------------------------------------------------
868 * luarun.swg
869 *
870 * This file contains the runtime support for Lua modules
871 * and includes code for managing global variables and pointer
872 * type checking.
873 * ----------------------------------------------------------------------------- */
874
875#ifdef __cplusplus
876extern "C" {
877#endif
878
879#include "lua.h"
880#include "lauxlib.h"
881#include <stdlib.h> /* for malloc */
882#include <assert.h> /* for a few sanity tests */
883
884/* -----------------------------------------------------------------------------
885 * Lua flavors
886 * ----------------------------------------------------------------------------- */
887
888#define SWIG_LUA_FLAVOR_LUA 1
889#define SWIG_LUA_FLAVOR_ELUA 2
890#define SWIG_LUA_FLAVOR_ELUAC 3
891
892#if !defined(SWIG_LUA_TARGET)
893# error SWIG_LUA_TARGET not defined
894#endif
895
896#if defined(SWIG_LUA_ELUA_EMULATE)
897
898struct swig_elua_entry;
899
900typedef struct swig_elua_key {
901 int type;
902 union {
903 const char* strkey;
904 lua_Number numkey;
905 } key;
906} swig_elua_key;
907
908typedef struct swig_elua_val {
909 int type;
910 union {
911 lua_Number number;
912 const struct swig_elua_entry *table;
913 const char *string;
914 lua_CFunction function;
915 struct {
916 char member;
917 long lvalue;
918 void *pvalue;
919 swig_type_info **ptype;
920 } userdata;
921 } value;
922} swig_elua_val;
923
924typedef struct swig_elua_entry {
925 swig_elua_key key;
926 swig_elua_val value;
927} swig_elua_entry;
928
929#define LSTRKEY(x) {LUA_TSTRING, {.strkey = x} }
930#define LNUMKEY(x) {LUA_TNUMBER, {.numkey = x} }
931#define LNILKEY {LUA_TNIL, {.strkey = 0} }
932
933#define LNUMVAL(x) {LUA_TNUMBER, {.number = x} }
934#define LFUNCVAL(x) {LUA_TFUNCTION, {.function = x} }
935#define LROVAL(x) {LUA_TTABLE, {.table = x} }
936#define LNILVAL {LUA_TNIL, {.string = 0} }
937#define LSTRVAL(x) {LUA_TSTRING, {.string = x} }
938
939#define LUA_REG_TYPE swig_elua_entry
940
941#define SWIG_LUA_ELUA_EMUL_METATABLE_KEY "__metatable"
942
943#define lua_pushrotable(L,p)\
944 lua_newtable(L);\
945 assert(p);\
946 SWIG_Lua_elua_emulate_register(L,(swig_elua_entry*)(p));
947
948#define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
949 LSTRKEY(B), {LUA_TUSERDATA, { .userdata={0,0,(void*)(C),&D} } }
950
951#define SWIG_LUA_CONSTTAB_BINARY(B,S,C,D)\
952 LSTRKEY(B), {LUA_TUSERDATA, { .userdata={1,S,(void*)(C),&D} } }
953#endif
954
955#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
956# define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
957# define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
958# define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
959# define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
960 /* Those two types of constants are not supported in elua */
961
962#ifndef SWIG_LUA_CONSTTAB_POINTER
963#warning eLua does not support pointers as constants. By default, nil will be used as value
964#define SWIG_LUA_CONSTTAB_POINTER(B,C,D) LSTRKEY(B), LNILVAL
965#endif
966
967#ifndef SWIG_LUA_CONSTTAB_BINARY
968#warning eLua does not support pointers to member as constants. By default, nil will be used as value
969#define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D) LSTRKEY(B), LNILVAL
970#endif
971#else /* SWIG_LUA_FLAVOR_LUA */
972# define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
973# define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
974# define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
975# define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
976# define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
977 SWIG_LUA_POINTER, (char *)B, 0, 0, (void *)C, &D
978# define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D)\
979 SWIG_LUA_BINARY, (char *)B, S, 0, (void *)C, &D
980#endif
981
982#ifndef SWIG_LUA_ELUA_EMULATE
983#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
984# define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
985# define LSTRVAL LRO_STRVAL
986#endif
987#endif /* SWIG_LUA_ELUA_EMULATE*/
988
989#ifndef SWIG_LUA_ELUA_EMULATE
990#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
991
992#ifndef MIN_OPT_LEVEL
993#define MIN_OPT_LEVEL 2
994#endif
995
996#include "lrodefs.h"
997#include "lrotable.h"
998#endif
999#endif /* SWIG_LUA_ELUA_EMULATE*/
1000/* -----------------------------------------------------------------------------
1001 * compatibility defines
1002 * ----------------------------------------------------------------------------- */
1003
1004/* History of Lua C API length functions: In Lua 5.0 (and before?)
1005 there was "lua_strlen". In Lua 5.1, this was renamed "lua_objlen",
1006 but a compatibility define of "lua_strlen" was added. In Lua 5.2,
1007 this function was again renamed, to "lua_rawlen" (to emphasize that
1008 it doesn't call the "__len" metamethod), and the compatibility
1009 define of lua_strlen was removed. All SWIG uses have been updated
1010 to "lua_rawlen", and we add our own defines of that here for older
1011 versions of Lua. */
1012#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
1013# define lua_rawlen lua_strlen
1014#elif LUA_VERSION_NUM == 501
1015# define lua_rawlen lua_objlen
1016#endif
1017
1018/* lua_tolstring() was added in Lua 5.1. It should be a little more
1019 efficient than making two separate calls and it avoids problems with order
1020 of evaluation so SWIG calls lua_tolstring() when it wants the length and
1021 we provide a compatibility implementation for Lua 5.0. */
1022#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
1023static const char *(lua_tolstring)(lua_State *L, int idx, size_t *len) {
1024 /* Call lua_tostring() first as it may convert the value from number to
1025 string. */
1026 const char *result = lua_tostring(L, idx);
1027 if (len) *len = lua_strlen(L, idx);
1028 return result;
1029}
1030#endif
1031
1032
1033/* lua_pushglobaltable is the recommended "future-proof" way to get
1034 the global table for Lua 5.2 and later. Here we define
1035 lua_pushglobaltable ourselves for Lua versions before 5.2. */
1036#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
1037# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
1038#endif
1039
1040/* lua_absindex was introduced in Lua 5.2 */
1041#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
1042# define lua_absindex(L,i) ((i)>0 || (i) <= LUA_REGISTRYINDEX ? (i) : lua_gettop(L) + (i) + 1)
1043#endif
1044
1045/* lua_rawsetp was introduced in Lua 5.2 */
1046#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
1047#define lua_rawsetp(L,index,ptr)\
1048 lua_pushlightuserdata(L,(void*)(ptr));\
1049 lua_insert(L,-2);\
1050 lua_rawset(L,index);
1051
1052#define lua_rawgetp(L,index,ptr)\
1053 lua_pushlightuserdata(L,(void*)(ptr));\
1054 lua_rawget(L,index);
1055
1056#endif
1057
1058/* --------------------------------------------------------------------------
1059 * Helper functions for error handling
1060 * -------------------------------------------------------------------------- */
1061
1062/* Push the string STR on the Lua stack, like lua_pushstring, but
1063 prefixed with the location of the innermost Lua call-point
1064 (as formatted by luaL_where). */
1065SWIGRUNTIME void
1066SWIG_Lua_pusherrstring (lua_State *L, const char *str)
1067{
1068 luaL_where (L, 1);
1069 lua_pushstring (L, str);
1070 lua_concat (L, 2);
1071}
1072
1073/* Push a formatted string generated from FMT and following args on
1074 the Lua stack, like lua_pushfstring, but prefixed with the
1075 location of the innermost Lua call-point (as formatted by luaL_where). */
1076SWIGRUNTIME void
1077SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...)
1078{
1079 va_list argp;
1080 va_start(argp, fmt);
1081 luaL_where(L, 1);
1082 lua_pushvfstring(L, fmt, argp);
1083 va_end(argp);
1084 lua_concat(L, 2);
1085}
1086
1087
1088/* -----------------------------------------------------------------------------
1089 * global swig types
1090 * ----------------------------------------------------------------------------- */
1091/* Constant table */
1092#define SWIG_LUA_INT 1
1093#define SWIG_LUA_FLOAT 2
1094#define SWIG_LUA_STRING 3
1095#define SWIG_LUA_POINTER 4
1096#define SWIG_LUA_BINARY 5
1097#define SWIG_LUA_CHAR 6
1098
1099/* Structure for variable linking table */
1100typedef struct {
1101 const char *name;
1102 lua_CFunction get;
1103 lua_CFunction set;
1105
1106#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
1107typedef const LUA_REG_TYPE swig_lua_method;
1108typedef const LUA_REG_TYPE swig_lua_const_info;
1109#else /* Normal lua */
1110typedef luaL_Reg swig_lua_method;
1111
1112/* Constant information structure */
1113typedef struct {
1114 int type;
1115 char *name;
1117 double dvalue;
1118 void *pvalue;
1121
1122#endif
1123
1124typedef struct {
1125 const char *name;
1126 lua_CFunction getmethod;
1127 lua_CFunction setmethod;
1129
1130
1131struct swig_lua_class;
1132/* Can be used to create namespaces. Currently used to wrap class static methods/variables/constants */
1141
1142typedef struct swig_lua_class {
1143 const char *name; /* Name that this class has in Lua */
1144 const char *fqname; /* Fully qualified name - Scope + class name */
1146 lua_CFunction constructor;
1147 void (*destructor)(void *);
1151 swig_lua_method *metatable; /* 0 for -eluac */
1153 const char **base_names;
1155
1156/* this is the struct for wrapping all pointers in SwigLua
1157*/
1158typedef struct {
1160 int own; /* 1 if owned & must be destroyed */
1161 void *ptr;
1163
1164/* this is the struct for wrapping arbitrary packed binary data
1165(currently it is only used for member function pointers)
1166the data ordering is similar to swig_lua_userdata, but it is currently not possible
1167to tell the two structures apart within SWIG, other than by looking at the type
1168*/
1169typedef struct {
1171 int own; /* 1 if owned & must be destroyed */
1172 char data[1]; /* arbitrary amount of data */
1174
1175/* Common SWIG API */
1176#define SWIG_NewPointerObj(L, ptr, type, owner) SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
1177#define SWIG_ConvertPtr(L,idx, ptr, type, flags) SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
1178#define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname) SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
1179/* for C++ member pointers, ie, member methods */
1180#define SWIG_ConvertMember(L, idx, ptr, sz, ty) SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
1181#define SWIG_NewMemberObj(L, ptr, sz, type) SWIG_Lua_NewPackedObj(L, ptr, sz, type)
1182
1183/* Runtime API */
1184#define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
1185#define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
1186#define SWIG_MODULE_CLIENTDATA_TYPE lua_State*
1187
1188/* Contract support */
1189#define SWIG_contract_assert(expr, msg) \
1190 do { if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } } while (0)
1191
1192
1193/* helper #defines */
1194#define SWIG_fail {goto fail;}
1195#define SWIG_fail_arg(func_name,argnum,type) \
1196 {SWIG_Lua_pushferrstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
1197 func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
1198 goto fail;}
1199#define SWIG_fail_ptr(func_name,argnum,type) \
1200 SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
1201#define SWIG_check_num_args(func_name,a,b) \
1202 if (lua_gettop(L)<a || lua_gettop(L)>b) \
1203 {SWIG_Lua_pushferrstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
1204 goto fail;}
1205
1206
1207#define SWIG_Lua_get_table(L,n) \
1208 (lua_pushstring(L, n), lua_rawget(L,-2))
1209
1210#define SWIG_Lua_add_function(L,n,f) \
1211 (lua_pushstring(L, n), \
1212 lua_pushcfunction(L, f), \
1213 lua_rawset(L,-3))
1214
1215#define SWIG_Lua_add_boolean(L,n,b) \
1216 (lua_pushstring(L, n), \
1217 lua_pushboolean(L, b), \
1218 lua_rawset(L,-3))
1219
1220/* special helper for allowing 'nil' for usertypes */
1221#define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))
1222
1223#ifdef __cplusplus
1224/* Special helper for member function pointers
1225it gets the address, casts it, then dereferences it */
1226/*#define SWIG_mem_fn_as_voidptr(a) (*((char**)&(a))) */
1227#endif
1228
1229/* storing/access of swig_module_info */
1231SWIG_Lua_GetModule(lua_State *L) {
1232 swig_module_info *ret = 0;
1233 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1234 lua_rawget(L,LUA_REGISTRYINDEX);
1235 if (lua_islightuserdata(L,-1))
1236 ret=(swig_module_info*)lua_touserdata(L,-1);
1237 lua_pop(L,1); /* tidy */
1238 return ret;
1239}
1240
1241SWIGRUNTIME void
1242SWIG_Lua_SetModule(lua_State *L, swig_module_info *module) {
1243 /* add this all into the Lua registry: */
1244 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1245 lua_pushlightuserdata(L,(void*)module);
1246 lua_rawset(L,LUA_REGISTRYINDEX);
1247}
1248
1249/* -----------------------------------------------------------------------------
1250 * global variable support code: modules
1251 * ----------------------------------------------------------------------------- */
1252
1253/* this function is called when trying to set an immutable.
1254default action is to print an error.
1255This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
1257{
1258/* there should be 1 param passed in: the new value */
1259#ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
1260 lua_pop(L,1); /* remove it */
1261 luaL_error(L,"This variable is immutable");
1262#endif
1263 return 0; /* should not return anything */
1264}
1265
1266#ifdef SWIG_LUA_ELUA_EMULATE
1267
1268SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own);
1269SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type);
1270static int swig_lua_elua_emulate_unique_key;
1271
1272/* This function emulates eLua rotables behaviour. It loads a rotable definition into the usual lua table. */
1273SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_entry *table)
1274{
1275 int i, table_parsed, parsed_tables_array, target_table;
1276 assert(lua_istable(L,-1));
1277 target_table = lua_gettop(L);
1278 /* Get the registry where we put all parsed tables to avoid loops */
1279 lua_rawgetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
1280 if(lua_isnil(L,-1)) {
1281 lua_pop(L,1);
1282 lua_newtable(L);
1283 lua_pushvalue(L,-1);
1284 lua_rawsetp(L,LUA_REGISTRYINDEX,(void*)(&swig_lua_elua_emulate_unique_key));
1285 }
1286 parsed_tables_array = lua_gettop(L);
1287 lua_pushvalue(L,target_table);
1288 lua_rawsetp(L, parsed_tables_array, table);
1289 table_parsed = 0;
1290 const int SWIGUNUSED pairs_start = lua_gettop(L);
1291 for(i = 0;table[i].key.type != LUA_TNIL || table[i].value.type != LUA_TNIL;i++)
1292 {
1293 const swig_elua_entry *entry = table + i;
1294 int is_metatable = 0;
1295 switch(entry->key.type) {
1296 case LUA_TSTRING:
1297 lua_pushstring(L,entry->key.key.strkey);
1298 if(strcmp(entry->key.key.strkey, SWIG_LUA_ELUA_EMUL_METATABLE_KEY) == 0)
1299 is_metatable = 1;
1300 break;
1301 case LUA_TNUMBER:
1302 lua_pushnumber(L,entry->key.key.numkey);
1303 break;
1304 case LUA_TNIL:
1305 lua_pushnil(L);
1306 break;
1307 default:
1308 assert(0);
1309 }
1310 switch(entry->value.type) {
1311 case LUA_TSTRING:
1312 lua_pushstring(L,entry->value.value.string);
1313 break;
1314 case LUA_TNUMBER:
1315 lua_pushnumber(L,entry->value.value.number);
1316 break;
1317 case LUA_TFUNCTION:
1318 lua_pushcfunction(L,entry->value.value.function);
1319 break;
1320 case LUA_TTABLE:
1321 lua_rawgetp(L,parsed_tables_array, entry->value.value.table);
1322 table_parsed = !lua_isnil(L,-1);
1323 if(!table_parsed) {
1324 lua_pop(L,1); /*remove nil */
1325 lua_newtable(L);
1326 SWIG_Lua_elua_emulate_register(L,entry->value.value.table);
1327 }
1328 if(is_metatable) {
1329 assert(lua_istable(L,-1));
1330 lua_pushvalue(L,-1);
1331 lua_setmetatable(L,target_table);
1332 }
1333
1334 break;
1335 case LUA_TUSERDATA:
1336 if(entry->value.value.userdata.member)
1337 SWIG_NewMemberObj(L,entry->value.value.userdata.pvalue,
1338 entry->value.value.userdata.lvalue,
1339 *(entry->value.value.userdata.ptype));
1340 else
1341 SWIG_NewPointerObj(L,entry->value.value.userdata.pvalue,
1342 *(entry->value.value.userdata.ptype),0);
1343 break;
1344 case LUA_TNIL:
1345 lua_pushnil(L);
1346 break;
1347 default:
1348 assert(0);
1349 }
1350 assert(lua_gettop(L) == pairs_start + 2);
1351 lua_rawset(L,target_table);
1352 }
1353 lua_pop(L,1); /* Removing parsed tables storage */
1354 assert(lua_gettop(L) == target_table);
1355}
1356
1357SWIGINTERN void SWIG_Lua_elua_emulate_register_clear(lua_State *L)
1358{
1359 lua_pushnil(L);
1360 lua_rawsetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
1361}
1362
1363SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L);
1364
1365SWIGINTERN int SWIG_Lua_emulate_elua_getmetatable(lua_State *L)
1366{
1367 SWIG_check_num_args("getmetatable(SWIG eLua emulation)", 1, 1);
1369 lua_getfield(L,-1,"lua_getmetatable");
1370 lua_remove(L,-2); /* remove the registry*/
1371 assert(!lua_isnil(L,-1));
1372 lua_pushvalue(L,1);
1373 assert(lua_gettop(L) == 3); /* object | function | object again */
1374 lua_call(L,1,1);
1375 if(!lua_isnil(L,-1)) /*There is an ordinary metatable */
1376 return 1;
1377 /*if it is a table, then emulate elua behaviour - check for __metatable attribute of a table*/
1378 assert(lua_gettop(L) == 2);
1379 if(lua_istable(L,-2)) {
1380 lua_pop(L,1); /*remove the nil*/
1381 lua_getfield(L,-1, SWIG_LUA_ELUA_EMUL_METATABLE_KEY);
1382 }
1383 assert(lua_gettop(L) == 2);
1384 return 1;
1385
1386fail:
1387 lua_error(L);
1388 return 0;
1389}
1390
1391SWIGINTERN void SWIG_Lua_emulate_elua_swap_getmetatable(lua_State *L)
1392{
1395 lua_pushstring(L,"lua_getmetatable");
1396 lua_getfield(L,-2,"getmetatable");
1397 assert(!lua_isnil(L,-1));
1398 lua_rawset(L,-4);
1399 lua_pushstring(L, "getmetatable");
1400 lua_pushcfunction(L, SWIG_Lua_emulate_elua_getmetatable);
1401 lua_rawset(L,-3);
1402 lua_pop(L,2);
1403
1404}
1405/* END OF REMOVE */
1406
1407#endif
1408/* -----------------------------------------------------------------------------
1409 * global variable support code: namespaces and modules (which are the same thing)
1410 * ----------------------------------------------------------------------------- */
1411
1413{
1414/* there should be 2 params passed in
1415 (1) table (not the meta table)
1416 (2) string name of the attribute
1417*/
1418 assert(lua_istable(L,-2)); /* just in case */
1419 lua_getmetatable(L,-2);
1420 assert(lua_istable(L,-1));
1421 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1422 assert(lua_istable(L,-1));
1423 /* look for the key in the .get table */
1424 lua_pushvalue(L,2); /* key */
1425 lua_rawget(L,-2);
1426 lua_remove(L,-2); /* stack tidy, remove .get table */
1427 if (lua_iscfunction(L,-1))
1428 { /* found it so call the fn & return its value */
1429 lua_call(L,0,1); /* 1 value in (userdata),1 out (result) */
1430 lua_remove(L,-2); /* stack tidy, remove metatable */
1431 return 1;
1432 }
1433 lua_pop(L,1); /* remove whatever was there */
1434 /* ok, so try the .fn table */
1435 SWIG_Lua_get_table(L,".fn"); /* find the .get table */
1436 assert(lua_istable(L,-1)); /* just in case */
1437 lua_pushvalue(L,2); /* key */
1438 lua_rawget(L,-2); /* look for the fn */
1439 lua_remove(L,-2); /* stack tidy, remove .fn table */
1440 if (lua_isfunction(L,-1)) /* note: whether it's a C function or lua function */
1441 { /* found it so return the fn & let lua call it */
1442 lua_remove(L,-2); /* stack tidy, remove metatable */
1443 return 1;
1444 }
1445 lua_pop(L,1); /* remove whatever was there */
1446 return 0;
1447}
1448
1450{
1451/* there should be 3 params passed in
1452 (1) table (not the meta table)
1453 (2) string name of the attribute
1454 (3) any for the new value
1455*/
1456
1457 assert(lua_istable(L,1));
1458 lua_getmetatable(L,1); /* get the meta table */
1459 assert(lua_istable(L,-1));
1460
1461 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1462 if (lua_istable(L,-1))
1463 {
1464 /* look for the key in the .set table */
1465 lua_pushvalue(L,2); /* key */
1466 lua_rawget(L,-2);
1467 if (lua_iscfunction(L,-1))
1468 { /* found it so call the fn & return its value */
1469 lua_pushvalue(L,3); /* value */
1470 lua_call(L,1,0);
1471 return 0;
1472 }
1473 lua_pop(L,1); /* remove the value */
1474 }
1475 lua_pop(L,1); /* remove the value .set table */
1476 lua_pop(L,1); /* remote metatable */
1477 lua_rawset(L,-3);
1478 return 0;
1479}
1480
1481#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
1482SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]); /* forward declaration */
1483SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn); /* forward declaration */
1484SWIGINTERN void SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss);
1485
1486/* helper function - register namespace methods and attributes into namespace */
1488{
1489 int i;
1490 /* There must be namespace table (not metatable) at the top of the stack */
1491 assert(lua_istable(L,-1));
1493
1494 /* add methods to the namespace/module table */
1495 for(i=0;ns->ns_methods[i].name;i++){
1496 SWIG_Lua_add_function(L,ns->ns_methods[i].name,ns->ns_methods[i].func);
1497 }
1498 lua_getmetatable(L,-1);
1499
1500 /* add fns */
1501 for(i=0;ns->ns_attributes[i].name;i++){
1503 }
1504
1505 /* clear stack - remove metatble */
1506 lua_pop(L,1);
1507 return 0;
1508}
1509
1510/* Register all classes in the namespace */
1512{
1513 swig_lua_class **classes;
1514
1515 /* There must be a module/namespace table at the top of the stack */
1516 assert(lua_istable(L,-1));
1517
1518 classes = ns->ns_classes;
1519
1520 if( classes != 0 ) {
1521 while(*classes != 0) {
1522 SWIG_Lua_class_register(L, *classes);
1523 classes++;
1524 }
1525 }
1526}
1527
1528/* Helper function. Creates namespace table and adds it to module table
1529 if 'reg' is true, then will register namespace table to parent one (must be on top of the stack
1530 when function is called).
1531 Function always returns newly registered table on top of the stack.
1532*/
1534{
1535 swig_lua_namespace **sub_namespace;
1536 /* 1 argument - table on the top of the stack */
1537 const int SWIGUNUSED begin = lua_gettop(L);
1538 assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table or parent namespace table */
1539 lua_checkstack(L,5);
1540 lua_newtable(L); /* namespace itself */
1541 lua_newtable(L); /* metatable for namespace */
1542
1543 /* add a table called ".get" */
1544 lua_pushstring(L,".get");
1545 lua_newtable(L);
1546 lua_rawset(L,-3);
1547 /* add a table called ".set" */
1548 lua_pushstring(L,".set");
1549 lua_newtable(L);
1550 lua_rawset(L,-3);
1551 /* add a table called ".fn" */
1552 lua_pushstring(L,".fn");
1553 lua_newtable(L);
1554 lua_rawset(L,-3);
1555
1556 /* add accessor fns for using the .get,.set&.fn */
1559
1560 lua_setmetatable(L,-2); /* set metatable */
1561
1562 /* Register all functions, variables etc */
1564 /* Register classes */
1566
1567 sub_namespace = ns->ns_namespaces;
1568 if( sub_namespace != 0) {
1569 while(*sub_namespace != 0) {
1570 SWIG_Lua_namespace_register(L, *sub_namespace, 1);
1571 lua_pop(L,1); /* removing sub-namespace table */
1572 sub_namespace++;
1573 }
1574 }
1575
1576 if (reg) {
1577 lua_pushstring(L,ns->name);
1578 lua_pushvalue(L,-2);
1579 lua_rawset(L,-4); /* add namespace to module table */
1580 }
1581 assert(lua_gettop(L) == begin+1);
1582}
1583#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */
1584
1585/* -----------------------------------------------------------------------------
1586 * global variable support code: classes
1587 * ----------------------------------------------------------------------------- */
1588
1589SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname);
1590
1591typedef int (*swig_lua_base_iterator_func)(lua_State*,swig_type_info*, int, int *ret);
1592
1594 int first_arg, swig_lua_base_iterator_func func, int *const ret)
1595{
1596 /* first_arg - position of the object in stack. Everything that is above are arguments
1597 * and is passed to every evocation of the func */
1598 int last_arg = lua_gettop(L);/* position of last argument */
1599 int original_metatable = last_arg + 1;
1600 size_t bases_count;
1601 int result = SWIG_ERROR;
1602 int bases_table;
1603 (void)swig_type;
1604 lua_getmetatable(L,first_arg);
1605
1606 /* initialise base search */
1607#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1608 SWIG_Lua_get_table(L,".bases");
1609 assert(lua_istable(L,-1));
1610 bases_count = lua_rawlen(L,-1);
1611 bases_table = lua_gettop(L);
1612#else
1613 /* In elua .bases table doesn't exist. Use table from swig_lua_class */
1614 (void)bases_table;
1615 assert(swig_type!=0);
1617 swig_lua_class **bases= ((swig_lua_class*)(swig_type->clientdata))->bases;
1618 const char **base_names= ((swig_lua_class*)(swig_type->clientdata))->base_names;
1619 bases_count = 0;
1620 for(;base_names[bases_count];
1621 bases_count++);/* get length of bases */
1622#endif
1623
1624 if(ret)
1625 *ret = 0;
1626 if(bases_count>0)
1627 {
1628 int to_remove;
1629 size_t i;
1630 int j;
1631 int subcall_last_arg;
1632 int subcall_first_arg = lua_gettop(L) + 1;/* Here a copy of first_arg and arguments begin */
1633 int valid = 1;
1634 swig_type_info *base_swig_type = 0;
1635 for(j=first_arg;j<=last_arg;j++)
1636 lua_pushvalue(L,j);
1637 subcall_last_arg = lua_gettop(L);
1638
1639 /* Trick: temporarily replacing original metatable with metatable for base class and call getter */
1640 for(i=0;i<bases_count;i++) {
1641 /* Iteration through class bases */
1642#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1643 lua_rawgeti(L,bases_table,i+1);
1644 base_swig_type = 0;
1645 if(lua_isnil(L,-1)) {
1646 valid = 0;
1647 lua_pop(L,1);
1648 } else {
1649 valid = 1;
1650 }
1651#else /* In elua .bases table doesn't exist. Use table from swig_lua_class */
1652 swig_lua_class *base_class = bases[i];
1653 if(!base_class) {
1654 valid = 0;
1655 } else {
1656 valid = 1;
1657 SWIG_Lua_get_class_metatable(L,base_class->fqname);
1658 base_swig_type = SWIG_TypeQueryModule(module,module,base_names[i]);
1659 assert(base_swig_type != 0);
1660 }
1661#endif
1662
1663 if(!valid)
1664 continue;
1665 assert(lua_isuserdata(L, subcall_first_arg));
1666 assert(lua_istable(L,-1));
1667 lua_setmetatable(L,subcall_first_arg); /* Set new metatable */
1668 assert(lua_gettop(L) == subcall_last_arg);
1669 result = func(L, base_swig_type,subcall_first_arg, ret); /* Forward call */
1670 if(result != SWIG_ERROR) {
1671 break;
1672 }
1673 }
1674 /* Restore original metatable */
1675 lua_pushvalue(L,original_metatable);
1676 lua_setmetatable(L,first_arg);
1677 /* Clear - remove everything between last_arg and subcall_last_arg including */
1678 to_remove = subcall_last_arg - last_arg;
1679 for(j=0;j<to_remove;j++)
1680 lua_remove(L,last_arg+1);
1681 } else {
1682 /* Remove everything after last_arg */
1683 lua_pop(L, lua_gettop(L) - last_arg);
1684 }
1685 if(ret) assert(lua_gettop(L) == last_arg + *ret);
1686 return result;
1687}
1688
1689/* The class.get method helper, performs the lookup of class attributes.
1690 * It returns an error code. Number of function return values is passed inside 'ret'.
1691 * first_arg is not used in this function because function always has 2 arguments.
1692 */
1693SWIGINTERN int SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
1694{
1695/* there should be 2 params passed in
1696 (1) userdata (not the meta table)
1697 (2) string name of the attribute
1698*/
1699 int bases_search_result;
1700 int substack_start = lua_gettop(L)-2;
1701 assert(first_arg == substack_start+1);
1702 (void)first_arg;
1703 lua_checkstack(L,5);
1704 assert(lua_isuserdata(L,-2)); /* just in case */
1705 lua_getmetatable(L,-2); /* get the meta table */
1706 assert(lua_istable(L,-1)); /* just in case */
1707 /* NEW: looks for the __getitem() fn
1708 this is a user provided get fn */
1709 SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
1710 if (lua_iscfunction(L,-1)) /* if it's there */
1711 { /* found it so call the fn & return its value */
1712 lua_pushvalue(L,substack_start+1); /* the userdata */
1713 lua_pushvalue(L,substack_start+2); /* the parameter */
1714 lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */
1715 lua_remove(L,-2); /* stack tidy, remove metatable */
1716 if(ret) *ret = 1;
1717 return SWIG_OK;
1718 }
1719 lua_pop(L,1);
1720 /* Remove the metatable */
1721 lua_pop(L,1);
1722 /* Search in base classes */
1723 bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get_item,ret);
1724 return bases_search_result; /* sorry not known */
1725}
1726
1727
1728/* The class.get method helper, performs the lookup of class attributes.
1729 * It returns an error code. Number of function return values is passed inside 'ret'.
1730 * first_arg is not used in this function because function always has 2 arguments.
1731 */
1732SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
1733{
1734/* there should be 2 params passed in
1735 (1) userdata (not the meta table)
1736 (2) string name of the attribute
1737*/
1738 int bases_search_result;
1739 int substack_start = lua_gettop(L)-2;
1740 assert(first_arg == substack_start+1);
1741 (void)first_arg;
1742 lua_checkstack(L,5);
1743 assert(lua_isuserdata(L,-2)); /* just in case */
1744 lua_getmetatable(L,-2); /* get the meta table */
1745 assert(lua_istable(L,-1)); /* just in case */
1746 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1747 assert(lua_istable(L,-1)); /* just in case */
1748 /* look for the key in the .get table */
1749 lua_pushvalue(L,substack_start+2); /* key */
1750 lua_rawget(L,-2);
1751 lua_remove(L,-2); /* stack tidy, remove .get table */
1752 if (lua_iscfunction(L,-1))
1753 { /* found it so call the fn & return its value */
1754 lua_pushvalue(L,substack_start+1); /* the userdata */
1755 lua_call(L,1,1); /* 1 value in (userdata),1 out (result) */
1756 lua_remove(L,-2); /* stack tidy, remove metatable */
1757 if(ret)
1758 *ret = 1;
1759 return SWIG_OK;
1760 }
1761 lua_pop(L,1); /* remove whatever was there */
1762 /* ok, so try the .fn table */
1763 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
1764 assert(lua_istable(L,-1)); /* just in case */
1765 lua_pushvalue(L,substack_start+2); /* key */
1766 lua_rawget(L,-2); /* look for the fn */
1767 lua_remove(L,-2); /* stack tidy, remove .fn table */
1768 if (lua_isfunction(L,-1)) /* note: if it's a C function or lua function */
1769 { /* found it so return the fn & let lua call it */
1770 lua_remove(L,-2); /* stack tidy, remove metatable */
1771 if(ret)
1772 *ret = 1;
1773 return SWIG_OK;
1774 }
1775 lua_pop(L,1); /* remove whatever was there */
1776 /* Remove the metatable */
1777 lua_pop(L,1);
1778 /* Search in base classes */
1779 bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get,ret);
1780 return bases_search_result; /* sorry not known */
1781}
1782
1783/* the class.get method, performs the lookup of class attributes
1784 */
1786{
1787/* there should be 2 params passed in
1788 (1) userdata (not the meta table)
1789 (2) string name of the attribute
1790*/
1791 int result;
1792 swig_lua_userdata *usr;
1793 swig_type_info *type;
1794 int ret = 0;
1795 assert(lua_isuserdata(L,1));
1796 usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1797 type = usr->type;
1798 result = SWIG_Lua_class_do_get(L,type,1,&ret);
1799 if(result == SWIG_OK)
1800 return ret;
1801
1802 result = SWIG_Lua_class_do_get_item(L,type,1,&ret);
1803 if(result == SWIG_OK)
1804 return ret;
1805
1806 return 0;
1807}
1808
1809/* helper for the class.set method, performs the lookup of class attributes
1810 * It returns error code. Number of function return values is passed inside 'ret'
1811 */
1812SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret)
1813{
1814/* there should be 3 params passed in
1815 (1) table (not the meta table)
1816 (2) string name of the attribute
1817 (3) any for the new value
1818 */
1819
1820 int bases_search_result;
1821 int substack_start = lua_gettop(L) - 3;
1822 lua_checkstack(L,5);
1823 assert(lua_isuserdata(L,substack_start+1)); /* just in case */
1824 lua_getmetatable(L,substack_start+1); /* get the meta table */
1825 assert(lua_istable(L,-1)); /* just in case */
1826 if(ret)
1827 *ret = 0; /* it is setter - number of return values is always 0 */
1828
1829 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1830 if (lua_istable(L,-1))
1831 {
1832 /* look for the key in the .set table */
1833 lua_pushvalue(L,substack_start+2); /* key */
1834 lua_rawget(L,-2);
1835 lua_remove(L,-2); /* tidy stack, remove .set table */
1836 if (lua_iscfunction(L,-1))
1837 { /* found it so call the fn & return its value */
1838 lua_pushvalue(L,substack_start+1); /* userdata */
1839 lua_pushvalue(L,substack_start+3); /* value */
1840 lua_call(L,2,0);
1841 lua_remove(L,substack_start+4); /*remove metatable*/
1842 return SWIG_OK;
1843 }
1844 lua_pop(L,1); /* remove the value */
1845 } else {
1846 lua_pop(L,1); /* remove the answer for .set table request*/
1847 }
1848 /* NEW: looks for the __setitem() fn
1849 this is a user provided set fn */
1850 SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
1851 if (lua_iscfunction(L,-1)) /* if it's there */
1852 { /* found it so call the fn & return its value */
1853 lua_pushvalue(L,substack_start+1); /* the userdata */
1854 lua_pushvalue(L,substack_start+2); /* the parameter */
1855 lua_pushvalue(L,substack_start+3); /* the value */
1856 lua_call(L,3,0); /* 3 values in ,0 out */
1857 lua_remove(L,-2); /* stack tidy, remove metatable */
1858 return SWIG_OK;
1859 }
1860 lua_pop(L,1); /* remove value */
1861
1862 lua_pop(L,1); /* remove metatable */
1863 /* Search among bases */
1864 bases_search_result = SWIG_Lua_iterate_bases(L,type,first_arg,SWIG_Lua_class_do_set,ret);
1865 if(ret)
1866 assert(*ret == 0);
1867 assert(lua_gettop(L) == substack_start + 3);
1868 return bases_search_result;
1869}
1870
1871/* This is the actual method exported to Lua. It calls SWIG_Lua_class_do_set and correctly
1872 * handles return values.
1873 */
1875{
1876/* There should be 3 params passed in
1877 (1) table (not the meta table)
1878 (2) string name of the attribute
1879 (3) any for the new value
1880 */
1881 int ret = 0;
1882 int result;
1883 swig_lua_userdata *usr;
1884 swig_type_info *type;
1885 assert(lua_isuserdata(L,1));
1886 usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1887 type = usr->type;
1888 result = SWIG_Lua_class_do_set(L,type,1,&ret);
1889 if(result != SWIG_OK) {
1890 SWIG_Lua_pushferrstring(L,"Assignment not possible. No setter/member with this name. For custom assignments implement __setitem method.");
1891 lua_error(L);
1892 } else {
1893 assert(ret==0);
1894 }
1895 return 0;
1896}
1897
1898/* the class.destruct method called by the interpreter */
1900{
1901/* there should be 1 params passed in
1902 (1) userdata (not the meta table) */
1903 swig_lua_userdata *usr;
1904 swig_lua_class *clss;
1905 assert(lua_isuserdata(L,-1)); /* just in case */
1906 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1907 /* if must be destroyed & has a destructor */
1908 if (usr->own) /* if must be destroyed */
1909 {
1910 clss=(swig_lua_class*)usr->type->clientdata; /* get the class */
1911 if (clss && clss->destructor) /* there is a destroy fn */
1912 {
1913 clss->destructor(usr->ptr); /* bye bye */
1914 }
1915 }
1916 return 0;
1917}
1918
1919/* the class.__tostring method called by the interpreter and print */
1921{
1922/* there should be 1 param passed in
1923 (1) userdata (not the metatable) */
1924 swig_lua_userdata* userData;
1925 assert(lua_isuserdata(L,1)); /* just in case */
1926 userData = (swig_lua_userdata*)lua_touserdata(L,1); /* get the userdata address */
1927
1928 lua_pushfstring(L, "<userdata of type '%s' at %p>", userData->type->str, userData->ptr);
1929 return 1;
1930}
1931
1932/* to manually disown some userdata */
1934{
1935/* there should be 1 params passed in
1936 (1) userdata (not the meta table) */
1937 swig_lua_userdata *usr;
1938 assert(lua_isuserdata(L,-1)); /* just in case */
1939 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1940
1941 usr->own = 0; /* clear our ownership */
1942 return 0;
1943}
1944
1945/* lua callable function to compare userdata's value
1946the issue is that two userdata may point to the same thing
1947but to lua, they are different objects */
1949{
1950 int result;
1951 swig_lua_userdata *usr1,*usr2;
1952 if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2)) /* just in case */
1953 return 0; /* nil reply */
1954 usr1=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1955 usr2=(swig_lua_userdata*)lua_touserdata(L,2); /* get data */
1956 /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
1957 result=(usr1->ptr==usr2->ptr);
1958 lua_pushboolean(L,result);
1959 return 1;
1960}
1961
1962/* populate table at the top of the stack with metamethods that ought to be inherited */
1964{
1965 SWIG_Lua_add_boolean(L, "__add", 1);
1966 SWIG_Lua_add_boolean(L, "__sub", 1);
1967 SWIG_Lua_add_boolean(L, "__mul", 1);
1968 SWIG_Lua_add_boolean(L, "__div", 1);
1969 SWIG_Lua_add_boolean(L, "__mod", 1);
1970 SWIG_Lua_add_boolean(L, "__pow", 1);
1971 SWIG_Lua_add_boolean(L, "__unm", 1);
1972 SWIG_Lua_add_boolean(L, "__len", 1 );
1973 SWIG_Lua_add_boolean(L, "__concat", 1 );
1974 SWIG_Lua_add_boolean(L, "__eq", 1);
1975 SWIG_Lua_add_boolean(L, "__lt", 1);
1976 SWIG_Lua_add_boolean(L, "__le", 1);
1977 SWIG_Lua_add_boolean(L, "__call", 1);
1978 SWIG_Lua_add_boolean(L, "__tostring", 1);
1979 SWIG_Lua_add_boolean(L, "__gc", 0);
1980}
1981
1982/* creates the swig registry */
1984{
1985 /* create main SWIG registry table */
1986 lua_pushstring(L,"SWIG");
1987 lua_newtable(L);
1988 /* populate it with some predefined data */
1989
1990 /* .library table. Placeholder */
1991 lua_pushstring(L,".library");
1992 lua_newtable(L);
1993 {
1994 /* list of metamethods that class inherits from its bases */
1995 lua_pushstring(L,"inheritable_metamethods");
1996 lua_newtable(L);
1997 /* populate with list of metamethods */
1999 lua_rawset(L,-3);
2000 }
2001 lua_rawset(L,-3);
2002
2003 lua_rawset(L,LUA_REGISTRYINDEX);
2004}
2005
2006/* gets the swig registry (or creates it) */
2008{
2009 /* add this all into the swig registry: */
2010 lua_pushstring(L,"SWIG");
2011 lua_rawget(L,LUA_REGISTRYINDEX); /* get the registry */
2012 if (!lua_istable(L,-1)) /* not there */
2013 { /* must be first time, so add it */
2014 lua_pop(L,1); /* remove the result */
2016 /* then get it */
2017 lua_pushstring(L,"SWIG");
2018 lua_rawget(L,LUA_REGISTRYINDEX);
2019 }
2020}
2021
2023{
2025 lua_pushstring(L, ".library");
2026 lua_rawget(L,-2);
2027 assert( !lua_isnil(L,-1) );
2028 lua_pushstring(L, "inheritable_metamethods");
2029 lua_rawget(L,-2);
2030
2031 /* Remove class registry and library table */
2032 lua_remove(L,-2);
2033 lua_remove(L,-2);
2034}
2035
2036/* Helper function to get the classes metatable from the register */
2037SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname)
2038{
2039 SWIG_Lua_get_class_registry(L); /* get the registry */
2040 lua_pushstring(L,cname); /* get the name */
2041 lua_rawget(L,-2); /* get it */
2042 lua_remove(L,-2); /* tidy up (remove registry) */
2043}
2044
2045/* Set up the base classes pointers.
2046Each class structure has a list of pointers to the base class structures.
2047This function fills them.
2048It cannot be done at compile time, as this will not work with hireachies
2049spread over more than one swig file.
2050Therefore it must be done at runtime, querying the SWIG type system.
2051*/
2053{
2054 int i=0;
2056 for(i=0;clss->base_names[i];i++)
2057 {
2058 if (clss->bases[i]==0) /* not found yet */
2059 {
2060 /* lookup and cache the base class */
2061 swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
2062 if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
2063 }
2064 }
2065}
2066
2067#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
2068/* Merges two tables */
2069SWIGINTERN void SWIG_Lua_merge_tables_by_index(lua_State *L, int target, int source)
2070{
2071 /* iterating */
2072 lua_pushnil(L);
2073 while (lua_next(L,source) != 0) {
2074 /* -1 - value, -2 - index */
2075 /* have to copy to assign */
2076 lua_pushvalue(L,-2); /* copy of index */
2077 lua_pushvalue(L,-2); /* copy of value */
2078 lua_rawset(L, target);
2079 lua_pop(L,1);
2080 /* only key is left */
2081 }
2082}
2083
2084/* Merges two tables with given name. original - index of target metatable, base - index of source metatable */
2085SWIGINTERN void SWIG_Lua_merge_tables(lua_State *L, const char* name, int original, int base)
2086{
2087 /* push original[name], then base[name] */
2088 lua_pushstring(L,name);
2089 lua_rawget(L,original);
2090 int original_table = lua_gettop(L);
2091 lua_pushstring(L,name);
2092 lua_rawget(L,base);
2093 int base_table = lua_gettop(L);
2094 SWIG_Lua_merge_tables_by_index(L, original_table, base_table);
2095 /* clearing stack */
2096 lua_pop(L,2);
2097}
2098
2099/* Function takes all symbols from base and adds it to derived class. It's just a helper. */
2100SWIGINTERN void SWIG_Lua_class_squash_base(lua_State *L, swig_lua_class *base_cls)
2101{
2102 /* There is one parameter - original, i.e. 'derived' class metatable */
2103 assert(lua_istable(L,-1));
2104 int original = lua_gettop(L);
2106 int base = lua_gettop(L);
2107 SWIG_Lua_merge_tables(L, ".fn", original, base );
2108 SWIG_Lua_merge_tables(L, ".set", original, base );
2109 SWIG_Lua_merge_tables(L, ".get", original, base );
2110 lua_pop(L,1);
2111}
2112
2113/* Function squashes all symbols from 'clss' bases into itself */
2114SWIGINTERN void SWIG_Lua_class_squash_bases(lua_State *L, swig_lua_class *clss)
2115{
2116 int i;
2118 for(i=0;clss->base_names[i];i++)
2119 {
2120 if (clss->bases[i]==0) /* Somehow it's not found. Skip it */
2121 continue;
2122 /* Thing is: all bases are already registered. Thus they have already executed
2123 * this function. So we just need to squash them into us, because their bases
2124 * are already squashed into them. No need for recursion here!
2125 */
2126 SWIG_Lua_class_squash_base(L, clss->bases[i]);
2127 }
2128 lua_pop(L,1); /*tidy stack*/
2129}
2130#endif
2131
2132#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
2133/* helper add a variable to a registered class */
2134SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn)
2135{
2136 assert(lua_istable(L,-1)); /* just in case */
2137 SWIG_Lua_get_table(L,".get"); /* find the .get table */
2138 assert(lua_istable(L,-1)); /* just in case */
2139 SWIG_Lua_add_function(L,name,getFn);
2140 lua_pop(L,1); /* tidy stack (remove table) */
2141 if (setFn)
2142 {
2143 SWIG_Lua_get_table(L,".set"); /* find the .set table */
2144 assert(lua_istable(L,-1)); /* just in case */
2145 SWIG_Lua_add_function(L,name,setFn);
2146 lua_pop(L,1); /* tidy stack (remove table) */
2147 }
2148}
2149
2150/* helper to recursively add class static details (static attributes, operations and constants) */
2152{
2153 int i = 0;
2154 /* The class namespace table must be on the top of the stack */
2155 assert(lua_istable(L,-1));
2156 /* call all the base classes first: we can then override these later: */
2157 for(i=0;clss->bases[i];i++)
2158 {
2160 }
2161
2163}
2164
2165SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss); /* forward declaration */
2166
2167/* helper to recursively add class details (attributes & operations) */
2169{
2170 int i;
2171 size_t bases_count = 0;
2172 /* Add bases to .bases table */
2173 SWIG_Lua_get_table(L,".bases");
2174 assert(lua_istable(L,-1)); /* just in case */
2175 for(i=0;clss->bases[i];i++)
2176 {
2178 /* Base class must be already registered */
2179 assert(lua_istable(L,-1));
2180 lua_rawseti(L,-2,i+1); /* In lua indexing starts from 1 */
2181 bases_count++;
2182 }
2183 assert(lua_rawlen(L,-1) == bases_count);
2184 lua_pop(L,1); /* remove .bases table */
2185 /* add attributes */
2186 for(i=0;clss->attributes[i].name;i++){
2188 }
2189 /* add methods to the metatable */
2190 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
2191 assert(lua_istable(L,-1)); /* just in case */
2192 for(i=0;clss->methods[i].name;i++){
2193 SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].func);
2194 }
2195 lua_pop(L,1); /* tidy stack (remove table) */
2196 /* add operator overloads
2197 This adds methods from metatable array to metatable. Can mess up garbage
2198 collectind if someone defines __gc method
2199 */
2200 if(clss->metatable) {
2201 for(i=0;clss->metatable[i].name;i++) {
2202 SWIG_Lua_add_function(L,clss->metatable[i].name,clss->metatable[i].func);
2203 }
2204 }
2205
2206#if !defined(SWIG_LUA_SQUASH_BASES)
2207 /* Adding metamethods that are defined in base classes. If bases were squashed
2208 * then it is obviously unnecessary
2209 */
2211#endif
2212}
2213
2214/* Helpers to add user defined class metamedhods - __add, __sub etc. The helpers are needed
2215 for the following issue: Lua runtime checks for metamethod existence with rawget function
2216 ignoring our SWIG-provided __index and __newindex functions. Thus our inheritance-aware method
2217 search algorithm doesn't work in such case. (Not to say that Lua runtime queries metamethod directly
2218 in metatable and not in object).
2219 Current solution is this: if somewhere in hierarchy metamethod __x is defined, then all descendants
2220 are automatically given a special proxy __x that calls the real __x method.
2221 Obvious idea - to copy __x instead of creating __x-proxy is wrong because if someone changes __x in runtime,
2222 those changes must be reflected in all descendants.
2223*/
2224
2225SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L); /*forward declaration*/
2226
2227/* The real function that resolves a metamethod.
2228 * Function searches given class and all its bases (recursively) for first instance of something that is
2229 * not equal to SWIG_Lua_resolve_metamethod. (Almost always this 'something' is actual metamethod implementation
2230 * and it is a SWIG-generated C function.). It returns value on the top of the L and there is no garbage below the
2231 * answer.
2232 * Returns 1 if found, 0 otherwise.
2233 * clss is class which metatable we will search for method
2234 * metamethod_name_idx is index in L where metamethod name (as string) lies
2235 * skip_check allows skipping searching metamethod in the given class and immediately going to searching in bases. skip_check
2236 * is not carried to subsequent recursive calls - false is always passed. It is set to true only at first call from
2237 * SWIG_Lua_resolve_metamethod
2238 * */
2239SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx,
2240 int skip_check)
2241{
2242 /* This function is called recursively */
2243 int result = 0;
2244 int i = 0;
2245
2246 if (!skip_check) {
2248 lua_pushvalue(L, metamethod_name_idx);
2249 lua_rawget(L,-2);
2250 /* If this is cfunction and it is equal to SWIG_Lua_resolve_metamethod then
2251 * this isn't the function we are looking for :)
2252 * lua_tocfunction will return NULL if not cfunction
2253 */
2254 if (!lua_isnil(L,-1) && lua_tocfunction(L,-1) != SWIG_Lua_resolve_metamethod ) {
2255 lua_remove(L,-2); /* removing class metatable */
2256 return 1;
2257 }
2258 lua_pop(L,2); /* remove class metatable and query result */
2259 }
2260
2261 /* Forwarding calls to bases */
2262 for(i=0;clss->bases[i];i++)
2263 {
2264 result = SWIG_Lua_do_resolve_metamethod(L, clss->bases[i], metamethod_name_idx, 0);
2265 if (result)
2266 break;
2267 }
2268
2269 return result;
2270}
2271
2272/* The proxy function for metamethod. All parameters are passed as cclosure. Searches for actual method
2273 * and calls it */
2275{
2276 int numargs;
2277 int metamethod_name_idx;
2278 const swig_lua_class* clss;
2279 int result;
2280
2281 lua_checkstack(L,5);
2282 numargs = lua_gettop(L); /* number of arguments to pass to actual metamethod */
2283
2284 /* Get upvalues from closure */
2285 lua_pushvalue(L, lua_upvalueindex(1)); /*Get function name*/
2286 metamethod_name_idx = lua_gettop(L);
2287
2288 lua_pushvalue(L, lua_upvalueindex(2));
2289 clss = (const swig_lua_class*)(lua_touserdata(L,-1));
2290 lua_pop(L,1); /* remove lightuserdata with clss from stack */
2291
2292 /* Actual work */
2293 result = SWIG_Lua_do_resolve_metamethod(L, clss, metamethod_name_idx, 1);
2294 if (!result) {
2295 SWIG_Lua_pushferrstring(L,"The metamethod proxy is set, but it failed to find actual metamethod. Memory corruption is most likely explanation.");
2296 lua_error(L);
2297 return 0;
2298 }
2299
2300 lua_remove(L,-2); /* remove metamethod key */
2301 lua_insert(L,1); /* move function to correct position */
2302 lua_call(L, numargs, LUA_MULTRET);
2303 return lua_gettop(L); /* return all results */
2304}
2305
2306
2307/* If given metamethod must be present in given class, then creates appropriate proxy
2308 * Returns 1 if successfully added, 0 if not added because no base class has it, -1
2309 * if method is defined in the class metatable itself
2310 */
2311SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index)
2312{
2313 int key_index;
2314 int success = 0;
2315 int i = 0;
2316
2317 /* metamethod name - on the top of the stack */
2318 assert(lua_isstring(L,-1));
2319
2320 key_index = lua_gettop(L);
2321
2322 /* Check whether method is already defined in metatable */
2323 lua_pushvalue(L,key_index); /* copy of the key */
2324 lua_gettable(L,metatable_index);
2325 if( !lua_isnil(L,-1) ) {
2326 lua_pop(L,1);
2327 return -1;
2328 }
2329 lua_pop(L,1);
2330
2331 /* Iterating over immediate bases */
2332 for(i=0;clss->bases[i];i++)
2333 {
2334 const swig_lua_class *base = clss->bases[i];
2336 lua_pushvalue(L, key_index);
2337 lua_rawget(L, -2);
2338 if( !lua_isnil(L,-1) ) {
2339 lua_pushvalue(L, key_index);
2340
2341 /* Add proxy function */
2342 lua_pushvalue(L, key_index); /* first closure value is function name */
2343 lua_pushlightuserdata(L, clss); /* second closure value is swig_lua_class structure */
2344 lua_pushcclosure(L, SWIG_Lua_resolve_metamethod, 2);
2345
2346 lua_rawset(L, metatable_index);
2347 success = 1;
2348 }
2349 lua_pop(L,1); /* remove function or nil */
2350 lua_pop(L,1); /* remove base class metatable */
2351
2352 if( success )
2353 break;
2354 }
2355
2356 return success;
2357}
2358
2360{
2361 int metatable_index;
2362 int metamethods_info_index;
2363 int tostring_undefined;
2364 int eq_undefined = 0;
2365
2367 metatable_index = lua_gettop(L);
2369 assert(lua_istable(L,-1));
2370 metamethods_info_index = lua_gettop(L);
2371 lua_pushnil(L); /* first key */
2372 while(lua_next(L, metamethods_info_index) != 0 ) {
2373 /* key at index -2, value at index -1 */
2374 const int is_inheritable = lua_toboolean(L,-2);
2375 lua_pop(L,1); /* remove value - we don't need it anymore */
2376
2377 if(is_inheritable) { /* if metamethod is inheritable */
2378 SWIG_Lua_add_class_user_metamethod(L,clss,metatable_index);
2379 }
2380 }
2381
2382 lua_pop(L,1); /* remove inheritable metamethods table */
2383
2384 /* Special handling for __tostring method */
2385 lua_pushstring(L, "__tostring");
2386 lua_pushvalue(L,-1);
2387 lua_rawget(L,metatable_index);
2388 tostring_undefined = lua_isnil(L,-1);
2389 lua_pop(L,1);
2390 if( tostring_undefined ) {
2391 lua_pushcfunction(L, SWIG_Lua_class_tostring);
2392 lua_rawset(L, metatable_index);
2393 } else {
2394 lua_pop(L,1); /* remove copy of the key */
2395 }
2396
2397 /* Special handling for __eq method */
2398 lua_pushstring(L, "__eq");
2399 lua_pushvalue(L,-1);
2400 lua_rawget(L,metatable_index);
2401 eq_undefined = lua_isnil(L,-1);
2402 lua_pop(L,1);
2403 if( eq_undefined ) {
2404 lua_pushcfunction(L, SWIG_Lua_class_equal);
2405 lua_rawset(L, metatable_index);
2406 } else {
2407 lua_pop(L,1); /* remove copy of the key */
2408 }
2409 /* Warning: __index and __newindex are SWIG-defined. For user-defined operator[]
2410 * a __getitem/__setitem method should be defined
2411 */
2412 lua_pop(L,1); /* pop class metatable */
2413}
2414
2415/* Register class static methods,attributes etc as well as constructor proxy */
2417{
2418 const int SWIGUNUSED begin = lua_gettop(L);
2419 lua_checkstack(L,5); /* just in case */
2420 assert(lua_istable(L,-1)); /* just in case */
2421 assert(strcmp(clss->name, clss->cls_static->name) == 0); /* in class those 2 must be equal */
2422
2424
2425 assert(lua_istable(L,-1)); /* just in case */
2426
2427 /* add its constructor to module with the name of the class
2428 so you can do MyClass(...) as well as new_MyClass(...)
2429 BUT only if a constructor is defined
2430 (this overcomes the problem of pure virtual classes without constructors)*/
2431 if (clss->constructor)
2432 {
2433 lua_getmetatable(L,-1);
2434 assert(lua_istable(L,-1)); /* just in case */
2435 SWIG_Lua_add_function(L,"__call", clss->constructor);
2436 lua_pop(L,1);
2437 }
2438
2439 assert(lua_istable(L,-1)); /* just in case */
2441
2442 /* clear stack */
2443 lua_pop(L,1);
2444 assert( lua_gettop(L) == begin );
2445}
2446
2447/* Performs the instance (non-static) class registration process. Metatable for class is created
2448 * and added to the class registry.
2449 */
2451{
2452 const int SWIGUNUSED begin = lua_gettop(L);
2453 int i;
2454 /* if name already there (class is already registered) then do nothing */
2455 SWIG_Lua_get_class_registry(L); /* get the registry */
2456 lua_pushstring(L,clss->fqname); /* get the name */
2457 lua_rawget(L,-2);
2458 if(!lua_isnil(L,-1)) {
2459 lua_pop(L,2);
2460 assert(lua_gettop(L)==begin);
2461 return;
2462 }
2463 lua_pop(L,2); /* tidy stack */
2464 /* Recursively initialize all bases */
2465 for(i=0;clss->bases[i];i++)
2466 {
2468 }
2469 /* Again, get registry and push name */
2470 SWIG_Lua_get_class_registry(L); /* get the registry */
2471 lua_pushstring(L,clss->fqname); /* get the name */
2472 lua_newtable(L); /* create the metatable */
2473#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
2474 /* If squashing is requested, then merges all bases metatable into this one.
2475 * It would get us all special methods: __getitem, __add etc.
2476 * This would set .fn, .type, and other .xxx incorrectly, but we will overwrite it right away
2477 */
2478 {
2479 int new_metatable_index = lua_absindex(L,-1);
2480 for(i=0;clss->bases[i];i++)
2481 {
2482 int base_metatable;
2484 base_metatable = lua_absindex(L,-1);
2485 SWIG_Lua_merge_tables_by_index(L,new_metatable_index, base_metatable);
2486 lua_pop(L,1);
2487 }
2488 }
2489 /* And now we will overwrite all incorrectly set data */
2490#endif
2491 /* add string of class name called ".type" */
2492 lua_pushstring(L,".type");
2493 lua_pushstring(L,clss->fqname);
2494 lua_rawset(L,-3);
2495 /* add a table called bases */
2496 lua_pushstring(L,".bases");
2497 lua_newtable(L);
2498 lua_rawset(L,-3);
2499 /* add a table called ".get" */
2500 lua_pushstring(L,".get");
2501 lua_newtable(L);
2502 lua_rawset(L,-3);
2503 /* add a table called ".set" */
2504 lua_pushstring(L,".set");
2505 lua_newtable(L);
2506 lua_rawset(L,-3);
2507 /* add a table called ".fn" */
2508 lua_pushstring(L,".fn");
2509 lua_newtable(L);
2510 /* add manual disown method */
2512 lua_rawset(L,-3);
2513 /* add accessor fns for using the .get,.set&.fn */
2517 /* add it */
2518 lua_rawset(L,-3); /* metatable into registry */
2519 lua_pop(L,1); /* tidy stack (remove registry) */
2520 assert(lua_gettop(L) == begin);
2521
2522#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
2523 /* Now merge all symbols from .fn, .set, .get etc from bases to our tables */
2524 SWIG_Lua_class_squash_bases(L,clss);
2525#endif
2527 SWIG_Lua_add_class_instance_details(L,clss); /* recursive adding of details (atts & ops) */
2528 lua_pop(L,1); /* tidy stack (remove class metatable) */
2529 assert( lua_gettop(L) == begin );
2530}
2531
2533{
2534 int SWIGUNUSED begin;
2535 assert(lua_istable(L,-1)); /* This is a table (module or namespace) where classes will be added */
2538
2539 /* Add links from static part to instance part and vice versa */
2540 /* [SWIG registry] [Module]
2541 * "MyClass" ----> [MyClass metatable] <===== "MyClass" -+> [static part]
2542 * ".get" ----> ... | | getmetatable()----|
2543 * ".set" ----> ... | | |
2544 * ".static" --------------)----------------/ [static part metatable]
2545 * | ".get" --> ...
2546 * | ".set" --> ....
2547 * |=============================== ".instance"
2548 */
2549 begin = lua_gettop(L);
2550 lua_pushstring(L,clss->cls_static->name);
2551 lua_rawget(L,-2); /* get class static table */
2552 assert(lua_istable(L,-1));
2553 lua_getmetatable(L,-1);
2554 assert(lua_istable(L,-1)); /* get class static metatable */
2555 lua_pushstring(L,".instance"); /* prepare key */
2556
2557 SWIG_Lua_get_class_metatable(L,clss->fqname); /* get class metatable */
2558 assert(lua_istable(L,-1));
2559 lua_pushstring(L,".static"); /* prepare key */
2560 lua_pushvalue(L, -4); /* push static class TABLE */
2561 assert(lua_istable(L,-1));
2562 lua_rawset(L,-3); /* assign static class table(!NOT metatable) as ".static" member of class metatable */
2563 lua_rawset(L,-3); /* assign class metatable as ".instance" member of class static METATABLE */
2564 lua_pop(L,2);
2565 assert(lua_gettop(L) == begin);
2566}
2567#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */
2568
2569#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
2570SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_class *clss)
2571{
2572 const int SWIGUNUSED begin = lua_gettop(L);
2573 int i;
2574 /* if name already there (class is already registered) then do nothing */
2575 SWIG_Lua_get_class_registry(L); /* get the registry */
2576 lua_pushstring(L,clss->fqname); /* get the name */
2577 lua_rawget(L,-2);
2578 if(!lua_isnil(L,-1)) {
2579 lua_pop(L,2);
2580 assert(lua_gettop(L)==begin);
2581 return;
2582 }
2583 lua_pop(L,2); /* tidy stack */
2584 /* Recursively initialize all bases */
2585 for(i=0;clss->bases[i];i++)
2586 {
2587 SWIG_Lua_elua_class_register_instance(L,clss->bases[i]);
2588 }
2589 /* Again, get registry and push name */
2590 SWIG_Lua_get_class_registry(L); /* get the registry */
2591 lua_pushstring(L,clss->fqname); /* get the name */
2592 assert(clss->metatable);
2593 lua_pushrotable(L, (void*)(clss->metatable)); /* create the metatable */
2594 lua_rawset(L,-3);
2595 lua_pop(L,1);
2596 assert(lua_gettop(L) == begin);
2597}
2598#endif /* elua && eluac */
2599
2600/* -----------------------------------------------------------------------------
2601 * Class/structure conversion fns
2602 * ----------------------------------------------------------------------------- */
2603
2604/* helper to add metatable to new lua object */
2606{
2607 if (type->clientdata) /* there is clientdata: so add the metatable */
2608 {
2609 SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->fqname);
2610 if (lua_istable(L,-1))
2611 {
2612 lua_setmetatable(L,-2);
2613 }
2614 else
2615 {
2616 lua_pop(L,1);
2617 }
2618 }
2619}
2620
2621/* pushes a new object into the lua stack */
2622SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own)
2623{
2624 swig_lua_userdata *usr;
2625 if (!ptr){
2626 lua_pushnil(L);
2627 return;
2628 }
2629 usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata)); /* get data */
2630 usr->ptr=ptr; /* set the ptr */
2631 usr->type=type;
2632 usr->own=own;
2633#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
2634 SWIG_Lua_AddMetatable(L,type); /* add metatable */
2635#endif
2636}
2637
2638/* takes a object from the lua stack & converts it into an object of the correct type
2639 (if possible) */
2640SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L,int index,void **ptr,swig_type_info *type,int flags)
2641{
2642 int ret = SWIG_ERROR;
2643 swig_lua_userdata *usr;
2644 swig_cast_info *cast;
2645 /* special case: lua nil => NULL pointer */
2646 if (lua_isnil(L,index))
2647 {
2648 *ptr=0;
2650 }
2651 if (lua_islightuserdata(L,index))
2652 {
2653 *ptr=lua_touserdata(L,index);
2655 }
2656 usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */
2657 if (usr)
2658 {
2659 if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !usr->own)
2660 {
2662 }
2663 if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
2664 {
2665 usr->own = 0;
2666 }
2667 if (!type) /* special cast void*, no casting fn */
2668 {
2669 *ptr=usr->ptr;
2670 ret = SWIG_OK;
2671 }
2672 else
2673 {
2674 cast=SWIG_TypeCheck(usr->type->name,type); /* performs normal type checking */
2675 if (cast)
2676 {
2677 int newmemory = 0;
2678 *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
2679 assert(!newmemory); /* newmemory handling not yet implemented */
2680 ret = SWIG_OK;
2681 }
2682 }
2683 if ((ret == SWIG_OK) && (flags & SWIG_POINTER_CLEAR))
2684 {
2685 usr->ptr = 0;
2686 }
2687 }
2688 return ret;
2689}
2690
2691SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State *L,int index,swig_type_info *type,int flags,
2692 int argnum,const char *func_name){
2693 void *result = 0;
2694 if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
2695 luaL_error (L,"Error in %s, expected a %s at argument number %d\n",
2696 func_name,(type && type->str)?type->str:"void*",argnum);
2697 }
2698 return result;
2699}
2700
2701/* pushes a packed userdata. user for member fn pointers only */
2702SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type)
2703{
2704 swig_lua_rawdata *raw;
2705 assert(ptr); /* not acceptable to pass in a NULL value */
2706 raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size); /* alloc data */
2707 raw->type=type;
2708 raw->own=0;
2709 memcpy(raw->data,ptr,size); /* copy the data */
2710 SWIG_Lua_AddMetatable(L,type); /* add metatable */
2711}
2712
2713/* converts a packed userdata. user for member fn pointers only */
2714SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L,int index,void *ptr,size_t size,swig_type_info *type)
2715{
2716 swig_lua_rawdata *raw;
2717 raw=(swig_lua_rawdata*)lua_touserdata(L,index); /* get data */
2718 if (!raw) return SWIG_ERROR; /* error */
2719 if (type==0 || type==raw->type) /* void* or identical type */
2720 {
2721 memcpy(ptr,raw->data,size); /* copy it */
2722 return SWIG_OK; /* ok */
2723 }
2724 return SWIG_ERROR; /* error */
2725}
2726
2727/* a function to get the typestring of a piece of data */
2728SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
2729{
2730 swig_lua_userdata *usr;
2731 if (lua_isuserdata(L,tp))
2732 {
2733 usr=(swig_lua_userdata*)lua_touserdata(L,tp); /* get data */
2734 if (usr && usr->type && usr->type->str)
2735 return usr->type->str;
2736 return "userdata (unknown type)";
2737 }
2738 return lua_typename(L,lua_type(L,tp));
2739}
2740
2741/* lua callable function to get the userdata's type */
2743{
2744 lua_pushstring(L,SWIG_Lua_typename(L,1));
2745 return 1;
2746}
2747
2748/* -----------------------------------------------------------------------------
2749 * global variable support code: class/struct typemap functions
2750 * ----------------------------------------------------------------------------- */
2751
2752#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
2753/* Install Constants */
2754SWIGINTERN void
2756 int i;
2757 for (i = 0; constants[i].type; i++) {
2758 switch(constants[i].type) {
2759 case SWIG_LUA_INT:
2760 lua_pushstring(L,constants[i].name);
2761 lua_pushinteger(L,(lua_Integer)constants[i].lvalue);
2762 lua_rawset(L,-3);
2763 break;
2764 case SWIG_LUA_FLOAT:
2765 lua_pushstring(L,constants[i].name);
2766 lua_pushnumber(L,(lua_Number)constants[i].dvalue);
2767 lua_rawset(L,-3);
2768 break;
2769 case SWIG_LUA_CHAR:
2770 lua_pushstring(L,constants[i].name);
2771 {
2772 char c = (char)constants[i].lvalue;
2773 lua_pushlstring(L,&c,1);
2774 }
2775 lua_rawset(L,-3);
2776 break;
2777 case SWIG_LUA_STRING:
2778 lua_pushstring(L,constants[i].name);
2779 lua_pushstring(L,(char *) constants[i].pvalue);
2780 lua_rawset(L,-3);
2781 break;
2782 case SWIG_LUA_POINTER:
2783 lua_pushstring(L,constants[i].name);
2784 SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
2785 lua_rawset(L,-3);
2786 break;
2787 case SWIG_LUA_BINARY:
2788 lua_pushstring(L,constants[i].name);
2789 SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
2790 lua_rawset(L,-3);
2791 break;
2792 default:
2793 break;
2794 }
2795 }
2796}
2797#endif
2798
2799/* -----------------------------------------------------------------------------
2800 * executing lua code from within the wrapper
2801 * ----------------------------------------------------------------------------- */
2802
2803#ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
2804#define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
2805#endif
2806/* Executes a C string in Lua which is a really simple way of calling lua from C
2807Unfortunately lua keeps changing its APIs, so we need a conditional compile
2808In lua 5.0.X it's lua_dostring()
2809In lua 5.1.X it's luaL_dostring()
2810*/
2811SWIGINTERN int
2812SWIG_Lua_dostring(lua_State *L, const char *str) {
2813 int ok,top;
2814 if (str==0 || str[0]==0) return 0; /* nothing to do */
2815 top=lua_gettop(L); /* save stack */
2816#if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
2817 ok=luaL_dostring(L,str); /* looks like this is lua 5.1.X or later, good */
2818#else
2819 ok=lua_dostring(L,str); /* might be lua 5.0.x, using lua_dostring */
2820#endif
2821 if (ok!=0) {
2822 SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
2823 }
2824 lua_settop(L,top); /* restore the stack */
2825 return ok;
2826}
2827
2828#ifdef __cplusplus
2829}
2830#endif
2831
2832/* ------------------------------ end luarun.swg ------------------------------ */
2833
2834
2835/* -------- TYPES TABLE (BEGIN) -------- */
2836
2837#define SWIGTYPE_p_PLGraphicsIn swig_types[0]
2838#define SWIGTYPE_p_char swig_types[1]
2839#define SWIGTYPE_p_double swig_types[2]
2840#define SWIGTYPE_p_f_double_double__int swig_types[3]
2841#define SWIGTYPE_p_f_double_double_p_double_p_double_p_void__void swig_types[4]
2842#define SWIGTYPE_p_f_int_double_p_char_int_p_void__void swig_types[5]
2843#define SWIGTYPE_p_f_int_p_double_p_double__void swig_types[6]
2844#define SWIGTYPE_p_f_int_p_q_const__double_p_q_const__double__void swig_types[7]
2845#define SWIGTYPE_p_int swig_types[8]
2846#define SWIGTYPE_p_p_char swig_types[9]
2847#define SWIGTYPE_p_p_double swig_types[10]
2848#define SWIGTYPE_p_unsigned_int swig_types[11]
2850static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
2851#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2852#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2853
2854/* -------- TYPES TABLE (END) -------- */
2855
2856#define SWIG_name "plplotluac"
2857#define SWIG_init luaopen_plplotluac
2858#define SWIG_init_user luaopen_plplotluac_user
2859
2860#define SWIG_LUACODE luaopen_plplotluac_luacode
2861
2862#include "plplotP.h"
2863
2864
2865#define LUA_ALLOC_ARRAY( TYPE, LEN ) (TYPE *) malloc( LEN * sizeof ( TYPE ) )
2866#define LUA_FREE_ARRAY( PTR ) if ( PTR ) { free( PTR ); PTR = NULL;}
2867
2868// super macro to declare array typemap helper fns
2869 SWIGINTERN int SWIG_itable_size( lua_State* L, int index );
2870#define LUA_DECLARE_TYPEMAP_ARR_FN( NAME, TYPE ) \
2871 SWIGINTERN int LUA_read_ ## NAME ## _num_array( lua_State * L, int index, TYPE * array, int size ){ \
2872 int i; \
2873 for ( i = 0; i < size; i++ ) { \
2874 lua_rawgeti( L, index, i + 1 ); \
2875 if ( lua_isnumber( L, -1 ) ) { \
2876 array[i] = (TYPE) lua_tonumber( L, -1 ); \
2877 } else { \
2878 lua_pop( L, 1 ); \
2879 return 0; \
2880 } \
2881 lua_pop( L, 1 ); \
2882 } \
2883 return 1; \
2884 } \
2885 SWIGINTERN TYPE* LUA_get_ ## NAME ## _num_array_var( lua_State * L, int index, int* size ) \
2886 { \
2887 TYPE *array; \
2888 if ( !lua_istable( L, index ) ) { \
2889 lua_pushstring( L, "expected a table" ); \
2890 return 0; \
2891 } \
2892 *size = SWIG_itable_size( L, index ); \
2893 if ( *size < 1 ) { \
2894 array = LUA_ALLOC_ARRAY( TYPE, 1 ); \
2895 array[0] = (TYPE) 0; \
2896 return array; \
2897 } \
2898 array = LUA_ALLOC_ARRAY( TYPE, *size ); \
2899 if ( !LUA_read_ ## NAME ## _num_array( L, index, array, *size ) ) { \
2900 lua_pushstring( L, "table must contain numbers" ); \
2901 LUA_FREE_ARRAY( array ); \
2902 return 0; \
2903 } \
2904 return array; \
2905 }
2906
2909
2910
2911 static PLINT Alen = 0;
2912 static PLINT Xlen = 0, Ylen = 0;
2913
2914
2915#ifdef __cplusplus /* generic alloc/dealloc fns*/
2916#define SWIG_ALLOC_ARRAY(TYPE,LEN) new TYPE[LEN]
2917#define SWIG_FREE_ARRAY(PTR) delete[] PTR
2918#else
2919#define SWIG_ALLOC_ARRAY(TYPE,LEN) (TYPE *)malloc(LEN*sizeof(TYPE))
2920#define SWIG_FREE_ARRAY(PTR) free(PTR)
2921#endif
2922/* counting the size of arrays:*/
2923SWIGINTERN int SWIG_itable_size(lua_State* L, int index)
2924{
2925 int n=0;
2926 while(1){
2927 lua_rawgeti(L,index,n+1);
2928 if (lua_isnil(L,-1))break;
2929 ++n;
2930 lua_pop(L,1);
2931 }
2932 lua_pop(L,1);
2933 return n;
2934}
2935
2936SWIGINTERN int SWIG_table_size(lua_State* L, int index)
2937{
2938 int n=0;
2939 lua_pushnil(L); /* first key*/
2940 while (lua_next(L, index) != 0) {
2941 ++n;
2942 lua_pop(L, 1); /* removes `value'; keeps `key' for next iteration*/
2943 }
2944 return n;
2945}
2946
2947/* super macro to declare array typemap helper fns */
2948#define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME,TYPE)\
2949 SWIGINTERN int SWIG_read_##NAME##_num_array(lua_State* L,int index,TYPE *array,int size){\
2950 int i;\
2951 for (i = 0; i < size; i++) {\
2952 lua_rawgeti(L,index,i+1);\
2953 if (lua_isnumber(L,-1)){\
2954 array[i] = (TYPE)lua_tonumber(L,-1);\
2955 } else {\
2956 lua_pop(L,1);\
2957 return 0;\
2958 }\
2959 lua_pop(L,1);\
2960 }\
2961 return 1;\
2962 }\
2963 SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_fixed(lua_State* L, int index, int size){\
2964 TYPE *array;\
2965 if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {\
2966 SWIG_Lua_pushferrstring(L,"expected a table of size %d",size);\
2967 return 0;\
2968 }\
2969 array=SWIG_ALLOC_ARRAY(TYPE,size);\
2970 if (!SWIG_read_##NAME##_num_array(L,index,array,size)){\
2971 SWIG_Lua_pusherrstring(L,"table must contain numbers");\
2972 SWIG_FREE_ARRAY(array);\
2973 return 0;\
2974 }\
2975 return array;\
2976 }\
2977 SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_var(lua_State* L, int index, int* size)\
2978 {\
2979 TYPE *array;\
2980 if (!lua_istable(L,index)) {\
2981 SWIG_Lua_pusherrstring(L,"expected a table");\
2982 return 0;\
2983 }\
2984 *size=SWIG_itable_size(L,index);\
2985 if (*size<1){\
2986 SWIG_Lua_pusherrstring(L,"table appears to be empty");\
2987 return 0;\
2988 }\
2989 array=SWIG_ALLOC_ARRAY(TYPE,*size);\
2990 if (!SWIG_read_##NAME##_num_array(L,index,array,*size)){\
2991 SWIG_Lua_pusherrstring(L,"table must contain numbers");\
2992 SWIG_FREE_ARRAY(array);\
2993 return 0;\
2994 }\
2995 return array;\
2996 }\
2997 SWIGINTERN void SWIG_write_##NAME##_num_array(lua_State* L,TYPE *array,int size){\
2998 int i;\
2999 lua_newtable(L);\
3000 for (i = 0; i < size; i++){\
3001 lua_pushnumber(L,(lua_Number)array[i]);\
3002 lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/ \
3003 }\
3004 }
3005
3006SWIG_DECLARE_TYPEMAP_ARR_FN(schar,signed char)
3007SWIG_DECLARE_TYPEMAP_ARR_FN(uchar,unsigned char)
3010SWIG_DECLARE_TYPEMAP_ARR_FN(short,short)
3011SWIG_DECLARE_TYPEMAP_ARR_FN(ushort,unsigned short)
3013SWIG_DECLARE_TYPEMAP_ARR_FN(ulong,unsigned long)
3014SWIG_DECLARE_TYPEMAP_ARR_FN(float,float)
3015SWIG_DECLARE_TYPEMAP_ARR_FN(double,double)
3016
3017SWIGINTERN int SWIG_read_ptr_array(lua_State* L,int index,void **array,int size,swig_type_info *type){
3018 int i;
3019 for (i = 0; i < size; i++) {
3020 lua_rawgeti(L,index,i+1);
3021 if (!lua_isuserdata(L,-1) || SWIG_ConvertPtr(L,-1,&array[i],type,0)==-1){
3022 lua_pop(L,1);
3023 return 0;
3024 }
3025 lua_pop(L,1);
3026 }
3027 return 1;
3028}
3029SWIGINTERN void** SWIG_get_ptr_array_fixed(lua_State* L, int index, int size,swig_type_info *type){
3030 void **array;
3031 if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {
3032 SWIG_Lua_pushferrstring(L,"expected a table of size %d",size);
3033 return 0;
3034 }
3035 array=SWIG_ALLOC_ARRAY(void*,size);
3036 if (!SWIG_read_ptr_array(L,index,array,size,type)){
3037 SWIG_Lua_pushferrstring(L,"table must contain pointers of type %s",type->name);
3038 SWIG_FREE_ARRAY(array);
3039 return 0;
3040 }
3041 return array;
3042}
3043SWIGINTERN void** SWIG_get_ptr_array_var(lua_State* L, int index, int* size,swig_type_info *type){
3044 void **array;
3045 if (!lua_istable(L,index)) {
3046 SWIG_Lua_pusherrstring(L,"expected a table");
3047 return 0;
3048 }
3049 *size=SWIG_itable_size(L,index);
3050 if (*size<1){
3051 SWIG_Lua_pusherrstring(L,"table appears to be empty");
3052 return 0;
3053 }
3054 array=SWIG_ALLOC_ARRAY(void*,*size);
3055 if (!SWIG_read_ptr_array(L,index,array,*size,type)){
3056 SWIG_Lua_pushferrstring(L,"table must contain pointers of type %s",type->name);
3057 SWIG_FREE_ARRAY(array);
3058 return 0;
3059 }
3060 return array;
3061}
3062SWIGINTERN void SWIG_write_ptr_array(lua_State* L,void **array,int size,swig_type_info *type,int own){
3063 int i;
3064 lua_newtable(L);
3065 for (i = 0; i < size; i++){
3066 SWIG_NewPointerObj(L,array[i],type,own);
3067 lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/
3068 }
3069}
3070
3071
3072 PLFLT** read_double_Matrix( lua_State* L, int index, int* nx, int *ny );
3073
3074 PLFLT** read_double_Matrix( lua_State* L, int index, int* nx, int *ny )
3075 {
3076 int i, j;
3077 PLFLT** matrix;
3078
3079 *nx = 0;
3080 *ny = 0;
3081
3082 if ( !lua_istable( L, index ) )
3083 {
3084 lua_pushstring( L, "expected a table" );
3085 return NULL;
3086 }
3087 *nx = SWIG_itable_size( L, index );
3088 if ( *nx < 1 )
3089 {
3090 lua_pushstring( L, "table appears to be empty" );
3091 return NULL;
3092 }
3093 matrix = LUA_ALLOC_ARRAY( PLFLT *, *nx );
3094 for ( i = 0; i < *nx; i++ )
3095 matrix[i] = NULL;
3096
3097 lua_rawgeti( L, index, 1 );
3098 if ( !lua_istable( L, -1 ) )
3099 {
3100 lua_pop( L, 1 );
3101 lua_pushstring( L, "expected a table" );
3102 LUA_FREE_ARRAY( matrix );
3103 return NULL;
3104 }
3105 *ny = SWIG_itable_size( L, -1 );
3106 if ( *ny < 1 )
3107 {
3108 lua_pushstring( L, "table appears to be empty" );
3109 LUA_FREE_ARRAY( matrix );
3110 return NULL;
3111 }
3112 lua_pop( L, 1 );
3113
3114 for ( i = 0; i < *nx; i++ )
3115 {
3116 lua_rawgeti( L, index, i + 1 );
3117 if ( !lua_istable( L, -1 ) )
3118 {
3119 lua_pop( L, 1 );
3120 lua_pushstring( L, "expected a table" );
3121 for ( j = 0; j < *ny; j++ )
3122 LUA_FREE_ARRAY( matrix[j] );
3123 LUA_FREE_ARRAY( matrix );
3124 return NULL;
3125 }
3126 if ( *ny != SWIG_itable_size( L, -1 ) )
3127 {
3128 lua_pop( L, 1 );
3129 lua_pushstring( L, "inconsistent table sizes" );
3130 for ( j = 0; j < i; j++ )
3131 LUA_FREE_ARRAY( matrix[j] );
3132 LUA_FREE_ARRAY( matrix );
3133 return NULL;
3134 }
3135 matrix[i] = LUA_ALLOC_ARRAY( PLFLT, *ny );
3136 for ( j = 0; j < *ny; j++ )
3137 {
3138 lua_rawgeti( L, -1, j + 1 );
3139 if ( lua_isnumber( L, -1 ) )
3140 {
3141 matrix[i][j] = (PLFLT) lua_tonumber( L, -1 );
3142 }
3143 else
3144 {
3145 lua_pop( L, 1 );
3146 lua_pushstring( L, "table must contain numbers" );
3147 for ( j = 0; j < i + 1; j++ )
3148 LUA_FREE_ARRAY( matrix[j] );
3149 LUA_FREE_ARRAY( matrix );
3150 return NULL;
3151 }
3152 lua_pop( L, 1 );
3153 }
3154 lua_pop( L, 1 );
3155 }
3156
3157 return matrix;
3158 }
3159
3160
3161 void mapform( PLINT n, PLFLT* x, PLFLT* y );
3162
3163 static lua_State* myL = NULL;
3164 static char mapform_funcstr[255];
3165
3166 void mapform( PLINT n, PLFLT* x, PLFLT* y )
3167 {
3168 PLFLT *xtemp, *ytemp;
3169 int len, i;
3170
3171 // check Lua state
3172 if ( myL == NULL )
3173 {
3174 fprintf( stderr, "Lua state is not set!" );
3175 return;
3176 }
3177
3178 // push functions and arguments
3179 lua_getglobal( myL, mapform_funcstr ); // function to be called
3180 lua_pushnumber( myL, n ); // push 1st argument
3181 SWIG_write_double_num_array( myL, x, n ); // push 2nd argument
3182 SWIG_write_double_num_array( myL, y, n ); // push 3rd argument
3183
3184 // do the call (3 arguments, 2 result)
3185 if ( lua_pcall( myL, 3, 2, 0 ) != 0 )
3186 fprintf( stderr, "error running function `%s':%s",
3187 mapform_funcstr, lua_tostring( myL, -1 ) );
3188
3189 // retrieve results
3190 if ( !lua_istable( myL, -2 ) )
3191 {
3192 fprintf( stderr, "function `%s' must return a table as 1st result", mapform_funcstr );
3193 return;
3194 }
3195 if ( !lua_istable( myL, -1 ) )
3196 {
3197 fprintf( stderr, "function `%s' must return a table as 2nd result", mapform_funcstr );
3198 return;
3199 }
3200 xtemp = (PLFLT *) LUA_get_double_num_array_var( myL, -2, &len );
3201 if ( !xtemp || len != n )
3202 {
3203 fprintf( stderr, "function `%s' must return a table of length%d", mapform_funcstr, n );
3204 return;
3205 }
3206 for ( i = 0; i < n; i++ )
3207 x[i] = xtemp[i];
3208 LUA_FREE_ARRAY( xtemp );
3209
3210 ytemp = (PLFLT *) LUA_get_double_num_array_var( myL, -1, &len );
3211 if ( !ytemp || len != n )
3212 {
3213 fprintf( stderr, "function `%s' must return a table of length%d", mapform_funcstr, n );
3214 return;
3215 }
3216 for ( i = 0; i < n; i++ )
3217 y[i] = ytemp[i];
3218 LUA_FREE_ARRAY( ytemp );
3219
3220 lua_pop( myL, 2 ); // pop returned values
3221
3222 return;
3223 }
3224
3225
3226 typedef PLINT ( *defined_func )( PLFLT, PLFLT );
3227 typedef void ( *fill_func )( PLINT, const PLFLT*, const PLFLT* );
3228 typedef void ( *pltr_func )( PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer );
3229 typedef void ( *ct_func )( PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer );
3230 typedef void ( *mapform_func )( PLINT, PLFLT *, PLFLT* );
3232 typedef void ( *label_func )( PLINT, PLFLT, char*, PLINT, PLPointer );
3233
3234// Function prototypes
3235 void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * pltr_data );
3236 void myct( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * pltr_data );
3237 void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer data );
3238
3239 static char mypltr_funcstr[255];
3240
3241// This is the callback that gets handed to the C code.
3242// It, in turn, calls the Lua callback
3243 void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * PL_UNUSED( pltr_data ) )
3244 {
3245 *tx = 0;
3246 *ty = 0;
3247
3248 // check Lua state
3249 if ( myL == NULL )
3250 {
3251 fprintf( stderr, "Lua state is not set!" );
3252 return;
3253 }
3254
3255 // push functions and arguments
3256 lua_getglobal( myL, mypltr_funcstr ); // function to be called
3257 lua_pushnumber( myL, x ); // push 1st argument
3258 lua_pushnumber( myL, y ); // push 2nd argument
3259
3260 // do the call (2 arguments, 2 result)
3261 if ( lua_pcall( myL, 2, 2, 0 ) != 0 )
3262 fprintf( stderr, "error running function `%s':%s",
3263 mypltr_funcstr, lua_tostring( myL, -1 ) );
3264
3265 // retrieve results
3266 if ( !lua_isnumber( myL, -2 ) )
3267 {
3268 fprintf( stderr, "function `%s' must return a number as 1st result", mypltr_funcstr );
3269 return;
3270 }
3271 if ( !lua_isnumber( myL, -1 ) )
3272 {
3273 fprintf( stderr, "function `%s' must return a number as 2nd result", mypltr_funcstr );
3274 return;
3275 }
3276 *tx = lua_tonumber( myL, -2 );
3277 *ty = lua_tonumber( myL, -1 );
3278 lua_pop( myL, 2 ); // pop returned values
3279
3280 return;
3281 }
3282
3283 static char myct_funcstr[255];
3284
3285// This is the callback that gets handed to the C code.
3286// It, in turn, calls the Lua callback
3287 void myct( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * PL_UNUSED( pltr_data ) )
3288 {
3289 *tx = 0;
3290 *ty = 0;
3291
3292 // check Lua state
3293 if ( myL == NULL )
3294 {
3295 fprintf( stderr, "Lua state is not set!" );
3296 return;
3297 }
3298
3299 // push functions and arguments
3300 lua_getglobal( myL, myct_funcstr ); // function to be called
3301 lua_pushnumber( myL, x ); // push 1st argument
3302 lua_pushnumber( myL, y ); // push 2nd argument
3303
3304 // do the call (2 arguments, 2 result)
3305 if ( lua_pcall( myL, 2, 2, 0 ) != 0 )
3306 fprintf( stderr, "error running function `%s':%s",
3307 myct_funcstr, lua_tostring( myL, -1 ) );
3308
3309 // retrieve results
3310 if ( !lua_isnumber( myL, -2 ) )
3311 {
3312 fprintf( stderr, "function `%s' must return a number as 1st result", myct_funcstr );
3313 return;
3314 }
3315 if ( !lua_isnumber( myL, -1 ) )
3316 {
3317 fprintf( stderr, "function `%s' must return a number as 2nd result", myct_funcstr );
3318 return;
3319 }
3320 *tx = lua_tonumber( myL, -2 );
3321 *ty = lua_tonumber( myL, -1 );
3322 lua_pop( myL, 2 ); // pop returned values
3323
3324 return;
3325 }
3326
3327 static char mylabel_funcstr[255];
3328
3329 void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer PL_UNUSED( data ) )
3330 {
3331 // check Lua state
3332 if ( myL == NULL )
3333 {
3334 fprintf( stderr, "Lua state is not set!" );
3335 return;
3336 }
3337
3338 // push functions and arguments
3339 lua_getglobal( myL, mylabel_funcstr ); // function to be called
3340 lua_pushnumber( myL, axis ); // push 1st argument
3341 lua_pushnumber( myL, value ); // push 1st argument
3342
3343 // do the call (2 arguments, 1 result)
3344 if ( lua_pcall( myL, 2, 1, 0 ) != 0 )
3345 fprintf( stderr, "error running function `%s':%s",
3346 mylabel_funcstr, lua_tostring( myL, -1 ) );
3347
3348 // retrieve results
3349 if ( !lua_isstring( myL, -1 ) )
3350 {
3351 fprintf( stderr, "function `%s' must return a string as result", mylabel_funcstr );
3352 return;
3353 }
3354 strncpy( label, lua_tostring( myL, -1 ), length );
3355
3356 lua_pop( myL, 1 ); // pop returned values
3357
3358 return;
3359 }
3360
3361
3362#include <string.h>
3363
3364
3365SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
3366 int ret = lua_isstring(L, idx);
3367 if (!ret)
3368 ret = lua_isnil(L, idx);
3369 return ret;
3370}
3371
3372#ifdef __cplusplus
3373extern "C" {
3374#endif
3375static int _wrap_PLGraphicsIn_type_set(lua_State* L) {
3376 int SWIG_arg = 0;
3377 PLGraphicsIn *arg1 = 0 ;
3378 int arg2 ;
3379
3380 SWIG_check_num_args("PLGraphicsIn::type",2,2)
3381 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::type",1,"PLGraphicsIn *");
3382 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::type",2,"int");
3383
3384 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3385 SWIG_fail_ptr("PLGraphicsIn_type_set",1,SWIGTYPE_p_PLGraphicsIn);
3386 }
3387
3388 arg2 = (int)lua_tonumber(L, 2);
3389 if (arg1) (arg1)->type = arg2;
3390
3391 return SWIG_arg;
3392
3393 fail: SWIGUNUSED;
3394 lua_error(L);
3395 return 0;
3396}
3397
3398
3399static int _wrap_PLGraphicsIn_type_get(lua_State* L) {
3400 int SWIG_arg = 0;
3401 PLGraphicsIn *arg1 = 0 ;
3402 int result;
3403
3404 SWIG_check_num_args("PLGraphicsIn::type",1,1)
3405 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::type",1,"PLGraphicsIn *");
3406
3407 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3408 SWIG_fail_ptr("PLGraphicsIn_type_get",1,SWIGTYPE_p_PLGraphicsIn);
3409 }
3410
3411 result = (int) ((arg1)->type);
3412 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3413 return SWIG_arg;
3414
3415 fail: SWIGUNUSED;
3416 lua_error(L);
3417 return 0;
3418}
3419
3420
3421static int _wrap_PLGraphicsIn_state_set(lua_State* L) {
3422 int SWIG_arg = 0;
3423 PLGraphicsIn *arg1 = 0 ;
3424 unsigned int arg2 ;
3425
3426 SWIG_check_num_args("PLGraphicsIn::state",2,2)
3427 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::state",1,"PLGraphicsIn *");
3428 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::state",2,"unsigned int");
3429
3430 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3431 SWIG_fail_ptr("PLGraphicsIn_state_set",1,SWIGTYPE_p_PLGraphicsIn);
3432 }
3433
3434 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
3435 arg2 = (unsigned int)lua_tonumber(L, 2);
3436 if (arg1) (arg1)->state = arg2;
3437
3438 return SWIG_arg;
3439
3440 fail: SWIGUNUSED;
3441 lua_error(L);
3442 return 0;
3443}
3444
3445
3446static int _wrap_PLGraphicsIn_state_get(lua_State* L) {
3447 int SWIG_arg = 0;
3448 PLGraphicsIn *arg1 = 0 ;
3449 unsigned int result;
3450
3451 SWIG_check_num_args("PLGraphicsIn::state",1,1)
3452 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::state",1,"PLGraphicsIn *");
3453
3454 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3455 SWIG_fail_ptr("PLGraphicsIn_state_get",1,SWIGTYPE_p_PLGraphicsIn);
3456 }
3457
3458 result = (unsigned int) ((arg1)->state);
3459 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3460 return SWIG_arg;
3461
3462 fail: SWIGUNUSED;
3463 lua_error(L);
3464 return 0;
3465}
3466
3467
3468static int _wrap_PLGraphicsIn_keysym_set(lua_State* L) {
3469 int SWIG_arg = 0;
3470 PLGraphicsIn *arg1 = 0 ;
3471 unsigned int arg2 ;
3472
3473 SWIG_check_num_args("PLGraphicsIn::keysym",2,2)
3474 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::keysym",1,"PLGraphicsIn *");
3475 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::keysym",2,"unsigned int");
3476
3477 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3478 SWIG_fail_ptr("PLGraphicsIn_keysym_set",1,SWIGTYPE_p_PLGraphicsIn);
3479 }
3480
3481 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
3482 arg2 = (unsigned int)lua_tonumber(L, 2);
3483 if (arg1) (arg1)->keysym = arg2;
3484
3485 return SWIG_arg;
3486
3487 fail: SWIGUNUSED;
3488 lua_error(L);
3489 return 0;
3490}
3491
3492
3493static int _wrap_PLGraphicsIn_keysym_get(lua_State* L) {
3494 int SWIG_arg = 0;
3495 PLGraphicsIn *arg1 = 0 ;
3496 unsigned int result;
3497
3498 SWIG_check_num_args("PLGraphicsIn::keysym",1,1)
3499 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::keysym",1,"PLGraphicsIn *");
3500
3501 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3502 SWIG_fail_ptr("PLGraphicsIn_keysym_get",1,SWIGTYPE_p_PLGraphicsIn);
3503 }
3504
3505 result = (unsigned int) ((arg1)->keysym);
3506 lua_pushnumber(L, (lua_Number) 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_button_set(lua_State* L) {
3516 int SWIG_arg = 0;
3517 PLGraphicsIn *arg1 = 0 ;
3518 unsigned int arg2 ;
3519
3520 SWIG_check_num_args("PLGraphicsIn::button",2,2)
3521 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::button",1,"PLGraphicsIn *");
3522 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::button",2,"unsigned int");
3523
3524 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3525 SWIG_fail_ptr("PLGraphicsIn_button_set",1,SWIGTYPE_p_PLGraphicsIn);
3526 }
3527
3528 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
3529 arg2 = (unsigned int)lua_tonumber(L, 2);
3530 if (arg1) (arg1)->button = arg2;
3531
3532 return SWIG_arg;
3533
3534 fail: SWIGUNUSED;
3535 lua_error(L);
3536 return 0;
3537}
3538
3539
3540static int _wrap_PLGraphicsIn_button_get(lua_State* L) {
3541 int SWIG_arg = 0;
3542 PLGraphicsIn *arg1 = 0 ;
3543 unsigned int result;
3544
3545 SWIG_check_num_args("PLGraphicsIn::button",1,1)
3546 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::button",1,"PLGraphicsIn *");
3547
3548 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3549 SWIG_fail_ptr("PLGraphicsIn_button_get",1,SWIGTYPE_p_PLGraphicsIn);
3550 }
3551
3552 result = (unsigned int) ((arg1)->button);
3553 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3554 return SWIG_arg;
3555
3556 fail: SWIGUNUSED;
3557 lua_error(L);
3558 return 0;
3559}
3560
3561
3562static int _wrap_PLGraphicsIn_subwindow_set(lua_State* L) {
3563 int SWIG_arg = 0;
3564 PLGraphicsIn *arg1 = 0 ;
3565 PLINT arg2 ;
3566
3567 SWIG_check_num_args("PLGraphicsIn::subwindow",2,2)
3568 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::subwindow",1,"PLGraphicsIn *");
3569 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::subwindow",2,"PLINT");
3570
3571 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3572 SWIG_fail_ptr("PLGraphicsIn_subwindow_set",1,SWIGTYPE_p_PLGraphicsIn);
3573 }
3574
3575 arg2 = (PLINT)lua_tonumber(L, 2);
3576 if (arg1) (arg1)->subwindow = arg2;
3577
3578 return SWIG_arg;
3579
3580 fail: SWIGUNUSED;
3581 lua_error(L);
3582 return 0;
3583}
3584
3585
3586static int _wrap_PLGraphicsIn_subwindow_get(lua_State* L) {
3587 int SWIG_arg = 0;
3588 PLGraphicsIn *arg1 = 0 ;
3589 PLINT result;
3590
3591 SWIG_check_num_args("PLGraphicsIn::subwindow",1,1)
3592 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::subwindow",1,"PLGraphicsIn *");
3593
3594 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3595 SWIG_fail_ptr("PLGraphicsIn_subwindow_get",1,SWIGTYPE_p_PLGraphicsIn);
3596 }
3597
3598 result = (PLINT) ((arg1)->subwindow);
3599 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3600 return SWIG_arg;
3601
3602 fail: SWIGUNUSED;
3603 lua_error(L);
3604 return 0;
3605}
3606
3607
3608static int _wrap_PLGraphicsIn_string_set(lua_State* L) {
3609 int SWIG_arg = 0;
3610 PLGraphicsIn *arg1 = 0 ;
3611 char *arg2 = (char *)0 ;
3612
3613 SWIG_check_num_args("PLGraphicsIn::string",2,2)
3614 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::string",1,"PLGraphicsIn *");
3615 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("PLGraphicsIn::string",2,"char [16]");
3616
3617 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3618 SWIG_fail_ptr("PLGraphicsIn_string_set",1,SWIGTYPE_p_PLGraphicsIn);
3619 }
3620
3621 arg2 = (char *)lua_tostring(L, 2);
3622 {
3623 if(arg2) {
3624 strncpy((char*)arg1->string, (const char *)arg2, 16-1);
3625 arg1->string[16-1] = 0;
3626 } else {
3627 arg1->string[0] = 0;
3628 }
3629 }
3630
3631 return SWIG_arg;
3632
3633 fail: SWIGUNUSED;
3634 lua_error(L);
3635 return 0;
3636}
3637
3638
3639static int _wrap_PLGraphicsIn_string_get(lua_State* L) {
3640 int SWIG_arg = 0;
3641 PLGraphicsIn *arg1 = 0 ;
3642 char *result = 0 ;
3643
3644 SWIG_check_num_args("PLGraphicsIn::string",1,1)
3645 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::string",1,"PLGraphicsIn *");
3646
3647 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3648 SWIG_fail_ptr("PLGraphicsIn_string_get",1,SWIGTYPE_p_PLGraphicsIn);
3649 }
3650
3651 result = (char *)(char *) ((arg1)->string);
3652 lua_pushstring(L,(const char *)result); SWIG_arg++;
3653 return SWIG_arg;
3654
3655 fail: SWIGUNUSED;
3656 lua_error(L);
3657 return 0;
3658}
3659
3660
3661static int _wrap_PLGraphicsIn_pX_set(lua_State* L) {
3662 int SWIG_arg = 0;
3663 PLGraphicsIn *arg1 = 0 ;
3664 int arg2 ;
3665
3666 SWIG_check_num_args("PLGraphicsIn::pX",2,2)
3667 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pX",1,"PLGraphicsIn *");
3668 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::pX",2,"int");
3669
3670 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3671 SWIG_fail_ptr("PLGraphicsIn_pX_set",1,SWIGTYPE_p_PLGraphicsIn);
3672 }
3673
3674 arg2 = (int)lua_tonumber(L, 2);
3675 if (arg1) (arg1)->pX = arg2;
3676
3677 return SWIG_arg;
3678
3679 fail: SWIGUNUSED;
3680 lua_error(L);
3681 return 0;
3682}
3683
3684
3685static int _wrap_PLGraphicsIn_pX_get(lua_State* L) {
3686 int SWIG_arg = 0;
3687 PLGraphicsIn *arg1 = 0 ;
3688 int result;
3689
3690 SWIG_check_num_args("PLGraphicsIn::pX",1,1)
3691 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pX",1,"PLGraphicsIn *");
3692
3693 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3694 SWIG_fail_ptr("PLGraphicsIn_pX_get",1,SWIGTYPE_p_PLGraphicsIn);
3695 }
3696
3697 result = (int) ((arg1)->pX);
3698 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3699 return SWIG_arg;
3700
3701 fail: SWIGUNUSED;
3702 lua_error(L);
3703 return 0;
3704}
3705
3706
3707static int _wrap_PLGraphicsIn_pY_set(lua_State* L) {
3708 int SWIG_arg = 0;
3709 PLGraphicsIn *arg1 = 0 ;
3710 int arg2 ;
3711
3712 SWIG_check_num_args("PLGraphicsIn::pY",2,2)
3713 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pY",1,"PLGraphicsIn *");
3714 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::pY",2,"int");
3715
3716 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3717 SWIG_fail_ptr("PLGraphicsIn_pY_set",1,SWIGTYPE_p_PLGraphicsIn);
3718 }
3719
3720 arg2 = (int)lua_tonumber(L, 2);
3721 if (arg1) (arg1)->pY = arg2;
3722
3723 return SWIG_arg;
3724
3725 fail: SWIGUNUSED;
3726 lua_error(L);
3727 return 0;
3728}
3729
3730
3731static int _wrap_PLGraphicsIn_pY_get(lua_State* L) {
3732 int SWIG_arg = 0;
3733 PLGraphicsIn *arg1 = 0 ;
3734 int result;
3735
3736 SWIG_check_num_args("PLGraphicsIn::pY",1,1)
3737 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pY",1,"PLGraphicsIn *");
3738
3739 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3740 SWIG_fail_ptr("PLGraphicsIn_pY_get",1,SWIGTYPE_p_PLGraphicsIn);
3741 }
3742
3743 result = (int) ((arg1)->pY);
3744 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3745 return SWIG_arg;
3746
3747 fail: SWIGUNUSED;
3748 lua_error(L);
3749 return 0;
3750}
3751
3752
3753static int _wrap_PLGraphicsIn_dX_set(lua_State* L) {
3754 int SWIG_arg = 0;
3755 PLGraphicsIn *arg1 = 0 ;
3756 PLFLT arg2 ;
3757
3758 SWIG_check_num_args("PLGraphicsIn::dX",2,2)
3759 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dX",1,"PLGraphicsIn *");
3760 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::dX",2,"PLFLT");
3761
3762 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3763 SWIG_fail_ptr("PLGraphicsIn_dX_set",1,SWIGTYPE_p_PLGraphicsIn);
3764 }
3765
3766 arg2 = (PLFLT)lua_tonumber(L, 2);
3767 if (arg1) (arg1)->dX = arg2;
3768
3769 return SWIG_arg;
3770
3771 fail: SWIGUNUSED;
3772 lua_error(L);
3773 return 0;
3774}
3775
3776
3777static int _wrap_PLGraphicsIn_dX_get(lua_State* L) {
3778 int SWIG_arg = 0;
3779 PLGraphicsIn *arg1 = 0 ;
3780 PLFLT result;
3781
3782 SWIG_check_num_args("PLGraphicsIn::dX",1,1)
3783 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dX",1,"PLGraphicsIn *");
3784
3785 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3786 SWIG_fail_ptr("PLGraphicsIn_dX_get",1,SWIGTYPE_p_PLGraphicsIn);
3787 }
3788
3789 result = (PLFLT) ((arg1)->dX);
3790 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3791 return SWIG_arg;
3792
3793 fail: SWIGUNUSED;
3794 lua_error(L);
3795 return 0;
3796}
3797
3798
3799static int _wrap_PLGraphicsIn_dY_set(lua_State* L) {
3800 int SWIG_arg = 0;
3801 PLGraphicsIn *arg1 = 0 ;
3802 PLFLT arg2 ;
3803
3804 SWIG_check_num_args("PLGraphicsIn::dY",2,2)
3805 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dY",1,"PLGraphicsIn *");
3806 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::dY",2,"PLFLT");
3807
3808 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3809 SWIG_fail_ptr("PLGraphicsIn_dY_set",1,SWIGTYPE_p_PLGraphicsIn);
3810 }
3811
3812 arg2 = (PLFLT)lua_tonumber(L, 2);
3813 if (arg1) (arg1)->dY = arg2;
3814
3815 return SWIG_arg;
3816
3817 fail: SWIGUNUSED;
3818 lua_error(L);
3819 return 0;
3820}
3821
3822
3823static int _wrap_PLGraphicsIn_dY_get(lua_State* L) {
3824 int SWIG_arg = 0;
3825 PLGraphicsIn *arg1 = 0 ;
3826 PLFLT result;
3827
3828 SWIG_check_num_args("PLGraphicsIn::dY",1,1)
3829 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dY",1,"PLGraphicsIn *");
3830
3831 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3832 SWIG_fail_ptr("PLGraphicsIn_dY_get",1,SWIGTYPE_p_PLGraphicsIn);
3833 }
3834
3835 result = (PLFLT) ((arg1)->dY);
3836 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3837 return SWIG_arg;
3838
3839 fail: SWIGUNUSED;
3840 lua_error(L);
3841 return 0;
3842}
3843
3844
3845static int _wrap_PLGraphicsIn_wX_set(lua_State* L) {
3846 int SWIG_arg = 0;
3847 PLGraphicsIn *arg1 = 0 ;
3848 PLFLT arg2 ;
3849
3850 SWIG_check_num_args("PLGraphicsIn::wX",2,2)
3851 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wX",1,"PLGraphicsIn *");
3852 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::wX",2,"PLFLT");
3853
3854 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3855 SWIG_fail_ptr("PLGraphicsIn_wX_set",1,SWIGTYPE_p_PLGraphicsIn);
3856 }
3857
3858 arg2 = (PLFLT)lua_tonumber(L, 2);
3859 if (arg1) (arg1)->wX = arg2;
3860
3861 return SWIG_arg;
3862
3863 fail: SWIGUNUSED;
3864 lua_error(L);
3865 return 0;
3866}
3867
3868
3869static int _wrap_PLGraphicsIn_wX_get(lua_State* L) {
3870 int SWIG_arg = 0;
3871 PLGraphicsIn *arg1 = 0 ;
3872 PLFLT result;
3873
3874 SWIG_check_num_args("PLGraphicsIn::wX",1,1)
3875 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wX",1,"PLGraphicsIn *");
3876
3877 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3878 SWIG_fail_ptr("PLGraphicsIn_wX_get",1,SWIGTYPE_p_PLGraphicsIn);
3879 }
3880
3881 result = (PLFLT) ((arg1)->wX);
3882 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3883 return SWIG_arg;
3884
3885 fail: SWIGUNUSED;
3886 lua_error(L);
3887 return 0;
3888}
3889
3890
3891static int _wrap_PLGraphicsIn_wY_set(lua_State* L) {
3892 int SWIG_arg = 0;
3893 PLGraphicsIn *arg1 = 0 ;
3894 PLFLT arg2 ;
3895
3896 SWIG_check_num_args("PLGraphicsIn::wY",2,2)
3897 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wY",1,"PLGraphicsIn *");
3898 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::wY",2,"PLFLT");
3899
3900 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3901 SWIG_fail_ptr("PLGraphicsIn_wY_set",1,SWIGTYPE_p_PLGraphicsIn);
3902 }
3903
3904 arg2 = (PLFLT)lua_tonumber(L, 2);
3905 if (arg1) (arg1)->wY = arg2;
3906
3907 return SWIG_arg;
3908
3909 fail: SWIGUNUSED;
3910 lua_error(L);
3911 return 0;
3912}
3913
3914
3915static int _wrap_PLGraphicsIn_wY_get(lua_State* L) {
3916 int SWIG_arg = 0;
3917 PLGraphicsIn *arg1 = 0 ;
3918 PLFLT result;
3919
3920 SWIG_check_num_args("PLGraphicsIn::wY",1,1)
3921 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wY",1,"PLGraphicsIn *");
3922
3923 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3924 SWIG_fail_ptr("PLGraphicsIn_wY_get",1,SWIGTYPE_p_PLGraphicsIn);
3925 }
3926
3927 result = (PLFLT) ((arg1)->wY);
3928 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3929 return SWIG_arg;
3930
3931 fail: SWIGUNUSED;
3932 lua_error(L);
3933 return 0;
3934}
3935
3936
3937static int _wrap_new_PLGraphicsIn(lua_State* L) {
3938 int SWIG_arg = 0;
3939 PLGraphicsIn *result = 0 ;
3940
3941 SWIG_check_num_args("PLGraphicsIn::PLGraphicsIn",0,0)
3942 result = (PLGraphicsIn *)calloc(1, sizeof(PLGraphicsIn));
3943 SWIG_NewPointerObj(L,result,SWIGTYPE_p_PLGraphicsIn,1); SWIG_arg++;
3944 return SWIG_arg;
3945
3946 fail: SWIGUNUSED;
3947 lua_error(L);
3948 return 0;
3949}
3950
3951
3952static void swig_delete_PLGraphicsIn(void *obj) {
3953PLGraphicsIn *arg1 = (PLGraphicsIn *) obj;
3954free((char *) arg1);
3955}
3956static int _proxy__wrap_new_PLGraphicsIn(lua_State *L) {
3957 assert(lua_istable(L,1));
3958 lua_pushcfunction(L,_wrap_new_PLGraphicsIn);
3959 assert(!lua_isnil(L,-1));
3960 lua_replace(L,1); /* replace our table with real constructor */
3961 lua_call(L,lua_gettop(L)-1,1);
3962 return 1;
3963}
3980 {0,0}
3981};
3983 {0,0}
3984};
3985
3998
4008static const char *swig_PLGraphicsIn_base_names[] = {0};
4010
4011static int _wrap_setcontlabelformat(lua_State* L) {
4012 int SWIG_arg = 0;
4013 PLINT arg1 ;
4014 PLINT arg2 ;
4015
4016 SWIG_check_num_args("pl_setcontlabelformat",2,2)
4017 if(!lua_isnumber(L,1)) SWIG_fail_arg("pl_setcontlabelformat",1,"PLINT");
4018 if(!lua_isnumber(L,2)) SWIG_fail_arg("pl_setcontlabelformat",2,"PLINT");
4019 arg1 = (PLINT)lua_tonumber(L, 1);
4020 arg2 = (PLINT)lua_tonumber(L, 2);
4021 pl_setcontlabelformat(arg1,arg2);
4022
4023 return SWIG_arg;
4024
4025 fail: SWIGUNUSED;
4026 lua_error(L);
4027 return 0;
4028}
4029
4030
4031static int _wrap_setcontlabelparam(lua_State* L) {
4032 int SWIG_arg = 0;
4033 PLFLT arg1 ;
4034 PLFLT arg2 ;
4035 PLFLT arg3 ;
4036 PLINT arg4 ;
4037
4038 SWIG_check_num_args("pl_setcontlabelparam",4,4)
4039 if(!lua_isnumber(L,1)) SWIG_fail_arg("pl_setcontlabelparam",1,"PLFLT");
4040 if(!lua_isnumber(L,2)) SWIG_fail_arg("pl_setcontlabelparam",2,"PLFLT");
4041 if(!lua_isnumber(L,3)) SWIG_fail_arg("pl_setcontlabelparam",3,"PLFLT");
4042 if(!lua_isnumber(L,4)) SWIG_fail_arg("pl_setcontlabelparam",4,"PLINT");
4043 arg1 = (PLFLT)lua_tonumber(L, 1);
4044 arg2 = (PLFLT)lua_tonumber(L, 2);
4045 arg3 = (PLFLT)lua_tonumber(L, 3);
4046 arg4 = (PLINT)lua_tonumber(L, 4);
4047 pl_setcontlabelparam(arg1,arg2,arg3,arg4);
4048
4049 return SWIG_arg;
4050
4051 fail: SWIGUNUSED;
4052 lua_error(L);
4053 return 0;
4054}
4055
4056
4057static int _wrap_adv(lua_State* L) {
4058 int SWIG_arg = 0;
4059 PLINT arg1 ;
4060
4061 SWIG_check_num_args("pladv",1,1)
4062 if(!lua_isnumber(L,1)) SWIG_fail_arg("pladv",1,"PLINT");
4063 arg1 = (PLINT)lua_tonumber(L, 1);
4064 pladv(arg1);
4065
4066 return SWIG_arg;
4067
4068 fail: SWIGUNUSED;
4069 lua_error(L);
4070 return 0;
4071}
4072
4073
4074static int _wrap_arc(lua_State* L) {
4075 int SWIG_arg = 0;
4076 PLFLT arg1 ;
4077 PLFLT arg2 ;
4078 PLFLT arg3 ;
4079 PLFLT arg4 ;
4080 PLFLT arg5 ;
4081 PLFLT arg6 ;
4082 PLFLT arg7 ;
4083 PLBOOL arg8 ;
4084
4085 SWIG_check_num_args("plarc",8,8)
4086 if(!lua_isnumber(L,1)) SWIG_fail_arg("plarc",1,"PLFLT");
4087 if(!lua_isnumber(L,2)) SWIG_fail_arg("plarc",2,"PLFLT");
4088 if(!lua_isnumber(L,3)) SWIG_fail_arg("plarc",3,"PLFLT");
4089 if(!lua_isnumber(L,4)) SWIG_fail_arg("plarc",4,"PLFLT");
4090 if(!lua_isnumber(L,5)) SWIG_fail_arg("plarc",5,"PLFLT");
4091 if(!lua_isnumber(L,6)) SWIG_fail_arg("plarc",6,"PLFLT");
4092 if(!lua_isnumber(L,7)) SWIG_fail_arg("plarc",7,"PLFLT");
4093 if(!lua_isnumber(L,8)) SWIG_fail_arg("plarc",8,"PLBOOL");
4094 arg1 = (PLFLT)lua_tonumber(L, 1);
4095 arg2 = (PLFLT)lua_tonumber(L, 2);
4096 arg3 = (PLFLT)lua_tonumber(L, 3);
4097 arg4 = (PLFLT)lua_tonumber(L, 4);
4098 arg5 = (PLFLT)lua_tonumber(L, 5);
4099 arg6 = (PLFLT)lua_tonumber(L, 6);
4100 arg7 = (PLFLT)lua_tonumber(L, 7);
4101 arg8 = (PLBOOL)lua_tonumber(L, 8);
4102 plarc(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
4103
4104 return SWIG_arg;
4105
4106 fail: SWIGUNUSED;
4107 lua_error(L);
4108 return 0;
4109}
4110
4111
4112static int _wrap_axes(lua_State* L) {
4113 int SWIG_arg = 0;
4114 PLFLT arg1 ;
4115 PLFLT arg2 ;
4116 char *arg3 = 0 ;
4117 PLFLT arg4 ;
4118 PLINT arg5 ;
4119 char *arg6 = 0 ;
4120 PLFLT arg7 ;
4121 PLINT arg8 ;
4122
4123 SWIG_check_num_args("plaxes",8,8)
4124 if(!lua_isnumber(L,1)) SWIG_fail_arg("plaxes",1,"PLFLT");
4125 if(!lua_isnumber(L,2)) SWIG_fail_arg("plaxes",2,"PLFLT");
4126 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plaxes",3,"char const *");
4127 if(!lua_isnumber(L,4)) SWIG_fail_arg("plaxes",4,"PLFLT");
4128 if(!lua_isnumber(L,5)) SWIG_fail_arg("plaxes",5,"PLINT");
4129 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plaxes",6,"char const *");
4130 if(!lua_isnumber(L,7)) SWIG_fail_arg("plaxes",7,"PLFLT");
4131 if(!lua_isnumber(L,8)) SWIG_fail_arg("plaxes",8,"PLINT");
4132 arg1 = (PLFLT)lua_tonumber(L, 1);
4133 arg2 = (PLFLT)lua_tonumber(L, 2);
4134 arg3 = (char *)lua_tostring(L, 3);
4135 arg4 = (PLFLT)lua_tonumber(L, 4);
4136 arg5 = (PLINT)lua_tonumber(L, 5);
4137 arg6 = (char *)lua_tostring(L, 6);
4138 arg7 = (PLFLT)lua_tonumber(L, 7);
4139 arg8 = (PLINT)lua_tonumber(L, 8);
4140 plaxes(arg1,arg2,(char const *)arg3,arg4,arg5,(char const *)arg6,arg7,arg8);
4141
4142 return SWIG_arg;
4143
4144 fail: SWIGUNUSED;
4145 lua_error(L);
4146 return 0;
4147}
4148
4149
4150static int _wrap_bin(lua_State* L) {
4151 int SWIG_arg = 0;
4152 PLINT arg1 ;
4153 PLFLT *arg2 = 0 ;
4154 PLFLT *arg3 = 0 ;
4155 PLINT arg4 ;
4156 int temp3 ;
4157
4158 SWIG_check_num_args("plbin",3,3)
4159 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbin",3,"PLINT");
4160 {
4161 int temp;
4162 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4163 if ( !arg2 )
4164 SWIG_fail;
4165 arg1 = Alen = temp;
4166 }
4167 {
4168 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4169 if ( !arg3 )
4170 SWIG_fail;
4171 if ( temp3 != Alen )
4172 {
4173 lua_pushfstring( L, "Tables must be of same length." );
4174 SWIG_fail;
4175 }
4176 }
4177 arg4 = (PLINT)lua_tonumber(L, 3);
4178 plbin(arg1,(double const *)arg2,(double const *)arg3,arg4);
4179
4180 {
4181 LUA_FREE_ARRAY( arg2 );
4182 }
4183 {
4184 LUA_FREE_ARRAY( arg3 );
4185 }
4186 return SWIG_arg;
4187
4188 fail: SWIGUNUSED;
4189 {
4190 LUA_FREE_ARRAY( arg2 );
4191 }
4192 {
4193 LUA_FREE_ARRAY( arg3 );
4194 }
4195 lua_error(L);
4196 return 0;
4197}
4198
4199
4200static int _wrap_btime(lua_State* L) {
4201 int SWIG_arg = 0;
4202 PLINT *arg1 = 0 ;
4203 PLINT *arg2 = 0 ;
4204 PLINT *arg3 = 0 ;
4205 PLINT *arg4 = 0 ;
4206 PLINT *arg5 = 0 ;
4207 PLFLT *arg6 = 0 ;
4208 PLFLT arg7 ;
4209 PLINT temp1 ;
4210 PLINT temp2 ;
4211 PLINT temp3 ;
4212 PLINT temp4 ;
4213 PLINT temp5 ;
4214 PLFLT temp6 ;
4215
4216 arg1 = &temp1;
4217 arg2 = &temp2;
4218 arg3 = &temp3;
4219 arg4 = &temp4;
4220 arg5 = &temp5;
4221 arg6 = &temp6;
4222 SWIG_check_num_args("plbtime",1,1)
4223 if(!lua_isnumber(L,1)) SWIG_fail_arg("plbtime",1,"PLFLT");
4224 arg7 = (PLFLT)lua_tonumber(L, 1);
4225 plbtime(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
4226
4227 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4228 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4229 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4230 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4231 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
4232 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
4233 return SWIG_arg;
4234
4235 fail: SWIGUNUSED;
4236 lua_error(L);
4237 return 0;
4238}
4239
4240
4241static int _wrap_bop(lua_State* L) {
4242 int SWIG_arg = 0;
4243
4244 SWIG_check_num_args("plbop",0,0)
4245 plbop();
4246
4247 return SWIG_arg;
4248
4249 fail: SWIGUNUSED;
4250 lua_error(L);
4251 return 0;
4252}
4253
4254
4255static int _wrap_box(lua_State* L) {
4256 int SWIG_arg = 0;
4257 char *arg1 = 0 ;
4258 PLFLT arg2 ;
4259 PLINT arg3 ;
4260 char *arg4 = 0 ;
4261 PLFLT arg5 ;
4262 PLINT arg6 ;
4263
4264 SWIG_check_num_args("plbox",6,6)
4265 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plbox",1,"char const *");
4266 if(!lua_isnumber(L,2)) SWIG_fail_arg("plbox",2,"PLFLT");
4267 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbox",3,"PLINT");
4268 if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("plbox",4,"char const *");
4269 if(!lua_isnumber(L,5)) SWIG_fail_arg("plbox",5,"PLFLT");
4270 if(!lua_isnumber(L,6)) SWIG_fail_arg("plbox",6,"PLINT");
4271 arg1 = (char *)lua_tostring(L, 1);
4272 arg2 = (PLFLT)lua_tonumber(L, 2);
4273 arg3 = (PLINT)lua_tonumber(L, 3);
4274 arg4 = (char *)lua_tostring(L, 4);
4275 arg5 = (PLFLT)lua_tonumber(L, 5);
4276 arg6 = (PLINT)lua_tonumber(L, 6);
4277 plbox((char const *)arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
4278
4279 return SWIG_arg;
4280
4281 fail: SWIGUNUSED;
4282 lua_error(L);
4283 return 0;
4284}
4285
4286
4287static int _wrap_box3(lua_State* L) {
4288 int SWIG_arg = 0;
4289 char *arg1 = 0 ;
4290 char *arg2 = 0 ;
4291 PLFLT arg3 ;
4292 PLINT arg4 ;
4293 char *arg5 = 0 ;
4294 char *arg6 = 0 ;
4295 PLFLT arg7 ;
4296 PLINT arg8 ;
4297 char *arg9 = 0 ;
4298 char *arg10 = 0 ;
4299 PLFLT arg11 ;
4300 PLINT arg12 ;
4301
4302 SWIG_check_num_args("plbox3",12,12)
4303 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plbox3",1,"char const *");
4304 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plbox3",2,"char const *");
4305 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbox3",3,"PLFLT");
4306 if(!lua_isnumber(L,4)) SWIG_fail_arg("plbox3",4,"PLINT");
4307 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plbox3",5,"char const *");
4308 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plbox3",6,"char const *");
4309 if(!lua_isnumber(L,7)) SWIG_fail_arg("plbox3",7,"PLFLT");
4310 if(!lua_isnumber(L,8)) SWIG_fail_arg("plbox3",8,"PLINT");
4311 if(!SWIG_lua_isnilstring(L,9)) SWIG_fail_arg("plbox3",9,"char const *");
4312 if(!SWIG_lua_isnilstring(L,10)) SWIG_fail_arg("plbox3",10,"char const *");
4313 if(!lua_isnumber(L,11)) SWIG_fail_arg("plbox3",11,"PLFLT");
4314 if(!lua_isnumber(L,12)) SWIG_fail_arg("plbox3",12,"PLINT");
4315 arg1 = (char *)lua_tostring(L, 1);
4316 arg2 = (char *)lua_tostring(L, 2);
4317 arg3 = (PLFLT)lua_tonumber(L, 3);
4318 arg4 = (PLINT)lua_tonumber(L, 4);
4319 arg5 = (char *)lua_tostring(L, 5);
4320 arg6 = (char *)lua_tostring(L, 6);
4321 arg7 = (PLFLT)lua_tonumber(L, 7);
4322 arg8 = (PLINT)lua_tonumber(L, 8);
4323 arg9 = (char *)lua_tostring(L, 9);
4324 arg10 = (char *)lua_tostring(L, 10);
4325 arg11 = (PLFLT)lua_tonumber(L, 11);
4326 arg12 = (PLINT)lua_tonumber(L, 12);
4327 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);
4328
4329 return SWIG_arg;
4330
4331 fail: SWIGUNUSED;
4332 lua_error(L);
4333 return 0;
4334}
4335
4336
4337static int _wrap_calc_world(lua_State* L) {
4338 int SWIG_arg = 0;
4339 PLFLT arg1 ;
4340 PLFLT arg2 ;
4341 PLFLT *arg3 = 0 ;
4342 PLFLT *arg4 = 0 ;
4343 PLINT *arg5 = 0 ;
4344 PLFLT temp3 ;
4345 PLFLT temp4 ;
4346 PLINT temp5 ;
4347
4348 arg3 = &temp3;
4349 arg4 = &temp4;
4350 arg5 = &temp5;
4351 SWIG_check_num_args("plcalc_world",2,2)
4352 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcalc_world",1,"PLFLT");
4353 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcalc_world",2,"PLFLT");
4354 arg1 = (PLFLT)lua_tonumber(L, 1);
4355 arg2 = (PLFLT)lua_tonumber(L, 2);
4356 plcalc_world(arg1,arg2,arg3,arg4,arg5);
4357
4358 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4359 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4360 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
4361 return SWIG_arg;
4362
4363 fail: SWIGUNUSED;
4364 lua_error(L);
4365 return 0;
4366}
4367
4368
4369static int _wrap_clear(lua_State* L) {
4370 int SWIG_arg = 0;
4371
4372 SWIG_check_num_args("plclear",0,0)
4373 plclear();
4374
4375 return SWIG_arg;
4376
4377 fail: SWIGUNUSED;
4378 lua_error(L);
4379 return 0;
4380}
4381
4382
4383static int _wrap_col0(lua_State* L) {
4384 int SWIG_arg = 0;
4385 PLINT arg1 ;
4386
4387 SWIG_check_num_args("plcol0",1,1)
4388 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcol0",1,"PLINT");
4389 arg1 = (PLINT)lua_tonumber(L, 1);
4390 plcol0(arg1);
4391
4392 return SWIG_arg;
4393
4394 fail: SWIGUNUSED;
4395 lua_error(L);
4396 return 0;
4397}
4398
4399
4400static int _wrap_col1(lua_State* L) {
4401 int SWIG_arg = 0;
4402 PLFLT arg1 ;
4403
4404 SWIG_check_num_args("plcol1",1,1)
4405 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcol1",1,"PLFLT");
4406 arg1 = (PLFLT)lua_tonumber(L, 1);
4407 plcol1(arg1);
4408
4409 return SWIG_arg;
4410
4411 fail: SWIGUNUSED;
4412 lua_error(L);
4413 return 0;
4414}
4415
4416
4417static int _wrap_configtime(lua_State* L) {
4418 int SWIG_arg = 0;
4419 PLFLT arg1 ;
4420 PLFLT arg2 ;
4421 PLFLT arg3 ;
4422 PLINT arg4 ;
4423 PLBOOL arg5 ;
4424 PLINT arg6 ;
4425 PLINT arg7 ;
4426 PLINT arg8 ;
4427 PLINT arg9 ;
4428 PLINT arg10 ;
4429 PLFLT arg11 ;
4430
4431 SWIG_check_num_args("plconfigtime",11,11)
4432 if(!lua_isnumber(L,1)) SWIG_fail_arg("plconfigtime",1,"PLFLT");
4433 if(!lua_isnumber(L,2)) SWIG_fail_arg("plconfigtime",2,"PLFLT");
4434 if(!lua_isnumber(L,3)) SWIG_fail_arg("plconfigtime",3,"PLFLT");
4435 if(!lua_isnumber(L,4)) SWIG_fail_arg("plconfigtime",4,"PLINT");
4436 if(!lua_isnumber(L,5)) SWIG_fail_arg("plconfigtime",5,"PLBOOL");
4437 if(!lua_isnumber(L,6)) SWIG_fail_arg("plconfigtime",6,"PLINT");
4438 if(!lua_isnumber(L,7)) SWIG_fail_arg("plconfigtime",7,"PLINT");
4439 if(!lua_isnumber(L,8)) SWIG_fail_arg("plconfigtime",8,"PLINT");
4440 if(!lua_isnumber(L,9)) SWIG_fail_arg("plconfigtime",9,"PLINT");
4441 if(!lua_isnumber(L,10)) SWIG_fail_arg("plconfigtime",10,"PLINT");
4442 if(!lua_isnumber(L,11)) SWIG_fail_arg("plconfigtime",11,"PLFLT");
4443 arg1 = (PLFLT)lua_tonumber(L, 1);
4444 arg2 = (PLFLT)lua_tonumber(L, 2);
4445 arg3 = (PLFLT)lua_tonumber(L, 3);
4446 arg4 = (PLINT)lua_tonumber(L, 4);
4447 arg5 = (PLBOOL)lua_tonumber(L, 5);
4448 arg6 = (PLINT)lua_tonumber(L, 6);
4449 arg7 = (PLINT)lua_tonumber(L, 7);
4450 arg8 = (PLINT)lua_tonumber(L, 8);
4451 arg9 = (PLINT)lua_tonumber(L, 9);
4452 arg10 = (PLINT)lua_tonumber(L, 10);
4453 arg11 = (PLFLT)lua_tonumber(L, 11);
4454 plconfigtime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
4455
4456 return SWIG_arg;
4457
4458 fail: SWIGUNUSED;
4459 lua_error(L);
4460 return 0;
4461}
4462
4463
4464static int _wrap_cont(lua_State* L) {
4465 int SWIG_arg = 0;
4466 PLFLT **arg1 = 0 ;
4467 PLINT arg2 ;
4468 PLINT arg3 ;
4469 PLINT arg4 ;
4470 PLINT arg5 ;
4471 PLINT arg6 ;
4472 PLINT arg7 ;
4473 PLFLT *arg8 = 0 ;
4474 PLINT arg9 ;
4475 pltr_func arg10 = 0 ;
4476 PLPointer arg11 = 0 ;
4477 int ii1 ;
4478 PLcGrid cgrid111 ;
4479 PLcGrid2 cgrid211 ;
4480
4481 {
4482 cgrid111.xg = cgrid111.yg = cgrid111.zg = NULL;
4483 cgrid111.nx = cgrid111.ny = cgrid111.nz = 0;
4484 cgrid211.xg = cgrid211.yg = cgrid211.zg = NULL;
4485 cgrid211.nx = cgrid211.ny = 0;
4486 }
4487 {
4488 arg10 = NULL;
4489 }
4490 {
4491 arg11 = NULL;
4492 }
4493 SWIG_check_num_args("plcont",6,8)
4494 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcont",2,"PLINT");
4495 if(!lua_isnumber(L,3)) SWIG_fail_arg("plcont",3,"PLINT");
4496 if(!lua_isnumber(L,4)) SWIG_fail_arg("plcont",4,"PLINT");
4497 if(!lua_isnumber(L,5)) SWIG_fail_arg("plcont",5,"PLINT");
4498 {
4499 int jj;
4500
4501 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
4502 if ( !arg1 )
4503 SWIG_fail;
4504 Xlen = arg2 = ii1;
4505 Ylen = arg3 = jj;
4506 }
4507 arg4 = (PLINT)lua_tonumber(L, 2);
4508 arg5 = (PLINT)lua_tonumber(L, 3);
4509 arg6 = (PLINT)lua_tonumber(L, 4);
4510 arg7 = (PLINT)lua_tonumber(L, 5);
4511 {
4512 int temp;
4513 arg8 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp );
4514 if ( !arg8 )
4515 SWIG_fail;
4516 arg9 = Alen = temp;
4517 }
4518 if(lua_gettop(L)>=7){
4519 {
4520 arg10 = NULL;
4521 mypltr_funcstr[0] = '\0';
4522
4523 if ( lua_isstring( L, 7 ) )
4524 {
4525 const char* funcstr = lua_tostring( L, 7 );
4526 if ( strcmp( "pltr0", funcstr ) == 0 )
4527 {
4528 arg10 = pltr0;
4529 }
4530 else if ( strcmp( "pltr1", funcstr ) == 0 )
4531 {
4532 arg10 = pltr1;
4533 }
4534 else if ( strcmp( "pltr2", funcstr ) == 0 )
4535 {
4536 arg10 = pltr2;
4537 }
4538 else
4539 {
4540 arg10 = mypltr;
4541 strncpy( mypltr_funcstr, funcstr, 255 );
4542 myL = L;
4543 }
4544 }
4545 else
4546 SWIG_fail_arg( "cont", 10, "pltr_func" );
4547 }
4548 }
4549 if(lua_gettop(L)>=8){
4550 {
4551 int nx, ny;
4552 int gridmode = 0;
4553
4554 lua_pushstring( L, "xg" );
4555 lua_gettable( L, 8 );
4556 if ( !lua_istable( L, -1 ) )
4557 {
4558 lua_pop( L, 1 ); // pop "xg"
4559 lua_pushstring( L, "expected a table xg" );
4560 SWIG_fail;
4561 }
4562 lua_rawgeti( L, -1, 1 );
4563 if ( lua_istable( L, -1 ) )
4564 gridmode = 2; // two dimensional array
4565 else if ( lua_isnumber( L, -1 ) )
4566 gridmode = 1; // one dimensional array
4567 else
4568 {
4569 lua_pop( L, 1 ); // pop "1"
4570 lua_pop( L, 1 ); // pop "xg"
4571 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
4572 SWIG_fail;
4573 }
4574 lua_pop( L, 1 ); // pop test element
4575 if ( gridmode == 1 )
4576 {
4577 cgrid111.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
4578 if ( !cgrid111.xg )
4579 {
4580 lua_pop( L, 1 ); // pop "xg"
4581 SWIG_fail;
4582 }
4583 if ( nx != Xlen )
4584 {
4585 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
4586 SWIG_fail;
4587 }
4588 cgrid111.nx = nx;
4589 }
4590 else
4591 {
4592 cgrid211.xg = read_double_Matrix( L, -1, &nx, &ny );
4593 if ( !cgrid211.xg )
4594 {
4595 lua_pop( L, 1 ); // pop "xg"
4596 SWIG_fail;
4597 }
4598 if ( ( nx != Xlen ) || ( ny != Ylen ) )
4599 {
4600 lua_pop( L, 1 ); // pop "xg"
4601 lua_pushfstring( L, "Vectors must match matrix." );
4602 SWIG_fail;
4603 }
4604 cgrid211.nx = nx;
4605 cgrid211.ny = ny;
4606 }
4607 lua_pop( L, 1 ); // pop "xg"
4608
4609 lua_pushstring( L, "yg" );
4610 lua_gettable( L, 8 );
4611 if ( !lua_istable( L, -1 ) )
4612 {
4613 lua_pop( L, 1 );
4614 lua_pushstring( L, "expected a table yg" );
4615 SWIG_fail;
4616 }
4617 lua_rawgeti( L, -1, 1 );
4618 if ( gridmode == 2 )
4619 {
4620 if ( !lua_istable( L, -1 ) )
4621 {
4622 lua_pop( L, 1 ); // pop "1"
4623 lua_pop( L, 1 ); // pop "yg"
4624 lua_pushstring( L, "expected a two dimensional array/table in yg" );
4625 SWIG_fail;
4626 }
4627 }
4628 else
4629 {
4630 if ( !lua_isnumber( L, -1 ) )
4631 {
4632 lua_pop( L, 1 ); // pop "1"
4633 lua_pop( L, 1 ); // pop "yg"
4634 lua_pushstring( L, "expected a one dimensional array/table in yg" );
4635 SWIG_fail;
4636 }
4637 }
4638 lua_pop( L, 1 ); // pop "1"
4639 if ( gridmode == 1 )
4640 {
4641 cgrid111.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
4642 if ( !cgrid111.yg )
4643 {
4644 lua_pop( L, 1 ); // pop "yg"
4645 SWIG_fail;
4646 }
4647 if ( ny != Ylen )
4648 {
4649 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
4650 SWIG_fail;
4651 }
4652 cgrid111.ny = ny;
4653 }
4654 else
4655 {
4656 cgrid211.yg = read_double_Matrix( L, -1, &nx, &ny );
4657 if ( !cgrid211.yg )
4658 {
4659 lua_pop( L, 1 ); // pop "xg"
4660 SWIG_fail;
4661 }
4662 if ( ( nx != Xlen ) || ( ny != Ylen ) )
4663 {
4664 lua_pop( L, 1 ); // pop "xg"
4665 lua_pushfstring( L, "Vectors must match matrix." );
4666 SWIG_fail;
4667 }
4668 // cgrid211.nx/ny already set
4669 }
4670 lua_pop( L, 1 ); // pop "yg"
4671
4672 if ( gridmode == 1 )
4673 arg11 = &cgrid111;
4674 else if ( gridmode == 2 )
4675 arg11 = &cgrid211;
4676 }
4677 }
4678 plcont((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,(double const *)arg8,arg9,arg10,arg11);
4679
4680 {
4681 int i;
4682
4683 if ( arg1 )
4684 {
4685 for ( i = 0; i < ii1; i++ )
4686 LUA_FREE_ARRAY( arg1[i] );
4687 LUA_FREE_ARRAY( arg1 );
4688 }
4689 }
4690 {
4691 LUA_FREE_ARRAY( arg8 );
4692 }
4693 {
4694 mypltr_funcstr[0] = '\0';
4695 }
4696 {
4697 int i;
4698
4699 LUA_FREE_ARRAY( cgrid111.xg );
4700 LUA_FREE_ARRAY( cgrid111.yg );
4701
4702 if ( cgrid211.xg )
4703 {
4704 for ( i = 0; i < Xlen; i++ )
4705 LUA_FREE_ARRAY( cgrid211.xg[i] );
4706 LUA_FREE_ARRAY( cgrid211.xg );
4707 }
4708 if ( cgrid211.yg )
4709 {
4710 for ( i = 0; i < Xlen; i++ )
4711 LUA_FREE_ARRAY( cgrid211.yg[i] );
4712 LUA_FREE_ARRAY( cgrid211.yg );
4713 }
4714 }
4715 return SWIG_arg;
4716
4717 fail: SWIGUNUSED;
4718 {
4719 int i;
4720
4721 if ( arg1 )
4722 {
4723 for ( i = 0; i < ii1; i++ )
4724 LUA_FREE_ARRAY( arg1[i] );
4725 LUA_FREE_ARRAY( arg1 );
4726 }
4727 }
4728 {
4729 LUA_FREE_ARRAY( arg8 );
4730 }
4731 {
4732 mypltr_funcstr[0] = '\0';
4733 }
4734 {
4735 int i;
4736
4737 LUA_FREE_ARRAY( cgrid111.xg );
4738 LUA_FREE_ARRAY( cgrid111.yg );
4739
4740 if ( cgrid211.xg )
4741 {
4742 for ( i = 0; i < Xlen; i++ )
4743 LUA_FREE_ARRAY( cgrid211.xg[i] );
4744 LUA_FREE_ARRAY( cgrid211.xg );
4745 }
4746 if ( cgrid211.yg )
4747 {
4748 for ( i = 0; i < Xlen; i++ )
4749 LUA_FREE_ARRAY( cgrid211.yg[i] );
4750 LUA_FREE_ARRAY( cgrid211.yg );
4751 }
4752 }
4753 lua_error(L);
4754 return 0;
4755}
4756
4757
4758static int _wrap_ctime(lua_State* L) {
4759 int SWIG_arg = 0;
4760 PLINT arg1 ;
4761 PLINT arg2 ;
4762 PLINT arg3 ;
4763 PLINT arg4 ;
4764 PLINT arg5 ;
4765 PLFLT arg6 ;
4766 PLFLT *arg7 = 0 ;
4767 PLFLT temp7 ;
4768
4769 arg7 = &temp7;
4770 SWIG_check_num_args("plctime",6,6)
4771 if(!lua_isnumber(L,1)) SWIG_fail_arg("plctime",1,"PLINT");
4772 if(!lua_isnumber(L,2)) SWIG_fail_arg("plctime",2,"PLINT");
4773 if(!lua_isnumber(L,3)) SWIG_fail_arg("plctime",3,"PLINT");
4774 if(!lua_isnumber(L,4)) SWIG_fail_arg("plctime",4,"PLINT");
4775 if(!lua_isnumber(L,5)) SWIG_fail_arg("plctime",5,"PLINT");
4776 if(!lua_isnumber(L,6)) SWIG_fail_arg("plctime",6,"PLFLT");
4777 arg1 = (PLINT)lua_tonumber(L, 1);
4778 arg2 = (PLINT)lua_tonumber(L, 2);
4779 arg3 = (PLINT)lua_tonumber(L, 3);
4780 arg4 = (PLINT)lua_tonumber(L, 4);
4781 arg5 = (PLINT)lua_tonumber(L, 5);
4782 arg6 = (PLFLT)lua_tonumber(L, 6);
4783 plctime(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
4784
4785 lua_pushnumber(L, (lua_Number) *arg7); SWIG_arg++;
4786 return SWIG_arg;
4787
4788 fail: SWIGUNUSED;
4789 lua_error(L);
4790 return 0;
4791}
4792
4793
4794static int _wrap_cpstrm(lua_State* L) {
4795 int SWIG_arg = 0;
4796 PLINT arg1 ;
4797 PLBOOL arg2 ;
4798
4799 SWIG_check_num_args("plcpstrm",2,2)
4800 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcpstrm",1,"PLINT");
4801 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcpstrm",2,"PLBOOL");
4802 arg1 = (PLINT)lua_tonumber(L, 1);
4803 arg2 = (PLBOOL)lua_tonumber(L, 2);
4804 plcpstrm(arg1,arg2);
4805
4806 return SWIG_arg;
4807
4808 fail: SWIGUNUSED;
4809 lua_error(L);
4810 return 0;
4811}
4812
4813
4814static int _wrap_plend(lua_State* L) {
4815 int SWIG_arg = 0;
4816
4817 SWIG_check_num_args("plend",0,0)
4818 plend();
4819
4820 return SWIG_arg;
4821
4822 fail: SWIGUNUSED;
4823 lua_error(L);
4824 return 0;
4825}
4826
4827
4828static int _wrap_plend1(lua_State* L) {
4829 int SWIG_arg = 0;
4830
4831 SWIG_check_num_args("plend1",0,0)
4832 plend1();
4833
4834 return SWIG_arg;
4835
4836 fail: SWIGUNUSED;
4837 lua_error(L);
4838 return 0;
4839}
4840
4841
4842static int _wrap_env(lua_State* L) {
4843 int SWIG_arg = 0;
4844 PLFLT arg1 ;
4845 PLFLT arg2 ;
4846 PLFLT arg3 ;
4847 PLFLT arg4 ;
4848 PLINT arg5 ;
4849 PLINT arg6 ;
4850
4851 SWIG_check_num_args("plenv",6,6)
4852 if(!lua_isnumber(L,1)) SWIG_fail_arg("plenv",1,"PLFLT");
4853 if(!lua_isnumber(L,2)) SWIG_fail_arg("plenv",2,"PLFLT");
4854 if(!lua_isnumber(L,3)) SWIG_fail_arg("plenv",3,"PLFLT");
4855 if(!lua_isnumber(L,4)) SWIG_fail_arg("plenv",4,"PLFLT");
4856 if(!lua_isnumber(L,5)) SWIG_fail_arg("plenv",5,"PLINT");
4857 if(!lua_isnumber(L,6)) SWIG_fail_arg("plenv",6,"PLINT");
4858 arg1 = (PLFLT)lua_tonumber(L, 1);
4859 arg2 = (PLFLT)lua_tonumber(L, 2);
4860 arg3 = (PLFLT)lua_tonumber(L, 3);
4861 arg4 = (PLFLT)lua_tonumber(L, 4);
4862 arg5 = (PLINT)lua_tonumber(L, 5);
4863 arg6 = (PLINT)lua_tonumber(L, 6);
4864 plenv(arg1,arg2,arg3,arg4,arg5,arg6);
4865
4866 return SWIG_arg;
4867
4868 fail: SWIGUNUSED;
4869 lua_error(L);
4870 return 0;
4871}
4872
4873
4874static int _wrap_env0(lua_State* L) {
4875 int SWIG_arg = 0;
4876 PLFLT arg1 ;
4877 PLFLT arg2 ;
4878 PLFLT arg3 ;
4879 PLFLT arg4 ;
4880 PLINT arg5 ;
4881 PLINT arg6 ;
4882
4883 SWIG_check_num_args("plenv0",6,6)
4884 if(!lua_isnumber(L,1)) SWIG_fail_arg("plenv0",1,"PLFLT");
4885 if(!lua_isnumber(L,2)) SWIG_fail_arg("plenv0",2,"PLFLT");
4886 if(!lua_isnumber(L,3)) SWIG_fail_arg("plenv0",3,"PLFLT");
4887 if(!lua_isnumber(L,4)) SWIG_fail_arg("plenv0",4,"PLFLT");
4888 if(!lua_isnumber(L,5)) SWIG_fail_arg("plenv0",5,"PLINT");
4889 if(!lua_isnumber(L,6)) SWIG_fail_arg("plenv0",6,"PLINT");
4890 arg1 = (PLFLT)lua_tonumber(L, 1);
4891 arg2 = (PLFLT)lua_tonumber(L, 2);
4892 arg3 = (PLFLT)lua_tonumber(L, 3);
4893 arg4 = (PLFLT)lua_tonumber(L, 4);
4894 arg5 = (PLINT)lua_tonumber(L, 5);
4895 arg6 = (PLINT)lua_tonumber(L, 6);
4896 plenv0(arg1,arg2,arg3,arg4,arg5,arg6);
4897
4898 return SWIG_arg;
4899
4900 fail: SWIGUNUSED;
4901 lua_error(L);
4902 return 0;
4903}
4904
4905
4906static int _wrap_eop(lua_State* L) {
4907 int SWIG_arg = 0;
4908
4909 SWIG_check_num_args("pleop",0,0)
4910 pleop();
4911
4912 return SWIG_arg;
4913
4914 fail: SWIGUNUSED;
4915 lua_error(L);
4916 return 0;
4917}
4918
4919
4920static int _wrap_errx(lua_State* L) {
4921 int SWIG_arg = 0;
4922 PLINT arg1 ;
4923 PLFLT *arg2 = 0 ;
4924 PLFLT *arg3 = 0 ;
4925 PLFLT *arg4 = 0 ;
4926 int temp3 ;
4927 int temp4 ;
4928
4929 SWIG_check_num_args("plerrx",3,3)
4930 {
4931 int temp;
4932 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4933 if ( !arg2 )
4934 SWIG_fail;
4935 arg1 = Alen = temp;
4936 }
4937 {
4938 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4939 if ( !arg3 )
4940 SWIG_fail;
4941 if ( temp3 != Alen )
4942 {
4943 lua_pushfstring( L, "Tables must be of same length." );
4944 SWIG_fail;
4945 }
4946 }
4947 {
4948 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
4949 if ( !arg4 )
4950 SWIG_fail;
4951 if ( temp4 != Alen )
4952 {
4953 lua_pushfstring( L, "Tables must be of same length." );
4954 SWIG_fail;
4955 }
4956 }
4957 plerrx(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
4958
4959 {
4960 LUA_FREE_ARRAY( arg2 );
4961 }
4962 {
4963 LUA_FREE_ARRAY( arg3 );
4964 }
4965 {
4966 LUA_FREE_ARRAY( arg4 );
4967 }
4968 return SWIG_arg;
4969
4970 fail: SWIGUNUSED;
4971 {
4972 LUA_FREE_ARRAY( arg2 );
4973 }
4974 {
4975 LUA_FREE_ARRAY( arg3 );
4976 }
4977 {
4978 LUA_FREE_ARRAY( arg4 );
4979 }
4980 lua_error(L);
4981 return 0;
4982}
4983
4984
4985static int _wrap_erry(lua_State* L) {
4986 int SWIG_arg = 0;
4987 PLINT arg1 ;
4988 PLFLT *arg2 = 0 ;
4989 PLFLT *arg3 = 0 ;
4990 PLFLT *arg4 = 0 ;
4991 int temp3 ;
4992 int temp4 ;
4993
4994 SWIG_check_num_args("plerry",3,3)
4995 {
4996 int temp;
4997 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4998 if ( !arg2 )
4999 SWIG_fail;
5000 arg1 = Alen = temp;
5001 }
5002 {
5003 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
5004 if ( !arg3 )
5005 SWIG_fail;
5006 if ( temp3 != Alen )
5007 {
5008 lua_pushfstring( L, "Tables must be of same length." );
5009 SWIG_fail;
5010 }
5011 }
5012 {
5013 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
5014 if ( !arg4 )
5015 SWIG_fail;
5016 if ( temp4 != Alen )
5017 {
5018 lua_pushfstring( L, "Tables must be of same length." );
5019 SWIG_fail;
5020 }
5021 }
5022 plerry(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
5023
5024 {
5025 LUA_FREE_ARRAY( arg2 );
5026 }
5027 {
5028 LUA_FREE_ARRAY( arg3 );
5029 }
5030 {
5031 LUA_FREE_ARRAY( arg4 );
5032 }
5033 return SWIG_arg;
5034
5035 fail: SWIGUNUSED;
5036 {
5037 LUA_FREE_ARRAY( arg2 );
5038 }
5039 {
5040 LUA_FREE_ARRAY( arg3 );
5041 }
5042 {
5043 LUA_FREE_ARRAY( arg4 );
5044 }
5045 lua_error(L);
5046 return 0;
5047}
5048
5049
5050static int _wrap_famadv(lua_State* L) {
5051 int SWIG_arg = 0;
5052
5053 SWIG_check_num_args("plfamadv",0,0)
5054 plfamadv();
5055
5056 return SWIG_arg;
5057
5058 fail: SWIGUNUSED;
5059 lua_error(L);
5060 return 0;
5061}
5062
5063
5064static int _wrap_fill(lua_State* L) {
5065 int SWIG_arg = 0;
5066 PLINT arg1 ;
5067 PLFLT *arg2 = 0 ;
5068 PLFLT *arg3 = 0 ;
5069 int temp3 ;
5070
5071 SWIG_check_num_args("plfill",2,2)
5072 {
5073 int temp;
5074 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5075 if ( !arg2 )
5076 SWIG_fail;
5077 arg1 = Alen = temp;
5078 }
5079 {
5080 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
5081 if ( !arg3 )
5082 SWIG_fail;
5083 if ( temp3 != Alen )
5084 {
5085 lua_pushfstring( L, "Tables must be of same length." );
5086 SWIG_fail;
5087 }
5088 }
5089 plfill(arg1,(double const *)arg2,(double const *)arg3);
5090
5091 {
5092 LUA_FREE_ARRAY( arg2 );
5093 }
5094 {
5095 LUA_FREE_ARRAY( arg3 );
5096 }
5097 return SWIG_arg;
5098
5099 fail: SWIGUNUSED;
5100 {
5101 LUA_FREE_ARRAY( arg2 );
5102 }
5103 {
5104 LUA_FREE_ARRAY( arg3 );
5105 }
5106 lua_error(L);
5107 return 0;
5108}
5109
5110
5111static int _wrap_fill3(lua_State* L) {
5112 int SWIG_arg = 0;
5113 PLINT arg1 ;
5114 PLFLT *arg2 = 0 ;
5115 PLFLT *arg3 = 0 ;
5116 PLFLT *arg4 = 0 ;
5117 int temp3 ;
5118 int temp4 ;
5119
5120 SWIG_check_num_args("plfill3",3,3)
5121 {
5122 int temp;
5123 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5124 if ( !arg2 )
5125 SWIG_fail;
5126 arg1 = Alen = temp;
5127 }
5128 {
5129 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
5130 if ( !arg3 )
5131 SWIG_fail;
5132 if ( temp3 != Alen )
5133 {
5134 lua_pushfstring( L, "Tables must be of same length." );
5135 SWIG_fail;
5136 }
5137 }
5138 {
5139 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
5140 if ( !arg4 )
5141 SWIG_fail;
5142 if ( temp4 != Alen )
5143 {
5144 lua_pushfstring( L, "Tables must be of same length." );
5145 SWIG_fail;
5146 }
5147 }
5148 plfill3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
5149
5150 {
5151 LUA_FREE_ARRAY( arg2 );
5152 }
5153 {
5154 LUA_FREE_ARRAY( arg3 );
5155 }
5156 {
5157 LUA_FREE_ARRAY( arg4 );
5158 }
5159 return SWIG_arg;
5160
5161 fail: SWIGUNUSED;
5162 {
5163 LUA_FREE_ARRAY( arg2 );
5164 }
5165 {
5166 LUA_FREE_ARRAY( arg3 );
5167 }
5168 {
5169 LUA_FREE_ARRAY( arg4 );
5170 }
5171 lua_error(L);
5172 return 0;
5173}
5174
5175
5176static int _wrap_gradient(lua_State* L) {
5177 int SWIG_arg = 0;
5178 PLINT arg1 ;
5179 PLFLT *arg2 = 0 ;
5180 PLFLT *arg3 = 0 ;
5181 PLFLT arg4 ;
5182 int temp3 ;
5183
5184 SWIG_check_num_args("plgradient",3,3)
5185 if(!lua_isnumber(L,3)) SWIG_fail_arg("plgradient",3,"PLFLT");
5186 {
5187 int temp;
5188 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5189 if ( !arg2 )
5190 SWIG_fail;
5191 arg1 = Alen = temp;
5192 }
5193 {
5194 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
5195 if ( !arg3 )
5196 SWIG_fail;
5197 if ( temp3 != Alen )
5198 {
5199 lua_pushfstring( L, "Tables must be of same length." );
5200 SWIG_fail;
5201 }
5202 }
5203 arg4 = (PLFLT)lua_tonumber(L, 3);
5204 plgradient(arg1,(double const *)arg2,(double const *)arg3,arg4);
5205
5206 {
5207 LUA_FREE_ARRAY( arg2 );
5208 }
5209 {
5210 LUA_FREE_ARRAY( arg3 );
5211 }
5212 return SWIG_arg;
5213
5214 fail: SWIGUNUSED;
5215 {
5216 LUA_FREE_ARRAY( arg2 );
5217 }
5218 {
5219 LUA_FREE_ARRAY( arg3 );
5220 }
5221 lua_error(L);
5222 return 0;
5223}
5224
5225
5226static int _wrap_flush(lua_State* L) {
5227 int SWIG_arg = 0;
5228
5229 SWIG_check_num_args("plflush",0,0)
5230 plflush();
5231
5232 return SWIG_arg;
5233
5234 fail: SWIGUNUSED;
5235 lua_error(L);
5236 return 0;
5237}
5238
5239
5240static int _wrap_font(lua_State* L) {
5241 int SWIG_arg = 0;
5242 PLINT arg1 ;
5243
5244 SWIG_check_num_args("plfont",1,1)
5245 if(!lua_isnumber(L,1)) SWIG_fail_arg("plfont",1,"PLINT");
5246 arg1 = (PLINT)lua_tonumber(L, 1);
5247 plfont(arg1);
5248
5249 return SWIG_arg;
5250
5251 fail: SWIGUNUSED;
5252 lua_error(L);
5253 return 0;
5254}
5255
5256
5257static int _wrap_fontld(lua_State* L) {
5258 int SWIG_arg = 0;
5259 PLINT arg1 ;
5260
5261 SWIG_check_num_args("plfontld",1,1)
5262 if(!lua_isnumber(L,1)) SWIG_fail_arg("plfontld",1,"PLINT");
5263 arg1 = (PLINT)lua_tonumber(L, 1);
5264 plfontld(arg1);
5265
5266 return SWIG_arg;
5267
5268 fail: SWIGUNUSED;
5269 lua_error(L);
5270 return 0;
5271}
5272
5273
5274static int _wrap_gchr(lua_State* L) {
5275 int SWIG_arg = 0;
5276 PLFLT *arg1 = 0 ;
5277 PLFLT *arg2 = 0 ;
5278 PLFLT temp1 ;
5279 PLFLT temp2 ;
5280
5281 arg1 = &temp1;
5282 arg2 = &temp2;
5283 SWIG_check_num_args("plgchr",0,0)
5284 plgchr(arg1,arg2);
5285
5286 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5287 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5288 return SWIG_arg;
5289
5290 fail: SWIGUNUSED;
5291 lua_error(L);
5292 return 0;
5293}
5294
5295
5296static int _wrap_gcol0(lua_State* L) {
5297 int SWIG_arg = 0;
5298 PLINT arg1 ;
5299 PLINT *arg2 = 0 ;
5300 PLINT *arg3 = 0 ;
5301 PLINT *arg4 = 0 ;
5302 PLINT temp2 ;
5303 PLINT temp3 ;
5304 PLINT temp4 ;
5305
5306 arg2 = &temp2;
5307 arg3 = &temp3;
5308 arg4 = &temp4;
5309 SWIG_check_num_args("plgcol0",1,1)
5310 if(!lua_isnumber(L,1)) SWIG_fail_arg("plgcol0",1,"PLINT");
5311 arg1 = (PLINT)lua_tonumber(L, 1);
5312 plgcol0(arg1,arg2,arg3,arg4);
5313
5314 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5315 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5316 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5317 return SWIG_arg;
5318
5319 fail: SWIGUNUSED;
5320 lua_error(L);
5321 return 0;
5322}
5323
5324
5325static int _wrap_gcol0a(lua_State* L) {
5326 int SWIG_arg = 0;
5327 PLINT arg1 ;
5328 PLINT *arg2 = 0 ;
5329 PLINT *arg3 = 0 ;
5330 PLINT *arg4 = 0 ;
5331 PLFLT *arg5 = 0 ;
5332 PLINT temp2 ;
5333 PLINT temp3 ;
5334 PLINT temp4 ;
5335 PLFLT temp5 ;
5336
5337 arg2 = &temp2;
5338 arg3 = &temp3;
5339 arg4 = &temp4;
5340 arg5 = &temp5;
5341 SWIG_check_num_args("plgcol0a",1,1)
5342 if(!lua_isnumber(L,1)) SWIG_fail_arg("plgcol0a",1,"PLINT");
5343 arg1 = (PLINT)lua_tonumber(L, 1);
5344 plgcol0a(arg1,arg2,arg3,arg4,arg5);
5345
5346 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5347 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5348 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5349 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
5350 return SWIG_arg;
5351
5352 fail: SWIGUNUSED;
5353 lua_error(L);
5354 return 0;
5355}
5356
5357
5358static int _wrap_gcolbg(lua_State* L) {
5359 int SWIG_arg = 0;
5360 PLINT *arg1 = 0 ;
5361 PLINT *arg2 = 0 ;
5362 PLINT *arg3 = 0 ;
5363 PLINT temp1 ;
5364 PLINT temp2 ;
5365 PLINT temp3 ;
5366
5367 arg1 = &temp1;
5368 arg2 = &temp2;
5369 arg3 = &temp3;
5370 SWIG_check_num_args("plgcolbg",0,0)
5371 plgcolbg(arg1,arg2,arg3);
5372
5373 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5374 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5375 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5376 return SWIG_arg;
5377
5378 fail: SWIGUNUSED;
5379 lua_error(L);
5380 return 0;
5381}
5382
5383
5384static int _wrap_gcolbga(lua_State* L) {
5385 int SWIG_arg = 0;
5386 PLINT *arg1 = 0 ;
5387 PLINT *arg2 = 0 ;
5388 PLINT *arg3 = 0 ;
5389 PLFLT *arg4 = 0 ;
5390 PLINT temp1 ;
5391 PLINT temp2 ;
5392 PLINT temp3 ;
5393 PLFLT temp4 ;
5394
5395 arg1 = &temp1;
5396 arg2 = &temp2;
5397 arg3 = &temp3;
5398 arg4 = &temp4;
5399 SWIG_check_num_args("plgcolbga",0,0)
5400 plgcolbga(arg1,arg2,arg3,arg4);
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 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5406 return SWIG_arg;
5407
5408 fail: SWIGUNUSED;
5409 lua_error(L);
5410 return 0;
5411}
5412
5413
5414static int _wrap_gcompression(lua_State* L) {
5415 int SWIG_arg = 0;
5416 PLINT *arg1 = 0 ;
5417 PLINT temp1 ;
5418
5419 arg1 = &temp1;
5420 SWIG_check_num_args("plgcompression",0,0)
5421 plgcompression(arg1);
5422
5423 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5424 return SWIG_arg;
5425
5426 fail: SWIGUNUSED;
5427 lua_error(L);
5428 return 0;
5429}
5430
5431
5432static int _wrap_gdev(lua_State* L) {
5433 int SWIG_arg = 0;
5434 char *arg1 = 0 ;
5435 char buff1[1000] ;
5436
5437 {
5438 arg1 = buff1;
5439 }
5440 SWIG_check_num_args("plgdev",0,0)
5441 plgdev(arg1);
5442
5443 {
5444 lua_pushstring( L, arg1 );
5445 SWIG_arg++;
5446 }
5447 return SWIG_arg;
5448
5449 fail: SWIGUNUSED;
5450 lua_error(L);
5451 return 0;
5452}
5453
5454
5455static int _wrap_gdidev(lua_State* L) {
5456 int SWIG_arg = 0;
5457 PLFLT *arg1 = 0 ;
5458 PLFLT *arg2 = 0 ;
5459 PLFLT *arg3 = 0 ;
5460 PLFLT *arg4 = 0 ;
5461 PLFLT temp1 ;
5462 PLFLT temp2 ;
5463 PLFLT temp3 ;
5464 PLFLT temp4 ;
5465
5466 arg1 = &temp1;
5467 arg2 = &temp2;
5468 arg3 = &temp3;
5469 arg4 = &temp4;
5470 SWIG_check_num_args("plgdidev",0,0)
5471 plgdidev(arg1,arg2,arg3,arg4);
5472
5473 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5474 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5475 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5476 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5477 return SWIG_arg;
5478
5479 fail: SWIGUNUSED;
5480 lua_error(L);
5481 return 0;
5482}
5483
5484
5485static int _wrap_gdiori(lua_State* L) {
5486 int SWIG_arg = 0;
5487 PLFLT *arg1 = 0 ;
5488 PLFLT temp1 ;
5489
5490 arg1 = &temp1;
5491 SWIG_check_num_args("plgdiori",0,0)
5492 plgdiori(arg1);
5493
5494 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5495 return SWIG_arg;
5496
5497 fail: SWIGUNUSED;
5498 lua_error(L);
5499 return 0;
5500}
5501
5502
5503static int _wrap_gdiplt(lua_State* L) {
5504 int SWIG_arg = 0;
5505 PLFLT *arg1 = 0 ;
5506 PLFLT *arg2 = 0 ;
5507 PLFLT *arg3 = 0 ;
5508 PLFLT *arg4 = 0 ;
5509 PLFLT temp1 ;
5510 PLFLT temp2 ;
5511 PLFLT temp3 ;
5512 PLFLT temp4 ;
5513
5514 arg1 = &temp1;
5515 arg2 = &temp2;
5516 arg3 = &temp3;
5517 arg4 = &temp4;
5518 SWIG_check_num_args("plgdiplt",0,0)
5519 plgdiplt(arg1,arg2,arg3,arg4);
5520
5521 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5522 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5523 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5524 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5525 return SWIG_arg;
5526
5527 fail: SWIGUNUSED;
5528 lua_error(L);
5529 return 0;
5530}
5531
5532
5533static int _wrap_gfam(lua_State* L) {
5534 int SWIG_arg = 0;
5535 PLINT *arg1 = 0 ;
5536 PLINT *arg2 = 0 ;
5537 PLINT *arg3 = 0 ;
5538 PLINT temp1 ;
5539 PLINT temp2 ;
5540 PLINT temp3 ;
5541
5542 arg1 = &temp1;
5543 arg2 = &temp2;
5544 arg3 = &temp3;
5545 SWIG_check_num_args("plgfam",0,0)
5546 plgfam(arg1,arg2,arg3);
5547
5548 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5549 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5550 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5551 return SWIG_arg;
5552
5553 fail: SWIGUNUSED;
5554 lua_error(L);
5555 return 0;
5556}
5557
5558
5559static int _wrap_gfci(lua_State* L) {
5560 int SWIG_arg = 0;
5561 PLUNICODE *arg1 = 0 ;
5562 PLUNICODE temp1 ;
5563
5564 arg1 = &temp1;
5565 SWIG_check_num_args("plgfci",0,0)
5566 plgfci(arg1);
5567
5568 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5569 return SWIG_arg;
5570
5571 fail: SWIGUNUSED;
5572 lua_error(L);
5573 return 0;
5574}
5575
5576
5577static int _wrap_gfnam(lua_State* L) {
5578 int SWIG_arg = 0;
5579 char *arg1 = 0 ;
5580 char buff1[1000] ;
5581
5582 {
5583 arg1 = buff1;
5584 }
5585 SWIG_check_num_args("plgfnam",0,0)
5586 plgfnam(arg1);
5587
5588 {
5589 lua_pushstring( L, arg1 );
5590 SWIG_arg++;
5591 }
5592 return SWIG_arg;
5593
5594 fail: SWIGUNUSED;
5595 lua_error(L);
5596 return 0;
5597}
5598
5599
5600static int _wrap_gfont(lua_State* L) {
5601 int SWIG_arg = 0;
5602 PLINT *arg1 = 0 ;
5603 PLINT *arg2 = 0 ;
5604 PLINT *arg3 = 0 ;
5605 PLINT temp1 ;
5606 PLINT temp2 ;
5607 PLINT temp3 ;
5608
5609 arg1 = &temp1;
5610 arg2 = &temp2;
5611 arg3 = &temp3;
5612 SWIG_check_num_args("plgfont",0,0)
5613 plgfont(arg1,arg2,arg3);
5614
5615 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5616 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5617 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5618 return SWIG_arg;
5619
5620 fail: SWIGUNUSED;
5621 lua_error(L);
5622 return 0;
5623}
5624
5625
5626static int _wrap_glevel(lua_State* L) {
5627 int SWIG_arg = 0;
5628 PLINT *arg1 = 0 ;
5629 PLINT temp1 ;
5630
5631 arg1 = &temp1;
5632 SWIG_check_num_args("plglevel",0,0)
5633 plglevel(arg1);
5634
5635 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5636 return SWIG_arg;
5637
5638 fail: SWIGUNUSED;
5639 lua_error(L);
5640 return 0;
5641}
5642
5643
5644static int _wrap_gpage(lua_State* L) {
5645 int SWIG_arg = 0;
5646 PLFLT *arg1 = 0 ;
5647 PLFLT *arg2 = 0 ;
5648 PLINT *arg3 = 0 ;
5649 PLINT *arg4 = 0 ;
5650 PLINT *arg5 = 0 ;
5651 PLINT *arg6 = 0 ;
5652 PLFLT temp1 ;
5653 PLFLT temp2 ;
5654 PLINT temp3 ;
5655 PLINT temp4 ;
5656 PLINT temp5 ;
5657 PLINT temp6 ;
5658
5659 arg1 = &temp1;
5660 arg2 = &temp2;
5661 arg3 = &temp3;
5662 arg4 = &temp4;
5663 arg5 = &temp5;
5664 arg6 = &temp6;
5665 SWIG_check_num_args("plgpage",0,0)
5666 plgpage(arg1,arg2,arg3,arg4,arg5,arg6);
5667
5668 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5669 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5670 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5671 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5672 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
5673 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
5674 return SWIG_arg;
5675
5676 fail: SWIGUNUSED;
5677 lua_error(L);
5678 return 0;
5679}
5680
5681
5682static int _wrap_gra(lua_State* L) {
5683 int SWIG_arg = 0;
5684
5685 SWIG_check_num_args("plgra",0,0)
5686 plgra();
5687
5688 return SWIG_arg;
5689
5690 fail: SWIGUNUSED;
5691 lua_error(L);
5692 return 0;
5693}
5694
5695
5696static int _wrap_griddata(lua_State* L) {
5697 int SWIG_arg = 0;
5698 PLFLT *arg1 = 0 ;
5699 PLFLT *arg2 = 0 ;
5700 PLFLT *arg3 = 0 ;
5701 PLINT arg4 ;
5702 PLFLT *arg5 = 0 ;
5703 PLINT arg6 ;
5704 PLFLT *arg7 = 0 ;
5705 PLINT arg8 ;
5706 PLFLT **arg9 = 0 ;
5707 PLINT arg10 ;
5708 PLFLT arg11 ;
5709 int temp2 ;
5710
5711 SWIG_check_num_args("plgriddata",7,7)
5712 if(!lua_isnumber(L,6)) SWIG_fail_arg("plgriddata",6,"PLINT");
5713 if(!lua_isnumber(L,7)) SWIG_fail_arg("plgriddata",7,"PLFLT");
5714 {
5715 int temp;
5716 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5717 if ( !arg1 )
5718 SWIG_fail;
5719 Alen = temp;
5720 }
5721 {
5722 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp2 );
5723 if ( !arg2 )
5724 SWIG_fail;
5725 if ( temp2 != Alen )
5726 {
5727 lua_pushfstring( L, "Tables must be of same length." );
5728 SWIG_fail;
5729 }
5730 }
5731 {
5732 int temp;
5733 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp );
5734 if ( !arg3 )
5735 SWIG_fail;
5736 if ( temp != Alen )
5737 {
5738 lua_pushfstring( L, "Tables must be of same length." );
5739 SWIG_fail;
5740 }
5741 arg4 = temp;
5742 }
5743 {
5744 int temp;
5745 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
5746 if ( !arg5 )
5747 SWIG_fail;
5748 arg6 = Xlen = temp;
5749 }
5750 {
5751 int temp, i;
5752
5753 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
5754 if ( !arg7 )
5755 SWIG_fail;
5756 arg8 = Ylen = temp;
5757
5758 arg9 = LUA_ALLOC_ARRAY( PLFLT *, Xlen );
5759 if ( !arg9 )
5760 SWIG_fail;
5761 for ( i = 0; i < Xlen; i++ )
5762 arg9[i] = NULL;
5763
5764 for ( i = 0; i < Xlen; i++ )
5765 {
5766 arg9[i] = LUA_ALLOC_ARRAY( PLFLT, Ylen );
5767 if ( !arg9[i] )
5768 SWIG_fail;
5769 }
5770 }
5771 arg10 = (PLINT)lua_tonumber(L, 6);
5772 arg11 = (PLFLT)lua_tonumber(L, 7);
5773 plgriddata((double const *)arg1,(double const *)arg2,(double const *)arg3,arg4,(double const *)arg5,arg6,(double const *)arg7,arg8,arg9,arg10,arg11);
5774
5775 {
5776 int i;
5777
5778 if ( arg9 )
5779 {
5780 lua_newtable( L );
5781 for ( i = 0; i < Xlen; i++ )
5782 {
5783 SWIG_write_double_num_array( L, arg9[i], Ylen );
5784 lua_rawseti( L, -2, i + 1 ); // -1 is the inner table, -2 is the outer table
5785 }
5786 SWIG_arg++;
5787 }
5788 }
5789 {
5790 LUA_FREE_ARRAY( arg1 );
5791 }
5792 {
5793 LUA_FREE_ARRAY( arg2 );
5794 }
5795 {
5796 LUA_FREE_ARRAY( arg3 );
5797 }
5798 {
5799 LUA_FREE_ARRAY( arg5 );
5800 }
5801 {
5802 int i;
5803
5804 LUA_FREE_ARRAY( arg7 );
5805
5806 if ( arg9 )
5807 {
5808 for ( i = 0; i < Xlen; i++ )
5809 LUA_FREE_ARRAY( arg9[i] );
5810 LUA_FREE_ARRAY( arg9 );
5811 }
5812 }
5813 return SWIG_arg;
5814
5815 fail: SWIGUNUSED;
5816 {
5817 LUA_FREE_ARRAY( arg1 );
5818 }
5819 {
5820 LUA_FREE_ARRAY( arg2 );
5821 }
5822 {
5823 LUA_FREE_ARRAY( arg3 );
5824 }
5825 {
5826 LUA_FREE_ARRAY( arg5 );
5827 }
5828 {
5829 int i;
5830
5831 LUA_FREE_ARRAY( arg7 );
5832
5833 if ( arg9 )
5834 {
5835 for ( i = 0; i < Xlen; i++ )
5836 LUA_FREE_ARRAY( arg9[i] );
5837 LUA_FREE_ARRAY( arg9 );
5838 }
5839 }
5840 lua_error(L);
5841 return 0;
5842}
5843
5844
5845static int _wrap_gspa(lua_State* L) {
5846 int SWIG_arg = 0;
5847 PLFLT *arg1 = 0 ;
5848 PLFLT *arg2 = 0 ;
5849 PLFLT *arg3 = 0 ;
5850 PLFLT *arg4 = 0 ;
5851 PLFLT temp1 ;
5852 PLFLT temp2 ;
5853 PLFLT temp3 ;
5854 PLFLT temp4 ;
5855
5856 arg1 = &temp1;
5857 arg2 = &temp2;
5858 arg3 = &temp3;
5859 arg4 = &temp4;
5860 SWIG_check_num_args("plgspa",0,0)
5861 plgspa(arg1,arg2,arg3,arg4);
5862
5863 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5864 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5865 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5866 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5867 return SWIG_arg;
5868
5869 fail: SWIGUNUSED;
5870 lua_error(L);
5871 return 0;
5872}
5873
5874
5875static int _wrap_gstrm(lua_State* L) {
5876 int SWIG_arg = 0;
5877 PLINT *arg1 = 0 ;
5878 PLINT temp1 ;
5879
5880 arg1 = &temp1;
5881 SWIG_check_num_args("plgstrm",0,0)
5882 plgstrm(arg1);
5883
5884 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5885 return SWIG_arg;
5886
5887 fail: SWIGUNUSED;
5888 lua_error(L);
5889 return 0;
5890}
5891
5892
5893static int _wrap_gver(lua_State* L) {
5894 int SWIG_arg = 0;
5895 char *arg1 = 0 ;
5896 char buff1[1000] ;
5897
5898 {
5899 arg1 = buff1;
5900 }
5901 SWIG_check_num_args("plgver",0,0)
5902 plgver(arg1);
5903
5904 {
5905 lua_pushstring( L, arg1 );
5906 SWIG_arg++;
5907 }
5908 return SWIG_arg;
5909
5910 fail: SWIGUNUSED;
5911 lua_error(L);
5912 return 0;
5913}
5914
5915
5916static int _wrap_gvpd(lua_State* L) {
5917 int SWIG_arg = 0;
5918 PLFLT *arg1 = 0 ;
5919 PLFLT *arg2 = 0 ;
5920 PLFLT *arg3 = 0 ;
5921 PLFLT *arg4 = 0 ;
5922 PLFLT temp1 ;
5923 PLFLT temp2 ;
5924 PLFLT temp3 ;
5925 PLFLT temp4 ;
5926
5927 arg1 = &temp1;
5928 arg2 = &temp2;
5929 arg3 = &temp3;
5930 arg4 = &temp4;
5931 SWIG_check_num_args("plgvpd",0,0)
5932 plgvpd(arg1,arg2,arg3,arg4);
5933
5934 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5935 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5936 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5937 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5938 return SWIG_arg;
5939
5940 fail: SWIGUNUSED;
5941 lua_error(L);
5942 return 0;
5943}
5944
5945
5946static int _wrap_gvpw(lua_State* L) {
5947 int SWIG_arg = 0;
5948 PLFLT *arg1 = 0 ;
5949 PLFLT *arg2 = 0 ;
5950 PLFLT *arg3 = 0 ;
5951 PLFLT *arg4 = 0 ;
5952 PLFLT temp1 ;
5953 PLFLT temp2 ;
5954 PLFLT temp3 ;
5955 PLFLT temp4 ;
5956
5957 arg1 = &temp1;
5958 arg2 = &temp2;
5959 arg3 = &temp3;
5960 arg4 = &temp4;
5961 SWIG_check_num_args("plgvpw",0,0)
5962 plgvpw(arg1,arg2,arg3,arg4);
5963
5964 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5965 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5966 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5967 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5968 return SWIG_arg;
5969
5970 fail: SWIGUNUSED;
5971 lua_error(L);
5972 return 0;
5973}
5974
5975
5976static int _wrap_gxax(lua_State* L) {
5977 int SWIG_arg = 0;
5978 PLINT *arg1 = 0 ;
5979 PLINT *arg2 = 0 ;
5980 PLINT temp1 ;
5981 PLINT temp2 ;
5982
5983 arg1 = &temp1;
5984 arg2 = &temp2;
5985 SWIG_check_num_args("plgxax",0,0)
5986 plgxax(arg1,arg2);
5987
5988 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5989 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5990 return SWIG_arg;
5991
5992 fail: SWIGUNUSED;
5993 lua_error(L);
5994 return 0;
5995}
5996
5997
5998static int _wrap_gyax(lua_State* L) {
5999 int SWIG_arg = 0;
6000 PLINT *arg1 = 0 ;
6001 PLINT *arg2 = 0 ;
6002 PLINT temp1 ;
6003 PLINT temp2 ;
6004
6005 arg1 = &temp1;
6006 arg2 = &temp2;
6007 SWIG_check_num_args("plgyax",0,0)
6008 plgyax(arg1,arg2);
6009
6010 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6011 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
6012 return SWIG_arg;
6013
6014 fail: SWIGUNUSED;
6015 lua_error(L);
6016 return 0;
6017}
6018
6019
6020static int _wrap_gzax(lua_State* L) {
6021 int SWIG_arg = 0;
6022 PLINT *arg1 = 0 ;
6023 PLINT *arg2 = 0 ;
6024 PLINT temp1 ;
6025 PLINT temp2 ;
6026
6027 arg1 = &temp1;
6028 arg2 = &temp2;
6029 SWIG_check_num_args("plgzax",0,0)
6030 plgzax(arg1,arg2);
6031
6032 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6033 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
6034 return SWIG_arg;
6035
6036 fail: SWIGUNUSED;
6037 lua_error(L);
6038 return 0;
6039}
6040
6041
6042static int _wrap_hist(lua_State* L) {
6043 int SWIG_arg = 0;
6044 PLINT arg1 ;
6045 PLFLT *arg2 = 0 ;
6046 PLFLT arg3 ;
6047 PLFLT arg4 ;
6048 PLINT arg5 ;
6049 PLINT arg6 ;
6050
6051 SWIG_check_num_args("plhist",5,5)
6052 if(!lua_isnumber(L,2)) SWIG_fail_arg("plhist",2,"PLFLT");
6053 if(!lua_isnumber(L,3)) SWIG_fail_arg("plhist",3,"PLFLT");
6054 if(!lua_isnumber(L,4)) SWIG_fail_arg("plhist",4,"PLINT");
6055 if(!lua_isnumber(L,5)) SWIG_fail_arg("plhist",5,"PLINT");
6056 {
6057 int temp;
6058 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6059 if ( !arg2 )
6060 SWIG_fail;
6061 arg1 = Alen = temp;
6062 }
6063 arg3 = (PLFLT)lua_tonumber(L, 2);
6064 arg4 = (PLFLT)lua_tonumber(L, 3);
6065 arg5 = (PLINT)lua_tonumber(L, 4);
6066 arg6 = (PLINT)lua_tonumber(L, 5);
6067 plhist(arg1,(double const *)arg2,arg3,arg4,arg5,arg6);
6068
6069 {
6070 LUA_FREE_ARRAY( arg2 );
6071 }
6072 return SWIG_arg;
6073
6074 fail: SWIGUNUSED;
6075 {
6076 LUA_FREE_ARRAY( arg2 );
6077 }
6078 lua_error(L);
6079 return 0;
6080}
6081
6082
6083static int _wrap_hlsrgb(lua_State* L) {
6084 int SWIG_arg = 0;
6085 PLFLT arg1 ;
6086 PLFLT arg2 ;
6087 PLFLT arg3 ;
6088 PLFLT *arg4 = 0 ;
6089 PLFLT *arg5 = 0 ;
6090 PLFLT *arg6 = 0 ;
6091 PLFLT temp4 ;
6092 PLFLT temp5 ;
6093 PLFLT temp6 ;
6094
6095 arg4 = &temp4;
6096 arg5 = &temp5;
6097 arg6 = &temp6;
6098 SWIG_check_num_args("plhlsrgb",3,3)
6099 if(!lua_isnumber(L,1)) SWIG_fail_arg("plhlsrgb",1,"PLFLT");
6100 if(!lua_isnumber(L,2)) SWIG_fail_arg("plhlsrgb",2,"PLFLT");
6101 if(!lua_isnumber(L,3)) SWIG_fail_arg("plhlsrgb",3,"PLFLT");
6102 arg1 = (PLFLT)lua_tonumber(L, 1);
6103 arg2 = (PLFLT)lua_tonumber(L, 2);
6104 arg3 = (PLFLT)lua_tonumber(L, 3);
6105 plhlsrgb(arg1,arg2,arg3,arg4,arg5,arg6);
6106
6107 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
6108 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
6109 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
6110 return SWIG_arg;
6111
6112 fail: SWIGUNUSED;
6113 lua_error(L);
6114 return 0;
6115}
6116
6117
6118static int _wrap_init(lua_State* L) {
6119 int SWIG_arg = 0;
6120
6121 SWIG_check_num_args("plinit",0,0)
6122 plinit();
6123
6124 return SWIG_arg;
6125
6126 fail: SWIGUNUSED;
6127 lua_error(L);
6128 return 0;
6129}
6130
6131
6132static int _wrap_join(lua_State* L) {
6133 int SWIG_arg = 0;
6134 PLFLT arg1 ;
6135 PLFLT arg2 ;
6136 PLFLT arg3 ;
6137 PLFLT arg4 ;
6138
6139 SWIG_check_num_args("pljoin",4,4)
6140 if(!lua_isnumber(L,1)) SWIG_fail_arg("pljoin",1,"PLFLT");
6141 if(!lua_isnumber(L,2)) SWIG_fail_arg("pljoin",2,"PLFLT");
6142 if(!lua_isnumber(L,3)) SWIG_fail_arg("pljoin",3,"PLFLT");
6143 if(!lua_isnumber(L,4)) SWIG_fail_arg("pljoin",4,"PLFLT");
6144 arg1 = (PLFLT)lua_tonumber(L, 1);
6145 arg2 = (PLFLT)lua_tonumber(L, 2);
6146 arg3 = (PLFLT)lua_tonumber(L, 3);
6147 arg4 = (PLFLT)lua_tonumber(L, 4);
6148 pljoin(arg1,arg2,arg3,arg4);
6149
6150 return SWIG_arg;
6151
6152 fail: SWIGUNUSED;
6153 lua_error(L);
6154 return 0;
6155}
6156
6157
6158static int _wrap_lab(lua_State* L) {
6159 int SWIG_arg = 0;
6160 char *arg1 = 0 ;
6161 char *arg2 = 0 ;
6162 char *arg3 = 0 ;
6163
6164 SWIG_check_num_args("pllab",3,3)
6165 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("pllab",1,"char const *");
6166 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("pllab",2,"char const *");
6167 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("pllab",3,"char const *");
6168 arg1 = (char *)lua_tostring(L, 1);
6169 arg2 = (char *)lua_tostring(L, 2);
6170 arg3 = (char *)lua_tostring(L, 3);
6171 pllab((char const *)arg1,(char const *)arg2,(char const *)arg3);
6172
6173 return SWIG_arg;
6174
6175 fail: SWIGUNUSED;
6176 lua_error(L);
6177 return 0;
6178}
6179
6180
6181static int _wrap_legend(lua_State* L) {
6182 int SWIG_arg = 0;
6183 PLFLT *arg1 = 0 ;
6184 PLFLT *arg2 = 0 ;
6185 PLINT arg3 ;
6186 PLINT arg4 ;
6187 PLFLT arg5 ;
6188 PLFLT arg6 ;
6189 PLFLT arg7 ;
6190 PLINT arg8 ;
6191 PLINT arg9 ;
6192 PLINT arg10 ;
6193 PLINT arg11 ;
6194 PLINT arg12 ;
6195 PLINT arg13 ;
6196 PLINT *arg14 = 0 ;
6197 PLFLT arg15 ;
6198 PLFLT arg16 ;
6199 PLFLT arg17 ;
6200 PLFLT arg18 ;
6201 PLINT *arg19 = 0 ;
6202 char **arg20 = 0 ;
6203 PLINT *arg21 = 0 ;
6204 PLINT *arg22 = 0 ;
6205 PLFLT *arg23 = 0 ;
6206 PLFLT *arg24 = 0 ;
6207 PLINT *arg25 = 0 ;
6208 PLINT *arg26 = 0 ;
6209 PLFLT *arg27 = 0 ;
6210 PLINT *arg28 = 0 ;
6211 PLFLT *arg29 = 0 ;
6212 PLINT *arg30 = 0 ;
6213 char **arg31 = 0 ;
6214 PLFLT temp1 ;
6215 PLFLT temp2 ;
6216 int temp19 ;
6217 int temp21 ;
6218 int temp22 ;
6219 int temp23 ;
6220 int temp24 ;
6221 int temp25 ;
6222 int temp26 ;
6223 int temp27 ;
6224 int temp28 ;
6225 int temp29 ;
6226 int temp30 ;
6227
6228 {
6229 arg21 = NULL;
6230 }
6231 {
6232 arg22 = NULL;
6233 }
6234 {
6235 arg23 = NULL;
6236 }
6237 {
6238 arg24 = NULL;
6239 }
6240 {
6241 arg25 = NULL;
6242 }
6243 {
6244 arg26 = NULL;
6245 }
6246 {
6247 arg27 = NULL;
6248 }
6249 {
6250 arg28 = NULL;
6251 }
6252 {
6253 arg29 = NULL;
6254 }
6255 {
6256 arg30 = NULL;
6257 }
6258 arg1 = &temp1;
6259 arg2 = &temp2;
6260 SWIG_check_num_args("pllegend",17,28)
6261 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllegend",1,"PLINT");
6262 if(!lua_isnumber(L,2)) SWIG_fail_arg("pllegend",2,"PLINT");
6263 if(!lua_isnumber(L,3)) SWIG_fail_arg("pllegend",3,"PLFLT");
6264 if(!lua_isnumber(L,4)) SWIG_fail_arg("pllegend",4,"PLFLT");
6265 if(!lua_isnumber(L,5)) SWIG_fail_arg("pllegend",5,"PLFLT");
6266 if(!lua_isnumber(L,6)) SWIG_fail_arg("pllegend",6,"PLINT");
6267 if(!lua_isnumber(L,7)) SWIG_fail_arg("pllegend",7,"PLINT");
6268 if(!lua_isnumber(L,8)) SWIG_fail_arg("pllegend",8,"PLINT");
6269 if(!lua_isnumber(L,9)) SWIG_fail_arg("pllegend",9,"PLINT");
6270 if(!lua_isnumber(L,10)) SWIG_fail_arg("pllegend",10,"PLINT");
6271 if(!lua_isnumber(L,12)) SWIG_fail_arg("pllegend",12,"PLFLT");
6272 if(!lua_isnumber(L,13)) SWIG_fail_arg("pllegend",13,"PLFLT");
6273 if(!lua_isnumber(L,14)) SWIG_fail_arg("pllegend",14,"PLFLT");
6274 if(!lua_isnumber(L,15)) SWIG_fail_arg("pllegend",15,"PLFLT");
6275 if(!lua_istable(L,17)) SWIG_fail_arg("pllegend",17,"char const **");
6276 if(lua_gettop(L)>=28 && !lua_istable(L,28)) SWIG_fail_arg("pllegend",28,"char const **");
6277 arg3 = (PLINT)lua_tonumber(L, 1);
6278 arg4 = (PLINT)lua_tonumber(L, 2);
6279 arg5 = (PLFLT)lua_tonumber(L, 3);
6280 arg6 = (PLFLT)lua_tonumber(L, 4);
6281 arg7 = (PLFLT)lua_tonumber(L, 5);
6282 arg8 = (PLINT)lua_tonumber(L, 6);
6283 arg9 = (PLINT)lua_tonumber(L, 7);
6284 arg10 = (PLINT)lua_tonumber(L, 8);
6285 arg11 = (PLINT)lua_tonumber(L, 9);
6286 arg12 = (PLINT)lua_tonumber(L, 10);
6287 {
6288 arg14 = (PLINT *) LUA_get_int_num_array_var( L, 11, &arg13 );
6289 if ( !arg14 )
6290 SWIG_fail;
6291 Alen = arg13;
6292 }
6293 arg15 = (PLFLT)lua_tonumber(L, 12);
6294 arg16 = (PLFLT)lua_tonumber(L, 13);
6295 arg17 = (PLFLT)lua_tonumber(L, 14);
6296 arg18 = (PLFLT)lua_tonumber(L, 15);
6297 {
6298 arg19 = (PLINT *) LUA_get_int_num_array_var( L, 16, &temp19 );
6299 if ( !arg19 )
6300 SWIG_fail;
6301 if ( temp19 != Alen )
6302 {
6303 lua_pushfstring( L, "Tables must be of same length." );
6304 SWIG_fail;
6305 }
6306 }
6307 {
6308 int i;
6309 arg20 = NULL;
6310
6311 if ( SWIG_table_size( L, 17 ) != Alen )
6312 {
6313 lua_pushfstring( L, "Tables must be of same length." );
6314 SWIG_fail;
6315 }
6316 arg20 = malloc( sizeof ( char* ) * Alen );
6317 for ( i = 1; i <= Alen; i++ )
6318 {
6319 lua_rawgeti( L, 17, i );
6320 if ( lua_isstring( L, -1 ) )
6321 {
6322 arg20[i - 1] = (char *) lua_tostring( L, -1 );
6323 }
6324 else
6325 {
6326 lua_pop( L, 1 );
6327 lua_pushfstring( L, "Requires a sequence of strings." );
6328 SWIG_fail;
6329 // arg20 array is freed after 'fail:'
6330 }
6331 lua_pop( L, 1 );
6332 }
6333 }
6334 if(lua_gettop(L)>=18){
6335 {
6336 if ( lua_isnil( L, 18 ) )
6337 {
6338 arg21 = NULL;
6339 }
6340 else
6341 {
6342 arg21 = (PLINT *) LUA_get_int_num_array_var( L, 18, &temp21 );
6343 if ( !arg21 )
6344 SWIG_fail;
6345 if ( temp21 != Alen )
6346 {
6347 lua_pushfstring( L, "Tables must be of same length." );
6348 SWIG_fail;
6349 }
6350 }
6351 }
6352 }
6353 if(lua_gettop(L)>=19){
6354 {
6355 if ( lua_isnil( L, 19 ) )
6356 {
6357 arg22 = NULL;
6358 }
6359 else
6360 {
6361 arg22 = (PLINT *) LUA_get_int_num_array_var( L, 19, &temp22 );
6362 if ( !arg22 )
6363 SWIG_fail;
6364 if ( temp22 != Alen )
6365 {
6366 lua_pushfstring( L, "Tables must be of same length." );
6367 SWIG_fail;
6368 }
6369 }
6370 }
6371 }
6372 if(lua_gettop(L)>=20){
6373 {
6374 if ( lua_isnil( L, 20 ) )
6375 {
6376 arg23 = NULL;
6377 }
6378 else
6379 {
6380 arg23 = (PLFLT *) LUA_get_double_num_array_var( L, 20, &temp23 );
6381 if ( !arg23 )
6382 SWIG_fail;
6383 if ( temp23 != Alen )
6384 {
6385 lua_pushfstring( L, "Tables must be of same length." );
6386 SWIG_fail;
6387 }
6388 }
6389 }
6390 }
6391 if(lua_gettop(L)>=21){
6392 {
6393 if ( lua_isnil( L, 21 ) )
6394 {
6395 arg24 = NULL;
6396 }
6397 else
6398 {
6399 arg24 = (PLFLT *) LUA_get_double_num_array_var( L, 21, &temp24 );
6400 if ( !arg24 )
6401 SWIG_fail;
6402 if ( temp24 != Alen )
6403 {
6404 lua_pushfstring( L, "Tables must be of same length." );
6405 SWIG_fail;
6406 }
6407 }
6408 }
6409 }
6410 if(lua_gettop(L)>=22){
6411 {
6412 if ( lua_isnil( L, 22 ) )
6413 {
6414 arg25 = NULL;
6415 }
6416 else
6417 {
6418 arg25 = (PLINT *) LUA_get_int_num_array_var( L, 22, &temp25 );
6419 if ( !arg25 )
6420 SWIG_fail;
6421 if ( temp25 != Alen )
6422 {
6423 lua_pushfstring( L, "Tables must be of same length." );
6424 SWIG_fail;
6425 }
6426 }
6427 }
6428 }
6429 if(lua_gettop(L)>=23){
6430 {
6431 if ( lua_isnil( L, 23 ) )
6432 {
6433 arg26 = NULL;
6434 }
6435 else
6436 {
6437 arg26 = (PLINT *) LUA_get_int_num_array_var( L, 23, &temp26 );
6438 if ( !arg26 )
6439 SWIG_fail;
6440 if ( temp26 != Alen )
6441 {
6442 lua_pushfstring( L, "Tables must be of same length." );
6443 SWIG_fail;
6444 }
6445 }
6446 }
6447 }
6448 if(lua_gettop(L)>=24){
6449 {
6450 if ( lua_isnil( L, 24 ) )
6451 {
6452 arg27 = NULL;
6453 }
6454 else
6455 {
6456 arg27 = (PLFLT *) LUA_get_double_num_array_var( L, 24, &temp27 );
6457 if ( !arg27 )
6458 SWIG_fail;
6459 if ( temp27 != Alen )
6460 {
6461 lua_pushfstring( L, "Tables must be of same length." );
6462 SWIG_fail;
6463 }
6464 }
6465 }
6466 }
6467 if(lua_gettop(L)>=25){
6468 {
6469 if ( lua_isnil( L, 25 ) )
6470 {
6471 arg28 = NULL;
6472 }
6473 else
6474 {
6475 arg28 = (PLINT *) LUA_get_int_num_array_var( L, 25, &temp28 );
6476 if ( !arg28 )
6477 SWIG_fail;
6478 if ( temp28 != Alen )
6479 {
6480 lua_pushfstring( L, "Tables must be of same length." );
6481 SWIG_fail;
6482 }
6483 }
6484 }
6485 }
6486 if(lua_gettop(L)>=26){
6487 {
6488 if ( lua_isnil( L, 26 ) )
6489 {
6490 arg29 = NULL;
6491 }
6492 else
6493 {
6494 arg29 = (PLFLT *) LUA_get_double_num_array_var( L, 26, &temp29 );
6495 if ( !arg29 )
6496 SWIG_fail;
6497 if ( temp29 != Alen )
6498 {
6499 lua_pushfstring( L, "Tables must be of same length." );
6500 SWIG_fail;
6501 }
6502 }
6503 }
6504 }
6505 if(lua_gettop(L)>=27){
6506 {
6507 if ( lua_isnil( L, 27 ) )
6508 {
6509 arg30 = NULL;
6510 }
6511 else
6512 {
6513 arg30 = (PLINT *) LUA_get_int_num_array_var( L, 27, &temp30 );
6514 if ( !arg30 )
6515 SWIG_fail;
6516 if ( temp30 != Alen )
6517 {
6518 lua_pushfstring( L, "Tables must be of same length." );
6519 SWIG_fail;
6520 }
6521 }
6522 }
6523 }
6524 if(lua_gettop(L)>=28){
6525 {
6526 int i;
6527 arg31 = NULL;
6528
6529 if ( SWIG_table_size( L, 28 ) != Alen )
6530 {
6531 lua_pushfstring( L, "Tables must be of same length." );
6532 SWIG_fail;
6533 }
6534 arg31 = malloc( sizeof ( char* ) * Alen );
6535 for ( i = 1; i <= Alen; i++ )
6536 {
6537 lua_rawgeti( L, 28, i );
6538 if ( lua_isstring( L, -1 ) )
6539 {
6540 arg31[i - 1] = (char *) lua_tostring( L, -1 );
6541 }
6542 else
6543 {
6544 lua_pop( L, 1 );
6545 lua_pushfstring( L, "Requires a sequence of strings." );
6546 SWIG_fail;
6547 // arg31 array is freed after 'fail:'
6548 }
6549 lua_pop( L, 1 );
6550 }
6551 }
6552 }
6553 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);
6554
6555 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6556 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
6557 {
6558 LUA_FREE_ARRAY( arg14 );
6559 }
6560 {
6561 LUA_FREE_ARRAY( arg19 );
6562 }
6563 {
6564 if ( arg20 )
6565 {
6566 free( arg20 ); arg20 = NULL;
6567 }
6568 }
6569 {
6570 LUA_FREE_ARRAY( arg21 );
6571 }
6572 {
6573 LUA_FREE_ARRAY( arg22 );
6574 }
6575 {
6576 LUA_FREE_ARRAY( arg23 );
6577 }
6578 {
6579 LUA_FREE_ARRAY( arg24 );
6580 }
6581 {
6582 LUA_FREE_ARRAY( arg25 );
6583 }
6584 {
6585 LUA_FREE_ARRAY( arg26 );
6586 }
6587 {
6588 LUA_FREE_ARRAY( arg27 );
6589 }
6590 {
6591 LUA_FREE_ARRAY( arg28 );
6592 }
6593 {
6594 LUA_FREE_ARRAY( arg29 );
6595 }
6596 {
6597 LUA_FREE_ARRAY( arg30 );
6598 }
6599 {
6600 if ( arg31 )
6601 {
6602 free( arg31 ); arg31 = NULL;
6603 }
6604 }
6605 return SWIG_arg;
6606
6607 fail: SWIGUNUSED;
6608 {
6609 LUA_FREE_ARRAY( arg14 );
6610 }
6611 {
6612 LUA_FREE_ARRAY( arg19 );
6613 }
6614 {
6615 if ( arg20 )
6616 {
6617 free( arg20 ); arg20 = NULL;
6618 }
6619 }
6620 {
6621 LUA_FREE_ARRAY( arg21 );
6622 }
6623 {
6624 LUA_FREE_ARRAY( arg22 );
6625 }
6626 {
6627 LUA_FREE_ARRAY( arg23 );
6628 }
6629 {
6630 LUA_FREE_ARRAY( arg24 );
6631 }
6632 {
6633 LUA_FREE_ARRAY( arg25 );
6634 }
6635 {
6636 LUA_FREE_ARRAY( arg26 );
6637 }
6638 {
6639 LUA_FREE_ARRAY( arg27 );
6640 }
6641 {
6642 LUA_FREE_ARRAY( arg28 );
6643 }
6644 {
6645 LUA_FREE_ARRAY( arg29 );
6646 }
6647 {
6648 LUA_FREE_ARRAY( arg30 );
6649 }
6650 {
6651 if ( arg31 )
6652 {
6653 free( arg31 ); arg31 = NULL;
6654 }
6655 }
6656 lua_error(L);
6657 return 0;
6658}
6659
6660
6661static int _wrap_colorbar(lua_State* L) {
6662 int SWIG_arg = 0;
6663 PLFLT *arg1 = 0 ;
6664 PLFLT *arg2 = 0 ;
6665 PLINT arg3 ;
6666 PLINT arg4 ;
6667 PLFLT arg5 ;
6668 PLFLT arg6 ;
6669 PLFLT arg7 ;
6670 PLFLT arg8 ;
6671 PLINT arg9 ;
6672 PLINT arg10 ;
6673 PLINT arg11 ;
6674 PLFLT arg12 ;
6675 PLFLT arg13 ;
6676 PLINT arg14 ;
6677 PLFLT arg15 ;
6678 PLINT arg16 ;
6679 PLINT *arg17 = 0 ;
6680 char **arg18 = 0 ;
6681 PLINT arg19 ;
6682 char **arg20 = 0 ;
6683 PLFLT *arg21 = 0 ;
6684 PLINT *arg22 = 0 ;
6685 PLINT *arg23 = 0 ;
6686 PLFLT **arg24 = 0 ;
6687 PLFLT temp1 ;
6688 PLFLT temp2 ;
6689 int temp21 ;
6690 int temp22 ;
6691 int temp23 ;
6692 int ii24 ;
6693
6694 arg1 = &temp1;
6695 arg2 = &temp2;
6696 SWIG_check_num_args("plcolorbar",20,20)
6697 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcolorbar",1,"PLINT");
6698 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcolorbar",2,"PLINT");
6699 if(!lua_isnumber(L,3)) SWIG_fail_arg("plcolorbar",3,"PLFLT");
6700 if(!lua_isnumber(L,4)) SWIG_fail_arg("plcolorbar",4,"PLFLT");
6701 if(!lua_isnumber(L,5)) SWIG_fail_arg("plcolorbar",5,"PLFLT");
6702 if(!lua_isnumber(L,6)) SWIG_fail_arg("plcolorbar",6,"PLFLT");
6703 if(!lua_isnumber(L,7)) SWIG_fail_arg("plcolorbar",7,"PLINT");
6704 if(!lua_isnumber(L,8)) SWIG_fail_arg("plcolorbar",8,"PLINT");
6705 if(!lua_isnumber(L,9)) SWIG_fail_arg("plcolorbar",9,"PLINT");
6706 if(!lua_isnumber(L,10)) SWIG_fail_arg("plcolorbar",10,"PLFLT");
6707 if(!lua_isnumber(L,11)) SWIG_fail_arg("plcolorbar",11,"PLFLT");
6708 if(!lua_isnumber(L,12)) SWIG_fail_arg("plcolorbar",12,"PLINT");
6709 if(!lua_isnumber(L,13)) SWIG_fail_arg("plcolorbar",13,"PLFLT");
6710 if(!lua_istable(L,15)) SWIG_fail_arg("plcolorbar",15,"char const **");
6711 arg3 = (PLINT)lua_tonumber(L, 1);
6712 arg4 = (PLINT)lua_tonumber(L, 2);
6713 arg5 = (PLFLT)lua_tonumber(L, 3);
6714 arg6 = (PLFLT)lua_tonumber(L, 4);
6715 arg7 = (PLFLT)lua_tonumber(L, 5);
6716 arg8 = (PLFLT)lua_tonumber(L, 6);
6717 arg9 = (PLINT)lua_tonumber(L, 7);
6718 arg10 = (PLINT)lua_tonumber(L, 8);
6719 arg11 = (PLINT)lua_tonumber(L, 9);
6720 arg12 = (PLFLT)lua_tonumber(L, 10);
6721 arg13 = (PLFLT)lua_tonumber(L, 11);
6722 arg14 = (PLINT)lua_tonumber(L, 12);
6723 arg15 = (PLFLT)lua_tonumber(L, 13);
6724 {
6725 arg17 = (PLINT *) LUA_get_int_num_array_var( L, 14, &arg16 );
6726 if ( !arg17 )
6727 SWIG_fail;
6728 Alen = arg16;
6729 }
6730 {
6731 int i;
6732 arg18 = NULL;
6733
6734 if ( SWIG_table_size( L, 15 ) != Alen )
6735 {
6736 lua_pushfstring( L, "Tables must be of same length." );
6737 SWIG_fail;
6738 }
6739 arg18 = malloc( sizeof ( char* ) * Alen );
6740 for ( i = 1; i <= Alen; i++ )
6741 {
6742 lua_rawgeti( L, 15, i );
6743 if ( lua_isstring( L, -1 ) )
6744 {
6745 arg18[i - 1] = (char *) lua_tostring( L, -1 );
6746 }
6747 else
6748 {
6749 lua_pop( L, 1 );
6750 lua_pushfstring( L, "Requires a sequence of strings." );
6751 SWIG_fail;
6752 // arg18 array is freed after 'fail:'
6753 }
6754 lua_pop( L, 1 );
6755 }
6756 }
6757 {
6758 int i;
6759 arg19 = SWIG_table_size( L, 16 );
6760 Alen = arg19;
6761
6762 arg20 = malloc( sizeof ( char* ) * Alen );
6763 for ( i = 1; i <= Alen; i++ )
6764 {
6765 lua_rawgeti( L, 16, i );
6766 if ( lua_isstring( L, -1 ) )
6767 {
6768 arg20[i - 1] = (char *) lua_tostring( L, -1 );
6769 }
6770 else
6771 {
6772 lua_pop( L, 1 );
6773 lua_pushfstring( L, "Requires a sequence of strings." );
6774 SWIG_fail;
6775 }
6776 lua_pop( L, 1 );
6777 }
6778 }
6779 {
6780 arg21 = (PLFLT *) LUA_get_double_num_array_var( L, 17, &temp21 );
6781 if ( !arg21 )
6782 SWIG_fail;
6783 if ( temp21 != Alen )
6784 {
6785 lua_pushfstring( L, "Tables must be of same length." );
6786 SWIG_fail;
6787 }
6788 }
6789 {
6790 arg22 = (PLINT *) LUA_get_int_num_array_var( L, 18, &temp22 );
6791 if ( !arg22 )
6792 SWIG_fail;
6793 if ( temp22 != Alen )
6794 {
6795 lua_pushfstring( L, "Tables must be of same length." );
6796 SWIG_fail;
6797 }
6798 }
6799 {
6800 int i;
6801
6802 arg23 = (PLINT *) LUA_get_int_num_array_var( L, 19, &temp23 );
6803 if ( !arg23 )
6804 SWIG_fail;
6805 if ( temp23 != Alen )
6806 {
6807 lua_pushfstring( L, "Tables must be of same length." );
6808 SWIG_fail;
6809 }
6810
6811 Xlen = temp23;
6812 Ylen = -1;
6813 for ( i = 0; i < Xlen; i++ )
6814 if ( arg23[i] > Ylen )
6815 Ylen = arg23[i];
6816 }
6817 {
6818 int jj;
6819
6820 arg24 = read_double_Matrix( L, 20, &ii24, &jj );
6821 if ( !arg24 )
6822 SWIG_fail;
6823 if ( ( ii24 != Xlen ) || ( jj != Ylen ) )
6824 {
6825 lua_pushfstring( L, "Vectors must match matrix." );
6826 SWIG_fail;
6827 }
6828 }
6829 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);
6830
6831 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6832 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
6833 {
6834 LUA_FREE_ARRAY( arg17 );
6835 }
6836 {
6837 if ( arg18 )
6838 {
6839 free( arg18 ); arg18 = NULL;
6840 }
6841 }
6842 {
6843 if ( arg20 )
6844 {
6845 free( arg20 ); arg20 = NULL;
6846 }
6847 }
6848 {
6849 LUA_FREE_ARRAY( arg21 );
6850 }
6851 {
6852 LUA_FREE_ARRAY( arg22 );
6853 }
6854 {
6855 LUA_FREE_ARRAY( arg23 );
6856 }
6857 {
6858 int i;
6859
6860 if ( arg24 )
6861 {
6862 for ( i = 0; i < ii24; i++ )
6863 LUA_FREE_ARRAY( arg24[i] );
6864 LUA_FREE_ARRAY( arg24 );
6865 }
6866 }
6867 return SWIG_arg;
6868
6869 fail: SWIGUNUSED;
6870 {
6871 LUA_FREE_ARRAY( arg17 );
6872 }
6873 {
6874 if ( arg18 )
6875 {
6876 free( arg18 ); arg18 = NULL;
6877 }
6878 }
6879 {
6880 if ( arg20 )
6881 {
6882 free( arg20 ); arg20 = NULL;
6883 }
6884 }
6885 {
6886 LUA_FREE_ARRAY( arg21 );
6887 }
6888 {
6889 LUA_FREE_ARRAY( arg22 );
6890 }
6891 {
6892 LUA_FREE_ARRAY( arg23 );
6893 }
6894 {
6895 int i;
6896
6897 if ( arg24 )
6898 {
6899 for ( i = 0; i < ii24; i++ )
6900 LUA_FREE_ARRAY( arg24[i] );
6901 LUA_FREE_ARRAY( arg24 );
6902 }
6903 }
6904 lua_error(L);
6905 return 0;
6906}
6907
6908
6909static int _wrap_lightsource(lua_State* L) {
6910 int SWIG_arg = 0;
6911 PLFLT arg1 ;
6912 PLFLT arg2 ;
6913 PLFLT arg3 ;
6914
6915 SWIG_check_num_args("pllightsource",3,3)
6916 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllightsource",1,"PLFLT");
6917 if(!lua_isnumber(L,2)) SWIG_fail_arg("pllightsource",2,"PLFLT");
6918 if(!lua_isnumber(L,3)) SWIG_fail_arg("pllightsource",3,"PLFLT");
6919 arg1 = (PLFLT)lua_tonumber(L, 1);
6920 arg2 = (PLFLT)lua_tonumber(L, 2);
6921 arg3 = (PLFLT)lua_tonumber(L, 3);
6922 pllightsource(arg1,arg2,arg3);
6923
6924 return SWIG_arg;
6925
6926 fail: SWIGUNUSED;
6927 lua_error(L);
6928 return 0;
6929}
6930
6931
6932static int _wrap_line(lua_State* L) {
6933 int SWIG_arg = 0;
6934 PLINT arg1 ;
6935 PLFLT *arg2 = 0 ;
6936 PLFLT *arg3 = 0 ;
6937 int temp3 ;
6938
6939 SWIG_check_num_args("plline",2,2)
6940 {
6941 int temp;
6942 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6943 if ( !arg2 )
6944 SWIG_fail;
6945 arg1 = Alen = temp;
6946 }
6947 {
6948 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
6949 if ( !arg3 )
6950 SWIG_fail;
6951 if ( temp3 != Alen )
6952 {
6953 lua_pushfstring( L, "Tables must be of same length." );
6954 SWIG_fail;
6955 }
6956 }
6957 plline(arg1,(double const *)arg2,(double const *)arg3);
6958
6959 {
6960 LUA_FREE_ARRAY( arg2 );
6961 }
6962 {
6963 LUA_FREE_ARRAY( arg3 );
6964 }
6965 return SWIG_arg;
6966
6967 fail: SWIGUNUSED;
6968 {
6969 LUA_FREE_ARRAY( arg2 );
6970 }
6971 {
6972 LUA_FREE_ARRAY( arg3 );
6973 }
6974 lua_error(L);
6975 return 0;
6976}
6977
6978
6979static int _wrap_line3(lua_State* L) {
6980 int SWIG_arg = 0;
6981 PLINT arg1 ;
6982 PLFLT *arg2 = 0 ;
6983 PLFLT *arg3 = 0 ;
6984 PLFLT *arg4 = 0 ;
6985 int temp3 ;
6986 int temp4 ;
6987
6988 SWIG_check_num_args("plline3",3,3)
6989 {
6990 int temp;
6991 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6992 if ( !arg2 )
6993 SWIG_fail;
6994 arg1 = Alen = temp;
6995 }
6996 {
6997 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
6998 if ( !arg3 )
6999 SWIG_fail;
7000 if ( temp3 != Alen )
7001 {
7002 lua_pushfstring( L, "Tables must be of same length." );
7003 SWIG_fail;
7004 }
7005 }
7006 {
7007 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
7008 if ( !arg4 )
7009 SWIG_fail;
7010 if ( temp4 != Alen )
7011 {
7012 lua_pushfstring( L, "Tables must be of same length." );
7013 SWIG_fail;
7014 }
7015 }
7016 plline3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
7017
7018 {
7019 LUA_FREE_ARRAY( arg2 );
7020 }
7021 {
7022 LUA_FREE_ARRAY( arg3 );
7023 }
7024 {
7025 LUA_FREE_ARRAY( arg4 );
7026 }
7027 return SWIG_arg;
7028
7029 fail: SWIGUNUSED;
7030 {
7031 LUA_FREE_ARRAY( arg2 );
7032 }
7033 {
7034 LUA_FREE_ARRAY( arg3 );
7035 }
7036 {
7037 LUA_FREE_ARRAY( arg4 );
7038 }
7039 lua_error(L);
7040 return 0;
7041}
7042
7043
7044static int _wrap_lsty(lua_State* L) {
7045 int SWIG_arg = 0;
7046 PLINT arg1 ;
7047
7048 SWIG_check_num_args("pllsty",1,1)
7049 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllsty",1,"PLINT");
7050 arg1 = (PLINT)lua_tonumber(L, 1);
7051 pllsty(arg1);
7052
7053 return SWIG_arg;
7054
7055 fail: SWIGUNUSED;
7056 lua_error(L);
7057 return 0;
7058}
7059
7060
7061static int _wrap_mesh(lua_State* L) {
7062 int SWIG_arg = 0;
7063 PLFLT *arg1 = 0 ;
7064 PLFLT *arg2 = 0 ;
7065 PLFLT **arg3 = 0 ;
7066 PLINT arg4 ;
7067 PLINT arg5 ;
7068 PLINT arg6 ;
7069 int ii3 ;
7070
7071 SWIG_check_num_args("plmesh",4,4)
7072 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmesh",4,"PLINT");
7073 {
7074 int temp;
7075 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7076 if ( !arg1 )
7077 SWIG_fail;
7078 Xlen = temp;
7079 }
7080 {
7081 int temp;
7082 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7083 if ( !arg2 )
7084 SWIG_fail;
7085 Ylen = temp;
7086 }
7087 {
7088 int jj;
7089
7090 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7091 if ( !arg3 )
7092 SWIG_fail;
7093 arg4 = ii3;
7094 arg5 = jj;
7095 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7096 {
7097 lua_pushfstring( L, "Vectors must match matrix." );
7098 SWIG_fail;
7099 }
7100 }
7101 arg6 = (PLINT)lua_tonumber(L, 4);
7102 plmesh((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6);
7103
7104 {
7105 LUA_FREE_ARRAY( arg1 );
7106 }
7107 {
7108 LUA_FREE_ARRAY( arg2 );
7109 }
7110 {
7111 int i;
7112
7113 if ( arg3 )
7114 {
7115 for ( i = 0; i < ii3; i++ )
7116 LUA_FREE_ARRAY( arg3[i] );
7117 LUA_FREE_ARRAY( arg3 );
7118 }
7119 }
7120 return SWIG_arg;
7121
7122 fail: SWIGUNUSED;
7123 {
7124 LUA_FREE_ARRAY( arg1 );
7125 }
7126 {
7127 LUA_FREE_ARRAY( arg2 );
7128 }
7129 {
7130 int i;
7131
7132 if ( arg3 )
7133 {
7134 for ( i = 0; i < ii3; i++ )
7135 LUA_FREE_ARRAY( arg3[i] );
7136 LUA_FREE_ARRAY( arg3 );
7137 }
7138 }
7139 lua_error(L);
7140 return 0;
7141}
7142
7143
7144static int _wrap_meshc(lua_State* L) {
7145 int SWIG_arg = 0;
7146 PLFLT *arg1 = 0 ;
7147 PLFLT *arg2 = 0 ;
7148 PLFLT **arg3 = 0 ;
7149 PLINT arg4 ;
7150 PLINT arg5 ;
7151 PLINT arg6 ;
7152 PLFLT *arg7 = 0 ;
7153 PLINT arg8 ;
7154 int ii3 ;
7155
7156 SWIG_check_num_args("plmeshc",5,5)
7157 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmeshc",4,"PLINT");
7158 {
7159 int temp;
7160 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7161 if ( !arg1 )
7162 SWIG_fail;
7163 Xlen = temp;
7164 }
7165 {
7166 int temp;
7167 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7168 if ( !arg2 )
7169 SWIG_fail;
7170 Ylen = temp;
7171 }
7172 {
7173 int jj;
7174
7175 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7176 if ( !arg3 )
7177 SWIG_fail;
7178 arg4 = ii3;
7179 arg5 = jj;
7180 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7181 {
7182 lua_pushfstring( L, "Vectors must match matrix." );
7183 SWIG_fail;
7184 }
7185 }
7186 arg6 = (PLINT)lua_tonumber(L, 4);
7187 {
7188 int temp;
7189 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7190 if ( !arg7 )
7191 SWIG_fail;
7192 arg8 = Alen = temp;
7193 }
7194 plmeshc((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7195
7196 {
7197 LUA_FREE_ARRAY( arg1 );
7198 }
7199 {
7200 LUA_FREE_ARRAY( arg2 );
7201 }
7202 {
7203 int i;
7204
7205 if ( arg3 )
7206 {
7207 for ( i = 0; i < ii3; i++ )
7208 LUA_FREE_ARRAY( arg3[i] );
7209 LUA_FREE_ARRAY( arg3 );
7210 }
7211 }
7212 {
7213 LUA_FREE_ARRAY( arg7 );
7214 }
7215 return SWIG_arg;
7216
7217 fail: SWIGUNUSED;
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 {
7235 LUA_FREE_ARRAY( arg7 );
7236 }
7237 lua_error(L);
7238 return 0;
7239}
7240
7241
7242static int _wrap_mkstrm(lua_State* L) {
7243 int SWIG_arg = 0;
7244 PLINT *arg1 = 0 ;
7245 PLINT temp1 ;
7246
7247 arg1 = &temp1;
7248 SWIG_check_num_args("plmkstrm",0,0)
7249 plmkstrm(arg1);
7250
7251 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
7252 return SWIG_arg;
7253
7254 fail: SWIGUNUSED;
7255 lua_error(L);
7256 return 0;
7257}
7258
7259
7260static int _wrap_mtex(lua_State* L) {
7261 int SWIG_arg = 0;
7262 char *arg1 = 0 ;
7263 PLFLT arg2 ;
7264 PLFLT arg3 ;
7265 PLFLT arg4 ;
7266 char *arg5 = 0 ;
7267
7268 SWIG_check_num_args("plmtex",5,5)
7269 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plmtex",1,"char const *");
7270 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmtex",2,"PLFLT");
7271 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmtex",3,"PLFLT");
7272 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmtex",4,"PLFLT");
7273 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plmtex",5,"char const *");
7274 arg1 = (char *)lua_tostring(L, 1);
7275 arg2 = (PLFLT)lua_tonumber(L, 2);
7276 arg3 = (PLFLT)lua_tonumber(L, 3);
7277 arg4 = (PLFLT)lua_tonumber(L, 4);
7278 arg5 = (char *)lua_tostring(L, 5);
7279 plmtex((char const *)arg1,arg2,arg3,arg4,(char const *)arg5);
7280
7281 return SWIG_arg;
7282
7283 fail: SWIGUNUSED;
7284 lua_error(L);
7285 return 0;
7286}
7287
7288
7289static int _wrap_mtex3(lua_State* L) {
7290 int SWIG_arg = 0;
7291 char *arg1 = 0 ;
7292 PLFLT arg2 ;
7293 PLFLT arg3 ;
7294 PLFLT arg4 ;
7295 char *arg5 = 0 ;
7296
7297 SWIG_check_num_args("plmtex3",5,5)
7298 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plmtex3",1,"char const *");
7299 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmtex3",2,"PLFLT");
7300 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmtex3",3,"PLFLT");
7301 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmtex3",4,"PLFLT");
7302 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plmtex3",5,"char const *");
7303 arg1 = (char *)lua_tostring(L, 1);
7304 arg2 = (PLFLT)lua_tonumber(L, 2);
7305 arg3 = (PLFLT)lua_tonumber(L, 3);
7306 arg4 = (PLFLT)lua_tonumber(L, 4);
7307 arg5 = (char *)lua_tostring(L, 5);
7308 plmtex3((char const *)arg1,arg2,arg3,arg4,(char const *)arg5);
7309
7310 return SWIG_arg;
7311
7312 fail: SWIGUNUSED;
7313 lua_error(L);
7314 return 0;
7315}
7316
7317
7318static int _wrap_plot3d(lua_State* L) {
7319 int SWIG_arg = 0;
7320 PLFLT *arg1 = 0 ;
7321 PLFLT *arg2 = 0 ;
7322 PLFLT **arg3 = 0 ;
7323 PLINT arg4 ;
7324 PLINT arg5 ;
7325 PLINT arg6 ;
7326 PLBOOL arg7 ;
7327 int ii3 ;
7328
7329 SWIG_check_num_args("plot3d",5,5)
7330 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3d",4,"PLINT");
7331 if(!lua_isnumber(L,5)) SWIG_fail_arg("plot3d",5,"PLBOOL");
7332 {
7333 int temp;
7334 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7335 if ( !arg1 )
7336 SWIG_fail;
7337 Xlen = temp;
7338 }
7339 {
7340 int temp;
7341 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7342 if ( !arg2 )
7343 SWIG_fail;
7344 Ylen = temp;
7345 }
7346 {
7347 int jj;
7348
7349 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7350 if ( !arg3 )
7351 SWIG_fail;
7352 arg4 = ii3;
7353 arg5 = jj;
7354 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7355 {
7356 lua_pushfstring( L, "Vectors must match matrix." );
7357 SWIG_fail;
7358 }
7359 }
7360 arg6 = (PLINT)lua_tonumber(L, 4);
7361 arg7 = (PLBOOL)lua_tonumber(L, 5);
7362 plot3d((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,arg7);
7363
7364 {
7365 LUA_FREE_ARRAY( arg1 );
7366 }
7367 {
7368 LUA_FREE_ARRAY( arg2 );
7369 }
7370 {
7371 int i;
7372
7373 if ( arg3 )
7374 {
7375 for ( i = 0; i < ii3; i++ )
7376 LUA_FREE_ARRAY( arg3[i] );
7377 LUA_FREE_ARRAY( arg3 );
7378 }
7379 }
7380 return SWIG_arg;
7381
7382 fail: SWIGUNUSED;
7383 {
7384 LUA_FREE_ARRAY( arg1 );
7385 }
7386 {
7387 LUA_FREE_ARRAY( arg2 );
7388 }
7389 {
7390 int i;
7391
7392 if ( arg3 )
7393 {
7394 for ( i = 0; i < ii3; i++ )
7395 LUA_FREE_ARRAY( arg3[i] );
7396 LUA_FREE_ARRAY( arg3 );
7397 }
7398 }
7399 lua_error(L);
7400 return 0;
7401}
7402
7403
7404static int _wrap_plot3dc(lua_State* L) {
7405 int SWIG_arg = 0;
7406 PLFLT *arg1 = 0 ;
7407 PLFLT *arg2 = 0 ;
7408 PLFLT **arg3 = 0 ;
7409 PLINT arg4 ;
7410 PLINT arg5 ;
7411 PLINT arg6 ;
7412 PLFLT *arg7 = 0 ;
7413 PLINT arg8 ;
7414 int ii3 ;
7415
7416 SWIG_check_num_args("plot3dc",5,5)
7417 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3dc",4,"PLINT");
7418 {
7419 int temp;
7420 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7421 if ( !arg1 )
7422 SWIG_fail;
7423 Xlen = temp;
7424 }
7425 {
7426 int temp;
7427 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7428 if ( !arg2 )
7429 SWIG_fail;
7430 Ylen = temp;
7431 }
7432 {
7433 int jj;
7434
7435 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7436 if ( !arg3 )
7437 SWIG_fail;
7438 arg4 = ii3;
7439 arg5 = jj;
7440 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7441 {
7442 lua_pushfstring( L, "Vectors must match matrix." );
7443 SWIG_fail;
7444 }
7445 }
7446 arg6 = (PLINT)lua_tonumber(L, 4);
7447 {
7448 int temp;
7449 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7450 if ( !arg7 )
7451 SWIG_fail;
7452 arg8 = Alen = temp;
7453 }
7454 plot3dc((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7455
7456 {
7457 LUA_FREE_ARRAY( arg1 );
7458 }
7459 {
7460 LUA_FREE_ARRAY( arg2 );
7461 }
7462 {
7463 int i;
7464
7465 if ( arg3 )
7466 {
7467 for ( i = 0; i < ii3; i++ )
7468 LUA_FREE_ARRAY( arg3[i] );
7469 LUA_FREE_ARRAY( arg3 );
7470 }
7471 }
7472 {
7473 LUA_FREE_ARRAY( arg7 );
7474 }
7475 return SWIG_arg;
7476
7477 fail: SWIGUNUSED;
7478 {
7479 LUA_FREE_ARRAY( arg1 );
7480 }
7481 {
7482 LUA_FREE_ARRAY( arg2 );
7483 }
7484 {
7485 int i;
7486
7487 if ( arg3 )
7488 {
7489 for ( i = 0; i < ii3; i++ )
7490 LUA_FREE_ARRAY( arg3[i] );
7491 LUA_FREE_ARRAY( arg3 );
7492 }
7493 }
7494 {
7495 LUA_FREE_ARRAY( arg7 );
7496 }
7497 lua_error(L);
7498 return 0;
7499}
7500
7501
7502static int _wrap_plot3dcl(lua_State* L) {
7503 int SWIG_arg = 0;
7504 PLFLT *arg1 = 0 ;
7505 PLFLT *arg2 = 0 ;
7506 PLFLT **arg3 = 0 ;
7507 PLINT arg4 ;
7508 PLINT arg5 ;
7509 PLINT arg6 ;
7510 PLFLT *arg7 = 0 ;
7511 PLINT arg8 ;
7512 PLINT arg9 ;
7513 PLINT arg10 ;
7514 PLINT *arg11 = 0 ;
7515 PLINT *arg12 = 0 ;
7516 int ii3 ;
7517 int temp12 ;
7518
7519 SWIG_check_num_args("plot3dcl",8,8)
7520 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3dcl",4,"PLINT");
7521 if(!lua_isnumber(L,6)) SWIG_fail_arg("plot3dcl",6,"PLINT");
7522 {
7523 int temp;
7524 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7525 if ( !arg1 )
7526 SWIG_fail;
7527 Xlen = temp;
7528 }
7529 {
7530 int temp;
7531 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7532 if ( !arg2 )
7533 SWIG_fail;
7534 Ylen = temp;
7535 }
7536 {
7537 int jj;
7538
7539 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7540 if ( !arg3 )
7541 SWIG_fail;
7542 arg4 = ii3;
7543 arg5 = jj;
7544 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7545 {
7546 lua_pushfstring( L, "Vectors must match matrix." );
7547 SWIG_fail;
7548 }
7549 }
7550 arg6 = (PLINT)lua_tonumber(L, 4);
7551 {
7552 int temp;
7553 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7554 if ( !arg7 )
7555 SWIG_fail;
7556 arg8 = Alen = temp;
7557 }
7558 arg9 = (PLINT)lua_tonumber(L, 6);
7559 {
7560 arg11 = (PLINT *) LUA_get_int_num_array_var( L, 7, &arg10 );
7561 if ( !arg11 )
7562 SWIG_fail;
7563 Alen = arg10;
7564 }
7565 {
7566 arg12 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp12 );
7567 if ( !arg12 )
7568 SWIG_fail;
7569 if ( temp12 != Alen )
7570 {
7571 lua_pushfstring( L, "Tables must be of same length." );
7572 SWIG_fail;
7573 }
7574 }
7575 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);
7576
7577 {
7578 LUA_FREE_ARRAY( arg1 );
7579 }
7580 {
7581 LUA_FREE_ARRAY( arg2 );
7582 }
7583 {
7584 int i;
7585
7586 if ( arg3 )
7587 {
7588 for ( i = 0; i < ii3; i++ )
7589 LUA_FREE_ARRAY( arg3[i] );
7590 LUA_FREE_ARRAY( arg3 );
7591 }
7592 }
7593 {
7594 LUA_FREE_ARRAY( arg7 );
7595 }
7596 {
7597 LUA_FREE_ARRAY( arg11 );
7598 }
7599 {
7600 LUA_FREE_ARRAY( arg12 );
7601 }
7602 return SWIG_arg;
7603
7604 fail: SWIGUNUSED;
7605 {
7606 LUA_FREE_ARRAY( arg1 );
7607 }
7608 {
7609 LUA_FREE_ARRAY( arg2 );
7610 }
7611 {
7612 int i;
7613
7614 if ( arg3 )
7615 {
7616 for ( i = 0; i < ii3; i++ )
7617 LUA_FREE_ARRAY( arg3[i] );
7618 LUA_FREE_ARRAY( arg3 );
7619 }
7620 }
7621 {
7622 LUA_FREE_ARRAY( arg7 );
7623 }
7624 {
7625 LUA_FREE_ARRAY( arg11 );
7626 }
7627 {
7628 LUA_FREE_ARRAY( arg12 );
7629 }
7630 lua_error(L);
7631 return 0;
7632}
7633
7634
7635static int _wrap_surf3d(lua_State* L) {
7636 int SWIG_arg = 0;
7637 PLFLT *arg1 = 0 ;
7638 PLFLT *arg2 = 0 ;
7639 PLFLT **arg3 = 0 ;
7640 PLINT arg4 ;
7641 PLINT arg5 ;
7642 PLINT arg6 ;
7643 PLFLT *arg7 = 0 ;
7644 PLINT arg8 ;
7645 int ii3 ;
7646
7647 SWIG_check_num_args("plsurf3d",5,5)
7648 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsurf3d",4,"PLINT");
7649 {
7650 int temp;
7651 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7652 if ( !arg1 )
7653 SWIG_fail;
7654 Xlen = temp;
7655 }
7656 {
7657 int temp;
7658 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7659 if ( !arg2 )
7660 SWIG_fail;
7661 Ylen = temp;
7662 }
7663 {
7664 int jj;
7665
7666 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7667 if ( !arg3 )
7668 SWIG_fail;
7669 arg4 = ii3;
7670 arg5 = jj;
7671 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7672 {
7673 lua_pushfstring( L, "Vectors must match matrix." );
7674 SWIG_fail;
7675 }
7676 }
7677 arg6 = (PLINT)lua_tonumber(L, 4);
7678 {
7679 int temp;
7680 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7681 if ( !arg7 )
7682 SWIG_fail;
7683 arg8 = Alen = temp;
7684 }
7685 plsurf3d((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7686
7687 {
7688 LUA_FREE_ARRAY( arg1 );
7689 }
7690 {
7691 LUA_FREE_ARRAY( arg2 );
7692 }
7693 {
7694 int i;
7695
7696 if ( arg3 )
7697 {
7698 for ( i = 0; i < ii3; i++ )
7699 LUA_FREE_ARRAY( arg3[i] );
7700 LUA_FREE_ARRAY( arg3 );
7701 }
7702 }
7703 {
7704 LUA_FREE_ARRAY( arg7 );
7705 }
7706 return SWIG_arg;
7707
7708 fail: SWIGUNUSED;
7709 {
7710 LUA_FREE_ARRAY( arg1 );
7711 }
7712 {
7713 LUA_FREE_ARRAY( arg2 );
7714 }
7715 {
7716 int i;
7717
7718 if ( arg3 )
7719 {
7720 for ( i = 0; i < ii3; i++ )
7721 LUA_FREE_ARRAY( arg3[i] );
7722 LUA_FREE_ARRAY( arg3 );
7723 }
7724 }
7725 {
7726 LUA_FREE_ARRAY( arg7 );
7727 }
7728 lua_error(L);
7729 return 0;
7730}
7731
7732
7733static int _wrap_surf3dl(lua_State* L) {
7734 int SWIG_arg = 0;
7735 PLFLT *arg1 = 0 ;
7736 PLFLT *arg2 = 0 ;
7737 PLFLT **arg3 = 0 ;
7738 PLINT arg4 ;
7739 PLINT arg5 ;
7740 PLINT arg6 ;
7741 PLFLT *arg7 = 0 ;
7742 PLINT arg8 ;
7743 PLINT arg9 ;
7744 PLINT arg10 ;
7745 PLINT *arg11 = 0 ;
7746 PLINT *arg12 = 0 ;
7747 int ii3 ;
7748 int temp12 ;
7749
7750 SWIG_check_num_args("plsurf3dl",8,8)
7751 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsurf3dl",4,"PLINT");
7752 if(!lua_isnumber(L,6)) SWIG_fail_arg("plsurf3dl",6,"PLINT");
7753 {
7754 int temp;
7755 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7756 if ( !arg1 )
7757 SWIG_fail;
7758 Xlen = temp;
7759 }
7760 {
7761 int temp;
7762 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7763 if ( !arg2 )
7764 SWIG_fail;
7765 Ylen = temp;
7766 }
7767 {
7768 int jj;
7769
7770 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7771 if ( !arg3 )
7772 SWIG_fail;
7773 arg4 = ii3;
7774 arg5 = jj;
7775 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7776 {
7777 lua_pushfstring( L, "Vectors must match matrix." );
7778 SWIG_fail;
7779 }
7780 }
7781 arg6 = (PLINT)lua_tonumber(L, 4);
7782 {
7783 int temp;
7784 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7785 if ( !arg7 )
7786 SWIG_fail;
7787 arg8 = Alen = temp;
7788 }
7789 arg9 = (PLINT)lua_tonumber(L, 6);
7790 {
7791 arg11 = (PLINT *) LUA_get_int_num_array_var( L, 7, &arg10 );
7792 if ( !arg11 )
7793 SWIG_fail;
7794 Alen = arg10;
7795 }
7796 {
7797 arg12 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp12 );
7798 if ( !arg12 )
7799 SWIG_fail;
7800 if ( temp12 != Alen )
7801 {
7802 lua_pushfstring( L, "Tables must be of same length." );
7803 SWIG_fail;
7804 }
7805 }
7806 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);
7807
7808 {
7809 LUA_FREE_ARRAY( arg1 );
7810 }
7811 {
7812 LUA_FREE_ARRAY( arg2 );
7813 }
7814 {
7815 int i;
7816
7817 if ( arg3 )
7818 {
7819 for ( i = 0; i < ii3; i++ )
7820 LUA_FREE_ARRAY( arg3[i] );
7821 LUA_FREE_ARRAY( arg3 );
7822 }
7823 }
7824 {
7825 LUA_FREE_ARRAY( arg7 );
7826 }
7827 {
7828 LUA_FREE_ARRAY( arg11 );
7829 }
7830 {
7831 LUA_FREE_ARRAY( arg12 );
7832 }
7833 return SWIG_arg;
7834
7835 fail: SWIGUNUSED;
7836 {
7837 LUA_FREE_ARRAY( arg1 );
7838 }
7839 {
7840 LUA_FREE_ARRAY( arg2 );
7841 }
7842 {
7843 int i;
7844
7845 if ( arg3 )
7846 {
7847 for ( i = 0; i < ii3; i++ )
7848 LUA_FREE_ARRAY( arg3[i] );
7849 LUA_FREE_ARRAY( arg3 );
7850 }
7851 }
7852 {
7853 LUA_FREE_ARRAY( arg7 );
7854 }
7855 {
7856 LUA_FREE_ARRAY( arg11 );
7857 }
7858 {
7859 LUA_FREE_ARRAY( arg12 );
7860 }
7861 lua_error(L);
7862 return 0;
7863}
7864
7865
7866static int _wrap_parseopts(lua_State* L) {
7867 int SWIG_arg = 0;
7868 int *arg1 = 0 ;
7869 char **arg2 = 0 ;
7870 PLINT arg3 ;
7871 PLINT result;
7872
7873 SWIG_check_num_args("plparseopts",2,2)
7874 if(!lua_istable(L,1)) SWIG_fail_arg("plparseopts",1,"int *");
7875 if(!lua_isnumber(L,2)) SWIG_fail_arg("plparseopts",2,"PLINT");
7876 {
7877 int i, n;
7878
7879 // from lua 5.1 on there is no element "n" anymore,
7880 // so we need to find out the number of command line
7881 // options manually
7882 for ( i = 1;; i++ )
7883 {
7884 lua_rawgeti( L, 1, i );
7885 if ( lua_isnil( L, -1 ) )
7886 {
7887 // ok, this index doesn't exist anymore, we have i-1
7888 // command line options
7889 lua_pop( L, 1 );
7890 break;
7891 }
7892 }
7893 n = i;
7894 arg1 = &n;
7895
7896 arg2 = LUA_ALLOC_ARRAY( char*, ( n + 1 ) );
7897
7898 for ( i = 0; i < n; i++ )
7899 {
7900 lua_rawgeti( L, 1, i );
7901 if ( lua_isstring( L, -1 ) )
7902 {
7903 arg2[i] = (char *) lua_tostring( L, -1 );
7904 }
7905 else
7906 {
7907 lua_pop( L, 1 );
7908 lua_pushfstring( L, "List items must be strings" );
7909 SWIG_fail;
7910 // arg2 array is freed after 'fail:'
7911 }
7912 lua_pop( L, 1 );
7913 }
7914 arg2[n] = NULL;
7915 }
7916 arg3 = (PLINT)lua_tonumber(L, 2);
7917 result = (PLINT)plparseopts(arg1,arg2,arg3);
7918 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
7919 {
7920 LUA_FREE_ARRAY( arg2 );
7921 }
7922 return SWIG_arg;
7923
7924 fail: SWIGUNUSED;
7925 {
7926 LUA_FREE_ARRAY( arg2 );
7927 }
7928 lua_error(L);
7929 return 0;
7930}
7931
7932
7933static int _wrap_pat(lua_State* L) {
7934 int SWIG_arg = 0;
7935 PLINT arg1 ;
7936 PLINT *arg2 = 0 ;
7937 PLINT *arg3 = 0 ;
7938 int temp3 ;
7939
7940 SWIG_check_num_args("plpat",2,2)
7941 {
7942 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 1, &arg1 );
7943 if ( !arg2 )
7944 SWIG_fail;
7945 Alen = arg1;
7946 }
7947 {
7948 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp3 );
7949 if ( !arg3 )
7950 SWIG_fail;
7951 if ( temp3 != Alen )
7952 {
7953 lua_pushfstring( L, "Tables must be of same length." );
7954 SWIG_fail;
7955 }
7956 }
7957 plpat(arg1,(int const *)arg2,(int const *)arg3);
7958
7959 {
7960 LUA_FREE_ARRAY( arg2 );
7961 }
7962 {
7963 LUA_FREE_ARRAY( arg3 );
7964 }
7965 return SWIG_arg;
7966
7967 fail: SWIGUNUSED;
7968 {
7969 LUA_FREE_ARRAY( arg2 );
7970 }
7971 {
7972 LUA_FREE_ARRAY( arg3 );
7973 }
7974 lua_error(L);
7975 return 0;
7976}
7977
7978
7979static int _wrap_path(lua_State* L) {
7980 int SWIG_arg = 0;
7981 PLINT arg1 ;
7982 PLFLT arg2 ;
7983 PLFLT arg3 ;
7984 PLFLT arg4 ;
7985 PLFLT arg5 ;
7986
7987 SWIG_check_num_args("plpath",5,5)
7988 if(!lua_isnumber(L,1)) SWIG_fail_arg("plpath",1,"PLINT");
7989 if(!lua_isnumber(L,2)) SWIG_fail_arg("plpath",2,"PLFLT");
7990 if(!lua_isnumber(L,3)) SWIG_fail_arg("plpath",3,"PLFLT");
7991 if(!lua_isnumber(L,4)) SWIG_fail_arg("plpath",4,"PLFLT");
7992 if(!lua_isnumber(L,5)) SWIG_fail_arg("plpath",5,"PLFLT");
7993 arg1 = (PLINT)lua_tonumber(L, 1);
7994 arg2 = (PLFLT)lua_tonumber(L, 2);
7995 arg3 = (PLFLT)lua_tonumber(L, 3);
7996 arg4 = (PLFLT)lua_tonumber(L, 4);
7997 arg5 = (PLFLT)lua_tonumber(L, 5);
7998 plpath(arg1,arg2,arg3,arg4,arg5);
7999
8000 return SWIG_arg;
8001
8002 fail: SWIGUNUSED;
8003 lua_error(L);
8004 return 0;
8005}
8006
8007
8008static int _wrap_poin(lua_State* L) {
8009 int SWIG_arg = 0;
8010 PLINT arg1 ;
8011 PLFLT *arg2 = 0 ;
8012 PLFLT *arg3 = 0 ;
8013 PLINT arg4 ;
8014 int temp3 ;
8015
8016 SWIG_check_num_args("plpoin",3,3)
8017 if(!lua_isnumber(L,3)) SWIG_fail_arg("plpoin",3,"PLINT");
8018 {
8019 int temp;
8020 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
8021 if ( !arg2 )
8022 SWIG_fail;
8023 arg1 = Alen = temp;
8024 }
8025 {
8026 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
8027 if ( !arg3 )
8028 SWIG_fail;
8029 if ( temp3 != Alen )
8030 {
8031 lua_pushfstring( L, "Tables must be of same length." );
8032 SWIG_fail;
8033 }
8034 }
8035 arg4 = (PLINT)lua_tonumber(L, 3);
8036 plpoin(arg1,(double const *)arg2,(double const *)arg3,arg4);
8037
8038 {
8039 LUA_FREE_ARRAY( arg2 );
8040 }
8041 {
8042 LUA_FREE_ARRAY( arg3 );
8043 }
8044 return SWIG_arg;
8045
8046 fail: SWIGUNUSED;
8047 {
8048 LUA_FREE_ARRAY( arg2 );
8049 }
8050 {
8051 LUA_FREE_ARRAY( arg3 );
8052 }
8053 lua_error(L);
8054 return 0;
8055}
8056
8057
8058static int _wrap_poin3(lua_State* L) {
8059 int SWIG_arg = 0;
8060 PLINT arg1 ;
8061 PLFLT *arg2 = 0 ;
8062 PLFLT *arg3 = 0 ;
8063 PLFLT *arg4 = 0 ;
8064 PLINT arg5 ;
8065 int temp3 ;
8066 int temp4 ;
8067
8068 SWIG_check_num_args("plpoin3",4,4)
8069 if(!lua_isnumber(L,4)) SWIG_fail_arg("plpoin3",4,"PLINT");
8070 {
8071 int temp;
8072 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
8073 if ( !arg2 )
8074 SWIG_fail;
8075 arg1 = Alen = temp;
8076 }
8077 {
8078 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
8079 if ( !arg3 )
8080 SWIG_fail;
8081 if ( temp3 != Alen )
8082 {
8083 lua_pushfstring( L, "Tables must be of same length." );
8084 SWIG_fail;
8085 }
8086 }
8087 {
8088 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8089 if ( !arg4 )
8090 SWIG_fail;
8091 if ( temp4 != Alen )
8092 {
8093 lua_pushfstring( L, "Tables must be of same length." );
8094 SWIG_fail;
8095 }
8096 }
8097 arg5 = (PLINT)lua_tonumber(L, 4);
8098 plpoin3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,arg5);
8099
8100 {
8101 LUA_FREE_ARRAY( arg2 );
8102 }
8103 {
8104 LUA_FREE_ARRAY( arg3 );
8105 }
8106 {
8107 LUA_FREE_ARRAY( arg4 );
8108 }
8109 return SWIG_arg;
8110
8111 fail: SWIGUNUSED;
8112 {
8113 LUA_FREE_ARRAY( arg2 );
8114 }
8115 {
8116 LUA_FREE_ARRAY( arg3 );
8117 }
8118 {
8119 LUA_FREE_ARRAY( arg4 );
8120 }
8121 lua_error(L);
8122 return 0;
8123}
8124
8125
8126static int _wrap_poly3(lua_State* L) {
8127 int SWIG_arg = 0;
8128 PLINT arg1 ;
8129 PLFLT *arg2 = 0 ;
8130 PLFLT *arg3 = 0 ;
8131 PLFLT *arg4 = 0 ;
8132 PLBOOL *arg5 = 0 ;
8133 PLBOOL arg6 ;
8134 int temp3 ;
8135 int temp4 ;
8136 int temp5 ;
8137
8138 SWIG_check_num_args("plpoly3",5,5)
8139 if(!lua_isnumber(L,5)) SWIG_fail_arg("plpoly3",5,"PLBOOL");
8140 {
8141 int temp;
8142 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
8143 if ( !arg2 )
8144 SWIG_fail;
8145 arg1 = Alen = temp;
8146 }
8147 {
8148 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
8149 if ( !arg3 )
8150 SWIG_fail;
8151 if ( temp3 != Alen )
8152 {
8153 lua_pushfstring( L, "Tables must be of same length." );
8154 SWIG_fail;
8155 }
8156 }
8157 {
8158 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8159 if ( !arg4 )
8160 SWIG_fail;
8161 if ( temp4 != Alen )
8162 {
8163 lua_pushfstring( L, "Tables must be of same length." );
8164 SWIG_fail;
8165 }
8166 }
8167 {
8168 arg5 = (PLINT *) LUA_get_int_num_array_var( L, 4, &temp5 );
8169 if ( !arg5 )
8170 SWIG_fail;
8171 if ( temp5 < Alen - 1 )
8172 {
8173 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8174 SWIG_fail;
8175 }
8176 }
8177 arg6 = (PLBOOL)lua_tonumber(L, 5);
8178 plpoly3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,(int const *)arg5,arg6);
8179
8180 {
8181 LUA_FREE_ARRAY( arg2 );
8182 }
8183 {
8184 LUA_FREE_ARRAY( arg3 );
8185 }
8186 {
8187 LUA_FREE_ARRAY( arg4 );
8188 }
8189 {
8190 LUA_FREE_ARRAY( arg5 );
8191 }
8192 return SWIG_arg;
8193
8194 fail: SWIGUNUSED;
8195 {
8196 LUA_FREE_ARRAY( arg2 );
8197 }
8198 {
8199 LUA_FREE_ARRAY( arg3 );
8200 }
8201 {
8202 LUA_FREE_ARRAY( arg4 );
8203 }
8204 {
8205 LUA_FREE_ARRAY( arg5 );
8206 }
8207 lua_error(L);
8208 return 0;
8209}
8210
8211
8212static int _wrap_prec(lua_State* L) {
8213 int SWIG_arg = 0;
8214 PLINT arg1 ;
8215 PLINT arg2 ;
8216
8217 SWIG_check_num_args("plprec",2,2)
8218 if(!lua_isnumber(L,1)) SWIG_fail_arg("plprec",1,"PLINT");
8219 if(!lua_isnumber(L,2)) SWIG_fail_arg("plprec",2,"PLINT");
8220 arg1 = (PLINT)lua_tonumber(L, 1);
8221 arg2 = (PLINT)lua_tonumber(L, 2);
8222 plprec(arg1,arg2);
8223
8224 return SWIG_arg;
8225
8226 fail: SWIGUNUSED;
8227 lua_error(L);
8228 return 0;
8229}
8230
8231
8232static int _wrap_psty(lua_State* L) {
8233 int SWIG_arg = 0;
8234 PLINT arg1 ;
8235
8236 SWIG_check_num_args("plpsty",1,1)
8237 if(!lua_isnumber(L,1)) SWIG_fail_arg("plpsty",1,"PLINT");
8238 arg1 = (PLINT)lua_tonumber(L, 1);
8239 plpsty(arg1);
8240
8241 return SWIG_arg;
8242
8243 fail: SWIGUNUSED;
8244 lua_error(L);
8245 return 0;
8246}
8247
8248
8249static int _wrap_ptex(lua_State* L) {
8250 int SWIG_arg = 0;
8251 PLFLT arg1 ;
8252 PLFLT arg2 ;
8253 PLFLT arg3 ;
8254 PLFLT arg4 ;
8255 PLFLT arg5 ;
8256 char *arg6 = 0 ;
8257
8258 SWIG_check_num_args("plptex",6,6)
8259 if(!lua_isnumber(L,1)) SWIG_fail_arg("plptex",1,"PLFLT");
8260 if(!lua_isnumber(L,2)) SWIG_fail_arg("plptex",2,"PLFLT");
8261 if(!lua_isnumber(L,3)) SWIG_fail_arg("plptex",3,"PLFLT");
8262 if(!lua_isnumber(L,4)) SWIG_fail_arg("plptex",4,"PLFLT");
8263 if(!lua_isnumber(L,5)) SWIG_fail_arg("plptex",5,"PLFLT");
8264 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plptex",6,"char const *");
8265 arg1 = (PLFLT)lua_tonumber(L, 1);
8266 arg2 = (PLFLT)lua_tonumber(L, 2);
8267 arg3 = (PLFLT)lua_tonumber(L, 3);
8268 arg4 = (PLFLT)lua_tonumber(L, 4);
8269 arg5 = (PLFLT)lua_tonumber(L, 5);
8270 arg6 = (char *)lua_tostring(L, 6);
8271 plptex(arg1,arg2,arg3,arg4,arg5,(char const *)arg6);
8272
8273 return SWIG_arg;
8274
8275 fail: SWIGUNUSED;
8276 lua_error(L);
8277 return 0;
8278}
8279
8280
8281static int _wrap_ptex3(lua_State* L) {
8282 int SWIG_arg = 0;
8283 PLFLT arg1 ;
8284 PLFLT arg2 ;
8285 PLFLT arg3 ;
8286 PLFLT arg4 ;
8287 PLFLT arg5 ;
8288 PLFLT arg6 ;
8289 PLFLT arg7 ;
8290 PLFLT arg8 ;
8291 PLFLT arg9 ;
8292 PLFLT arg10 ;
8293 char *arg11 = 0 ;
8294
8295 SWIG_check_num_args("plptex3",11,11)
8296 if(!lua_isnumber(L,1)) SWIG_fail_arg("plptex3",1,"PLFLT");
8297 if(!lua_isnumber(L,2)) SWIG_fail_arg("plptex3",2,"PLFLT");
8298 if(!lua_isnumber(L,3)) SWIG_fail_arg("plptex3",3,"PLFLT");
8299 if(!lua_isnumber(L,4)) SWIG_fail_arg("plptex3",4,"PLFLT");
8300 if(!lua_isnumber(L,5)) SWIG_fail_arg("plptex3",5,"PLFLT");
8301 if(!lua_isnumber(L,6)) SWIG_fail_arg("plptex3",6,"PLFLT");
8302 if(!lua_isnumber(L,7)) SWIG_fail_arg("plptex3",7,"PLFLT");
8303 if(!lua_isnumber(L,8)) SWIG_fail_arg("plptex3",8,"PLFLT");
8304 if(!lua_isnumber(L,9)) SWIG_fail_arg("plptex3",9,"PLFLT");
8305 if(!lua_isnumber(L,10)) SWIG_fail_arg("plptex3",10,"PLFLT");
8306 if(!SWIG_lua_isnilstring(L,11)) SWIG_fail_arg("plptex3",11,"char const *");
8307 arg1 = (PLFLT)lua_tonumber(L, 1);
8308 arg2 = (PLFLT)lua_tonumber(L, 2);
8309 arg3 = (PLFLT)lua_tonumber(L, 3);
8310 arg4 = (PLFLT)lua_tonumber(L, 4);
8311 arg5 = (PLFLT)lua_tonumber(L, 5);
8312 arg6 = (PLFLT)lua_tonumber(L, 6);
8313 arg7 = (PLFLT)lua_tonumber(L, 7);
8314 arg8 = (PLFLT)lua_tonumber(L, 8);
8315 arg9 = (PLFLT)lua_tonumber(L, 9);
8316 arg10 = (PLFLT)lua_tonumber(L, 10);
8317 arg11 = (char *)lua_tostring(L, 11);
8318 plptex3(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,(char const *)arg11);
8319
8320 return SWIG_arg;
8321
8322 fail: SWIGUNUSED;
8323 lua_error(L);
8324 return 0;
8325}
8326
8327
8328static int _wrap_randd(lua_State* L) {
8329 int SWIG_arg = 0;
8330 PLFLT result;
8331
8332 SWIG_check_num_args("plrandd",0,0)
8333 result = (PLFLT)plrandd();
8334 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
8335 return SWIG_arg;
8336
8337 fail: SWIGUNUSED;
8338 lua_error(L);
8339 return 0;
8340}
8341
8342
8343static int _wrap_replot(lua_State* L) {
8344 int SWIG_arg = 0;
8345
8346 SWIG_check_num_args("plreplot",0,0)
8347 plreplot();
8348
8349 return SWIG_arg;
8350
8351 fail: SWIGUNUSED;
8352 lua_error(L);
8353 return 0;
8354}
8355
8356
8357static int _wrap_rgbhls(lua_State* L) {
8358 int SWIG_arg = 0;
8359 PLFLT arg1 ;
8360 PLFLT arg2 ;
8361 PLFLT arg3 ;
8362 PLFLT *arg4 = 0 ;
8363 PLFLT *arg5 = 0 ;
8364 PLFLT *arg6 = 0 ;
8365 PLFLT temp4 ;
8366 PLFLT temp5 ;
8367 PLFLT temp6 ;
8368
8369 arg4 = &temp4;
8370 arg5 = &temp5;
8371 arg6 = &temp6;
8372 SWIG_check_num_args("plrgbhls",3,3)
8373 if(!lua_isnumber(L,1)) SWIG_fail_arg("plrgbhls",1,"PLFLT");
8374 if(!lua_isnumber(L,2)) SWIG_fail_arg("plrgbhls",2,"PLFLT");
8375 if(!lua_isnumber(L,3)) SWIG_fail_arg("plrgbhls",3,"PLFLT");
8376 arg1 = (PLFLT)lua_tonumber(L, 1);
8377 arg2 = (PLFLT)lua_tonumber(L, 2);
8378 arg3 = (PLFLT)lua_tonumber(L, 3);
8379 plrgbhls(arg1,arg2,arg3,arg4,arg5,arg6);
8380
8381 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
8382 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
8383 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
8384 return SWIG_arg;
8385
8386 fail: SWIGUNUSED;
8387 lua_error(L);
8388 return 0;
8389}
8390
8391
8392static int _wrap_schr(lua_State* L) {
8393 int SWIG_arg = 0;
8394 PLFLT arg1 ;
8395 PLFLT arg2 ;
8396
8397 SWIG_check_num_args("plschr",2,2)
8398 if(!lua_isnumber(L,1)) SWIG_fail_arg("plschr",1,"PLFLT");
8399 if(!lua_isnumber(L,2)) SWIG_fail_arg("plschr",2,"PLFLT");
8400 arg1 = (PLFLT)lua_tonumber(L, 1);
8401 arg2 = (PLFLT)lua_tonumber(L, 2);
8402 plschr(arg1,arg2);
8403
8404 return SWIG_arg;
8405
8406 fail: SWIGUNUSED;
8407 lua_error(L);
8408 return 0;
8409}
8410
8411
8412static int _wrap_scmap0(lua_State* L) {
8413 int SWIG_arg = 0;
8414 PLINT *arg1 = 0 ;
8415 PLINT *arg2 = 0 ;
8416 PLINT *arg3 = 0 ;
8417 PLINT arg4 ;
8418 int temp1 ;
8419 int temp2 ;
8420 int temp3 ;
8421
8422 SWIG_check_num_args("plscmap0",3,3)
8423 {
8424 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8425 if ( !arg1 )
8426 SWIG_fail;
8427 Alen = temp1;
8428 }
8429 {
8430 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8431 if ( !arg2 )
8432 SWIG_fail;
8433 if ( temp2 != Alen )
8434 {
8435 lua_pushfstring( L, "Tables must be of same length." );
8436 SWIG_fail;
8437 }
8438 }
8439 {
8440 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8441 if ( !arg3 )
8442 SWIG_fail;
8443 if ( temp3 != Alen )
8444 {
8445 lua_pushfstring( L, "Tables must be of same length." );
8446 SWIG_fail;
8447 }
8448 arg4 = temp3;
8449 }
8450 plscmap0((int const *)arg1,(int const *)arg2,(int const *)arg3,arg4);
8451
8452 {
8453 LUA_FREE_ARRAY( arg1 );
8454 }
8455 {
8456 LUA_FREE_ARRAY( arg2 );
8457 }
8458 {
8459 LUA_FREE_ARRAY( arg3 );
8460 }
8461 return SWIG_arg;
8462
8463 fail: SWIGUNUSED;
8464 {
8465 LUA_FREE_ARRAY( arg1 );
8466 }
8467 {
8468 LUA_FREE_ARRAY( arg2 );
8469 }
8470 {
8471 LUA_FREE_ARRAY( arg3 );
8472 }
8473 lua_error(L);
8474 return 0;
8475}
8476
8477
8478static int _wrap_scmap0a(lua_State* L) {
8479 int SWIG_arg = 0;
8480 PLINT *arg1 = 0 ;
8481 PLINT *arg2 = 0 ;
8482 PLINT *arg3 = 0 ;
8483 PLFLT *arg4 = 0 ;
8484 PLINT arg5 ;
8485 int temp1 ;
8486 int temp2 ;
8487 int temp3 ;
8488
8489 SWIG_check_num_args("plscmap0a",4,4)
8490 {
8491 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8492 if ( !arg1 )
8493 SWIG_fail;
8494 Alen = temp1;
8495 }
8496 {
8497 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8498 if ( !arg2 )
8499 SWIG_fail;
8500 if ( temp2 != Alen )
8501 {
8502 lua_pushfstring( L, "Tables must be of same length." );
8503 SWIG_fail;
8504 }
8505 }
8506 {
8507 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8508 if ( !arg3 )
8509 SWIG_fail;
8510 if ( temp3 != Alen )
8511 {
8512 lua_pushfstring( L, "Tables must be of same length." );
8513 SWIG_fail;
8514 }
8515 }
8516 {
8517 int temp;
8518 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
8519 if ( !arg4 )
8520 SWIG_fail;
8521 if ( temp != Alen )
8522 {
8523 lua_pushfstring( L, "Tables must be of same length." );
8524 SWIG_fail;
8525 }
8526 arg5 = temp;
8527 }
8528 plscmap0a((int const *)arg1,(int const *)arg2,(int const *)arg3,(double const *)arg4,arg5);
8529
8530 {
8531 LUA_FREE_ARRAY( arg1 );
8532 }
8533 {
8534 LUA_FREE_ARRAY( arg2 );
8535 }
8536 {
8537 LUA_FREE_ARRAY( arg3 );
8538 }
8539 {
8540 LUA_FREE_ARRAY( arg4 );
8541 }
8542 return SWIG_arg;
8543
8544 fail: SWIGUNUSED;
8545 {
8546 LUA_FREE_ARRAY( arg1 );
8547 }
8548 {
8549 LUA_FREE_ARRAY( arg2 );
8550 }
8551 {
8552 LUA_FREE_ARRAY( arg3 );
8553 }
8554 {
8555 LUA_FREE_ARRAY( arg4 );
8556 }
8557 lua_error(L);
8558 return 0;
8559}
8560
8561
8562static int _wrap_scmap0n(lua_State* L) {
8563 int SWIG_arg = 0;
8564 PLINT arg1 ;
8565
8566 SWIG_check_num_args("plscmap0n",1,1)
8567 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap0n",1,"PLINT");
8568 arg1 = (PLINT)lua_tonumber(L, 1);
8569 plscmap0n(arg1);
8570
8571 return SWIG_arg;
8572
8573 fail: SWIGUNUSED;
8574 lua_error(L);
8575 return 0;
8576}
8577
8578
8579static int _wrap_scmap1(lua_State* L) {
8580 int SWIG_arg = 0;
8581 PLINT *arg1 = 0 ;
8582 PLINT *arg2 = 0 ;
8583 PLINT *arg3 = 0 ;
8584 PLINT arg4 ;
8585 int temp1 ;
8586 int temp2 ;
8587 int temp3 ;
8588
8589 SWIG_check_num_args("plscmap1",3,3)
8590 {
8591 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8592 if ( !arg1 )
8593 SWIG_fail;
8594 Alen = temp1;
8595 }
8596 {
8597 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8598 if ( !arg2 )
8599 SWIG_fail;
8600 if ( temp2 != Alen )
8601 {
8602 lua_pushfstring( L, "Tables must be of same length." );
8603 SWIG_fail;
8604 }
8605 }
8606 {
8607 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8608 if ( !arg3 )
8609 SWIG_fail;
8610 if ( temp3 != Alen )
8611 {
8612 lua_pushfstring( L, "Tables must be of same length." );
8613 SWIG_fail;
8614 }
8615 arg4 = temp3;
8616 }
8617 plscmap1((int const *)arg1,(int const *)arg2,(int const *)arg3,arg4);
8618
8619 {
8620 LUA_FREE_ARRAY( arg1 );
8621 }
8622 {
8623 LUA_FREE_ARRAY( arg2 );
8624 }
8625 {
8626 LUA_FREE_ARRAY( arg3 );
8627 }
8628 return SWIG_arg;
8629
8630 fail: SWIGUNUSED;
8631 {
8632 LUA_FREE_ARRAY( arg1 );
8633 }
8634 {
8635 LUA_FREE_ARRAY( arg2 );
8636 }
8637 {
8638 LUA_FREE_ARRAY( arg3 );
8639 }
8640 lua_error(L);
8641 return 0;
8642}
8643
8644
8645static int _wrap_scmap1a(lua_State* L) {
8646 int SWIG_arg = 0;
8647 PLINT *arg1 = 0 ;
8648 PLINT *arg2 = 0 ;
8649 PLINT *arg3 = 0 ;
8650 PLFLT *arg4 = 0 ;
8651 PLINT arg5 ;
8652 int temp1 ;
8653 int temp2 ;
8654 int temp3 ;
8655
8656 SWIG_check_num_args("plscmap1a",4,4)
8657 {
8658 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8659 if ( !arg1 )
8660 SWIG_fail;
8661 Alen = temp1;
8662 }
8663 {
8664 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8665 if ( !arg2 )
8666 SWIG_fail;
8667 if ( temp2 != Alen )
8668 {
8669 lua_pushfstring( L, "Tables must be of same length." );
8670 SWIG_fail;
8671 }
8672 }
8673 {
8674 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8675 if ( !arg3 )
8676 SWIG_fail;
8677 if ( temp3 != Alen )
8678 {
8679 lua_pushfstring( L, "Tables must be of same length." );
8680 SWIG_fail;
8681 }
8682 }
8683 {
8684 int temp;
8685 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
8686 if ( !arg4 )
8687 SWIG_fail;
8688 if ( temp != Alen )
8689 {
8690 lua_pushfstring( L, "Tables must be of same length." );
8691 SWIG_fail;
8692 }
8693 arg5 = temp;
8694 }
8695 plscmap1a((int const *)arg1,(int const *)arg2,(int const *)arg3,(double const *)arg4,arg5);
8696
8697 {
8698 LUA_FREE_ARRAY( arg1 );
8699 }
8700 {
8701 LUA_FREE_ARRAY( arg2 );
8702 }
8703 {
8704 LUA_FREE_ARRAY( arg3 );
8705 }
8706 {
8707 LUA_FREE_ARRAY( arg4 );
8708 }
8709 return SWIG_arg;
8710
8711 fail: SWIGUNUSED;
8712 {
8713 LUA_FREE_ARRAY( arg1 );
8714 }
8715 {
8716 LUA_FREE_ARRAY( arg2 );
8717 }
8718 {
8719 LUA_FREE_ARRAY( arg3 );
8720 }
8721 {
8722 LUA_FREE_ARRAY( arg4 );
8723 }
8724 lua_error(L);
8725 return 0;
8726}
8727
8728
8729static int _wrap_scmap1l(lua_State* L) {
8730 int SWIG_arg = 0;
8731 PLBOOL arg1 ;
8732 PLINT arg2 ;
8733 PLFLT *arg3 = 0 ;
8734 PLFLT *arg4 = 0 ;
8735 PLFLT *arg5 = 0 ;
8736 PLFLT *arg6 = 0 ;
8737 PLBOOL *arg7 = 0 ;
8738 int temp4 ;
8739 int temp5 ;
8740 int temp6 ;
8741 int temp7 ;
8742
8743 {
8744 arg7 = NULL;
8745 }
8746 SWIG_check_num_args("plscmap1l",5,6)
8747 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1l",1,"PLBOOL");
8748 arg1 = (PLBOOL)lua_tonumber(L, 1);
8749 {
8750 int temp;
8751 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
8752 if ( !arg3 )
8753 SWIG_fail;
8754 arg2 = Alen = temp;
8755 }
8756 {
8757 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8758 if ( !arg4 )
8759 SWIG_fail;
8760 if ( temp4 != Alen )
8761 {
8762 lua_pushfstring( L, "Tables must be of same length." );
8763 SWIG_fail;
8764 }
8765 }
8766 {
8767 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp5 );
8768 if ( !arg5 )
8769 SWIG_fail;
8770 if ( temp5 != Alen )
8771 {
8772 lua_pushfstring( L, "Tables must be of same length." );
8773 SWIG_fail;
8774 }
8775 }
8776 {
8777 arg6 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp6 );
8778 if ( !arg6 )
8779 SWIG_fail;
8780 if ( temp6 != Alen )
8781 {
8782 lua_pushfstring( L, "Tables must be of same length." );
8783 SWIG_fail;
8784 }
8785 }
8786 if(lua_gettop(L)>=6){
8787 {
8788 if ( lua_isnil( L, 6 ) )
8789 {
8790 arg7 = NULL;
8791 }
8792 else
8793 {
8794 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 6, &temp7 );
8795 if ( !arg7 )
8796 SWIG_fail;
8797 if ( temp7 < Alen - 1 )
8798 {
8799 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8800 SWIG_fail;
8801 }
8802 }
8803 }
8804 }
8805 plscmap1l(arg1,arg2,(double const *)arg3,(double const *)arg4,(double const *)arg5,(double const *)arg6,(int const *)arg7);
8806
8807 {
8808 LUA_FREE_ARRAY( arg3 );
8809 }
8810 {
8811 LUA_FREE_ARRAY( arg4 );
8812 }
8813 {
8814 LUA_FREE_ARRAY( arg5 );
8815 }
8816 {
8817 LUA_FREE_ARRAY( arg6 );
8818 }
8819 {
8820 LUA_FREE_ARRAY( arg7 );
8821 }
8822 return SWIG_arg;
8823
8824 fail: SWIGUNUSED;
8825 {
8826 LUA_FREE_ARRAY( arg3 );
8827 }
8828 {
8829 LUA_FREE_ARRAY( arg4 );
8830 }
8831 {
8832 LUA_FREE_ARRAY( arg5 );
8833 }
8834 {
8835 LUA_FREE_ARRAY( arg6 );
8836 }
8837 {
8838 LUA_FREE_ARRAY( arg7 );
8839 }
8840 lua_error(L);
8841 return 0;
8842}
8843
8844
8845static int _wrap_scmap1la(lua_State* L) {
8846 int SWIG_arg = 0;
8847 PLBOOL arg1 ;
8848 PLINT arg2 ;
8849 PLFLT *arg3 = 0 ;
8850 PLFLT *arg4 = 0 ;
8851 PLFLT *arg5 = 0 ;
8852 PLFLT *arg6 = 0 ;
8853 PLFLT *arg7 = 0 ;
8854 PLBOOL *arg8 = 0 ;
8855 int temp4 ;
8856 int temp5 ;
8857 int temp6 ;
8858 int temp7 ;
8859 int temp8 ;
8860
8861 {
8862 arg8 = NULL;
8863 }
8864 SWIG_check_num_args("plscmap1la",6,7)
8865 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1la",1,"PLBOOL");
8866 arg1 = (PLBOOL)lua_tonumber(L, 1);
8867 {
8868 int temp;
8869 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
8870 if ( !arg3 )
8871 SWIG_fail;
8872 arg2 = Alen = temp;
8873 }
8874 {
8875 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8876 if ( !arg4 )
8877 SWIG_fail;
8878 if ( temp4 != Alen )
8879 {
8880 lua_pushfstring( L, "Tables must be of same length." );
8881 SWIG_fail;
8882 }
8883 }
8884 {
8885 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp5 );
8886 if ( !arg5 )
8887 SWIG_fail;
8888 if ( temp5 != Alen )
8889 {
8890 lua_pushfstring( L, "Tables must be of same length." );
8891 SWIG_fail;
8892 }
8893 }
8894 {
8895 arg6 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp6 );
8896 if ( !arg6 )
8897 SWIG_fail;
8898 if ( temp6 != Alen )
8899 {
8900 lua_pushfstring( L, "Tables must be of same length." );
8901 SWIG_fail;
8902 }
8903 }
8904 {
8905 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp7 );
8906 if ( !arg7 )
8907 SWIG_fail;
8908 if ( temp7 != Alen )
8909 {
8910 lua_pushfstring( L, "Tables must be of same length." );
8911 SWIG_fail;
8912 }
8913 }
8914 if(lua_gettop(L)>=7){
8915 {
8916 if ( lua_isnil( L, 7 ) )
8917 {
8918 arg8 = NULL;
8919 }
8920 else
8921 {
8922 arg8 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp8 );
8923 if ( !arg8 )
8924 SWIG_fail;
8925 if ( temp8 < Alen - 1 )
8926 {
8927 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8928 SWIG_fail;
8929 }
8930 }
8931 }
8932 }
8933 plscmap1la(arg1,arg2,(double const *)arg3,(double const *)arg4,(double const *)arg5,(double const *)arg6,(double const *)arg7,(int const *)arg8);
8934
8935 {
8936 LUA_FREE_ARRAY( arg3 );
8937 }
8938 {
8939 LUA_FREE_ARRAY( arg4 );
8940 }
8941 {
8942 LUA_FREE_ARRAY( arg5 );
8943 }
8944 {
8945 LUA_FREE_ARRAY( arg6 );
8946 }
8947 {
8948 LUA_FREE_ARRAY( arg7 );
8949 }
8950 {
8951 LUA_FREE_ARRAY( arg8 );
8952 }
8953 return SWIG_arg;
8954
8955 fail: SWIGUNUSED;
8956 {
8957 LUA_FREE_ARRAY( arg3 );
8958 }
8959 {
8960 LUA_FREE_ARRAY( arg4 );
8961 }
8962 {
8963 LUA_FREE_ARRAY( arg5 );
8964 }
8965 {
8966 LUA_FREE_ARRAY( arg6 );
8967 }
8968 {
8969 LUA_FREE_ARRAY( arg7 );
8970 }
8971 {
8972 LUA_FREE_ARRAY( arg8 );
8973 }
8974 lua_error(L);
8975 return 0;
8976}
8977
8978
8979static int _wrap_scmap1n(lua_State* L) {
8980 int SWIG_arg = 0;
8981 PLINT arg1 ;
8982
8983 SWIG_check_num_args("plscmap1n",1,1)
8984 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1n",1,"PLINT");
8985 arg1 = (PLINT)lua_tonumber(L, 1);
8986 plscmap1n(arg1);
8987
8988 return SWIG_arg;
8989
8990 fail: SWIGUNUSED;
8991 lua_error(L);
8992 return 0;
8993}
8994
8995
8996static int _wrap_scmap1_range(lua_State* L) {
8997 int SWIG_arg = 0;
8998 PLFLT arg1 ;
8999 PLFLT arg2 ;
9000
9001 SWIG_check_num_args("plscmap1_range",2,2)
9002 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1_range",1,"PLFLT");
9003 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscmap1_range",2,"PLFLT");
9004 arg1 = (PLFLT)lua_tonumber(L, 1);
9005 arg2 = (PLFLT)lua_tonumber(L, 2);
9006 plscmap1_range(arg1,arg2);
9007
9008 return SWIG_arg;
9009
9010 fail: SWIGUNUSED;
9011 lua_error(L);
9012 return 0;
9013}
9014
9015
9016static int _wrap_gcmap1_range(lua_State* L) {
9017 int SWIG_arg = 0;
9018 PLFLT *arg1 = 0 ;
9019 PLFLT *arg2 = 0 ;
9020 PLFLT temp1 ;
9021 PLFLT temp2 ;
9022
9023 arg1 = &temp1;
9024 arg2 = &temp2;
9025 SWIG_check_num_args("plgcmap1_range",0,0)
9026 plgcmap1_range(arg1,arg2);
9027
9028 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
9029 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
9030 return SWIG_arg;
9031
9032 fail: SWIGUNUSED;
9033 lua_error(L);
9034 return 0;
9035}
9036
9037
9038static int _wrap_scol0(lua_State* L) {
9039 int SWIG_arg = 0;
9040 PLINT arg1 ;
9041 PLINT arg2 ;
9042 PLINT arg3 ;
9043 PLINT arg4 ;
9044
9045 SWIG_check_num_args("plscol0",4,4)
9046 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscol0",1,"PLINT");
9047 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscol0",2,"PLINT");
9048 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscol0",3,"PLINT");
9049 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscol0",4,"PLINT");
9050 arg1 = (PLINT)lua_tonumber(L, 1);
9051 arg2 = (PLINT)lua_tonumber(L, 2);
9052 arg3 = (PLINT)lua_tonumber(L, 3);
9053 arg4 = (PLINT)lua_tonumber(L, 4);
9054 plscol0(arg1,arg2,arg3,arg4);
9055
9056 return SWIG_arg;
9057
9058 fail: SWIGUNUSED;
9059 lua_error(L);
9060 return 0;
9061}
9062
9063
9064static int _wrap_scol0a(lua_State* L) {
9065 int SWIG_arg = 0;
9066 PLINT arg1 ;
9067 PLINT arg2 ;
9068 PLINT arg3 ;
9069 PLINT arg4 ;
9070 PLFLT arg5 ;
9071
9072 SWIG_check_num_args("plscol0a",5,5)
9073 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscol0a",1,"PLINT");
9074 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscol0a",2,"PLINT");
9075 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscol0a",3,"PLINT");
9076 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscol0a",4,"PLINT");
9077 if(!lua_isnumber(L,5)) SWIG_fail_arg("plscol0a",5,"PLFLT");
9078 arg1 = (PLINT)lua_tonumber(L, 1);
9079 arg2 = (PLINT)lua_tonumber(L, 2);
9080 arg3 = (PLINT)lua_tonumber(L, 3);
9081 arg4 = (PLINT)lua_tonumber(L, 4);
9082 arg5 = (PLFLT)lua_tonumber(L, 5);
9083 plscol0a(arg1,arg2,arg3,arg4,arg5);
9084
9085 return SWIG_arg;
9086
9087 fail: SWIGUNUSED;
9088 lua_error(L);
9089 return 0;
9090}
9091
9092
9093static int _wrap_scolbg(lua_State* L) {
9094 int SWIG_arg = 0;
9095 PLINT arg1 ;
9096 PLINT arg2 ;
9097 PLINT arg3 ;
9098
9099 SWIG_check_num_args("plscolbg",3,3)
9100 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolbg",1,"PLINT");
9101 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscolbg",2,"PLINT");
9102 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscolbg",3,"PLINT");
9103 arg1 = (PLINT)lua_tonumber(L, 1);
9104 arg2 = (PLINT)lua_tonumber(L, 2);
9105 arg3 = (PLINT)lua_tonumber(L, 3);
9106 plscolbg(arg1,arg2,arg3);
9107
9108 return SWIG_arg;
9109
9110 fail: SWIGUNUSED;
9111 lua_error(L);
9112 return 0;
9113}
9114
9115
9116static int _wrap_scolbga(lua_State* L) {
9117 int SWIG_arg = 0;
9118 PLINT arg1 ;
9119 PLINT arg2 ;
9120 PLINT arg3 ;
9121 PLFLT arg4 ;
9122
9123 SWIG_check_num_args("plscolbga",4,4)
9124 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolbga",1,"PLINT");
9125 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscolbga",2,"PLINT");
9126 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscolbga",3,"PLINT");
9127 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscolbga",4,"PLFLT");
9128 arg1 = (PLINT)lua_tonumber(L, 1);
9129 arg2 = (PLINT)lua_tonumber(L, 2);
9130 arg3 = (PLINT)lua_tonumber(L, 3);
9131 arg4 = (PLFLT)lua_tonumber(L, 4);
9132 plscolbga(arg1,arg2,arg3,arg4);
9133
9134 return SWIG_arg;
9135
9136 fail: SWIGUNUSED;
9137 lua_error(L);
9138 return 0;
9139}
9140
9141
9142static int _wrap_scolor(lua_State* L) {
9143 int SWIG_arg = 0;
9144 PLINT arg1 ;
9145
9146 SWIG_check_num_args("plscolor",1,1)
9147 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolor",1,"PLINT");
9148 arg1 = (PLINT)lua_tonumber(L, 1);
9149 plscolor(arg1);
9150
9151 return SWIG_arg;
9152
9153 fail: SWIGUNUSED;
9154 lua_error(L);
9155 return 0;
9156}
9157
9158
9159static int _wrap_scompression(lua_State* L) {
9160 int SWIG_arg = 0;
9161 PLINT arg1 ;
9162
9163 SWIG_check_num_args("plscompression",1,1)
9164 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscompression",1,"PLINT");
9165 arg1 = (PLINT)lua_tonumber(L, 1);
9166 plscompression(arg1);
9167
9168 return SWIG_arg;
9169
9170 fail: SWIGUNUSED;
9171 lua_error(L);
9172 return 0;
9173}
9174
9175
9176static int _wrap_sdev(lua_State* L) {
9177 int SWIG_arg = 0;
9178 char *arg1 = 0 ;
9179
9180 SWIG_check_num_args("plsdev",1,1)
9181 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsdev",1,"char const *");
9182 arg1 = (char *)lua_tostring(L, 1);
9183 plsdev((char const *)arg1);
9184
9185 return SWIG_arg;
9186
9187 fail: SWIGUNUSED;
9188 lua_error(L);
9189 return 0;
9190}
9191
9192
9193static int _wrap_sdidev(lua_State* L) {
9194 int SWIG_arg = 0;
9195 PLFLT arg1 ;
9196 PLFLT arg2 ;
9197 PLFLT arg3 ;
9198 PLFLT arg4 ;
9199
9200 SWIG_check_num_args("plsdidev",4,4)
9201 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdidev",1,"PLFLT");
9202 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdidev",2,"PLFLT");
9203 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdidev",3,"PLFLT");
9204 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdidev",4,"PLFLT");
9205 arg1 = (PLFLT)lua_tonumber(L, 1);
9206 arg2 = (PLFLT)lua_tonumber(L, 2);
9207 arg3 = (PLFLT)lua_tonumber(L, 3);
9208 arg4 = (PLFLT)lua_tonumber(L, 4);
9209 plsdidev(arg1,arg2,arg3,arg4);
9210
9211 return SWIG_arg;
9212
9213 fail: SWIGUNUSED;
9214 lua_error(L);
9215 return 0;
9216}
9217
9218
9219static int _wrap_sdimap(lua_State* L) {
9220 int SWIG_arg = 0;
9221 PLINT arg1 ;
9222 PLINT arg2 ;
9223 PLINT arg3 ;
9224 PLINT arg4 ;
9225 PLFLT arg5 ;
9226 PLFLT arg6 ;
9227
9228 SWIG_check_num_args("plsdimap",6,6)
9229 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdimap",1,"PLINT");
9230 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdimap",2,"PLINT");
9231 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdimap",3,"PLINT");
9232 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdimap",4,"PLINT");
9233 if(!lua_isnumber(L,5)) SWIG_fail_arg("plsdimap",5,"PLFLT");
9234 if(!lua_isnumber(L,6)) SWIG_fail_arg("plsdimap",6,"PLFLT");
9235 arg1 = (PLINT)lua_tonumber(L, 1);
9236 arg2 = (PLINT)lua_tonumber(L, 2);
9237 arg3 = (PLINT)lua_tonumber(L, 3);
9238 arg4 = (PLINT)lua_tonumber(L, 4);
9239 arg5 = (PLFLT)lua_tonumber(L, 5);
9240 arg6 = (PLFLT)lua_tonumber(L, 6);
9241 plsdimap(arg1,arg2,arg3,arg4,arg5,arg6);
9242
9243 return SWIG_arg;
9244
9245 fail: SWIGUNUSED;
9246 lua_error(L);
9247 return 0;
9248}
9249
9250
9251static int _wrap_sdiori(lua_State* L) {
9252 int SWIG_arg = 0;
9253 PLFLT arg1 ;
9254
9255 SWIG_check_num_args("plsdiori",1,1)
9256 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiori",1,"PLFLT");
9257 arg1 = (PLFLT)lua_tonumber(L, 1);
9258 plsdiori(arg1);
9259
9260 return SWIG_arg;
9261
9262 fail: SWIGUNUSED;
9263 lua_error(L);
9264 return 0;
9265}
9266
9267
9268static int _wrap_sdiplt(lua_State* L) {
9269 int SWIG_arg = 0;
9270 PLFLT arg1 ;
9271 PLFLT arg2 ;
9272 PLFLT arg3 ;
9273 PLFLT arg4 ;
9274
9275 SWIG_check_num_args("plsdiplt",4,4)
9276 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiplt",1,"PLFLT");
9277 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdiplt",2,"PLFLT");
9278 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdiplt",3,"PLFLT");
9279 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdiplt",4,"PLFLT");
9280 arg1 = (PLFLT)lua_tonumber(L, 1);
9281 arg2 = (PLFLT)lua_tonumber(L, 2);
9282 arg3 = (PLFLT)lua_tonumber(L, 3);
9283 arg4 = (PLFLT)lua_tonumber(L, 4);
9284 plsdiplt(arg1,arg2,arg3,arg4);
9285
9286 return SWIG_arg;
9287
9288 fail: SWIGUNUSED;
9289 lua_error(L);
9290 return 0;
9291}
9292
9293
9294static int _wrap_sdiplz(lua_State* L) {
9295 int SWIG_arg = 0;
9296 PLFLT arg1 ;
9297 PLFLT arg2 ;
9298 PLFLT arg3 ;
9299 PLFLT arg4 ;
9300
9301 SWIG_check_num_args("plsdiplz",4,4)
9302 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiplz",1,"PLFLT");
9303 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdiplz",2,"PLFLT");
9304 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdiplz",3,"PLFLT");
9305 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdiplz",4,"PLFLT");
9306 arg1 = (PLFLT)lua_tonumber(L, 1);
9307 arg2 = (PLFLT)lua_tonumber(L, 2);
9308 arg3 = (PLFLT)lua_tonumber(L, 3);
9309 arg4 = (PLFLT)lua_tonumber(L, 4);
9310 plsdiplz(arg1,arg2,arg3,arg4);
9311
9312 return SWIG_arg;
9313
9314 fail: SWIGUNUSED;
9315 lua_error(L);
9316 return 0;
9317}
9318
9319
9320static int _wrap_seed(lua_State* L) {
9321 int SWIG_arg = 0;
9322 unsigned int arg1 ;
9323
9324 SWIG_check_num_args("plseed",1,1)
9325 if(!lua_isnumber(L,1)) SWIG_fail_arg("plseed",1,"unsigned int");
9326 SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
9327 arg1 = (unsigned int)lua_tonumber(L, 1);
9328 plseed(arg1);
9329
9330 return SWIG_arg;
9331
9332 fail: SWIGUNUSED;
9333 lua_error(L);
9334 return 0;
9335}
9336
9337
9338static int _wrap_sesc(lua_State* L) {
9339 int SWIG_arg = 0;
9340 char arg1 ;
9341
9342 SWIG_check_num_args("plsesc",1,1)
9343 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsesc",1,"char");
9344 arg1 = (lua_tostring(L, 1))[0];
9345 plsesc(arg1);
9346
9347 return SWIG_arg;
9348
9349 fail: SWIGUNUSED;
9350 lua_error(L);
9351 return 0;
9352}
9353
9354
9355static int _wrap_setopt(lua_State* L) {
9356 int SWIG_arg = 0;
9357 char *arg1 = 0 ;
9358 char *arg2 = 0 ;
9359 PLINT result;
9360
9361 SWIG_check_num_args("plsetopt",2,2)
9362 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsetopt",1,"char const *");
9363 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plsetopt",2,"char const *");
9364 arg1 = (char *)lua_tostring(L, 1);
9365 arg2 = (char *)lua_tostring(L, 2);
9366 result = (PLINT)plsetopt((char const *)arg1,(char const *)arg2);
9367 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
9368 return SWIG_arg;
9369
9370 fail: SWIGUNUSED;
9371 lua_error(L);
9372 return 0;
9373}
9374
9375
9376static int _wrap_sfam(lua_State* L) {
9377 int SWIG_arg = 0;
9378 PLINT arg1 ;
9379 PLINT arg2 ;
9380 PLINT arg3 ;
9381
9382 SWIG_check_num_args("plsfam",3,3)
9383 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfam",1,"PLINT");
9384 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsfam",2,"PLINT");
9385 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsfam",3,"PLINT");
9386 arg1 = (PLINT)lua_tonumber(L, 1);
9387 arg2 = (PLINT)lua_tonumber(L, 2);
9388 arg3 = (PLINT)lua_tonumber(L, 3);
9389 plsfam(arg1,arg2,arg3);
9390
9391 return SWIG_arg;
9392
9393 fail: SWIGUNUSED;
9394 lua_error(L);
9395 return 0;
9396}
9397
9398
9399static int _wrap_sfci(lua_State* L) {
9400 int SWIG_arg = 0;
9401 PLUNICODE arg1 ;
9402
9403 SWIG_check_num_args("plsfci",1,1)
9404 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfci",1,"PLUNICODE");
9405 SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
9406 arg1 = (PLUNICODE)lua_tonumber(L, 1);
9407 plsfci(arg1);
9408
9409 return SWIG_arg;
9410
9411 fail: SWIGUNUSED;
9412 lua_error(L);
9413 return 0;
9414}
9415
9416
9417static int _wrap_sfnam(lua_State* L) {
9418 int SWIG_arg = 0;
9419 char *arg1 = 0 ;
9420
9421 SWIG_check_num_args("plsfnam",1,1)
9422 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsfnam",1,"char const *");
9423 arg1 = (char *)lua_tostring(L, 1);
9424 plsfnam((char const *)arg1);
9425
9426 return SWIG_arg;
9427
9428 fail: SWIGUNUSED;
9429 lua_error(L);
9430 return 0;
9431}
9432
9433
9434static int _wrap_sfont(lua_State* L) {
9435 int SWIG_arg = 0;
9436 PLINT arg1 ;
9437 PLINT arg2 ;
9438 PLINT arg3 ;
9439
9440 SWIG_check_num_args("plsfont",3,3)
9441 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfont",1,"PLINT");
9442 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsfont",2,"PLINT");
9443 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsfont",3,"PLINT");
9444 arg1 = (PLINT)lua_tonumber(L, 1);
9445 arg2 = (PLINT)lua_tonumber(L, 2);
9446 arg3 = (PLINT)lua_tonumber(L, 3);
9447 plsfont(arg1,arg2,arg3);
9448
9449 return SWIG_arg;
9450
9451 fail: SWIGUNUSED;
9452 lua_error(L);
9453 return 0;
9454}
9455
9456
9457static int _wrap_shades(lua_State* L) {
9458 int SWIG_arg = 0;
9459 PLFLT **arg1 = 0 ;
9460 PLINT arg2 ;
9461 PLINT arg3 ;
9462 defined_func arg4 = 0 ;
9463 PLFLT arg5 ;
9464 PLFLT arg6 ;
9465 PLFLT arg7 ;
9466 PLFLT arg8 ;
9467 PLFLT *arg9 = 0 ;
9468 PLINT arg10 ;
9469 PLFLT arg11 ;
9470 PLINT arg12 ;
9471 PLFLT arg13 ;
9472 fill_func arg14 = 0 ;
9473 PLBOOL arg15 ;
9474 pltr_func arg16 = 0 ;
9475 PLPointer arg17 = 0 ;
9476 int ii1 ;
9477 PLcGrid cgrid117 ;
9478 PLcGrid2 cgrid217 ;
9479
9480 {
9481 cgrid117.xg = cgrid117.yg = cgrid117.zg = NULL;
9482 cgrid117.nx = cgrid117.ny = cgrid117.nz = 0;
9483 cgrid217.xg = cgrid217.yg = cgrid217.zg = NULL;
9484 cgrid217.nx = cgrid217.ny = 0;
9485 }
9486 {
9487 arg16 = NULL;
9488 }
9489 {
9490 arg17 = NULL;
9491 }
9492 {
9493 arg4 = NULL;
9494 }
9495 {
9496 arg14 = plfill;
9497 }
9498 SWIG_check_num_args("plshades",10,12)
9499 if(!lua_isnumber(L,2)) SWIG_fail_arg("plshades",2,"PLFLT");
9500 if(!lua_isnumber(L,3)) SWIG_fail_arg("plshades",3,"PLFLT");
9501 if(!lua_isnumber(L,4)) SWIG_fail_arg("plshades",4,"PLFLT");
9502 if(!lua_isnumber(L,5)) SWIG_fail_arg("plshades",5,"PLFLT");
9503 if(!lua_isnumber(L,7)) SWIG_fail_arg("plshades",7,"PLFLT");
9504 if(!lua_isnumber(L,8)) SWIG_fail_arg("plshades",8,"PLINT");
9505 if(!lua_isnumber(L,9)) SWIG_fail_arg("plshades",9,"PLFLT");
9506 if(!lua_isnumber(L,10)) SWIG_fail_arg("plshades",10,"PLBOOL");
9507 {
9508 int jj;
9509
9510 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
9511 if ( !arg1 )
9512 SWIG_fail;
9513 Xlen = arg2 = ii1;
9514 Ylen = arg3 = jj;
9515 }
9516 arg5 = (PLFLT)lua_tonumber(L, 2);
9517 arg6 = (PLFLT)lua_tonumber(L, 3);
9518 arg7 = (PLFLT)lua_tonumber(L, 4);
9519 arg8 = (PLFLT)lua_tonumber(L, 5);
9520 {
9521 int temp;
9522 arg9 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp );
9523 if ( !arg9 )
9524 SWIG_fail;
9525 arg10 = Alen = temp;
9526 }
9527 arg11 = (PLFLT)lua_tonumber(L, 7);
9528 arg12 = (PLINT)lua_tonumber(L, 8);
9529 arg13 = (PLFLT)lua_tonumber(L, 9);
9530 arg15 = (PLBOOL)lua_tonumber(L, 10);
9531 if(lua_gettop(L)>=11){
9532 {
9533 arg16 = NULL;
9534 mypltr_funcstr[0] = '\0';
9535
9536 if ( lua_isstring( L, 11 ) )
9537 {
9538 const char* funcstr = lua_tostring( L, 11 );
9539 if ( strcmp( "pltr0", funcstr ) == 0 )
9540 {
9541 arg16 = pltr0;
9542 }
9543 else if ( strcmp( "pltr1", funcstr ) == 0 )
9544 {
9545 arg16 = pltr1;
9546 }
9547 else if ( strcmp( "pltr2", funcstr ) == 0 )
9548 {
9549 arg16 = pltr2;
9550 }
9551 else
9552 {
9553 arg16 = mypltr;
9554 strncpy( mypltr_funcstr, funcstr, 255 );
9555 myL = L;
9556 }
9557 }
9558 else
9559 SWIG_fail_arg( "shades", 16, "pltr_func" );
9560 }
9561 }
9562 if(lua_gettop(L)>=12){
9563 {
9564 int nx, ny;
9565 int gridmode = 0;
9566
9567 lua_pushstring( L, "xg" );
9568 lua_gettable( L, 12 );
9569 if ( !lua_istable( L, -1 ) )
9570 {
9571 lua_pop( L, 1 ); // pop "xg"
9572 lua_pushstring( L, "expected a table xg" );
9573 SWIG_fail;
9574 }
9575 lua_rawgeti( L, -1, 1 );
9576 if ( lua_istable( L, -1 ) )
9577 gridmode = 2; // two dimensional array
9578 else if ( lua_isnumber( L, -1 ) )
9579 gridmode = 1; // one dimensional array
9580 else
9581 {
9582 lua_pop( L, 1 ); // pop "1"
9583 lua_pop( L, 1 ); // pop "xg"
9584 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
9585 SWIG_fail;
9586 }
9587 lua_pop( L, 1 ); // pop test element
9588 if ( gridmode == 1 )
9589 {
9590 cgrid117.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
9591 if ( !cgrid117.xg )
9592 {
9593 lua_pop( L, 1 ); // pop "xg"
9594 SWIG_fail;
9595 }
9596 if ( nx != Xlen )
9597 {
9598 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
9599 SWIG_fail;
9600 }
9601 cgrid117.nx = nx;
9602 }
9603 else
9604 {
9605 cgrid217.xg = read_double_Matrix( L, -1, &nx, &ny );
9606 if ( !cgrid217.xg )
9607 {
9608 lua_pop( L, 1 ); // pop "xg"
9609 SWIG_fail;
9610 }
9611 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9612 {
9613 lua_pop( L, 1 ); // pop "xg"
9614 lua_pushfstring( L, "Vectors must match matrix." );
9615 SWIG_fail;
9616 }
9617 cgrid217.nx = nx;
9618 cgrid217.ny = ny;
9619 }
9620 lua_pop( L, 1 ); // pop "xg"
9621
9622 lua_pushstring( L, "yg" );
9623 lua_gettable( L, 12 );
9624 if ( !lua_istable( L, -1 ) )
9625 {
9626 lua_pop( L, 1 );
9627 lua_pushstring( L, "expected a table yg" );
9628 SWIG_fail;
9629 }
9630 lua_rawgeti( L, -1, 1 );
9631 if ( gridmode == 2 )
9632 {
9633 if ( !lua_istable( L, -1 ) )
9634 {
9635 lua_pop( L, 1 ); // pop "1"
9636 lua_pop( L, 1 ); // pop "yg"
9637 lua_pushstring( L, "expected a two dimensional array/table in yg" );
9638 SWIG_fail;
9639 }
9640 }
9641 else
9642 {
9643 if ( !lua_isnumber( L, -1 ) )
9644 {
9645 lua_pop( L, 1 ); // pop "1"
9646 lua_pop( L, 1 ); // pop "yg"
9647 lua_pushstring( L, "expected a one dimensional array/table in yg" );
9648 SWIG_fail;
9649 }
9650 }
9651 lua_pop( L, 1 ); // pop "1"
9652 if ( gridmode == 1 )
9653 {
9654 cgrid117.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
9655 if ( !cgrid117.yg )
9656 {
9657 lua_pop( L, 1 ); // pop "yg"
9658 SWIG_fail;
9659 }
9660 if ( ny != Ylen )
9661 {
9662 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
9663 SWIG_fail;
9664 }
9665 cgrid117.ny = ny;
9666 }
9667 else
9668 {
9669 cgrid217.yg = read_double_Matrix( L, -1, &nx, &ny );
9670 if ( !cgrid217.yg )
9671 {
9672 lua_pop( L, 1 ); // pop "xg"
9673 SWIG_fail;
9674 }
9675 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9676 {
9677 lua_pop( L, 1 ); // pop "xg"
9678 lua_pushfstring( L, "Vectors must match matrix." );
9679 SWIG_fail;
9680 }
9681 // cgrid217.nx/ny already set
9682 }
9683 lua_pop( L, 1 ); // pop "yg"
9684
9685 if ( gridmode == 1 )
9686 arg17 = &cgrid117;
9687 else if ( gridmode == 2 )
9688 arg17 = &cgrid217;
9689 }
9690 }
9691 plshades((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,(double const *)arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
9692
9693 {
9694 int i;
9695
9696 if ( arg1 )
9697 {
9698 for ( i = 0; i < ii1; i++ )
9699 LUA_FREE_ARRAY( arg1[i] );
9700 LUA_FREE_ARRAY( arg1 );
9701 }
9702 }
9703 {
9704 LUA_FREE_ARRAY( arg9 );
9705 }
9706 {
9707 mypltr_funcstr[0] = '\0';
9708 }
9709 {
9710 int i;
9711
9712 LUA_FREE_ARRAY( cgrid117.xg );
9713 LUA_FREE_ARRAY( cgrid117.yg );
9714
9715 if ( cgrid217.xg )
9716 {
9717 for ( i = 0; i < Xlen; i++ )
9718 LUA_FREE_ARRAY( cgrid217.xg[i] );
9719 LUA_FREE_ARRAY( cgrid217.xg );
9720 }
9721 if ( cgrid217.yg )
9722 {
9723 for ( i = 0; i < Xlen; i++ )
9724 LUA_FREE_ARRAY( cgrid217.yg[i] );
9725 LUA_FREE_ARRAY( cgrid217.yg );
9726 }
9727 }
9728 return SWIG_arg;
9729
9730 fail: SWIGUNUSED;
9731 {
9732 int i;
9733
9734 if ( arg1 )
9735 {
9736 for ( i = 0; i < ii1; i++ )
9737 LUA_FREE_ARRAY( arg1[i] );
9738 LUA_FREE_ARRAY( arg1 );
9739 }
9740 }
9741 {
9742 LUA_FREE_ARRAY( arg9 );
9743 }
9744 {
9745 mypltr_funcstr[0] = '\0';
9746 }
9747 {
9748 int i;
9749
9750 LUA_FREE_ARRAY( cgrid117.xg );
9751 LUA_FREE_ARRAY( cgrid117.yg );
9752
9753 if ( cgrid217.xg )
9754 {
9755 for ( i = 0; i < Xlen; i++ )
9756 LUA_FREE_ARRAY( cgrid217.xg[i] );
9757 LUA_FREE_ARRAY( cgrid217.xg );
9758 }
9759 if ( cgrid217.yg )
9760 {
9761 for ( i = 0; i < Xlen; i++ )
9762 LUA_FREE_ARRAY( cgrid217.yg[i] );
9763 LUA_FREE_ARRAY( cgrid217.yg );
9764 }
9765 }
9766 lua_error(L);
9767 return 0;
9768}
9769
9770
9771static int _wrap_shade(lua_State* L) {
9772 int SWIG_arg = 0;
9773 PLFLT **arg1 = 0 ;
9774 PLINT arg2 ;
9775 PLINT arg3 ;
9776 defined_func arg4 = 0 ;
9777 PLFLT arg5 ;
9778 PLFLT arg6 ;
9779 PLFLT arg7 ;
9780 PLFLT arg8 ;
9781 PLFLT arg9 ;
9782 PLFLT arg10 ;
9783 PLINT arg11 ;
9784 PLFLT arg12 ;
9785 PLFLT arg13 ;
9786 PLINT arg14 ;
9787 PLFLT arg15 ;
9788 PLINT arg16 ;
9789 PLFLT arg17 ;
9790 fill_func arg18 = 0 ;
9791 PLBOOL arg19 ;
9792 pltr_func arg20 = 0 ;
9793 PLPointer arg21 = 0 ;
9794 int ii1 ;
9795 PLcGrid cgrid121 ;
9796 PLcGrid2 cgrid221 ;
9797
9798 {
9799 cgrid121.xg = cgrid121.yg = cgrid121.zg = NULL;
9800 cgrid121.nx = cgrid121.ny = cgrid121.nz = 0;
9801 cgrid221.xg = cgrid221.yg = cgrid221.zg = NULL;
9802 cgrid221.nx = cgrid221.ny = 0;
9803 }
9804 {
9805 arg20 = NULL;
9806 }
9807 {
9808 arg21 = NULL;
9809 }
9810 {
9811 arg4 = NULL;
9812 }
9813 {
9814 arg18 = plfill;
9815 }
9816 SWIG_check_num_args("plshade",15,17)
9817 if(!lua_isnumber(L,2)) SWIG_fail_arg("plshade",2,"PLFLT");
9818 if(!lua_isnumber(L,3)) SWIG_fail_arg("plshade",3,"PLFLT");
9819 if(!lua_isnumber(L,4)) SWIG_fail_arg("plshade",4,"PLFLT");
9820 if(!lua_isnumber(L,5)) SWIG_fail_arg("plshade",5,"PLFLT");
9821 if(!lua_isnumber(L,6)) SWIG_fail_arg("plshade",6,"PLFLT");
9822 if(!lua_isnumber(L,7)) SWIG_fail_arg("plshade",7,"PLFLT");
9823 if(!lua_isnumber(L,8)) SWIG_fail_arg("plshade",8,"PLINT");
9824 if(!lua_isnumber(L,9)) SWIG_fail_arg("plshade",9,"PLFLT");
9825 if(!lua_isnumber(L,10)) SWIG_fail_arg("plshade",10,"PLFLT");
9826 if(!lua_isnumber(L,11)) SWIG_fail_arg("plshade",11,"PLINT");
9827 if(!lua_isnumber(L,12)) SWIG_fail_arg("plshade",12,"PLFLT");
9828 if(!lua_isnumber(L,13)) SWIG_fail_arg("plshade",13,"PLINT");
9829 if(!lua_isnumber(L,14)) SWIG_fail_arg("plshade",14,"PLFLT");
9830 if(!lua_isnumber(L,15)) SWIG_fail_arg("plshade",15,"PLBOOL");
9831 {
9832 int jj;
9833
9834 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
9835 if ( !arg1 )
9836 SWIG_fail;
9837 Xlen = arg2 = ii1;
9838 Ylen = arg3 = jj;
9839 }
9840 arg5 = (PLFLT)lua_tonumber(L, 2);
9841 arg6 = (PLFLT)lua_tonumber(L, 3);
9842 arg7 = (PLFLT)lua_tonumber(L, 4);
9843 arg8 = (PLFLT)lua_tonumber(L, 5);
9844 arg9 = (PLFLT)lua_tonumber(L, 6);
9845 arg10 = (PLFLT)lua_tonumber(L, 7);
9846 arg11 = (PLINT)lua_tonumber(L, 8);
9847 arg12 = (PLFLT)lua_tonumber(L, 9);
9848 arg13 = (PLFLT)lua_tonumber(L, 10);
9849 arg14 = (PLINT)lua_tonumber(L, 11);
9850 arg15 = (PLFLT)lua_tonumber(L, 12);
9851 arg16 = (PLINT)lua_tonumber(L, 13);
9852 arg17 = (PLFLT)lua_tonumber(L, 14);
9853 arg19 = (PLBOOL)lua_tonumber(L, 15);
9854 if(lua_gettop(L)>=16){
9855 {
9856 arg20 = NULL;
9857 mypltr_funcstr[0] = '\0';
9858
9859 if ( lua_isstring( L, 16 ) )
9860 {
9861 const char* funcstr = lua_tostring( L, 16 );
9862 if ( strcmp( "pltr0", funcstr ) == 0 )
9863 {
9864 arg20 = pltr0;
9865 }
9866 else if ( strcmp( "pltr1", funcstr ) == 0 )
9867 {
9868 arg20 = pltr1;
9869 }
9870 else if ( strcmp( "pltr2", funcstr ) == 0 )
9871 {
9872 arg20 = pltr2;
9873 }
9874 else
9875 {
9876 arg20 = mypltr;
9877 strncpy( mypltr_funcstr, funcstr, 255 );
9878 myL = L;
9879 }
9880 }
9881 else
9882 SWIG_fail_arg( "shade", 20, "pltr_func" );
9883 }
9884 }
9885 if(lua_gettop(L)>=17){
9886 {
9887 int nx, ny;
9888 int gridmode = 0;
9889
9890 lua_pushstring( L, "xg" );
9891 lua_gettable( L, 17 );
9892 if ( !lua_istable( L, -1 ) )
9893 {
9894 lua_pop( L, 1 ); // pop "xg"
9895 lua_pushstring( L, "expected a table xg" );
9896 SWIG_fail;
9897 }
9898 lua_rawgeti( L, -1, 1 );
9899 if ( lua_istable( L, -1 ) )
9900 gridmode = 2; // two dimensional array
9901 else if ( lua_isnumber( L, -1 ) )
9902 gridmode = 1; // one dimensional array
9903 else
9904 {
9905 lua_pop( L, 1 ); // pop "1"
9906 lua_pop( L, 1 ); // pop "xg"
9907 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
9908 SWIG_fail;
9909 }
9910 lua_pop( L, 1 ); // pop test element
9911 if ( gridmode == 1 )
9912 {
9913 cgrid121.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
9914 if ( !cgrid121.xg )
9915 {
9916 lua_pop( L, 1 ); // pop "xg"
9917 SWIG_fail;
9918 }
9919 if ( nx != Xlen )
9920 {
9921 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
9922 SWIG_fail;
9923 }
9924 cgrid121.nx = nx;
9925 }
9926 else
9927 {
9928 cgrid221.xg = read_double_Matrix( L, -1, &nx, &ny );
9929 if ( !cgrid221.xg )
9930 {
9931 lua_pop( L, 1 ); // pop "xg"
9932 SWIG_fail;
9933 }
9934 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9935 {
9936 lua_pop( L, 1 ); // pop "xg"
9937 lua_pushfstring( L, "Vectors must match matrix." );
9938 SWIG_fail;
9939 }
9940 cgrid221.nx = nx;
9941 cgrid221.ny = ny;
9942 }
9943 lua_pop( L, 1 ); // pop "xg"
9944
9945 lua_pushstring( L, "yg" );
9946 lua_gettable( L, 17 );
9947 if ( !lua_istable( L, -1 ) )
9948 {
9949 lua_pop( L, 1 );
9950 lua_pushstring( L, "expected a table yg" );
9951 SWIG_fail;
9952 }
9953 lua_rawgeti( L, -1, 1 );
9954 if ( gridmode == 2 )
9955 {
9956 if ( !lua_istable( L, -1 ) )
9957 {
9958 lua_pop( L, 1 ); // pop "1"
9959 lua_pop( L, 1 ); // pop "yg"
9960 lua_pushstring( L, "expected a two dimensional array/table in yg" );
9961 SWIG_fail;
9962 }
9963 }
9964 else
9965 {
9966 if ( !lua_isnumber( L, -1 ) )
9967 {
9968 lua_pop( L, 1 ); // pop "1"
9969 lua_pop( L, 1 ); // pop "yg"
9970 lua_pushstring( L, "expected a one dimensional array/table in yg" );
9971 SWIG_fail;
9972 }
9973 }
9974 lua_pop( L, 1 ); // pop "1"
9975 if ( gridmode == 1 )
9976 {
9977 cgrid121.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
9978 if ( !cgrid121.yg )
9979 {
9980 lua_pop( L, 1 ); // pop "yg"
9981 SWIG_fail;
9982 }
9983 if ( ny != Ylen )
9984 {
9985 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
9986 SWIG_fail;
9987 }
9988 cgrid121.ny = ny;
9989 }
9990 else
9991 {
9992 cgrid221.yg = read_double_Matrix( L, -1, &nx, &ny );
9993 if ( !cgrid221.yg )
9994 {
9995 lua_pop( L, 1 ); // pop "xg"
9996 SWIG_fail;
9997 }
9998 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9999 {
10000 lua_pop( L, 1 ); // pop "xg"
10001 lua_pushfstring( L, "Vectors must match matrix." );
10002 SWIG_fail;
10003 }
10004 // cgrid221.nx/ny already set
10005 }
10006 lua_pop( L, 1 ); // pop "yg"
10007
10008 if ( gridmode == 1 )
10009 arg21 = &cgrid121;
10010 else if ( gridmode == 2 )
10011 arg21 = &cgrid221;
10012 }
10013 }
10014 plshade((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21);
10015
10016 {
10017 int i;
10018
10019 if ( arg1 )
10020 {
10021 for ( i = 0; i < ii1; i++ )
10022 LUA_FREE_ARRAY( arg1[i] );
10023 LUA_FREE_ARRAY( arg1 );
10024 }
10025 }
10026 {
10027 mypltr_funcstr[0] = '\0';
10028 }
10029 {
10030 int i;
10031
10032 LUA_FREE_ARRAY( cgrid121.xg );
10033 LUA_FREE_ARRAY( cgrid121.yg );
10034
10035 if ( cgrid221.xg )
10036 {
10037 for ( i = 0; i < Xlen; i++ )
10038 LUA_FREE_ARRAY( cgrid221.xg[i] );
10039 LUA_FREE_ARRAY( cgrid221.xg );
10040 }
10041 if ( cgrid221.yg )
10042 {
10043 for ( i = 0; i < Xlen; i++ )
10044 LUA_FREE_ARRAY( cgrid221.yg[i] );
10045 LUA_FREE_ARRAY( cgrid221.yg );
10046 }
10047 }
10048 return SWIG_arg;
10049
10050 fail: SWIGUNUSED;
10051 {
10052 int i;
10053
10054 if ( arg1 )
10055 {
10056 for ( i = 0; i < ii1; i++ )
10057 LUA_FREE_ARRAY( arg1[i] );
10058 LUA_FREE_ARRAY( arg1 );
10059 }
10060 }
10061 {
10062 mypltr_funcstr[0] = '\0';
10063 }
10064 {
10065 int i;
10066
10067 LUA_FREE_ARRAY( cgrid121.xg );
10068 LUA_FREE_ARRAY( cgrid121.yg );
10069
10070 if ( cgrid221.xg )
10071 {
10072 for ( i = 0; i < Xlen; i++ )
10073 LUA_FREE_ARRAY( cgrid221.xg[i] );
10074 LUA_FREE_ARRAY( cgrid221.xg );
10075 }
10076 if ( cgrid221.yg )
10077 {
10078 for ( i = 0; i < Xlen; i++ )
10079 LUA_FREE_ARRAY( cgrid221.yg[i] );
10080 LUA_FREE_ARRAY( cgrid221.yg );
10081 }
10082 }
10083 lua_error(L);
10084 return 0;
10085}
10086
10087
10088static int _wrap_slabelfunc(lua_State* L) {
10089 int SWIG_arg = 0;
10090 label_func arg1 = 0 ;
10091 PLPointer arg2 = 0 ;
10092
10093 {
10094 arg2 = NULL;
10095 }
10096 SWIG_check_num_args("plslabelfunc",1,1)
10097 {
10098 arg1 = NULL;
10099 mylabel_funcstr[0] = '\0';
10100
10101 if ( lua_isnil( L, 1 ) )
10102 {
10103 arg1 = NULL;
10104 }
10105 else if ( lua_isstring( L, 1 ) )
10106 {
10107 arg1 = mylabel;
10108 strncpy( mylabel_funcstr, lua_tostring( L, 1 ), 255 );
10109 myL = L;
10110 }
10111 else
10112 SWIG_fail_arg( "slabelfunc", 1, "label_func" );
10113 }
10114 plslabelfunc(arg1,arg2);
10115
10116 {
10117
10118 }
10119 return SWIG_arg;
10120
10121 fail: SWIGUNUSED;
10122 {
10123
10124 }
10125 lua_error(L);
10126 return 0;
10127}
10128
10129
10130static int _wrap_smaj(lua_State* L) {
10131 int SWIG_arg = 0;
10132 PLFLT arg1 ;
10133 PLFLT arg2 ;
10134
10135 SWIG_check_num_args("plsmaj",2,2)
10136 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsmaj",1,"PLFLT");
10137 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsmaj",2,"PLFLT");
10138 arg1 = (PLFLT)lua_tonumber(L, 1);
10139 arg2 = (PLFLT)lua_tonumber(L, 2);
10140 plsmaj(arg1,arg2);
10141
10142 return SWIG_arg;
10143
10144 fail: SWIGUNUSED;
10145 lua_error(L);
10146 return 0;
10147}
10148
10149
10150static int _wrap_smin(lua_State* L) {
10151 int SWIG_arg = 0;
10152 PLFLT arg1 ;
10153 PLFLT arg2 ;
10154
10155 SWIG_check_num_args("plsmin",2,2)
10156 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsmin",1,"PLFLT");
10157 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsmin",2,"PLFLT");
10158 arg1 = (PLFLT)lua_tonumber(L, 1);
10159 arg2 = (PLFLT)lua_tonumber(L, 2);
10160 plsmin(arg1,arg2);
10161
10162 return SWIG_arg;
10163
10164 fail: SWIGUNUSED;
10165 lua_error(L);
10166 return 0;
10167}
10168
10169
10170static int _wrap_sori(lua_State* L) {
10171 int SWIG_arg = 0;
10172 PLINT arg1 ;
10173
10174 SWIG_check_num_args("plsori",1,1)
10175 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsori",1,"PLINT");
10176 arg1 = (PLINT)lua_tonumber(L, 1);
10177 plsori(arg1);
10178
10179 return SWIG_arg;
10180
10181 fail: SWIGUNUSED;
10182 lua_error(L);
10183 return 0;
10184}
10185
10186
10187static int _wrap_spage(lua_State* L) {
10188 int SWIG_arg = 0;
10189 PLFLT arg1 ;
10190 PLFLT arg2 ;
10191 PLINT arg3 ;
10192 PLINT arg4 ;
10193 PLINT arg5 ;
10194 PLINT arg6 ;
10195
10196 SWIG_check_num_args("plspage",6,6)
10197 if(!lua_isnumber(L,1)) SWIG_fail_arg("plspage",1,"PLFLT");
10198 if(!lua_isnumber(L,2)) SWIG_fail_arg("plspage",2,"PLFLT");
10199 if(!lua_isnumber(L,3)) SWIG_fail_arg("plspage",3,"PLINT");
10200 if(!lua_isnumber(L,4)) SWIG_fail_arg("plspage",4,"PLINT");
10201 if(!lua_isnumber(L,5)) SWIG_fail_arg("plspage",5,"PLINT");
10202 if(!lua_isnumber(L,6)) SWIG_fail_arg("plspage",6,"PLINT");
10203 arg1 = (PLFLT)lua_tonumber(L, 1);
10204 arg2 = (PLFLT)lua_tonumber(L, 2);
10205 arg3 = (PLINT)lua_tonumber(L, 3);
10206 arg4 = (PLINT)lua_tonumber(L, 4);
10207 arg5 = (PLINT)lua_tonumber(L, 5);
10208 arg6 = (PLINT)lua_tonumber(L, 6);
10209 plspage(arg1,arg2,arg3,arg4,arg5,arg6);
10210
10211 return SWIG_arg;
10212
10213 fail: SWIGUNUSED;
10214 lua_error(L);
10215 return 0;
10216}
10217
10218
10219static int _wrap_spal0(lua_State* L) {
10220 int SWIG_arg = 0;
10221 char *arg1 = 0 ;
10222
10223 SWIG_check_num_args("plspal0",1,1)
10224 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plspal0",1,"char const *");
10225 arg1 = (char *)lua_tostring(L, 1);
10226 plspal0((char const *)arg1);
10227
10228 return SWIG_arg;
10229
10230 fail: SWIGUNUSED;
10231 lua_error(L);
10232 return 0;
10233}
10234
10235
10236static int _wrap_spal1(lua_State* L) {
10237 int SWIG_arg = 0;
10238 char *arg1 = 0 ;
10239 PLBOOL arg2 ;
10240
10241 SWIG_check_num_args("plspal1",2,2)
10242 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plspal1",1,"char const *");
10243 if(!lua_isnumber(L,2)) SWIG_fail_arg("plspal1",2,"PLBOOL");
10244 arg1 = (char *)lua_tostring(L, 1);
10245 arg2 = (PLBOOL)lua_tonumber(L, 2);
10246 plspal1((char const *)arg1,arg2);
10247
10248 return SWIG_arg;
10249
10250 fail: SWIGUNUSED;
10251 lua_error(L);
10252 return 0;
10253}
10254
10255
10256static int _wrap_spause(lua_State* L) {
10257 int SWIG_arg = 0;
10258 PLBOOL arg1 ;
10259
10260 SWIG_check_num_args("plspause",1,1)
10261 if(!lua_isnumber(L,1)) SWIG_fail_arg("plspause",1,"PLBOOL");
10262 arg1 = (PLBOOL)lua_tonumber(L, 1);
10263 plspause(arg1);
10264
10265 return SWIG_arg;
10266
10267 fail: SWIGUNUSED;
10268 lua_error(L);
10269 return 0;
10270}
10271
10272
10273static int _wrap_sstrm(lua_State* L) {
10274 int SWIG_arg = 0;
10275 PLINT arg1 ;
10276
10277 SWIG_check_num_args("plsstrm",1,1)
10278 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsstrm",1,"PLINT");
10279 arg1 = (PLINT)lua_tonumber(L, 1);
10280 plsstrm(arg1);
10281
10282 return SWIG_arg;
10283
10284 fail: SWIGUNUSED;
10285 lua_error(L);
10286 return 0;
10287}
10288
10289
10290static int _wrap_ssub(lua_State* L) {
10291 int SWIG_arg = 0;
10292 PLINT arg1 ;
10293 PLINT arg2 ;
10294
10295 SWIG_check_num_args("plssub",2,2)
10296 if(!lua_isnumber(L,1)) SWIG_fail_arg("plssub",1,"PLINT");
10297 if(!lua_isnumber(L,2)) SWIG_fail_arg("plssub",2,"PLINT");
10298 arg1 = (PLINT)lua_tonumber(L, 1);
10299 arg2 = (PLINT)lua_tonumber(L, 2);
10300 plssub(arg1,arg2);
10301
10302 return SWIG_arg;
10303
10304 fail: SWIGUNUSED;
10305 lua_error(L);
10306 return 0;
10307}
10308
10309
10310static int _wrap_ssym(lua_State* L) {
10311 int SWIG_arg = 0;
10312 PLFLT arg1 ;
10313 PLFLT arg2 ;
10314
10315 SWIG_check_num_args("plssym",2,2)
10316 if(!lua_isnumber(L,1)) SWIG_fail_arg("plssym",1,"PLFLT");
10317 if(!lua_isnumber(L,2)) SWIG_fail_arg("plssym",2,"PLFLT");
10318 arg1 = (PLFLT)lua_tonumber(L, 1);
10319 arg2 = (PLFLT)lua_tonumber(L, 2);
10320 plssym(arg1,arg2);
10321
10322 return SWIG_arg;
10323
10324 fail: SWIGUNUSED;
10325 lua_error(L);
10326 return 0;
10327}
10328
10329
10330static int _wrap_star(lua_State* L) {
10331 int SWIG_arg = 0;
10332 PLINT arg1 ;
10333 PLINT arg2 ;
10334
10335 SWIG_check_num_args("plstar",2,2)
10336 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstar",1,"PLINT");
10337 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstar",2,"PLINT");
10338 arg1 = (PLINT)lua_tonumber(L, 1);
10339 arg2 = (PLINT)lua_tonumber(L, 2);
10340 plstar(arg1,arg2);
10341
10342 return SWIG_arg;
10343
10344 fail: SWIGUNUSED;
10345 lua_error(L);
10346 return 0;
10347}
10348
10349
10350static int _wrap_start(lua_State* L) {
10351 int SWIG_arg = 0;
10352 char *arg1 = 0 ;
10353 PLINT arg2 ;
10354 PLINT arg3 ;
10355
10356 SWIG_check_num_args("plstart",3,3)
10357 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plstart",1,"char const *");
10358 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstart",2,"PLINT");
10359 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstart",3,"PLINT");
10360 arg1 = (char *)lua_tostring(L, 1);
10361 arg2 = (PLINT)lua_tonumber(L, 2);
10362 arg3 = (PLINT)lua_tonumber(L, 3);
10363 plstart((char const *)arg1,arg2,arg3);
10364
10365 return SWIG_arg;
10366
10367 fail: SWIGUNUSED;
10368 lua_error(L);
10369 return 0;
10370}
10371
10372
10373static int _wrap_stransform(lua_State* L) {
10374 int SWIG_arg = 0;
10375 ct_func arg1 = 0 ;
10376 PLPointer arg2 = 0 ;
10377
10378 {
10379 arg1 = NULL;
10380 myct_funcstr[0] = '\0';
10381 }
10382 {
10383 arg2 = NULL;
10384 }
10385 SWIG_check_num_args("plstransform",0,1)
10386 if(lua_gettop(L)>=1){
10387 {
10388 arg1 = NULL;
10389 myct_funcstr[0] = '\0';
10390
10391 if ( lua_isstring( L, 1 ) )
10392 {
10393 const char* funcstr = lua_tostring( L, 1 );
10394 arg1 = myct;
10395 strncpy( myct_funcstr, funcstr, 255 );
10396 myL = L;
10397 }
10398 else
10399 SWIG_fail_arg( "stransform", 1, "ct_func" );
10400 }
10401 }
10402 plstransform(arg1,arg2);
10403
10404 return SWIG_arg;
10405
10406 fail: SWIGUNUSED;
10407 lua_error(L);
10408 return 0;
10409}
10410
10411
10412static int _wrap_string(lua_State* L) {
10413 int SWIG_arg = 0;
10414 PLINT arg1 ;
10415 PLFLT *arg2 = 0 ;
10416 PLFLT *arg3 = 0 ;
10417 char *arg4 = 0 ;
10418 int temp3 ;
10419
10420 SWIG_check_num_args("plstring",3,3)
10421 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plstring",3,"char const *");
10422 {
10423 int temp;
10424 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10425 if ( !arg2 )
10426 SWIG_fail;
10427 arg1 = Alen = temp;
10428 }
10429 {
10430 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10431 if ( !arg3 )
10432 SWIG_fail;
10433 if ( temp3 != Alen )
10434 {
10435 lua_pushfstring( L, "Tables must be of same length." );
10436 SWIG_fail;
10437 }
10438 }
10439 arg4 = (char *)lua_tostring(L, 3);
10440 plstring(arg1,(double const *)arg2,(double const *)arg3,(char const *)arg4);
10441
10442 {
10443 LUA_FREE_ARRAY( arg2 );
10444 }
10445 {
10446 LUA_FREE_ARRAY( arg3 );
10447 }
10448 return SWIG_arg;
10449
10450 fail: SWIGUNUSED;
10451 {
10452 LUA_FREE_ARRAY( arg2 );
10453 }
10454 {
10455 LUA_FREE_ARRAY( arg3 );
10456 }
10457 lua_error(L);
10458 return 0;
10459}
10460
10461
10462static int _wrap_string3(lua_State* L) {
10463 int SWIG_arg = 0;
10464 PLINT arg1 ;
10465 PLFLT *arg2 = 0 ;
10466 PLFLT *arg3 = 0 ;
10467 PLFLT *arg4 = 0 ;
10468 char *arg5 = 0 ;
10469 int temp3 ;
10470 int temp4 ;
10471
10472 SWIG_check_num_args("plstring3",4,4)
10473 if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("plstring3",4,"char const *");
10474 {
10475 int temp;
10476 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10477 if ( !arg2 )
10478 SWIG_fail;
10479 arg1 = Alen = temp;
10480 }
10481 {
10482 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10483 if ( !arg3 )
10484 SWIG_fail;
10485 if ( temp3 != Alen )
10486 {
10487 lua_pushfstring( L, "Tables must be of same length." );
10488 SWIG_fail;
10489 }
10490 }
10491 {
10492 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
10493 if ( !arg4 )
10494 SWIG_fail;
10495 if ( temp4 != Alen )
10496 {
10497 lua_pushfstring( L, "Tables must be of same length." );
10498 SWIG_fail;
10499 }
10500 }
10501 arg5 = (char *)lua_tostring(L, 4);
10502 plstring3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,(char const *)arg5);
10503
10504 {
10505 LUA_FREE_ARRAY( arg2 );
10506 }
10507 {
10508 LUA_FREE_ARRAY( arg3 );
10509 }
10510 {
10511 LUA_FREE_ARRAY( arg4 );
10512 }
10513 return SWIG_arg;
10514
10515 fail: SWIGUNUSED;
10516 {
10517 LUA_FREE_ARRAY( arg2 );
10518 }
10519 {
10520 LUA_FREE_ARRAY( arg3 );
10521 }
10522 {
10523 LUA_FREE_ARRAY( arg4 );
10524 }
10525 lua_error(L);
10526 return 0;
10527}
10528
10529
10530static int _wrap_stripa(lua_State* L) {
10531 int SWIG_arg = 0;
10532 PLINT arg1 ;
10533 PLINT arg2 ;
10534 PLFLT arg3 ;
10535 PLFLT arg4 ;
10536
10537 SWIG_check_num_args("plstripa",4,4)
10538 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstripa",1,"PLINT");
10539 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstripa",2,"PLINT");
10540 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstripa",3,"PLFLT");
10541 if(!lua_isnumber(L,4)) SWIG_fail_arg("plstripa",4,"PLFLT");
10542 arg1 = (PLINT)lua_tonumber(L, 1);
10543 arg2 = (PLINT)lua_tonumber(L, 2);
10544 arg3 = (PLFLT)lua_tonumber(L, 3);
10545 arg4 = (PLFLT)lua_tonumber(L, 4);
10546 plstripa(arg1,arg2,arg3,arg4);
10547
10548 return SWIG_arg;
10549
10550 fail: SWIGUNUSED;
10551 lua_error(L);
10552 return 0;
10553}
10554
10555
10556static int _wrap_stripc(lua_State* L) {
10557 int SWIG_arg = 0;
10558 PLINT *arg1 = 0 ;
10559 char *arg2 = 0 ;
10560 char *arg3 = 0 ;
10561 PLFLT arg4 ;
10562 PLFLT arg5 ;
10563 PLFLT arg6 ;
10564 PLFLT arg7 ;
10565 PLFLT arg8 ;
10566 PLFLT arg9 ;
10567 PLFLT arg10 ;
10568 PLBOOL arg11 ;
10569 PLBOOL arg12 ;
10570 PLINT arg13 ;
10571 PLINT arg14 ;
10572 PLINT *arg15 = 0 ;
10573 PLINT *arg16 = 0 ;
10574 char **arg17 = (char **)0 ;
10575 char *arg18 = 0 ;
10576 char *arg19 = 0 ;
10577 char *arg20 = 0 ;
10578 PLINT temp1 ;
10579 int temp15 ;
10580 int temp16 ;
10581
10582 {
10583 arg17 = NULL;
10584 }
10585 arg1 = &temp1;
10586 SWIG_check_num_args("plstripc",15,19)
10587 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plstripc",1,"char const *");
10588 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plstripc",2,"char const *");
10589 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstripc",3,"PLFLT");
10590 if(!lua_isnumber(L,4)) SWIG_fail_arg("plstripc",4,"PLFLT");
10591 if(!lua_isnumber(L,5)) SWIG_fail_arg("plstripc",5,"PLFLT");
10592 if(!lua_isnumber(L,6)) SWIG_fail_arg("plstripc",6,"PLFLT");
10593 if(!lua_isnumber(L,7)) SWIG_fail_arg("plstripc",7,"PLFLT");
10594 if(!lua_isnumber(L,8)) SWIG_fail_arg("plstripc",8,"PLFLT");
10595 if(!lua_isnumber(L,9)) SWIG_fail_arg("plstripc",9,"PLFLT");
10596 if(!lua_isnumber(L,10)) SWIG_fail_arg("plstripc",10,"PLBOOL");
10597 if(!lua_isnumber(L,11)) SWIG_fail_arg("plstripc",11,"PLBOOL");
10598 if(!lua_isnumber(L,12)) SWIG_fail_arg("plstripc",12,"PLINT");
10599 if(!lua_isnumber(L,13)) SWIG_fail_arg("plstripc",13,"PLINT");
10600 if(lua_gettop(L)>=16 && !lua_istable(L,16)) SWIG_fail_arg("plstripc",16,"char const *[4]");
10601 if(lua_gettop(L)>=17 && !SWIG_lua_isnilstring(L,17)) SWIG_fail_arg("plstripc",17,"char const *");
10602 if(lua_gettop(L)>=18 && !SWIG_lua_isnilstring(L,18)) SWIG_fail_arg("plstripc",18,"char const *");
10603 if(lua_gettop(L)>=19 && !SWIG_lua_isnilstring(L,19)) SWIG_fail_arg("plstripc",19,"char const *");
10604 arg2 = (char *)lua_tostring(L, 1);
10605 arg3 = (char *)lua_tostring(L, 2);
10606 arg4 = (PLFLT)lua_tonumber(L, 3);
10607 arg5 = (PLFLT)lua_tonumber(L, 4);
10608 arg6 = (PLFLT)lua_tonumber(L, 5);
10609 arg7 = (PLFLT)lua_tonumber(L, 6);
10610 arg8 = (PLFLT)lua_tonumber(L, 7);
10611 arg9 = (PLFLT)lua_tonumber(L, 8);
10612 arg10 = (PLFLT)lua_tonumber(L, 9);
10613 arg11 = (PLBOOL)lua_tonumber(L, 10);
10614 arg12 = (PLBOOL)lua_tonumber(L, 11);
10615 arg13 = (PLINT)lua_tonumber(L, 12);
10616 arg14 = (PLINT)lua_tonumber(L, 13);
10617 {
10618 arg15 = (PLINT *) LUA_get_int_num_array_var( L, 14, &temp15 );
10619 if ( !arg15 )
10620 SWIG_fail;
10621 Alen = temp15;
10622 }
10623 {
10624 arg16 = (PLINT *) LUA_get_int_num_array_var( L, 15, &temp16 );
10625 if ( !arg16 )
10626 SWIG_fail;
10627 if ( temp16 != Alen )
10628 {
10629 lua_pushfstring( L, "Tables must be of same length." );
10630 SWIG_fail;
10631 }
10632 }
10633 if(lua_gettop(L)>=16){
10634 {
10635 int i;
10636 arg17 = NULL;
10637
10638 if ( SWIG_table_size( L, 16 ) != 4 )
10639 {
10640 lua_pushfstring( L, "Requires a sequence of 4 strings." );
10641 SWIG_fail;
10642 }
10643 if ( Alen != 4 )
10644 {
10645 lua_pushfstring( L, "colline and styline args must be length 4." );
10646 SWIG_fail;
10647 }
10648
10649 arg17 = malloc( sizeof ( char* ) * 4 );
10650 for ( i = 1; i <= 4; i++ )
10651 {
10652 lua_rawgeti( L, 16, i );
10653 if ( lua_isstring( L, -1 ) )
10654 {
10655 arg17[i - 1] = (char *) lua_tostring( L, -1 );
10656 }
10657 else
10658 {
10659 lua_pop( L, 1 );
10660 lua_pushfstring( L, "Requires a sequence of 4 strings." );
10661 SWIG_fail;
10662 // arg17 array is freed after 'fail:'
10663 }
10664 lua_pop( L, 1 );
10665 }
10666 }
10667 }
10668 if(lua_gettop(L)>=17){
10669 arg18 = (char *)lua_tostring(L, 17);
10670 }
10671 if(lua_gettop(L)>=18){
10672 arg19 = (char *)lua_tostring(L, 18);
10673 }
10674 if(lua_gettop(L)>=19){
10675 arg20 = (char *)lua_tostring(L, 19);
10676 }
10677 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);
10678
10679 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
10680 {
10681 LUA_FREE_ARRAY( arg15 );
10682 }
10683 {
10684 LUA_FREE_ARRAY( arg16 );
10685 }
10686 {
10687 if ( arg17 )
10688 {
10689 free( arg17 ); arg17 = NULL;
10690 }
10691 }
10692 return SWIG_arg;
10693
10694 fail: SWIGUNUSED;
10695 {
10696 LUA_FREE_ARRAY( arg15 );
10697 }
10698 {
10699 LUA_FREE_ARRAY( arg16 );
10700 }
10701 {
10702 if ( arg17 )
10703 {
10704 free( arg17 ); arg17 = NULL;
10705 }
10706 }
10707 lua_error(L);
10708 return 0;
10709}
10710
10711
10712static int _wrap_stripd(lua_State* L) {
10713 int SWIG_arg = 0;
10714 PLINT arg1 ;
10715
10716 SWIG_check_num_args("plstripd",1,1)
10717 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstripd",1,"PLINT");
10718 arg1 = (PLINT)lua_tonumber(L, 1);
10719 plstripd(arg1);
10720
10721 return SWIG_arg;
10722
10723 fail: SWIGUNUSED;
10724 lua_error(L);
10725 return 0;
10726}
10727
10728
10729static int _wrap_styl(lua_State* L) {
10730 int SWIG_arg = 0;
10731 PLINT arg1 ;
10732 PLINT *arg2 = 0 ;
10733 PLINT *arg3 = 0 ;
10734 int temp3 ;
10735
10736 SWIG_check_num_args("plstyl",2,2)
10737 {
10738 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 1, &arg1 );
10739 if ( !arg2 )
10740 SWIG_fail;
10741 Alen = arg1;
10742 }
10743 {
10744 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp3 );
10745 if ( !arg3 )
10746 SWIG_fail;
10747 if ( temp3 != Alen )
10748 {
10749 lua_pushfstring( L, "Tables must be of same length." );
10750 SWIG_fail;
10751 }
10752 }
10753 plstyl(arg1,(int const *)arg2,(int const *)arg3);
10754
10755 {
10756 LUA_FREE_ARRAY( arg2 );
10757 }
10758 {
10759 LUA_FREE_ARRAY( arg3 );
10760 }
10761 return SWIG_arg;
10762
10763 fail: SWIGUNUSED;
10764 {
10765 LUA_FREE_ARRAY( arg2 );
10766 }
10767 {
10768 LUA_FREE_ARRAY( arg3 );
10769 }
10770 lua_error(L);
10771 return 0;
10772}
10773
10774
10775static int _wrap_svect(lua_State* L) {
10776 int SWIG_arg = 0;
10777 PLFLT *arg1 = 0 ;
10778 PLFLT *arg2 = 0 ;
10779 PLINT arg3 ;
10780 PLBOOL arg4 ;
10781
10782 {
10783 arg2 = NULL; arg3 = 0;
10784 }
10785 {
10786 arg4 = 0;
10787 }
10788 SWIG_check_num_args("plsvect",1,3)
10789 if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("plsvect",3,"PLBOOL");
10790 {
10791 int temp;
10792 if ( lua_isnil( L, 1 ) )
10793 {
10794 arg1 = NULL;
10795 Alen = 0;
10796 }
10797 else
10798 {
10799 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10800 if ( !arg1 )
10801 SWIG_fail;
10802 Alen = temp;
10803 }
10804 }
10805 if(lua_gettop(L)>=2){
10806 {
10807 int temp = 0;
10808 if ( lua_isnil( L, 2 ) )
10809 {
10810 arg2 = NULL;
10811 }
10812 else
10813 {
10814 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
10815 if ( !arg2 )
10816 SWIG_fail;
10817 if ( temp != Alen )
10818 {
10819 lua_pushfstring( L, "Tables must be of same length." );
10820 SWIG_fail;
10821 }
10822 }
10823 arg3 = temp;
10824 }
10825 }
10826 if(lua_gettop(L)>=3){
10827 arg4 = (PLBOOL)lua_tonumber(L, 3);
10828 }
10829 plsvect((double const *)arg1,(double const *)arg2,arg3,arg4);
10830
10831 {
10832 LUA_FREE_ARRAY( arg2 );
10833 }
10834 return SWIG_arg;
10835
10836 fail: SWIGUNUSED;
10837 {
10838 LUA_FREE_ARRAY( arg2 );
10839 }
10840 lua_error(L);
10841 return 0;
10842}
10843
10844
10845static int _wrap_svpa(lua_State* L) {
10846 int SWIG_arg = 0;
10847 PLFLT arg1 ;
10848 PLFLT arg2 ;
10849 PLFLT arg3 ;
10850 PLFLT arg4 ;
10851
10852 SWIG_check_num_args("plsvpa",4,4)
10853 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsvpa",1,"PLFLT");
10854 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsvpa",2,"PLFLT");
10855 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsvpa",3,"PLFLT");
10856 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsvpa",4,"PLFLT");
10857 arg1 = (PLFLT)lua_tonumber(L, 1);
10858 arg2 = (PLFLT)lua_tonumber(L, 2);
10859 arg3 = (PLFLT)lua_tonumber(L, 3);
10860 arg4 = (PLFLT)lua_tonumber(L, 4);
10861 plsvpa(arg1,arg2,arg3,arg4);
10862
10863 return SWIG_arg;
10864
10865 fail: SWIGUNUSED;
10866 lua_error(L);
10867 return 0;
10868}
10869
10870
10871static int _wrap_sxax(lua_State* L) {
10872 int SWIG_arg = 0;
10873 PLINT arg1 ;
10874 PLINT arg2 ;
10875
10876 SWIG_check_num_args("plsxax",2,2)
10877 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsxax",1,"PLINT");
10878 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsxax",2,"PLINT");
10879 arg1 = (PLINT)lua_tonumber(L, 1);
10880 arg2 = (PLINT)lua_tonumber(L, 2);
10881 plsxax(arg1,arg2);
10882
10883 return SWIG_arg;
10884
10885 fail: SWIGUNUSED;
10886 lua_error(L);
10887 return 0;
10888}
10889
10890
10891static int _wrap_syax(lua_State* L) {
10892 int SWIG_arg = 0;
10893 PLINT arg1 ;
10894 PLINT arg2 ;
10895
10896 SWIG_check_num_args("plsyax",2,2)
10897 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsyax",1,"PLINT");
10898 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsyax",2,"PLINT");
10899 arg1 = (PLINT)lua_tonumber(L, 1);
10900 arg2 = (PLINT)lua_tonumber(L, 2);
10901 plsyax(arg1,arg2);
10902
10903 return SWIG_arg;
10904
10905 fail: SWIGUNUSED;
10906 lua_error(L);
10907 return 0;
10908}
10909
10910
10911static int _wrap_sym(lua_State* L) {
10912 int SWIG_arg = 0;
10913 PLINT arg1 ;
10914 PLFLT *arg2 = 0 ;
10915 PLFLT *arg3 = 0 ;
10916 PLINT arg4 ;
10917 int temp3 ;
10918
10919 SWIG_check_num_args("plsym",3,3)
10920 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsym",3,"PLINT");
10921 {
10922 int temp;
10923 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10924 if ( !arg2 )
10925 SWIG_fail;
10926 arg1 = Alen = temp;
10927 }
10928 {
10929 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10930 if ( !arg3 )
10931 SWIG_fail;
10932 if ( temp3 != Alen )
10933 {
10934 lua_pushfstring( L, "Tables must be of same length." );
10935 SWIG_fail;
10936 }
10937 }
10938 arg4 = (PLINT)lua_tonumber(L, 3);
10939 plsym(arg1,(double const *)arg2,(double const *)arg3,arg4);
10940
10941 {
10942 LUA_FREE_ARRAY( arg2 );
10943 }
10944 {
10945 LUA_FREE_ARRAY( arg3 );
10946 }
10947 return SWIG_arg;
10948
10949 fail: SWIGUNUSED;
10950 {
10951 LUA_FREE_ARRAY( arg2 );
10952 }
10953 {
10954 LUA_FREE_ARRAY( arg3 );
10955 }
10956 lua_error(L);
10957 return 0;
10958}
10959
10960
10961static int _wrap_szax(lua_State* L) {
10962 int SWIG_arg = 0;
10963 PLINT arg1 ;
10964 PLINT arg2 ;
10965
10966 SWIG_check_num_args("plszax",2,2)
10967 if(!lua_isnumber(L,1)) SWIG_fail_arg("plszax",1,"PLINT");
10968 if(!lua_isnumber(L,2)) SWIG_fail_arg("plszax",2,"PLINT");
10969 arg1 = (PLINT)lua_tonumber(L, 1);
10970 arg2 = (PLINT)lua_tonumber(L, 2);
10971 plszax(arg1,arg2);
10972
10973 return SWIG_arg;
10974
10975 fail: SWIGUNUSED;
10976 lua_error(L);
10977 return 0;
10978}
10979
10980
10981static int _wrap_text(lua_State* L) {
10982 int SWIG_arg = 0;
10983
10984 SWIG_check_num_args("pltext",0,0)
10985 pltext();
10986
10987 return SWIG_arg;
10988
10989 fail: SWIGUNUSED;
10990 lua_error(L);
10991 return 0;
10992}
10993
10994
10995static int _wrap_timefmt(lua_State* L) {
10996 int SWIG_arg = 0;
10997 char *arg1 = 0 ;
10998
10999 SWIG_check_num_args("pltimefmt",1,1)
11000 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("pltimefmt",1,"char const *");
11001 arg1 = (char *)lua_tostring(L, 1);
11002 pltimefmt((char const *)arg1);
11003
11004 return SWIG_arg;
11005
11006 fail: SWIGUNUSED;
11007 lua_error(L);
11008 return 0;
11009}
11010
11011
11012static int _wrap_vasp(lua_State* L) {
11013 int SWIG_arg = 0;
11014 PLFLT arg1 ;
11015
11016 SWIG_check_num_args("plvasp",1,1)
11017 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvasp",1,"PLFLT");
11018 arg1 = (PLFLT)lua_tonumber(L, 1);
11019 plvasp(arg1);
11020
11021 return SWIG_arg;
11022
11023 fail: SWIGUNUSED;
11024 lua_error(L);
11025 return 0;
11026}
11027
11028
11029static int _wrap_vect(lua_State* L) {
11030 int SWIG_arg = 0;
11031 PLFLT **arg1 = 0 ;
11032 PLFLT **arg2 = 0 ;
11033 PLINT arg3 ;
11034 PLINT arg4 ;
11035 PLFLT arg5 ;
11036 pltr_func arg6 = 0 ;
11037 PLPointer arg7 = 0 ;
11038 int ii1 ;
11039 int ii2 ;
11040 PLcGrid cgrid17 ;
11041 PLcGrid2 cgrid27 ;
11042
11043 {
11044 cgrid17.xg = cgrid17.yg = cgrid17.zg = NULL;
11045 cgrid17.nx = cgrid17.ny = cgrid17.nz = 0;
11046 cgrid27.xg = cgrid27.yg = cgrid27.zg = NULL;
11047 cgrid27.nx = cgrid27.ny = 0;
11048 }
11049 {
11050 arg6 = NULL;
11051 }
11052 {
11053 arg7 = NULL;
11054 }
11055 SWIG_check_num_args("plvect",3,5)
11056 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvect",3,"PLFLT");
11057 {
11058 int jj;
11059
11060 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
11061 if ( !arg1 )
11062 SWIG_fail;
11063 Xlen = ii1;
11064 Ylen = jj;
11065 }
11066 {
11067 int jj;
11068
11069 arg2 = read_double_Matrix( L, 2, &ii2, &jj );
11070 if ( !arg2 )
11071 SWIG_fail;
11072 arg3 = ii2;
11073 arg4 = jj;
11074 if ( ( arg3 != Xlen ) || ( arg4 != Ylen ) )
11075 {
11076 lua_pushfstring( L, "Vectors must match matrix." );
11077 SWIG_fail;
11078 }
11079 }
11080 arg5 = (PLFLT)lua_tonumber(L, 3);
11081 if(lua_gettop(L)>=4){
11082 {
11083 arg6 = NULL;
11084 mypltr_funcstr[0] = '\0';
11085
11086 if ( lua_isstring( L, 4 ) )
11087 {
11088 const char* funcstr = lua_tostring( L, 4 );
11089 if ( strcmp( "pltr0", funcstr ) == 0 )
11090 {
11091 arg6 = pltr0;
11092 }
11093 else if ( strcmp( "pltr1", funcstr ) == 0 )
11094 {
11095 arg6 = pltr1;
11096 }
11097 else if ( strcmp( "pltr2", funcstr ) == 0 )
11098 {
11099 arg6 = pltr2;
11100 }
11101 else
11102 {
11103 arg6 = mypltr;
11104 strncpy( mypltr_funcstr, funcstr, 255 );
11105 myL = L;
11106 }
11107 }
11108 else
11109 SWIG_fail_arg( "vect", 6, "pltr_func" );
11110 }
11111 }
11112 if(lua_gettop(L)>=5){
11113 {
11114 int nx, ny;
11115 int gridmode = 0;
11116
11117 lua_pushstring( L, "xg" );
11118 lua_gettable( L, 5 );
11119 if ( !lua_istable( L, -1 ) )
11120 {
11121 lua_pop( L, 1 ); // pop "xg"
11122 lua_pushstring( L, "expected a table xg" );
11123 SWIG_fail;
11124 }
11125 lua_rawgeti( L, -1, 1 );
11126 if ( lua_istable( L, -1 ) )
11127 gridmode = 2; // two dimensional array
11128 else if ( lua_isnumber( L, -1 ) )
11129 gridmode = 1; // one dimensional array
11130 else
11131 {
11132 lua_pop( L, 1 ); // pop "1"
11133 lua_pop( L, 1 ); // pop "xg"
11134 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
11135 SWIG_fail;
11136 }
11137 lua_pop( L, 1 ); // pop test element
11138 if ( gridmode == 1 )
11139 {
11140 cgrid17.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
11141 if ( !cgrid17.xg )
11142 {
11143 lua_pop( L, 1 ); // pop "xg"
11144 SWIG_fail;
11145 }
11146 if ( nx != Xlen )
11147 {
11148 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
11149 SWIG_fail;
11150 }
11151 cgrid17.nx = nx;
11152 }
11153 else
11154 {
11155 cgrid27.xg = read_double_Matrix( L, -1, &nx, &ny );
11156 if ( !cgrid27.xg )
11157 {
11158 lua_pop( L, 1 ); // pop "xg"
11159 SWIG_fail;
11160 }
11161 if ( ( nx != Xlen ) || ( ny != Ylen ) )
11162 {
11163 lua_pop( L, 1 ); // pop "xg"
11164 lua_pushfstring( L, "Vectors must match matrix." );
11165 SWIG_fail;
11166 }
11167 cgrid27.nx = nx;
11168 cgrid27.ny = ny;
11169 }
11170 lua_pop( L, 1 ); // pop "xg"
11171
11172 lua_pushstring( L, "yg" );
11173 lua_gettable( L, 5 );
11174 if ( !lua_istable( L, -1 ) )
11175 {
11176 lua_pop( L, 1 );
11177 lua_pushstring( L, "expected a table yg" );
11178 SWIG_fail;
11179 }
11180 lua_rawgeti( L, -1, 1 );
11181 if ( gridmode == 2 )
11182 {
11183 if ( !lua_istable( L, -1 ) )
11184 {
11185 lua_pop( L, 1 ); // pop "1"
11186 lua_pop( L, 1 ); // pop "yg"
11187 lua_pushstring( L, "expected a two dimensional array/table in yg" );
11188 SWIG_fail;
11189 }
11190 }
11191 else
11192 {
11193 if ( !lua_isnumber( L, -1 ) )
11194 {
11195 lua_pop( L, 1 ); // pop "1"
11196 lua_pop( L, 1 ); // pop "yg"
11197 lua_pushstring( L, "expected a one dimensional array/table in yg" );
11198 SWIG_fail;
11199 }
11200 }
11201 lua_pop( L, 1 ); // pop "1"
11202 if ( gridmode == 1 )
11203 {
11204 cgrid17.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
11205 if ( !cgrid17.yg )
11206 {
11207 lua_pop( L, 1 ); // pop "yg"
11208 SWIG_fail;
11209 }
11210 if ( ny != Ylen )
11211 {
11212 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
11213 SWIG_fail;
11214 }
11215 cgrid17.ny = ny;
11216 }
11217 else
11218 {
11219 cgrid27.yg = read_double_Matrix( L, -1, &nx, &ny );
11220 if ( !cgrid27.yg )
11221 {
11222 lua_pop( L, 1 ); // pop "xg"
11223 SWIG_fail;
11224 }
11225 if ( ( nx != Xlen ) || ( ny != Ylen ) )
11226 {
11227 lua_pop( L, 1 ); // pop "xg"
11228 lua_pushfstring( L, "Vectors must match matrix." );
11229 SWIG_fail;
11230 }
11231 // cgrid27.nx/ny already set
11232 }
11233 lua_pop( L, 1 ); // pop "yg"
11234
11235 if ( gridmode == 1 )
11236 arg7 = &cgrid17;
11237 else if ( gridmode == 2 )
11238 arg7 = &cgrid27;
11239 }
11240 }
11241 plvect((double const **)arg1,(double const **)arg2,arg3,arg4,arg5,arg6,arg7);
11242
11243 {
11244 int i;
11245
11246 if ( arg1 )
11247 {
11248 for ( i = 0; i < ii1; i++ )
11249 LUA_FREE_ARRAY( arg1[i] );
11250 LUA_FREE_ARRAY( arg1 );
11251 }
11252 }
11253 {
11254 int i;
11255
11256 if ( arg2 )
11257 {
11258 for ( i = 0; i < ii2; i++ )
11259 LUA_FREE_ARRAY( arg2[i] );
11260 LUA_FREE_ARRAY( arg2 );
11261 }
11262 }
11263 {
11264 mypltr_funcstr[0] = '\0';
11265 }
11266 {
11267 int i;
11268
11269 LUA_FREE_ARRAY( cgrid17.xg );
11270 LUA_FREE_ARRAY( cgrid17.yg );
11271
11272 if ( cgrid27.xg )
11273 {
11274 for ( i = 0; i < Xlen; i++ )
11275 LUA_FREE_ARRAY( cgrid27.xg[i] );
11276 LUA_FREE_ARRAY( cgrid27.xg );
11277 }
11278 if ( cgrid27.yg )
11279 {
11280 for ( i = 0; i < Xlen; i++ )
11281 LUA_FREE_ARRAY( cgrid27.yg[i] );
11282 LUA_FREE_ARRAY( cgrid27.yg );
11283 }
11284 }
11285 return SWIG_arg;
11286
11287 fail: SWIGUNUSED;
11288 {
11289 int i;
11290
11291 if ( arg1 )
11292 {
11293 for ( i = 0; i < ii1; i++ )
11294 LUA_FREE_ARRAY( arg1[i] );
11295 LUA_FREE_ARRAY( arg1 );
11296 }
11297 }
11298 {
11299 int i;
11300
11301 if ( arg2 )
11302 {
11303 for ( i = 0; i < ii2; i++ )
11304 LUA_FREE_ARRAY( arg2[i] );
11305 LUA_FREE_ARRAY( arg2 );
11306 }
11307 }
11308 {
11309 mypltr_funcstr[0] = '\0';
11310 }
11311 {
11312 int i;
11313
11314 LUA_FREE_ARRAY( cgrid17.xg );
11315 LUA_FREE_ARRAY( cgrid17.yg );
11316
11317 if ( cgrid27.xg )
11318 {
11319 for ( i = 0; i < Xlen; i++ )
11320 LUA_FREE_ARRAY( cgrid27.xg[i] );
11321 LUA_FREE_ARRAY( cgrid27.xg );
11322 }
11323 if ( cgrid27.yg )
11324 {
11325 for ( i = 0; i < Xlen; i++ )
11326 LUA_FREE_ARRAY( cgrid27.yg[i] );
11327 LUA_FREE_ARRAY( cgrid27.yg );
11328 }
11329 }
11330 lua_error(L);
11331 return 0;
11332}
11333
11334
11335static int _wrap_vpas(lua_State* L) {
11336 int SWIG_arg = 0;
11337 PLFLT arg1 ;
11338 PLFLT arg2 ;
11339 PLFLT arg3 ;
11340 PLFLT arg4 ;
11341 PLFLT arg5 ;
11342
11343 SWIG_check_num_args("plvpas",5,5)
11344 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvpas",1,"PLFLT");
11345 if(!lua_isnumber(L,2)) SWIG_fail_arg("plvpas",2,"PLFLT");
11346 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvpas",3,"PLFLT");
11347 if(!lua_isnumber(L,4)) SWIG_fail_arg("plvpas",4,"PLFLT");
11348 if(!lua_isnumber(L,5)) SWIG_fail_arg("plvpas",5,"PLFLT");
11349 arg1 = (PLFLT)lua_tonumber(L, 1);
11350 arg2 = (PLFLT)lua_tonumber(L, 2);
11351 arg3 = (PLFLT)lua_tonumber(L, 3);
11352 arg4 = (PLFLT)lua_tonumber(L, 4);
11353 arg5 = (PLFLT)lua_tonumber(L, 5);
11354 plvpas(arg1,arg2,arg3,arg4,arg5);
11355
11356 return SWIG_arg;
11357
11358 fail: SWIGUNUSED;
11359 lua_error(L);
11360 return 0;
11361}
11362
11363
11364static int _wrap_vpor(lua_State* L) {
11365 int SWIG_arg = 0;
11366 PLFLT arg1 ;
11367 PLFLT arg2 ;
11368 PLFLT arg3 ;
11369 PLFLT arg4 ;
11370
11371 SWIG_check_num_args("plvpor",4,4)
11372 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvpor",1,"PLFLT");
11373 if(!lua_isnumber(L,2)) SWIG_fail_arg("plvpor",2,"PLFLT");
11374 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvpor",3,"PLFLT");
11375 if(!lua_isnumber(L,4)) SWIG_fail_arg("plvpor",4,"PLFLT");
11376 arg1 = (PLFLT)lua_tonumber(L, 1);
11377 arg2 = (PLFLT)lua_tonumber(L, 2);
11378 arg3 = (PLFLT)lua_tonumber(L, 3);
11379 arg4 = (PLFLT)lua_tonumber(L, 4);
11380 plvpor(arg1,arg2,arg3,arg4);
11381
11382 return SWIG_arg;
11383
11384 fail: SWIGUNUSED;
11385 lua_error(L);
11386 return 0;
11387}
11388
11389
11390static int _wrap_vsta(lua_State* L) {
11391 int SWIG_arg = 0;
11392
11393 SWIG_check_num_args("plvsta",0,0)
11394 plvsta();
11395
11396 return SWIG_arg;
11397
11398 fail: SWIGUNUSED;
11399 lua_error(L);
11400 return 0;
11401}
11402
11403
11404static int _wrap_w3d(lua_State* L) {
11405 int SWIG_arg = 0;
11406 PLFLT arg1 ;
11407 PLFLT arg2 ;
11408 PLFLT arg3 ;
11409 PLFLT arg4 ;
11410 PLFLT arg5 ;
11411 PLFLT arg6 ;
11412 PLFLT arg7 ;
11413 PLFLT arg8 ;
11414 PLFLT arg9 ;
11415 PLFLT arg10 ;
11416 PLFLT arg11 ;
11417
11418 SWIG_check_num_args("plw3d",11,11)
11419 if(!lua_isnumber(L,1)) SWIG_fail_arg("plw3d",1,"PLFLT");
11420 if(!lua_isnumber(L,2)) SWIG_fail_arg("plw3d",2,"PLFLT");
11421 if(!lua_isnumber(L,3)) SWIG_fail_arg("plw3d",3,"PLFLT");
11422 if(!lua_isnumber(L,4)) SWIG_fail_arg("plw3d",4,"PLFLT");
11423 if(!lua_isnumber(L,5)) SWIG_fail_arg("plw3d",5,"PLFLT");
11424 if(!lua_isnumber(L,6)) SWIG_fail_arg("plw3d",6,"PLFLT");
11425 if(!lua_isnumber(L,7)) SWIG_fail_arg("plw3d",7,"PLFLT");
11426 if(!lua_isnumber(L,8)) SWIG_fail_arg("plw3d",8,"PLFLT");
11427 if(!lua_isnumber(L,9)) SWIG_fail_arg("plw3d",9,"PLFLT");
11428 if(!lua_isnumber(L,10)) SWIG_fail_arg("plw3d",10,"PLFLT");
11429 if(!lua_isnumber(L,11)) SWIG_fail_arg("plw3d",11,"PLFLT");
11430 arg1 = (PLFLT)lua_tonumber(L, 1);
11431 arg2 = (PLFLT)lua_tonumber(L, 2);
11432 arg3 = (PLFLT)lua_tonumber(L, 3);
11433 arg4 = (PLFLT)lua_tonumber(L, 4);
11434 arg5 = (PLFLT)lua_tonumber(L, 5);
11435 arg6 = (PLFLT)lua_tonumber(L, 6);
11436 arg7 = (PLFLT)lua_tonumber(L, 7);
11437 arg8 = (PLFLT)lua_tonumber(L, 8);
11438 arg9 = (PLFLT)lua_tonumber(L, 9);
11439 arg10 = (PLFLT)lua_tonumber(L, 10);
11440 arg11 = (PLFLT)lua_tonumber(L, 11);
11441 plw3d(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
11442
11443 return SWIG_arg;
11444
11445 fail: SWIGUNUSED;
11446 lua_error(L);
11447 return 0;
11448}
11449
11450
11451static int _wrap_width(lua_State* L) {
11452 int SWIG_arg = 0;
11453 PLFLT arg1 ;
11454
11455 SWIG_check_num_args("plwidth",1,1)
11456 if(!lua_isnumber(L,1)) SWIG_fail_arg("plwidth",1,"PLFLT");
11457 arg1 = (PLFLT)lua_tonumber(L, 1);
11458 plwidth(arg1);
11459
11460 return SWIG_arg;
11461
11462 fail: SWIGUNUSED;
11463 lua_error(L);
11464 return 0;
11465}
11466
11467
11468static int _wrap_wind(lua_State* L) {
11469 int SWIG_arg = 0;
11470 PLFLT arg1 ;
11471 PLFLT arg2 ;
11472 PLFLT arg3 ;
11473 PLFLT arg4 ;
11474
11475 SWIG_check_num_args("plwind",4,4)
11476 if(!lua_isnumber(L,1)) SWIG_fail_arg("plwind",1,"PLFLT");
11477 if(!lua_isnumber(L,2)) SWIG_fail_arg("plwind",2,"PLFLT");
11478 if(!lua_isnumber(L,3)) SWIG_fail_arg("plwind",3,"PLFLT");
11479 if(!lua_isnumber(L,4)) SWIG_fail_arg("plwind",4,"PLFLT");
11480 arg1 = (PLFLT)lua_tonumber(L, 1);
11481 arg2 = (PLFLT)lua_tonumber(L, 2);
11482 arg3 = (PLFLT)lua_tonumber(L, 3);
11483 arg4 = (PLFLT)lua_tonumber(L, 4);
11484 plwind(arg1,arg2,arg3,arg4);
11485
11486 return SWIG_arg;
11487
11488 fail: SWIGUNUSED;
11489 lua_error(L);
11490 return 0;
11491}
11492
11493
11494static int _wrap_xormod(lua_State* L) {
11495 int SWIG_arg = 0;
11496 PLBOOL arg1 ;
11497 PLBOOL *arg2 = 0 ;
11498 PLBOOL temp2 ;
11499
11500 arg2 = &temp2;
11501 SWIG_check_num_args("plxormod",1,1)
11502 if(!lua_isnumber(L,1)) SWIG_fail_arg("plxormod",1,"PLBOOL");
11503 arg1 = (PLBOOL)lua_tonumber(L, 1);
11504 plxormod(arg1,arg2);
11505
11506 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
11507 return SWIG_arg;
11508
11509 fail: SWIGUNUSED;
11510 lua_error(L);
11511 return 0;
11512}
11513
11514
11515static int _wrap_map(lua_State* L) {
11516 int SWIG_arg = 0;
11517 mapform_func arg1 = 0 ;
11518 char *arg2 = 0 ;
11519 PLFLT arg3 ;
11520 PLFLT arg4 ;
11521 PLFLT arg5 ;
11522 PLFLT arg6 ;
11523
11524 SWIG_check_num_args("plmap",6,6)
11525 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmap",2,"char const *");
11526 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmap",3,"PLFLT");
11527 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmap",4,"PLFLT");
11528 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmap",5,"PLFLT");
11529 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmap",6,"PLFLT");
11530 {
11531 arg1 = NULL;
11532 mapform_funcstr[0] = '\0';
11533
11534 if ( lua_isnil( L, 1 ) )
11535 {
11536 arg1 = NULL;
11537 }
11538 else if ( lua_isstring( L, 1 ) )
11539 {
11540 arg1 = mapform;
11541 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11542 myL = L;
11543 }
11544 else
11545 SWIG_fail_arg( "map", 1, "mapform_func" );
11546 }
11547 arg2 = (char *)lua_tostring(L, 2);
11548 arg3 = (PLFLT)lua_tonumber(L, 3);
11549 arg4 = (PLFLT)lua_tonumber(L, 4);
11550 arg5 = (PLFLT)lua_tonumber(L, 5);
11551 arg6 = (PLFLT)lua_tonumber(L, 6);
11552 plmap(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
11553
11554 {
11555 mapform_funcstr[0] = '\0';
11556 }
11557 return SWIG_arg;
11558
11559 fail: SWIGUNUSED;
11560 {
11561 mapform_funcstr[0] = '\0';
11562 }
11563 lua_error(L);
11564 return 0;
11565}
11566
11567
11568static int _wrap_mapline(lua_State* L) {
11569 int SWIG_arg = 0;
11570 mapform_func arg1 = 0 ;
11571 char *arg2 = 0 ;
11572 PLFLT arg3 ;
11573 PLFLT arg4 ;
11574 PLFLT arg5 ;
11575 PLFLT arg6 ;
11576 PLINT *arg7 = 0 ;
11577 PLINT arg8 ;
11578 int temp7 ;
11579
11580 SWIG_check_num_args("plmapline",7,7)
11581 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapline",2,"char const *");
11582 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmapline",3,"PLFLT");
11583 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapline",4,"PLFLT");
11584 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapline",5,"PLFLT");
11585 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapline",6,"PLFLT");
11586 {
11587 arg1 = NULL;
11588 mapform_funcstr[0] = '\0';
11589
11590 if ( lua_isnil( L, 1 ) )
11591 {
11592 arg1 = NULL;
11593 }
11594 else if ( lua_isstring( L, 1 ) )
11595 {
11596 arg1 = mapform;
11597 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11598 myL = L;
11599 }
11600 else
11601 SWIG_fail_arg( "mapline", 1, "mapform_func" );
11602 }
11603 arg2 = (char *)lua_tostring(L, 2);
11604 arg3 = (PLFLT)lua_tonumber(L, 3);
11605 arg4 = (PLFLT)lua_tonumber(L, 4);
11606 arg5 = (PLFLT)lua_tonumber(L, 5);
11607 arg6 = (PLFLT)lua_tonumber(L, 6);
11608 {
11609 if ( lua_isnil( L, 7 ) )
11610 {
11611 arg7 = NULL;
11612 arg8 = 0;
11613 }
11614 else
11615 {
11616 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp7 );
11617 if ( !arg7 )
11618 SWIG_fail;
11619 arg8 = temp7;
11620 }
11621 }
11622 plmapline(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,(int const *)arg7,arg8);
11623
11624 {
11625 mapform_funcstr[0] = '\0';
11626 }
11627 {
11628 LUA_FREE_ARRAY( arg7 );
11629 }
11630 return SWIG_arg;
11631
11632 fail: SWIGUNUSED;
11633 {
11634 mapform_funcstr[0] = '\0';
11635 }
11636 {
11637 LUA_FREE_ARRAY( arg7 );
11638 }
11639 lua_error(L);
11640 return 0;
11641}
11642
11643
11644static int _wrap_mapstring(lua_State* L) {
11645 int SWIG_arg = 0;
11646 mapform_func arg1 = 0 ;
11647 char *arg2 = 0 ;
11648 char *arg3 = 0 ;
11649 PLFLT arg4 ;
11650 PLFLT arg5 ;
11651 PLFLT arg6 ;
11652 PLFLT arg7 ;
11653 PLINT *arg8 = 0 ;
11654 PLINT arg9 ;
11655 int temp8 ;
11656
11657 SWIG_check_num_args("plmapstring",8,8)
11658 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapstring",2,"char const *");
11659 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plmapstring",3,"char const *");
11660 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapstring",4,"PLFLT");
11661 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapstring",5,"PLFLT");
11662 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapstring",6,"PLFLT");
11663 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmapstring",7,"PLFLT");
11664 {
11665 arg1 = NULL;
11666 mapform_funcstr[0] = '\0';
11667
11668 if ( lua_isnil( L, 1 ) )
11669 {
11670 arg1 = NULL;
11671 }
11672 else if ( lua_isstring( L, 1 ) )
11673 {
11674 arg1 = mapform;
11675 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11676 myL = L;
11677 }
11678 else
11679 SWIG_fail_arg( "mapstring", 1, "mapform_func" );
11680 }
11681 arg2 = (char *)lua_tostring(L, 2);
11682 arg3 = (char *)lua_tostring(L, 3);
11683 arg4 = (PLFLT)lua_tonumber(L, 4);
11684 arg5 = (PLFLT)lua_tonumber(L, 5);
11685 arg6 = (PLFLT)lua_tonumber(L, 6);
11686 arg7 = (PLFLT)lua_tonumber(L, 7);
11687 {
11688 if ( lua_isnil( L, 8 ) )
11689 {
11690 arg8 = NULL;
11691 arg9 = 0;
11692 }
11693 else
11694 {
11695 arg8 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp8 );
11696 if ( !arg8 )
11697 SWIG_fail;
11698 arg9 = temp8;
11699 }
11700 }
11701 plmapstring(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7,(int const *)arg8,arg9);
11702
11703 {
11704 mapform_funcstr[0] = '\0';
11705 }
11706 {
11707 LUA_FREE_ARRAY( arg8 );
11708 }
11709 return SWIG_arg;
11710
11711 fail: SWIGUNUSED;
11712 {
11713 mapform_funcstr[0] = '\0';
11714 }
11715 {
11716 LUA_FREE_ARRAY( arg8 );
11717 }
11718 lua_error(L);
11719 return 0;
11720}
11721
11722
11723static int _wrap_maptex(lua_State* L) {
11724 int SWIG_arg = 0;
11725 mapform_func arg1 = 0 ;
11726 char *arg2 = 0 ;
11727 PLFLT arg3 ;
11728 PLFLT arg4 ;
11729 PLFLT arg5 ;
11730 char *arg6 = 0 ;
11731 PLFLT arg7 ;
11732 PLFLT arg8 ;
11733 PLFLT arg9 ;
11734 PLFLT arg10 ;
11735 PLINT arg11 ;
11736
11737 SWIG_check_num_args("plmaptex",11,11)
11738 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmaptex",2,"char const *");
11739 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmaptex",3,"PLFLT");
11740 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmaptex",4,"PLFLT");
11741 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmaptex",5,"PLFLT");
11742 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plmaptex",6,"char const *");
11743 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmaptex",7,"PLFLT");
11744 if(!lua_isnumber(L,8)) SWIG_fail_arg("plmaptex",8,"PLFLT");
11745 if(!lua_isnumber(L,9)) SWIG_fail_arg("plmaptex",9,"PLFLT");
11746 if(!lua_isnumber(L,10)) SWIG_fail_arg("plmaptex",10,"PLFLT");
11747 if(!lua_isnumber(L,11)) SWIG_fail_arg("plmaptex",11,"PLINT");
11748 {
11749 arg1 = NULL;
11750 mapform_funcstr[0] = '\0';
11751
11752 if ( lua_isnil( L, 1 ) )
11753 {
11754 arg1 = NULL;
11755 }
11756 else if ( lua_isstring( L, 1 ) )
11757 {
11758 arg1 = mapform;
11759 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11760 myL = L;
11761 }
11762 else
11763 SWIG_fail_arg( "maptex", 1, "mapform_func" );
11764 }
11765 arg2 = (char *)lua_tostring(L, 2);
11766 arg3 = (PLFLT)lua_tonumber(L, 3);
11767 arg4 = (PLFLT)lua_tonumber(L, 4);
11768 arg5 = (PLFLT)lua_tonumber(L, 5);
11769 arg6 = (char *)lua_tostring(L, 6);
11770 arg7 = (PLFLT)lua_tonumber(L, 7);
11771 arg8 = (PLFLT)lua_tonumber(L, 8);
11772 arg9 = (PLFLT)lua_tonumber(L, 9);
11773 arg10 = (PLFLT)lua_tonumber(L, 10);
11774 arg11 = (PLINT)lua_tonumber(L, 11);
11775 plmaptex(arg1,(char const *)arg2,arg3,arg4,arg5,(char const *)arg6,arg7,arg8,arg9,arg10,arg11);
11776
11777 {
11778 mapform_funcstr[0] = '\0';
11779 }
11780 return SWIG_arg;
11781
11782 fail: SWIGUNUSED;
11783 {
11784 mapform_funcstr[0] = '\0';
11785 }
11786 lua_error(L);
11787 return 0;
11788}
11789
11790
11791static int _wrap_mapfill(lua_State* L) {
11792 int SWIG_arg = 0;
11793 mapform_func arg1 = 0 ;
11794 char *arg2 = 0 ;
11795 PLFLT arg3 ;
11796 PLFLT arg4 ;
11797 PLFLT arg5 ;
11798 PLFLT arg6 ;
11799 PLINT *arg7 = 0 ;
11800 PLINT arg8 ;
11801 int temp7 ;
11802
11803 SWIG_check_num_args("plmapfill",7,7)
11804 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapfill",2,"char const *");
11805 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmapfill",3,"PLFLT");
11806 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapfill",4,"PLFLT");
11807 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapfill",5,"PLFLT");
11808 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapfill",6,"PLFLT");
11809 {
11810 arg1 = NULL;
11811 mapform_funcstr[0] = '\0';
11812
11813 if ( lua_isnil( L, 1 ) )
11814 {
11815 arg1 = NULL;
11816 }
11817 else if ( lua_isstring( L, 1 ) )
11818 {
11819 arg1 = mapform;
11820 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11821 myL = L;
11822 }
11823 else
11824 SWIG_fail_arg( "mapfill", 1, "mapform_func" );
11825 }
11826 arg2 = (char *)lua_tostring(L, 2);
11827 arg3 = (PLFLT)lua_tonumber(L, 3);
11828 arg4 = (PLFLT)lua_tonumber(L, 4);
11829 arg5 = (PLFLT)lua_tonumber(L, 5);
11830 arg6 = (PLFLT)lua_tonumber(L, 6);
11831 {
11832 if ( lua_isnil( L, 7 ) )
11833 {
11834 arg7 = NULL;
11835 arg8 = 0;
11836 }
11837 else
11838 {
11839 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp7 );
11840 if ( !arg7 )
11841 SWIG_fail;
11842 arg8 = temp7;
11843 }
11844 }
11845 plmapfill(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,(int const *)arg7,arg8);
11846
11847 {
11848 mapform_funcstr[0] = '\0';
11849 }
11850 {
11851 LUA_FREE_ARRAY( arg7 );
11852 }
11853 return SWIG_arg;
11854
11855 fail: SWIGUNUSED;
11856 {
11857 mapform_funcstr[0] = '\0';
11858 }
11859 {
11860 LUA_FREE_ARRAY( arg7 );
11861 }
11862 lua_error(L);
11863 return 0;
11864}
11865
11866
11867static int _wrap_meridians(lua_State* L) {
11868 int SWIG_arg = 0;
11869 mapform_func arg1 = 0 ;
11870 PLFLT arg2 ;
11871 PLFLT arg3 ;
11872 PLFLT arg4 ;
11873 PLFLT arg5 ;
11874 PLFLT arg6 ;
11875 PLFLT arg7 ;
11876
11877 SWIG_check_num_args("plmeridians",7,7)
11878 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmeridians",2,"PLFLT");
11879 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmeridians",3,"PLFLT");
11880 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmeridians",4,"PLFLT");
11881 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmeridians",5,"PLFLT");
11882 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmeridians",6,"PLFLT");
11883 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmeridians",7,"PLFLT");
11884 {
11885 arg1 = NULL;
11886 mapform_funcstr[0] = '\0';
11887
11888 if ( lua_isnil( L, 1 ) )
11889 {
11890 arg1 = NULL;
11891 }
11892 else if ( lua_isstring( L, 1 ) )
11893 {
11894 arg1 = mapform;
11895 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11896 myL = L;
11897 }
11898 else
11899 SWIG_fail_arg( "meridians", 1, "mapform_func" );
11900 }
11901 arg2 = (PLFLT)lua_tonumber(L, 2);
11902 arg3 = (PLFLT)lua_tonumber(L, 3);
11903 arg4 = (PLFLT)lua_tonumber(L, 4);
11904 arg5 = (PLFLT)lua_tonumber(L, 5);
11905 arg6 = (PLFLT)lua_tonumber(L, 6);
11906 arg7 = (PLFLT)lua_tonumber(L, 7);
11907 plmeridians(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
11908
11909 {
11910 mapform_funcstr[0] = '\0';
11911 }
11912 return SWIG_arg;
11913
11914 fail: SWIGUNUSED;
11915 {
11916 mapform_funcstr[0] = '\0';
11917 }
11918 lua_error(L);
11919 return 0;
11920}
11921
11922
11923static int _wrap_image(lua_State* L) {
11924 int SWIG_arg = 0;
11925 PLFLT **arg1 = 0 ;
11926 PLINT arg2 ;
11927 PLINT arg3 ;
11928 PLFLT arg4 ;
11929 PLFLT arg5 ;
11930 PLFLT arg6 ;
11931 PLFLT arg7 ;
11932 PLFLT arg8 ;
11933 PLFLT arg9 ;
11934 PLFLT arg10 ;
11935 PLFLT arg11 ;
11936 PLFLT arg12 ;
11937 PLFLT arg13 ;
11938 int ii1 ;
11939
11940 SWIG_check_num_args("plimage",11,11)
11941 if(!lua_isnumber(L,2)) SWIG_fail_arg("plimage",2,"PLFLT");
11942 if(!lua_isnumber(L,3)) SWIG_fail_arg("plimage",3,"PLFLT");
11943 if(!lua_isnumber(L,4)) SWIG_fail_arg("plimage",4,"PLFLT");
11944 if(!lua_isnumber(L,5)) SWIG_fail_arg("plimage",5,"PLFLT");
11945 if(!lua_isnumber(L,6)) SWIG_fail_arg("plimage",6,"PLFLT");
11946 if(!lua_isnumber(L,7)) SWIG_fail_arg("plimage",7,"PLFLT");
11947 if(!lua_isnumber(L,8)) SWIG_fail_arg("plimage",8,"PLFLT");
11948 if(!lua_isnumber(L,9)) SWIG_fail_arg("plimage",9,"PLFLT");
11949 if(!lua_isnumber(L,10)) SWIG_fail_arg("plimage",10,"PLFLT");
11950 if(!lua_isnumber(L,11)) SWIG_fail_arg("plimage",11,"PLFLT");
11951 {
11952 int jj;
11953
11954 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
11955 if ( !arg1 )
11956 SWIG_fail;
11957 Xlen = arg2 = ii1;
11958 Ylen = arg3 = jj;
11959 }
11960 arg4 = (PLFLT)lua_tonumber(L, 2);
11961 arg5 = (PLFLT)lua_tonumber(L, 3);
11962 arg6 = (PLFLT)lua_tonumber(L, 4);
11963 arg7 = (PLFLT)lua_tonumber(L, 5);
11964 arg8 = (PLFLT)lua_tonumber(L, 6);
11965 arg9 = (PLFLT)lua_tonumber(L, 7);
11966 arg10 = (PLFLT)lua_tonumber(L, 8);
11967 arg11 = (PLFLT)lua_tonumber(L, 9);
11968 arg12 = (PLFLT)lua_tonumber(L, 10);
11969 arg13 = (PLFLT)lua_tonumber(L, 11);
11970 plimage((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
11971
11972 {
11973 int i;
11974
11975 if ( arg1 )
11976 {
11977 for ( i = 0; i < ii1; i++ )
11978 LUA_FREE_ARRAY( arg1[i] );
11979 LUA_FREE_ARRAY( arg1 );
11980 }
11981 }
11982 return SWIG_arg;
11983
11984 fail: SWIGUNUSED;
11985 {
11986 int i;
11987
11988 if ( arg1 )
11989 {
11990 for ( i = 0; i < ii1; i++ )
11991 LUA_FREE_ARRAY( arg1[i] );
11992 LUA_FREE_ARRAY( arg1 );
11993 }
11994 }
11995 lua_error(L);
11996 return 0;
11997}
11998
11999
12000static int _wrap_imagefr(lua_State* L) {
12001 int SWIG_arg = 0;
12002 PLFLT **arg1 = 0 ;
12003 PLINT arg2 ;
12004 PLINT arg3 ;
12005 PLFLT arg4 ;
12006 PLFLT arg5 ;
12007 PLFLT arg6 ;
12008 PLFLT arg7 ;
12009 PLFLT arg8 ;
12010 PLFLT arg9 ;
12011 PLFLT arg10 ;
12012 PLFLT arg11 ;
12013 pltr_func arg12 = 0 ;
12014 PLPointer arg13 = 0 ;
12015 int ii1 ;
12016 PLcGrid cgrid113 ;
12017 PLcGrid2 cgrid213 ;
12018
12019 {
12020 cgrid113.xg = cgrid113.yg = cgrid113.zg = NULL;
12021 cgrid113.nx = cgrid113.ny = cgrid113.nz = 0;
12022 cgrid213.xg = cgrid213.yg = cgrid213.zg = NULL;
12023 cgrid213.nx = cgrid213.ny = 0;
12024 }
12025 {
12026 arg12 = NULL;
12027 }
12028 {
12029 arg13 = NULL;
12030 }
12031 SWIG_check_num_args("plimagefr",9,11)
12032 if(!lua_isnumber(L,2)) SWIG_fail_arg("plimagefr",2,"PLFLT");
12033 if(!lua_isnumber(L,3)) SWIG_fail_arg("plimagefr",3,"PLFLT");
12034 if(!lua_isnumber(L,4)) SWIG_fail_arg("plimagefr",4,"PLFLT");
12035 if(!lua_isnumber(L,5)) SWIG_fail_arg("plimagefr",5,"PLFLT");
12036 if(!lua_isnumber(L,6)) SWIG_fail_arg("plimagefr",6,"PLFLT");
12037 if(!lua_isnumber(L,7)) SWIG_fail_arg("plimagefr",7,"PLFLT");
12038 if(!lua_isnumber(L,8)) SWIG_fail_arg("plimagefr",8,"PLFLT");
12039 if(!lua_isnumber(L,9)) SWIG_fail_arg("plimagefr",9,"PLFLT");
12040 {
12041 int jj;
12042
12043 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
12044 if ( !arg1 )
12045 SWIG_fail;
12046 Xlen = arg2 = ii1;
12047 Ylen = arg3 = jj;
12048 }
12049 arg4 = (PLFLT)lua_tonumber(L, 2);
12050 arg5 = (PLFLT)lua_tonumber(L, 3);
12051 arg6 = (PLFLT)lua_tonumber(L, 4);
12052 arg7 = (PLFLT)lua_tonumber(L, 5);
12053 arg8 = (PLFLT)lua_tonumber(L, 6);
12054 arg9 = (PLFLT)lua_tonumber(L, 7);
12055 arg10 = (PLFLT)lua_tonumber(L, 8);
12056 arg11 = (PLFLT)lua_tonumber(L, 9);
12057 if(lua_gettop(L)>=10){
12058 {
12059 arg12 = NULL;
12060 mypltr_funcstr[0] = '\0';
12061
12062 if ( lua_isstring( L, 10 ) )
12063 {
12064 const char* funcstr = lua_tostring( L, 10 );
12065 if ( strcmp( "pltr0", funcstr ) == 0 )
12066 {
12067 arg12 = pltr0;
12068 }
12069 else if ( strcmp( "pltr1", funcstr ) == 0 )
12070 {
12071 arg12 = pltr1;
12072 }
12073 else if ( strcmp( "pltr2", funcstr ) == 0 )
12074 {
12075 arg12 = pltr2;
12076 }
12077 else
12078 {
12079 arg12 = mypltr;
12080 strncpy( mypltr_funcstr, funcstr, 255 );
12081 myL = L;
12082 }
12083 }
12084 else
12085 SWIG_fail_arg( "imagefr", 12, "pltr_func" );
12086 }
12087 }
12088 if(lua_gettop(L)>=11){
12089 {
12090 int nx, ny;
12091 int gridmode = 0;
12092
12093 lua_pushstring( L, "xg" );
12094 lua_gettable( L, 11 );
12095 if ( !lua_istable( L, -1 ) )
12096 {
12097 lua_pop( L, 1 ); // pop "xg"
12098 lua_pushstring( L, "expected a table xg" );
12099 SWIG_fail;
12100 }
12101 lua_rawgeti( L, -1, 1 );
12102 if ( lua_istable( L, -1 ) )
12103 gridmode = 2; // two dimensional array
12104 else if ( lua_isnumber( L, -1 ) )
12105 gridmode = 1; // one dimensional array
12106 else
12107 {
12108 lua_pop( L, 1 ); // pop "1"
12109 lua_pop( L, 1 ); // pop "xg"
12110 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
12111 SWIG_fail;
12112 }
12113 lua_pop( L, 1 ); // pop test element
12114 if ( gridmode == 1 )
12115 {
12116 cgrid113.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
12117 if ( !cgrid113.xg )
12118 {
12119 lua_pop( L, 1 ); // pop "xg"
12120 SWIG_fail;
12121 }
12122 if ( nx != Xlen )
12123 {
12124 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
12125 SWIG_fail;
12126 }
12127 cgrid113.nx = nx;
12128 }
12129 else
12130 {
12131 cgrid213.xg = read_double_Matrix( L, -1, &nx, &ny );
12132 if ( !cgrid213.xg )
12133 {
12134 lua_pop( L, 1 ); // pop "xg"
12135 SWIG_fail;
12136 }
12137 if ( ( nx != Xlen ) || ( ny != Ylen ) )
12138 {
12139 lua_pop( L, 1 ); // pop "xg"
12140 lua_pushfstring( L, "Vectors must match matrix." );
12141 SWIG_fail;
12142 }
12143 cgrid213.nx = nx;
12144 cgrid213.ny = ny;
12145 }
12146 lua_pop( L, 1 ); // pop "xg"
12147
12148 lua_pushstring( L, "yg" );
12149 lua_gettable( L, 11 );
12150 if ( !lua_istable( L, -1 ) )
12151 {
12152 lua_pop( L, 1 );
12153 lua_pushstring( L, "expected a table yg" );
12154 SWIG_fail;
12155 }
12156 lua_rawgeti( L, -1, 1 );
12157 if ( gridmode == 2 )
12158 {
12159 if ( !lua_istable( L, -1 ) )
12160 {
12161 lua_pop( L, 1 ); // pop "1"
12162 lua_pop( L, 1 ); // pop "yg"
12163 lua_pushstring( L, "expected a two dimensional array/table in yg" );
12164 SWIG_fail;
12165 }
12166 }
12167 else
12168 {
12169 if ( !lua_isnumber( L, -1 ) )
12170 {
12171 lua_pop( L, 1 ); // pop "1"
12172 lua_pop( L, 1 ); // pop "yg"
12173 lua_pushstring( L, "expected a one dimensional array/table in yg" );
12174 SWIG_fail;
12175 }
12176 }
12177 lua_pop( L, 1 ); // pop "1"
12178 if ( gridmode == 1 )
12179 {
12180 cgrid113.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
12181 if ( !cgrid113.yg )
12182 {
12183 lua_pop( L, 1 ); // pop "yg"
12184 SWIG_fail;
12185 }
12186 if ( ny != Ylen )
12187 {
12188 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
12189 SWIG_fail;
12190 }
12191 cgrid113.ny = ny;
12192 }
12193 else
12194 {
12195 cgrid213.yg = read_double_Matrix( L, -1, &nx, &ny );
12196 if ( !cgrid213.yg )
12197 {
12198 lua_pop( L, 1 ); // pop "xg"
12199 SWIG_fail;
12200 }
12201 if ( ( nx != Xlen ) || ( ny != Ylen ) )
12202 {
12203 lua_pop( L, 1 ); // pop "xg"
12204 lua_pushfstring( L, "Vectors must match matrix." );
12205 SWIG_fail;
12206 }
12207 // cgrid213.nx/ny already set
12208 }
12209 lua_pop( L, 1 ); // pop "yg"
12210
12211 if ( gridmode == 1 )
12212 arg13 = &cgrid113;
12213 else if ( gridmode == 2 )
12214 arg13 = &cgrid213;
12215 }
12216 }
12217 plimagefr((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
12218
12219 {
12220 int i;
12221
12222 if ( arg1 )
12223 {
12224 for ( i = 0; i < ii1; i++ )
12225 LUA_FREE_ARRAY( arg1[i] );
12226 LUA_FREE_ARRAY( arg1 );
12227 }
12228 }
12229 {
12230 mypltr_funcstr[0] = '\0';
12231 }
12232 {
12233 int i;
12234
12235 LUA_FREE_ARRAY( cgrid113.xg );
12236 LUA_FREE_ARRAY( cgrid113.yg );
12237
12238 if ( cgrid213.xg )
12239 {
12240 for ( i = 0; i < Xlen; i++ )
12241 LUA_FREE_ARRAY( cgrid213.xg[i] );
12242 LUA_FREE_ARRAY( cgrid213.xg );
12243 }
12244 if ( cgrid213.yg )
12245 {
12246 for ( i = 0; i < Xlen; i++ )
12247 LUA_FREE_ARRAY( cgrid213.yg[i] );
12248 LUA_FREE_ARRAY( cgrid213.yg );
12249 }
12250 }
12251 return SWIG_arg;
12252
12253 fail: SWIGUNUSED;
12254 {
12255 int i;
12256
12257 if ( arg1 )
12258 {
12259 for ( i = 0; i < ii1; i++ )
12260 LUA_FREE_ARRAY( arg1[i] );
12261 LUA_FREE_ARRAY( arg1 );
12262 }
12263 }
12264 {
12265 mypltr_funcstr[0] = '\0';
12266 }
12267 {
12268 int i;
12269
12270 LUA_FREE_ARRAY( cgrid113.xg );
12271 LUA_FREE_ARRAY( cgrid113.yg );
12272
12273 if ( cgrid213.xg )
12274 {
12275 for ( i = 0; i < Xlen; i++ )
12276 LUA_FREE_ARRAY( cgrid213.xg[i] );
12277 LUA_FREE_ARRAY( cgrid213.xg );
12278 }
12279 if ( cgrid213.yg )
12280 {
12281 for ( i = 0; i < Xlen; i++ )
12282 LUA_FREE_ARRAY( cgrid213.yg[i] );
12283 LUA_FREE_ARRAY( cgrid213.yg );
12284 }
12285 }
12286 lua_error(L);
12287 return 0;
12288}
12289
12290
12291static int _wrap_plClearOpts(lua_State* L) {
12292 int SWIG_arg = 0;
12293
12294 SWIG_check_num_args("plClearOpts",0,0)
12295 plClearOpts();
12296
12297 return SWIG_arg;
12298
12299 fail: SWIGUNUSED;
12300 lua_error(L);
12301 return 0;
12302}
12303
12304
12305static int _wrap_plResetOpts(lua_State* L) {
12306 int SWIG_arg = 0;
12307
12308 SWIG_check_num_args("plResetOpts",0,0)
12309 plResetOpts();
12310
12311 return SWIG_arg;
12312
12313 fail: SWIGUNUSED;
12314 lua_error(L);
12315 return 0;
12316}
12317
12318
12319static int _wrap_plSetUsage(lua_State* L) {
12320 int SWIG_arg = 0;
12321 char *arg1 = 0 ;
12322 char *arg2 = 0 ;
12323
12324 SWIG_check_num_args("plSetUsage",2,2)
12325 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plSetUsage",1,"char const *");
12326 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plSetUsage",2,"char const *");
12327 arg1 = (char *)lua_tostring(L, 1);
12328 arg2 = (char *)lua_tostring(L, 2);
12329 plSetUsage((char const *)arg1,(char const *)arg2);
12330
12331 return SWIG_arg;
12332
12333 fail: SWIGUNUSED;
12334 lua_error(L);
12335 return 0;
12336}
12337
12338
12339static int _wrap_plOptUsage(lua_State* L) {
12340 int SWIG_arg = 0;
12341
12342 SWIG_check_num_args("plOptUsage",0,0)
12343 plOptUsage();
12344
12345 return SWIG_arg;
12346
12347 fail: SWIGUNUSED;
12348 lua_error(L);
12349 return 0;
12350}
12351
12352
12353static int _wrap_MinMax2dGrid(lua_State* L) {
12354 int SWIG_arg = 0;
12355 PLFLT **arg1 = 0 ;
12356 PLINT arg2 ;
12357 PLINT arg3 ;
12358 PLFLT *arg4 = 0 ;
12359 PLFLT *arg5 = 0 ;
12360 int ii1 ;
12361 PLFLT temp4 ;
12362 PLFLT temp5 ;
12363
12364 arg4 = &temp4;
12365 arg5 = &temp5;
12366 SWIG_check_num_args("plMinMax2dGrid",1,1)
12367 {
12368 int jj;
12369
12370 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
12371 if ( !arg1 )
12372 SWIG_fail;
12373 Xlen = arg2 = ii1;
12374 Ylen = arg3 = jj;
12375 }
12376 plMinMax2dGrid((double const **)arg1,arg2,arg3,arg4,arg5);
12377
12378 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
12379 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
12380 {
12381 int i;
12382
12383 if ( arg1 )
12384 {
12385 for ( i = 0; i < ii1; i++ )
12386 LUA_FREE_ARRAY( arg1[i] );
12387 LUA_FREE_ARRAY( arg1 );
12388 }
12389 }
12390 return SWIG_arg;
12391
12392 fail: SWIGUNUSED;
12393 {
12394 int i;
12395
12396 if ( arg1 )
12397 {
12398 for ( i = 0; i < ii1; i++ )
12399 LUA_FREE_ARRAY( arg1[i] );
12400 LUA_FREE_ARRAY( arg1 );
12401 }
12402 }
12403 lua_error(L);
12404 return 0;
12405}
12406
12407
12408static int _wrap_plGetCursor(lua_State* L) {
12409 int SWIG_arg = 0;
12410 PLGraphicsIn *arg1 = 0 ;
12411 PLINT result;
12412
12413 SWIG_check_num_args("plGetCursor",1,1)
12414 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("plGetCursor",1,"PLGraphicsIn *");
12415
12416 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
12417 SWIG_fail_ptr("plGetCursor",1,SWIGTYPE_p_PLGraphicsIn);
12418 }
12419
12420 result = (PLINT)plGetCursor(arg1);
12421 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
12422 return SWIG_arg;
12423
12424 fail: SWIGUNUSED;
12425 lua_error(L);
12426 return 0;
12427}
12428
12429
12430static int _wrap_warn(lua_State* L) {
12431 int SWIG_arg = 0;
12432 char *arg1 = 0 ;
12433
12434 SWIG_check_num_args("plwarn",1,1)
12435 if(!lua_isstring(L,1)) SWIG_fail_arg("plwarn",1,"char const *");
12436 {
12437 arg1 = (char *) lua_tostring( L, 1 );
12438 }
12439 plwarn((char const *)arg1);
12440
12441 return SWIG_arg;
12442
12443 fail: SWIGUNUSED;
12444 lua_error(L);
12445 return 0;
12446}
12447
12448
12449static int _wrap_abort(lua_State* L) {
12450 int SWIG_arg = 0;
12451 char *arg1 = 0 ;
12452
12453 SWIG_check_num_args("plabort",1,1)
12454 if(!lua_isstring(L,1)) SWIG_fail_arg("plabort",1,"char const *");
12455 {
12456 arg1 = (char *) lua_tostring( L, 1 );
12457 }
12458 plabort((char const *)arg1);
12459
12460 return SWIG_arg;
12461
12462 fail: SWIGUNUSED;
12463 lua_error(L);
12464 return 0;
12465}
12466
12467
12469 {0,0,0}
12470};
12472 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_RGB", (1))},
12473 {SWIG_LUA_CONSTTAB_INT("PLESC_ALLOC_NCOL", (2))},
12474 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_LPB", (3))},
12475 {SWIG_LUA_CONSTTAB_INT("PLESC_EXPOSE", (4))},
12476 {SWIG_LUA_CONSTTAB_INT("PLESC_RESIZE", (5))},
12477 {SWIG_LUA_CONSTTAB_INT("PLESC_REDRAW", (6))},
12478 {SWIG_LUA_CONSTTAB_INT("PLESC_TEXT", (7))},
12479 {SWIG_LUA_CONSTTAB_INT("PLESC_GRAPH", (8))},
12480 {SWIG_LUA_CONSTTAB_INT("PLESC_FILL", (9))},
12481 {SWIG_LUA_CONSTTAB_INT("PLESC_DI", (10))},
12482 {SWIG_LUA_CONSTTAB_INT("PLESC_FLUSH", (11))},
12483 {SWIG_LUA_CONSTTAB_INT("PLESC_EH", (12))},
12484 {SWIG_LUA_CONSTTAB_INT("PLESC_GETC", (13))},
12485 {SWIG_LUA_CONSTTAB_INT("PLESC_SWIN", (14))},
12486 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING", (15))},
12487 {SWIG_LUA_CONSTTAB_INT("PLESC_XORMOD", (16))},
12488 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_COMPRESSION", (17))},
12489 {SWIG_LUA_CONSTTAB_INT("PLESC_CLEAR", (18))},
12490 {SWIG_LUA_CONSTTAB_INT("PLESC_DASH", (19))},
12491 {SWIG_LUA_CONSTTAB_INT("PLESC_HAS_TEXT", (20))},
12492 {SWIG_LUA_CONSTTAB_INT("PLESC_IMAGE", (21))},
12493 {SWIG_LUA_CONSTTAB_INT("PLESC_IMAGEOPS", (22))},
12494 {SWIG_LUA_CONSTTAB_INT("PLESC_PL2DEVCOL", (23))},
12495 {SWIG_LUA_CONSTTAB_INT("PLESC_DEV2PLCOL", (24))},
12496 {SWIG_LUA_CONSTTAB_INT("PLESC_SETBGFG", (25))},
12497 {SWIG_LUA_CONSTTAB_INT("PLESC_DEVINIT", (26))},
12498 {SWIG_LUA_CONSTTAB_INT("PLESC_GETBACKEND", (27))},
12499 {SWIG_LUA_CONSTTAB_INT("PLESC_BEGIN_TEXT", (28))},
12500 {SWIG_LUA_CONSTTAB_INT("PLESC_TEXT_CHAR", (29))},
12501 {SWIG_LUA_CONSTTAB_INT("PLESC_CONTROL_CHAR", (30))},
12502 {SWIG_LUA_CONSTTAB_INT("PLESC_END_TEXT", (31))},
12503 {SWIG_LUA_CONSTTAB_INT("PLESC_START_RASTERIZE", (32))},
12504 {SWIG_LUA_CONSTTAB_INT("PLESC_END_RASTERIZE", (33))},
12505 {SWIG_LUA_CONSTTAB_INT("PLESC_ARC", (34))},
12506 {SWIG_LUA_CONSTTAB_INT("PLESC_GRADIENT", (35))},
12507 {SWIG_LUA_CONSTTAB_INT("PLESC_MODESET", (36))},
12508 {SWIG_LUA_CONSTTAB_INT("PLESC_MODEGET", (37))},
12509 {SWIG_LUA_CONSTTAB_INT("PLESC_FIXASPECT", (38))},
12510 {SWIG_LUA_CONSTTAB_INT("PLESC_IMPORT_BUFFER", (39))},
12511 {SWIG_LUA_CONSTTAB_INT("PLESC_APPEND_BUFFER", (40))},
12512 {SWIG_LUA_CONSTTAB_INT("PLESC_FLUSH_REMAINING_BUFFER", (41))},
12513 {SWIG_LUA_CONSTTAB_INT("PLTEXT_FONTCHANGE", (0))},
12514 {SWIG_LUA_CONSTTAB_INT("PLTEXT_SUPERSCRIPT", (1))},
12515 {SWIG_LUA_CONSTTAB_INT("PLTEXT_SUBSCRIPT", (2))},
12516 {SWIG_LUA_CONSTTAB_INT("PLTEXT_BACKCHAR", (3))},
12517 {SWIG_LUA_CONSTTAB_INT("PLTEXT_OVERLINE", (4))},
12518 {SWIG_LUA_CONSTTAB_INT("PLTEXT_UNDERLINE", (5))},
12519 {SWIG_LUA_CONSTTAB_INT("ZEROW2B", (1))},
12520 {SWIG_LUA_CONSTTAB_INT("ZEROW2D", (2))},
12521 {SWIG_LUA_CONSTTAB_INT("ONEW2B", (3))},
12522 {SWIG_LUA_CONSTTAB_INT("ONEW2D", (4))},
12523 {SWIG_LUA_CONSTTAB_INT("PLSWIN_DEVICE", (1))},
12524 {SWIG_LUA_CONSTTAB_INT("PLSWIN_WORLD", (2))},
12525 {SWIG_LUA_CONSTTAB_INT("PL_X_AXIS", (1))},
12526 {SWIG_LUA_CONSTTAB_INT("PL_Y_AXIS", (2))},
12527 {SWIG_LUA_CONSTTAB_INT("PL_Z_AXIS", (3))},
12528 {SWIG_LUA_CONSTTAB_INT("PL_OPT_ENABLED", (0x0001))},
12529 {SWIG_LUA_CONSTTAB_INT("PL_OPT_ARG", (0x0002))},
12530 {SWIG_LUA_CONSTTAB_INT("PL_OPT_NODELETE", (0x0004))},
12531 {SWIG_LUA_CONSTTAB_INT("PL_OPT_INVISIBLE", (0x0008))},
12532 {SWIG_LUA_CONSTTAB_INT("PL_OPT_DISABLED", (0x0010))},
12533 {SWIG_LUA_CONSTTAB_INT("PL_OPT_FUNC", (0x0100))},
12534 {SWIG_LUA_CONSTTAB_INT("PL_OPT_BOOL", (0x0200))},
12535 {SWIG_LUA_CONSTTAB_INT("PL_OPT_INT", (0x0400))},
12536 {SWIG_LUA_CONSTTAB_INT("PL_OPT_FLOAT", (0x0800))},
12537 {SWIG_LUA_CONSTTAB_INT("PL_OPT_STRING", (0x1000))},
12538 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_PARTIAL", (0x0000))},
12539 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_FULL", (0x0001))},
12540 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_QUIET", (0x0002))},
12541 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NODELETE", (0x0004))},
12542 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_SHOWALL", (0x0008))},
12543 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_OVERRIDE", (0x0010))},
12544 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NOPROGRAM", (0x0020))},
12545 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NODASH", (0x0040))},
12546 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_SKIP", (0x0080))},
12547 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MARK", (0x80000000))},
12548 {SWIG_LUA_CONSTTAB_INT("PL_FCI_IMPOSSIBLE", (0x00000000))},
12549 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXDIGIT_MASK", (0xf))},
12550 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXPOWER_MASK", (0x7))},
12551 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXPOWER_IMPOSSIBLE", (0xf))},
12552 {SWIG_LUA_CONSTTAB_INT("PL_FCI_FAMILY", (0x0))},
12553 {SWIG_LUA_CONSTTAB_INT("PL_FCI_STYLE", (0x1))},
12554 {SWIG_LUA_CONSTTAB_INT("PL_FCI_WEIGHT", (0x2))},
12555 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SANS", (0x0))},
12556 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SERIF", (0x1))},
12557 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MONO", (0x2))},
12558 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SCRIPT", (0x3))},
12559 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SYMBOL", (0x4))},
12560 {SWIG_LUA_CONSTTAB_INT("PL_FCI_UPRIGHT", (0x0))},
12561 {SWIG_LUA_CONSTTAB_INT("PL_FCI_ITALIC", (0x1))},
12562 {SWIG_LUA_CONSTTAB_INT("PL_FCI_OBLIQUE", (0x2))},
12563 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MEDIUM", (0x0))},
12564 {SWIG_LUA_CONSTTAB_INT("PL_FCI_BOLD", (0x1))},
12565 {SWIG_LUA_CONSTTAB_INT("PL_MAXKEY", (16))},
12566 {SWIG_LUA_CONSTTAB_INT("PL_MASK_SHIFT", (0x1))},
12567 {SWIG_LUA_CONSTTAB_INT("PL_MASK_CAPS", (0x2))},
12568 {SWIG_LUA_CONSTTAB_INT("PL_MASK_CONTROL", (0x4))},
12569 {SWIG_LUA_CONSTTAB_INT("PL_MASK_ALT", (0x8))},
12570 {SWIG_LUA_CONSTTAB_INT("PL_MASK_NUM", (0x10))},
12571 {SWIG_LUA_CONSTTAB_INT("PL_MASK_ALTGR", (0x20))},
12572 {SWIG_LUA_CONSTTAB_INT("PL_MASK_WIN", (0x40))},
12573 {SWIG_LUA_CONSTTAB_INT("PL_MASK_SCROLL", (0x80))},
12574 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON1", (0x100))},
12575 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON2", (0x200))},
12576 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON3", (0x400))},
12577 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON4", (0x800))},
12578 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON5", (0x1000))},
12579 {SWIG_LUA_CONSTTAB_INT("PL_MAXWINDOWS", (64))},
12580 {SWIG_LUA_CONSTTAB_INT("PL_NOTSET", ((-42)))},
12581 {SWIG_LUA_CONSTTAB_INT("PL_DEFAULT_NCOL0", (16))},
12582 {SWIG_LUA_CONSTTAB_INT("PL_DEFAULT_NCOL1", (128))},
12583 {SWIG_LUA_CONSTTAB_INT("MIN_PLINT_RGB", (0))},
12584 {SWIG_LUA_CONSTTAB_INT("MAX_PLINT_RGB", (255))},
12585 {SWIG_LUA_CONSTTAB_FLOAT("MIN_PLFLT_CMAP1", 0.)},
12586 {SWIG_LUA_CONSTTAB_FLOAT("MAX_PLFLT_CMAP1", 1.)},
12587 {SWIG_LUA_CONSTTAB_FLOAT("MIN_PLFLT_ALPHA", 0.)},
12588 {SWIG_LUA_CONSTTAB_FLOAT("MAX_PLFLT_ALPHA", 1.)},
12589 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_ENABLE", (1))},
12590 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_DISABLE", (2))},
12591 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_QUERY", (3))},
12592 {SWIG_LUA_CONSTTAB_INT("PL_BIN_DEFAULT", (0x0))},
12593 {SWIG_LUA_CONSTTAB_INT("PL_BIN_CENTRED", (0x1))},
12594 {SWIG_LUA_CONSTTAB_INT("PL_BIN_NOEXPAND", (0x2))},
12595 {SWIG_LUA_CONSTTAB_INT("PL_BIN_NOEMPTY", (0x4))},
12596 {SWIG_LUA_CONSTTAB_INT("GRID_CSA", (1))},
12597 {SWIG_LUA_CONSTTAB_INT("GRID_DTLI", (2))},
12598 {SWIG_LUA_CONSTTAB_INT("GRID_NNI", (3))},
12599 {SWIG_LUA_CONSTTAB_INT("GRID_NNIDW", (4))},
12600 {SWIG_LUA_CONSTTAB_INT("GRID_NNLI", (5))},
12601 {SWIG_LUA_CONSTTAB_INT("GRID_NNAIDW", (6))},
12602 {SWIG_LUA_CONSTTAB_INT("PL_HIST_DEFAULT", (0x00))},
12603 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOSCALING", (0x01))},
12604 {SWIG_LUA_CONSTTAB_INT("PL_HIST_IGNORE_OUTLIERS", (0x02))},
12605 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOEXPAND", (0x08))},
12606 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOEMPTY", (0x10))},
12607 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_NULL", (0x0))},
12608 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_LEFT", (0x1))},
12609 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_RIGHT", (0x2))},
12610 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_TOP", (0x4))},
12611 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_BOTTOM", (0x8))},
12612 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_INSIDE", (0x10))},
12613 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_OUTSIDE", (0x20))},
12614 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_VIEWPORT", (0x40))},
12615 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_SUBPAGE", (0x80))},
12616 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_NULL", (0x0))},
12617 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_NONE", (0x1))},
12618 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_COLOR_BOX", (0x2))},
12619 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_LINE", (0x4))},
12620 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_SYMBOL", (0x8))},
12621 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_TEXT_LEFT", (0x10))},
12622 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_BACKGROUND", (0x20))},
12623 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_BOUNDING_BOX", (0x40))},
12624 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_ROW_MAJOR", (0x80))},
12625 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_NULL", (0x0))},
12626 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_LEFT", (0x1))},
12627 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_RIGHT", (0x2))},
12628 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_TOP", (0x4))},
12629 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_BOTTOM", (0x8))},
12630 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_IMAGE", (0x10))},
12631 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_SHADE", (0x20))},
12632 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_GRADIENT", (0x40))},
12633 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_NONE", (0x80))},
12634 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_LOW", (0x100))},
12635 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_HIGH", (0x200))},
12636 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_SHADE_LABEL", (0x400))},
12637 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_RIGHT", (0x800))},
12638 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_TOP", (0x1000))},
12639 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_LEFT", (0x2000))},
12640 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_BOTTOM", (0x4000))},
12641 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_BACKGROUND", (0x8000))},
12642 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_BOUNDING_BOX", (0x10000))},
12643 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_UNKNOWN", (0x0))},
12644 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_DEFAULT", (0x1))},
12645 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_REPLACE", (0x2))},
12646 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_XOR", (0x4))},
12647 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEX", (0x001))},
12648 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEY", (0x002))},
12649 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEXY", (0x003))},
12650 {SWIG_LUA_CONSTTAB_INT("MAG_COLOR", (0x004))},
12651 {SWIG_LUA_CONSTTAB_INT("BASE_CONT", (0x008))},
12652 {SWIG_LUA_CONSTTAB_INT("TOP_CONT", (0x010))},
12653 {SWIG_LUA_CONSTTAB_INT("SURF_CONT", (0x020))},
12654 {SWIG_LUA_CONSTTAB_INT("DRAW_SIDES", (0x040))},
12655 {SWIG_LUA_CONSTTAB_INT("FACETED", (0x080))},
12656 {SWIG_LUA_CONSTTAB_INT("MESH", (0x100))},
12657 {0,0,0,0,0,0}
12658};
12660 { "setcontlabelformat", _wrap_setcontlabelformat},
12661 { "setcontlabelparam", _wrap_setcontlabelparam},
12662 { "adv", _wrap_adv},
12663 { "arc", _wrap_arc},
12664 { "axes", _wrap_axes},
12665 { "bin", _wrap_bin},
12666 { "btime", _wrap_btime},
12667 { "bop", _wrap_bop},
12668 { "box", _wrap_box},
12669 { "box3", _wrap_box3},
12670 { "calc_world", _wrap_calc_world},
12671 { "clear", _wrap_clear},
12672 { "col0", _wrap_col0},
12673 { "col1", _wrap_col1},
12674 { "configtime", _wrap_configtime},
12675 { "cont", _wrap_cont},
12676 { "ctime", _wrap_ctime},
12677 { "cpstrm", _wrap_cpstrm},
12678 { "plend", _wrap_plend},
12679 { "plend1", _wrap_plend1},
12680 { "env", _wrap_env},
12681 { "env0", _wrap_env0},
12682 { "eop", _wrap_eop},
12683 { "errx", _wrap_errx},
12684 { "erry", _wrap_erry},
12685 { "famadv", _wrap_famadv},
12686 { "fill", _wrap_fill},
12687 { "fill3", _wrap_fill3},
12688 { "gradient", _wrap_gradient},
12689 { "flush", _wrap_flush},
12690 { "font", _wrap_font},
12691 { "fontld", _wrap_fontld},
12692 { "gchr", _wrap_gchr},
12693 { "gcol0", _wrap_gcol0},
12694 { "gcol0a", _wrap_gcol0a},
12695 { "gcolbg", _wrap_gcolbg},
12696 { "gcolbga", _wrap_gcolbga},
12697 { "gcompression", _wrap_gcompression},
12698 { "gdev", _wrap_gdev},
12699 { "gdidev", _wrap_gdidev},
12700 { "gdiori", _wrap_gdiori},
12701 { "gdiplt", _wrap_gdiplt},
12702 { "gfam", _wrap_gfam},
12703 { "gfci", _wrap_gfci},
12704 { "gfnam", _wrap_gfnam},
12705 { "gfont", _wrap_gfont},
12706 { "glevel", _wrap_glevel},
12707 { "gpage", _wrap_gpage},
12708 { "gra", _wrap_gra},
12709 { "griddata", _wrap_griddata},
12710 { "gspa", _wrap_gspa},
12711 { "gstrm", _wrap_gstrm},
12712 { "gver", _wrap_gver},
12713 { "gvpd", _wrap_gvpd},
12714 { "gvpw", _wrap_gvpw},
12715 { "gxax", _wrap_gxax},
12716 { "gyax", _wrap_gyax},
12717 { "gzax", _wrap_gzax},
12718 { "hist", _wrap_hist},
12719 { "hlsrgb", _wrap_hlsrgb},
12720 { "init", _wrap_init},
12721 { "join", _wrap_join},
12722 { "lab", _wrap_lab},
12723 { "legend", _wrap_legend},
12724 { "colorbar", _wrap_colorbar},
12725 { "lightsource", _wrap_lightsource},
12726 { "line", _wrap_line},
12727 { "line3", _wrap_line3},
12728 { "lsty", _wrap_lsty},
12729 { "mesh", _wrap_mesh},
12730 { "meshc", _wrap_meshc},
12731 { "mkstrm", _wrap_mkstrm},
12732 { "mtex", _wrap_mtex},
12733 { "mtex3", _wrap_mtex3},
12734 { "plot3d", _wrap_plot3d},
12735 { "plot3dc", _wrap_plot3dc},
12736 { "plot3dcl", _wrap_plot3dcl},
12737 { "surf3d", _wrap_surf3d},
12738 { "surf3dl", _wrap_surf3dl},
12739 { "parseopts", _wrap_parseopts},
12740 { "pat", _wrap_pat},
12741 { "path", _wrap_path},
12742 { "poin", _wrap_poin},
12743 { "poin3", _wrap_poin3},
12744 { "poly3", _wrap_poly3},
12745 { "prec", _wrap_prec},
12746 { "psty", _wrap_psty},
12747 { "ptex", _wrap_ptex},
12748 { "ptex3", _wrap_ptex3},
12749 { "randd", _wrap_randd},
12750 { "replot", _wrap_replot},
12751 { "rgbhls", _wrap_rgbhls},
12752 { "schr", _wrap_schr},
12753 { "scmap0", _wrap_scmap0},
12754 { "scmap0a", _wrap_scmap0a},
12755 { "scmap0n", _wrap_scmap0n},
12756 { "scmap1", _wrap_scmap1},
12757 { "scmap1a", _wrap_scmap1a},
12758 { "scmap1l", _wrap_scmap1l},
12759 { "scmap1la", _wrap_scmap1la},
12760 { "scmap1n", _wrap_scmap1n},
12761 { "scmap1_range", _wrap_scmap1_range},
12762 { "gcmap1_range", _wrap_gcmap1_range},
12763 { "scol0", _wrap_scol0},
12764 { "scol0a", _wrap_scol0a},
12765 { "scolbg", _wrap_scolbg},
12766 { "scolbga", _wrap_scolbga},
12767 { "scolor", _wrap_scolor},
12768 { "scompression", _wrap_scompression},
12769 { "sdev", _wrap_sdev},
12770 { "sdidev", _wrap_sdidev},
12771 { "sdimap", _wrap_sdimap},
12772 { "sdiori", _wrap_sdiori},
12773 { "sdiplt", _wrap_sdiplt},
12774 { "sdiplz", _wrap_sdiplz},
12775 { "seed", _wrap_seed},
12776 { "sesc", _wrap_sesc},
12777 { "setopt", _wrap_setopt},
12778 { "sfam", _wrap_sfam},
12779 { "sfci", _wrap_sfci},
12780 { "sfnam", _wrap_sfnam},
12781 { "sfont", _wrap_sfont},
12782 { "shades", _wrap_shades},
12783 { "shade", _wrap_shade},
12784 { "slabelfunc", _wrap_slabelfunc},
12785 { "smaj", _wrap_smaj},
12786 { "smin", _wrap_smin},
12787 { "sori", _wrap_sori},
12788 { "spage", _wrap_spage},
12789 { "spal0", _wrap_spal0},
12790 { "spal1", _wrap_spal1},
12791 { "spause", _wrap_spause},
12792 { "sstrm", _wrap_sstrm},
12793 { "ssub", _wrap_ssub},
12794 { "ssym", _wrap_ssym},
12795 { "star", _wrap_star},
12796 { "start", _wrap_start},
12797 { "stransform", _wrap_stransform},
12798 { "string", _wrap_string},
12799 { "string3", _wrap_string3},
12800 { "stripa", _wrap_stripa},
12801 { "stripc", _wrap_stripc},
12802 { "stripd", _wrap_stripd},
12803 { "styl", _wrap_styl},
12804 { "svect", _wrap_svect},
12805 { "svpa", _wrap_svpa},
12806 { "sxax", _wrap_sxax},
12807 { "syax", _wrap_syax},
12808 { "sym", _wrap_sym},
12809 { "szax", _wrap_szax},
12810 { "text", _wrap_text},
12811 { "timefmt", _wrap_timefmt},
12812 { "vasp", _wrap_vasp},
12813 { "vect", _wrap_vect},
12814 { "vpas", _wrap_vpas},
12815 { "vpor", _wrap_vpor},
12816 { "vsta", _wrap_vsta},
12817 { "w3d", _wrap_w3d},
12818 { "width", _wrap_width},
12819 { "wind", _wrap_wind},
12820 { "xormod", _wrap_xormod},
12821 { "map", _wrap_map},
12822 { "mapline", _wrap_mapline},
12823 { "mapstring", _wrap_mapstring},
12824 { "maptex", _wrap_maptex},
12825 { "mapfill", _wrap_mapfill},
12826 { "meridians", _wrap_meridians},
12827 { "image", _wrap_image},
12828 { "imagefr", _wrap_imagefr},
12829 { "plClearOpts", _wrap_plClearOpts},
12830 { "plResetOpts", _wrap_plResetOpts},
12831 { "plSetUsage", _wrap_plSetUsage},
12832 { "plOptUsage", _wrap_plOptUsage},
12833 { "MinMax2dGrid", _wrap_MinMax2dGrid},
12834 { "plGetCursor", _wrap_plGetCursor},
12835 { "warn", _wrap_warn},
12836 { "abort", _wrap_abort},
12837 {0,0}
12838};
12844 0
12845};
12846
12855#ifdef __cplusplus
12856}
12857#endif
12858
12859/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
12860
12861static swig_type_info _swigt__p_PLGraphicsIn = {"_p_PLGraphicsIn", "PLGraphicsIn *", 0, 0, (void*)&_wrap_class_PLGraphicsIn, 0};
12862static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
12863static swig_type_info _swigt__p_double = {"_p_double", "PLFLT *|double *", 0, 0, (void*)0, 0};
12864static swig_type_info _swigt__p_f_double_double__int = {"_p_f_double_double__int", "defined_func|int (*)(double,double)", 0, 0, (void*)0, 0};
12865static 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};
12866static 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};
12867static 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};
12868static 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};
12869static swig_type_info _swigt__p_int = {"_p_int", "PLBOOL *|PLINT *|int *", 0, 0, (void*)0, 0};
12870static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
12871static swig_type_info _swigt__p_p_double = {"_p_p_double", "PLFLT **|double **", 0, 0, (void*)0, 0};
12872static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "PLUNICODE *|unsigned int *", 0, 0, (void*)0, 0};
12873
12888
12889static swig_cast_info _swigc__p_PLGraphicsIn[] = { {&_swigt__p_PLGraphicsIn, 0, 0, 0},{0, 0, 0, 0}};
12890static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
12891static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
12897static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
12898static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
12899static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
12900static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
12901
12916
12917
12918/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
12919
12920/* -----------------------------------------------------------------------------
12921 * Type initialization:
12922 * This problem is made tough by the requirement that no dynamic
12923 * memory is used. Also, since swig_type_info structures store pointers to
12924 * swig_cast_info structures and swig_cast_info structures store pointers back
12925 * to swig_type_info structures, we need some lookup code at initialization.
12926 * The idea is that swig generates all the structures that are needed.
12927 * The runtime then collects these partially filled structures.
12928 * The SWIG_InitializeModule function takes these initial arrays out of
12929 * swig_module, and does all the lookup, filling in the swig_module.types
12930 * array with the correct data and linking the correct swig_cast_info
12931 * structures together.
12932 *
12933 * The generated swig_type_info structures are assigned statically to an initial
12934 * array. We just loop through that array, and handle each type individually.
12935 * First we lookup if this type has been already loaded, and if so, use the
12936 * loaded structure instead of the generated one. Then we have to fill in the
12937 * cast dependencies. The cast data is initially stored in something like a
12938 * two-dimensional array. Each row corresponds to a type (there are the same
12939 * number of rows as there are in the swig_type_initial array). Each entry in
12940 * a column is one of the swig_cast_info structures for that type.
12941 * The cast_initial array is actually an array of arrays, because each row has
12942 * a variable number of columns.
12943 *
12944 * We loop through the cast[] array associated with the type and mark casts
12945 * which have not been defined in previously loaded modules by assigning
12946 * cast pointer value to cast->next. We also hash cast->type->name string
12947 * and store the value in the cast->value field. If we encounter swig_cast_info
12948 * structure that represents a cast to self we move it to the beginning
12949 * of the cast array. One trick we need to do is making sure the type pointer
12950 * in the swig_cast_info struct is correct.
12951 *
12952 * First off, we lookup the cast->type name to see if it is already loaded.
12953 * There are three cases to handle:
12954 * 1) If the cast->type has already been loaded AND the type we are adding
12955 * casting info to has not been loaded (it is in this module), THEN we
12956 * replace the cast->type pointer with the type pointer that has already
12957 * been loaded.
12958 * 2) If BOTH types (the one we are adding casting info to, and the
12959 * cast->type) are loaded, THEN the cast info has already been loaded by
12960 * the previous module so we just ignore it.
12961 * 3) Finally, if cast->type has not already been loaded, then we add that
12962 * swig_cast_info to the list (because the cast->type) pointer will
12963 * be correct.
12964 *
12965 * Once the cast array has been set up AND it does have new casts that need
12966 * to be added we sort non-self cast entries to move filtered out entries
12967 * to the end of the array and to arrange the rest in the increasing order
12968 * of their type pointer values. We store the index of the last added entry
12969 * in the cast->value field of the entry[0] (overwriting the name hash). Then
12970 * we sort <next|value> fields of the remaining entries to arrange hash values
12971 * in the increasing order. This way cast->next->type->name field matches
12972 * the cast->value hash.
12973 *
12974 * Example:
12975 * Array of casts for type stored at 0x5000, cast to type stored at 0x3000
12976 * has already been loaded
12977 *
12978 * After sweep-and-hash: After sort-by-type: After sort-by-hash:
12979 * ________________ ________________ ________________
12980 * | | | | | |
12981 * Entry | type = 0x5000 | | type = 0x5000 | | type = 0x5000 |
12982 * 0 | | | | | |
12983 * | next = Entry0 | | next = Entry0 | | next = Entry0 |
12984 * | value = 1212 | | value = 3 | | value = 3 |
12985 * | | | | | |
12986 * |================| |================| |================|
12987 * | | | | | |
12988 * Entry | type = 0x2000 | | type = 0x1000 | | type = 0x1000 |
12989 * 1 | | | | | |
12990 * | next = Entry1 | | next = Entry1 | | next = Entry3 |
12991 * | value = 3434 | | value = 4545 | | value = 2323 |
12992 * |________________| |________________| |________________|
12993 * | | | | | |
12994 * Entry | type = 0x3000 | | type = 0x2000 | | type = 0x2000 |
12995 * 2 | | | | | |
12996 * | next = 0 | | next = Entry2 | | next = Entry2 |
12997 * | value = 0 | | value = 3434 | | value = 3434 |
12998 * |________________| |________________| |________________|
12999 * | | | | | |
13000 * Entry | type = 0x1000 | | type = 0x4000 | | type = 0x4000 |
13001 * 3 | | | | | |
13002 * | next = Entry3 | | next = Entry3 | | next = Entry1 |
13003 * | value = 4545 | | value = 2323 | | value = 4545 |
13004 * |________________| |________________| |________________|
13005 * | | | | | |
13006 * Entry | type = 0x4000 | | type = 0x3000 | | type = 0x3000 |
13007 * 4 | | | | | |
13008 * | next = Entry4 | | next = 0 | | next = 0 |
13009 * | value = 2323 | | value = 0 | | value = 0 |
13010 * |________________| |________________| |________________|
13011 *
13012 * Once the cast array has been initialized, we use cast[0]->next field to link
13013 * it into the list of cast arrays for the type.
13014 * ____ ____ ____
13015 * type->cast->|next|->|next|->|next|->0
13016 * |----| |----| |----|
13017 * |----| |----| |----|
13018 * |----| |----| |----|
13019 *
13020 * Subsequent cast resolution works as follows:
13021 *
13022 * 1. Check whether the type matches the first entry in the current cast array.
13023 * 2. If not, then do a binary search over the (0:cast->value] interval using
13024 * either type address or the hash value of the type name.
13025 * 3. If not found, then move over to the next cast array (cast[0]->next).
13026 *
13027 * ----------------------------------------------------------------------------- */
13028
13029#ifdef __cplusplus
13030extern "C" {
13031#if 0
13032} /* c-mode */
13033#endif
13034#endif
13035
13036#if 0
13037#define SWIGRUNTIME_DEBUG
13038#endif
13039
13040#ifndef SWIG_INIT_CLIENT_DATA_TYPE
13041#define SWIG_INIT_CLIENT_DATA_TYPE void *
13042#endif
13043
13044/*
13045 * Sort function that puts cast entries with nonzero 'next' at the front
13046 * of the array while ordering them by addresses of their 'type' structs.
13047 */
13048SWIGINTERN int SWIG_CastCmpStruct(const void *pa, const void *pb) {
13049 swig_cast_info *pca = (swig_cast_info *)pa;
13050 swig_cast_info *pcb = (swig_cast_info *)pb;
13051 if (pca->type < pcb->type)
13052 return (pca->next || pcb->next == 0) ? -1 : 1;
13053 if (pca->type > pcb->type)
13054 return (pcb->next || pca->next == 0) ? 1 : -1;
13055 return 0;
13056}
13057
13058/*
13059 * Shell-sort 'next' and 'value' field pairs to order them by 'value'.
13060 */
13062 const int hmax = size/9;
13063 int h, i;
13064 for(h = 1; h <= hmax; h = 3*h+1);
13065 for(; h > 0; h /= 3)
13066 {
13067 for(i = h; i < size; ++i)
13068 {
13069 swig_cast_info *p = cast[i].next;
13070 unsigned int hash = cast[i].value;
13071 int j = i;
13072 while(j >= h && hash < cast[j-h].value)
13073 {
13074 cast[j].next = cast[j-h].next;
13075 cast[j].value = cast[j-h].value;
13076 j -= h;
13077 }
13078 cast[j].next = p;
13079 cast[j].value = hash;
13080 }
13081 }
13082}
13083
13084SWIGRUNTIME void
13086 size_t i;
13087 swig_module_info *module_head, *iter;
13088 int init;
13089
13090 /* check to see if the circular list has been setup, if not, set it up */
13091 if (swig_module.next==0) {
13092 /* Initialize the swig_module */
13093 swig_module.type_initial = swig_type_initial;
13094 swig_module.cast_initial = swig_cast_initial;
13095 swig_module.next = &swig_module;
13096 init = 1;
13097 } else {
13098 init = 0;
13099 }
13100
13101 /* Try and load any already created modules */
13102 module_head = SWIG_GetModule(clientdata);
13103 if (!module_head) {
13104 /* This is the first module loaded for this interpreter */
13105 /* so set the swig module into the interpreter */
13106 SWIG_SetModule(clientdata, &swig_module);
13107 } else {
13108 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
13109 iter=module_head;
13110 do {
13111 if (iter==&swig_module) {
13112 /* Our module is already in the list, so there's nothing more to do. */
13113 return;
13114 }
13115 iter=iter->next;
13116 } while (iter!= module_head);
13117
13118 /* otherwise we must add our module into the list */
13119 swig_module.next = module_head->next;
13120 module_head->next = &swig_module;
13121 }
13122
13123 /* When multiple interpreters are used, a module could have already been initialized in
13124 a different interpreter, but not yet have a pointer in this interpreter.
13125 In this case, we do not want to continue adding types... everything should be
13126 set up already */
13127 if (init == 0) return;
13128
13129 /* Now work on filling in swig_module.types */
13130#ifdef SWIGRUNTIME_DEBUG
13131 printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
13132#endif
13133 for (i = 0; i < swig_module.size; ++i) {
13134 swig_type_info *type = 0;
13135 swig_type_info *target_type;
13136 swig_cast_info *cast, *first;
13137 int num_mapped = 0;
13138
13139#ifdef SWIGRUNTIME_DEBUG
13140 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
13141#endif
13142
13143 /* if there is another module already loaded */
13144 if (swig_module.next != &swig_module) {
13145 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
13146 }
13147 if (type) {
13148 /* Overwrite clientdata field */
13149#ifdef SWIGRUNTIME_DEBUG
13150 printf("SWIG_InitializeModule: found type %s\n", type->name);
13151#endif
13152 if (swig_module.type_initial[i]->clientdata) {
13153 type->clientdata = swig_module.type_initial[i]->clientdata;
13154#ifdef SWIGRUNTIME_DEBUG
13155 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
13156#endif
13157 }
13158 } else {
13159 type = swig_module.type_initial[i];
13160 }
13161
13162 /* Insert casting types */
13163 cast = first = swig_module.cast_initial[i];
13164 while (cast->type) {
13165
13166 /* Don't need to add information already in the list */
13167 target_type = 0;
13168#ifdef SWIGRUNTIME_DEBUG
13169 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
13170#endif
13171 if (swig_module.next != &swig_module) {
13172 target_type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
13173 if (target_type) {
13174
13175 /* Target type already defined in another module */
13176#ifdef SWIGRUNTIME_DEBUG
13177 printf("SWIG_InitializeModule: found cast %s\n", target_type->name);
13178#endif
13179 if (type == swig_module.type_initial[i]) {
13180#ifdef SWIGRUNTIME_DEBUG
13181 printf("SWIG_InitializeModule: skip old type %s\n", target_type->name);
13182#endif
13183 cast->type = target_type;
13184 target_type = 0;
13185 } else {
13186 /* Check if this cast is already in the list */
13187 swig_cast_info *ocast = SWIG_TypeCheck(target_type->name, type);
13188#ifdef SWIGRUNTIME_DEBUG
13189 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", target_type->name);
13190#endif
13191 if (!ocast) target_type = 0;
13192 }
13193 }
13194 }
13195
13196 if (!target_type) {
13197#ifdef SWIGRUNTIME_DEBUG
13198 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
13199#endif
13200 /* Set inclusion mark for sorting */
13201 cast->next = cast;
13202 num_mapped++;
13203
13204 if (type == cast->type) {
13205#ifdef SWIGRUNTIME_DEBUG
13206 printf("%s : self cast at pos [%li]\n", type->name, cast - first);
13207#endif
13208 if (cast - first) {
13209
13210 /* Move cast to itself to the first entry in the array */
13211
13212 swig_cast_info tmp = *cast;
13213 *cast = *first;
13214 *first = tmp;
13215 }
13216 first++;
13217
13218 } else {
13219 cast->value = SWIG_Hash(cast->type->name, (unsigned int)strlen(cast->type->name));
13220 }
13221 }
13222 cast++;
13223 }
13224
13225 if (num_mapped) {
13226 if (cast - first) {
13227 swig_cast_info *tmp;
13228
13229 /* Sort casts by type address for binary search in SWIG_TypeCheckStruct */
13230 qsort(first, cast - first, sizeof(swig_cast_info), SWIG_CastCmpStruct);
13231
13232 /* Remap back links for added entries */
13233 cast = swig_module.cast_initial[i] + num_mapped;
13234 for (tmp = first; tmp < cast; tmp++) {
13235 tmp->next = tmp;
13236 }
13237 }
13238
13239 /* Set the value field of the first entry to the index of the last added entry */
13240 cast = swig_module.cast_initial[i];
13241 cast->value = num_mapped - 1;
13242
13243 num_mapped -= (int)(first - cast);
13244 if (num_mapped > 1) {
13245 /* Sort <'next','value'> pairs by 'value' for binary search in SWIG_TypeCheck */
13246
13247 SWIG_CastHashSort(first, num_mapped);
13248 }
13249
13250 first = type->cast;
13251 if (first) {
13252 /* Link the current set into the list of cast arrays */
13253 cast->next = first->next;
13254 first->next = cast;
13255 } else {
13256 cast->next = 0;
13257 type->cast = cast;
13258 }
13259 }
13260
13261 /* Set entry in modules->types array equal to the type */
13262 swig_module.types[i] = type;
13263 }
13264 swig_module.types[i] = 0;
13265
13266#ifdef SWIGRUNTIME_DEBUG
13267 printf("**** SWIG_InitializeModule: Cast List ******\n");
13268 for (i = 0; i < swig_module.size; ++i) {
13269 int j = 0;
13270 swig_cast_info *cast = swig_module.cast_initial[i];
13271 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
13272 while (cast->type) {
13273 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
13274 cast++;
13275 ++j;
13276 }
13277 printf("---- Total casts: %d\n",j);
13278 }
13279 printf("**** SWIG_InitializeModule: Cast List ******\n");
13280#endif
13281}
13282
13283/* This function will propagate the clientdata field of type to
13284* any new swig_type_info structures that have been added into the list
13285* of equivalent types. It is like calling
13286* SWIG_TypeClientData(type, clientdata) a second time.
13287*/
13288SWIGRUNTIME void
13290 size_t i;
13291 static int init_run = 0;
13292
13293 if (init_run) return;
13294 init_run = 1;
13295
13296 for (i = 0; i < swig_module.size; i++) {
13297 if (swig_module.types[i]->clientdata) {
13298 swig_cast_info *head, *cast;
13299 head = swig_module.types[i]->cast;
13300 while (head) {
13301 for (cast = head; (cast - head) <= head->value; cast++) {
13302 if (!cast->converter) {
13303 if (cast->type && !cast->type->clientdata)
13304 SWIG_TypeClientData(cast->type, swig_module.types[i]->clientdata);
13305 }
13306 }
13307 head = head->next;
13308 }
13309 }
13310 }
13311}
13312
13313#ifdef __cplusplus
13314#if 0
13315{ /* c-mode */
13316#endif
13317}
13318#endif
13319
13320
13321
13322/* Forward declaration of where the user's %init{} gets inserted */
13323void SWIG_init_user(lua_State* L );
13324
13325#ifdef __cplusplus
13326extern "C" {
13327#endif
13328/* this is the initialization function
13329 added at the very end of the code
13330 the function is always called SWIG_init, but an earlier #define will rename it
13331*/
13332#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
13333LUALIB_API int SWIG_init(lua_State* L)
13334#else
13335SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
13336#endif
13337{
13338#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
13339 int i;
13340 int globalRegister = 0;
13341 /* start with global table */
13343 /* SWIG's internal initialisation */
13344 SWIG_InitializeModule((void*)L);
13346#endif
13347
13348#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)) || defined(SWIG_LUA_ELUA_EMULATE)
13349 /* add a global fn */
13350 SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
13352#endif
13353
13354#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
13355 /* set up base class pointers (the hierarchy) */
13356 for (i = 0; swig_types[i]; i++){
13357 if (swig_types[i]->clientdata){
13359 }
13360 }
13361#ifdef SWIG_LUA_MODULE_GLOBAL
13362 globalRegister = 1;
13363#endif
13364
13365
13366#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
13367 SWIG_Lua_namespace_register(L,&swig_SwigModule, globalRegister);
13368#endif
13369
13370#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
13371 for (i = 0; swig_types[i]; i++){
13372 if (swig_types[i]->clientdata){
13373 SWIG_Lua_elua_class_register_instance(L,(swig_lua_class*)(swig_types[i]->clientdata));
13374 }
13375 }
13376#endif
13377
13378#if defined(SWIG_LUA_ELUA_EMULATE)
13379 lua_newtable(L);
13380 SWIG_Lua_elua_emulate_register(L,swig_SwigModule.ns_methods);
13381 SWIG_Lua_elua_emulate_register_clear(L);
13382 if(globalRegister) {
13383 lua_pushstring(L,swig_SwigModule.name);
13384 lua_pushvalue(L,-2);
13385 lua_rawset(L,-4);
13386 }
13387#endif
13388
13389#endif
13390
13391#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
13392 /* invoke user-specific initialization */
13393 SWIG_init_user(L);
13394 /* end module */
13395 /* Note: We do not clean up the stack here (Lua will do this for us). At this
13396 point, we have the globals table and out module table on the stack. Returning
13397 one value makes the module table the result of the require command. */
13398 return 1;
13399#else
13400 return 0;
13401#endif
13402}
13403
13404#ifdef __cplusplus
13405}
13406#endif
13407
13408
13409const char* SWIG_LUACODE=
13410 "\n"
13411 " pl = plplotluac";
13412
13413void SWIG_init_user(lua_State* L)
13414{
13415 /* exec Lua code if applicable */
13417}
13418
unsigned int uint
Definition build/sip.h:101
alias void function(PLINT, PLFLT *, PLFLT *) fill_func
void plOptUsage(void)
Definition plargs.c:1304
void plClearOpts(void)
Definition plargs.c:830
void plResetOpts(void)
Definition plargs.c:843
void plSetUsage(PLCHAR_VECTOR program_string, PLCHAR_VECTOR usage_string)
Definition plargs.c:1287
void pltr2(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Definition plcont.c:941
void pltr1(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Definition plcont.c:874
void pltr0(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer PL_UNUSED(pltr_data))
Definition plcont.c:858
void plwarn(PLCHAR_VECTOR errormsg)
Definition plctrl.c:1863
static PLFLT value(double n1, double n2, double hue)
Definition plctrl.c:1219
void plabort(PLCHAR_VECTOR errormsg)
Definition plctrl.c:1894
void plMinMax2dGrid(PLFLT_MATRIX f, PLINT nx, PLINT ny, PLFLT *fnmax, PLFLT *fnmin)
Definition plmem.c:141
PLINT plGetCursor(PLGraphicsIn *plg)
Definition plpage.c:244
#define plgfci
Definition plplot.h:735
#define plgstrm
Definition plplot.h:744
#define plpat
Definition plplot.h:779
#define plschr
Definition plplot.h:790
#define plfontld
Definition plplot.h:721
#define plpath
Definition plplot.h:761
#define plerry
Definition plplot.h:715
#define plsfam
Definition plplot.h:816
#define plsmaj
Definition plplot.h:826
#define plsmin
Definition plplot.h:829
#define pleop
Definition plplot.h:713
#define plimage
Definition plplot.h:753
#define plstransform
Definition plplot.h:840
#define plmap
Definition plplot.h:764
#define plfill
Definition plplot.h:717
#define plvpas
Definition plplot.h:859
#define plgdiplt
Definition plplot.h:732
#define plerrx
Definition plplot.h:714
#define plinit
Definition plplot.h:755
#define plscmap1l
Definition plplot.h:796
#define plsori
Definition plplot.h:830
#define plbox3
Definition plplot.h:698
#define plmapfill
Definition plplot.h:768
#define plcol1
Definition plplot.h:703
#define pltimefmt
Definition plplot.h:856
PLUINT PLUNICODE
Definition plplot.h:201
#define plmaptex
Definition plplot.h:767
#define plvect
Definition plplot.h:858
#define plgchr
Definition plplot.h:722
float PLFLT
Definition plplot.h:163
#define pllegend
Definition plplot.h:758
#define plsyax
Definition plplot.h:852
#define plgver
Definition plplot.h:745
#define plscolbg
Definition plplot.h:802
#define plpsty
Definition plplot.h:784
#define plgfont
Definition plplot.h:737
#define plenv
Definition plplot.h:711
#define pllightsource
Definition plplot.h:759
#define plpoin3
Definition plplot.h:781
#define plgspa
Definition plplot.h:743
#define plscol0
Definition plplot.h:800
#define plptex
Definition plplot.h:785
#define plrgbhls
Definition plplot.h:789
#define plbop
Definition plplot.h:696
#define plgdidev
Definition plplot.h:730
#define plpoin
Definition plplot.h:780
#define plptex3
Definition plplot.h:786
#define plstripd
Definition plplot.h:845
#define plhist
Definition plplot.h:751
#define plmapline
Definition plplot.h:765
#define plgfnam
Definition plplot.h:736
#define plgdiori
Definition plplot.h:731
#define plszax
Definition plplot.h:854
#define plstripa
Definition plplot.h:843
#define plgxax
Definition plplot.h:748
#define plgra
Definition plplot.h:740
#define plenv0
Definition plplot.h:712
#define plspal1
Definition plplot.h:833
#define plstring3
Definition plplot.h:842
#define plxormod
Definition plplot.h:865
#define plspause
Definition plplot.h:834
#define plgdev
Definition plplot.h:729
#define plgradient
Definition plplot.h:741
#define plspal0
Definition plplot.h:832
#define plcalc_world
Definition plplot.h:700
#define plwidth
Definition plplot.h:863
#define pllab
Definition plplot.h:757
#define plsurf3d
Definition plplot.h:847
#define plsurf3dl
Definition plplot.h:848
#define plvasp
Definition plplot.h:857
#define plscmap0n
Definition plplot.h:793
#define plmtex3
Definition plplot.h:774
#define plctime
Definition plplot.h:708
#define plclear
Definition plplot.h:701
#define plsvpa
Definition plplot.h:850
#define plw3d
Definition plplot.h:862
#define plot3dcl
Definition plplot.h:777
#define plscmap1n
Definition plplot.h:798
#define plgvpd
Definition plplot.h:746
#define plhlsrgb
Definition plplot.h:752
#define pl_setcontlabelformat
Definition plplot.h:690
#define plsdev
Definition plplot.h:806
#define plconfigtime
Definition plplot.h:705
#define plscolbga
Definition plplot.h:803
#define PL_UNUSED(x)
Definition plplot.h:138
#define plscmap1
Definition plplot.h:794
#define plsdiplz
Definition plplot.h:811
#define plparseopts
Definition plplot.h:778
#define plmapstring
Definition plplot.h:766
#define plot3d
Definition plplot.h:775
#define plsesc
Definition plplot.h:814
#define plarc
Definition plplot.h:693
#define plsetopt
Definition plplot.h:815
#define plgvpw
Definition plplot.h:747
#define pltext
Definition plplot.h:855
#define plstring
Definition plplot.h:841
#define plsdiori
Definition plplot.h:809
#define plcont
Definition plplot.h:706
#define plspage
Definition plplot.h:831
#define plaxes
Definition plplot.h:694
#define pllsty
Definition plplot.h:763
#define plslabelfunc
Definition plplot.h:825
#define plshades
Definition plplot.h:824
#define plglevel
Definition plplot.h:738
#define plscompression
Definition plplot.h:805
#define plfamadv
Definition plplot.h:716
#define plfont
Definition plplot.h:720
#define plscmap0a
Definition plplot.h:792
#define plgcol0a
Definition plplot.h:725
#define plscmap1_range
Definition plplot.h:799
#define plmeshc
Definition plplot.h:771
#define plshade
Definition plplot.h:820
#define plsym
Definition plplot.h:853
#define plscmap1a
Definition plplot.h:795
#define plscmap0
Definition plplot.h:791
#define plgriddata
Definition plplot.h:742
#define plstripc
Definition plplot.h:844
#define pl_setcontlabelparam
Definition plplot.h:691
#define plsvect
Definition plplot.h:849
#define plstyl
Definition plplot.h:846
#define plline
Definition plplot.h:760
#define pljoin
Definition plplot.h:756
#define plgzax
Definition plplot.h:750
#define plsstrm
Definition plplot.h:835
#define plscmap1la
Definition plplot.h:797
#define plssym
Definition plplot.h:837
#define plscolor
Definition plplot.h:804
#define plcol0
Definition plplot.h:702
#define plsdiplt
Definition plplot.h:810
#define plcolorbar
Definition plplot.h:704
#define plvsta
Definition plplot.h:861
#define plmeridians
Definition plplot.h:769
#define plot3dc
Definition plplot.h:776
#define plcpstrm
Definition plplot.h:707
#define plmkstrm
Definition plplot.h:772
#define plgcol0
Definition plplot.h:724
#define pladv
Definition plplot.h:692
#define plgcolbga
Definition plplot.h:727
#define plline3
Definition plplot.h:762
#define plprec
Definition plplot.h:783
#define plfill3
Definition plplot.h:718
#define plseed
Definition plplot.h:813
#define plgcompression
Definition plplot.h:728
#define plimagefr
Definition plplot.h:754
#define plsfont
Definition plplot.h:819
int PLINT
Definition plplot.h:181
#define plgfam
Definition plplot.h:734
#define plscol0a
Definition plplot.h:801
#define plend1
Definition plplot.h:710
#define plrandd
Definition plplot.h:787
#define plbin
Definition plplot.h:695
#define plsdidev
Definition plplot.h:807
#define plsfnam
Definition plplot.h:818
void * PLPointer
Definition plplot.h:209
#define plflush
Definition plplot.h:719
#define plwind
Definition plplot.h:864
#define plstar
Definition plplot.h:838
#define plmtex
Definition plplot.h:773
PLINT PLBOOL
Definition plplot.h:204
#define plsdimap
Definition plplot.h:808
#define plsfci
Definition plplot.h:817
#define plend
Definition plplot.h:709
#define plmesh
Definition plplot.h:770
#define plreplot
Definition plplot.h:788
#define plgcolbg
Definition plplot.h:726
#define plgcmap1_range
Definition plplot.h:723
#define plstart
Definition plplot.h:839
#define plsxax
Definition plplot.h:851
#define plbox
Definition plplot.h:697
#define plbtime
Definition plplot.h:699
#define plgyax
Definition plplot.h:749
#define plvpor
Definition plplot.h:860
#define plpoly3
Definition plplot.h:782
#define plgpage
Definition plplot.h:739
#define plssub
Definition plplot.h:836
void *(* swig_converter_func)(void *, int *)
struct swig_type_info *(* swig_dycast_func)(void **)
SWIGRUNTIME int SWIG_Lua_class_equal(lua_State *L)
SWIGRUNTIME void SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata)
static int _wrap_ptex(lua_State *L)
static int _wrap_PLGraphicsIn_wX_get(lua_State *L)
static int _wrap_surf3dl(lua_State *L)
static int _wrap_scmap1(lua_State *L)
PLFLT ** read_double_Matrix(lua_State *L, int index, int *nx, int *ny)
static int _wrap_clear(lua_State *L)
SWIGRUNTIME void * SWIG_Lua_MustGetPtr(lua_State *L, int index, swig_type_info *type, int flags, int argnum, const char *func_name)
static int _wrap_szax(lua_State *L)
#define SWIG_DOSTRING_FAIL(S)
static int _wrap_wind(lua_State *L)
static swig_cast_info * swig_cast_initial[]
static int _wrap_PLGraphicsIn_button_get(lua_State *L)
#define lua_rawlen
void mylabel(PLINT axis, PLFLT value, char *label, PLINT length, PLPointer data)
static int _wrap_configtime(lua_State *L)
static int _wrap_sori(lua_State *L)
SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L, int index, void **ptr, swig_type_info *type, int flags)
static int _wrap_mesh(lua_State *L)
static int _wrap_gyax(lua_State *L)
static int _wrap_box(lua_State *L)
#define SWIG_ALLOC_ARRAY(TYPE, LEN)
static int _wrap_spage(lua_State *L)
static int _wrap_mkstrm(lua_State *L)
SWIGRUNTIME void SWIG_Lua_SetModule(lua_State *L, swig_module_info *module)
static int _wrap_PLGraphicsIn_keysym_get(lua_State *L)
SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx, int skip_check)
static swig_type_info _swigt__p_f_double_double_p_double_p_double_p_void__void
static int _wrap_PLGraphicsIn_subwindow_get(lua_State *L)
static int _wrap_rgbhls(lua_State *L)
static int _wrap_scmap1_range(lua_State *L)
SWIGRUNTIME void SWIG_Lua_pusherrstring(lua_State *L, const char *str)
static int _wrap_plend(lua_State *L)
SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
#define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME, TYPE)
SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L)
static int _wrap_hlsrgb(lua_State *L)
SWIGINTERN void SWIG_Lua_add_namespace_classes(lua_State *L, swig_lua_namespace *ns)
#define SWIG_CheckState(r)
static int _wrap_meridians(lua_State *L)
#define SWIG_fail_ptr(func_name, argnum, type)
static swig_cast_info _swigc__p_f_double_double__int[]
#define SWIG_NewMemberObj(L, ptr, sz, type)
static int _wrap_env0(lua_State *L)
static swig_cast_info _swigc__p_int[]
SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss)
static int _wrap_gcolbga(lua_State *L)
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
static int _wrap_gvpd(lua_State *L)
void myct(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data)
SWIGINTERN void SWIG_Lua_class_register_static(lua_State *L, swig_lua_class *clss)
SWIGRUNTIME const char * SWIG_Lua_typename(lua_State *L, int tp)
static int _wrap_ssym(lua_State *L)
static PLINT Alen
static swig_cast_info _swigc__p_double[]
static swig_lua_method swig_PLGraphicsIn_meta[]
#define SWIGTYPE_p_PLGraphicsIn
static int _wrap_plGetCursor(lua_State *L)
static int _wrap_gxax(lua_State *L)
void(* label_func)(PLINT, PLFLT, char *, PLINT, PLPointer)
static int _wrap_PLGraphicsIn_pY_set(lua_State *L)
static swig_lua_attribute swig_PLGraphicsIn_Sf_SwigStatic_attributes[]
#define SWIG_LUA_POINTER
SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
static int _wrap_seed(lua_State *L)
static int _wrap_sdiplt(lua_State *L)
static int _wrap_psty(lua_State *L)
static swig_lua_attribute swig_PLGraphicsIn_attributes[]
static int _wrap_cont(lua_State *L)
SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L, int index, void *ptr, size_t size, swig_type_info *type)
static int _wrap_scmap0a(lua_State *L)
static int _wrap_gradient(lua_State *L)
SWIGINTERN void SWIG_write_ptr_array(lua_State *L, void **array, int size, swig_type_info *type, int own)
static int _wrap_setcontlabelparam(lua_State *L)
SWIGINTERN int SWIG_CastCmpStruct(const void *pa, const void *pb)
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)
SWIGRUNTIME unsigned int SWIG_Hash(const char *str, unsigned int len)
#define SWIGRUNTIME
#define SWIG_Lua_get_table(L, n)
static int _wrap_sdidev(lua_State *L)
static int _wrap_scmap1n(lua_State *L)
static int _wrap_setcontlabelformat(lua_State *L)
static int _wrap_gcmap1_range(lua_State *L)
#define SWIG_RUNTIME_VERSION
static int _wrap_sdimap(lua_State *L)
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
SWIGINTERN int SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
static int _wrap_ssub(lua_State *L)
static int _wrap_new_PLGraphicsIn(lua_State *L)
static int _wrap_scmap1a(lua_State *L)
#define SWIG_Lua_add_function(L, n, f)
static int _wrap_abort(lua_State *L)
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
static int _wrap_glevel(lua_State *L)
#define SWIG_AddCast(r)
#define SWIG_LUA_CHAR
static int _wrap_PLGraphicsIn_dX_get(lua_State *L)
static int _wrap_pat(lua_State *L)
static char mylabel_funcstr[255]
static int _wrap_gchr(lua_State *L)
SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index)
static int _wrap_PLGraphicsIn_pY_get(lua_State *L)
static int _wrap_sfci(lua_State *L)
static int _wrap_shade(lua_State *L)
SWIGINTERN void SWIG_Lua_populate_inheritable_metamethods(lua_State *L)
static swig_type_info * swig_types[13]
static int _wrap_gpage(lua_State *L)
static int _wrap_plResetOpts(lua_State *L)
static swig_cast_info _swigc__p_f_int_p_double_p_double__void[]
static int _wrap_lightsource(lua_State *L)
static int _wrap_sfont(lua_State *L)
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
static int _wrap_calc_world(lua_State *L)
static int _wrap_plot3dcl(lua_State *L)
static int _wrap_gvpw(lua_State *L)
static int _wrap_plOptUsage(lua_State *L)
static swig_module_info swig_module
static int _wrap_image(lua_State *L)
static const char * swig_PLGraphicsIn_base_names[]
static int _wrap_PLGraphicsIn_state_set(lua_State *L)
static swig_lua_class * swig_PLGraphicsIn_bases[]
static PLINT Ylen
static int _wrap_parseopts(lua_State *L)
static int _wrap_MinMax2dGrid(lua_State *L)
static swig_type_info _swigt__p_double
static int _wrap_gdiori(lua_State *L)
#define SWIG_SetModule(clientdata, pointer)
static int _wrap_famadv(lua_State *L)
#define SWIG_INIT_CLIENT_DATA_TYPE
static int _wrap_scolbga(lua_State *L)
static int _wrap_font(lua_State *L)
static int _wrap_gzax(lua_State *L)
static char mypltr_funcstr[255]
static int _wrap_scmap1la(lua_State *L)
static int _wrap_slabelfunc(lua_State *L)
#define SWIG_POINTER_RELEASE
static swig_lua_class * swig_SwigModule_classes[]
SWIGRUNTIME swig_type_info * SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr)
SWIGINTERN int SWIG_itable_size(lua_State *L, int index)
SWIGRUNTIME swig_module_info * SWIG_Lua_GetModule(lua_State *L)
#define SWIGUNUSED
static int _wrap_env(lua_State *L)
static int _wrap_PLGraphicsIn_string_get(lua_State *L)
static swig_type_info _swigt__p_p_char
#define lua_rawsetp(L, index, ptr)
static int _wrap_timefmt(lua_State *L)
static int _wrap_plend1(lua_State *L)
static int _wrap_box3(lua_State *L)
static int _wrap_map(lua_State *L)
SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata)
static int _wrap_gfam(lua_State *L)
static swig_type_info _swigt__p_p_double
#define SWIG_POINTER_CLEAR
SWIGRUNTIME int SWIG_TypeCmp(const char *nb, const char *tb)
static int _wrap_stripc(lua_State *L)
SWIGRUNTIME const char * SWIG_UnpackData(const char *c, void *ptr, size_t sz)
static int _wrap_scmap0n(lua_State *L)
static int _wrap_errx(lua_State *L)
static int _wrap_sstrm(lua_State *L)
void mapform(PLINT n, PLFLT *x, PLFLT *y)
static int _wrap_gstrm(lua_State *L)
SWIGINTERN void SWIG_Lua_get_inheritable_metamethods(lua_State *L)
static int _wrap_init(lua_State *L)
static int _wrap_sfam(lua_State *L)
static int _wrap_replot(lua_State *L)
SWIGINTERN void SWIG_Lua_add_variable(lua_State *L, const char *name, lua_CFunction getFn, lua_CFunction setFn)
static swig_lua_namespace * swig_SwigModule_namespaces[]
#define SWIG_check_num_args(func_name, a, b)
static swig_lua_class * swig_PLGraphicsIn_Sf_SwigStatic_classes[]
static int _wrap_svect(lua_State *L)
#define SWIG_LUA_CONSTTAB_INT(B, C)
static int _wrap_poin(lua_State *L)
static int _wrap_mapfill(lua_State *L)
SWIGINTERN int SWIG_Lua_namespace_get(lua_State *L)
static int _wrap_scol0a(lua_State *L)
static int _wrap_PLGraphicsIn_string_set(lua_State *L)
static int _wrap_star(lua_State *L)
static int _wrap_fontld(lua_State *L)
static int _wrap_line(lua_State *L)
SWIGINTERN int SWIG_Lua_class_get(lua_State *L)
SWIGRUNTIME int SWIG_Lua_type(lua_State *L)
SWIGINTERN void SWIG_Lua_namespace_register(lua_State *L, swig_lua_namespace *ns, int reg)
#define SWIG_LUA_CONSTTAB_FLOAT(B, C)
PLFLT(* f2eval_func)(PLINT, PLINT, PLPointer)
static int _wrap_plClearOpts(lua_State *L)
static int _wrap_legend(lua_State *L)
SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L)
static swig_cast_info _swigc__p_char[]
SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State *L, swig_lua_class *clss)
luaL_Reg swig_lua_method
static int _wrap_poin3(lua_State *L)
static int _wrap_plot3d(lua_State *L)
static swig_type_info _swigt__p_f_int_p_q_const__double_p_q_const__double__void
PLINT(* defined_func)(PLFLT, PLFLT)
static int _wrap_vasp(lua_State *L)
#define SWIG_NewPointerObj(L, ptr, type, owner)
static int _wrap_imagefr(lua_State *L)
static swig_cast_info _swigc__p_p_double[]
#define SWIGINTERN
static int _wrap_gver(lua_State *L)
SWIGINTERN void SWIG_Lua_AddMetatable(lua_State *L, swig_type_info *type)
static int _wrap_scolbg(lua_State *L)
#define SWIG_FREE_ARRAY(PTR)
static int _wrap_PLGraphicsIn_keysym_set(lua_State *L)
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
static int _wrap_w3d(lua_State *L)
static swig_lua_const_info swig_SwigModule_constants[]
static int _wrap_PLGraphicsIn_dY_get(lua_State *L)
static char mapform_funcstr[255]
static int _wrap_stransform(lua_State *L)
SWIGINTERN void SWIG_Lua_class_register(lua_State *L, swig_lua_class *clss)
SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L, void *ptr, swig_type_info *type, int own)
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
static int _wrap_scolor(lua_State *L)
static int _wrap_line3(lua_State *L)
SWIGINTERN int SWIG_Lua_set_immutable(lua_State *L)
static swig_lua_const_info swig_PLGraphicsIn_Sf_SwigStatic_constants[]
static lua_State * myL
void(* ct_func)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer)
#define SWIG_POINTER_NO_NULL
static const char * lua_tolstring(lua_State *L, int idx, size_t *len)
static int _wrap_gdidev(lua_State *L)
static int _wrap_axes(lua_State *L)
static int _wrap_PLGraphicsIn_type_get(lua_State *L)
#define lua_absindex(L, i)
#define SWIG_LUA_FLOAT
static int _wrap_warn(lua_State *L)
SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State *L, swig_lua_namespace *ns)
static int _wrap_randd(lua_State *L)
#define SWIG_NullReferenceError
static int _wrap_arc(lua_State *L)
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
static int _wrap_stripa(lua_State *L)
static int _wrap_PLGraphicsIn_type_set(lua_State *L)
static int _wrap_join(lua_State *L)
static void swig_delete_PLGraphicsIn(void *obj)
static int _wrap_cpstrm(lua_State *L)
static int _wrap_gdiplt(lua_State *L)
#define SWIG_POINTER_DISOWN
SWIGINTERN int SWIG_Lua_namespace_set(lua_State *L)
SWIGINTERN void ** SWIG_get_ptr_array_var(lua_State *L, int index, int *size, swig_type_info *type)
struct swig_type_info swig_type_info
static char myct_funcstr[255]
static int _wrap_gcompression(lua_State *L)
static int _wrap_string(lua_State *L)
SWIGINTERN int SWIG_Lua_class_disown(lua_State *L)
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
static swig_type_info _swigt__p_PLGraphicsIn
SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L, swig_lua_class *clss)
static int _wrap_path(lua_State *L)
static swig_type_info _swigt__p_f_double_double__int
static int _wrap_PLGraphicsIn_subwindow_set(lua_State *L)
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
static int _wrap_smaj(lua_State *L)
static int _wrap_gfci(lua_State *L)
static int _wrap_start(lua_State *L)
static int _wrap_meshc(lua_State *L)
static int _wrap_plot3dc(lua_State *L)
static int _wrap_PLGraphicsIn_wY_get(lua_State *L)
static int _wrap_ctime(lua_State *L)
SWIGINTERN int SWIG_read_ptr_array(lua_State *L, int index, void **array, int size, swig_type_info *type)
SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret)
static int _wrap_lsty(lua_State *L)
static int _wrap_gfnam(lua_State *L)
static int _wrap_bin(lua_State *L)
static int _wrap_mapline(lua_State *L)
static int _wrap_gcol0(lua_State *L)
static int _wrap_PLGraphicsIn_dX_set(lua_State *L)
SWIGINTERN int SWIG_Lua_class_set(lua_State *L)
SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx)
SWIGINTERN void SWIG_CastHashSort(swig_cast_info *cast, int size)
#define SWIG_GetModule(clientdata)
SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L, void *ptr, size_t size, swig_type_info *type)
static int _wrap_PLGraphicsIn_wX_set(lua_State *L)
static int _wrap_bop(lua_State *L)
SWIGINTERN int SWIG_Lua_class_destruct(lua_State *L)
static swig_cast_info _swigc__p_unsigned_int[]
#define SWIG_fail
static int _wrap_ptex3(lua_State *L)
static swig_type_info _swigt__p_int
static swig_lua_method swig_SwigModule_methods[]
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty)
static int _wrap_eop(lua_State *L)
SWIGRUNTIME void SWIG_PropagateClientData(void)
static swig_cast_info _swigc__p_f_int_double_p_char_int_p_void__void[]
static int _wrap_plSetUsage(lua_State *L)
#define lua_pushglobaltable(L)
static int _wrap_poly3(lua_State *L)
#define SWIG_init_user
static swig_lua_method swig_PLGraphicsIn_Sf_SwigStatic_methods[]
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
#define LUA_ALLOC_ARRAY(TYPE, LEN)
static int _wrap_prec(lua_State *L)
static int _wrap_sdev(lua_State *L)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
#define SWIG_isptrtype(L, I)
static int _wrap_PLGraphicsIn_pX_set(lua_State *L)
#define SWIG_ERROR_RELEASE_NOT_OWNED
#define LUA_DECLARE_TYPEMAP_ARR_FN(NAME, TYPE)
static int _wrap_string3(lua_State *L)
static int _wrap_spal1(lua_State *L)
#define SWIG_TYPE_TABLE_NAME
static int _wrap_surf3d(lua_State *L)
static swig_type_info _swigt__p_unsigned_int
static swig_lua_namespace swig_PLGraphicsIn_Sf_SwigStatic
SWIGINTERN void SWIG_Lua_init_base_class(lua_State *L, swig_lua_class *clss)
static int _wrap_spal0(lua_State *L)
static int _wrap_griddata(lua_State *L)
static PLINT Xlen
static swig_type_info _swigt__p_f_int_p_double_p_double__void
static int _wrap_adv(lua_State *L)
static int _wrap_gra(lua_State *L)
#define SWIG_contract_assert(expr, msg)
int(* swig_lua_base_iterator_func)(lua_State *, swig_type_info *, int, int *ret)
static int _wrap_smin(lua_State *L)
#define SWIG_init
SWIGINTERN void SWIG_Lua_create_class_registry(lua_State *L)
static int _wrap_gcol0a(lua_State *L)
#define SWIG_ERROR
static int _wrap_vect(lua_State *L)
static swig_lua_namespace swig_SwigModule
#define LUA_FREE_ARRAY(PTR)
static int _wrap_lab(lua_State *L)
static swig_type_info _swigt__p_f_int_double_p_char_int_p_void__void
static int _wrap_setopt(lua_State *L)
static int _wrap_shades(lua_State *L)
static int _wrap_PLGraphicsIn_button_set(lua_State *L)
SWIGRUNTIME void SWIG_Lua_pushferrstring(lua_State *L, const char *fmt,...)
static swig_type_info * swig_type_initial[]
static int _wrap_mapstring(lua_State *L)
static int _wrap_col1(lua_State *L)
static int _wrap_btime(lua_State *L)
SWIGINTERN int SWIG_table_size(lua_State *L, int index)
static int _wrap_mtex3(lua_State *L)
static int _wrap_sdiplz(lua_State *L)
static int _wrap_styl(lua_State *L)
static int _wrap_vsta(lua_State *L)
static swig_cast_info _swigc__p_PLGraphicsIn[]
static int _wrap_sfnam(lua_State *L)
static int _wrap_fill(lua_State *L)
static int _wrap_mtex(lua_State *L)
static int _wrap_scmap1l(lua_State *L)
static swig_cast_info _swigc__p_p_char[]
static int _wrap_erry(lua_State *L)
static swig_lua_attribute swig_SwigModule_attributes[]
static int _wrap_PLGraphicsIn_pX_get(lua_State *L)
#define SWIG_LUACODE
#define SWIG_LUA_INT
static swig_type_info _swigt__p_char
static int _wrap_col0(lua_State *L)
static swig_lua_method swig_PLGraphicsIn_methods[]
static int _wrap_gfont(lua_State *L)
#define SWIGEXPORT
#define SWIG_IsOK(r)
SWIGINTERN int SWIG_Lua_class_tostring(lua_State *L)
void(* fill_func)(PLINT, const PLFLT *, const PLFLT *)
static int _wrap_svpa(lua_State *L)
static int _wrap_scmap0(lua_State *L)
static int _wrap_vpas(lua_State *L)
#define SWIG_LUA_BINARY
static int _wrap_schr(lua_State *L)
static int _wrap_sxax(lua_State *L)
static int _wrap_stripd(lua_State *L)
static int _wrap_syax(lua_State *L)
static int _wrap_gcolbg(lua_State *L)
static swig_lua_class _wrap_class_PLGraphicsIn
static int _wrap_scompression(lua_State *L)
static int _wrap_maptex(lua_State *L)
static int _wrap_PLGraphicsIn_dY_set(lua_State *L)
static swig_cast_info _swigc__p_f_int_p_q_const__double_p_q_const__double__void[]
#define SWIG_LUA_STRING
static int _wrap_scol0(lua_State *L)
SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[])
static int _wrap_sesc(lua_State *L)
SWIGINTERN void ** SWIG_get_ptr_array_fixed(lua_State *L, int index, int size, swig_type_info *type)
static int _wrap_sdiori(lua_State *L)
static int _proxy__wrap_new_PLGraphicsIn(lua_State *L)
SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L, const char *cname)
#define SWIG_OK
static int _wrap_PLGraphicsIn_wY_set(lua_State *L)
SWIGINTERN void SWIG_Lua_add_class_instance_details(lua_State *L, swig_lua_class *clss)
#define SWIGINTERNINLINE
static int _wrap_gdev(lua_State *L)
#define SWIG_Lua_add_boolean(L, n, b)
static int _wrap_fill3(lua_State *L)
#define lua_rawgetp(L, index, ptr)
#define SWIGRUNTIMEINLINE
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
char string[PL_MAXKEY]
Definition plplot.h:440
PLINT nx
Definition plplot.h:521
PLFLT_NC_MATRIX xg
Definition plplot.h:520
PLINT ny
Definition plplot.h:521
PLFLT_NC_MATRIX zg
Definition plplot.h:520
PLFLT_NC_MATRIX yg
Definition plplot.h:520
PLFLT_NC_FE_POINTER xg
Definition plplot.h:508
PLFLT_NC_FE_POINTER yg
Definition plplot.h:508
PLINT nz
Definition plplot.h:509
PLINT nx
Definition plplot.h:509
PLFLT_NC_FE_POINTER zg
Definition plplot.h:508
PLINT ny
Definition plplot.h:509
swig_type_info * type
struct swig_cast_info * next
swig_converter_func converter
swig_type_info ** type
void(* destructor)(void *)
const char ** base_names
swig_lua_attribute * attributes
swig_lua_namespace * cls_static
struct swig_lua_class ** bases
swig_lua_method * metatable
lua_CFunction constructor
swig_lua_method * methods
swig_type_info ** ptype
swig_lua_method * ns_methods
swig_lua_attribute * ns_attributes
struct swig_lua_class ** ns_classes
swig_lua_const_info * ns_constants
struct swig_lua_namespace ** ns_namespaces
swig_type_info * type
swig_type_info * type
swig_type_info ** types
swig_cast_info ** cast_initial
swig_type_info ** type_initial
struct swig_module_info * next
swig_dycast_func dcast
struct swig_cast_info * cast
void mapform(PLINT n, PLFLT *x, PLFLT *y)
Definition tclAPI.c:3693
static tclMatrixXtnsnDescr * head
Definition tclMatrix.c:460
static const char * name
Definition tkMain.c:135