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.5.0
4 *
5 * Do not make changes to this file unless you know what you are doing - modify
6 * the SWIG interface file instead.
7 * ----------------------------------------------------------------------------- */
8
9
10#define SWIG_VERSION 0x040500
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) || defined (__clang__)
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#define SWIG_QUOTE_STRING(x) #x
146#define SWIG_STRINGIFY(x) SWIG_QUOTE_STRING(x)
147
148/* -----------------------------------------------------------------------------
149 * swigcompat.swg
150 *
151 * Macros to provide support compatibility with older C and C++ standards.
152 *
153 * Note that SWIG expects __cplusplus to be defined to the appropriate C++ standard.
154 * MSVC users are urged to check and examine the /Zc:__cplusplus compiler option.
155 * See https://learn.microsoft.com/en-us/cpp/build/reference/zc-cplusplus.
156 * ----------------------------------------------------------------------------- */
157
158/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
159 * if you're missing it.
160 */
161#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
162 (defined __cplusplus && __cplusplus >= 201103L) || \
163 defined SWIG_HAVE_SNPRINTF) && \
164 !defined SWIG_NO_SNPRINTF
165# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
166# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
167#else
168/* Fallback versions ignore the buffer size, but most of our uses either have a
169 * fixed maximum possible size or dynamically allocate a buffer that's large
170 * enough.
171 */
172# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
173# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
174#endif
175
176/* -----------------------------------------------------------------------------
177 * swigrun.swg
178 *
179 * This file contains generic C API SWIG runtime support for pointer
180 * type checking.
181 * ----------------------------------------------------------------------------- */
182
183/* This should only be incremented when either the layout of swig_type_info changes,
184 or for whatever reason, the runtime changes incompatibly */
185#define SWIG_RUNTIME_VERSION "5"
186
187/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
188#ifdef SWIG_TYPE_TABLE
189# define SWIG_TYPE_TABLE_NAME SWIG_STRINGIFY(SWIG_TYPE_TABLE)
190#else
191# define SWIG_TYPE_TABLE_NAME
192#endif
193
194/*
195 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
196 creating a static or dynamic library from the SWIG runtime code.
197 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
198
199 But only do this if strictly necessary, ie, if you have problems
200 with your compiler or suchlike.
201*/
202
203#ifndef SWIGRUNTIME
204# define SWIGRUNTIME SWIGINTERN
205#endif
206
207#ifndef SWIGRUNTIMEINLINE
208# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
209#endif
210
211/* Generic buffer size */
212#ifndef SWIG_BUFFER_SIZE
213# define SWIG_BUFFER_SIZE 1024
214#endif
215
216/* Flags for pointer conversions */
217#define SWIG_POINTER_DISOWN 0x1
218#define SWIG_CAST_NEW_MEMORY 0x2
219#define SWIG_POINTER_NO_NULL 0x4
220#define SWIG_POINTER_CLEAR 0x8
221#define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
222
223/* Flags for new pointer objects */
224#define SWIG_POINTER_OWN 0x1
225
226
227/*
228 Flags/methods for returning states.
229
230 The SWIG conversion methods, as ConvertPtr, return an integer
231 that tells if the conversion was successful or not. And if not,
232 an error code can be returned (see swigerrors.swg for the codes).
233
234 Use the following macros/flags to set or process the returning
235 states.
236
237 In old versions of SWIG, code such as the following was usually written:
238
239 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
240 // success code
241 } else {
242 //fail code
243 }
244
245 Now you can be more explicit:
246
247 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
248 if (SWIG_IsOK(res)) {
249 // success code
250 } else {
251 // fail code
252 }
253
254 which is the same really, but now you can also do
255
256 Type *ptr;
257 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
258 if (SWIG_IsOK(res)) {
259 // success code
260 if (SWIG_IsNewObj(res) {
261 ...
262 delete *ptr;
263 } else {
264 ...
265 }
266 } else {
267 // fail code
268 }
269
270 I.e., now SWIG_ConvertPtr can return new objects and you can
271 identify the case and take care of the deallocation. Of course that
272 also requires SWIG_ConvertPtr to return new result values, such as
273
274 int SWIG_ConvertPtr(obj, ptr,...) {
275 if (<obj is ok>) {
276 if (<need new object>) {
277 *ptr = <ptr to new allocated object>;
278 return SWIG_NEWOBJ;
279 } else {
280 *ptr = <ptr to old object>;
281 return SWIG_OLDOBJ;
282 }
283 } else {
284 return SWIG_BADOBJ;
285 }
286 }
287
288 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
289 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
290 SWIG errors code.
291
292 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
293 allows returning the 'cast rank', for example, if you have this
294
295 int food(double)
296 int fooi(int);
297
298 and you call
299
300 food(1) // cast rank '1' (1 -> 1.0)
301 fooi(1) // cast rank '0'
302
303 just use the SWIG_AddCast()/SWIG_CheckState()
304*/
305
306#define SWIG_OK (0)
307/* Runtime errors are < 0 */
308#define SWIG_ERROR (-1)
309/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
310/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
311/* Errors < -200 are generic runtime specific errors */
312#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
313
314#define SWIG_IsOK(r) (r >= 0)
315#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
316
317/* The CastRankLimit says how many bits are used for the cast rank */
318#define SWIG_CASTRANKLIMIT (1 << 8)
319/* The NewMask denotes the object was created (using new/malloc) */
320#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
321/* The TmpMask is for in/out typemaps that use temporary objects */
322#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
323/* The binary string mask denotes using string without unicode */
324#define SWIG_BINARYSTRMASK (SWIG_TMPOBJMASK << 1)
325/* Simple returning values */
326#define SWIG_BADOBJ (SWIG_ERROR)
327#define SWIG_OLDOBJ (SWIG_OK)
328#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
329#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
330#define SWIG_BINARYSTR (SWIG_OK | SWIG_BINARYSTRMASK)
331/* Check, add and del object mask methods */
332#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
333#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
334#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
335#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
336#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
337#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
338#define SWIG_AddBinaryStrMask(r) (SWIG_IsOK(r) ? (r | SWIG_BINARYSTRMASK) : r)
339#define SWIG_DelBinaryStrMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_BINARYSTRMASK) : r)
340#define SWIG_IsBinaryStr(r) (SWIG_IsOK(r) && (r & SWIG_BINARYSTRMASK))
341
342/* Cast-Rank Mode */
343#if defined(SWIG_CASTRANK_MODE)
344# ifndef SWIG_TypeRank
345# define SWIG_TypeRank unsigned long
346# endif
347# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
348# define SWIG_MAXCASTRANK (2)
349# endif
350# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
351# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
353 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
354}
356 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
357}
358#else /* no cast-rank mode */
359# define SWIG_AddCast(r) (r)
360# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
361#endif
362
363
364#include <string.h>
365
366#ifdef __cplusplus
367extern "C" {
368#endif
369
370typedef void *(*swig_converter_func)(void *, int *);
371typedef struct swig_type_info *(*swig_dycast_func)(void **);
372
373/* Structure to store information on one type */
374typedef struct swig_type_info {
375 const char *name; /* mangled name of this type */
376 const char *str; /* human readable name of this type */
377 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
378 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
379 void *clientdata; /* language specific type data */
380 int owndata; /* flag if the structure owns the clientdata */
382
383/* Structure to store a type and conversion function used for casting */
384typedef struct swig_cast_info {
385 swig_type_info *type; /* pointer to type that is equivalent to this type */
386 swig_converter_func converter; /* function to cast the void pointers */
387 struct swig_cast_info *next; /* pointer to next array of casts | pointer to cast hashed by value */
388 unsigned int value; /* index of the last valid element in the array | typename hash value */
390
391/* Structure used to store module information
392 * Each module generates one structure like this, and the runtime collects
393 * all of these structures and stores them in a circularly linked list.*/
394typedef struct swig_module_info {
395 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
396 size_t size; /* Number of types in this module */
397 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
398 swig_type_info **type_initial; /* Array of initially generated type structures */
399 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
400 void *clientdata; /* Language specific module data */
402
403/*
404 Compare two type names skipping the space characters, therefore
405 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
406
407 Return 0 when the two name types are equivalent, as in
408 strncmp, but skipping ' '.
409*/
410SWIGRUNTIME int
411SWIG_TypeNameComp(const char *f1, const char *l1,
412 const char *f2, const char *l2) {
413 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
414 while ((*f1 == ' ') && (f1 != l1)) ++f1;
415 while ((*f2 == ' ') && (f2 != l2)) ++f2;
416 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
417 }
418 return (int)((l1 - f1) - (l2 - f2));
419}
420
421/*
422 Check type equivalence in a name list like <name1>|<name2>|...
423 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
424*/
425SWIGRUNTIME int
426SWIG_TypeCmp(const char *nb, const char *tb) {
427 int equiv = 1;
428 const char* te = tb + strlen(tb);
429 const char* ne = nb;
430 while (equiv != 0 && *ne) {
431 for (nb = ne; *ne; ++ne) {
432 if (*ne == '|') break;
433 }
434 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
435 if (*ne) ++ne;
436 }
437 return equiv;
438}
439
440/*
441 Check type equivalence in a name list like <name1>|<name2>|...
442 Return 0 if not equal, 1 if equal
443*/
444SWIGRUNTIME int
445SWIG_TypeEquiv(const char *nb, const char *tb) {
446 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
447}
448
449/*
450 * Hash function for type name strings, based on maRushPrime1Hash (http://amsoftware.narod.ru/algo2.html)
451 */
452SWIGRUNTIME unsigned int SWIG_Hash(const char *str, unsigned int len) {
453 const unsigned char *data = (const unsigned char *)str;
454 unsigned int hash = len, i = 0, k;
455 int rem = (int)len;
456
457 while (rem >= (int)sizeof(unsigned int)) {
458 memcpy(&k, data, sizeof(unsigned int));
459 k += i++;
460 hash ^= k;
461 hash *= 171717;
462 data += sizeof(unsigned int);
463 rem -= (int)sizeof(unsigned int);
464 }
465
466 switch (rem) {
467 case 3: k = (unsigned int)(data[2]) << 16;
468 k |= (unsigned int)(data[1]) << 8;
469 k |= (unsigned int)(data[0]);
470 k += i++;
471 hash ^= k;
472 hash *= 171717;
473 break;
474 case 2: k = (unsigned int)(data[1]) << 8;
475 k |= (unsigned int)(data[0]);
476 k += i++;
477 hash ^= k;
478 hash *= 171717;
479 break;
480 case 1: k = (unsigned int)(data[0]);
481 k += i++;
482 hash ^= k;
483 hash *= 171717;
484 break;
485 }
486 return hash;
487}
488
489/*
490 Check the typename
491*/
493SWIG_TypeCheck(const char *c, swig_type_info *ty) {
494 static const unsigned int scan_threshold = 4;
495 if (ty) {
496 swig_cast_info *head = ty->cast;
497 unsigned int hash_value = 0;
498 int hashed = 0;
499
500 while (head) {
501
502 if (strcmp(head->type->name, c) == 0) {
503 return head;
504 }
505
506 if (head->value) {
507 swig_cast_info *iter;
508 swig_cast_info *last = head + head->value;
509 swig_cast_info *first = head + 1;
510 int search = 1;
511
512 if (!hashed) {
513 if (head->value < scan_threshold) {
514 for (iter = first; iter <= last; iter++) {
515 if (strcmp(iter->type->name, c) == 0) {
516 return iter;
517 }
518 }
519 search = 0;
520 } else {
521 hashed = 1;
522 hash_value = SWIG_Hash(c, (unsigned int)strlen(c));
523 }
524 }
525
526 if (search) {
527 /* Binary search over sorted <'next'|'value'> pairs */
528 do {
529 iter = first + ((last - first) >> 1);
530 if (iter->value < hash_value) {
531 first = iter + 1;
532 } else if (iter->value == hash_value) {
533
534 if (strcmp(iter->next->type->name, c) == 0) {
535 return iter->next;
536 }
537
538 /* Hash collision check */
539 for (last = iter + 1; last->next && last->value == hash_value; last++) {
540 if (strcmp(last->next->type->name, c) == 0) {
541 return last->next;
542 }
543 }
544 for (first = iter - 1; first != head && first->value == hash_value; first--) {
545 if (strcmp(first->next->type->name, c) == 0) {
546 return first->next;
547 }
548 }
549 break;
550 } else
551 last = iter - 1;
552 } while (first <= last);
553 }
554 }
555 head = head->next;
556 }
557 }
558 return 0;
559}
560
561/*
562 Check the type by type address
563*/
566 if (ty) {
567 swig_cast_info *head = ty->cast;
568 while (head) {
569 if (head->type == from) {
570 return head;
571 }
572
573 if (head->value) {
574 swig_cast_info *iter;
575 swig_cast_info *last = head + head->value;
576 swig_cast_info *first = head + 1;
577
578 /* Binary search over sorted array of casts */
579 do {
580 iter = first + ((last - first) >> 1);
581 if (iter->type < from) {
582 first = iter + 1;
583 } else if (iter->type == from) {
584 return iter;
585 } else
586 last = iter - 1;
587 } while (first <= last);
588 }
589 head = head->next;
590 }
591 }
592 return 0;
593}
594
595/*
596 Cast a pointer up an inheritance hierarchy
597*/
599SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
600 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
601}
602
603/*
604 Dynamic pointer casting. Down an inheritance hierarchy
605*/
608 swig_type_info *lastty = ty;
609 if (!ty || !ty->dcast) return ty;
610 while (ty && (ty->dcast)) {
611 ty = (*ty->dcast)(ptr);
612 if (ty) lastty = ty;
613 }
614 return lastty;
615}
616
617/*
618 Return the name associated with this type
619*/
620SWIGRUNTIMEINLINE const char *
622 return ty->name;
623}
624
625/*
626 Return the pretty name associated with this type,
627 that is an unmangled type name in a form presentable to the user.
628*/
629SWIGRUNTIME const char *
631 /* The "str" field contains the equivalent pretty names of the
632 type, separated by vertical-bar characters. Choose the last
633 name. It should be the most specific; a fully resolved name
634 but not necessarily with default template parameters expanded. */
635 if (!type) return NULL;
636 if (type->str != NULL) {
637 const char *last_name = type->str;
638 const char *s;
639 for (s = type->str; *s; s++)
640 if (*s == '|') last_name = s+1;
641 return last_name;
642 }
643 else
644 return type->name;
645}
646
647/*
648 Set the clientdata field for a type
649*/
650SWIGRUNTIME void
652 swig_cast_info *head = ti->cast;
653 /* if (ti->clientdata == clientdata) return; */
655
656 while (head) {
657 swig_cast_info *cast;
658 for (cast = head; (unsigned int)(cast - head) <= head->value; cast++) {
659 if (!cast->converter) {
660 swig_type_info *tc = cast->type;
661 if (!tc->clientdata) {
663 }
664 }
665 }
666 head = head->next;
667 }
668}
669
670SWIGRUNTIME void
675
676/*
677 Search for a swig_type_info structure only by mangled name
678 Search is a O(log #types)
679
680 We start searching at module start, and finish searching when start == end.
681 Note: if start == end at the beginning of the function, we go all the way around
682 the circular list.
683*/
686 swig_module_info *end,
687 const char *name) {
688 swig_module_info *iter = start;
689 do {
690 if (iter->size) {
691 size_t l = 0;
692 size_t r = iter->size - 1;
693 do {
694 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
695 size_t i = (l + r) >> 1;
696 const char *iname = iter->types[i]->name;
697 if (iname) {
698 int compare = strcmp(name, iname);
699 if (compare == 0) {
700 return iter->types[i];
701 } else if (compare < 0) {
702 if (i) {
703 r = i - 1;
704 } else {
705 break;
706 }
707 } else if (compare > 0) {
708 l = i + 1;
709 }
710 } else {
711 break; /* should never happen */
712 }
713 } while (l <= r);
714 }
715 iter = iter->next;
716 } while (iter != end);
717 return 0;
718}
719
720/*
721 Search for a swig_type_info structure for either a mangled name or a human readable name.
722 It first searches the mangled names of the types, which is a O(log #types)
723 If a type is not found it then searches the human readable names, which is O(#types).
724
725 We start searching at module start, and finish searching when start == end.
726 Note: if start == end at the beginning of the function, we go all the way around
727 the circular list.
728*/
731 swig_module_info *end,
732 const char *name) {
733 /* STEP 1: Search the name field using binary search */
735 if (ret) {
736 return ret;
737 } else {
738 /* STEP 2: If the type hasn't been found, do a complete search
739 of the str field (the human readable name) */
740 swig_module_info *iter = start;
741 do {
742 size_t i = 0;
743 for (; i < iter->size; ++i) {
744 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
745 return iter->types[i];
746 }
747 iter = iter->next;
748 } while (iter != end);
749 }
750
751 /* neither found a match */
752 return 0;
753}
754
755/*
756 Pack binary data into a string
757*/
758SWIGRUNTIME char *
759SWIG_PackData(char *c, void *ptr, size_t sz) {
760 static const char hex[17] = "0123456789abcdef";
761 const unsigned char *u = (unsigned char *) ptr;
762 const unsigned char *eu = u + sz;
763 for (; u != eu; ++u) {
764 unsigned char uu = *u;
765 *(c++) = hex[(uu & 0xf0) >> 4];
766 *(c++) = hex[uu & 0xf];
767 }
768 return c;
769}
770
771/*
772 Unpack binary data from a string
773*/
774SWIGRUNTIME const char *
775SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
776 unsigned char *u = (unsigned char *) ptr;
777 const unsigned char *eu = u + sz;
778 for (; u != eu; ++u) {
779 char d = *(c++);
780 unsigned char uu;
781 if ((d >= '0') && (d <= '9'))
782 uu = (unsigned char)((d - '0') << 4);
783 else if ((d >= 'a') && (d <= 'f'))
784 uu = (unsigned char)((d - ('a'-10)) << 4);
785 else
786 return (char *) 0;
787 d = *(c++);
788 if ((d >= '0') && (d <= '9'))
789 uu |= (unsigned char)(d - '0');
790 else if ((d >= 'a') && (d <= 'f'))
791 uu |= (unsigned char)(d - ('a'-10));
792 else
793 return (char *) 0;
794 *u = uu;
795 }
796 return c;
797}
798
799/*
800 Pack 'void *' into a string buffer.
801*/
802SWIGRUNTIME char *
803SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
804 char *r = buff;
805 if ((2*sizeof(void *) + 2) > bsz) return 0;
806 *(r++) = '_';
807 r = SWIG_PackData(r,&ptr,sizeof(void *));
808 if (strlen(name) + 1 > (bsz - (size_t)(r - buff))) return 0;
809 strcpy(r,name);
810 return buff;
811}
812
813SWIGRUNTIME const char *
814SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
815 if (*c != '_') {
816 if (strcmp(c,"NULL") == 0) {
817 *ptr = (void *) 0;
818 return name;
819 } else {
820 return 0;
821 }
822 }
823 return SWIG_UnpackData(++c,ptr,sizeof(void *));
824}
825
826SWIGRUNTIME char *
827SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
828 char *r = buff;
829 size_t lname = (name ? strlen(name) : 0);
830 if ((2*sz + 2 + lname) > bsz) return 0;
831 *(r++) = '_';
832 r = SWIG_PackData(r,ptr,sz);
833 if (lname) {
834 strncpy(r,name,lname+1);
835 } else {
836 *r = 0;
837 }
838 return buff;
839}
840
841SWIGRUNTIME const char *
842SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
843 if (*c != '_') {
844 if (strcmp(c,"NULL") == 0) {
845 memset(ptr,0,sz);
846 return name;
847 } else {
848 return 0;
849 }
850 }
851 return SWIG_UnpackData(++c,ptr,sz);
852}
853
854#ifdef __cplusplus
855}
856#endif
857
858/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
859#define SWIG_UnknownError -1
860#define SWIG_IOError -2
861#define SWIG_RuntimeError -3
862#define SWIG_IndexError -4
863#define SWIG_TypeError -5
864#define SWIG_DivisionByZero -6
865#define SWIG_OverflowError -7
866#define SWIG_SyntaxError -8
867#define SWIG_ValueError -9
868#define SWIG_SystemError -10
869#define SWIG_AttributeError -11
870#define SWIG_MemoryError -12
871#define SWIG_NullReferenceError -13
872
873
874/* -----------------------------------------------------------------------------
875 * luarun.swg
876 *
877 * This file contains the runtime support for Lua modules
878 * and includes code for managing global variables and pointer
879 * type checking.
880 * ----------------------------------------------------------------------------- */
881
882#ifdef __cplusplus
883extern "C" {
884#endif
885
886#include "lua.h"
887#include "lauxlib.h"
888#include <stdlib.h> /* for malloc */
889#include <assert.h> /* for a few sanity tests */
890
891/* -----------------------------------------------------------------------------
892 * Lua flavors
893 * ----------------------------------------------------------------------------- */
894
895#define SWIG_LUA_FLAVOR_LUA 1
896#define SWIG_LUA_FLAVOR_ELUA 2
897#define SWIG_LUA_FLAVOR_ELUAC 3
898
899#if !defined(SWIG_LUA_TARGET)
900# error SWIG_LUA_TARGET not defined
901#endif
902
903#if defined(SWIG_LUA_ELUA_EMULATE)
904
905struct swig_elua_entry;
906
907typedef struct swig_elua_key {
908 int type;
909 union {
910 const char* strkey;
911 lua_Number numkey;
912 } key;
913} swig_elua_key;
914
915typedef struct swig_elua_val {
916 int type;
917 union {
918 lua_Number number;
919 const struct swig_elua_entry *table;
920 const char *string;
921 lua_CFunction function;
922 struct {
923 char member;
924 long lvalue;
925 void *pvalue;
926 swig_type_info **ptype;
927 } userdata;
928 } value;
929} swig_elua_val;
930
931typedef struct swig_elua_entry {
932 swig_elua_key key;
933 swig_elua_val value;
934} swig_elua_entry;
935
936#define LSTRKEY(x) {LUA_TSTRING, {.strkey = x} }
937#define LNUMKEY(x) {LUA_TNUMBER, {.numkey = x} }
938#define LNILKEY {LUA_TNIL, {.strkey = 0} }
939
940#define LNUMVAL(x) {LUA_TNUMBER, {.number = x} }
941#define LFUNCVAL(x) {LUA_TFUNCTION, {.function = x} }
942#define LROVAL(x) {LUA_TTABLE, {.table = x} }
943#define LNILVAL {LUA_TNIL, {.string = 0} }
944#define LSTRVAL(x) {LUA_TSTRING, {.string = x} }
945
946#define LUA_REG_TYPE swig_elua_entry
947
948#define SWIG_LUA_ELUA_EMUL_METATABLE_KEY "__metatable"
949
950#define lua_pushrotable(L,p)\
951 lua_newtable(L);\
952 assert(p);\
953 SWIG_Lua_elua_emulate_register(L,(swig_elua_entry*)(p));
954
955#define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
956 LSTRKEY(B), {LUA_TUSERDATA, { .userdata={0,0,(void*)(C),&D} } }
957
958#define SWIG_LUA_CONSTTAB_BINARY(B,S,C,D)\
959 LSTRKEY(B), {LUA_TUSERDATA, { .userdata={1,S,(void*)(C),&D} } }
960#endif
961
962#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
963# define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
964# define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
965# define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
966# define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
967 /* Those two types of constants are not supported in elua */
968
969#ifndef SWIG_LUA_CONSTTAB_POINTER
970#warning eLua does not support pointers as constants. By default, nil will be used as value
971#define SWIG_LUA_CONSTTAB_POINTER(B,C,D) LSTRKEY(B), LNILVAL
972#endif
973
974#ifndef SWIG_LUA_CONSTTAB_BINARY
975#warning eLua does not support pointers to member as constants. By default, nil will be used as value
976#define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D) LSTRKEY(B), LNILVAL
977#endif
978#else /* SWIG_LUA_FLAVOR_LUA */
979# define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
980# define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
981# define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
982# define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
983# define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
984 SWIG_LUA_POINTER, (char *)B, 0, 0, (void *)C, &D
985# define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D)\
986 SWIG_LUA_BINARY, (char *)B, S, 0, (void *)C, &D
987#endif
988
989#ifndef SWIG_LUA_ELUA_EMULATE
990#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
991# define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
992# define LSTRVAL LRO_STRVAL
993#endif
994#endif /* SWIG_LUA_ELUA_EMULATE*/
995
996#ifndef SWIG_LUA_ELUA_EMULATE
997#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
998
999#ifndef MIN_OPT_LEVEL
1000#define MIN_OPT_LEVEL 2
1001#endif
1002
1003#include "lrodefs.h"
1004#include "lrotable.h"
1005#endif
1006#endif /* SWIG_LUA_ELUA_EMULATE*/
1007
1008/* -----------------------------------------------------------------------------
1009 * Compatibility defines for supporting Lua 5.1.
1010 *
1011 * Note that LuaJIT, which implements the Lua 5.1 API and does not define Lua 5.2
1012 * additions. See the "Extensions from Lua 5.2" section of
1013 * https://luajit.org/extensions.html: "LuaJIT is API+ABI-compatible with Lua 5.1 ..."
1014 * ----------------------------------------------------------------------------- */
1015
1016/* lua_rawlen() was named lua_objlen() in Lua 5.1. */
1017#if LUA_VERSION_NUM == 501
1018# define lua_rawlen lua_objlen
1019#endif
1020
1021/* lua_pushglobaltable is the recommended "future-proof" way to get the global
1022 table for Lua 5.2 and later; define it for Lua 5.1. */
1023#if LUA_VERSION_NUM < 502
1024# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
1025#endif
1026
1027/* lua_rawsetp/lua_rawgetp were introduced in Lua 5.2; define them for Lua 5.1. */
1028#if LUA_VERSION_NUM < 502
1029#define lua_rawsetp(L,index,ptr)\
1030 lua_pushlightuserdata(L,(void*)(ptr));\
1031 lua_insert(L,-2);\
1032 lua_rawset(L,index);
1033
1034#define lua_rawgetp(L,index,ptr)\
1035 lua_pushlightuserdata(L,(void*)(ptr));\
1036 lua_rawget(L,index);
1037#endif
1038
1039/* --------------------------------------------------------------------------
1040 * Helper functions for error handling
1041 * -------------------------------------------------------------------------- */
1042
1043/* Push the string STR on the Lua stack, like lua_pushstring, but
1044 prefixed with the location of the innermost Lua call-point
1045 (as formatted by luaL_where). */
1046SWIGRUNTIME void
1047SWIG_Lua_pusherrstring (lua_State *L, const char *str)
1048{
1049 luaL_where (L, 1);
1050 lua_pushstring (L, str);
1051 lua_concat (L, 2);
1052}
1053
1054/* Push a formatted string generated from FMT and following args on
1055 the Lua stack, like lua_pushfstring, but prefixed with the
1056 location of the innermost Lua call-point (as formatted by luaL_where). */
1057SWIGRUNTIME void
1058SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...)
1059{
1060 va_list argp;
1061 va_start(argp, fmt);
1062 luaL_where(L, 1);
1063 lua_pushvfstring(L, fmt, argp);
1064 va_end(argp);
1065 lua_concat(L, 2);
1066}
1067
1068
1069/* -----------------------------------------------------------------------------
1070 * global swig types
1071 * ----------------------------------------------------------------------------- */
1072/* Constant table */
1073#define SWIG_LUA_INT 1
1074#define SWIG_LUA_FLOAT 2
1075#define SWIG_LUA_STRING 3
1076#define SWIG_LUA_POINTER 4
1077#define SWIG_LUA_BINARY 5
1078#define SWIG_LUA_CHAR 6
1079
1080/* Structure for variable linking table */
1081typedef struct {
1082 const char *name;
1083 lua_CFunction get;
1084 lua_CFunction set;
1086
1087#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
1088typedef const LUA_REG_TYPE swig_lua_method;
1089typedef const LUA_REG_TYPE swig_lua_const_info;
1090#else /* Normal lua */
1091typedef luaL_Reg swig_lua_method;
1092
1093/* Constant information structure */
1094typedef struct {
1095 int type;
1096 char *name;
1098 double dvalue;
1099 void *pvalue;
1102
1103#endif
1104
1105typedef struct {
1106 const char *name;
1107 lua_CFunction getmethod;
1108 lua_CFunction setmethod;
1110
1111
1112struct swig_lua_class;
1113/* Can be used to create namespaces. Currently used to wrap class static methods/variables/constants */
1122
1123typedef struct swig_lua_class {
1124 const char *name; /* Name that this class has in Lua */
1125 const char *fqname; /* Fully qualified name - Scope + class name */
1127 lua_CFunction constructor;
1128 void (*destructor)(void *);
1132 swig_lua_method *metatable; /* 0 for -eluac */
1134 const char **base_names;
1136
1137/* this is the struct for wrapping all pointers in SwigLua
1138*/
1139typedef struct {
1141 int own; /* 1 if owned & must be destroyed */
1142 void *ptr;
1144
1145/* this is the struct for wrapping arbitrary packed binary data
1146(currently it is only used for member function pointers)
1147the data ordering is similar to swig_lua_userdata, but it is currently not possible
1148to tell the two structures apart within SWIG, other than by looking at the type
1149*/
1150typedef struct {
1152 int own; /* 1 if owned & must be destroyed */
1153 char data[1]; /* arbitrary amount of data */
1155
1156/* Common SWIG API */
1157#define SWIG_NewPointerObj(L, ptr, type, owner) SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
1158#define SWIG_ConvertPtr(L,idx, ptr, type, flags) SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
1159#define SWIG_ConvertPtrAndOwn(L,idx, ptr, type, flags, own) SWIG_Lua_ConvertPtrAndOwn(L,idx,ptr,type,flags,own)
1160#define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname) SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
1161/* for C++ member pointers, ie, member methods */
1162#define SWIG_ConvertMember(L, idx, ptr, sz, ty) SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
1163#define SWIG_NewMemberObj(L, ptr, sz, type) SWIG_Lua_NewPackedObj(L, ptr, sz, type)
1164
1165/* Runtime API */
1166#define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
1167#define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
1168#define SWIG_MODULE_CLIENTDATA_TYPE lua_State*
1169
1170/* Contract support */
1171#define SWIG_contract_assert(expr, msg) \
1172 do { if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } } while (0)
1173
1174
1175/* helper #defines */
1176#define SWIG_fail {goto fail;}
1177#define SWIG_fail_arg(func_name,argnum,type) \
1178 {SWIG_Lua_pushferrstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
1179 func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
1180 goto fail;}
1181#define SWIG_fail_ptr(func_name,argnum,type) \
1182 SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
1183#define SWIG_check_num_args(func_name,a,b) \
1184 if (lua_gettop(L)<a || lua_gettop(L)>b) \
1185 {SWIG_Lua_pushferrstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
1186 goto fail;}
1187
1188
1189#define SWIG_Lua_get_table(L,n) \
1190 (lua_pushstring(L, n), lua_rawget(L,-2))
1191
1192#define SWIG_Lua_add_function(L,n,f) \
1193 (lua_pushstring(L, n), \
1194 lua_pushcfunction(L, f), \
1195 lua_rawset(L,-3))
1196
1197#define SWIG_Lua_add_boolean(L,n,b) \
1198 (lua_pushstring(L, n), \
1199 lua_pushboolean(L, b), \
1200 lua_rawset(L,-3))
1201
1202/* special helper for allowing 'nil' for usertypes */
1203#define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))
1204
1205#ifdef __cplusplus
1206/* Special helper for member function pointers
1207it gets the address, casts it, then dereferences it */
1208/*#define SWIG_mem_fn_as_voidptr(a) (*((char**)&(a))) */
1209#endif
1210
1211/* storing/access of swig_module_info */
1213SWIG_Lua_GetModule(lua_State *L) {
1214 swig_module_info *ret = 0;
1215 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1216 lua_rawget(L,LUA_REGISTRYINDEX);
1217 if (lua_islightuserdata(L,-1))
1218 ret=(swig_module_info*)lua_touserdata(L,-1);
1219 lua_pop(L,1); /* tidy */
1220 return ret;
1221}
1222
1223SWIGRUNTIME void
1224SWIG_Lua_SetModule(lua_State *L, swig_module_info *module) {
1225 /* add this all into the Lua registry: */
1226 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1227 lua_pushlightuserdata(L,(void*)module);
1228 lua_rawset(L,LUA_REGISTRYINDEX);
1229}
1230
1231/* -----------------------------------------------------------------------------
1232 * global variable support code: modules
1233 * ----------------------------------------------------------------------------- */
1234
1235/* this function is called when trying to set an immutable.
1236default action is to print an error.
1237This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
1239{
1240/* there should be 1 param passed in: the new value */
1241#ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
1242 lua_pop(L,1); /* remove it */
1243 luaL_error(L,"This variable is immutable");
1244#endif
1245 return 0; /* should not return anything */
1246}
1247
1248#ifdef SWIG_LUA_ELUA_EMULATE
1249
1250SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own);
1251SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type);
1252static int swig_lua_elua_emulate_unique_key;
1253
1254/* This function emulates eLua rotables behaviour. It loads a rotable definition into the usual lua table. */
1255SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_entry *table)
1256{
1257 int i, table_parsed, parsed_tables_array, target_table;
1258 assert(lua_istable(L,-1));
1259 target_table = lua_gettop(L);
1260 /* Get the registry where we put all parsed tables to avoid loops */
1261 lua_rawgetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
1262 if(lua_isnil(L,-1)) {
1263 lua_pop(L,1);
1264 lua_newtable(L);
1265 lua_pushvalue(L,-1);
1266 lua_rawsetp(L,LUA_REGISTRYINDEX,(void*)(&swig_lua_elua_emulate_unique_key));
1267 }
1268 parsed_tables_array = lua_gettop(L);
1269 lua_pushvalue(L,target_table);
1270 lua_rawsetp(L, parsed_tables_array, table);
1271 table_parsed = 0;
1272 const int SWIGUNUSED pairs_start = lua_gettop(L);
1273 for(i = 0;table[i].key.type != LUA_TNIL || table[i].value.type != LUA_TNIL;i++)
1274 {
1275 const swig_elua_entry *entry = table + i;
1276 int is_metatable = 0;
1277 switch(entry->key.type) {
1278 case LUA_TSTRING:
1279 lua_pushstring(L,entry->key.key.strkey);
1280 if(strcmp(entry->key.key.strkey, SWIG_LUA_ELUA_EMUL_METATABLE_KEY) == 0)
1281 is_metatable = 1;
1282 break;
1283 case LUA_TNUMBER:
1284 lua_pushnumber(L,entry->key.key.numkey);
1285 break;
1286 case LUA_TNIL:
1287 lua_pushnil(L);
1288 break;
1289 default:
1290 assert(0);
1291 }
1292 switch(entry->value.type) {
1293 case LUA_TSTRING:
1294 lua_pushstring(L,entry->value.value.string);
1295 break;
1296 case LUA_TNUMBER:
1297 lua_pushnumber(L,entry->value.value.number);
1298 break;
1299 case LUA_TFUNCTION:
1300 lua_pushcfunction(L,entry->value.value.function);
1301 break;
1302 case LUA_TTABLE:
1303 lua_rawgetp(L,parsed_tables_array, entry->value.value.table);
1304 table_parsed = !lua_isnil(L,-1);
1305 if(!table_parsed) {
1306 lua_pop(L,1); /*remove nil */
1307 lua_newtable(L);
1308 SWIG_Lua_elua_emulate_register(L,entry->value.value.table);
1309 }
1310 if(is_metatable) {
1311 assert(lua_istable(L,-1));
1312 lua_pushvalue(L,-1);
1313 lua_setmetatable(L,target_table);
1314 }
1315
1316 break;
1317 case LUA_TUSERDATA:
1318 if(entry->value.value.userdata.member)
1319 SWIG_NewMemberObj(L,entry->value.value.userdata.pvalue,
1320 entry->value.value.userdata.lvalue,
1321 *(entry->value.value.userdata.ptype));
1322 else
1323 SWIG_NewPointerObj(L,entry->value.value.userdata.pvalue,
1324 *(entry->value.value.userdata.ptype),0);
1325 break;
1326 case LUA_TNIL:
1327 lua_pushnil(L);
1328 break;
1329 default:
1330 assert(0);
1331 }
1332 assert(lua_gettop(L) == pairs_start + 2);
1333 lua_rawset(L,target_table);
1334 }
1335 lua_pop(L,1); /* Removing parsed tables storage */
1336 assert(lua_gettop(L) == target_table);
1337}
1338
1339SWIGINTERN void SWIG_Lua_elua_emulate_register_clear(lua_State *L)
1340{
1341 lua_pushnil(L);
1342 lua_rawsetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
1343}
1344
1345SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L);
1346
1347SWIGINTERN int SWIG_Lua_emulate_elua_getmetatable(lua_State *L)
1348{
1349 SWIG_check_num_args("getmetatable(SWIG eLua emulation)", 1, 1);
1351 lua_getfield(L,-1,"lua_getmetatable");
1352 lua_remove(L,-2); /* remove the registry*/
1353 assert(!lua_isnil(L,-1));
1354 lua_pushvalue(L,1);
1355 assert(lua_gettop(L) == 3); /* object | function | object again */
1356 lua_call(L,1,1);
1357 if(!lua_isnil(L,-1)) /*There is an ordinary metatable */
1358 return 1;
1359 /*if it is a table, then emulate elua behaviour - check for __metatable attribute of a table*/
1360 assert(lua_gettop(L) == 2);
1361 if(lua_istable(L,-2)) {
1362 lua_pop(L,1); /*remove the nil*/
1363 lua_getfield(L,-1, SWIG_LUA_ELUA_EMUL_METATABLE_KEY);
1364 }
1365 assert(lua_gettop(L) == 2);
1366 return 1;
1367
1368fail:
1369 lua_error(L);
1370 return 0;
1371}
1372
1373SWIGINTERN void SWIG_Lua_emulate_elua_swap_getmetatable(lua_State *L)
1374{
1377 lua_pushstring(L,"lua_getmetatable");
1378 lua_getfield(L,-2,"getmetatable");
1379 assert(!lua_isnil(L,-1));
1380 lua_rawset(L,-4);
1381 lua_pushstring(L, "getmetatable");
1382 lua_pushcfunction(L, SWIG_Lua_emulate_elua_getmetatable);
1383 lua_rawset(L,-3);
1384 lua_pop(L,2);
1385
1386}
1387/* END OF REMOVE */
1388
1389#endif
1390/* -----------------------------------------------------------------------------
1391 * global variable support code: namespaces and modules (which are the same thing)
1392 * ----------------------------------------------------------------------------- */
1393
1395{
1396/* there should be 2 params passed in
1397 (1) table (not the meta table)
1398 (2) string name of the attribute
1399*/
1400 assert(lua_istable(L,-2)); /* just in case */
1401 lua_getmetatable(L,-2);
1402 assert(lua_istable(L,-1));
1403 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1404 assert(lua_istable(L,-1));
1405 /* look for the key in the .get table */
1406 lua_pushvalue(L,2); /* key */
1407 lua_rawget(L,-2);
1408 lua_remove(L,-2); /* stack tidy, remove .get table */
1409 if (lua_iscfunction(L,-1))
1410 { /* found it so call the fn & return its value */
1411 lua_call(L,0,1); /* 1 value in (userdata),1 out (result) */
1412 lua_remove(L,-2); /* stack tidy, remove metatable */
1413 return 1;
1414 }
1415 lua_pop(L,1); /* remove whatever was there */
1416 /* ok, so try the .fn table */
1417 SWIG_Lua_get_table(L,".fn"); /* find the .get table */
1418 assert(lua_istable(L,-1)); /* just in case */
1419 lua_pushvalue(L,2); /* key */
1420 lua_rawget(L,-2); /* look for the fn */
1421 lua_remove(L,-2); /* stack tidy, remove .fn table */
1422 if (lua_isfunction(L,-1)) /* note: whether it's a C function or lua function */
1423 { /* found it so return the fn & let lua call it */
1424 lua_remove(L,-2); /* stack tidy, remove metatable */
1425 return 1;
1426 }
1427 lua_pop(L,1); /* remove whatever was there */
1428 return 0;
1429}
1430
1432{
1433/* there should be 3 params passed in
1434 (1) table (not the meta table)
1435 (2) string name of the attribute
1436 (3) any for the new value
1437*/
1438
1439 assert(lua_istable(L,1));
1440 lua_getmetatable(L,1); /* get the meta table */
1441 assert(lua_istable(L,-1));
1442
1443 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1444 if (lua_istable(L,-1))
1445 {
1446 /* look for the key in the .set table */
1447 lua_pushvalue(L,2); /* key */
1448 lua_rawget(L,-2);
1449 if (lua_iscfunction(L,-1))
1450 { /* found it so call the fn & return its value */
1451 lua_pushvalue(L,3); /* value */
1452 lua_call(L,1,0);
1453 return 0;
1454 }
1455 lua_pop(L,1); /* remove the value */
1456 }
1457 lua_pop(L,1); /* remove the value .set table */
1458 lua_pop(L,1); /* remote metatable */
1459 lua_rawset(L,-3);
1460 return 0;
1461}
1462
1463#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
1464SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]); /* forward declaration */
1465SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn); /* forward declaration */
1466SWIGINTERN void SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss);
1467
1468/* helper function - register namespace methods and attributes into namespace */
1470{
1471 int i;
1472 /* There must be namespace table (not metatable) at the top of the stack */
1473 assert(lua_istable(L,-1));
1475
1476 /* add methods to the namespace/module table */
1477 for(i=0;ns->ns_methods[i].name;i++){
1478 SWIG_Lua_add_function(L,ns->ns_methods[i].name,ns->ns_methods[i].func);
1479 }
1480 lua_getmetatable(L,-1);
1481
1482 /* add fns */
1483 for(i=0;ns->ns_attributes[i].name;i++){
1485 }
1486
1487 /* clear stack - remove metatble */
1488 lua_pop(L,1);
1489 return 0;
1490}
1491
1492/* Register all classes in the namespace */
1494{
1495 swig_lua_class **classes;
1496
1497 /* There must be a module/namespace table at the top of the stack */
1498 assert(lua_istable(L,-1));
1499
1500 classes = ns->ns_classes;
1501
1502 if( classes != 0 ) {
1503 while(*classes != 0) {
1504 SWIG_Lua_class_register(L, *classes);
1505 classes++;
1506 }
1507 }
1508}
1509
1510/* Helper function. Creates namespace table and adds it to module table
1511 if 'reg' is true, then will register namespace table to parent one (must be on top of the stack
1512 when function is called).
1513 Function always returns newly registered table on top of the stack.
1514*/
1516{
1517 swig_lua_namespace **sub_namespace;
1518 /* 1 argument - table on the top of the stack */
1519 const int SWIGUNUSED begin = lua_gettop(L);
1520 assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table or parent namespace table */
1521 lua_checkstack(L,5);
1522 lua_newtable(L); /* namespace itself */
1523 lua_newtable(L); /* metatable for namespace */
1524
1525 /* add a table called ".get" */
1526 lua_pushstring(L,".get");
1527 lua_newtable(L);
1528 lua_rawset(L,-3);
1529 /* add a table called ".set" */
1530 lua_pushstring(L,".set");
1531 lua_newtable(L);
1532 lua_rawset(L,-3);
1533 /* add a table called ".fn" */
1534 lua_pushstring(L,".fn");
1535 lua_newtable(L);
1536 lua_rawset(L,-3);
1537
1538 /* add accessor fns for using the .get,.set&.fn */
1541
1542 lua_setmetatable(L,-2); /* set metatable */
1543
1544 /* Register all functions, variables etc */
1546 /* Register classes */
1548
1549 sub_namespace = ns->ns_namespaces;
1550 if( sub_namespace != 0) {
1551 while(*sub_namespace != 0) {
1552 SWIG_Lua_namespace_register(L, *sub_namespace, 1);
1553 lua_pop(L,1); /* removing sub-namespace table */
1554 sub_namespace++;
1555 }
1556 }
1557
1558 if (reg) {
1559 lua_pushstring(L,ns->name);
1560 lua_pushvalue(L,-2);
1561 lua_rawset(L,-4); /* add namespace to module table */
1562 }
1563 assert(lua_gettop(L) == begin+1);
1564}
1565#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */
1566
1567/* -----------------------------------------------------------------------------
1568 * global variable support code: classes
1569 * ----------------------------------------------------------------------------- */
1570
1571SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname);
1572
1573typedef int (*swig_lua_base_iterator_func)(lua_State*,swig_type_info*, int, int *ret);
1574
1576 int first_arg, swig_lua_base_iterator_func func, int *const ret)
1577{
1578 /* first_arg - position of the object in stack. Everything that is above are arguments
1579 * and is passed to every evocation of the func */
1580 int last_arg = lua_gettop(L);/* position of last argument */
1581 int original_metatable = last_arg + 1;
1582 size_t bases_count;
1583 int result = SWIG_ERROR;
1584 int bases_table;
1585 (void)swig_type;
1586 lua_getmetatable(L,first_arg);
1587
1588 /* initialise base search */
1589#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1590 SWIG_Lua_get_table(L,".bases");
1591 assert(lua_istable(L,-1));
1592 bases_count = lua_rawlen(L,-1);
1593 bases_table = lua_gettop(L);
1594#else
1595 /* In elua .bases table doesn't exist. Use table from swig_lua_class */
1596 (void)bases_table;
1597 assert(swig_type!=0);
1599 swig_lua_class **bases= ((swig_lua_class*)(swig_type->clientdata))->bases;
1600 const char **base_names= ((swig_lua_class*)(swig_type->clientdata))->base_names;
1601 bases_count = 0;
1602 for(;base_names[bases_count];
1603 bases_count++);/* get length of bases */
1604#endif
1605
1606 if(ret)
1607 *ret = 0;
1608 if(bases_count>0)
1609 {
1610 int to_remove;
1611 size_t i;
1612 int j;
1613 int subcall_last_arg;
1614 int subcall_first_arg = lua_gettop(L) + 1;/* Here a copy of first_arg and arguments begin */
1615 int valid = 1;
1616 swig_type_info *base_swig_type = 0;
1617 for(j=first_arg;j<=last_arg;j++)
1618 lua_pushvalue(L,j);
1619 subcall_last_arg = lua_gettop(L);
1620
1621 /* Trick: temporarily replacing original metatable with metatable for base class and call getter */
1622 for(i=0;i<bases_count;i++) {
1623 /* Iteration through class bases */
1624#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1625 lua_rawgeti(L,bases_table,i+1);
1626 base_swig_type = 0;
1627 if(lua_isnil(L,-1)) {
1628 valid = 0;
1629 lua_pop(L,1);
1630 } else {
1631 valid = 1;
1632 }
1633#else /* In elua .bases table doesn't exist. Use table from swig_lua_class */
1634 swig_lua_class *base_class = bases[i];
1635 if(!base_class) {
1636 valid = 0;
1637 } else {
1638 valid = 1;
1639 SWIG_Lua_get_class_metatable(L,base_class->fqname);
1640 base_swig_type = SWIG_TypeQueryModule(module,module,base_names[i]);
1641 assert(base_swig_type != 0);
1642 }
1643#endif
1644
1645 if(!valid)
1646 continue;
1647 assert(lua_isuserdata(L, subcall_first_arg));
1648 assert(lua_istable(L,-1));
1649 lua_setmetatable(L,subcall_first_arg); /* Set new metatable */
1650 assert(lua_gettop(L) == subcall_last_arg);
1651 result = func(L, base_swig_type,subcall_first_arg, ret); /* Forward call */
1652 if(result != SWIG_ERROR) {
1653 break;
1654 }
1655 }
1656 /* Restore original metatable */
1657 lua_pushvalue(L,original_metatable);
1658 lua_setmetatable(L,first_arg);
1659 /* Clear - remove everything between last_arg and subcall_last_arg including */
1660 to_remove = subcall_last_arg - last_arg;
1661 for(j=0;j<to_remove;j++)
1662 lua_remove(L,last_arg+1);
1663 } else {
1664 /* Remove everything after last_arg */
1665 lua_pop(L, lua_gettop(L) - last_arg);
1666 }
1667 if(ret) assert(lua_gettop(L) == last_arg + *ret);
1668 return result;
1669}
1670
1671/* The class.get method helper, performs the lookup of class attributes.
1672 * It returns an error code. Number of function return values is passed inside 'ret'.
1673 * first_arg is not used in this function because function always has 2 arguments.
1674 */
1675SWIGINTERN int SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
1676{
1677/* there should be 2 params passed in
1678 (1) userdata (not the meta table)
1679 (2) string name of the attribute
1680*/
1681 int bases_search_result;
1682 int substack_start = lua_gettop(L)-2;
1683 assert(first_arg == substack_start+1);
1684 (void)first_arg;
1685 lua_checkstack(L,5);
1686 assert(lua_isuserdata(L,-2)); /* just in case */
1687 lua_getmetatable(L,-2); /* get the meta table */
1688 assert(lua_istable(L,-1)); /* just in case */
1689 /* NEW: looks for the __getitem() fn
1690 this is a user provided get fn */
1691 SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
1692 if (lua_iscfunction(L,-1)) /* if it's there */
1693 { /* found it so call the fn & return its value */
1694 lua_pushvalue(L,substack_start+1); /* the userdata */
1695 lua_pushvalue(L,substack_start+2); /* the parameter */
1696 lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */
1697 lua_remove(L,-2); /* stack tidy, remove metatable */
1698 if(ret) *ret = 1;
1699 return SWIG_OK;
1700 }
1701 lua_pop(L,1);
1702 /* Remove the metatable */
1703 lua_pop(L,1);
1704 /* Search in base classes */
1705 bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get_item,ret);
1706 return bases_search_result; /* sorry not known */
1707}
1708
1709
1710/* The class.get method helper, performs the lookup of class attributes.
1711 * It returns an error code. Number of function return values is passed inside 'ret'.
1712 * first_arg is not used in this function because function always has 2 arguments.
1713 */
1714SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
1715{
1716/* there should be 2 params passed in
1717 (1) userdata (not the meta table)
1718 (2) string name of the attribute
1719*/
1720 int bases_search_result;
1721 int substack_start = lua_gettop(L)-2;
1722 assert(first_arg == substack_start+1);
1723 (void)first_arg;
1724 lua_checkstack(L,5);
1725 assert(lua_isuserdata(L,-2)); /* just in case */
1726 lua_getmetatable(L,-2); /* get the meta table */
1727 assert(lua_istable(L,-1)); /* just in case */
1728 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1729 assert(lua_istable(L,-1)); /* just in case */
1730 /* look for the key in the .get table */
1731 lua_pushvalue(L,substack_start+2); /* key */
1732 lua_rawget(L,-2);
1733 lua_remove(L,-2); /* stack tidy, remove .get table */
1734 if (lua_iscfunction(L,-1))
1735 { /* found it so call the fn & return its value */
1736 lua_pushvalue(L,substack_start+1); /* the userdata */
1737 lua_call(L,1,1); /* 1 value in (userdata),1 out (result) */
1738 lua_remove(L,-2); /* stack tidy, remove metatable */
1739 if(ret)
1740 *ret = 1;
1741 return SWIG_OK;
1742 }
1743 lua_pop(L,1); /* remove whatever was there */
1744 /* ok, so try the .fn table */
1745 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
1746 assert(lua_istable(L,-1)); /* just in case */
1747 lua_pushvalue(L,substack_start+2); /* key */
1748 lua_rawget(L,-2); /* look for the fn */
1749 lua_remove(L,-2); /* stack tidy, remove .fn table */
1750 if (lua_isfunction(L,-1)) /* note: if it's a C function or lua function */
1751 { /* found it so return the fn & let lua call it */
1752 lua_remove(L,-2); /* stack tidy, remove metatable */
1753 if(ret)
1754 *ret = 1;
1755 return SWIG_OK;
1756 }
1757 lua_pop(L,1); /* remove whatever was there */
1758 /* Remove the metatable */
1759 lua_pop(L,1);
1760 /* Search in base classes */
1761 bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get,ret);
1762 return bases_search_result; /* sorry not known */
1763}
1764
1765/* the class.get method, performs the lookup of class attributes
1766 */
1768{
1769/* there should be 2 params passed in
1770 (1) userdata (not the meta table)
1771 (2) string name of the attribute
1772*/
1773 int result;
1774 swig_lua_userdata *usr;
1775 swig_type_info *type;
1776 int ret = 0;
1777 assert(lua_isuserdata(L,1));
1778 usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1779 type = usr->type;
1780 result = SWIG_Lua_class_do_get(L,type,1,&ret);
1781 if(result == SWIG_OK)
1782 return ret;
1783
1784 result = SWIG_Lua_class_do_get_item(L,type,1,&ret);
1785 if(result == SWIG_OK)
1786 return ret;
1787
1788 return 0;
1789}
1790
1791/* helper for the class.set method, performs the lookup of class attributes
1792 * It returns error code. Number of function return values is passed inside 'ret'
1793 */
1794SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret)
1795{
1796/* there should be 3 params passed in
1797 (1) table (not the meta table)
1798 (2) string name of the attribute
1799 (3) any for the new value
1800 */
1801
1802 int bases_search_result;
1803 int substack_start = lua_gettop(L) - 3;
1804 lua_checkstack(L,5);
1805 assert(lua_isuserdata(L,substack_start+1)); /* just in case */
1806 lua_getmetatable(L,substack_start+1); /* get the meta table */
1807 assert(lua_istable(L,-1)); /* just in case */
1808 if(ret)
1809 *ret = 0; /* it is setter - number of return values is always 0 */
1810
1811 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1812 if (lua_istable(L,-1))
1813 {
1814 /* look for the key in the .set table */
1815 lua_pushvalue(L,substack_start+2); /* key */
1816 lua_rawget(L,-2);
1817 lua_remove(L,-2); /* tidy stack, remove .set table */
1818 if (lua_iscfunction(L,-1))
1819 { /* found it so call the fn & return its value */
1820 lua_pushvalue(L,substack_start+1); /* userdata */
1821 lua_pushvalue(L,substack_start+3); /* value */
1822 lua_call(L,2,0);
1823 lua_remove(L,substack_start+4); /*remove metatable*/
1824 return SWIG_OK;
1825 }
1826 lua_pop(L,1); /* remove the value */
1827 } else {
1828 lua_pop(L,1); /* remove the answer for .set table request*/
1829 }
1830 /* NEW: looks for the __setitem() fn
1831 this is a user provided set fn */
1832 SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
1833 if (lua_iscfunction(L,-1)) /* if it's there */
1834 { /* found it so call the fn & return its value */
1835 lua_pushvalue(L,substack_start+1); /* the userdata */
1836 lua_pushvalue(L,substack_start+2); /* the parameter */
1837 lua_pushvalue(L,substack_start+3); /* the value */
1838 lua_call(L,3,0); /* 3 values in ,0 out */
1839 lua_remove(L,-2); /* stack tidy, remove metatable */
1840 return SWIG_OK;
1841 }
1842 lua_pop(L,1); /* remove value */
1843
1844 lua_pop(L,1); /* remove metatable */
1845 /* Search among bases */
1846 bases_search_result = SWIG_Lua_iterate_bases(L,type,first_arg,SWIG_Lua_class_do_set,ret);
1847 if(ret)
1848 assert(*ret == 0);
1849 assert(lua_gettop(L) == substack_start + 3);
1850 return bases_search_result;
1851}
1852
1853/* This is the actual method exported to Lua. It calls SWIG_Lua_class_do_set and correctly
1854 * handles return values.
1855 */
1857{
1858/* There should be 3 params passed in
1859 (1) table (not the meta table)
1860 (2) string name of the attribute
1861 (3) any for the new value
1862 */
1863 int ret = 0;
1864 int result;
1865 swig_lua_userdata *usr;
1866 swig_type_info *type;
1867 assert(lua_isuserdata(L,1));
1868 usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1869 type = usr->type;
1870 result = SWIG_Lua_class_do_set(L,type,1,&ret);
1871 if(result != SWIG_OK) {
1872 SWIG_Lua_pushferrstring(L,"Assignment not possible. No setter/member with this name. For custom assignments implement __setitem method.");
1873 lua_error(L);
1874 } else {
1875 assert(ret==0);
1876 }
1877 return 0;
1878}
1879
1880/* the class.destruct method called by the interpreter */
1882{
1883/* there should be 1 params passed in
1884 (1) userdata (not the meta table) */
1885 swig_lua_userdata *usr;
1886 swig_lua_class *clss;
1887 assert(lua_isuserdata(L,-1)); /* just in case */
1888 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1889 /* if must be destroyed & has a destructor */
1890 if (usr->own) /* if must be destroyed */
1891 {
1892 clss=(swig_lua_class*)usr->type->clientdata; /* get the class */
1893 if (clss && clss->destructor) /* there is a destroy fn */
1894 {
1895 clss->destructor(usr->ptr); /* bye bye */
1896 }
1897 }
1898 return 0;
1899}
1900
1901/* the class.__tostring method called by the interpreter and print */
1903{
1904/* there should be 1 param passed in
1905 (1) userdata (not the metatable) */
1906 swig_lua_userdata* userData;
1907 assert(lua_isuserdata(L,1)); /* just in case */
1908 userData = (swig_lua_userdata*)lua_touserdata(L,1); /* get the userdata address */
1909
1910 lua_pushfstring(L, "<userdata of type '%s' at %p>", userData->type->str, userData->ptr);
1911 return 1;
1912}
1913
1914/* to manually disown some userdata */
1916{
1917/* there should be 1 params passed in
1918 (1) userdata (not the meta table) */
1919 swig_lua_userdata *usr;
1920 assert(lua_isuserdata(L,-1)); /* just in case */
1921 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1922
1923 usr->own = 0; /* clear our ownership */
1924 return 0;
1925}
1926
1927/* lua callable function to compare userdata's value
1928the issue is that two userdata may point to the same thing
1929but to lua, they are different objects */
1931{
1932 int result;
1933 swig_lua_userdata *usr1,*usr2;
1934 if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2)) /* just in case */
1935 return 0; /* nil reply */
1936 usr1=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1937 usr2=(swig_lua_userdata*)lua_touserdata(L,2); /* get data */
1938 /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
1939 result=(usr1->ptr==usr2->ptr);
1940 lua_pushboolean(L,result);
1941 return 1;
1942}
1943
1944/* populate table at the top of the stack with metamethods that ought to be inherited */
1946{
1947 SWIG_Lua_add_boolean(L, "__add", 1);
1948 SWIG_Lua_add_boolean(L, "__sub", 1);
1949 SWIG_Lua_add_boolean(L, "__mul", 1);
1950 SWIG_Lua_add_boolean(L, "__div", 1);
1951 SWIG_Lua_add_boolean(L, "__mod", 1);
1952 SWIG_Lua_add_boolean(L, "__pow", 1);
1953 SWIG_Lua_add_boolean(L, "__unm", 1);
1954 SWIG_Lua_add_boolean(L, "__len", 1 );
1955 SWIG_Lua_add_boolean(L, "__concat", 1 );
1956 SWIG_Lua_add_boolean(L, "__eq", 1);
1957 SWIG_Lua_add_boolean(L, "__lt", 1);
1958 SWIG_Lua_add_boolean(L, "__le", 1);
1959 SWIG_Lua_add_boolean(L, "__call", 1);
1960 SWIG_Lua_add_boolean(L, "__tostring", 1);
1961 SWIG_Lua_add_boolean(L, "__gc", 0);
1962}
1963
1964/* creates the swig registry */
1966{
1967 /* create main SWIG registry table */
1968 lua_pushstring(L,"SWIG");
1969 lua_newtable(L);
1970 /* populate it with some predefined data */
1971
1972 /* .library table. Placeholder */
1973 lua_pushstring(L,".library");
1974 lua_newtable(L);
1975 {
1976 /* list of metamethods that class inherits from its bases */
1977 lua_pushstring(L,"inheritable_metamethods");
1978 lua_newtable(L);
1979 /* populate with list of metamethods */
1981 lua_rawset(L,-3);
1982 }
1983 lua_rawset(L,-3);
1984
1985 lua_rawset(L,LUA_REGISTRYINDEX);
1986}
1987
1988/* gets the swig registry (or creates it) */
1990{
1991 /* add this all into the swig registry: */
1992 lua_pushstring(L,"SWIG");
1993 lua_rawget(L,LUA_REGISTRYINDEX); /* get the registry */
1994 if (!lua_istable(L,-1)) /* not there */
1995 { /* must be first time, so add it */
1996 lua_pop(L,1); /* remove the result */
1998 /* then get it */
1999 lua_pushstring(L,"SWIG");
2000 lua_rawget(L,LUA_REGISTRYINDEX);
2001 }
2002}
2003
2005{
2007 lua_pushstring(L, ".library");
2008 lua_rawget(L,-2);
2009 assert( !lua_isnil(L,-1) );
2010 lua_pushstring(L, "inheritable_metamethods");
2011 lua_rawget(L,-2);
2012
2013 /* Remove class registry and library table */
2014 lua_remove(L,-2);
2015 lua_remove(L,-2);
2016}
2017
2018/* Helper function to get the classes metatable from the register */
2019SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname)
2020{
2021 SWIG_Lua_get_class_registry(L); /* get the registry */
2022 lua_pushstring(L,cname); /* get the name */
2023 lua_rawget(L,-2); /* get it */
2024 lua_remove(L,-2); /* tidy up (remove registry) */
2025}
2026
2027/* Set up the base classes pointers.
2028Each class structure has a list of pointers to the base class structures.
2029This function fills them.
2030It cannot be done at compile time, as this will not work with hireachies
2031spread over more than one swig file.
2032Therefore it must be done at runtime, querying the SWIG type system.
2033*/
2035{
2036 int i=0;
2038 for(i=0;clss->base_names[i];i++)
2039 {
2040 if (clss->bases[i]==0) /* not found yet */
2041 {
2042 /* lookup and cache the base class */
2043 swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
2044 if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
2045 }
2046 }
2047}
2048
2049#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
2050/* helper add a variable to a registered class */
2051SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn)
2052{
2053 assert(lua_istable(L,-1)); /* just in case */
2054 SWIG_Lua_get_table(L,".get"); /* find the .get table */
2055 assert(lua_istable(L,-1)); /* just in case */
2056 SWIG_Lua_add_function(L,name,getFn);
2057 lua_pop(L,1); /* tidy stack (remove table) */
2058 if (setFn)
2059 {
2060 SWIG_Lua_get_table(L,".set"); /* find the .set table */
2061 assert(lua_istable(L,-1)); /* just in case */
2062 SWIG_Lua_add_function(L,name,setFn);
2063 lua_pop(L,1); /* tidy stack (remove table) */
2064 }
2065}
2066
2067/* helper to recursively add class static details (static attributes, operations and constants) */
2069{
2070 int i = 0;
2071 /* The class namespace table must be on the top of the stack */
2072 assert(lua_istable(L,-1));
2073 /* call all the base classes first: we can then override these later: */
2074 for(i=0;clss->bases[i];i++)
2075 {
2077 }
2078
2080}
2081
2082SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss); /* forward declaration */
2083
2084/* helper to recursively add class details (attributes & operations) */
2086{
2087 int i;
2088 size_t bases_count = 0;
2089 /* Add bases to .bases table */
2090 SWIG_Lua_get_table(L,".bases");
2091 assert(lua_istable(L,-1)); /* just in case */
2092 for(i=0;clss->bases[i];i++)
2093 {
2095 /* Base class must be already registered */
2096 assert(lua_istable(L,-1));
2097 lua_rawseti(L,-2,i+1); /* In lua indexing starts from 1 */
2098 bases_count++;
2099 }
2100 assert(lua_rawlen(L,-1) == bases_count);
2101 lua_pop(L,1); /* remove .bases table */
2102 /* add attributes */
2103 for(i=0;clss->attributes[i].name;i++){
2105 }
2106 /* add methods to the metatable */
2107 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
2108 assert(lua_istable(L,-1)); /* just in case */
2109 for(i=0;clss->methods[i].name;i++){
2110 SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].func);
2111 }
2112 lua_pop(L,1); /* tidy stack (remove table) */
2113 /* add operator overloads
2114 This adds methods from metatable array to metatable. Can mess up garbage
2115 collectind if someone defines __gc method
2116 */
2117 if(clss->metatable) {
2118 for(i=0;clss->metatable[i].name;i++) {
2119 SWIG_Lua_add_function(L,clss->metatable[i].name,clss->metatable[i].func);
2120 }
2121 }
2122
2123 /* Adding metamethods that are defined in base classes. If bases were squashed
2124 * then it is obviously unnecessary
2125 */
2127}
2128
2129/* Helpers to add user defined class metamedhods - __add, __sub etc. The helpers are needed
2130 for the following issue: Lua runtime checks for metamethod existence with rawget function
2131 ignoring our SWIG-provided __index and __newindex functions. Thus our inheritance-aware method
2132 search algorithm doesn't work in such case. (Not to say that Lua runtime queries metamethod directly
2133 in metatable and not in object).
2134 Current solution is this: if somewhere in hierarchy metamethod __x is defined, then all descendants
2135 are automatically given a special proxy __x that calls the real __x method.
2136 Obvious idea - to copy __x instead of creating __x-proxy is wrong because if someone changes __x in runtime,
2137 those changes must be reflected in all descendants.
2138*/
2139
2140SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L); /*forward declaration*/
2141
2142/* The real function that resolves a metamethod.
2143 * Function searches given class and all its bases (recursively) for first instance of something that is
2144 * not equal to SWIG_Lua_resolve_metamethod. (Almost always this 'something' is actual metamethod implementation
2145 * and it is a SWIG-generated C function.). It returns value on the top of the L and there is no garbage below the
2146 * answer.
2147 * Returns 1 if found, 0 otherwise.
2148 * clss is class which metatable we will search for method
2149 * metamethod_name_idx is index in L where metamethod name (as string) lies
2150 * skip_check allows skipping searching metamethod in the given class and immediately going to searching in bases. skip_check
2151 * is not carried to subsequent recursive calls - false is always passed. It is set to true only at first call from
2152 * SWIG_Lua_resolve_metamethod
2153 * */
2154SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx,
2155 int skip_check)
2156{
2157 /* This function is called recursively */
2158 int result = 0;
2159 int i = 0;
2160
2161 if (!skip_check) {
2163 lua_pushvalue(L, metamethod_name_idx);
2164 lua_rawget(L,-2);
2165 /* If this is cfunction and it is equal to SWIG_Lua_resolve_metamethod then
2166 * this isn't the function we are looking for :)
2167 * lua_tocfunction will return NULL if not cfunction
2168 */
2169 if (!lua_isnil(L,-1) && lua_tocfunction(L,-1) != SWIG_Lua_resolve_metamethod ) {
2170 lua_remove(L,-2); /* removing class metatable */
2171 return 1;
2172 }
2173 lua_pop(L,2); /* remove class metatable and query result */
2174 }
2175
2176 /* Forwarding calls to bases */
2177 for(i=0;clss->bases[i];i++)
2178 {
2179 result = SWIG_Lua_do_resolve_metamethod(L, clss->bases[i], metamethod_name_idx, 0);
2180 if (result)
2181 break;
2182 }
2183
2184 return result;
2185}
2186
2187/* The proxy function for metamethod. All parameters are passed as cclosure. Searches for actual method
2188 * and calls it */
2190{
2191 int numargs;
2192 int metamethod_name_idx;
2193 const swig_lua_class* clss;
2194 int result;
2195
2196 lua_checkstack(L,5);
2197 numargs = lua_gettop(L); /* number of arguments to pass to actual metamethod */
2198
2199 /* Get upvalues from closure */
2200 lua_pushvalue(L, lua_upvalueindex(1)); /*Get function name*/
2201 metamethod_name_idx = lua_gettop(L);
2202
2203 lua_pushvalue(L, lua_upvalueindex(2));
2204 clss = (const swig_lua_class*)(lua_touserdata(L,-1));
2205 lua_pop(L,1); /* remove lightuserdata with clss from stack */
2206
2207 /* Actual work */
2208 result = SWIG_Lua_do_resolve_metamethod(L, clss, metamethod_name_idx, 1);
2209 if (!result) {
2210 SWIG_Lua_pushferrstring(L,"The metamethod proxy is set, but it failed to find actual metamethod. Memory corruption is most likely explanation.");
2211 lua_error(L);
2212 return 0;
2213 }
2214
2215 lua_remove(L,-2); /* remove metamethod key */
2216 lua_insert(L,1); /* move function to correct position */
2217 lua_call(L, numargs, LUA_MULTRET);
2218 return lua_gettop(L); /* return all results */
2219}
2220
2221
2222/* If given metamethod must be present in given class, then creates appropriate proxy
2223 * Returns 1 if successfully added, 0 if not added because no base class has it, -1
2224 * if method is defined in the class metatable itself
2225 */
2226SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index)
2227{
2228 int key_index;
2229 int success = 0;
2230 int i = 0;
2231
2232 /* metamethod name - on the top of the stack */
2233 assert(lua_isstring(L,-1));
2234
2235 key_index = lua_gettop(L);
2236
2237 /* Check whether method is already defined in metatable */
2238 lua_pushvalue(L,key_index); /* copy of the key */
2239 lua_gettable(L,metatable_index);
2240 if( !lua_isnil(L,-1) ) {
2241 lua_pop(L,1);
2242 return -1;
2243 }
2244 lua_pop(L,1);
2245
2246 /* Iterating over immediate bases */
2247 for(i=0;clss->bases[i];i++)
2248 {
2249 const swig_lua_class *base = clss->bases[i];
2251 lua_pushvalue(L, key_index);
2252 lua_rawget(L, -2);
2253 if( !lua_isnil(L,-1) ) {
2254 lua_pushvalue(L, key_index);
2255
2256 /* Add proxy function */
2257 lua_pushvalue(L, key_index); /* first closure value is function name */
2258 lua_pushlightuserdata(L, clss); /* second closure value is swig_lua_class structure */
2259 lua_pushcclosure(L, SWIG_Lua_resolve_metamethod, 2);
2260
2261 lua_rawset(L, metatable_index);
2262 success = 1;
2263 }
2264 lua_pop(L,1); /* remove function or nil */
2265 lua_pop(L,1); /* remove base class metatable */
2266
2267 if( success )
2268 break;
2269 }
2270
2271 return success;
2272}
2273
2275{
2276 int metatable_index;
2277 int metamethods_info_index;
2278 int tostring_undefined;
2279 int eq_undefined = 0;
2280
2282 metatable_index = lua_gettop(L);
2284 assert(lua_istable(L,-1));
2285 metamethods_info_index = lua_gettop(L);
2286 lua_pushnil(L); /* first key */
2287 while(lua_next(L, metamethods_info_index) != 0 ) {
2288 /* key at index -2, value at index -1 */
2289 const int is_inheritable = lua_toboolean(L,-2);
2290 lua_pop(L,1); /* remove value - we don't need it anymore */
2291
2292 if(is_inheritable) { /* if metamethod is inheritable */
2293 SWIG_Lua_add_class_user_metamethod(L,clss,metatable_index);
2294 }
2295 }
2296
2297 lua_pop(L,1); /* remove inheritable metamethods table */
2298
2299 /* Special handling for __tostring method */
2300 lua_pushstring(L, "__tostring");
2301 lua_pushvalue(L,-1);
2302 lua_rawget(L,metatable_index);
2303 tostring_undefined = lua_isnil(L,-1);
2304 lua_pop(L,1);
2305 if( tostring_undefined ) {
2306 lua_pushcfunction(L, SWIG_Lua_class_tostring);
2307 lua_rawset(L, metatable_index);
2308 } else {
2309 lua_pop(L,1); /* remove copy of the key */
2310 }
2311
2312 /* Special handling for __eq method */
2313 lua_pushstring(L, "__eq");
2314 lua_pushvalue(L,-1);
2315 lua_rawget(L,metatable_index);
2316 eq_undefined = lua_isnil(L,-1);
2317 lua_pop(L,1);
2318 if( eq_undefined ) {
2319 lua_pushcfunction(L, SWIG_Lua_class_equal);
2320 lua_rawset(L, metatable_index);
2321 } else {
2322 lua_pop(L,1); /* remove copy of the key */
2323 }
2324 /* Warning: __index and __newindex are SWIG-defined. For user-defined operator[]
2325 * a __getitem/__setitem method should be defined
2326 */
2327 lua_pop(L,1); /* pop class metatable */
2328}
2329
2330/* Register class static methods,attributes etc as well as constructor proxy */
2332{
2333 const int SWIGUNUSED begin = lua_gettop(L);
2334 lua_checkstack(L,5); /* just in case */
2335 assert(lua_istable(L,-1)); /* just in case */
2336 assert(strcmp(clss->name, clss->cls_static->name) == 0); /* in class those 2 must be equal */
2337
2339
2340 assert(lua_istable(L,-1)); /* just in case */
2341
2342 /* add its constructor to module with the name of the class
2343 so you can do MyClass(...) as well as new_MyClass(...)
2344 BUT only if a constructor is defined
2345 (this overcomes the problem of pure virtual classes without constructors)*/
2346 if (clss->constructor)
2347 {
2348 lua_getmetatable(L,-1);
2349 assert(lua_istable(L,-1)); /* just in case */
2350 SWIG_Lua_add_function(L,"__call", clss->constructor);
2351 lua_pop(L,1);
2352 }
2353
2354 assert(lua_istable(L,-1)); /* just in case */
2356
2357 /* clear stack */
2358 lua_pop(L,1);
2359 assert( lua_gettop(L) == begin );
2360}
2361
2362/* Performs the instance (non-static) class registration process. Metatable for class is created
2363 * and added to the class registry.
2364 */
2366{
2367 const int SWIGUNUSED begin = lua_gettop(L);
2368 int i;
2369 /* if name already there (class is already registered) then do nothing */
2370 SWIG_Lua_get_class_registry(L); /* get the registry */
2371 lua_pushstring(L,clss->fqname); /* get the name */
2372 lua_rawget(L,-2);
2373 if(!lua_isnil(L,-1)) {
2374 lua_pop(L,2);
2375 assert(lua_gettop(L)==begin);
2376 return;
2377 }
2378 lua_pop(L,2); /* tidy stack */
2379 /* Recursively initialize all bases */
2380 for(i=0;clss->bases[i];i++)
2381 {
2383 }
2384 /* Again, get registry and push name */
2385 SWIG_Lua_get_class_registry(L); /* get the registry */
2386 lua_pushstring(L,clss->fqname); /* get the name */
2387 lua_newtable(L); /* create the metatable */
2388 /* add string of class name called ".type" */
2389 lua_pushstring(L,".type");
2390 lua_pushstring(L,clss->fqname);
2391 lua_rawset(L,-3);
2392 /* add a table called bases */
2393 lua_pushstring(L,".bases");
2394 lua_newtable(L);
2395 lua_rawset(L,-3);
2396 /* add a table called ".get" */
2397 lua_pushstring(L,".get");
2398 lua_newtable(L);
2399 lua_rawset(L,-3);
2400 /* add a table called ".set" */
2401 lua_pushstring(L,".set");
2402 lua_newtable(L);
2403 lua_rawset(L,-3);
2404 /* add a table called ".fn" */
2405 lua_pushstring(L,".fn");
2406 lua_newtable(L);
2407 /* add manual disown method */
2409 lua_rawset(L,-3);
2410 /* add accessor fns for using the .get,.set&.fn */
2414 /* add it */
2415 lua_rawset(L,-3); /* metatable into registry */
2416 lua_pop(L,1); /* tidy stack (remove registry) */
2417 assert(lua_gettop(L) == begin);
2418
2420 SWIG_Lua_add_class_instance_details(L,clss); /* recursive adding of details (atts & ops) */
2421 lua_pop(L,1); /* tidy stack (remove class metatable) */
2422 assert( lua_gettop(L) == begin );
2423}
2424
2426{
2427 int SWIGUNUSED begin;
2428 assert(lua_istable(L,-1)); /* This is a table (module or namespace) where classes will be added */
2431
2432 /* Add links from static part to instance part and vice versa */
2433 /* [SWIG registry] [Module]
2434 * "MyClass" ----> [MyClass metatable] <===== "MyClass" -+> [static part]
2435 * ".get" ----> ... | | getmetatable()----|
2436 * ".set" ----> ... | | |
2437 * ".static" --------------)----------------/ [static part metatable]
2438 * | ".get" --> ...
2439 * | ".set" --> ....
2440 * |=============================== ".instance"
2441 */
2442 begin = lua_gettop(L);
2443 lua_pushstring(L,clss->cls_static->name);
2444 lua_rawget(L,-2); /* get class static table */
2445 assert(lua_istable(L,-1));
2446 lua_getmetatable(L,-1);
2447 assert(lua_istable(L,-1)); /* get class static metatable */
2448 lua_pushstring(L,".instance"); /* prepare key */
2449
2450 SWIG_Lua_get_class_metatable(L,clss->fqname); /* get class metatable */
2451 assert(lua_istable(L,-1));
2452 lua_pushstring(L,".static"); /* prepare key */
2453 lua_pushvalue(L, -4); /* push static class TABLE */
2454 assert(lua_istable(L,-1));
2455 lua_rawset(L,-3); /* assign static class table(!NOT metatable) as ".static" member of class metatable */
2456 lua_rawset(L,-3); /* assign class metatable as ".instance" member of class static METATABLE */
2457 lua_pop(L,2);
2458 assert(lua_gettop(L) == begin);
2459}
2460#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */
2461
2462#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
2463SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_class *clss)
2464{
2465 const int SWIGUNUSED begin = lua_gettop(L);
2466 int i;
2467 /* if name already there (class is already registered) then do nothing */
2468 SWIG_Lua_get_class_registry(L); /* get the registry */
2469 lua_pushstring(L,clss->fqname); /* get the name */
2470 lua_rawget(L,-2);
2471 if(!lua_isnil(L,-1)) {
2472 lua_pop(L,2);
2473 assert(lua_gettop(L)==begin);
2474 return;
2475 }
2476 lua_pop(L,2); /* tidy stack */
2477 /* Recursively initialize all bases */
2478 for(i=0;clss->bases[i];i++)
2479 {
2480 SWIG_Lua_elua_class_register_instance(L,clss->bases[i]);
2481 }
2482 /* Again, get registry and push name */
2483 SWIG_Lua_get_class_registry(L); /* get the registry */
2484 lua_pushstring(L,clss->fqname); /* get the name */
2485 assert(clss->metatable);
2486 lua_pushrotable(L, (void*)(clss->metatable)); /* create the metatable */
2487 lua_rawset(L,-3);
2488 lua_pop(L,1);
2489 assert(lua_gettop(L) == begin);
2490}
2491#endif /* elua && eluac */
2492
2493/* -----------------------------------------------------------------------------
2494 * Class/structure conversion fns
2495 * ----------------------------------------------------------------------------- */
2496
2497/* helper to add metatable to new lua object */
2499{
2500 if (type->clientdata) /* there is clientdata: so add the metatable */
2501 {
2502 SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->fqname);
2503 if (lua_istable(L,-1))
2504 {
2505 lua_setmetatable(L,-2);
2506 }
2507 else
2508 {
2509 lua_pop(L,1);
2510 }
2511 }
2512}
2513
2514/* pushes a new object into the lua stack */
2515SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own)
2516{
2517 swig_lua_userdata *usr;
2518 if (!ptr){
2519 lua_pushnil(L);
2520 return;
2521 }
2522 usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata)); /* get data */
2523 usr->ptr=ptr; /* set the ptr */
2524 usr->type=type;
2525 usr->own=own;
2526#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
2527 SWIG_Lua_AddMetatable(L,type); /* add metatable */
2528#endif
2529}
2530
2531/* takes a object from the lua stack & converts it into an object of the correct type
2532 (if possible) */
2533SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L,int index,void **ptr,swig_type_info *type,int flags)
2534{
2535 int ret = SWIG_ERROR;
2536 swig_lua_userdata *usr;
2537 swig_cast_info *cast;
2538 /* special case: lua nil => NULL pointer */
2539 if (lua_isnil(L,index))
2540 {
2541 if (ptr)
2542 *ptr=0;
2544 }
2545 if (lua_islightuserdata(L,index))
2546 {
2547 if (ptr)
2548 *ptr=lua_touserdata(L,index);
2550 }
2551 usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */
2552 if (usr)
2553 {
2554 if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !usr->own)
2555 {
2557 }
2558 if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
2559 {
2560 usr->own = 0;
2561 }
2562 if (!type) /* special cast void*, no casting fn */
2563 {
2564 if (ptr)
2565 *ptr=usr->ptr;
2566 ret = SWIG_OK;
2567 }
2568 else
2569 {
2570 cast=SWIG_TypeCheck(usr->type->name,type); /* performs normal type checking */
2571 if (cast)
2572 {
2573 if (ptr) {
2574 int newmemory = 0;
2575 *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
2576 assert(!newmemory); /* newmemory handling not yet implemented */
2577 }
2578 ret = SWIG_OK;
2579 }
2580 }
2581 if ((ret == SWIG_OK) && (flags & SWIG_POINTER_CLEAR))
2582 {
2583 usr->ptr = 0;
2584 }
2585 }
2586 return ret;
2587}
2588
2589/* Similar to SWIG_Lua_ConvertPtr, but also returns ownership information
2590 (for smart pointer support with type casting) */
2591SWIGRUNTIME int SWIG_Lua_ConvertPtrAndOwn(lua_State *L, int index, void **ptr, swig_type_info *type, int flags, int *own)
2592{
2593 int ret = SWIG_ERROR;
2594 swig_lua_userdata *usr;
2595 swig_cast_info *cast;
2596 if (own)
2597 *own = 0;
2598 /* special case: lua nil => NULL pointer */
2599 if (lua_isnil(L,index))
2600 {
2601 if (ptr) *ptr=0;
2603 }
2604 if (lua_islightuserdata(L,index))
2605 {
2606 if (ptr) *ptr=lua_touserdata(L,index);
2608 }
2609 usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */
2610 if (usr)
2611 {
2612 if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE) && !usr->own)
2613 {
2615 }
2616 if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
2617 {
2618 usr->own = 0;
2619 }
2620 if (!type) /* special cast void*, no casting fn */
2621 {
2622 if (ptr) *ptr=usr->ptr;
2623 ret = SWIG_OK;
2624 }
2625 else
2626 {
2627 cast=SWIG_TypeCheck(usr->type->name,type); /* performs normal type checking */
2628 if (cast)
2629 {
2630 if (ptr) {
2631 int newmemory = 0;
2632 *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
2633 if (newmemory == SWIG_CAST_NEW_MEMORY) {
2634 assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2635 if (own)
2636 *own = *own | SWIG_CAST_NEW_MEMORY;
2637 }
2638 }
2639 ret = SWIG_OK;
2640 }
2641 }
2642 if ((ret == SWIG_OK) && (flags & SWIG_POINTER_CLEAR))
2643 {
2644 usr->ptr = 0;
2645 }
2646 }
2647 return ret;
2648}
2649
2650SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State *L,int index,swig_type_info *type,int flags,
2651 int argnum,const char *func_name){
2652 void *result = 0;
2653 if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
2654 luaL_error (L,"Error in %s, expected a %s at argument number %d\n",
2655 func_name,(type && type->str)?type->str:"void*",argnum);
2656 }
2657 return result;
2658}
2659
2660/* pushes a packed userdata. user for member fn pointers only */
2661SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type)
2662{
2663 swig_lua_rawdata *raw;
2664 assert(ptr); /* not acceptable to pass in a NULL value */
2665 raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size); /* alloc data */
2666 raw->type=type;
2667 raw->own=0;
2668 memcpy(raw->data,ptr,size); /* copy the data */
2669 SWIG_Lua_AddMetatable(L,type); /* add metatable */
2670}
2671
2672/* converts a packed userdata. user for member fn pointers only */
2673SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L,int index,void *ptr,size_t size,swig_type_info *type)
2674{
2675 swig_lua_rawdata *raw;
2676 raw=(swig_lua_rawdata*)lua_touserdata(L,index); /* get data */
2677 if (!raw) return SWIG_ERROR; /* error */
2678 if (type==0 || type==raw->type) /* void* or identical type */
2679 {
2680 memcpy(ptr,raw->data,size); /* copy it */
2681 return SWIG_OK; /* ok */
2682 }
2683 return SWIG_ERROR; /* error */
2684}
2685
2686/* a function to get the typestring of a piece of data */
2687SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
2688{
2689 swig_lua_userdata *usr;
2690 if (lua_isuserdata(L,tp))
2691 {
2692 usr=(swig_lua_userdata*)lua_touserdata(L,tp); /* get data */
2693 if (usr && usr->type && usr->type->str)
2694 return usr->type->str;
2695 return "userdata (unknown type)";
2696 }
2697 return lua_typename(L,lua_type(L,tp));
2698}
2699
2700/* lua callable function to get the userdata's type */
2702{
2703 lua_pushstring(L,SWIG_Lua_typename(L,1));
2704 return 1;
2705}
2706
2707/* -----------------------------------------------------------------------------
2708 * global variable support code: class/struct typemap functions
2709 * ----------------------------------------------------------------------------- */
2710
2711#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
2712/* Install Constants */
2713SWIGINTERN void
2715 int i;
2716 for (i = 0; constants[i].type; i++) {
2717 switch(constants[i].type) {
2718 case SWIG_LUA_INT:
2719 lua_pushstring(L,constants[i].name);
2720 lua_pushinteger(L,(lua_Integer)constants[i].lvalue);
2721 lua_rawset(L,-3);
2722 break;
2723 case SWIG_LUA_FLOAT:
2724 lua_pushstring(L,constants[i].name);
2725 lua_pushnumber(L,(lua_Number)constants[i].dvalue);
2726 lua_rawset(L,-3);
2727 break;
2728 case SWIG_LUA_CHAR:
2729 lua_pushstring(L,constants[i].name);
2730 {
2731 char c = (char)constants[i].lvalue;
2732 lua_pushlstring(L,&c,1);
2733 }
2734 lua_rawset(L,-3);
2735 break;
2736 case SWIG_LUA_STRING:
2737 lua_pushstring(L,constants[i].name);
2738 lua_pushstring(L,(char *) constants[i].pvalue);
2739 lua_rawset(L,-3);
2740 break;
2741 case SWIG_LUA_POINTER:
2742 lua_pushstring(L,constants[i].name);
2743 SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
2744 lua_rawset(L,-3);
2745 break;
2746 case SWIG_LUA_BINARY:
2747 lua_pushstring(L,constants[i].name);
2748 SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
2749 lua_rawset(L,-3);
2750 break;
2751 default:
2752 break;
2753 }
2754 }
2755}
2756#endif
2757
2758/* -----------------------------------------------------------------------------
2759 * executing lua code from within the wrapper
2760 * ----------------------------------------------------------------------------- */
2761
2762#ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
2763#define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
2764#endif
2765/* Executes a C string in Lua which is a really simple way of calling lua from C */
2766SWIGINTERN int
2767SWIG_Lua_dostring(lua_State *L, const char *str) {
2768 int ok,top;
2769 if (str==0 || str[0]==0) return 0; /* nothing to do */
2770 top=lua_gettop(L); /* save stack */
2771 ok=luaL_dostring(L,str);
2772 if (ok!=0) {
2773 SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
2774 }
2775 lua_settop(L,top); /* restore the stack */
2776 return ok;
2777}
2778
2779#ifdef __cplusplus
2780}
2781#endif
2782
2783/* ------------------------------ end luarun.swg ------------------------------ */
2784
2785
2786/* -------- TYPES TABLE (BEGIN) -------- */
2787
2788#define SWIGTYPE_p_PLGraphicsIn swig_types[0]
2789#define SWIGTYPE_p_char swig_types[1]
2790#define SWIGTYPE_p_double swig_types[2]
2791#define SWIGTYPE_p_f_double_double__int swig_types[3]
2792#define SWIGTYPE_p_f_double_double_p_double_p_double_p_void__void swig_types[4]
2793#define SWIGTYPE_p_f_int_double_p_char_int_p_void__void swig_types[5]
2794#define SWIGTYPE_p_f_int_p_double_p_double__void swig_types[6]
2795#define SWIGTYPE_p_f_int_p_q_const__double_p_q_const__double__void swig_types[7]
2796#define SWIGTYPE_p_int swig_types[8]
2797#define SWIGTYPE_p_p_char swig_types[9]
2798#define SWIGTYPE_p_p_double swig_types[10]
2799#define SWIGTYPE_p_unsigned_int swig_types[11]
2801static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
2802#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2803#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2804
2805/* -------- TYPES TABLE (END) -------- */
2806
2807#define SWIG_name "plplotluac"
2808#define SWIG_init luaopen_plplotluac
2809#define SWIG_init_user luaopen_plplotluac_user
2810
2811#define SWIG_LUACODE luaopen_plplotluac_luacode
2812
2813#include "plplotP.h"
2814
2815
2816#define LUA_ALLOC_ARRAY( TYPE, LEN ) (TYPE *) malloc( LEN * sizeof ( TYPE ) )
2817#define LUA_FREE_ARRAY( PTR ) if ( PTR ) { free( PTR ); PTR = NULL;}
2818
2819// super macro to declare array typemap helper fns
2820 SWIGINTERN int SWIG_itable_size( lua_State* L, int index );
2821#define LUA_DECLARE_TYPEMAP_ARR_FN( NAME, TYPE ) \
2822 SWIGINTERN int LUA_read_ ## NAME ## _num_array( lua_State * L, int index, TYPE * array, int size ){ \
2823 int i; \
2824 for ( i = 0; i < size; i++ ) { \
2825 lua_rawgeti( L, index, i + 1 ); \
2826 if ( lua_isnumber( L, -1 ) ) { \
2827 array[i] = (TYPE) lua_tonumber( L, -1 ); \
2828 } else { \
2829 lua_pop( L, 1 ); \
2830 return 0; \
2831 } \
2832 lua_pop( L, 1 ); \
2833 } \
2834 return 1; \
2835 } \
2836 SWIGINTERN TYPE* LUA_get_ ## NAME ## _num_array_var( lua_State * L, int index, int* size ) \
2837 { \
2838 TYPE *array; \
2839 if ( !lua_istable( L, index ) ) { \
2840 lua_pushstring( L, "expected a table" ); \
2841 return 0; \
2842 } \
2843 *size = SWIG_itable_size( L, index ); \
2844 if ( *size < 1 ) { \
2845 array = LUA_ALLOC_ARRAY( TYPE, 1 ); \
2846 array[0] = (TYPE) 0; \
2847 return array; \
2848 } \
2849 array = LUA_ALLOC_ARRAY( TYPE, *size ); \
2850 if ( !LUA_read_ ## NAME ## _num_array( L, index, array, *size ) ) { \
2851 lua_pushstring( L, "table must contain numbers" ); \
2852 LUA_FREE_ARRAY( array ); \
2853 return 0; \
2854 } \
2855 return array; \
2856 }
2857
2860
2861
2862 static PLINT Alen = 0;
2863 static PLINT Xlen = 0, Ylen = 0;
2864
2865
2866#ifdef __cplusplus /* generic alloc/dealloc fns*/
2867#define SWIG_ALLOC_ARRAY(TYPE,LEN) new TYPE[LEN]
2868#define SWIG_FREE_ARRAY(PTR) delete[] PTR
2869#else
2870#define SWIG_ALLOC_ARRAY(TYPE,LEN) (TYPE *)malloc(LEN*sizeof(TYPE))
2871#define SWIG_FREE_ARRAY(PTR) free(PTR)
2872#endif
2873/* counting the size of arrays:*/
2874SWIGINTERN int SWIG_itable_size(lua_State* L, int index)
2875{
2876 int n=0;
2877 while(1){
2878 lua_rawgeti(L,index,n+1);
2879 if (lua_isnil(L,-1))break;
2880 ++n;
2881 lua_pop(L,1);
2882 }
2883 lua_pop(L,1);
2884 return n;
2885}
2886
2887SWIGINTERN int SWIG_table_size(lua_State* L, int index)
2888{
2889 int n=0;
2890 lua_pushnil(L); /* first key*/
2891 while (lua_next(L, index) != 0) {
2892 ++n;
2893 lua_pop(L, 1); /* removes `value'; keeps `key' for next iteration*/
2894 }
2895 return n;
2896}
2897
2898/* super macro to declare array typemap helper fns */
2899#define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME,TYPE)\
2900 SWIGINTERN int SWIG_read_##NAME##_num_array(lua_State* L,int index,TYPE *array,int size){\
2901 int i;\
2902 for (i = 0; i < size; i++) {\
2903 lua_rawgeti(L,index,i+1);\
2904 if (lua_isnumber(L,-1)){\
2905 array[i] = (TYPE)lua_tonumber(L,-1);\
2906 } else {\
2907 lua_pop(L,1);\
2908 return 0;\
2909 }\
2910 lua_pop(L,1);\
2911 }\
2912 return 1;\
2913 }\
2914 SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_fixed(lua_State* L, int index, int size){\
2915 TYPE *array;\
2916 if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {\
2917 SWIG_Lua_pushferrstring(L,"expected a table of size %d",size);\
2918 return 0;\
2919 }\
2920 array=SWIG_ALLOC_ARRAY(TYPE,size);\
2921 if (!SWIG_read_##NAME##_num_array(L,index,array,size)){\
2922 SWIG_Lua_pusherrstring(L,"table must contain numbers");\
2923 SWIG_FREE_ARRAY(array);\
2924 return 0;\
2925 }\
2926 return array;\
2927 }\
2928 SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_var(lua_State* L, int index, int* size)\
2929 {\
2930 TYPE *array;\
2931 if (!lua_istable(L,index)) {\
2932 SWIG_Lua_pusherrstring(L,"expected a table");\
2933 return 0;\
2934 }\
2935 *size=SWIG_itable_size(L,index);\
2936 if (*size<1){\
2937 SWIG_Lua_pusherrstring(L,"table appears to be empty");\
2938 return 0;\
2939 }\
2940 array=SWIG_ALLOC_ARRAY(TYPE,*size);\
2941 if (!SWIG_read_##NAME##_num_array(L,index,array,*size)){\
2942 SWIG_Lua_pusherrstring(L,"table must contain numbers");\
2943 SWIG_FREE_ARRAY(array);\
2944 return 0;\
2945 }\
2946 return array;\
2947 }\
2948 SWIGINTERN void SWIG_write_##NAME##_num_array(lua_State* L,TYPE *array,int size){\
2949 int i;\
2950 lua_newtable(L);\
2951 for (i = 0; i < size; i++){\
2952 lua_pushnumber(L,(lua_Number)array[i]);\
2953 lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/ \
2954 }\
2955 }
2956
2957SWIG_DECLARE_TYPEMAP_ARR_FN(schar,signed char)
2958SWIG_DECLARE_TYPEMAP_ARR_FN(uchar,unsigned char)
2961SWIG_DECLARE_TYPEMAP_ARR_FN(short,short)
2962SWIG_DECLARE_TYPEMAP_ARR_FN(ushort,unsigned short)
2964SWIG_DECLARE_TYPEMAP_ARR_FN(ulong,unsigned long)
2965SWIG_DECLARE_TYPEMAP_ARR_FN(float,float)
2966SWIG_DECLARE_TYPEMAP_ARR_FN(double,double)
2967
2968SWIGINTERN int SWIG_read_ptr_array(lua_State* L,int index,void **array,int size,swig_type_info *type){
2969 int i;
2970 for (i = 0; i < size; i++) {
2971 lua_rawgeti(L,index,i+1);
2972 if (!lua_isuserdata(L,-1) || SWIG_ConvertPtr(L,-1,&array[i],type,0)==-1){
2973 lua_pop(L,1);
2974 return 0;
2975 }
2976 lua_pop(L,1);
2977 }
2978 return 1;
2979}
2980SWIGINTERN void** SWIG_get_ptr_array_fixed(lua_State* L, int index, int size,swig_type_info *type){
2981 void **array;
2982 if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {
2983 SWIG_Lua_pushferrstring(L,"expected a table of size %d",size);
2984 return 0;
2985 }
2986 array=SWIG_ALLOC_ARRAY(void*,size);
2987 if (!SWIG_read_ptr_array(L,index,array,size,type)){
2988 SWIG_Lua_pushferrstring(L,"table must contain pointers of type %s",type->name);
2989 SWIG_FREE_ARRAY(array);
2990 return 0;
2991 }
2992 return array;
2993}
2994SWIGINTERN void** SWIG_get_ptr_array_var(lua_State* L, int index, int* size,swig_type_info *type){
2995 void **array;
2996 if (!lua_istable(L,index)) {
2997 SWIG_Lua_pusherrstring(L,"expected a table");
2998 return 0;
2999 }
3000 *size=SWIG_itable_size(L,index);
3001 if (*size<1){
3002 SWIG_Lua_pusherrstring(L,"table appears to be empty");
3003 return 0;
3004 }
3005 array=SWIG_ALLOC_ARRAY(void*,*size);
3006 if (!SWIG_read_ptr_array(L,index,array,*size,type)){
3007 SWIG_Lua_pushferrstring(L,"table must contain pointers of type %s",type->name);
3008 SWIG_FREE_ARRAY(array);
3009 return 0;
3010 }
3011 return array;
3012}
3013SWIGINTERN void SWIG_write_ptr_array(lua_State* L,void **array,int size,swig_type_info *type,int own){
3014 int i;
3015 lua_newtable(L);
3016 for (i = 0; i < size; i++){
3017 SWIG_NewPointerObj(L,array[i],type,own);
3018 lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/
3019 }
3020}
3021
3022
3023 PLFLT** read_double_Matrix( lua_State* L, int index, int* nx, int *ny );
3024
3025 PLFLT** read_double_Matrix( lua_State* L, int index, int* nx, int *ny )
3026 {
3027 int i, j;
3028 PLFLT** matrix;
3029
3030 *nx = 0;
3031 *ny = 0;
3032
3033 if ( !lua_istable( L, index ) )
3034 {
3035 lua_pushstring( L, "expected a table" );
3036 return NULL;
3037 }
3038 *nx = SWIG_itable_size( L, index );
3039 if ( *nx < 1 )
3040 {
3041 lua_pushstring( L, "table appears to be empty" );
3042 return NULL;
3043 }
3044 matrix = LUA_ALLOC_ARRAY( PLFLT *, *nx );
3045 for ( i = 0; i < *nx; i++ )
3046 matrix[i] = NULL;
3047
3048 lua_rawgeti( L, index, 1 );
3049 if ( !lua_istable( L, -1 ) )
3050 {
3051 lua_pop( L, 1 );
3052 lua_pushstring( L, "expected a table" );
3053 LUA_FREE_ARRAY( matrix );
3054 return NULL;
3055 }
3056 *ny = SWIG_itable_size( L, -1 );
3057 if ( *ny < 1 )
3058 {
3059 lua_pushstring( L, "table appears to be empty" );
3060 LUA_FREE_ARRAY( matrix );
3061 return NULL;
3062 }
3063 lua_pop( L, 1 );
3064
3065 for ( i = 0; i < *nx; i++ )
3066 {
3067 lua_rawgeti( L, index, i + 1 );
3068 if ( !lua_istable( L, -1 ) )
3069 {
3070 lua_pop( L, 1 );
3071 lua_pushstring( L, "expected a table" );
3072 for ( j = 0; j < *ny; j++ )
3073 LUA_FREE_ARRAY( matrix[j] );
3074 LUA_FREE_ARRAY( matrix );
3075 return NULL;
3076 }
3077 if ( *ny != SWIG_itable_size( L, -1 ) )
3078 {
3079 lua_pop( L, 1 );
3080 lua_pushstring( L, "inconsistent table sizes" );
3081 for ( j = 0; j < i; j++ )
3082 LUA_FREE_ARRAY( matrix[j] );
3083 LUA_FREE_ARRAY( matrix );
3084 return NULL;
3085 }
3086 matrix[i] = LUA_ALLOC_ARRAY( PLFLT, *ny );
3087 for ( j = 0; j < *ny; j++ )
3088 {
3089 lua_rawgeti( L, -1, j + 1 );
3090 if ( lua_isnumber( L, -1 ) )
3091 {
3092 matrix[i][j] = (PLFLT) lua_tonumber( L, -1 );
3093 }
3094 else
3095 {
3096 lua_pop( L, 1 );
3097 lua_pushstring( L, "table must contain numbers" );
3098 for ( j = 0; j < i + 1; j++ )
3099 LUA_FREE_ARRAY( matrix[j] );
3100 LUA_FREE_ARRAY( matrix );
3101 return NULL;
3102 }
3103 lua_pop( L, 1 );
3104 }
3105 lua_pop( L, 1 );
3106 }
3107
3108 return matrix;
3109 }
3110
3111
3112 void mapform( PLINT n, PLFLT* x, PLFLT* y );
3113
3114 static lua_State* myL = NULL;
3115 static char mapform_funcstr[255];
3116
3117 void mapform( PLINT n, PLFLT* x, PLFLT* y )
3118 {
3119 PLFLT *xtemp, *ytemp;
3120 int len, i;
3121
3122 // check Lua state
3123 if ( myL == NULL )
3124 {
3125 fprintf( stderr, "Lua state is not set!" );
3126 return;
3127 }
3128
3129 // push functions and arguments
3130 lua_getglobal( myL, mapform_funcstr ); // function to be called
3131 lua_pushnumber( myL, n ); // push 1st argument
3132 SWIG_write_double_num_array( myL, x, n ); // push 2nd argument
3133 SWIG_write_double_num_array( myL, y, n ); // push 3rd argument
3134
3135 // do the call (3 arguments, 2 result)
3136 if ( lua_pcall( myL, 3, 2, 0 ) != 0 )
3137 fprintf( stderr, "error running function `%s':%s",
3138 mapform_funcstr, lua_tostring( myL, -1 ) );
3139
3140 // retrieve results
3141 if ( !lua_istable( myL, -2 ) )
3142 {
3143 fprintf( stderr, "function `%s' must return a table as 1st result", mapform_funcstr );
3144 return;
3145 }
3146 if ( !lua_istable( myL, -1 ) )
3147 {
3148 fprintf( stderr, "function `%s' must return a table as 2nd result", mapform_funcstr );
3149 return;
3150 }
3151 xtemp = (PLFLT *) LUA_get_double_num_array_var( myL, -2, &len );
3152 if ( !xtemp || len != n )
3153 {
3154 fprintf( stderr, "function `%s' must return a table of length%d", mapform_funcstr, n );
3155 return;
3156 }
3157 for ( i = 0; i < n; i++ )
3158 x[i] = xtemp[i];
3159 LUA_FREE_ARRAY( xtemp );
3160
3161 ytemp = (PLFLT *) LUA_get_double_num_array_var( myL, -1, &len );
3162 if ( !ytemp || len != n )
3163 {
3164 fprintf( stderr, "function `%s' must return a table of length%d", mapform_funcstr, n );
3165 return;
3166 }
3167 for ( i = 0; i < n; i++ )
3168 y[i] = ytemp[i];
3169 LUA_FREE_ARRAY( ytemp );
3170
3171 lua_pop( myL, 2 ); // pop returned values
3172
3173 return;
3174 }
3175
3176
3177 typedef PLINT ( *defined_func )( PLFLT, PLFLT );
3178 typedef void ( *fill_func )( PLINT, const PLFLT*, const PLFLT* );
3179 typedef void ( *pltr_func )( PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer );
3180 typedef void ( *ct_func )( PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer );
3181 typedef void ( *mapform_func )( PLINT, PLFLT *, PLFLT* );
3183 typedef void ( *label_func )( PLINT, PLFLT, char*, PLINT, PLPointer );
3184
3185// Function prototypes
3186 void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * pltr_data );
3187 void myct( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * pltr_data );
3188 void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer data );
3189
3190 static char mypltr_funcstr[255];
3191
3192// This is the callback that gets handed to the C code.
3193// It, in turn, calls the Lua callback
3194 void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * PL_UNUSED( pltr_data ) )
3195 {
3196 *tx = 0;
3197 *ty = 0;
3198
3199 // check Lua state
3200 if ( myL == NULL )
3201 {
3202 fprintf( stderr, "Lua state is not set!" );
3203 return;
3204 }
3205
3206 // push functions and arguments
3207 lua_getglobal( myL, mypltr_funcstr ); // function to be called
3208 lua_pushnumber( myL, x ); // push 1st argument
3209 lua_pushnumber( myL, y ); // push 2nd argument
3210
3211 // do the call (2 arguments, 2 result)
3212 if ( lua_pcall( myL, 2, 2, 0 ) != 0 )
3213 fprintf( stderr, "error running function `%s':%s",
3214 mypltr_funcstr, lua_tostring( myL, -1 ) );
3215
3216 // retrieve results
3217 if ( !lua_isnumber( myL, -2 ) )
3218 {
3219 fprintf( stderr, "function `%s' must return a number as 1st result", mypltr_funcstr );
3220 return;
3221 }
3222 if ( !lua_isnumber( myL, -1 ) )
3223 {
3224 fprintf( stderr, "function `%s' must return a number as 2nd result", mypltr_funcstr );
3225 return;
3226 }
3227 *tx = lua_tonumber( myL, -2 );
3228 *ty = lua_tonumber( myL, -1 );
3229 lua_pop( myL, 2 ); // pop returned values
3230
3231 return;
3232 }
3233
3234 static char myct_funcstr[255];
3235
3236// This is the callback that gets handed to the C code.
3237// It, in turn, calls the Lua callback
3238 void myct( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * PL_UNUSED( pltr_data ) )
3239 {
3240 *tx = 0;
3241 *ty = 0;
3242
3243 // check Lua state
3244 if ( myL == NULL )
3245 {
3246 fprintf( stderr, "Lua state is not set!" );
3247 return;
3248 }
3249
3250 // push functions and arguments
3251 lua_getglobal( myL, myct_funcstr ); // function to be called
3252 lua_pushnumber( myL, x ); // push 1st argument
3253 lua_pushnumber( myL, y ); // push 2nd argument
3254
3255 // do the call (2 arguments, 2 result)
3256 if ( lua_pcall( myL, 2, 2, 0 ) != 0 )
3257 fprintf( stderr, "error running function `%s':%s",
3258 myct_funcstr, lua_tostring( myL, -1 ) );
3259
3260 // retrieve results
3261 if ( !lua_isnumber( myL, -2 ) )
3262 {
3263 fprintf( stderr, "function `%s' must return a number as 1st result", myct_funcstr );
3264 return;
3265 }
3266 if ( !lua_isnumber( myL, -1 ) )
3267 {
3268 fprintf( stderr, "function `%s' must return a number as 2nd result", myct_funcstr );
3269 return;
3270 }
3271 *tx = lua_tonumber( myL, -2 );
3272 *ty = lua_tonumber( myL, -1 );
3273 lua_pop( myL, 2 ); // pop returned values
3274
3275 return;
3276 }
3277
3278 static char mylabel_funcstr[255];
3279
3280 void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer PL_UNUSED( data ) )
3281 {
3282 // check Lua state
3283 if ( myL == NULL )
3284 {
3285 fprintf( stderr, "Lua state is not set!" );
3286 return;
3287 }
3288
3289 // push functions and arguments
3290 lua_getglobal( myL, mylabel_funcstr ); // function to be called
3291 lua_pushnumber( myL, axis ); // push 1st argument
3292 lua_pushnumber( myL, value ); // push 1st argument
3293
3294 // do the call (2 arguments, 1 result)
3295 if ( lua_pcall( myL, 2, 1, 0 ) != 0 )
3296 fprintf( stderr, "error running function `%s':%s",
3297 mylabel_funcstr, lua_tostring( myL, -1 ) );
3298
3299 // retrieve results
3300 if ( !lua_isstring( myL, -1 ) )
3301 {
3302 fprintf( stderr, "function `%s' must return a string as result", mylabel_funcstr );
3303 return;
3304 }
3305 strncpy( label, lua_tostring( myL, -1 ), length );
3306
3307 lua_pop( myL, 1 ); // pop returned values
3308
3309 return;
3310 }
3311
3312
3313#include <string.h>
3314
3315
3316SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
3317 int ret = lua_isstring(L, idx);
3318 if (!ret)
3319 ret = lua_isnil(L, idx);
3320 return ret;
3321}
3322
3323#ifdef __cplusplus
3324extern "C" {
3325#endif
3326static int _wrap_PLGraphicsIn_type_set(lua_State* L) {
3327 int SWIG_arg = 0;
3328 PLGraphicsIn *arg1 = 0 ;
3329 int arg2 ;
3330
3331 SWIG_check_num_args("PLGraphicsIn::type",2,2)
3332 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::type",1,"PLGraphicsIn *");
3333 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::type",2,"int");
3334
3335 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3336 SWIG_fail_ptr("PLGraphicsIn_type_set",1,SWIGTYPE_p_PLGraphicsIn);
3337 }
3338
3339 arg2 = (int)lua_tonumber(L, 2);
3340 if (arg1) (arg1)->type = arg2;
3341
3342 return SWIG_arg;
3343
3344 fail: SWIGUNUSED;
3345 lua_error(L);
3346 return 0;
3347}
3348
3349
3350static int _wrap_PLGraphicsIn_type_get(lua_State* L) {
3351 int SWIG_arg = 0;
3352 PLGraphicsIn *arg1 = 0 ;
3353 int result;
3354
3355 SWIG_check_num_args("PLGraphicsIn::type",1,1)
3356 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::type",1,"PLGraphicsIn *");
3357
3358 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3359 SWIG_fail_ptr("PLGraphicsIn_type_get",1,SWIGTYPE_p_PLGraphicsIn);
3360 }
3361
3362 result = (int) ((arg1)->type);
3363 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3364 return SWIG_arg;
3365
3366 fail: SWIGUNUSED;
3367 lua_error(L);
3368 return 0;
3369}
3370
3371
3372static int _wrap_PLGraphicsIn_state_set(lua_State* L) {
3373 int SWIG_arg = 0;
3374 PLGraphicsIn *arg1 = 0 ;
3375 unsigned int arg2 ;
3376
3377 SWIG_check_num_args("PLGraphicsIn::state",2,2)
3378 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::state",1,"PLGraphicsIn *");
3379 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::state",2,"unsigned int");
3380
3381 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3382 SWIG_fail_ptr("PLGraphicsIn_state_set",1,SWIGTYPE_p_PLGraphicsIn);
3383 }
3384
3385 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
3386 arg2 = (unsigned int)lua_tonumber(L, 2);
3387 if (arg1) (arg1)->state = arg2;
3388
3389 return SWIG_arg;
3390
3391 fail: SWIGUNUSED;
3392 lua_error(L);
3393 return 0;
3394}
3395
3396
3397static int _wrap_PLGraphicsIn_state_get(lua_State* L) {
3398 int SWIG_arg = 0;
3399 PLGraphicsIn *arg1 = 0 ;
3400 unsigned int result;
3401
3402 SWIG_check_num_args("PLGraphicsIn::state",1,1)
3403 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::state",1,"PLGraphicsIn *");
3404
3405 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3406 SWIG_fail_ptr("PLGraphicsIn_state_get",1,SWIGTYPE_p_PLGraphicsIn);
3407 }
3408
3409 result = (unsigned int) ((arg1)->state);
3410 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3411 return SWIG_arg;
3412
3413 fail: SWIGUNUSED;
3414 lua_error(L);
3415 return 0;
3416}
3417
3418
3419static int _wrap_PLGraphicsIn_keysym_set(lua_State* L) {
3420 int SWIG_arg = 0;
3421 PLGraphicsIn *arg1 = 0 ;
3422 unsigned int arg2 ;
3423
3424 SWIG_check_num_args("PLGraphicsIn::keysym",2,2)
3425 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::keysym",1,"PLGraphicsIn *");
3426 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::keysym",2,"unsigned int");
3427
3428 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3429 SWIG_fail_ptr("PLGraphicsIn_keysym_set",1,SWIGTYPE_p_PLGraphicsIn);
3430 }
3431
3432 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
3433 arg2 = (unsigned int)lua_tonumber(L, 2);
3434 if (arg1) (arg1)->keysym = arg2;
3435
3436 return SWIG_arg;
3437
3438 fail: SWIGUNUSED;
3439 lua_error(L);
3440 return 0;
3441}
3442
3443
3444static int _wrap_PLGraphicsIn_keysym_get(lua_State* L) {
3445 int SWIG_arg = 0;
3446 PLGraphicsIn *arg1 = 0 ;
3447 unsigned int result;
3448
3449 SWIG_check_num_args("PLGraphicsIn::keysym",1,1)
3450 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::keysym",1,"PLGraphicsIn *");
3451
3452 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3453 SWIG_fail_ptr("PLGraphicsIn_keysym_get",1,SWIGTYPE_p_PLGraphicsIn);
3454 }
3455
3456 result = (unsigned int) ((arg1)->keysym);
3457 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3458 return SWIG_arg;
3459
3460 fail: SWIGUNUSED;
3461 lua_error(L);
3462 return 0;
3463}
3464
3465
3466static int _wrap_PLGraphicsIn_button_set(lua_State* L) {
3467 int SWIG_arg = 0;
3468 PLGraphicsIn *arg1 = 0 ;
3469 unsigned int arg2 ;
3470
3471 SWIG_check_num_args("PLGraphicsIn::button",2,2)
3472 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::button",1,"PLGraphicsIn *");
3473 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::button",2,"unsigned int");
3474
3475 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3476 SWIG_fail_ptr("PLGraphicsIn_button_set",1,SWIGTYPE_p_PLGraphicsIn);
3477 }
3478
3479 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative");
3480 arg2 = (unsigned int)lua_tonumber(L, 2);
3481 if (arg1) (arg1)->button = arg2;
3482
3483 return SWIG_arg;
3484
3485 fail: SWIGUNUSED;
3486 lua_error(L);
3487 return 0;
3488}
3489
3490
3491static int _wrap_PLGraphicsIn_button_get(lua_State* L) {
3492 int SWIG_arg = 0;
3493 PLGraphicsIn *arg1 = 0 ;
3494 unsigned int result;
3495
3496 SWIG_check_num_args("PLGraphicsIn::button",1,1)
3497 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::button",1,"PLGraphicsIn *");
3498
3499 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3500 SWIG_fail_ptr("PLGraphicsIn_button_get",1,SWIGTYPE_p_PLGraphicsIn);
3501 }
3502
3503 result = (unsigned int) ((arg1)->button);
3504 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3505 return SWIG_arg;
3506
3507 fail: SWIGUNUSED;
3508 lua_error(L);
3509 return 0;
3510}
3511
3512
3513static int _wrap_PLGraphicsIn_subwindow_set(lua_State* L) {
3514 int SWIG_arg = 0;
3515 PLGraphicsIn *arg1 = 0 ;
3516 PLINT arg2 ;
3517
3518 SWIG_check_num_args("PLGraphicsIn::subwindow",2,2)
3519 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::subwindow",1,"PLGraphicsIn *");
3520 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::subwindow",2,"PLINT");
3521
3522 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3523 SWIG_fail_ptr("PLGraphicsIn_subwindow_set",1,SWIGTYPE_p_PLGraphicsIn);
3524 }
3525
3526 arg2 = (PLINT)lua_tonumber(L, 2);
3527 if (arg1) (arg1)->subwindow = arg2;
3528
3529 return SWIG_arg;
3530
3531 fail: SWIGUNUSED;
3532 lua_error(L);
3533 return 0;
3534}
3535
3536
3537static int _wrap_PLGraphicsIn_subwindow_get(lua_State* L) {
3538 int SWIG_arg = 0;
3539 PLGraphicsIn *arg1 = 0 ;
3540 PLINT result;
3541
3542 SWIG_check_num_args("PLGraphicsIn::subwindow",1,1)
3543 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::subwindow",1,"PLGraphicsIn *");
3544
3545 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3546 SWIG_fail_ptr("PLGraphicsIn_subwindow_get",1,SWIGTYPE_p_PLGraphicsIn);
3547 }
3548
3549 result = (PLINT) ((arg1)->subwindow);
3550 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3551 return SWIG_arg;
3552
3553 fail: SWIGUNUSED;
3554 lua_error(L);
3555 return 0;
3556}
3557
3558
3559static int _wrap_PLGraphicsIn_string_set(lua_State* L) {
3560 int SWIG_arg = 0;
3561 PLGraphicsIn *arg1 = 0 ;
3562 char *arg2 = (char *)0 ;
3563
3564 SWIG_check_num_args("PLGraphicsIn::string",2,2)
3565 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::string",1,"PLGraphicsIn *");
3566 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("PLGraphicsIn::string",2,"char [16]");
3567
3568 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3569 SWIG_fail_ptr("PLGraphicsIn_string_set",1,SWIGTYPE_p_PLGraphicsIn);
3570 }
3571
3572 arg2 = (char *)lua_tostring(L, 2);
3573 {
3574 if(arg2) {
3575 strncpy((char*)arg1->string, (const char *)arg2, 16-1);
3576 arg1->string[16-1] = 0;
3577 } else {
3578 arg1->string[0] = 0;
3579 }
3580 }
3581
3582 return SWIG_arg;
3583
3584 fail: SWIGUNUSED;
3585 lua_error(L);
3586 return 0;
3587}
3588
3589
3590static int _wrap_PLGraphicsIn_string_get(lua_State* L) {
3591 int SWIG_arg = 0;
3592 PLGraphicsIn *arg1 = 0 ;
3593 char *result = 0 ;
3594
3595 SWIG_check_num_args("PLGraphicsIn::string",1,1)
3596 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::string",1,"PLGraphicsIn *");
3597
3598 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3599 SWIG_fail_ptr("PLGraphicsIn_string_get",1,SWIGTYPE_p_PLGraphicsIn);
3600 }
3601
3602 result = (char *)(char *) ((arg1)->string);
3603 lua_pushstring(L,(const char *)result); SWIG_arg++;
3604 return SWIG_arg;
3605
3606 fail: SWIGUNUSED;
3607 lua_error(L);
3608 return 0;
3609}
3610
3611
3612static int _wrap_PLGraphicsIn_pX_set(lua_State* L) {
3613 int SWIG_arg = 0;
3614 PLGraphicsIn *arg1 = 0 ;
3615 int arg2 ;
3616
3617 SWIG_check_num_args("PLGraphicsIn::pX",2,2)
3618 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pX",1,"PLGraphicsIn *");
3619 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::pX",2,"int");
3620
3621 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3622 SWIG_fail_ptr("PLGraphicsIn_pX_set",1,SWIGTYPE_p_PLGraphicsIn);
3623 }
3624
3625 arg2 = (int)lua_tonumber(L, 2);
3626 if (arg1) (arg1)->pX = arg2;
3627
3628 return SWIG_arg;
3629
3630 fail: SWIGUNUSED;
3631 lua_error(L);
3632 return 0;
3633}
3634
3635
3636static int _wrap_PLGraphicsIn_pX_get(lua_State* L) {
3637 int SWIG_arg = 0;
3638 PLGraphicsIn *arg1 = 0 ;
3639 int result;
3640
3641 SWIG_check_num_args("PLGraphicsIn::pX",1,1)
3642 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pX",1,"PLGraphicsIn *");
3643
3644 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3645 SWIG_fail_ptr("PLGraphicsIn_pX_get",1,SWIGTYPE_p_PLGraphicsIn);
3646 }
3647
3648 result = (int) ((arg1)->pX);
3649 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3650 return SWIG_arg;
3651
3652 fail: SWIGUNUSED;
3653 lua_error(L);
3654 return 0;
3655}
3656
3657
3658static int _wrap_PLGraphicsIn_pY_set(lua_State* L) {
3659 int SWIG_arg = 0;
3660 PLGraphicsIn *arg1 = 0 ;
3661 int arg2 ;
3662
3663 SWIG_check_num_args("PLGraphicsIn::pY",2,2)
3664 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pY",1,"PLGraphicsIn *");
3665 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::pY",2,"int");
3666
3667 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3668 SWIG_fail_ptr("PLGraphicsIn_pY_set",1,SWIGTYPE_p_PLGraphicsIn);
3669 }
3670
3671 arg2 = (int)lua_tonumber(L, 2);
3672 if (arg1) (arg1)->pY = arg2;
3673
3674 return SWIG_arg;
3675
3676 fail: SWIGUNUSED;
3677 lua_error(L);
3678 return 0;
3679}
3680
3681
3682static int _wrap_PLGraphicsIn_pY_get(lua_State* L) {
3683 int SWIG_arg = 0;
3684 PLGraphicsIn *arg1 = 0 ;
3685 int result;
3686
3687 SWIG_check_num_args("PLGraphicsIn::pY",1,1)
3688 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pY",1,"PLGraphicsIn *");
3689
3690 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3691 SWIG_fail_ptr("PLGraphicsIn_pY_get",1,SWIGTYPE_p_PLGraphicsIn);
3692 }
3693
3694 result = (int) ((arg1)->pY);
3695 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3696 return SWIG_arg;
3697
3698 fail: SWIGUNUSED;
3699 lua_error(L);
3700 return 0;
3701}
3702
3703
3704static int _wrap_PLGraphicsIn_dX_set(lua_State* L) {
3705 int SWIG_arg = 0;
3706 PLGraphicsIn *arg1 = 0 ;
3707 PLFLT arg2 ;
3708
3709 SWIG_check_num_args("PLGraphicsIn::dX",2,2)
3710 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dX",1,"PLGraphicsIn *");
3711 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::dX",2,"PLFLT");
3712
3713 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3714 SWIG_fail_ptr("PLGraphicsIn_dX_set",1,SWIGTYPE_p_PLGraphicsIn);
3715 }
3716
3717 arg2 = (PLFLT)lua_tonumber(L, 2);
3718 if (arg1) (arg1)->dX = arg2;
3719
3720 return SWIG_arg;
3721
3722 fail: SWIGUNUSED;
3723 lua_error(L);
3724 return 0;
3725}
3726
3727
3728static int _wrap_PLGraphicsIn_dX_get(lua_State* L) {
3729 int SWIG_arg = 0;
3730 PLGraphicsIn *arg1 = 0 ;
3731 PLFLT result;
3732
3733 SWIG_check_num_args("PLGraphicsIn::dX",1,1)
3734 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dX",1,"PLGraphicsIn *");
3735
3736 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3737 SWIG_fail_ptr("PLGraphicsIn_dX_get",1,SWIGTYPE_p_PLGraphicsIn);
3738 }
3739
3740 result = (PLFLT) ((arg1)->dX);
3741 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3742 return SWIG_arg;
3743
3744 fail: SWIGUNUSED;
3745 lua_error(L);
3746 return 0;
3747}
3748
3749
3750static int _wrap_PLGraphicsIn_dY_set(lua_State* L) {
3751 int SWIG_arg = 0;
3752 PLGraphicsIn *arg1 = 0 ;
3753 PLFLT arg2 ;
3754
3755 SWIG_check_num_args("PLGraphicsIn::dY",2,2)
3756 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dY",1,"PLGraphicsIn *");
3757 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::dY",2,"PLFLT");
3758
3759 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3760 SWIG_fail_ptr("PLGraphicsIn_dY_set",1,SWIGTYPE_p_PLGraphicsIn);
3761 }
3762
3763 arg2 = (PLFLT)lua_tonumber(L, 2);
3764 if (arg1) (arg1)->dY = arg2;
3765
3766 return SWIG_arg;
3767
3768 fail: SWIGUNUSED;
3769 lua_error(L);
3770 return 0;
3771}
3772
3773
3774static int _wrap_PLGraphicsIn_dY_get(lua_State* L) {
3775 int SWIG_arg = 0;
3776 PLGraphicsIn *arg1 = 0 ;
3777 PLFLT result;
3778
3779 SWIG_check_num_args("PLGraphicsIn::dY",1,1)
3780 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dY",1,"PLGraphicsIn *");
3781
3782 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3783 SWIG_fail_ptr("PLGraphicsIn_dY_get",1,SWIGTYPE_p_PLGraphicsIn);
3784 }
3785
3786 result = (PLFLT) ((arg1)->dY);
3787 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3788 return SWIG_arg;
3789
3790 fail: SWIGUNUSED;
3791 lua_error(L);
3792 return 0;
3793}
3794
3795
3796static int _wrap_PLGraphicsIn_wX_set(lua_State* L) {
3797 int SWIG_arg = 0;
3798 PLGraphicsIn *arg1 = 0 ;
3799 PLFLT arg2 ;
3800
3801 SWIG_check_num_args("PLGraphicsIn::wX",2,2)
3802 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wX",1,"PLGraphicsIn *");
3803 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::wX",2,"PLFLT");
3804
3805 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3806 SWIG_fail_ptr("PLGraphicsIn_wX_set",1,SWIGTYPE_p_PLGraphicsIn);
3807 }
3808
3809 arg2 = (PLFLT)lua_tonumber(L, 2);
3810 if (arg1) (arg1)->wX = arg2;
3811
3812 return SWIG_arg;
3813
3814 fail: SWIGUNUSED;
3815 lua_error(L);
3816 return 0;
3817}
3818
3819
3820static int _wrap_PLGraphicsIn_wX_get(lua_State* L) {
3821 int SWIG_arg = 0;
3822 PLGraphicsIn *arg1 = 0 ;
3823 PLFLT result;
3824
3825 SWIG_check_num_args("PLGraphicsIn::wX",1,1)
3826 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wX",1,"PLGraphicsIn *");
3827
3828 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3829 SWIG_fail_ptr("PLGraphicsIn_wX_get",1,SWIGTYPE_p_PLGraphicsIn);
3830 }
3831
3832 result = (PLFLT) ((arg1)->wX);
3833 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3834 return SWIG_arg;
3835
3836 fail: SWIGUNUSED;
3837 lua_error(L);
3838 return 0;
3839}
3840
3841
3842static int _wrap_PLGraphicsIn_wY_set(lua_State* L) {
3843 int SWIG_arg = 0;
3844 PLGraphicsIn *arg1 = 0 ;
3845 PLFLT arg2 ;
3846
3847 SWIG_check_num_args("PLGraphicsIn::wY",2,2)
3848 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wY",1,"PLGraphicsIn *");
3849 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::wY",2,"PLFLT");
3850
3851 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3852 SWIG_fail_ptr("PLGraphicsIn_wY_set",1,SWIGTYPE_p_PLGraphicsIn);
3853 }
3854
3855 arg2 = (PLFLT)lua_tonumber(L, 2);
3856 if (arg1) (arg1)->wY = arg2;
3857
3858 return SWIG_arg;
3859
3860 fail: SWIGUNUSED;
3861 lua_error(L);
3862 return 0;
3863}
3864
3865
3866static int _wrap_PLGraphicsIn_wY_get(lua_State* L) {
3867 int SWIG_arg = 0;
3868 PLGraphicsIn *arg1 = 0 ;
3869 PLFLT result;
3870
3871 SWIG_check_num_args("PLGraphicsIn::wY",1,1)
3872 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wY",1,"PLGraphicsIn *");
3873
3874 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3875 SWIG_fail_ptr("PLGraphicsIn_wY_get",1,SWIGTYPE_p_PLGraphicsIn);
3876 }
3877
3878 result = (PLFLT) ((arg1)->wY);
3879 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3880 return SWIG_arg;
3881
3882 fail: SWIGUNUSED;
3883 lua_error(L);
3884 return 0;
3885}
3886
3887
3888static int _wrap_new_PLGraphicsIn(lua_State* L) {
3889 int SWIG_arg = 0;
3890 PLGraphicsIn *result = 0 ;
3891
3892 SWIG_check_num_args("PLGraphicsIn::PLGraphicsIn",0,0)
3893 result = (PLGraphicsIn *)calloc(1, sizeof(PLGraphicsIn));
3894 SWIG_NewPointerObj(L,result,SWIGTYPE_p_PLGraphicsIn,1); SWIG_arg++;
3895 return SWIG_arg;
3896
3897 fail: SWIGUNUSED;
3898 lua_error(L);
3899 return 0;
3900}
3901
3902
3903static void swig_delete_PLGraphicsIn(void *obj) {
3904PLGraphicsIn *arg1 = (PLGraphicsIn *) obj;
3905free((char *) arg1);
3906}
3907static int _proxy__wrap_new_PLGraphicsIn(lua_State *L) {
3908 assert(lua_istable(L,1));
3909 lua_pushcfunction(L,_wrap_new_PLGraphicsIn);
3910 assert(!lua_isnil(L,-1));
3911 lua_replace(L,1); /* replace our table with real constructor */
3912 lua_call(L,lua_gettop(L)-1,1);
3913 return 1;
3914}
3931 {0,0}
3932};
3934 {0,0}
3935};
3936
3949
3959static const char *swig_PLGraphicsIn_base_names[] = {0};
3961
3962static int _wrap_setcontlabelformat(lua_State* L) {
3963 int SWIG_arg = 0;
3964 PLINT arg1 ;
3965 PLINT arg2 ;
3966
3967 SWIG_check_num_args("pl_setcontlabelformat",2,2)
3968 if(!lua_isnumber(L,1)) SWIG_fail_arg("pl_setcontlabelformat",1,"PLINT");
3969 if(!lua_isnumber(L,2)) SWIG_fail_arg("pl_setcontlabelformat",2,"PLINT");
3970 arg1 = (PLINT)lua_tonumber(L, 1);
3971 arg2 = (PLINT)lua_tonumber(L, 2);
3972 pl_setcontlabelformat(arg1,arg2);
3973
3974 return SWIG_arg;
3975
3976 fail: SWIGUNUSED;
3977 lua_error(L);
3978 return 0;
3979}
3980
3981
3982static int _wrap_setcontlabelparam(lua_State* L) {
3983 int SWIG_arg = 0;
3984 PLFLT arg1 ;
3985 PLFLT arg2 ;
3986 PLFLT arg3 ;
3987 PLINT arg4 ;
3988
3989 SWIG_check_num_args("pl_setcontlabelparam",4,4)
3990 if(!lua_isnumber(L,1)) SWIG_fail_arg("pl_setcontlabelparam",1,"PLFLT");
3991 if(!lua_isnumber(L,2)) SWIG_fail_arg("pl_setcontlabelparam",2,"PLFLT");
3992 if(!lua_isnumber(L,3)) SWIG_fail_arg("pl_setcontlabelparam",3,"PLFLT");
3993 if(!lua_isnumber(L,4)) SWIG_fail_arg("pl_setcontlabelparam",4,"PLINT");
3994 arg1 = (PLFLT)lua_tonumber(L, 1);
3995 arg2 = (PLFLT)lua_tonumber(L, 2);
3996 arg3 = (PLFLT)lua_tonumber(L, 3);
3997 arg4 = (PLINT)lua_tonumber(L, 4);
3998 pl_setcontlabelparam(arg1,arg2,arg3,arg4);
3999
4000 return SWIG_arg;
4001
4002 fail: SWIGUNUSED;
4003 lua_error(L);
4004 return 0;
4005}
4006
4007
4008static int _wrap_adv(lua_State* L) {
4009 int SWIG_arg = 0;
4010 PLINT arg1 ;
4011
4012 SWIG_check_num_args("pladv",1,1)
4013 if(!lua_isnumber(L,1)) SWIG_fail_arg("pladv",1,"PLINT");
4014 arg1 = (PLINT)lua_tonumber(L, 1);
4015 pladv(arg1);
4016
4017 return SWIG_arg;
4018
4019 fail: SWIGUNUSED;
4020 lua_error(L);
4021 return 0;
4022}
4023
4024
4025static int _wrap_arc(lua_State* L) {
4026 int SWIG_arg = 0;
4027 PLFLT arg1 ;
4028 PLFLT arg2 ;
4029 PLFLT arg3 ;
4030 PLFLT arg4 ;
4031 PLFLT arg5 ;
4032 PLFLT arg6 ;
4033 PLFLT arg7 ;
4034 PLBOOL arg8 ;
4035
4036 SWIG_check_num_args("plarc",8,8)
4037 if(!lua_isnumber(L,1)) SWIG_fail_arg("plarc",1,"PLFLT");
4038 if(!lua_isnumber(L,2)) SWIG_fail_arg("plarc",2,"PLFLT");
4039 if(!lua_isnumber(L,3)) SWIG_fail_arg("plarc",3,"PLFLT");
4040 if(!lua_isnumber(L,4)) SWIG_fail_arg("plarc",4,"PLFLT");
4041 if(!lua_isnumber(L,5)) SWIG_fail_arg("plarc",5,"PLFLT");
4042 if(!lua_isnumber(L,6)) SWIG_fail_arg("plarc",6,"PLFLT");
4043 if(!lua_isnumber(L,7)) SWIG_fail_arg("plarc",7,"PLFLT");
4044 if(!lua_isnumber(L,8)) SWIG_fail_arg("plarc",8,"PLBOOL");
4045 arg1 = (PLFLT)lua_tonumber(L, 1);
4046 arg2 = (PLFLT)lua_tonumber(L, 2);
4047 arg3 = (PLFLT)lua_tonumber(L, 3);
4048 arg4 = (PLFLT)lua_tonumber(L, 4);
4049 arg5 = (PLFLT)lua_tonumber(L, 5);
4050 arg6 = (PLFLT)lua_tonumber(L, 6);
4051 arg7 = (PLFLT)lua_tonumber(L, 7);
4052 arg8 = (PLBOOL)lua_tonumber(L, 8);
4053 plarc(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
4054
4055 return SWIG_arg;
4056
4057 fail: SWIGUNUSED;
4058 lua_error(L);
4059 return 0;
4060}
4061
4062
4063static int _wrap_axes(lua_State* L) {
4064 int SWIG_arg = 0;
4065 PLFLT arg1 ;
4066 PLFLT arg2 ;
4067 char *arg3 = 0 ;
4068 PLFLT arg4 ;
4069 PLINT arg5 ;
4070 char *arg6 = 0 ;
4071 PLFLT arg7 ;
4072 PLINT arg8 ;
4073
4074 SWIG_check_num_args("plaxes",8,8)
4075 if(!lua_isnumber(L,1)) SWIG_fail_arg("plaxes",1,"PLFLT");
4076 if(!lua_isnumber(L,2)) SWIG_fail_arg("plaxes",2,"PLFLT");
4077 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plaxes",3,"char const *");
4078 if(!lua_isnumber(L,4)) SWIG_fail_arg("plaxes",4,"PLFLT");
4079 if(!lua_isnumber(L,5)) SWIG_fail_arg("plaxes",5,"PLINT");
4080 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plaxes",6,"char const *");
4081 if(!lua_isnumber(L,7)) SWIG_fail_arg("plaxes",7,"PLFLT");
4082 if(!lua_isnumber(L,8)) SWIG_fail_arg("plaxes",8,"PLINT");
4083 arg1 = (PLFLT)lua_tonumber(L, 1);
4084 arg2 = (PLFLT)lua_tonumber(L, 2);
4085 arg3 = (char *)lua_tostring(L, 3);
4086 arg4 = (PLFLT)lua_tonumber(L, 4);
4087 arg5 = (PLINT)lua_tonumber(L, 5);
4088 arg6 = (char *)lua_tostring(L, 6);
4089 arg7 = (PLFLT)lua_tonumber(L, 7);
4090 arg8 = (PLINT)lua_tonumber(L, 8);
4091 plaxes(arg1,arg2,(char const *)arg3,arg4,arg5,(char const *)arg6,arg7,arg8);
4092
4093 return SWIG_arg;
4094
4095 fail: SWIGUNUSED;
4096 lua_error(L);
4097 return 0;
4098}
4099
4100
4101static int _wrap_bin(lua_State* L) {
4102 int SWIG_arg = 0;
4103 PLINT arg1 ;
4104 PLFLT *arg2 = 0 ;
4105 PLFLT *arg3 = 0 ;
4106 PLINT arg4 ;
4107 int temp3 ;
4108
4109 SWIG_check_num_args("plbin",3,3)
4110 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbin",3,"PLINT");
4111 {
4112 int temp;
4113 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4114 if ( !arg2 )
4115 SWIG_fail;
4116 arg1 = Alen = temp;
4117 }
4118 {
4119 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4120 if ( !arg3 )
4121 SWIG_fail;
4122 if ( temp3 != Alen )
4123 {
4124 lua_pushfstring( L, "Tables must be of same length." );
4125 SWIG_fail;
4126 }
4127 }
4128 arg4 = (PLINT)lua_tonumber(L, 3);
4129 plbin(arg1,(double const *)arg2,(double const *)arg3,arg4);
4130
4131 {
4132 LUA_FREE_ARRAY( arg2 );
4133 }
4134 {
4135 LUA_FREE_ARRAY( arg3 );
4136 }
4137 return SWIG_arg;
4138
4139 fail: SWIGUNUSED;
4140 {
4141 LUA_FREE_ARRAY( arg2 );
4142 }
4143 {
4144 LUA_FREE_ARRAY( arg3 );
4145 }
4146 lua_error(L);
4147 return 0;
4148}
4149
4150
4151static int _wrap_btime(lua_State* L) {
4152 int SWIG_arg = 0;
4153 PLINT *arg1 = 0 ;
4154 PLINT *arg2 = 0 ;
4155 PLINT *arg3 = 0 ;
4156 PLINT *arg4 = 0 ;
4157 PLINT *arg5 = 0 ;
4158 PLFLT *arg6 = 0 ;
4159 PLFLT arg7 ;
4160 PLINT temp1 ;
4161 PLINT temp2 ;
4162 PLINT temp3 ;
4163 PLINT temp4 ;
4164 PLINT temp5 ;
4165 PLFLT temp6 ;
4166
4167 arg1 = &temp1;
4168 arg2 = &temp2;
4169 arg3 = &temp3;
4170 arg4 = &temp4;
4171 arg5 = &temp5;
4172 arg6 = &temp6;
4173 SWIG_check_num_args("plbtime",1,1)
4174 if(!lua_isnumber(L,1)) SWIG_fail_arg("plbtime",1,"PLFLT");
4175 arg7 = (PLFLT)lua_tonumber(L, 1);
4176 plbtime(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
4177
4178 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4179 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4180 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4181 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4182 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
4183 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
4184 return SWIG_arg;
4185
4186 fail: SWIGUNUSED;
4187 lua_error(L);
4188 return 0;
4189}
4190
4191
4192static int _wrap_bop(lua_State* L) {
4193 int SWIG_arg = 0;
4194
4195 SWIG_check_num_args("plbop",0,0)
4196 plbop();
4197
4198 return SWIG_arg;
4199
4200 fail: SWIGUNUSED;
4201 lua_error(L);
4202 return 0;
4203}
4204
4205
4206static int _wrap_box(lua_State* L) {
4207 int SWIG_arg = 0;
4208 char *arg1 = 0 ;
4209 PLFLT arg2 ;
4210 PLINT arg3 ;
4211 char *arg4 = 0 ;
4212 PLFLT arg5 ;
4213 PLINT arg6 ;
4214
4215 SWIG_check_num_args("plbox",6,6)
4216 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plbox",1,"char const *");
4217 if(!lua_isnumber(L,2)) SWIG_fail_arg("plbox",2,"PLFLT");
4218 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbox",3,"PLINT");
4219 if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("plbox",4,"char const *");
4220 if(!lua_isnumber(L,5)) SWIG_fail_arg("plbox",5,"PLFLT");
4221 if(!lua_isnumber(L,6)) SWIG_fail_arg("plbox",6,"PLINT");
4222 arg1 = (char *)lua_tostring(L, 1);
4223 arg2 = (PLFLT)lua_tonumber(L, 2);
4224 arg3 = (PLINT)lua_tonumber(L, 3);
4225 arg4 = (char *)lua_tostring(L, 4);
4226 arg5 = (PLFLT)lua_tonumber(L, 5);
4227 arg6 = (PLINT)lua_tonumber(L, 6);
4228 plbox((char const *)arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
4229
4230 return SWIG_arg;
4231
4232 fail: SWIGUNUSED;
4233 lua_error(L);
4234 return 0;
4235}
4236
4237
4238static int _wrap_box3(lua_State* L) {
4239 int SWIG_arg = 0;
4240 char *arg1 = 0 ;
4241 char *arg2 = 0 ;
4242 PLFLT arg3 ;
4243 PLINT arg4 ;
4244 char *arg5 = 0 ;
4245 char *arg6 = 0 ;
4246 PLFLT arg7 ;
4247 PLINT arg8 ;
4248 char *arg9 = 0 ;
4249 char *arg10 = 0 ;
4250 PLFLT arg11 ;
4251 PLINT arg12 ;
4252
4253 SWIG_check_num_args("plbox3",12,12)
4254 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plbox3",1,"char const *");
4255 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plbox3",2,"char const *");
4256 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbox3",3,"PLFLT");
4257 if(!lua_isnumber(L,4)) SWIG_fail_arg("plbox3",4,"PLINT");
4258 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plbox3",5,"char const *");
4259 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plbox3",6,"char const *");
4260 if(!lua_isnumber(L,7)) SWIG_fail_arg("plbox3",7,"PLFLT");
4261 if(!lua_isnumber(L,8)) SWIG_fail_arg("plbox3",8,"PLINT");
4262 if(!SWIG_lua_isnilstring(L,9)) SWIG_fail_arg("plbox3",9,"char const *");
4263 if(!SWIG_lua_isnilstring(L,10)) SWIG_fail_arg("plbox3",10,"char const *");
4264 if(!lua_isnumber(L,11)) SWIG_fail_arg("plbox3",11,"PLFLT");
4265 if(!lua_isnumber(L,12)) SWIG_fail_arg("plbox3",12,"PLINT");
4266 arg1 = (char *)lua_tostring(L, 1);
4267 arg2 = (char *)lua_tostring(L, 2);
4268 arg3 = (PLFLT)lua_tonumber(L, 3);
4269 arg4 = (PLINT)lua_tonumber(L, 4);
4270 arg5 = (char *)lua_tostring(L, 5);
4271 arg6 = (char *)lua_tostring(L, 6);
4272 arg7 = (PLFLT)lua_tonumber(L, 7);
4273 arg8 = (PLINT)lua_tonumber(L, 8);
4274 arg9 = (char *)lua_tostring(L, 9);
4275 arg10 = (char *)lua_tostring(L, 10);
4276 arg11 = (PLFLT)lua_tonumber(L, 11);
4277 arg12 = (PLINT)lua_tonumber(L, 12);
4278 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);
4279
4280 return SWIG_arg;
4281
4282 fail: SWIGUNUSED;
4283 lua_error(L);
4284 return 0;
4285}
4286
4287
4288static int _wrap_calc_world(lua_State* L) {
4289 int SWIG_arg = 0;
4290 PLFLT arg1 ;
4291 PLFLT arg2 ;
4292 PLFLT *arg3 = 0 ;
4293 PLFLT *arg4 = 0 ;
4294 PLINT *arg5 = 0 ;
4295 PLFLT temp3 ;
4296 PLFLT temp4 ;
4297 PLINT temp5 ;
4298
4299 arg3 = &temp3;
4300 arg4 = &temp4;
4301 arg5 = &temp5;
4302 SWIG_check_num_args("plcalc_world",2,2)
4303 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcalc_world",1,"PLFLT");
4304 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcalc_world",2,"PLFLT");
4305 arg1 = (PLFLT)lua_tonumber(L, 1);
4306 arg2 = (PLFLT)lua_tonumber(L, 2);
4307 plcalc_world(arg1,arg2,arg3,arg4,arg5);
4308
4309 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4310 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4311 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
4312 return SWIG_arg;
4313
4314 fail: SWIGUNUSED;
4315 lua_error(L);
4316 return 0;
4317}
4318
4319
4320static int _wrap_clear(lua_State* L) {
4321 int SWIG_arg = 0;
4322
4323 SWIG_check_num_args("plclear",0,0)
4324 plclear();
4325
4326 return SWIG_arg;
4327
4328 fail: SWIGUNUSED;
4329 lua_error(L);
4330 return 0;
4331}
4332
4333
4334static int _wrap_col0(lua_State* L) {
4335 int SWIG_arg = 0;
4336 PLINT arg1 ;
4337
4338 SWIG_check_num_args("plcol0",1,1)
4339 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcol0",1,"PLINT");
4340 arg1 = (PLINT)lua_tonumber(L, 1);
4341 plcol0(arg1);
4342
4343 return SWIG_arg;
4344
4345 fail: SWIGUNUSED;
4346 lua_error(L);
4347 return 0;
4348}
4349
4350
4351static int _wrap_col1(lua_State* L) {
4352 int SWIG_arg = 0;
4353 PLFLT arg1 ;
4354
4355 SWIG_check_num_args("plcol1",1,1)
4356 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcol1",1,"PLFLT");
4357 arg1 = (PLFLT)lua_tonumber(L, 1);
4358 plcol1(arg1);
4359
4360 return SWIG_arg;
4361
4362 fail: SWIGUNUSED;
4363 lua_error(L);
4364 return 0;
4365}
4366
4367
4368static int _wrap_configtime(lua_State* L) {
4369 int SWIG_arg = 0;
4370 PLFLT arg1 ;
4371 PLFLT arg2 ;
4372 PLFLT arg3 ;
4373 PLINT arg4 ;
4374 PLBOOL arg5 ;
4375 PLINT arg6 ;
4376 PLINT arg7 ;
4377 PLINT arg8 ;
4378 PLINT arg9 ;
4379 PLINT arg10 ;
4380 PLFLT arg11 ;
4381
4382 SWIG_check_num_args("plconfigtime",11,11)
4383 if(!lua_isnumber(L,1)) SWIG_fail_arg("plconfigtime",1,"PLFLT");
4384 if(!lua_isnumber(L,2)) SWIG_fail_arg("plconfigtime",2,"PLFLT");
4385 if(!lua_isnumber(L,3)) SWIG_fail_arg("plconfigtime",3,"PLFLT");
4386 if(!lua_isnumber(L,4)) SWIG_fail_arg("plconfigtime",4,"PLINT");
4387 if(!lua_isnumber(L,5)) SWIG_fail_arg("plconfigtime",5,"PLBOOL");
4388 if(!lua_isnumber(L,6)) SWIG_fail_arg("plconfigtime",6,"PLINT");
4389 if(!lua_isnumber(L,7)) SWIG_fail_arg("plconfigtime",7,"PLINT");
4390 if(!lua_isnumber(L,8)) SWIG_fail_arg("plconfigtime",8,"PLINT");
4391 if(!lua_isnumber(L,9)) SWIG_fail_arg("plconfigtime",9,"PLINT");
4392 if(!lua_isnumber(L,10)) SWIG_fail_arg("plconfigtime",10,"PLINT");
4393 if(!lua_isnumber(L,11)) SWIG_fail_arg("plconfigtime",11,"PLFLT");
4394 arg1 = (PLFLT)lua_tonumber(L, 1);
4395 arg2 = (PLFLT)lua_tonumber(L, 2);
4396 arg3 = (PLFLT)lua_tonumber(L, 3);
4397 arg4 = (PLINT)lua_tonumber(L, 4);
4398 arg5 = (PLBOOL)lua_tonumber(L, 5);
4399 arg6 = (PLINT)lua_tonumber(L, 6);
4400 arg7 = (PLINT)lua_tonumber(L, 7);
4401 arg8 = (PLINT)lua_tonumber(L, 8);
4402 arg9 = (PLINT)lua_tonumber(L, 9);
4403 arg10 = (PLINT)lua_tonumber(L, 10);
4404 arg11 = (PLFLT)lua_tonumber(L, 11);
4405 plconfigtime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
4406
4407 return SWIG_arg;
4408
4409 fail: SWIGUNUSED;
4410 lua_error(L);
4411 return 0;
4412}
4413
4414
4415static int _wrap_cont(lua_State* L) {
4416 int SWIG_arg = 0;
4417 PLFLT **arg1 = 0 ;
4418 PLINT arg2 ;
4419 PLINT arg3 ;
4420 PLINT arg4 ;
4421 PLINT arg5 ;
4422 PLINT arg6 ;
4423 PLINT arg7 ;
4424 PLFLT *arg8 = 0 ;
4425 PLINT arg9 ;
4426 pltr_func arg10 = 0 ;
4427 PLPointer arg11 = 0 ;
4428 int ii1 ;
4429 PLcGrid cgrid111 ;
4430 PLcGrid2 cgrid211 ;
4431
4432 {
4433 cgrid111.xg = cgrid111.yg = cgrid111.zg = NULL;
4434 cgrid111.nx = cgrid111.ny = cgrid111.nz = 0;
4435 cgrid211.xg = cgrid211.yg = cgrid211.zg = NULL;
4436 cgrid211.nx = cgrid211.ny = 0;
4437 }
4438 {
4439 arg10 = NULL;
4440 }
4441 {
4442 arg11 = NULL;
4443 }
4444 SWIG_check_num_args("plcont",6,8)
4445 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcont",2,"PLINT");
4446 if(!lua_isnumber(L,3)) SWIG_fail_arg("plcont",3,"PLINT");
4447 if(!lua_isnumber(L,4)) SWIG_fail_arg("plcont",4,"PLINT");
4448 if(!lua_isnumber(L,5)) SWIG_fail_arg("plcont",5,"PLINT");
4449 {
4450 int jj;
4451
4452 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
4453 if ( !arg1 )
4454 SWIG_fail;
4455 Xlen = arg2 = ii1;
4456 Ylen = arg3 = jj;
4457 }
4458 arg4 = (PLINT)lua_tonumber(L, 2);
4459 arg5 = (PLINT)lua_tonumber(L, 3);
4460 arg6 = (PLINT)lua_tonumber(L, 4);
4461 arg7 = (PLINT)lua_tonumber(L, 5);
4462 {
4463 int temp;
4464 arg8 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp );
4465 if ( !arg8 )
4466 SWIG_fail;
4467 arg9 = Alen = temp;
4468 }
4469 if(lua_gettop(L)>=7){
4470 {
4471 arg10 = NULL;
4472 mypltr_funcstr[0] = '\0';
4473
4474 if ( lua_isstring( L, 7 ) )
4475 {
4476 const char* funcstr = lua_tostring( L, 7 );
4477 if ( strcmp( "pltr0", funcstr ) == 0 )
4478 {
4479 arg10 = pltr0;
4480 }
4481 else if ( strcmp( "pltr1", funcstr ) == 0 )
4482 {
4483 arg10 = pltr1;
4484 }
4485 else if ( strcmp( "pltr2", funcstr ) == 0 )
4486 {
4487 arg10 = pltr2;
4488 }
4489 else
4490 {
4491 arg10 = mypltr;
4492 strncpy( mypltr_funcstr, funcstr, 255 );
4493 myL = L;
4494 }
4495 }
4496 else
4497 SWIG_fail_arg( "cont", 10, "pltr_func" );
4498 }
4499 }
4500 if(lua_gettop(L)>=8){
4501 {
4502 int nx, ny;
4503 int gridmode = 0;
4504
4505 lua_pushstring( L, "xg" );
4506 lua_gettable( L, 8 );
4507 if ( !lua_istable( L, -1 ) )
4508 {
4509 lua_pop( L, 1 ); // pop "xg"
4510 lua_pushstring( L, "expected a table xg" );
4511 SWIG_fail;
4512 }
4513 lua_rawgeti( L, -1, 1 );
4514 if ( lua_istable( L, -1 ) )
4515 gridmode = 2; // two dimensional array
4516 else if ( lua_isnumber( L, -1 ) )
4517 gridmode = 1; // one dimensional array
4518 else
4519 {
4520 lua_pop( L, 1 ); // pop "1"
4521 lua_pop( L, 1 ); // pop "xg"
4522 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
4523 SWIG_fail;
4524 }
4525 lua_pop( L, 1 ); // pop test element
4526 if ( gridmode == 1 )
4527 {
4528 cgrid111.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
4529 if ( !cgrid111.xg )
4530 {
4531 lua_pop( L, 1 ); // pop "xg"
4532 SWIG_fail;
4533 }
4534 if ( nx != Xlen )
4535 {
4536 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
4537 SWIG_fail;
4538 }
4539 cgrid111.nx = nx;
4540 }
4541 else
4542 {
4543 cgrid211.xg = read_double_Matrix( L, -1, &nx, &ny );
4544 if ( !cgrid211.xg )
4545 {
4546 lua_pop( L, 1 ); // pop "xg"
4547 SWIG_fail;
4548 }
4549 if ( ( nx != Xlen ) || ( ny != Ylen ) )
4550 {
4551 lua_pop( L, 1 ); // pop "xg"
4552 lua_pushfstring( L, "Vectors must match matrix." );
4553 SWIG_fail;
4554 }
4555 cgrid211.nx = nx;
4556 cgrid211.ny = ny;
4557 }
4558 lua_pop( L, 1 ); // pop "xg"
4559
4560 lua_pushstring( L, "yg" );
4561 lua_gettable( L, 8 );
4562 if ( !lua_istable( L, -1 ) )
4563 {
4564 lua_pop( L, 1 );
4565 lua_pushstring( L, "expected a table yg" );
4566 SWIG_fail;
4567 }
4568 lua_rawgeti( L, -1, 1 );
4569 if ( gridmode == 2 )
4570 {
4571 if ( !lua_istable( L, -1 ) )
4572 {
4573 lua_pop( L, 1 ); // pop "1"
4574 lua_pop( L, 1 ); // pop "yg"
4575 lua_pushstring( L, "expected a two dimensional array/table in yg" );
4576 SWIG_fail;
4577 }
4578 }
4579 else
4580 {
4581 if ( !lua_isnumber( L, -1 ) )
4582 {
4583 lua_pop( L, 1 ); // pop "1"
4584 lua_pop( L, 1 ); // pop "yg"
4585 lua_pushstring( L, "expected a one dimensional array/table in yg" );
4586 SWIG_fail;
4587 }
4588 }
4589 lua_pop( L, 1 ); // pop "1"
4590 if ( gridmode == 1 )
4591 {
4592 cgrid111.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
4593 if ( !cgrid111.yg )
4594 {
4595 lua_pop( L, 1 ); // pop "yg"
4596 SWIG_fail;
4597 }
4598 if ( ny != Ylen )
4599 {
4600 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
4601 SWIG_fail;
4602 }
4603 cgrid111.ny = ny;
4604 }
4605 else
4606 {
4607 cgrid211.yg = read_double_Matrix( L, -1, &nx, &ny );
4608 if ( !cgrid211.yg )
4609 {
4610 lua_pop( L, 1 ); // pop "xg"
4611 SWIG_fail;
4612 }
4613 if ( ( nx != Xlen ) || ( ny != Ylen ) )
4614 {
4615 lua_pop( L, 1 ); // pop "xg"
4616 lua_pushfstring( L, "Vectors must match matrix." );
4617 SWIG_fail;
4618 }
4619 // cgrid211.nx/ny already set
4620 }
4621 lua_pop( L, 1 ); // pop "yg"
4622
4623 if ( gridmode == 1 )
4624 arg11 = &cgrid111;
4625 else if ( gridmode == 2 )
4626 arg11 = &cgrid211;
4627 }
4628 }
4629 plcont((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,(double const *)arg8,arg9,arg10,arg11);
4630
4631 {
4632 int i;
4633
4634 if ( arg1 )
4635 {
4636 for ( i = 0; i < ii1; i++ )
4637 LUA_FREE_ARRAY( arg1[i] );
4638 LUA_FREE_ARRAY( arg1 );
4639 }
4640 }
4641 {
4642 LUA_FREE_ARRAY( arg8 );
4643 }
4644 {
4645 mypltr_funcstr[0] = '\0';
4646 }
4647 {
4648 int i;
4649
4650 LUA_FREE_ARRAY( cgrid111.xg );
4651 LUA_FREE_ARRAY( cgrid111.yg );
4652
4653 if ( cgrid211.xg )
4654 {
4655 for ( i = 0; i < Xlen; i++ )
4656 LUA_FREE_ARRAY( cgrid211.xg[i] );
4657 LUA_FREE_ARRAY( cgrid211.xg );
4658 }
4659 if ( cgrid211.yg )
4660 {
4661 for ( i = 0; i < Xlen; i++ )
4662 LUA_FREE_ARRAY( cgrid211.yg[i] );
4663 LUA_FREE_ARRAY( cgrid211.yg );
4664 }
4665 }
4666 return SWIG_arg;
4667
4668 fail: SWIGUNUSED;
4669 {
4670 int i;
4671
4672 if ( arg1 )
4673 {
4674 for ( i = 0; i < ii1; i++ )
4675 LUA_FREE_ARRAY( arg1[i] );
4676 LUA_FREE_ARRAY( arg1 );
4677 }
4678 }
4679 {
4680 LUA_FREE_ARRAY( arg8 );
4681 }
4682 {
4683 mypltr_funcstr[0] = '\0';
4684 }
4685 {
4686 int i;
4687
4688 LUA_FREE_ARRAY( cgrid111.xg );
4689 LUA_FREE_ARRAY( cgrid111.yg );
4690
4691 if ( cgrid211.xg )
4692 {
4693 for ( i = 0; i < Xlen; i++ )
4694 LUA_FREE_ARRAY( cgrid211.xg[i] );
4695 LUA_FREE_ARRAY( cgrid211.xg );
4696 }
4697 if ( cgrid211.yg )
4698 {
4699 for ( i = 0; i < Xlen; i++ )
4700 LUA_FREE_ARRAY( cgrid211.yg[i] );
4701 LUA_FREE_ARRAY( cgrid211.yg );
4702 }
4703 }
4704 lua_error(L);
4705 return 0;
4706}
4707
4708
4709static int _wrap_ctime(lua_State* L) {
4710 int SWIG_arg = 0;
4711 PLINT arg1 ;
4712 PLINT arg2 ;
4713 PLINT arg3 ;
4714 PLINT arg4 ;
4715 PLINT arg5 ;
4716 PLFLT arg6 ;
4717 PLFLT *arg7 = 0 ;
4718 PLFLT temp7 ;
4719
4720 arg7 = &temp7;
4721 SWIG_check_num_args("plctime",6,6)
4722 if(!lua_isnumber(L,1)) SWIG_fail_arg("plctime",1,"PLINT");
4723 if(!lua_isnumber(L,2)) SWIG_fail_arg("plctime",2,"PLINT");
4724 if(!lua_isnumber(L,3)) SWIG_fail_arg("plctime",3,"PLINT");
4725 if(!lua_isnumber(L,4)) SWIG_fail_arg("plctime",4,"PLINT");
4726 if(!lua_isnumber(L,5)) SWIG_fail_arg("plctime",5,"PLINT");
4727 if(!lua_isnumber(L,6)) SWIG_fail_arg("plctime",6,"PLFLT");
4728 arg1 = (PLINT)lua_tonumber(L, 1);
4729 arg2 = (PLINT)lua_tonumber(L, 2);
4730 arg3 = (PLINT)lua_tonumber(L, 3);
4731 arg4 = (PLINT)lua_tonumber(L, 4);
4732 arg5 = (PLINT)lua_tonumber(L, 5);
4733 arg6 = (PLFLT)lua_tonumber(L, 6);
4734 plctime(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
4735
4736 lua_pushnumber(L, (lua_Number) *arg7); SWIG_arg++;
4737 return SWIG_arg;
4738
4739 fail: SWIGUNUSED;
4740 lua_error(L);
4741 return 0;
4742}
4743
4744
4745static int _wrap_cpstrm(lua_State* L) {
4746 int SWIG_arg = 0;
4747 PLINT arg1 ;
4748 PLBOOL arg2 ;
4749
4750 SWIG_check_num_args("plcpstrm",2,2)
4751 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcpstrm",1,"PLINT");
4752 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcpstrm",2,"PLBOOL");
4753 arg1 = (PLINT)lua_tonumber(L, 1);
4754 arg2 = (PLBOOL)lua_tonumber(L, 2);
4755 plcpstrm(arg1,arg2);
4756
4757 return SWIG_arg;
4758
4759 fail: SWIGUNUSED;
4760 lua_error(L);
4761 return 0;
4762}
4763
4764
4765static int _wrap_plend(lua_State* L) {
4766 int SWIG_arg = 0;
4767
4768 SWIG_check_num_args("plend",0,0)
4769 plend();
4770
4771 return SWIG_arg;
4772
4773 fail: SWIGUNUSED;
4774 lua_error(L);
4775 return 0;
4776}
4777
4778
4779static int _wrap_plend1(lua_State* L) {
4780 int SWIG_arg = 0;
4781
4782 SWIG_check_num_args("plend1",0,0)
4783 plend1();
4784
4785 return SWIG_arg;
4786
4787 fail: SWIGUNUSED;
4788 lua_error(L);
4789 return 0;
4790}
4791
4792
4793static int _wrap_env(lua_State* L) {
4794 int SWIG_arg = 0;
4795 PLFLT arg1 ;
4796 PLFLT arg2 ;
4797 PLFLT arg3 ;
4798 PLFLT arg4 ;
4799 PLINT arg5 ;
4800 PLINT arg6 ;
4801
4802 SWIG_check_num_args("plenv",6,6)
4803 if(!lua_isnumber(L,1)) SWIG_fail_arg("plenv",1,"PLFLT");
4804 if(!lua_isnumber(L,2)) SWIG_fail_arg("plenv",2,"PLFLT");
4805 if(!lua_isnumber(L,3)) SWIG_fail_arg("plenv",3,"PLFLT");
4806 if(!lua_isnumber(L,4)) SWIG_fail_arg("plenv",4,"PLFLT");
4807 if(!lua_isnumber(L,5)) SWIG_fail_arg("plenv",5,"PLINT");
4808 if(!lua_isnumber(L,6)) SWIG_fail_arg("plenv",6,"PLINT");
4809 arg1 = (PLFLT)lua_tonumber(L, 1);
4810 arg2 = (PLFLT)lua_tonumber(L, 2);
4811 arg3 = (PLFLT)lua_tonumber(L, 3);
4812 arg4 = (PLFLT)lua_tonumber(L, 4);
4813 arg5 = (PLINT)lua_tonumber(L, 5);
4814 arg6 = (PLINT)lua_tonumber(L, 6);
4815 plenv(arg1,arg2,arg3,arg4,arg5,arg6);
4816
4817 return SWIG_arg;
4818
4819 fail: SWIGUNUSED;
4820 lua_error(L);
4821 return 0;
4822}
4823
4824
4825static int _wrap_env0(lua_State* L) {
4826 int SWIG_arg = 0;
4827 PLFLT arg1 ;
4828 PLFLT arg2 ;
4829 PLFLT arg3 ;
4830 PLFLT arg4 ;
4831 PLINT arg5 ;
4832 PLINT arg6 ;
4833
4834 SWIG_check_num_args("plenv0",6,6)
4835 if(!lua_isnumber(L,1)) SWIG_fail_arg("plenv0",1,"PLFLT");
4836 if(!lua_isnumber(L,2)) SWIG_fail_arg("plenv0",2,"PLFLT");
4837 if(!lua_isnumber(L,3)) SWIG_fail_arg("plenv0",3,"PLFLT");
4838 if(!lua_isnumber(L,4)) SWIG_fail_arg("plenv0",4,"PLFLT");
4839 if(!lua_isnumber(L,5)) SWIG_fail_arg("plenv0",5,"PLINT");
4840 if(!lua_isnumber(L,6)) SWIG_fail_arg("plenv0",6,"PLINT");
4841 arg1 = (PLFLT)lua_tonumber(L, 1);
4842 arg2 = (PLFLT)lua_tonumber(L, 2);
4843 arg3 = (PLFLT)lua_tonumber(L, 3);
4844 arg4 = (PLFLT)lua_tonumber(L, 4);
4845 arg5 = (PLINT)lua_tonumber(L, 5);
4846 arg6 = (PLINT)lua_tonumber(L, 6);
4847 plenv0(arg1,arg2,arg3,arg4,arg5,arg6);
4848
4849 return SWIG_arg;
4850
4851 fail: SWIGUNUSED;
4852 lua_error(L);
4853 return 0;
4854}
4855
4856
4857static int _wrap_eop(lua_State* L) {
4858 int SWIG_arg = 0;
4859
4860 SWIG_check_num_args("pleop",0,0)
4861 pleop();
4862
4863 return SWIG_arg;
4864
4865 fail: SWIGUNUSED;
4866 lua_error(L);
4867 return 0;
4868}
4869
4870
4871static int _wrap_errx(lua_State* L) {
4872 int SWIG_arg = 0;
4873 PLINT arg1 ;
4874 PLFLT *arg2 = 0 ;
4875 PLFLT *arg3 = 0 ;
4876 PLFLT *arg4 = 0 ;
4877 int temp3 ;
4878 int temp4 ;
4879
4880 SWIG_check_num_args("plerrx",3,3)
4881 {
4882 int temp;
4883 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4884 if ( !arg2 )
4885 SWIG_fail;
4886 arg1 = Alen = temp;
4887 }
4888 {
4889 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4890 if ( !arg3 )
4891 SWIG_fail;
4892 if ( temp3 != Alen )
4893 {
4894 lua_pushfstring( L, "Tables must be of same length." );
4895 SWIG_fail;
4896 }
4897 }
4898 {
4899 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
4900 if ( !arg4 )
4901 SWIG_fail;
4902 if ( temp4 != Alen )
4903 {
4904 lua_pushfstring( L, "Tables must be of same length." );
4905 SWIG_fail;
4906 }
4907 }
4908 plerrx(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
4909
4910 {
4911 LUA_FREE_ARRAY( arg2 );
4912 }
4913 {
4914 LUA_FREE_ARRAY( arg3 );
4915 }
4916 {
4917 LUA_FREE_ARRAY( arg4 );
4918 }
4919 return SWIG_arg;
4920
4921 fail: SWIGUNUSED;
4922 {
4923 LUA_FREE_ARRAY( arg2 );
4924 }
4925 {
4926 LUA_FREE_ARRAY( arg3 );
4927 }
4928 {
4929 LUA_FREE_ARRAY( arg4 );
4930 }
4931 lua_error(L);
4932 return 0;
4933}
4934
4935
4936static int _wrap_erry(lua_State* L) {
4937 int SWIG_arg = 0;
4938 PLINT arg1 ;
4939 PLFLT *arg2 = 0 ;
4940 PLFLT *arg3 = 0 ;
4941 PLFLT *arg4 = 0 ;
4942 int temp3 ;
4943 int temp4 ;
4944
4945 SWIG_check_num_args("plerry",3,3)
4946 {
4947 int temp;
4948 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4949 if ( !arg2 )
4950 SWIG_fail;
4951 arg1 = Alen = temp;
4952 }
4953 {
4954 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4955 if ( !arg3 )
4956 SWIG_fail;
4957 if ( temp3 != Alen )
4958 {
4959 lua_pushfstring( L, "Tables must be of same length." );
4960 SWIG_fail;
4961 }
4962 }
4963 {
4964 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
4965 if ( !arg4 )
4966 SWIG_fail;
4967 if ( temp4 != Alen )
4968 {
4969 lua_pushfstring( L, "Tables must be of same length." );
4970 SWIG_fail;
4971 }
4972 }
4973 plerry(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
4974
4975 {
4976 LUA_FREE_ARRAY( arg2 );
4977 }
4978 {
4979 LUA_FREE_ARRAY( arg3 );
4980 }
4981 {
4982 LUA_FREE_ARRAY( arg4 );
4983 }
4984 return SWIG_arg;
4985
4986 fail: SWIGUNUSED;
4987 {
4988 LUA_FREE_ARRAY( arg2 );
4989 }
4990 {
4991 LUA_FREE_ARRAY( arg3 );
4992 }
4993 {
4994 LUA_FREE_ARRAY( arg4 );
4995 }
4996 lua_error(L);
4997 return 0;
4998}
4999
5000
5001static int _wrap_famadv(lua_State* L) {
5002 int SWIG_arg = 0;
5003
5004 SWIG_check_num_args("plfamadv",0,0)
5005 plfamadv();
5006
5007 return SWIG_arg;
5008
5009 fail: SWIGUNUSED;
5010 lua_error(L);
5011 return 0;
5012}
5013
5014
5015static int _wrap_fill(lua_State* L) {
5016 int SWIG_arg = 0;
5017 PLINT arg1 ;
5018 PLFLT *arg2 = 0 ;
5019 PLFLT *arg3 = 0 ;
5020 int temp3 ;
5021
5022 SWIG_check_num_args("plfill",2,2)
5023 {
5024 int temp;
5025 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5026 if ( !arg2 )
5027 SWIG_fail;
5028 arg1 = Alen = temp;
5029 }
5030 {
5031 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
5032 if ( !arg3 )
5033 SWIG_fail;
5034 if ( temp3 != Alen )
5035 {
5036 lua_pushfstring( L, "Tables must be of same length." );
5037 SWIG_fail;
5038 }
5039 }
5040 plfill(arg1,(double const *)arg2,(double const *)arg3);
5041
5042 {
5043 LUA_FREE_ARRAY( arg2 );
5044 }
5045 {
5046 LUA_FREE_ARRAY( arg3 );
5047 }
5048 return SWIG_arg;
5049
5050 fail: SWIGUNUSED;
5051 {
5052 LUA_FREE_ARRAY( arg2 );
5053 }
5054 {
5055 LUA_FREE_ARRAY( arg3 );
5056 }
5057 lua_error(L);
5058 return 0;
5059}
5060
5061
5062static int _wrap_fill3(lua_State* L) {
5063 int SWIG_arg = 0;
5064 PLINT arg1 ;
5065 PLFLT *arg2 = 0 ;
5066 PLFLT *arg3 = 0 ;
5067 PLFLT *arg4 = 0 ;
5068 int temp3 ;
5069 int temp4 ;
5070
5071 SWIG_check_num_args("plfill3",3,3)
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 {
5090 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
5091 if ( !arg4 )
5092 SWIG_fail;
5093 if ( temp4 != Alen )
5094 {
5095 lua_pushfstring( L, "Tables must be of same length." );
5096 SWIG_fail;
5097 }
5098 }
5099 plfill3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
5100
5101 {
5102 LUA_FREE_ARRAY( arg2 );
5103 }
5104 {
5105 LUA_FREE_ARRAY( arg3 );
5106 }
5107 {
5108 LUA_FREE_ARRAY( arg4 );
5109 }
5110 return SWIG_arg;
5111
5112 fail: SWIGUNUSED;
5113 {
5114 LUA_FREE_ARRAY( arg2 );
5115 }
5116 {
5117 LUA_FREE_ARRAY( arg3 );
5118 }
5119 {
5120 LUA_FREE_ARRAY( arg4 );
5121 }
5122 lua_error(L);
5123 return 0;
5124}
5125
5126
5127static int _wrap_gradient(lua_State* L) {
5128 int SWIG_arg = 0;
5129 PLINT arg1 ;
5130 PLFLT *arg2 = 0 ;
5131 PLFLT *arg3 = 0 ;
5132 PLFLT arg4 ;
5133 int temp3 ;
5134
5135 SWIG_check_num_args("plgradient",3,3)
5136 if(!lua_isnumber(L,3)) SWIG_fail_arg("plgradient",3,"PLFLT");
5137 {
5138 int temp;
5139 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5140 if ( !arg2 )
5141 SWIG_fail;
5142 arg1 = Alen = temp;
5143 }
5144 {
5145 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
5146 if ( !arg3 )
5147 SWIG_fail;
5148 if ( temp3 != Alen )
5149 {
5150 lua_pushfstring( L, "Tables must be of same length." );
5151 SWIG_fail;
5152 }
5153 }
5154 arg4 = (PLFLT)lua_tonumber(L, 3);
5155 plgradient(arg1,(double const *)arg2,(double const *)arg3,arg4);
5156
5157 {
5158 LUA_FREE_ARRAY( arg2 );
5159 }
5160 {
5161 LUA_FREE_ARRAY( arg3 );
5162 }
5163 return SWIG_arg;
5164
5165 fail: SWIGUNUSED;
5166 {
5167 LUA_FREE_ARRAY( arg2 );
5168 }
5169 {
5170 LUA_FREE_ARRAY( arg3 );
5171 }
5172 lua_error(L);
5173 return 0;
5174}
5175
5176
5177static int _wrap_flush(lua_State* L) {
5178 int SWIG_arg = 0;
5179
5180 SWIG_check_num_args("plflush",0,0)
5181 plflush();
5182
5183 return SWIG_arg;
5184
5185 fail: SWIGUNUSED;
5186 lua_error(L);
5187 return 0;
5188}
5189
5190
5191static int _wrap_font(lua_State* L) {
5192 int SWIG_arg = 0;
5193 PLINT arg1 ;
5194
5195 SWIG_check_num_args("plfont",1,1)
5196 if(!lua_isnumber(L,1)) SWIG_fail_arg("plfont",1,"PLINT");
5197 arg1 = (PLINT)lua_tonumber(L, 1);
5198 plfont(arg1);
5199
5200 return SWIG_arg;
5201
5202 fail: SWIGUNUSED;
5203 lua_error(L);
5204 return 0;
5205}
5206
5207
5208static int _wrap_fontld(lua_State* L) {
5209 int SWIG_arg = 0;
5210 PLINT arg1 ;
5211
5212 SWIG_check_num_args("plfontld",1,1)
5213 if(!lua_isnumber(L,1)) SWIG_fail_arg("plfontld",1,"PLINT");
5214 arg1 = (PLINT)lua_tonumber(L, 1);
5215 plfontld(arg1);
5216
5217 return SWIG_arg;
5218
5219 fail: SWIGUNUSED;
5220 lua_error(L);
5221 return 0;
5222}
5223
5224
5225static int _wrap_gchr(lua_State* L) {
5226 int SWIG_arg = 0;
5227 PLFLT *arg1 = 0 ;
5228 PLFLT *arg2 = 0 ;
5229 PLFLT temp1 ;
5230 PLFLT temp2 ;
5231
5232 arg1 = &temp1;
5233 arg2 = &temp2;
5234 SWIG_check_num_args("plgchr",0,0)
5235 plgchr(arg1,arg2);
5236
5237 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5238 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5239 return SWIG_arg;
5240
5241 fail: SWIGUNUSED;
5242 lua_error(L);
5243 return 0;
5244}
5245
5246
5247static int _wrap_gcol0(lua_State* L) {
5248 int SWIG_arg = 0;
5249 PLINT arg1 ;
5250 PLINT *arg2 = 0 ;
5251 PLINT *arg3 = 0 ;
5252 PLINT *arg4 = 0 ;
5253 PLINT temp2 ;
5254 PLINT temp3 ;
5255 PLINT temp4 ;
5256
5257 arg2 = &temp2;
5258 arg3 = &temp3;
5259 arg4 = &temp4;
5260 SWIG_check_num_args("plgcol0",1,1)
5261 if(!lua_isnumber(L,1)) SWIG_fail_arg("plgcol0",1,"PLINT");
5262 arg1 = (PLINT)lua_tonumber(L, 1);
5263 plgcol0(arg1,arg2,arg3,arg4);
5264
5265 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5266 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5267 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5268 return SWIG_arg;
5269
5270 fail: SWIGUNUSED;
5271 lua_error(L);
5272 return 0;
5273}
5274
5275
5276static int _wrap_gcol0a(lua_State* L) {
5277 int SWIG_arg = 0;
5278 PLINT arg1 ;
5279 PLINT *arg2 = 0 ;
5280 PLINT *arg3 = 0 ;
5281 PLINT *arg4 = 0 ;
5282 PLFLT *arg5 = 0 ;
5283 PLINT temp2 ;
5284 PLINT temp3 ;
5285 PLINT temp4 ;
5286 PLFLT temp5 ;
5287
5288 arg2 = &temp2;
5289 arg3 = &temp3;
5290 arg4 = &temp4;
5291 arg5 = &temp5;
5292 SWIG_check_num_args("plgcol0a",1,1)
5293 if(!lua_isnumber(L,1)) SWIG_fail_arg("plgcol0a",1,"PLINT");
5294 arg1 = (PLINT)lua_tonumber(L, 1);
5295 plgcol0a(arg1,arg2,arg3,arg4,arg5);
5296
5297 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5298 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5299 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5300 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
5301 return SWIG_arg;
5302
5303 fail: SWIGUNUSED;
5304 lua_error(L);
5305 return 0;
5306}
5307
5308
5309static int _wrap_gcolbg(lua_State* L) {
5310 int SWIG_arg = 0;
5311 PLINT *arg1 = 0 ;
5312 PLINT *arg2 = 0 ;
5313 PLINT *arg3 = 0 ;
5314 PLINT temp1 ;
5315 PLINT temp2 ;
5316 PLINT temp3 ;
5317
5318 arg1 = &temp1;
5319 arg2 = &temp2;
5320 arg3 = &temp3;
5321 SWIG_check_num_args("plgcolbg",0,0)
5322 plgcolbg(arg1,arg2,arg3);
5323
5324 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5325 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5326 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5327 return SWIG_arg;
5328
5329 fail: SWIGUNUSED;
5330 lua_error(L);
5331 return 0;
5332}
5333
5334
5335static int _wrap_gcolbga(lua_State* L) {
5336 int SWIG_arg = 0;
5337 PLINT *arg1 = 0 ;
5338 PLINT *arg2 = 0 ;
5339 PLINT *arg3 = 0 ;
5340 PLFLT *arg4 = 0 ;
5341 PLINT temp1 ;
5342 PLINT temp2 ;
5343 PLINT temp3 ;
5344 PLFLT temp4 ;
5345
5346 arg1 = &temp1;
5347 arg2 = &temp2;
5348 arg3 = &temp3;
5349 arg4 = &temp4;
5350 SWIG_check_num_args("plgcolbga",0,0)
5351 plgcolbga(arg1,arg2,arg3,arg4);
5352
5353 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5354 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5355 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5356 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5357 return SWIG_arg;
5358
5359 fail: SWIGUNUSED;
5360 lua_error(L);
5361 return 0;
5362}
5363
5364
5365static int _wrap_gcompression(lua_State* L) {
5366 int SWIG_arg = 0;
5367 PLINT *arg1 = 0 ;
5368 PLINT temp1 ;
5369
5370 arg1 = &temp1;
5371 SWIG_check_num_args("plgcompression",0,0)
5372 plgcompression(arg1);
5373
5374 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5375 return SWIG_arg;
5376
5377 fail: SWIGUNUSED;
5378 lua_error(L);
5379 return 0;
5380}
5381
5382
5383static int _wrap_gdev(lua_State* L) {
5384 int SWIG_arg = 0;
5385 char *arg1 = 0 ;
5386 char buff1[1000] ;
5387
5388 {
5389 arg1 = buff1;
5390 }
5391 SWIG_check_num_args("plgdev",0,0)
5392 plgdev(arg1);
5393
5394 {
5395 lua_pushstring( L, arg1 );
5396 SWIG_arg++;
5397 }
5398 return SWIG_arg;
5399
5400 fail: SWIGUNUSED;
5401 lua_error(L);
5402 return 0;
5403}
5404
5405
5406static int _wrap_gdidev(lua_State* L) {
5407 int SWIG_arg = 0;
5408 PLFLT *arg1 = 0 ;
5409 PLFLT *arg2 = 0 ;
5410 PLFLT *arg3 = 0 ;
5411 PLFLT *arg4 = 0 ;
5412 PLFLT temp1 ;
5413 PLFLT temp2 ;
5414 PLFLT temp3 ;
5415 PLFLT temp4 ;
5416
5417 arg1 = &temp1;
5418 arg2 = &temp2;
5419 arg3 = &temp3;
5420 arg4 = &temp4;
5421 SWIG_check_num_args("plgdidev",0,0)
5422 plgdidev(arg1,arg2,arg3,arg4);
5423
5424 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5425 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5426 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5427 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5428 return SWIG_arg;
5429
5430 fail: SWIGUNUSED;
5431 lua_error(L);
5432 return 0;
5433}
5434
5435
5436static int _wrap_gdiori(lua_State* L) {
5437 int SWIG_arg = 0;
5438 PLFLT *arg1 = 0 ;
5439 PLFLT temp1 ;
5440
5441 arg1 = &temp1;
5442 SWIG_check_num_args("plgdiori",0,0)
5443 plgdiori(arg1);
5444
5445 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5446 return SWIG_arg;
5447
5448 fail: SWIGUNUSED;
5449 lua_error(L);
5450 return 0;
5451}
5452
5453
5454static int _wrap_gdiplt(lua_State* L) {
5455 int SWIG_arg = 0;
5456 PLFLT *arg1 = 0 ;
5457 PLFLT *arg2 = 0 ;
5458 PLFLT *arg3 = 0 ;
5459 PLFLT *arg4 = 0 ;
5460 PLFLT temp1 ;
5461 PLFLT temp2 ;
5462 PLFLT temp3 ;
5463 PLFLT temp4 ;
5464
5465 arg1 = &temp1;
5466 arg2 = &temp2;
5467 arg3 = &temp3;
5468 arg4 = &temp4;
5469 SWIG_check_num_args("plgdiplt",0,0)
5470 plgdiplt(arg1,arg2,arg3,arg4);
5471
5472 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5473 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5474 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5475 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5476 return SWIG_arg;
5477
5478 fail: SWIGUNUSED;
5479 lua_error(L);
5480 return 0;
5481}
5482
5483
5484static int _wrap_gfam(lua_State* L) {
5485 int SWIG_arg = 0;
5486 PLINT *arg1 = 0 ;
5487 PLINT *arg2 = 0 ;
5488 PLINT *arg3 = 0 ;
5489 PLINT temp1 ;
5490 PLINT temp2 ;
5491 PLINT temp3 ;
5492
5493 arg1 = &temp1;
5494 arg2 = &temp2;
5495 arg3 = &temp3;
5496 SWIG_check_num_args("plgfam",0,0)
5497 plgfam(arg1,arg2,arg3);
5498
5499 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5500 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5501 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5502 return SWIG_arg;
5503
5504 fail: SWIGUNUSED;
5505 lua_error(L);
5506 return 0;
5507}
5508
5509
5510static int _wrap_gfci(lua_State* L) {
5511 int SWIG_arg = 0;
5512 PLUNICODE *arg1 = 0 ;
5513 PLUNICODE temp1 ;
5514
5515 arg1 = &temp1;
5516 SWIG_check_num_args("plgfci",0,0)
5517 plgfci(arg1);
5518
5519 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5520 return SWIG_arg;
5521
5522 fail: SWIGUNUSED;
5523 lua_error(L);
5524 return 0;
5525}
5526
5527
5528static int _wrap_gfnam(lua_State* L) {
5529 int SWIG_arg = 0;
5530 char *arg1 = 0 ;
5531 char buff1[1000] ;
5532
5533 {
5534 arg1 = buff1;
5535 }
5536 SWIG_check_num_args("plgfnam",0,0)
5537 plgfnam(arg1);
5538
5539 {
5540 lua_pushstring( L, arg1 );
5541 SWIG_arg++;
5542 }
5543 return SWIG_arg;
5544
5545 fail: SWIGUNUSED;
5546 lua_error(L);
5547 return 0;
5548}
5549
5550
5551static int _wrap_gfont(lua_State* L) {
5552 int SWIG_arg = 0;
5553 PLINT *arg1 = 0 ;
5554 PLINT *arg2 = 0 ;
5555 PLINT *arg3 = 0 ;
5556 PLINT temp1 ;
5557 PLINT temp2 ;
5558 PLINT temp3 ;
5559
5560 arg1 = &temp1;
5561 arg2 = &temp2;
5562 arg3 = &temp3;
5563 SWIG_check_num_args("plgfont",0,0)
5564 plgfont(arg1,arg2,arg3);
5565
5566 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5567 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5568 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5569 return SWIG_arg;
5570
5571 fail: SWIGUNUSED;
5572 lua_error(L);
5573 return 0;
5574}
5575
5576
5577static int _wrap_glevel(lua_State* L) {
5578 int SWIG_arg = 0;
5579 PLINT *arg1 = 0 ;
5580 PLINT temp1 ;
5581
5582 arg1 = &temp1;
5583 SWIG_check_num_args("plglevel",0,0)
5584 plglevel(arg1);
5585
5586 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5587 return SWIG_arg;
5588
5589 fail: SWIGUNUSED;
5590 lua_error(L);
5591 return 0;
5592}
5593
5594
5595static int _wrap_gpage(lua_State* L) {
5596 int SWIG_arg = 0;
5597 PLFLT *arg1 = 0 ;
5598 PLFLT *arg2 = 0 ;
5599 PLINT *arg3 = 0 ;
5600 PLINT *arg4 = 0 ;
5601 PLINT *arg5 = 0 ;
5602 PLINT *arg6 = 0 ;
5603 PLFLT temp1 ;
5604 PLFLT temp2 ;
5605 PLINT temp3 ;
5606 PLINT temp4 ;
5607 PLINT temp5 ;
5608 PLINT temp6 ;
5609
5610 arg1 = &temp1;
5611 arg2 = &temp2;
5612 arg3 = &temp3;
5613 arg4 = &temp4;
5614 arg5 = &temp5;
5615 arg6 = &temp6;
5616 SWIG_check_num_args("plgpage",0,0)
5617 plgpage(arg1,arg2,arg3,arg4,arg5,arg6);
5618
5619 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5620 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5621 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5622 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5623 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
5624 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
5625 return SWIG_arg;
5626
5627 fail: SWIGUNUSED;
5628 lua_error(L);
5629 return 0;
5630}
5631
5632
5633static int _wrap_gra(lua_State* L) {
5634 int SWIG_arg = 0;
5635
5636 SWIG_check_num_args("plgra",0,0)
5637 plgra();
5638
5639 return SWIG_arg;
5640
5641 fail: SWIGUNUSED;
5642 lua_error(L);
5643 return 0;
5644}
5645
5646
5647static int _wrap_griddata(lua_State* L) {
5648 int SWIG_arg = 0;
5649 PLFLT *arg1 = 0 ;
5650 PLFLT *arg2 = 0 ;
5651 PLFLT *arg3 = 0 ;
5652 PLINT arg4 ;
5653 PLFLT *arg5 = 0 ;
5654 PLINT arg6 ;
5655 PLFLT *arg7 = 0 ;
5656 PLINT arg8 ;
5657 PLFLT **arg9 = 0 ;
5658 PLINT arg10 ;
5659 PLFLT arg11 ;
5660 int temp2 ;
5661
5662 SWIG_check_num_args("plgriddata",7,7)
5663 if(!lua_isnumber(L,6)) SWIG_fail_arg("plgriddata",6,"PLINT");
5664 if(!lua_isnumber(L,7)) SWIG_fail_arg("plgriddata",7,"PLFLT");
5665 {
5666 int temp;
5667 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5668 if ( !arg1 )
5669 SWIG_fail;
5670 Alen = temp;
5671 }
5672 {
5673 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp2 );
5674 if ( !arg2 )
5675 SWIG_fail;
5676 if ( temp2 != Alen )
5677 {
5678 lua_pushfstring( L, "Tables must be of same length." );
5679 SWIG_fail;
5680 }
5681 }
5682 {
5683 int temp;
5684 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp );
5685 if ( !arg3 )
5686 SWIG_fail;
5687 if ( temp != Alen )
5688 {
5689 lua_pushfstring( L, "Tables must be of same length." );
5690 SWIG_fail;
5691 }
5692 arg4 = temp;
5693 }
5694 {
5695 int temp;
5696 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
5697 if ( !arg5 )
5698 SWIG_fail;
5699 arg6 = Xlen = temp;
5700 }
5701 {
5702 int temp, i;
5703
5704 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
5705 if ( !arg7 )
5706 SWIG_fail;
5707 arg8 = Ylen = temp;
5708
5709 arg9 = LUA_ALLOC_ARRAY( PLFLT *, Xlen );
5710 if ( !arg9 )
5711 SWIG_fail;
5712 for ( i = 0; i < Xlen; i++ )
5713 arg9[i] = NULL;
5714
5715 for ( i = 0; i < Xlen; i++ )
5716 {
5717 arg9[i] = LUA_ALLOC_ARRAY( PLFLT, Ylen );
5718 if ( !arg9[i] )
5719 SWIG_fail;
5720 }
5721 }
5722 arg10 = (PLINT)lua_tonumber(L, 6);
5723 arg11 = (PLFLT)lua_tonumber(L, 7);
5724 plgriddata((double const *)arg1,(double const *)arg2,(double const *)arg3,arg4,(double const *)arg5,arg6,(double const *)arg7,arg8,arg9,arg10,arg11);
5725
5726 {
5727 int i;
5728
5729 if ( arg9 )
5730 {
5731 lua_newtable( L );
5732 for ( i = 0; i < Xlen; i++ )
5733 {
5734 SWIG_write_double_num_array( L, arg9[i], Ylen );
5735 lua_rawseti( L, -2, i + 1 ); // -1 is the inner table, -2 is the outer table
5736 }
5737 SWIG_arg++;
5738 }
5739 }
5740 {
5741 LUA_FREE_ARRAY( arg1 );
5742 }
5743 {
5744 LUA_FREE_ARRAY( arg2 );
5745 }
5746 {
5747 LUA_FREE_ARRAY( arg3 );
5748 }
5749 {
5750 LUA_FREE_ARRAY( arg5 );
5751 }
5752 {
5753 int i;
5754
5755 LUA_FREE_ARRAY( arg7 );
5756
5757 if ( arg9 )
5758 {
5759 for ( i = 0; i < Xlen; i++ )
5760 LUA_FREE_ARRAY( arg9[i] );
5761 LUA_FREE_ARRAY( arg9 );
5762 }
5763 }
5764 return SWIG_arg;
5765
5766 fail: SWIGUNUSED;
5767 {
5768 LUA_FREE_ARRAY( arg1 );
5769 }
5770 {
5771 LUA_FREE_ARRAY( arg2 );
5772 }
5773 {
5774 LUA_FREE_ARRAY( arg3 );
5775 }
5776 {
5777 LUA_FREE_ARRAY( arg5 );
5778 }
5779 {
5780 int i;
5781
5782 LUA_FREE_ARRAY( arg7 );
5783
5784 if ( arg9 )
5785 {
5786 for ( i = 0; i < Xlen; i++ )
5787 LUA_FREE_ARRAY( arg9[i] );
5788 LUA_FREE_ARRAY( arg9 );
5789 }
5790 }
5791 lua_error(L);
5792 return 0;
5793}
5794
5795
5796static int _wrap_gspa(lua_State* L) {
5797 int SWIG_arg = 0;
5798 PLFLT *arg1 = 0 ;
5799 PLFLT *arg2 = 0 ;
5800 PLFLT *arg3 = 0 ;
5801 PLFLT *arg4 = 0 ;
5802 PLFLT temp1 ;
5803 PLFLT temp2 ;
5804 PLFLT temp3 ;
5805 PLFLT temp4 ;
5806
5807 arg1 = &temp1;
5808 arg2 = &temp2;
5809 arg3 = &temp3;
5810 arg4 = &temp4;
5811 SWIG_check_num_args("plgspa",0,0)
5812 plgspa(arg1,arg2,arg3,arg4);
5813
5814 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5815 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5816 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5817 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5818 return SWIG_arg;
5819
5820 fail: SWIGUNUSED;
5821 lua_error(L);
5822 return 0;
5823}
5824
5825
5826static int _wrap_gstrm(lua_State* L) {
5827 int SWIG_arg = 0;
5828 PLINT *arg1 = 0 ;
5829 PLINT temp1 ;
5830
5831 arg1 = &temp1;
5832 SWIG_check_num_args("plgstrm",0,0)
5833 plgstrm(arg1);
5834
5835 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5836 return SWIG_arg;
5837
5838 fail: SWIGUNUSED;
5839 lua_error(L);
5840 return 0;
5841}
5842
5843
5844static int _wrap_gver(lua_State* L) {
5845 int SWIG_arg = 0;
5846 char *arg1 = 0 ;
5847 char buff1[1000] ;
5848
5849 {
5850 arg1 = buff1;
5851 }
5852 SWIG_check_num_args("plgver",0,0)
5853 plgver(arg1);
5854
5855 {
5856 lua_pushstring( L, arg1 );
5857 SWIG_arg++;
5858 }
5859 return SWIG_arg;
5860
5861 fail: SWIGUNUSED;
5862 lua_error(L);
5863 return 0;
5864}
5865
5866
5867static int _wrap_gvpd(lua_State* L) {
5868 int SWIG_arg = 0;
5869 PLFLT *arg1 = 0 ;
5870 PLFLT *arg2 = 0 ;
5871 PLFLT *arg3 = 0 ;
5872 PLFLT *arg4 = 0 ;
5873 PLFLT temp1 ;
5874 PLFLT temp2 ;
5875 PLFLT temp3 ;
5876 PLFLT temp4 ;
5877
5878 arg1 = &temp1;
5879 arg2 = &temp2;
5880 arg3 = &temp3;
5881 arg4 = &temp4;
5882 SWIG_check_num_args("plgvpd",0,0)
5883 plgvpd(arg1,arg2,arg3,arg4);
5884
5885 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5886 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5887 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5888 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5889 return SWIG_arg;
5890
5891 fail: SWIGUNUSED;
5892 lua_error(L);
5893 return 0;
5894}
5895
5896
5897static int _wrap_gvpw(lua_State* L) {
5898 int SWIG_arg = 0;
5899 PLFLT *arg1 = 0 ;
5900 PLFLT *arg2 = 0 ;
5901 PLFLT *arg3 = 0 ;
5902 PLFLT *arg4 = 0 ;
5903 PLFLT temp1 ;
5904 PLFLT temp2 ;
5905 PLFLT temp3 ;
5906 PLFLT temp4 ;
5907
5908 arg1 = &temp1;
5909 arg2 = &temp2;
5910 arg3 = &temp3;
5911 arg4 = &temp4;
5912 SWIG_check_num_args("plgvpw",0,0)
5913 plgvpw(arg1,arg2,arg3,arg4);
5914
5915 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5916 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5917 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5918 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5919 return SWIG_arg;
5920
5921 fail: SWIGUNUSED;
5922 lua_error(L);
5923 return 0;
5924}
5925
5926
5927static int _wrap_gxax(lua_State* L) {
5928 int SWIG_arg = 0;
5929 PLINT *arg1 = 0 ;
5930 PLINT *arg2 = 0 ;
5931 PLINT temp1 ;
5932 PLINT temp2 ;
5933
5934 arg1 = &temp1;
5935 arg2 = &temp2;
5936 SWIG_check_num_args("plgxax",0,0)
5937 plgxax(arg1,arg2);
5938
5939 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5940 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5941 return SWIG_arg;
5942
5943 fail: SWIGUNUSED;
5944 lua_error(L);
5945 return 0;
5946}
5947
5948
5949static int _wrap_gyax(lua_State* L) {
5950 int SWIG_arg = 0;
5951 PLINT *arg1 = 0 ;
5952 PLINT *arg2 = 0 ;
5953 PLINT temp1 ;
5954 PLINT temp2 ;
5955
5956 arg1 = &temp1;
5957 arg2 = &temp2;
5958 SWIG_check_num_args("plgyax",0,0)
5959 plgyax(arg1,arg2);
5960
5961 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5962 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5963 return SWIG_arg;
5964
5965 fail: SWIGUNUSED;
5966 lua_error(L);
5967 return 0;
5968}
5969
5970
5971static int _wrap_gzax(lua_State* L) {
5972 int SWIG_arg = 0;
5973 PLINT *arg1 = 0 ;
5974 PLINT *arg2 = 0 ;
5975 PLINT temp1 ;
5976 PLINT temp2 ;
5977
5978 arg1 = &temp1;
5979 arg2 = &temp2;
5980 SWIG_check_num_args("plgzax",0,0)
5981 plgzax(arg1,arg2);
5982
5983 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5984 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5985 return SWIG_arg;
5986
5987 fail: SWIGUNUSED;
5988 lua_error(L);
5989 return 0;
5990}
5991
5992
5993static int _wrap_hist(lua_State* L) {
5994 int SWIG_arg = 0;
5995 PLINT arg1 ;
5996 PLFLT *arg2 = 0 ;
5997 PLFLT arg3 ;
5998 PLFLT arg4 ;
5999 PLINT arg5 ;
6000 PLINT arg6 ;
6001
6002 SWIG_check_num_args("plhist",5,5)
6003 if(!lua_isnumber(L,2)) SWIG_fail_arg("plhist",2,"PLFLT");
6004 if(!lua_isnumber(L,3)) SWIG_fail_arg("plhist",3,"PLFLT");
6005 if(!lua_isnumber(L,4)) SWIG_fail_arg("plhist",4,"PLINT");
6006 if(!lua_isnumber(L,5)) SWIG_fail_arg("plhist",5,"PLINT");
6007 {
6008 int temp;
6009 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6010 if ( !arg2 )
6011 SWIG_fail;
6012 arg1 = Alen = temp;
6013 }
6014 arg3 = (PLFLT)lua_tonumber(L, 2);
6015 arg4 = (PLFLT)lua_tonumber(L, 3);
6016 arg5 = (PLINT)lua_tonumber(L, 4);
6017 arg6 = (PLINT)lua_tonumber(L, 5);
6018 plhist(arg1,(double const *)arg2,arg3,arg4,arg5,arg6);
6019
6020 {
6021 LUA_FREE_ARRAY( arg2 );
6022 }
6023 return SWIG_arg;
6024
6025 fail: SWIGUNUSED;
6026 {
6027 LUA_FREE_ARRAY( arg2 );
6028 }
6029 lua_error(L);
6030 return 0;
6031}
6032
6033
6034static int _wrap_hlsrgb(lua_State* L) {
6035 int SWIG_arg = 0;
6036 PLFLT arg1 ;
6037 PLFLT arg2 ;
6038 PLFLT arg3 ;
6039 PLFLT *arg4 = 0 ;
6040 PLFLT *arg5 = 0 ;
6041 PLFLT *arg6 = 0 ;
6042 PLFLT temp4 ;
6043 PLFLT temp5 ;
6044 PLFLT temp6 ;
6045
6046 arg4 = &temp4;
6047 arg5 = &temp5;
6048 arg6 = &temp6;
6049 SWIG_check_num_args("plhlsrgb",3,3)
6050 if(!lua_isnumber(L,1)) SWIG_fail_arg("plhlsrgb",1,"PLFLT");
6051 if(!lua_isnumber(L,2)) SWIG_fail_arg("plhlsrgb",2,"PLFLT");
6052 if(!lua_isnumber(L,3)) SWIG_fail_arg("plhlsrgb",3,"PLFLT");
6053 arg1 = (PLFLT)lua_tonumber(L, 1);
6054 arg2 = (PLFLT)lua_tonumber(L, 2);
6055 arg3 = (PLFLT)lua_tonumber(L, 3);
6056 plhlsrgb(arg1,arg2,arg3,arg4,arg5,arg6);
6057
6058 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
6059 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
6060 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
6061 return SWIG_arg;
6062
6063 fail: SWIGUNUSED;
6064 lua_error(L);
6065 return 0;
6066}
6067
6068
6069static int _wrap_init(lua_State* L) {
6070 int SWIG_arg = 0;
6071
6072 SWIG_check_num_args("plinit",0,0)
6073 plinit();
6074
6075 return SWIG_arg;
6076
6077 fail: SWIGUNUSED;
6078 lua_error(L);
6079 return 0;
6080}
6081
6082
6083static int _wrap_join(lua_State* L) {
6084 int SWIG_arg = 0;
6085 PLFLT arg1 ;
6086 PLFLT arg2 ;
6087 PLFLT arg3 ;
6088 PLFLT arg4 ;
6089
6090 SWIG_check_num_args("pljoin",4,4)
6091 if(!lua_isnumber(L,1)) SWIG_fail_arg("pljoin",1,"PLFLT");
6092 if(!lua_isnumber(L,2)) SWIG_fail_arg("pljoin",2,"PLFLT");
6093 if(!lua_isnumber(L,3)) SWIG_fail_arg("pljoin",3,"PLFLT");
6094 if(!lua_isnumber(L,4)) SWIG_fail_arg("pljoin",4,"PLFLT");
6095 arg1 = (PLFLT)lua_tonumber(L, 1);
6096 arg2 = (PLFLT)lua_tonumber(L, 2);
6097 arg3 = (PLFLT)lua_tonumber(L, 3);
6098 arg4 = (PLFLT)lua_tonumber(L, 4);
6099 pljoin(arg1,arg2,arg3,arg4);
6100
6101 return SWIG_arg;
6102
6103 fail: SWIGUNUSED;
6104 lua_error(L);
6105 return 0;
6106}
6107
6108
6109static int _wrap_lab(lua_State* L) {
6110 int SWIG_arg = 0;
6111 char *arg1 = 0 ;
6112 char *arg2 = 0 ;
6113 char *arg3 = 0 ;
6114
6115 SWIG_check_num_args("pllab",3,3)
6116 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("pllab",1,"char const *");
6117 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("pllab",2,"char const *");
6118 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("pllab",3,"char const *");
6119 arg1 = (char *)lua_tostring(L, 1);
6120 arg2 = (char *)lua_tostring(L, 2);
6121 arg3 = (char *)lua_tostring(L, 3);
6122 pllab((char const *)arg1,(char const *)arg2,(char const *)arg3);
6123
6124 return SWIG_arg;
6125
6126 fail: SWIGUNUSED;
6127 lua_error(L);
6128 return 0;
6129}
6130
6131
6132static int _wrap_legend(lua_State* L) {
6133 int SWIG_arg = 0;
6134 PLFLT *arg1 = 0 ;
6135 PLFLT *arg2 = 0 ;
6136 PLINT arg3 ;
6137 PLINT arg4 ;
6138 PLFLT arg5 ;
6139 PLFLT arg6 ;
6140 PLFLT arg7 ;
6141 PLINT arg8 ;
6142 PLINT arg9 ;
6143 PLINT arg10 ;
6144 PLINT arg11 ;
6145 PLINT arg12 ;
6146 PLINT arg13 ;
6147 PLINT *arg14 = 0 ;
6148 PLFLT arg15 ;
6149 PLFLT arg16 ;
6150 PLFLT arg17 ;
6151 PLFLT arg18 ;
6152 PLINT *arg19 = 0 ;
6153 char **arg20 = 0 ;
6154 PLINT *arg21 = 0 ;
6155 PLINT *arg22 = 0 ;
6156 PLFLT *arg23 = 0 ;
6157 PLFLT *arg24 = 0 ;
6158 PLINT *arg25 = 0 ;
6159 PLINT *arg26 = 0 ;
6160 PLFLT *arg27 = 0 ;
6161 PLINT *arg28 = 0 ;
6162 PLFLT *arg29 = 0 ;
6163 PLINT *arg30 = 0 ;
6164 char **arg31 = 0 ;
6165 PLFLT temp1 ;
6166 PLFLT temp2 ;
6167 int temp19 ;
6168 int temp21 ;
6169 int temp22 ;
6170 int temp23 ;
6171 int temp24 ;
6172 int temp25 ;
6173 int temp26 ;
6174 int temp27 ;
6175 int temp28 ;
6176 int temp29 ;
6177 int temp30 ;
6178
6179 {
6180 arg21 = NULL;
6181 }
6182 {
6183 arg22 = NULL;
6184 }
6185 {
6186 arg23 = NULL;
6187 }
6188 {
6189 arg24 = NULL;
6190 }
6191 {
6192 arg25 = NULL;
6193 }
6194 {
6195 arg26 = NULL;
6196 }
6197 {
6198 arg27 = NULL;
6199 }
6200 {
6201 arg28 = NULL;
6202 }
6203 {
6204 arg29 = NULL;
6205 }
6206 {
6207 arg30 = NULL;
6208 }
6209 arg1 = &temp1;
6210 arg2 = &temp2;
6211 SWIG_check_num_args("pllegend",17,28)
6212 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllegend",1,"PLINT");
6213 if(!lua_isnumber(L,2)) SWIG_fail_arg("pllegend",2,"PLINT");
6214 if(!lua_isnumber(L,3)) SWIG_fail_arg("pllegend",3,"PLFLT");
6215 if(!lua_isnumber(L,4)) SWIG_fail_arg("pllegend",4,"PLFLT");
6216 if(!lua_isnumber(L,5)) SWIG_fail_arg("pllegend",5,"PLFLT");
6217 if(!lua_isnumber(L,6)) SWIG_fail_arg("pllegend",6,"PLINT");
6218 if(!lua_isnumber(L,7)) SWIG_fail_arg("pllegend",7,"PLINT");
6219 if(!lua_isnumber(L,8)) SWIG_fail_arg("pllegend",8,"PLINT");
6220 if(!lua_isnumber(L,9)) SWIG_fail_arg("pllegend",9,"PLINT");
6221 if(!lua_isnumber(L,10)) SWIG_fail_arg("pllegend",10,"PLINT");
6222 if(!lua_isnumber(L,12)) SWIG_fail_arg("pllegend",12,"PLFLT");
6223 if(!lua_isnumber(L,13)) SWIG_fail_arg("pllegend",13,"PLFLT");
6224 if(!lua_isnumber(L,14)) SWIG_fail_arg("pllegend",14,"PLFLT");
6225 if(!lua_isnumber(L,15)) SWIG_fail_arg("pllegend",15,"PLFLT");
6226 if(!lua_istable(L,17)) SWIG_fail_arg("pllegend",17,"char const **");
6227 if(lua_gettop(L)>=28 && !lua_istable(L,28)) SWIG_fail_arg("pllegend",28,"char const **");
6228 arg3 = (PLINT)lua_tonumber(L, 1);
6229 arg4 = (PLINT)lua_tonumber(L, 2);
6230 arg5 = (PLFLT)lua_tonumber(L, 3);
6231 arg6 = (PLFLT)lua_tonumber(L, 4);
6232 arg7 = (PLFLT)lua_tonumber(L, 5);
6233 arg8 = (PLINT)lua_tonumber(L, 6);
6234 arg9 = (PLINT)lua_tonumber(L, 7);
6235 arg10 = (PLINT)lua_tonumber(L, 8);
6236 arg11 = (PLINT)lua_tonumber(L, 9);
6237 arg12 = (PLINT)lua_tonumber(L, 10);
6238 {
6239 arg14 = (PLINT *) LUA_get_int_num_array_var( L, 11, &arg13 );
6240 if ( !arg14 )
6241 SWIG_fail;
6242 Alen = arg13;
6243 }
6244 arg15 = (PLFLT)lua_tonumber(L, 12);
6245 arg16 = (PLFLT)lua_tonumber(L, 13);
6246 arg17 = (PLFLT)lua_tonumber(L, 14);
6247 arg18 = (PLFLT)lua_tonumber(L, 15);
6248 {
6249 arg19 = (PLINT *) LUA_get_int_num_array_var( L, 16, &temp19 );
6250 if ( !arg19 )
6251 SWIG_fail;
6252 if ( temp19 != Alen )
6253 {
6254 lua_pushfstring( L, "Tables must be of same length." );
6255 SWIG_fail;
6256 }
6257 }
6258 {
6259 int i;
6260 arg20 = NULL;
6261
6262 if ( SWIG_table_size( L, 17 ) != Alen )
6263 {
6264 lua_pushfstring( L, "Tables must be of same length." );
6265 SWIG_fail;
6266 }
6267 arg20 = malloc( sizeof ( char* ) * Alen );
6268 for ( i = 1; i <= Alen; i++ )
6269 {
6270 lua_rawgeti( L, 17, i );
6271 if ( lua_isstring( L, -1 ) )
6272 {
6273 arg20[i - 1] = (char *) lua_tostring( L, -1 );
6274 }
6275 else
6276 {
6277 lua_pop( L, 1 );
6278 lua_pushfstring( L, "Requires a sequence of strings." );
6279 SWIG_fail;
6280 // arg20 array is freed after 'fail:'
6281 }
6282 lua_pop( L, 1 );
6283 }
6284 }
6285 if(lua_gettop(L)>=18){
6286 {
6287 if ( lua_isnil( L, 18 ) )
6288 {
6289 arg21 = NULL;
6290 }
6291 else
6292 {
6293 arg21 = (PLINT *) LUA_get_int_num_array_var( L, 18, &temp21 );
6294 if ( !arg21 )
6295 SWIG_fail;
6296 if ( temp21 != Alen )
6297 {
6298 lua_pushfstring( L, "Tables must be of same length." );
6299 SWIG_fail;
6300 }
6301 }
6302 }
6303 }
6304 if(lua_gettop(L)>=19){
6305 {
6306 if ( lua_isnil( L, 19 ) )
6307 {
6308 arg22 = NULL;
6309 }
6310 else
6311 {
6312 arg22 = (PLINT *) LUA_get_int_num_array_var( L, 19, &temp22 );
6313 if ( !arg22 )
6314 SWIG_fail;
6315 if ( temp22 != Alen )
6316 {
6317 lua_pushfstring( L, "Tables must be of same length." );
6318 SWIG_fail;
6319 }
6320 }
6321 }
6322 }
6323 if(lua_gettop(L)>=20){
6324 {
6325 if ( lua_isnil( L, 20 ) )
6326 {
6327 arg23 = NULL;
6328 }
6329 else
6330 {
6331 arg23 = (PLFLT *) LUA_get_double_num_array_var( L, 20, &temp23 );
6332 if ( !arg23 )
6333 SWIG_fail;
6334 if ( temp23 != Alen )
6335 {
6336 lua_pushfstring( L, "Tables must be of same length." );
6337 SWIG_fail;
6338 }
6339 }
6340 }
6341 }
6342 if(lua_gettop(L)>=21){
6343 {
6344 if ( lua_isnil( L, 21 ) )
6345 {
6346 arg24 = NULL;
6347 }
6348 else
6349 {
6350 arg24 = (PLFLT *) LUA_get_double_num_array_var( L, 21, &temp24 );
6351 if ( !arg24 )
6352 SWIG_fail;
6353 if ( temp24 != Alen )
6354 {
6355 lua_pushfstring( L, "Tables must be of same length." );
6356 SWIG_fail;
6357 }
6358 }
6359 }
6360 }
6361 if(lua_gettop(L)>=22){
6362 {
6363 if ( lua_isnil( L, 22 ) )
6364 {
6365 arg25 = NULL;
6366 }
6367 else
6368 {
6369 arg25 = (PLINT *) LUA_get_int_num_array_var( L, 22, &temp25 );
6370 if ( !arg25 )
6371 SWIG_fail;
6372 if ( temp25 != Alen )
6373 {
6374 lua_pushfstring( L, "Tables must be of same length." );
6375 SWIG_fail;
6376 }
6377 }
6378 }
6379 }
6380 if(lua_gettop(L)>=23){
6381 {
6382 if ( lua_isnil( L, 23 ) )
6383 {
6384 arg26 = NULL;
6385 }
6386 else
6387 {
6388 arg26 = (PLINT *) LUA_get_int_num_array_var( L, 23, &temp26 );
6389 if ( !arg26 )
6390 SWIG_fail;
6391 if ( temp26 != Alen )
6392 {
6393 lua_pushfstring( L, "Tables must be of same length." );
6394 SWIG_fail;
6395 }
6396 }
6397 }
6398 }
6399 if(lua_gettop(L)>=24){
6400 {
6401 if ( lua_isnil( L, 24 ) )
6402 {
6403 arg27 = NULL;
6404 }
6405 else
6406 {
6407 arg27 = (PLFLT *) LUA_get_double_num_array_var( L, 24, &temp27 );
6408 if ( !arg27 )
6409 SWIG_fail;
6410 if ( temp27 != Alen )
6411 {
6412 lua_pushfstring( L, "Tables must be of same length." );
6413 SWIG_fail;
6414 }
6415 }
6416 }
6417 }
6418 if(lua_gettop(L)>=25){
6419 {
6420 if ( lua_isnil( L, 25 ) )
6421 {
6422 arg28 = NULL;
6423 }
6424 else
6425 {
6426 arg28 = (PLINT *) LUA_get_int_num_array_var( L, 25, &temp28 );
6427 if ( !arg28 )
6428 SWIG_fail;
6429 if ( temp28 != Alen )
6430 {
6431 lua_pushfstring( L, "Tables must be of same length." );
6432 SWIG_fail;
6433 }
6434 }
6435 }
6436 }
6437 if(lua_gettop(L)>=26){
6438 {
6439 if ( lua_isnil( L, 26 ) )
6440 {
6441 arg29 = NULL;
6442 }
6443 else
6444 {
6445 arg29 = (PLFLT *) LUA_get_double_num_array_var( L, 26, &temp29 );
6446 if ( !arg29 )
6447 SWIG_fail;
6448 if ( temp29 != Alen )
6449 {
6450 lua_pushfstring( L, "Tables must be of same length." );
6451 SWIG_fail;
6452 }
6453 }
6454 }
6455 }
6456 if(lua_gettop(L)>=27){
6457 {
6458 if ( lua_isnil( L, 27 ) )
6459 {
6460 arg30 = NULL;
6461 }
6462 else
6463 {
6464 arg30 = (PLINT *) LUA_get_int_num_array_var( L, 27, &temp30 );
6465 if ( !arg30 )
6466 SWIG_fail;
6467 if ( temp30 != Alen )
6468 {
6469 lua_pushfstring( L, "Tables must be of same length." );
6470 SWIG_fail;
6471 }
6472 }
6473 }
6474 }
6475 if(lua_gettop(L)>=28){
6476 {
6477 int i;
6478 arg31 = NULL;
6479
6480 if ( SWIG_table_size( L, 28 ) != Alen )
6481 {
6482 lua_pushfstring( L, "Tables must be of same length." );
6483 SWIG_fail;
6484 }
6485 arg31 = malloc( sizeof ( char* ) * Alen );
6486 for ( i = 1; i <= Alen; i++ )
6487 {
6488 lua_rawgeti( L, 28, i );
6489 if ( lua_isstring( L, -1 ) )
6490 {
6491 arg31[i - 1] = (char *) lua_tostring( L, -1 );
6492 }
6493 else
6494 {
6495 lua_pop( L, 1 );
6496 lua_pushfstring( L, "Requires a sequence of strings." );
6497 SWIG_fail;
6498 // arg31 array is freed after 'fail:'
6499 }
6500 lua_pop( L, 1 );
6501 }
6502 }
6503 }
6504 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);
6505
6506 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6507 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
6508 {
6509 LUA_FREE_ARRAY( arg14 );
6510 }
6511 {
6512 LUA_FREE_ARRAY( arg19 );
6513 }
6514 {
6515 if ( arg20 )
6516 {
6517 free( arg20 ); arg20 = NULL;
6518 }
6519 }
6520 {
6521 LUA_FREE_ARRAY( arg21 );
6522 }
6523 {
6524 LUA_FREE_ARRAY( arg22 );
6525 }
6526 {
6527 LUA_FREE_ARRAY( arg23 );
6528 }
6529 {
6530 LUA_FREE_ARRAY( arg24 );
6531 }
6532 {
6533 LUA_FREE_ARRAY( arg25 );
6534 }
6535 {
6536 LUA_FREE_ARRAY( arg26 );
6537 }
6538 {
6539 LUA_FREE_ARRAY( arg27 );
6540 }
6541 {
6542 LUA_FREE_ARRAY( arg28 );
6543 }
6544 {
6545 LUA_FREE_ARRAY( arg29 );
6546 }
6547 {
6548 LUA_FREE_ARRAY( arg30 );
6549 }
6550 {
6551 if ( arg31 )
6552 {
6553 free( arg31 ); arg31 = NULL;
6554 }
6555 }
6556 return SWIG_arg;
6557
6558 fail: SWIGUNUSED;
6559 {
6560 LUA_FREE_ARRAY( arg14 );
6561 }
6562 {
6563 LUA_FREE_ARRAY( arg19 );
6564 }
6565 {
6566 if ( arg20 )
6567 {
6568 free( arg20 ); arg20 = NULL;
6569 }
6570 }
6571 {
6572 LUA_FREE_ARRAY( arg21 );
6573 }
6574 {
6575 LUA_FREE_ARRAY( arg22 );
6576 }
6577 {
6578 LUA_FREE_ARRAY( arg23 );
6579 }
6580 {
6581 LUA_FREE_ARRAY( arg24 );
6582 }
6583 {
6584 LUA_FREE_ARRAY( arg25 );
6585 }
6586 {
6587 LUA_FREE_ARRAY( arg26 );
6588 }
6589 {
6590 LUA_FREE_ARRAY( arg27 );
6591 }
6592 {
6593 LUA_FREE_ARRAY( arg28 );
6594 }
6595 {
6596 LUA_FREE_ARRAY( arg29 );
6597 }
6598 {
6599 LUA_FREE_ARRAY( arg30 );
6600 }
6601 {
6602 if ( arg31 )
6603 {
6604 free( arg31 ); arg31 = NULL;
6605 }
6606 }
6607 lua_error(L);
6608 return 0;
6609}
6610
6611
6612static int _wrap_colorbar(lua_State* L) {
6613 int SWIG_arg = 0;
6614 PLFLT *arg1 = 0 ;
6615 PLFLT *arg2 = 0 ;
6616 PLINT arg3 ;
6617 PLINT arg4 ;
6618 PLFLT arg5 ;
6619 PLFLT arg6 ;
6620 PLFLT arg7 ;
6621 PLFLT arg8 ;
6622 PLINT arg9 ;
6623 PLINT arg10 ;
6624 PLINT arg11 ;
6625 PLFLT arg12 ;
6626 PLFLT arg13 ;
6627 PLINT arg14 ;
6628 PLFLT arg15 ;
6629 PLINT arg16 ;
6630 PLINT *arg17 = 0 ;
6631 char **arg18 = 0 ;
6632 PLINT arg19 ;
6633 char **arg20 = 0 ;
6634 PLFLT *arg21 = 0 ;
6635 PLINT *arg22 = 0 ;
6636 PLINT *arg23 = 0 ;
6637 PLFLT **arg24 = 0 ;
6638 PLFLT temp1 ;
6639 PLFLT temp2 ;
6640 int temp21 ;
6641 int temp22 ;
6642 int temp23 ;
6643 int ii24 ;
6644
6645 arg1 = &temp1;
6646 arg2 = &temp2;
6647 SWIG_check_num_args("plcolorbar",20,20)
6648 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcolorbar",1,"PLINT");
6649 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcolorbar",2,"PLINT");
6650 if(!lua_isnumber(L,3)) SWIG_fail_arg("plcolorbar",3,"PLFLT");
6651 if(!lua_isnumber(L,4)) SWIG_fail_arg("plcolorbar",4,"PLFLT");
6652 if(!lua_isnumber(L,5)) SWIG_fail_arg("plcolorbar",5,"PLFLT");
6653 if(!lua_isnumber(L,6)) SWIG_fail_arg("plcolorbar",6,"PLFLT");
6654 if(!lua_isnumber(L,7)) SWIG_fail_arg("plcolorbar",7,"PLINT");
6655 if(!lua_isnumber(L,8)) SWIG_fail_arg("plcolorbar",8,"PLINT");
6656 if(!lua_isnumber(L,9)) SWIG_fail_arg("plcolorbar",9,"PLINT");
6657 if(!lua_isnumber(L,10)) SWIG_fail_arg("plcolorbar",10,"PLFLT");
6658 if(!lua_isnumber(L,11)) SWIG_fail_arg("plcolorbar",11,"PLFLT");
6659 if(!lua_isnumber(L,12)) SWIG_fail_arg("plcolorbar",12,"PLINT");
6660 if(!lua_isnumber(L,13)) SWIG_fail_arg("plcolorbar",13,"PLFLT");
6661 if(!lua_istable(L,15)) SWIG_fail_arg("plcolorbar",15,"char const **");
6662 arg3 = (PLINT)lua_tonumber(L, 1);
6663 arg4 = (PLINT)lua_tonumber(L, 2);
6664 arg5 = (PLFLT)lua_tonumber(L, 3);
6665 arg6 = (PLFLT)lua_tonumber(L, 4);
6666 arg7 = (PLFLT)lua_tonumber(L, 5);
6667 arg8 = (PLFLT)lua_tonumber(L, 6);
6668 arg9 = (PLINT)lua_tonumber(L, 7);
6669 arg10 = (PLINT)lua_tonumber(L, 8);
6670 arg11 = (PLINT)lua_tonumber(L, 9);
6671 arg12 = (PLFLT)lua_tonumber(L, 10);
6672 arg13 = (PLFLT)lua_tonumber(L, 11);
6673 arg14 = (PLINT)lua_tonumber(L, 12);
6674 arg15 = (PLFLT)lua_tonumber(L, 13);
6675 {
6676 arg17 = (PLINT *) LUA_get_int_num_array_var( L, 14, &arg16 );
6677 if ( !arg17 )
6678 SWIG_fail;
6679 Alen = arg16;
6680 }
6681 {
6682 int i;
6683 arg18 = NULL;
6684
6685 if ( SWIG_table_size( L, 15 ) != Alen )
6686 {
6687 lua_pushfstring( L, "Tables must be of same length." );
6688 SWIG_fail;
6689 }
6690 arg18 = malloc( sizeof ( char* ) * Alen );
6691 for ( i = 1; i <= Alen; i++ )
6692 {
6693 lua_rawgeti( L, 15, i );
6694 if ( lua_isstring( L, -1 ) )
6695 {
6696 arg18[i - 1] = (char *) lua_tostring( L, -1 );
6697 }
6698 else
6699 {
6700 lua_pop( L, 1 );
6701 lua_pushfstring( L, "Requires a sequence of strings." );
6702 SWIG_fail;
6703 // arg18 array is freed after 'fail:'
6704 }
6705 lua_pop( L, 1 );
6706 }
6707 }
6708 {
6709 int i;
6710 arg19 = SWIG_table_size( L, 16 );
6711 Alen = arg19;
6712
6713 arg20 = malloc( sizeof ( char* ) * Alen );
6714 for ( i = 1; i <= Alen; i++ )
6715 {
6716 lua_rawgeti( L, 16, i );
6717 if ( lua_isstring( L, -1 ) )
6718 {
6719 arg20[i - 1] = (char *) lua_tostring( L, -1 );
6720 }
6721 else
6722 {
6723 lua_pop( L, 1 );
6724 lua_pushfstring( L, "Requires a sequence of strings." );
6725 SWIG_fail;
6726 }
6727 lua_pop( L, 1 );
6728 }
6729 }
6730 {
6731 arg21 = (PLFLT *) LUA_get_double_num_array_var( L, 17, &temp21 );
6732 if ( !arg21 )
6733 SWIG_fail;
6734 if ( temp21 != Alen )
6735 {
6736 lua_pushfstring( L, "Tables must be of same length." );
6737 SWIG_fail;
6738 }
6739 }
6740 {
6741 arg22 = (PLINT *) LUA_get_int_num_array_var( L, 18, &temp22 );
6742 if ( !arg22 )
6743 SWIG_fail;
6744 if ( temp22 != Alen )
6745 {
6746 lua_pushfstring( L, "Tables must be of same length." );
6747 SWIG_fail;
6748 }
6749 }
6750 {
6751 int i;
6752
6753 arg23 = (PLINT *) LUA_get_int_num_array_var( L, 19, &temp23 );
6754 if ( !arg23 )
6755 SWIG_fail;
6756 if ( temp23 != Alen )
6757 {
6758 lua_pushfstring( L, "Tables must be of same length." );
6759 SWIG_fail;
6760 }
6761
6762 Xlen = temp23;
6763 Ylen = -1;
6764 for ( i = 0; i < Xlen; i++ )
6765 if ( arg23[i] > Ylen )
6766 Ylen = arg23[i];
6767 }
6768 {
6769 int jj;
6770
6771 arg24 = read_double_Matrix( L, 20, &ii24, &jj );
6772 if ( !arg24 )
6773 SWIG_fail;
6774 if ( ( ii24 != Xlen ) || ( jj != Ylen ) )
6775 {
6776 lua_pushfstring( L, "Vectors must match matrix." );
6777 SWIG_fail;
6778 }
6779 }
6780 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);
6781
6782 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6783 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
6784 {
6785 LUA_FREE_ARRAY( arg17 );
6786 }
6787 {
6788 if ( arg18 )
6789 {
6790 free( arg18 ); arg18 = NULL;
6791 }
6792 }
6793 {
6794 if ( arg20 )
6795 {
6796 free( arg20 ); arg20 = NULL;
6797 }
6798 }
6799 {
6800 LUA_FREE_ARRAY( arg21 );
6801 }
6802 {
6803 LUA_FREE_ARRAY( arg22 );
6804 }
6805 {
6806 LUA_FREE_ARRAY( arg23 );
6807 }
6808 {
6809 int i;
6810
6811 if ( arg24 )
6812 {
6813 for ( i = 0; i < ii24; i++ )
6814 LUA_FREE_ARRAY( arg24[i] );
6815 LUA_FREE_ARRAY( arg24 );
6816 }
6817 }
6818 return SWIG_arg;
6819
6820 fail: SWIGUNUSED;
6821 {
6822 LUA_FREE_ARRAY( arg17 );
6823 }
6824 {
6825 if ( arg18 )
6826 {
6827 free( arg18 ); arg18 = NULL;
6828 }
6829 }
6830 {
6831 if ( arg20 )
6832 {
6833 free( arg20 ); arg20 = NULL;
6834 }
6835 }
6836 {
6837 LUA_FREE_ARRAY( arg21 );
6838 }
6839 {
6840 LUA_FREE_ARRAY( arg22 );
6841 }
6842 {
6843 LUA_FREE_ARRAY( arg23 );
6844 }
6845 {
6846 int i;
6847
6848 if ( arg24 )
6849 {
6850 for ( i = 0; i < ii24; i++ )
6851 LUA_FREE_ARRAY( arg24[i] );
6852 LUA_FREE_ARRAY( arg24 );
6853 }
6854 }
6855 lua_error(L);
6856 return 0;
6857}
6858
6859
6860static int _wrap_lightsource(lua_State* L) {
6861 int SWIG_arg = 0;
6862 PLFLT arg1 ;
6863 PLFLT arg2 ;
6864 PLFLT arg3 ;
6865
6866 SWIG_check_num_args("pllightsource",3,3)
6867 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllightsource",1,"PLFLT");
6868 if(!lua_isnumber(L,2)) SWIG_fail_arg("pllightsource",2,"PLFLT");
6869 if(!lua_isnumber(L,3)) SWIG_fail_arg("pllightsource",3,"PLFLT");
6870 arg1 = (PLFLT)lua_tonumber(L, 1);
6871 arg2 = (PLFLT)lua_tonumber(L, 2);
6872 arg3 = (PLFLT)lua_tonumber(L, 3);
6873 pllightsource(arg1,arg2,arg3);
6874
6875 return SWIG_arg;
6876
6877 fail: SWIGUNUSED;
6878 lua_error(L);
6879 return 0;
6880}
6881
6882
6883static int _wrap_line(lua_State* L) {
6884 int SWIG_arg = 0;
6885 PLINT arg1 ;
6886 PLFLT *arg2 = 0 ;
6887 PLFLT *arg3 = 0 ;
6888 int temp3 ;
6889
6890 SWIG_check_num_args("plline",2,2)
6891 {
6892 int temp;
6893 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6894 if ( !arg2 )
6895 SWIG_fail;
6896 arg1 = Alen = temp;
6897 }
6898 {
6899 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
6900 if ( !arg3 )
6901 SWIG_fail;
6902 if ( temp3 != Alen )
6903 {
6904 lua_pushfstring( L, "Tables must be of same length." );
6905 SWIG_fail;
6906 }
6907 }
6908 plline(arg1,(double const *)arg2,(double const *)arg3);
6909
6910 {
6911 LUA_FREE_ARRAY( arg2 );
6912 }
6913 {
6914 LUA_FREE_ARRAY( arg3 );
6915 }
6916 return SWIG_arg;
6917
6918 fail: SWIGUNUSED;
6919 {
6920 LUA_FREE_ARRAY( arg2 );
6921 }
6922 {
6923 LUA_FREE_ARRAY( arg3 );
6924 }
6925 lua_error(L);
6926 return 0;
6927}
6928
6929
6930static int _wrap_line3(lua_State* L) {
6931 int SWIG_arg = 0;
6932 PLINT arg1 ;
6933 PLFLT *arg2 = 0 ;
6934 PLFLT *arg3 = 0 ;
6935 PLFLT *arg4 = 0 ;
6936 int temp3 ;
6937 int temp4 ;
6938
6939 SWIG_check_num_args("plline3",3,3)
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 {
6958 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
6959 if ( !arg4 )
6960 SWIG_fail;
6961 if ( temp4 != Alen )
6962 {
6963 lua_pushfstring( L, "Tables must be of same length." );
6964 SWIG_fail;
6965 }
6966 }
6967 plline3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
6968
6969 {
6970 LUA_FREE_ARRAY( arg2 );
6971 }
6972 {
6973 LUA_FREE_ARRAY( arg3 );
6974 }
6975 {
6976 LUA_FREE_ARRAY( arg4 );
6977 }
6978 return SWIG_arg;
6979
6980 fail: SWIGUNUSED;
6981 {
6982 LUA_FREE_ARRAY( arg2 );
6983 }
6984 {
6985 LUA_FREE_ARRAY( arg3 );
6986 }
6987 {
6988 LUA_FREE_ARRAY( arg4 );
6989 }
6990 lua_error(L);
6991 return 0;
6992}
6993
6994
6995static int _wrap_lsty(lua_State* L) {
6996 int SWIG_arg = 0;
6997 PLINT arg1 ;
6998
6999 SWIG_check_num_args("pllsty",1,1)
7000 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllsty",1,"PLINT");
7001 arg1 = (PLINT)lua_tonumber(L, 1);
7002 pllsty(arg1);
7003
7004 return SWIG_arg;
7005
7006 fail: SWIGUNUSED;
7007 lua_error(L);
7008 return 0;
7009}
7010
7011
7012static int _wrap_mesh(lua_State* L) {
7013 int SWIG_arg = 0;
7014 PLFLT *arg1 = 0 ;
7015 PLFLT *arg2 = 0 ;
7016 PLFLT **arg3 = 0 ;
7017 PLINT arg4 ;
7018 PLINT arg5 ;
7019 PLINT arg6 ;
7020 int ii3 ;
7021
7022 SWIG_check_num_args("plmesh",4,4)
7023 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmesh",4,"PLINT");
7024 {
7025 int temp;
7026 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7027 if ( !arg1 )
7028 SWIG_fail;
7029 Xlen = temp;
7030 }
7031 {
7032 int temp;
7033 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7034 if ( !arg2 )
7035 SWIG_fail;
7036 Ylen = temp;
7037 }
7038 {
7039 int jj;
7040
7041 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7042 if ( !arg3 )
7043 SWIG_fail;
7044 arg4 = ii3;
7045 arg5 = jj;
7046 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7047 {
7048 lua_pushfstring( L, "Vectors must match matrix." );
7049 SWIG_fail;
7050 }
7051 }
7052 arg6 = (PLINT)lua_tonumber(L, 4);
7053 plmesh((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6);
7054
7055 {
7056 LUA_FREE_ARRAY( arg1 );
7057 }
7058 {
7059 LUA_FREE_ARRAY( arg2 );
7060 }
7061 {
7062 int i;
7063
7064 if ( arg3 )
7065 {
7066 for ( i = 0; i < ii3; i++ )
7067 LUA_FREE_ARRAY( arg3[i] );
7068 LUA_FREE_ARRAY( arg3 );
7069 }
7070 }
7071 return SWIG_arg;
7072
7073 fail: SWIGUNUSED;
7074 {
7075 LUA_FREE_ARRAY( arg1 );
7076 }
7077 {
7078 LUA_FREE_ARRAY( arg2 );
7079 }
7080 {
7081 int i;
7082
7083 if ( arg3 )
7084 {
7085 for ( i = 0; i < ii3; i++ )
7086 LUA_FREE_ARRAY( arg3[i] );
7087 LUA_FREE_ARRAY( arg3 );
7088 }
7089 }
7090 lua_error(L);
7091 return 0;
7092}
7093
7094
7095static int _wrap_meshc(lua_State* L) {
7096 int SWIG_arg = 0;
7097 PLFLT *arg1 = 0 ;
7098 PLFLT *arg2 = 0 ;
7099 PLFLT **arg3 = 0 ;
7100 PLINT arg4 ;
7101 PLINT arg5 ;
7102 PLINT arg6 ;
7103 PLFLT *arg7 = 0 ;
7104 PLINT arg8 ;
7105 int ii3 ;
7106
7107 SWIG_check_num_args("plmeshc",5,5)
7108 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmeshc",4,"PLINT");
7109 {
7110 int temp;
7111 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7112 if ( !arg1 )
7113 SWIG_fail;
7114 Xlen = temp;
7115 }
7116 {
7117 int temp;
7118 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7119 if ( !arg2 )
7120 SWIG_fail;
7121 Ylen = temp;
7122 }
7123 {
7124 int jj;
7125
7126 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7127 if ( !arg3 )
7128 SWIG_fail;
7129 arg4 = ii3;
7130 arg5 = jj;
7131 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7132 {
7133 lua_pushfstring( L, "Vectors must match matrix." );
7134 SWIG_fail;
7135 }
7136 }
7137 arg6 = (PLINT)lua_tonumber(L, 4);
7138 {
7139 int temp;
7140 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7141 if ( !arg7 )
7142 SWIG_fail;
7143 arg8 = Alen = temp;
7144 }
7145 plmeshc((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7146
7147 {
7148 LUA_FREE_ARRAY( arg1 );
7149 }
7150 {
7151 LUA_FREE_ARRAY( arg2 );
7152 }
7153 {
7154 int i;
7155
7156 if ( arg3 )
7157 {
7158 for ( i = 0; i < ii3; i++ )
7159 LUA_FREE_ARRAY( arg3[i] );
7160 LUA_FREE_ARRAY( arg3 );
7161 }
7162 }
7163 {
7164 LUA_FREE_ARRAY( arg7 );
7165 }
7166 return SWIG_arg;
7167
7168 fail: SWIGUNUSED;
7169 {
7170 LUA_FREE_ARRAY( arg1 );
7171 }
7172 {
7173 LUA_FREE_ARRAY( arg2 );
7174 }
7175 {
7176 int i;
7177
7178 if ( arg3 )
7179 {
7180 for ( i = 0; i < ii3; i++ )
7181 LUA_FREE_ARRAY( arg3[i] );
7182 LUA_FREE_ARRAY( arg3 );
7183 }
7184 }
7185 {
7186 LUA_FREE_ARRAY( arg7 );
7187 }
7188 lua_error(L);
7189 return 0;
7190}
7191
7192
7193static int _wrap_mkstrm(lua_State* L) {
7194 int SWIG_arg = 0;
7195 PLINT *arg1 = 0 ;
7196 PLINT temp1 ;
7197
7198 arg1 = &temp1;
7199 SWIG_check_num_args("plmkstrm",0,0)
7200 plmkstrm(arg1);
7201
7202 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
7203 return SWIG_arg;
7204
7205 fail: SWIGUNUSED;
7206 lua_error(L);
7207 return 0;
7208}
7209
7210
7211static int _wrap_mtex(lua_State* L) {
7212 int SWIG_arg = 0;
7213 char *arg1 = 0 ;
7214 PLFLT arg2 ;
7215 PLFLT arg3 ;
7216 PLFLT arg4 ;
7217 char *arg5 = 0 ;
7218
7219 SWIG_check_num_args("plmtex",5,5)
7220 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plmtex",1,"char const *");
7221 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmtex",2,"PLFLT");
7222 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmtex",3,"PLFLT");
7223 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmtex",4,"PLFLT");
7224 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plmtex",5,"char const *");
7225 arg1 = (char *)lua_tostring(L, 1);
7226 arg2 = (PLFLT)lua_tonumber(L, 2);
7227 arg3 = (PLFLT)lua_tonumber(L, 3);
7228 arg4 = (PLFLT)lua_tonumber(L, 4);
7229 arg5 = (char *)lua_tostring(L, 5);
7230 plmtex((char const *)arg1,arg2,arg3,arg4,(char const *)arg5);
7231
7232 return SWIG_arg;
7233
7234 fail: SWIGUNUSED;
7235 lua_error(L);
7236 return 0;
7237}
7238
7239
7240static int _wrap_mtex3(lua_State* L) {
7241 int SWIG_arg = 0;
7242 char *arg1 = 0 ;
7243 PLFLT arg2 ;
7244 PLFLT arg3 ;
7245 PLFLT arg4 ;
7246 char *arg5 = 0 ;
7247
7248 SWIG_check_num_args("plmtex3",5,5)
7249 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plmtex3",1,"char const *");
7250 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmtex3",2,"PLFLT");
7251 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmtex3",3,"PLFLT");
7252 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmtex3",4,"PLFLT");
7253 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plmtex3",5,"char const *");
7254 arg1 = (char *)lua_tostring(L, 1);
7255 arg2 = (PLFLT)lua_tonumber(L, 2);
7256 arg3 = (PLFLT)lua_tonumber(L, 3);
7257 arg4 = (PLFLT)lua_tonumber(L, 4);
7258 arg5 = (char *)lua_tostring(L, 5);
7259 plmtex3((char const *)arg1,arg2,arg3,arg4,(char const *)arg5);
7260
7261 return SWIG_arg;
7262
7263 fail: SWIGUNUSED;
7264 lua_error(L);
7265 return 0;
7266}
7267
7268
7269static int _wrap_plot3d(lua_State* L) {
7270 int SWIG_arg = 0;
7271 PLFLT *arg1 = 0 ;
7272 PLFLT *arg2 = 0 ;
7273 PLFLT **arg3 = 0 ;
7274 PLINT arg4 ;
7275 PLINT arg5 ;
7276 PLINT arg6 ;
7277 PLBOOL arg7 ;
7278 int ii3 ;
7279
7280 SWIG_check_num_args("plot3d",5,5)
7281 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3d",4,"PLINT");
7282 if(!lua_isnumber(L,5)) SWIG_fail_arg("plot3d",5,"PLBOOL");
7283 {
7284 int temp;
7285 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7286 if ( !arg1 )
7287 SWIG_fail;
7288 Xlen = temp;
7289 }
7290 {
7291 int temp;
7292 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7293 if ( !arg2 )
7294 SWIG_fail;
7295 Ylen = temp;
7296 }
7297 {
7298 int jj;
7299
7300 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7301 if ( !arg3 )
7302 SWIG_fail;
7303 arg4 = ii3;
7304 arg5 = jj;
7305 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7306 {
7307 lua_pushfstring( L, "Vectors must match matrix." );
7308 SWIG_fail;
7309 }
7310 }
7311 arg6 = (PLINT)lua_tonumber(L, 4);
7312 arg7 = (PLBOOL)lua_tonumber(L, 5);
7313 plot3d((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,arg7);
7314
7315 {
7316 LUA_FREE_ARRAY( arg1 );
7317 }
7318 {
7319 LUA_FREE_ARRAY( arg2 );
7320 }
7321 {
7322 int i;
7323
7324 if ( arg3 )
7325 {
7326 for ( i = 0; i < ii3; i++ )
7327 LUA_FREE_ARRAY( arg3[i] );
7328 LUA_FREE_ARRAY( arg3 );
7329 }
7330 }
7331 return SWIG_arg;
7332
7333 fail: SWIGUNUSED;
7334 {
7335 LUA_FREE_ARRAY( arg1 );
7336 }
7337 {
7338 LUA_FREE_ARRAY( arg2 );
7339 }
7340 {
7341 int i;
7342
7343 if ( arg3 )
7344 {
7345 for ( i = 0; i < ii3; i++ )
7346 LUA_FREE_ARRAY( arg3[i] );
7347 LUA_FREE_ARRAY( arg3 );
7348 }
7349 }
7350 lua_error(L);
7351 return 0;
7352}
7353
7354
7355static int _wrap_plot3dc(lua_State* L) {
7356 int SWIG_arg = 0;
7357 PLFLT *arg1 = 0 ;
7358 PLFLT *arg2 = 0 ;
7359 PLFLT **arg3 = 0 ;
7360 PLINT arg4 ;
7361 PLINT arg5 ;
7362 PLINT arg6 ;
7363 PLFLT *arg7 = 0 ;
7364 PLINT arg8 ;
7365 int ii3 ;
7366
7367 SWIG_check_num_args("plot3dc",5,5)
7368 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3dc",4,"PLINT");
7369 {
7370 int temp;
7371 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7372 if ( !arg1 )
7373 SWIG_fail;
7374 Xlen = temp;
7375 }
7376 {
7377 int temp;
7378 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7379 if ( !arg2 )
7380 SWIG_fail;
7381 Ylen = temp;
7382 }
7383 {
7384 int jj;
7385
7386 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7387 if ( !arg3 )
7388 SWIG_fail;
7389 arg4 = ii3;
7390 arg5 = jj;
7391 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7392 {
7393 lua_pushfstring( L, "Vectors must match matrix." );
7394 SWIG_fail;
7395 }
7396 }
7397 arg6 = (PLINT)lua_tonumber(L, 4);
7398 {
7399 int temp;
7400 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7401 if ( !arg7 )
7402 SWIG_fail;
7403 arg8 = Alen = temp;
7404 }
7405 plot3dc((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7406
7407 {
7408 LUA_FREE_ARRAY( arg1 );
7409 }
7410 {
7411 LUA_FREE_ARRAY( arg2 );
7412 }
7413 {
7414 int i;
7415
7416 if ( arg3 )
7417 {
7418 for ( i = 0; i < ii3; i++ )
7419 LUA_FREE_ARRAY( arg3[i] );
7420 LUA_FREE_ARRAY( arg3 );
7421 }
7422 }
7423 {
7424 LUA_FREE_ARRAY( arg7 );
7425 }
7426 return SWIG_arg;
7427
7428 fail: SWIGUNUSED;
7429 {
7430 LUA_FREE_ARRAY( arg1 );
7431 }
7432 {
7433 LUA_FREE_ARRAY( arg2 );
7434 }
7435 {
7436 int i;
7437
7438 if ( arg3 )
7439 {
7440 for ( i = 0; i < ii3; i++ )
7441 LUA_FREE_ARRAY( arg3[i] );
7442 LUA_FREE_ARRAY( arg3 );
7443 }
7444 }
7445 {
7446 LUA_FREE_ARRAY( arg7 );
7447 }
7448 lua_error(L);
7449 return 0;
7450}
7451
7452
7453static int _wrap_plot3dcl(lua_State* L) {
7454 int SWIG_arg = 0;
7455 PLFLT *arg1 = 0 ;
7456 PLFLT *arg2 = 0 ;
7457 PLFLT **arg3 = 0 ;
7458 PLINT arg4 ;
7459 PLINT arg5 ;
7460 PLINT arg6 ;
7461 PLFLT *arg7 = 0 ;
7462 PLINT arg8 ;
7463 PLINT arg9 ;
7464 PLINT arg10 ;
7465 PLINT *arg11 = 0 ;
7466 PLINT *arg12 = 0 ;
7467 int ii3 ;
7468 int temp12 ;
7469
7470 SWIG_check_num_args("plot3dcl",8,8)
7471 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3dcl",4,"PLINT");
7472 if(!lua_isnumber(L,6)) SWIG_fail_arg("plot3dcl",6,"PLINT");
7473 {
7474 int temp;
7475 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7476 if ( !arg1 )
7477 SWIG_fail;
7478 Xlen = temp;
7479 }
7480 {
7481 int temp;
7482 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7483 if ( !arg2 )
7484 SWIG_fail;
7485 Ylen = temp;
7486 }
7487 {
7488 int jj;
7489
7490 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7491 if ( !arg3 )
7492 SWIG_fail;
7493 arg4 = ii3;
7494 arg5 = jj;
7495 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7496 {
7497 lua_pushfstring( L, "Vectors must match matrix." );
7498 SWIG_fail;
7499 }
7500 }
7501 arg6 = (PLINT)lua_tonumber(L, 4);
7502 {
7503 int temp;
7504 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7505 if ( !arg7 )
7506 SWIG_fail;
7507 arg8 = Alen = temp;
7508 }
7509 arg9 = (PLINT)lua_tonumber(L, 6);
7510 {
7511 arg11 = (PLINT *) LUA_get_int_num_array_var( L, 7, &arg10 );
7512 if ( !arg11 )
7513 SWIG_fail;
7514 Alen = arg10;
7515 }
7516 {
7517 arg12 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp12 );
7518 if ( !arg12 )
7519 SWIG_fail;
7520 if ( temp12 != Alen )
7521 {
7522 lua_pushfstring( L, "Tables must be of same length." );
7523 SWIG_fail;
7524 }
7525 }
7526 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);
7527
7528 {
7529 LUA_FREE_ARRAY( arg1 );
7530 }
7531 {
7532 LUA_FREE_ARRAY( arg2 );
7533 }
7534 {
7535 int i;
7536
7537 if ( arg3 )
7538 {
7539 for ( i = 0; i < ii3; i++ )
7540 LUA_FREE_ARRAY( arg3[i] );
7541 LUA_FREE_ARRAY( arg3 );
7542 }
7543 }
7544 {
7545 LUA_FREE_ARRAY( arg7 );
7546 }
7547 {
7548 LUA_FREE_ARRAY( arg11 );
7549 }
7550 {
7551 LUA_FREE_ARRAY( arg12 );
7552 }
7553 return SWIG_arg;
7554
7555 fail: SWIGUNUSED;
7556 {
7557 LUA_FREE_ARRAY( arg1 );
7558 }
7559 {
7560 LUA_FREE_ARRAY( arg2 );
7561 }
7562 {
7563 int i;
7564
7565 if ( arg3 )
7566 {
7567 for ( i = 0; i < ii3; i++ )
7568 LUA_FREE_ARRAY( arg3[i] );
7569 LUA_FREE_ARRAY( arg3 );
7570 }
7571 }
7572 {
7573 LUA_FREE_ARRAY( arg7 );
7574 }
7575 {
7576 LUA_FREE_ARRAY( arg11 );
7577 }
7578 {
7579 LUA_FREE_ARRAY( arg12 );
7580 }
7581 lua_error(L);
7582 return 0;
7583}
7584
7585
7586static int _wrap_surf3d(lua_State* L) {
7587 int SWIG_arg = 0;
7588 PLFLT *arg1 = 0 ;
7589 PLFLT *arg2 = 0 ;
7590 PLFLT **arg3 = 0 ;
7591 PLINT arg4 ;
7592 PLINT arg5 ;
7593 PLINT arg6 ;
7594 PLFLT *arg7 = 0 ;
7595 PLINT arg8 ;
7596 int ii3 ;
7597
7598 SWIG_check_num_args("plsurf3d",5,5)
7599 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsurf3d",4,"PLINT");
7600 {
7601 int temp;
7602 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7603 if ( !arg1 )
7604 SWIG_fail;
7605 Xlen = temp;
7606 }
7607 {
7608 int temp;
7609 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7610 if ( !arg2 )
7611 SWIG_fail;
7612 Ylen = temp;
7613 }
7614 {
7615 int jj;
7616
7617 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7618 if ( !arg3 )
7619 SWIG_fail;
7620 arg4 = ii3;
7621 arg5 = jj;
7622 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7623 {
7624 lua_pushfstring( L, "Vectors must match matrix." );
7625 SWIG_fail;
7626 }
7627 }
7628 arg6 = (PLINT)lua_tonumber(L, 4);
7629 {
7630 int temp;
7631 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7632 if ( !arg7 )
7633 SWIG_fail;
7634 arg8 = Alen = temp;
7635 }
7636 plsurf3d((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7637
7638 {
7639 LUA_FREE_ARRAY( arg1 );
7640 }
7641 {
7642 LUA_FREE_ARRAY( arg2 );
7643 }
7644 {
7645 int i;
7646
7647 if ( arg3 )
7648 {
7649 for ( i = 0; i < ii3; i++ )
7650 LUA_FREE_ARRAY( arg3[i] );
7651 LUA_FREE_ARRAY( arg3 );
7652 }
7653 }
7654 {
7655 LUA_FREE_ARRAY( arg7 );
7656 }
7657 return SWIG_arg;
7658
7659 fail: SWIGUNUSED;
7660 {
7661 LUA_FREE_ARRAY( arg1 );
7662 }
7663 {
7664 LUA_FREE_ARRAY( arg2 );
7665 }
7666 {
7667 int i;
7668
7669 if ( arg3 )
7670 {
7671 for ( i = 0; i < ii3; i++ )
7672 LUA_FREE_ARRAY( arg3[i] );
7673 LUA_FREE_ARRAY( arg3 );
7674 }
7675 }
7676 {
7677 LUA_FREE_ARRAY( arg7 );
7678 }
7679 lua_error(L);
7680 return 0;
7681}
7682
7683
7684static int _wrap_surf3dl(lua_State* L) {
7685 int SWIG_arg = 0;
7686 PLFLT *arg1 = 0 ;
7687 PLFLT *arg2 = 0 ;
7688 PLFLT **arg3 = 0 ;
7689 PLINT arg4 ;
7690 PLINT arg5 ;
7691 PLINT arg6 ;
7692 PLFLT *arg7 = 0 ;
7693 PLINT arg8 ;
7694 PLINT arg9 ;
7695 PLINT arg10 ;
7696 PLINT *arg11 = 0 ;
7697 PLINT *arg12 = 0 ;
7698 int ii3 ;
7699 int temp12 ;
7700
7701 SWIG_check_num_args("plsurf3dl",8,8)
7702 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsurf3dl",4,"PLINT");
7703 if(!lua_isnumber(L,6)) SWIG_fail_arg("plsurf3dl",6,"PLINT");
7704 {
7705 int temp;
7706 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7707 if ( !arg1 )
7708 SWIG_fail;
7709 Xlen = temp;
7710 }
7711 {
7712 int temp;
7713 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7714 if ( !arg2 )
7715 SWIG_fail;
7716 Ylen = temp;
7717 }
7718 {
7719 int jj;
7720
7721 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7722 if ( !arg3 )
7723 SWIG_fail;
7724 arg4 = ii3;
7725 arg5 = jj;
7726 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7727 {
7728 lua_pushfstring( L, "Vectors must match matrix." );
7729 SWIG_fail;
7730 }
7731 }
7732 arg6 = (PLINT)lua_tonumber(L, 4);
7733 {
7734 int temp;
7735 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7736 if ( !arg7 )
7737 SWIG_fail;
7738 arg8 = Alen = temp;
7739 }
7740 arg9 = (PLINT)lua_tonumber(L, 6);
7741 {
7742 arg11 = (PLINT *) LUA_get_int_num_array_var( L, 7, &arg10 );
7743 if ( !arg11 )
7744 SWIG_fail;
7745 Alen = arg10;
7746 }
7747 {
7748 arg12 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp12 );
7749 if ( !arg12 )
7750 SWIG_fail;
7751 if ( temp12 != Alen )
7752 {
7753 lua_pushfstring( L, "Tables must be of same length." );
7754 SWIG_fail;
7755 }
7756 }
7757 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);
7758
7759 {
7760 LUA_FREE_ARRAY( arg1 );
7761 }
7762 {
7763 LUA_FREE_ARRAY( arg2 );
7764 }
7765 {
7766 int i;
7767
7768 if ( arg3 )
7769 {
7770 for ( i = 0; i < ii3; i++ )
7771 LUA_FREE_ARRAY( arg3[i] );
7772 LUA_FREE_ARRAY( arg3 );
7773 }
7774 }
7775 {
7776 LUA_FREE_ARRAY( arg7 );
7777 }
7778 {
7779 LUA_FREE_ARRAY( arg11 );
7780 }
7781 {
7782 LUA_FREE_ARRAY( arg12 );
7783 }
7784 return SWIG_arg;
7785
7786 fail: SWIGUNUSED;
7787 {
7788 LUA_FREE_ARRAY( arg1 );
7789 }
7790 {
7791 LUA_FREE_ARRAY( arg2 );
7792 }
7793 {
7794 int i;
7795
7796 if ( arg3 )
7797 {
7798 for ( i = 0; i < ii3; i++ )
7799 LUA_FREE_ARRAY( arg3[i] );
7800 LUA_FREE_ARRAY( arg3 );
7801 }
7802 }
7803 {
7804 LUA_FREE_ARRAY( arg7 );
7805 }
7806 {
7807 LUA_FREE_ARRAY( arg11 );
7808 }
7809 {
7810 LUA_FREE_ARRAY( arg12 );
7811 }
7812 lua_error(L);
7813 return 0;
7814}
7815
7816
7817static int _wrap_parseopts(lua_State* L) {
7818 int SWIG_arg = 0;
7819 int *arg1 = 0 ;
7820 char **arg2 = 0 ;
7821 PLINT arg3 ;
7822 PLINT result;
7823
7824 SWIG_check_num_args("plparseopts",2,2)
7825 if(!lua_istable(L,1)) SWIG_fail_arg("plparseopts",1,"int *");
7826 if(!lua_isnumber(L,2)) SWIG_fail_arg("plparseopts",2,"PLINT");
7827 {
7828 int i, n;
7829
7830 // from lua 5.1 on there is no element "n" anymore,
7831 // so we need to find out the number of command line
7832 // options manually
7833 for ( i = 1;; i++ )
7834 {
7835 lua_rawgeti( L, 1, i );
7836 if ( lua_isnil( L, -1 ) )
7837 {
7838 // ok, this index doesn't exist anymore, we have i-1
7839 // command line options
7840 lua_pop( L, 1 );
7841 break;
7842 }
7843 }
7844 n = i;
7845 arg1 = &n;
7846
7847 arg2 = LUA_ALLOC_ARRAY( char*, ( n + 1 ) );
7848
7849 for ( i = 0; i < n; i++ )
7850 {
7851 lua_rawgeti( L, 1, i );
7852 if ( lua_isstring( L, -1 ) )
7853 {
7854 arg2[i] = (char *) lua_tostring( L, -1 );
7855 }
7856 else
7857 {
7858 lua_pop( L, 1 );
7859 lua_pushfstring( L, "List items must be strings" );
7860 SWIG_fail;
7861 // arg2 array is freed after 'fail:'
7862 }
7863 lua_pop( L, 1 );
7864 }
7865 arg2[n] = NULL;
7866 }
7867 arg3 = (PLINT)lua_tonumber(L, 2);
7868 result = (PLINT)plparseopts(arg1,arg2,arg3);
7869 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
7870 {
7871 LUA_FREE_ARRAY( arg2 );
7872 }
7873 return SWIG_arg;
7874
7875 fail: SWIGUNUSED;
7876 {
7877 LUA_FREE_ARRAY( arg2 );
7878 }
7879 lua_error(L);
7880 return 0;
7881}
7882
7883
7884static int _wrap_pat(lua_State* L) {
7885 int SWIG_arg = 0;
7886 PLINT arg1 ;
7887 PLINT *arg2 = 0 ;
7888 PLINT *arg3 = 0 ;
7889 int temp3 ;
7890
7891 SWIG_check_num_args("plpat",2,2)
7892 {
7893 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 1, &arg1 );
7894 if ( !arg2 )
7895 SWIG_fail;
7896 Alen = arg1;
7897 }
7898 {
7899 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp3 );
7900 if ( !arg3 )
7901 SWIG_fail;
7902 if ( temp3 != Alen )
7903 {
7904 lua_pushfstring( L, "Tables must be of same length." );
7905 SWIG_fail;
7906 }
7907 }
7908 plpat(arg1,(int const *)arg2,(int const *)arg3);
7909
7910 {
7911 LUA_FREE_ARRAY( arg2 );
7912 }
7913 {
7914 LUA_FREE_ARRAY( arg3 );
7915 }
7916 return SWIG_arg;
7917
7918 fail: SWIGUNUSED;
7919 {
7920 LUA_FREE_ARRAY( arg2 );
7921 }
7922 {
7923 LUA_FREE_ARRAY( arg3 );
7924 }
7925 lua_error(L);
7926 return 0;
7927}
7928
7929
7930static int _wrap_path(lua_State* L) {
7931 int SWIG_arg = 0;
7932 PLINT arg1 ;
7933 PLFLT arg2 ;
7934 PLFLT arg3 ;
7935 PLFLT arg4 ;
7936 PLFLT arg5 ;
7937
7938 SWIG_check_num_args("plpath",5,5)
7939 if(!lua_isnumber(L,1)) SWIG_fail_arg("plpath",1,"PLINT");
7940 if(!lua_isnumber(L,2)) SWIG_fail_arg("plpath",2,"PLFLT");
7941 if(!lua_isnumber(L,3)) SWIG_fail_arg("plpath",3,"PLFLT");
7942 if(!lua_isnumber(L,4)) SWIG_fail_arg("plpath",4,"PLFLT");
7943 if(!lua_isnumber(L,5)) SWIG_fail_arg("plpath",5,"PLFLT");
7944 arg1 = (PLINT)lua_tonumber(L, 1);
7945 arg2 = (PLFLT)lua_tonumber(L, 2);
7946 arg3 = (PLFLT)lua_tonumber(L, 3);
7947 arg4 = (PLFLT)lua_tonumber(L, 4);
7948 arg5 = (PLFLT)lua_tonumber(L, 5);
7949 plpath(arg1,arg2,arg3,arg4,arg5);
7950
7951 return SWIG_arg;
7952
7953 fail: SWIGUNUSED;
7954 lua_error(L);
7955 return 0;
7956}
7957
7958
7959static int _wrap_poin(lua_State* L) {
7960 int SWIG_arg = 0;
7961 PLINT arg1 ;
7962 PLFLT *arg2 = 0 ;
7963 PLFLT *arg3 = 0 ;
7964 PLINT arg4 ;
7965 int temp3 ;
7966
7967 SWIG_check_num_args("plpoin",3,3)
7968 if(!lua_isnumber(L,3)) SWIG_fail_arg("plpoin",3,"PLINT");
7969 {
7970 int temp;
7971 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7972 if ( !arg2 )
7973 SWIG_fail;
7974 arg1 = Alen = temp;
7975 }
7976 {
7977 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
7978 if ( !arg3 )
7979 SWIG_fail;
7980 if ( temp3 != Alen )
7981 {
7982 lua_pushfstring( L, "Tables must be of same length." );
7983 SWIG_fail;
7984 }
7985 }
7986 arg4 = (PLINT)lua_tonumber(L, 3);
7987 plpoin(arg1,(double const *)arg2,(double const *)arg3,arg4);
7988
7989 {
7990 LUA_FREE_ARRAY( arg2 );
7991 }
7992 {
7993 LUA_FREE_ARRAY( arg3 );
7994 }
7995 return SWIG_arg;
7996
7997 fail: SWIGUNUSED;
7998 {
7999 LUA_FREE_ARRAY( arg2 );
8000 }
8001 {
8002 LUA_FREE_ARRAY( arg3 );
8003 }
8004 lua_error(L);
8005 return 0;
8006}
8007
8008
8009static int _wrap_poin3(lua_State* L) {
8010 int SWIG_arg = 0;
8011 PLINT arg1 ;
8012 PLFLT *arg2 = 0 ;
8013 PLFLT *arg3 = 0 ;
8014 PLFLT *arg4 = 0 ;
8015 PLINT arg5 ;
8016 int temp3 ;
8017 int temp4 ;
8018
8019 SWIG_check_num_args("plpoin3",4,4)
8020 if(!lua_isnumber(L,4)) SWIG_fail_arg("plpoin3",4,"PLINT");
8021 {
8022 int temp;
8023 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
8024 if ( !arg2 )
8025 SWIG_fail;
8026 arg1 = Alen = temp;
8027 }
8028 {
8029 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
8030 if ( !arg3 )
8031 SWIG_fail;
8032 if ( temp3 != Alen )
8033 {
8034 lua_pushfstring( L, "Tables must be of same length." );
8035 SWIG_fail;
8036 }
8037 }
8038 {
8039 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8040 if ( !arg4 )
8041 SWIG_fail;
8042 if ( temp4 != Alen )
8043 {
8044 lua_pushfstring( L, "Tables must be of same length." );
8045 SWIG_fail;
8046 }
8047 }
8048 arg5 = (PLINT)lua_tonumber(L, 4);
8049 plpoin3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,arg5);
8050
8051 {
8052 LUA_FREE_ARRAY( arg2 );
8053 }
8054 {
8055 LUA_FREE_ARRAY( arg3 );
8056 }
8057 {
8058 LUA_FREE_ARRAY( arg4 );
8059 }
8060 return SWIG_arg;
8061
8062 fail: SWIGUNUSED;
8063 {
8064 LUA_FREE_ARRAY( arg2 );
8065 }
8066 {
8067 LUA_FREE_ARRAY( arg3 );
8068 }
8069 {
8070 LUA_FREE_ARRAY( arg4 );
8071 }
8072 lua_error(L);
8073 return 0;
8074}
8075
8076
8077static int _wrap_poly3(lua_State* L) {
8078 int SWIG_arg = 0;
8079 PLINT arg1 ;
8080 PLFLT *arg2 = 0 ;
8081 PLFLT *arg3 = 0 ;
8082 PLFLT *arg4 = 0 ;
8083 PLBOOL *arg5 = 0 ;
8084 PLBOOL arg6 ;
8085 int temp3 ;
8086 int temp4 ;
8087 int temp5 ;
8088
8089 SWIG_check_num_args("plpoly3",5,5)
8090 if(!lua_isnumber(L,5)) SWIG_fail_arg("plpoly3",5,"PLBOOL");
8091 {
8092 int temp;
8093 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
8094 if ( !arg2 )
8095 SWIG_fail;
8096 arg1 = Alen = temp;
8097 }
8098 {
8099 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
8100 if ( !arg3 )
8101 SWIG_fail;
8102 if ( temp3 != Alen )
8103 {
8104 lua_pushfstring( L, "Tables must be of same length." );
8105 SWIG_fail;
8106 }
8107 }
8108 {
8109 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8110 if ( !arg4 )
8111 SWIG_fail;
8112 if ( temp4 != Alen )
8113 {
8114 lua_pushfstring( L, "Tables must be of same length." );
8115 SWIG_fail;
8116 }
8117 }
8118 {
8119 arg5 = (PLINT *) LUA_get_int_num_array_var( L, 4, &temp5 );
8120 if ( !arg5 )
8121 SWIG_fail;
8122 if ( temp5 < Alen - 1 )
8123 {
8124 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8125 SWIG_fail;
8126 }
8127 }
8128 arg6 = (PLBOOL)lua_tonumber(L, 5);
8129 plpoly3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,(int const *)arg5,arg6);
8130
8131 {
8132 LUA_FREE_ARRAY( arg2 );
8133 }
8134 {
8135 LUA_FREE_ARRAY( arg3 );
8136 }
8137 {
8138 LUA_FREE_ARRAY( arg4 );
8139 }
8140 {
8141 LUA_FREE_ARRAY( arg5 );
8142 }
8143 return SWIG_arg;
8144
8145 fail: SWIGUNUSED;
8146 {
8147 LUA_FREE_ARRAY( arg2 );
8148 }
8149 {
8150 LUA_FREE_ARRAY( arg3 );
8151 }
8152 {
8153 LUA_FREE_ARRAY( arg4 );
8154 }
8155 {
8156 LUA_FREE_ARRAY( arg5 );
8157 }
8158 lua_error(L);
8159 return 0;
8160}
8161
8162
8163static int _wrap_prec(lua_State* L) {
8164 int SWIG_arg = 0;
8165 PLINT arg1 ;
8166 PLINT arg2 ;
8167
8168 SWIG_check_num_args("plprec",2,2)
8169 if(!lua_isnumber(L,1)) SWIG_fail_arg("plprec",1,"PLINT");
8170 if(!lua_isnumber(L,2)) SWIG_fail_arg("plprec",2,"PLINT");
8171 arg1 = (PLINT)lua_tonumber(L, 1);
8172 arg2 = (PLINT)lua_tonumber(L, 2);
8173 plprec(arg1,arg2);
8174
8175 return SWIG_arg;
8176
8177 fail: SWIGUNUSED;
8178 lua_error(L);
8179 return 0;
8180}
8181
8182
8183static int _wrap_psty(lua_State* L) {
8184 int SWIG_arg = 0;
8185 PLINT arg1 ;
8186
8187 SWIG_check_num_args("plpsty",1,1)
8188 if(!lua_isnumber(L,1)) SWIG_fail_arg("plpsty",1,"PLINT");
8189 arg1 = (PLINT)lua_tonumber(L, 1);
8190 plpsty(arg1);
8191
8192 return SWIG_arg;
8193
8194 fail: SWIGUNUSED;
8195 lua_error(L);
8196 return 0;
8197}
8198
8199
8200static int _wrap_ptex(lua_State* L) {
8201 int SWIG_arg = 0;
8202 PLFLT arg1 ;
8203 PLFLT arg2 ;
8204 PLFLT arg3 ;
8205 PLFLT arg4 ;
8206 PLFLT arg5 ;
8207 char *arg6 = 0 ;
8208
8209 SWIG_check_num_args("plptex",6,6)
8210 if(!lua_isnumber(L,1)) SWIG_fail_arg("plptex",1,"PLFLT");
8211 if(!lua_isnumber(L,2)) SWIG_fail_arg("plptex",2,"PLFLT");
8212 if(!lua_isnumber(L,3)) SWIG_fail_arg("plptex",3,"PLFLT");
8213 if(!lua_isnumber(L,4)) SWIG_fail_arg("plptex",4,"PLFLT");
8214 if(!lua_isnumber(L,5)) SWIG_fail_arg("plptex",5,"PLFLT");
8215 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plptex",6,"char const *");
8216 arg1 = (PLFLT)lua_tonumber(L, 1);
8217 arg2 = (PLFLT)lua_tonumber(L, 2);
8218 arg3 = (PLFLT)lua_tonumber(L, 3);
8219 arg4 = (PLFLT)lua_tonumber(L, 4);
8220 arg5 = (PLFLT)lua_tonumber(L, 5);
8221 arg6 = (char *)lua_tostring(L, 6);
8222 plptex(arg1,arg2,arg3,arg4,arg5,(char const *)arg6);
8223
8224 return SWIG_arg;
8225
8226 fail: SWIGUNUSED;
8227 lua_error(L);
8228 return 0;
8229}
8230
8231
8232static int _wrap_ptex3(lua_State* L) {
8233 int SWIG_arg = 0;
8234 PLFLT arg1 ;
8235 PLFLT arg2 ;
8236 PLFLT arg3 ;
8237 PLFLT arg4 ;
8238 PLFLT arg5 ;
8239 PLFLT arg6 ;
8240 PLFLT arg7 ;
8241 PLFLT arg8 ;
8242 PLFLT arg9 ;
8243 PLFLT arg10 ;
8244 char *arg11 = 0 ;
8245
8246 SWIG_check_num_args("plptex3",11,11)
8247 if(!lua_isnumber(L,1)) SWIG_fail_arg("plptex3",1,"PLFLT");
8248 if(!lua_isnumber(L,2)) SWIG_fail_arg("plptex3",2,"PLFLT");
8249 if(!lua_isnumber(L,3)) SWIG_fail_arg("plptex3",3,"PLFLT");
8250 if(!lua_isnumber(L,4)) SWIG_fail_arg("plptex3",4,"PLFLT");
8251 if(!lua_isnumber(L,5)) SWIG_fail_arg("plptex3",5,"PLFLT");
8252 if(!lua_isnumber(L,6)) SWIG_fail_arg("plptex3",6,"PLFLT");
8253 if(!lua_isnumber(L,7)) SWIG_fail_arg("plptex3",7,"PLFLT");
8254 if(!lua_isnumber(L,8)) SWIG_fail_arg("plptex3",8,"PLFLT");
8255 if(!lua_isnumber(L,9)) SWIG_fail_arg("plptex3",9,"PLFLT");
8256 if(!lua_isnumber(L,10)) SWIG_fail_arg("plptex3",10,"PLFLT");
8257 if(!SWIG_lua_isnilstring(L,11)) SWIG_fail_arg("plptex3",11,"char const *");
8258 arg1 = (PLFLT)lua_tonumber(L, 1);
8259 arg2 = (PLFLT)lua_tonumber(L, 2);
8260 arg3 = (PLFLT)lua_tonumber(L, 3);
8261 arg4 = (PLFLT)lua_tonumber(L, 4);
8262 arg5 = (PLFLT)lua_tonumber(L, 5);
8263 arg6 = (PLFLT)lua_tonumber(L, 6);
8264 arg7 = (PLFLT)lua_tonumber(L, 7);
8265 arg8 = (PLFLT)lua_tonumber(L, 8);
8266 arg9 = (PLFLT)lua_tonumber(L, 9);
8267 arg10 = (PLFLT)lua_tonumber(L, 10);
8268 arg11 = (char *)lua_tostring(L, 11);
8269 plptex3(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,(char const *)arg11);
8270
8271 return SWIG_arg;
8272
8273 fail: SWIGUNUSED;
8274 lua_error(L);
8275 return 0;
8276}
8277
8278
8279static int _wrap_randd(lua_State* L) {
8280 int SWIG_arg = 0;
8281 PLFLT result;
8282
8283 SWIG_check_num_args("plrandd",0,0)
8284 result = (PLFLT)plrandd();
8285 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
8286 return SWIG_arg;
8287
8288 fail: SWIGUNUSED;
8289 lua_error(L);
8290 return 0;
8291}
8292
8293
8294static int _wrap_replot(lua_State* L) {
8295 int SWIG_arg = 0;
8296
8297 SWIG_check_num_args("plreplot",0,0)
8298 plreplot();
8299
8300 return SWIG_arg;
8301
8302 fail: SWIGUNUSED;
8303 lua_error(L);
8304 return 0;
8305}
8306
8307
8308static int _wrap_rgbhls(lua_State* L) {
8309 int SWIG_arg = 0;
8310 PLFLT arg1 ;
8311 PLFLT arg2 ;
8312 PLFLT arg3 ;
8313 PLFLT *arg4 = 0 ;
8314 PLFLT *arg5 = 0 ;
8315 PLFLT *arg6 = 0 ;
8316 PLFLT temp4 ;
8317 PLFLT temp5 ;
8318 PLFLT temp6 ;
8319
8320 arg4 = &temp4;
8321 arg5 = &temp5;
8322 arg6 = &temp6;
8323 SWIG_check_num_args("plrgbhls",3,3)
8324 if(!lua_isnumber(L,1)) SWIG_fail_arg("plrgbhls",1,"PLFLT");
8325 if(!lua_isnumber(L,2)) SWIG_fail_arg("plrgbhls",2,"PLFLT");
8326 if(!lua_isnumber(L,3)) SWIG_fail_arg("plrgbhls",3,"PLFLT");
8327 arg1 = (PLFLT)lua_tonumber(L, 1);
8328 arg2 = (PLFLT)lua_tonumber(L, 2);
8329 arg3 = (PLFLT)lua_tonumber(L, 3);
8330 plrgbhls(arg1,arg2,arg3,arg4,arg5,arg6);
8331
8332 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
8333 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
8334 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
8335 return SWIG_arg;
8336
8337 fail: SWIGUNUSED;
8338 lua_error(L);
8339 return 0;
8340}
8341
8342
8343static int _wrap_schr(lua_State* L) {
8344 int SWIG_arg = 0;
8345 PLFLT arg1 ;
8346 PLFLT arg2 ;
8347
8348 SWIG_check_num_args("plschr",2,2)
8349 if(!lua_isnumber(L,1)) SWIG_fail_arg("plschr",1,"PLFLT");
8350 if(!lua_isnumber(L,2)) SWIG_fail_arg("plschr",2,"PLFLT");
8351 arg1 = (PLFLT)lua_tonumber(L, 1);
8352 arg2 = (PLFLT)lua_tonumber(L, 2);
8353 plschr(arg1,arg2);
8354
8355 return SWIG_arg;
8356
8357 fail: SWIGUNUSED;
8358 lua_error(L);
8359 return 0;
8360}
8361
8362
8363static int _wrap_scmap0(lua_State* L) {
8364 int SWIG_arg = 0;
8365 PLINT *arg1 = 0 ;
8366 PLINT *arg2 = 0 ;
8367 PLINT *arg3 = 0 ;
8368 PLINT arg4 ;
8369 int temp1 ;
8370 int temp2 ;
8371 int temp3 ;
8372
8373 SWIG_check_num_args("plscmap0",3,3)
8374 {
8375 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8376 if ( !arg1 )
8377 SWIG_fail;
8378 Alen = temp1;
8379 }
8380 {
8381 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8382 if ( !arg2 )
8383 SWIG_fail;
8384 if ( temp2 != Alen )
8385 {
8386 lua_pushfstring( L, "Tables must be of same length." );
8387 SWIG_fail;
8388 }
8389 }
8390 {
8391 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8392 if ( !arg3 )
8393 SWIG_fail;
8394 if ( temp3 != Alen )
8395 {
8396 lua_pushfstring( L, "Tables must be of same length." );
8397 SWIG_fail;
8398 }
8399 arg4 = temp3;
8400 }
8401 plscmap0((int const *)arg1,(int const *)arg2,(int const *)arg3,arg4);
8402
8403 {
8404 LUA_FREE_ARRAY( arg1 );
8405 }
8406 {
8407 LUA_FREE_ARRAY( arg2 );
8408 }
8409 {
8410 LUA_FREE_ARRAY( arg3 );
8411 }
8412 return SWIG_arg;
8413
8414 fail: SWIGUNUSED;
8415 {
8416 LUA_FREE_ARRAY( arg1 );
8417 }
8418 {
8419 LUA_FREE_ARRAY( arg2 );
8420 }
8421 {
8422 LUA_FREE_ARRAY( arg3 );
8423 }
8424 lua_error(L);
8425 return 0;
8426}
8427
8428
8429static int _wrap_scmap0a(lua_State* L) {
8430 int SWIG_arg = 0;
8431 PLINT *arg1 = 0 ;
8432 PLINT *arg2 = 0 ;
8433 PLINT *arg3 = 0 ;
8434 PLFLT *arg4 = 0 ;
8435 PLINT arg5 ;
8436 int temp1 ;
8437 int temp2 ;
8438 int temp3 ;
8439
8440 SWIG_check_num_args("plscmap0a",4,4)
8441 {
8442 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8443 if ( !arg1 )
8444 SWIG_fail;
8445 Alen = temp1;
8446 }
8447 {
8448 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8449 if ( !arg2 )
8450 SWIG_fail;
8451 if ( temp2 != Alen )
8452 {
8453 lua_pushfstring( L, "Tables must be of same length." );
8454 SWIG_fail;
8455 }
8456 }
8457 {
8458 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8459 if ( !arg3 )
8460 SWIG_fail;
8461 if ( temp3 != Alen )
8462 {
8463 lua_pushfstring( L, "Tables must be of same length." );
8464 SWIG_fail;
8465 }
8466 }
8467 {
8468 int temp;
8469 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
8470 if ( !arg4 )
8471 SWIG_fail;
8472 if ( temp != Alen )
8473 {
8474 lua_pushfstring( L, "Tables must be of same length." );
8475 SWIG_fail;
8476 }
8477 arg5 = temp;
8478 }
8479 plscmap0a((int const *)arg1,(int const *)arg2,(int const *)arg3,(double const *)arg4,arg5);
8480
8481 {
8482 LUA_FREE_ARRAY( arg1 );
8483 }
8484 {
8485 LUA_FREE_ARRAY( arg2 );
8486 }
8487 {
8488 LUA_FREE_ARRAY( arg3 );
8489 }
8490 {
8491 LUA_FREE_ARRAY( arg4 );
8492 }
8493 return SWIG_arg;
8494
8495 fail: SWIGUNUSED;
8496 {
8497 LUA_FREE_ARRAY( arg1 );
8498 }
8499 {
8500 LUA_FREE_ARRAY( arg2 );
8501 }
8502 {
8503 LUA_FREE_ARRAY( arg3 );
8504 }
8505 {
8506 LUA_FREE_ARRAY( arg4 );
8507 }
8508 lua_error(L);
8509 return 0;
8510}
8511
8512
8513static int _wrap_scmap0n(lua_State* L) {
8514 int SWIG_arg = 0;
8515 PLINT arg1 ;
8516
8517 SWIG_check_num_args("plscmap0n",1,1)
8518 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap0n",1,"PLINT");
8519 arg1 = (PLINT)lua_tonumber(L, 1);
8520 plscmap0n(arg1);
8521
8522 return SWIG_arg;
8523
8524 fail: SWIGUNUSED;
8525 lua_error(L);
8526 return 0;
8527}
8528
8529
8530static int _wrap_scmap1(lua_State* L) {
8531 int SWIG_arg = 0;
8532 PLINT *arg1 = 0 ;
8533 PLINT *arg2 = 0 ;
8534 PLINT *arg3 = 0 ;
8535 PLINT arg4 ;
8536 int temp1 ;
8537 int temp2 ;
8538 int temp3 ;
8539
8540 SWIG_check_num_args("plscmap1",3,3)
8541 {
8542 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8543 if ( !arg1 )
8544 SWIG_fail;
8545 Alen = temp1;
8546 }
8547 {
8548 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8549 if ( !arg2 )
8550 SWIG_fail;
8551 if ( temp2 != Alen )
8552 {
8553 lua_pushfstring( L, "Tables must be of same length." );
8554 SWIG_fail;
8555 }
8556 }
8557 {
8558 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8559 if ( !arg3 )
8560 SWIG_fail;
8561 if ( temp3 != Alen )
8562 {
8563 lua_pushfstring( L, "Tables must be of same length." );
8564 SWIG_fail;
8565 }
8566 arg4 = temp3;
8567 }
8568 plscmap1((int const *)arg1,(int const *)arg2,(int const *)arg3,arg4);
8569
8570 {
8571 LUA_FREE_ARRAY( arg1 );
8572 }
8573 {
8574 LUA_FREE_ARRAY( arg2 );
8575 }
8576 {
8577 LUA_FREE_ARRAY( arg3 );
8578 }
8579 return SWIG_arg;
8580
8581 fail: SWIGUNUSED;
8582 {
8583 LUA_FREE_ARRAY( arg1 );
8584 }
8585 {
8586 LUA_FREE_ARRAY( arg2 );
8587 }
8588 {
8589 LUA_FREE_ARRAY( arg3 );
8590 }
8591 lua_error(L);
8592 return 0;
8593}
8594
8595
8596static int _wrap_scmap1a(lua_State* L) {
8597 int SWIG_arg = 0;
8598 PLINT *arg1 = 0 ;
8599 PLINT *arg2 = 0 ;
8600 PLINT *arg3 = 0 ;
8601 PLFLT *arg4 = 0 ;
8602 PLINT arg5 ;
8603 int temp1 ;
8604 int temp2 ;
8605 int temp3 ;
8606
8607 SWIG_check_num_args("plscmap1a",4,4)
8608 {
8609 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8610 if ( !arg1 )
8611 SWIG_fail;
8612 Alen = temp1;
8613 }
8614 {
8615 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8616 if ( !arg2 )
8617 SWIG_fail;
8618 if ( temp2 != Alen )
8619 {
8620 lua_pushfstring( L, "Tables must be of same length." );
8621 SWIG_fail;
8622 }
8623 }
8624 {
8625 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8626 if ( !arg3 )
8627 SWIG_fail;
8628 if ( temp3 != Alen )
8629 {
8630 lua_pushfstring( L, "Tables must be of same length." );
8631 SWIG_fail;
8632 }
8633 }
8634 {
8635 int temp;
8636 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
8637 if ( !arg4 )
8638 SWIG_fail;
8639 if ( temp != Alen )
8640 {
8641 lua_pushfstring( L, "Tables must be of same length." );
8642 SWIG_fail;
8643 }
8644 arg5 = temp;
8645 }
8646 plscmap1a((int const *)arg1,(int const *)arg2,(int const *)arg3,(double const *)arg4,arg5);
8647
8648 {
8649 LUA_FREE_ARRAY( arg1 );
8650 }
8651 {
8652 LUA_FREE_ARRAY( arg2 );
8653 }
8654 {
8655 LUA_FREE_ARRAY( arg3 );
8656 }
8657 {
8658 LUA_FREE_ARRAY( arg4 );
8659 }
8660 return SWIG_arg;
8661
8662 fail: SWIGUNUSED;
8663 {
8664 LUA_FREE_ARRAY( arg1 );
8665 }
8666 {
8667 LUA_FREE_ARRAY( arg2 );
8668 }
8669 {
8670 LUA_FREE_ARRAY( arg3 );
8671 }
8672 {
8673 LUA_FREE_ARRAY( arg4 );
8674 }
8675 lua_error(L);
8676 return 0;
8677}
8678
8679
8680static int _wrap_scmap1l(lua_State* L) {
8681 int SWIG_arg = 0;
8682 PLBOOL arg1 ;
8683 PLINT arg2 ;
8684 PLFLT *arg3 = 0 ;
8685 PLFLT *arg4 = 0 ;
8686 PLFLT *arg5 = 0 ;
8687 PLFLT *arg6 = 0 ;
8688 PLBOOL *arg7 = 0 ;
8689 int temp4 ;
8690 int temp5 ;
8691 int temp6 ;
8692 int temp7 ;
8693
8694 {
8695 arg7 = NULL;
8696 }
8697 SWIG_check_num_args("plscmap1l",5,6)
8698 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1l",1,"PLBOOL");
8699 arg1 = (PLBOOL)lua_tonumber(L, 1);
8700 {
8701 int temp;
8702 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
8703 if ( !arg3 )
8704 SWIG_fail;
8705 arg2 = Alen = temp;
8706 }
8707 {
8708 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8709 if ( !arg4 )
8710 SWIG_fail;
8711 if ( temp4 != Alen )
8712 {
8713 lua_pushfstring( L, "Tables must be of same length." );
8714 SWIG_fail;
8715 }
8716 }
8717 {
8718 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp5 );
8719 if ( !arg5 )
8720 SWIG_fail;
8721 if ( temp5 != Alen )
8722 {
8723 lua_pushfstring( L, "Tables must be of same length." );
8724 SWIG_fail;
8725 }
8726 }
8727 {
8728 arg6 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp6 );
8729 if ( !arg6 )
8730 SWIG_fail;
8731 if ( temp6 != Alen )
8732 {
8733 lua_pushfstring( L, "Tables must be of same length." );
8734 SWIG_fail;
8735 }
8736 }
8737 if(lua_gettop(L)>=6){
8738 {
8739 if ( lua_isnil( L, 6 ) )
8740 {
8741 arg7 = NULL;
8742 }
8743 else
8744 {
8745 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 6, &temp7 );
8746 if ( !arg7 )
8747 SWIG_fail;
8748 if ( temp7 < Alen - 1 )
8749 {
8750 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8751 SWIG_fail;
8752 }
8753 }
8754 }
8755 }
8756 plscmap1l(arg1,arg2,(double const *)arg3,(double const *)arg4,(double const *)arg5,(double const *)arg6,(int const *)arg7);
8757
8758 {
8759 LUA_FREE_ARRAY( arg3 );
8760 }
8761 {
8762 LUA_FREE_ARRAY( arg4 );
8763 }
8764 {
8765 LUA_FREE_ARRAY( arg5 );
8766 }
8767 {
8768 LUA_FREE_ARRAY( arg6 );
8769 }
8770 {
8771 LUA_FREE_ARRAY( arg7 );
8772 }
8773 return SWIG_arg;
8774
8775 fail: SWIGUNUSED;
8776 {
8777 LUA_FREE_ARRAY( arg3 );
8778 }
8779 {
8780 LUA_FREE_ARRAY( arg4 );
8781 }
8782 {
8783 LUA_FREE_ARRAY( arg5 );
8784 }
8785 {
8786 LUA_FREE_ARRAY( arg6 );
8787 }
8788 {
8789 LUA_FREE_ARRAY( arg7 );
8790 }
8791 lua_error(L);
8792 return 0;
8793}
8794
8795
8796static int _wrap_scmap1la(lua_State* L) {
8797 int SWIG_arg = 0;
8798 PLBOOL arg1 ;
8799 PLINT arg2 ;
8800 PLFLT *arg3 = 0 ;
8801 PLFLT *arg4 = 0 ;
8802 PLFLT *arg5 = 0 ;
8803 PLFLT *arg6 = 0 ;
8804 PLFLT *arg7 = 0 ;
8805 PLBOOL *arg8 = 0 ;
8806 int temp4 ;
8807 int temp5 ;
8808 int temp6 ;
8809 int temp7 ;
8810 int temp8 ;
8811
8812 {
8813 arg8 = NULL;
8814 }
8815 SWIG_check_num_args("plscmap1la",6,7)
8816 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1la",1,"PLBOOL");
8817 arg1 = (PLBOOL)lua_tonumber(L, 1);
8818 {
8819 int temp;
8820 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
8821 if ( !arg3 )
8822 SWIG_fail;
8823 arg2 = Alen = temp;
8824 }
8825 {
8826 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8827 if ( !arg4 )
8828 SWIG_fail;
8829 if ( temp4 != Alen )
8830 {
8831 lua_pushfstring( L, "Tables must be of same length." );
8832 SWIG_fail;
8833 }
8834 }
8835 {
8836 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp5 );
8837 if ( !arg5 )
8838 SWIG_fail;
8839 if ( temp5 != Alen )
8840 {
8841 lua_pushfstring( L, "Tables must be of same length." );
8842 SWIG_fail;
8843 }
8844 }
8845 {
8846 arg6 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp6 );
8847 if ( !arg6 )
8848 SWIG_fail;
8849 if ( temp6 != Alen )
8850 {
8851 lua_pushfstring( L, "Tables must be of same length." );
8852 SWIG_fail;
8853 }
8854 }
8855 {
8856 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp7 );
8857 if ( !arg7 )
8858 SWIG_fail;
8859 if ( temp7 != Alen )
8860 {
8861 lua_pushfstring( L, "Tables must be of same length." );
8862 SWIG_fail;
8863 }
8864 }
8865 if(lua_gettop(L)>=7){
8866 {
8867 if ( lua_isnil( L, 7 ) )
8868 {
8869 arg8 = NULL;
8870 }
8871 else
8872 {
8873 arg8 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp8 );
8874 if ( !arg8 )
8875 SWIG_fail;
8876 if ( temp8 < Alen - 1 )
8877 {
8878 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8879 SWIG_fail;
8880 }
8881 }
8882 }
8883 }
8884 plscmap1la(arg1,arg2,(double const *)arg3,(double const *)arg4,(double const *)arg5,(double const *)arg6,(double const *)arg7,(int const *)arg8);
8885
8886 {
8887 LUA_FREE_ARRAY( arg3 );
8888 }
8889 {
8890 LUA_FREE_ARRAY( arg4 );
8891 }
8892 {
8893 LUA_FREE_ARRAY( arg5 );
8894 }
8895 {
8896 LUA_FREE_ARRAY( arg6 );
8897 }
8898 {
8899 LUA_FREE_ARRAY( arg7 );
8900 }
8901 {
8902 LUA_FREE_ARRAY( arg8 );
8903 }
8904 return SWIG_arg;
8905
8906 fail: SWIGUNUSED;
8907 {
8908 LUA_FREE_ARRAY( arg3 );
8909 }
8910 {
8911 LUA_FREE_ARRAY( arg4 );
8912 }
8913 {
8914 LUA_FREE_ARRAY( arg5 );
8915 }
8916 {
8917 LUA_FREE_ARRAY( arg6 );
8918 }
8919 {
8920 LUA_FREE_ARRAY( arg7 );
8921 }
8922 {
8923 LUA_FREE_ARRAY( arg8 );
8924 }
8925 lua_error(L);
8926 return 0;
8927}
8928
8929
8930static int _wrap_scmap1n(lua_State* L) {
8931 int SWIG_arg = 0;
8932 PLINT arg1 ;
8933
8934 SWIG_check_num_args("plscmap1n",1,1)
8935 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1n",1,"PLINT");
8936 arg1 = (PLINT)lua_tonumber(L, 1);
8937 plscmap1n(arg1);
8938
8939 return SWIG_arg;
8940
8941 fail: SWIGUNUSED;
8942 lua_error(L);
8943 return 0;
8944}
8945
8946
8947static int _wrap_scmap1_range(lua_State* L) {
8948 int SWIG_arg = 0;
8949 PLFLT arg1 ;
8950 PLFLT arg2 ;
8951
8952 SWIG_check_num_args("plscmap1_range",2,2)
8953 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1_range",1,"PLFLT");
8954 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscmap1_range",2,"PLFLT");
8955 arg1 = (PLFLT)lua_tonumber(L, 1);
8956 arg2 = (PLFLT)lua_tonumber(L, 2);
8957 plscmap1_range(arg1,arg2);
8958
8959 return SWIG_arg;
8960
8961 fail: SWIGUNUSED;
8962 lua_error(L);
8963 return 0;
8964}
8965
8966
8967static int _wrap_gcmap1_range(lua_State* L) {
8968 int SWIG_arg = 0;
8969 PLFLT *arg1 = 0 ;
8970 PLFLT *arg2 = 0 ;
8971 PLFLT temp1 ;
8972 PLFLT temp2 ;
8973
8974 arg1 = &temp1;
8975 arg2 = &temp2;
8976 SWIG_check_num_args("plgcmap1_range",0,0)
8977 plgcmap1_range(arg1,arg2);
8978
8979 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
8980 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
8981 return SWIG_arg;
8982
8983 fail: SWIGUNUSED;
8984 lua_error(L);
8985 return 0;
8986}
8987
8988
8989static int _wrap_scol0(lua_State* L) {
8990 int SWIG_arg = 0;
8991 PLINT arg1 ;
8992 PLINT arg2 ;
8993 PLINT arg3 ;
8994 PLINT arg4 ;
8995
8996 SWIG_check_num_args("plscol0",4,4)
8997 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscol0",1,"PLINT");
8998 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscol0",2,"PLINT");
8999 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscol0",3,"PLINT");
9000 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscol0",4,"PLINT");
9001 arg1 = (PLINT)lua_tonumber(L, 1);
9002 arg2 = (PLINT)lua_tonumber(L, 2);
9003 arg3 = (PLINT)lua_tonumber(L, 3);
9004 arg4 = (PLINT)lua_tonumber(L, 4);
9005 plscol0(arg1,arg2,arg3,arg4);
9006
9007 return SWIG_arg;
9008
9009 fail: SWIGUNUSED;
9010 lua_error(L);
9011 return 0;
9012}
9013
9014
9015static int _wrap_scol0a(lua_State* L) {
9016 int SWIG_arg = 0;
9017 PLINT arg1 ;
9018 PLINT arg2 ;
9019 PLINT arg3 ;
9020 PLINT arg4 ;
9021 PLFLT arg5 ;
9022
9023 SWIG_check_num_args("plscol0a",5,5)
9024 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscol0a",1,"PLINT");
9025 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscol0a",2,"PLINT");
9026 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscol0a",3,"PLINT");
9027 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscol0a",4,"PLINT");
9028 if(!lua_isnumber(L,5)) SWIG_fail_arg("plscol0a",5,"PLFLT");
9029 arg1 = (PLINT)lua_tonumber(L, 1);
9030 arg2 = (PLINT)lua_tonumber(L, 2);
9031 arg3 = (PLINT)lua_tonumber(L, 3);
9032 arg4 = (PLINT)lua_tonumber(L, 4);
9033 arg5 = (PLFLT)lua_tonumber(L, 5);
9034 plscol0a(arg1,arg2,arg3,arg4,arg5);
9035
9036 return SWIG_arg;
9037
9038 fail: SWIGUNUSED;
9039 lua_error(L);
9040 return 0;
9041}
9042
9043
9044static int _wrap_scolbg(lua_State* L) {
9045 int SWIG_arg = 0;
9046 PLINT arg1 ;
9047 PLINT arg2 ;
9048 PLINT arg3 ;
9049
9050 SWIG_check_num_args("plscolbg",3,3)
9051 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolbg",1,"PLINT");
9052 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscolbg",2,"PLINT");
9053 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscolbg",3,"PLINT");
9054 arg1 = (PLINT)lua_tonumber(L, 1);
9055 arg2 = (PLINT)lua_tonumber(L, 2);
9056 arg3 = (PLINT)lua_tonumber(L, 3);
9057 plscolbg(arg1,arg2,arg3);
9058
9059 return SWIG_arg;
9060
9061 fail: SWIGUNUSED;
9062 lua_error(L);
9063 return 0;
9064}
9065
9066
9067static int _wrap_scolbga(lua_State* L) {
9068 int SWIG_arg = 0;
9069 PLINT arg1 ;
9070 PLINT arg2 ;
9071 PLINT arg3 ;
9072 PLFLT arg4 ;
9073
9074 SWIG_check_num_args("plscolbga",4,4)
9075 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolbga",1,"PLINT");
9076 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscolbga",2,"PLINT");
9077 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscolbga",3,"PLINT");
9078 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscolbga",4,"PLFLT");
9079 arg1 = (PLINT)lua_tonumber(L, 1);
9080 arg2 = (PLINT)lua_tonumber(L, 2);
9081 arg3 = (PLINT)lua_tonumber(L, 3);
9082 arg4 = (PLFLT)lua_tonumber(L, 4);
9083 plscolbga(arg1,arg2,arg3,arg4);
9084
9085 return SWIG_arg;
9086
9087 fail: SWIGUNUSED;
9088 lua_error(L);
9089 return 0;
9090}
9091
9092
9093static int _wrap_scolor(lua_State* L) {
9094 int SWIG_arg = 0;
9095 PLINT arg1 ;
9096
9097 SWIG_check_num_args("plscolor",1,1)
9098 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolor",1,"PLINT");
9099 arg1 = (PLINT)lua_tonumber(L, 1);
9100 plscolor(arg1);
9101
9102 return SWIG_arg;
9103
9104 fail: SWIGUNUSED;
9105 lua_error(L);
9106 return 0;
9107}
9108
9109
9110static int _wrap_scompression(lua_State* L) {
9111 int SWIG_arg = 0;
9112 PLINT arg1 ;
9113
9114 SWIG_check_num_args("plscompression",1,1)
9115 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscompression",1,"PLINT");
9116 arg1 = (PLINT)lua_tonumber(L, 1);
9117 plscompression(arg1);
9118
9119 return SWIG_arg;
9120
9121 fail: SWIGUNUSED;
9122 lua_error(L);
9123 return 0;
9124}
9125
9126
9127static int _wrap_sdev(lua_State* L) {
9128 int SWIG_arg = 0;
9129 char *arg1 = 0 ;
9130
9131 SWIG_check_num_args("plsdev",1,1)
9132 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsdev",1,"char const *");
9133 arg1 = (char *)lua_tostring(L, 1);
9134 plsdev((char const *)arg1);
9135
9136 return SWIG_arg;
9137
9138 fail: SWIGUNUSED;
9139 lua_error(L);
9140 return 0;
9141}
9142
9143
9144static int _wrap_sdidev(lua_State* L) {
9145 int SWIG_arg = 0;
9146 PLFLT arg1 ;
9147 PLFLT arg2 ;
9148 PLFLT arg3 ;
9149 PLFLT arg4 ;
9150
9151 SWIG_check_num_args("plsdidev",4,4)
9152 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdidev",1,"PLFLT");
9153 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdidev",2,"PLFLT");
9154 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdidev",3,"PLFLT");
9155 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdidev",4,"PLFLT");
9156 arg1 = (PLFLT)lua_tonumber(L, 1);
9157 arg2 = (PLFLT)lua_tonumber(L, 2);
9158 arg3 = (PLFLT)lua_tonumber(L, 3);
9159 arg4 = (PLFLT)lua_tonumber(L, 4);
9160 plsdidev(arg1,arg2,arg3,arg4);
9161
9162 return SWIG_arg;
9163
9164 fail: SWIGUNUSED;
9165 lua_error(L);
9166 return 0;
9167}
9168
9169
9170static int _wrap_sdimap(lua_State* L) {
9171 int SWIG_arg = 0;
9172 PLINT arg1 ;
9173 PLINT arg2 ;
9174 PLINT arg3 ;
9175 PLINT arg4 ;
9176 PLFLT arg5 ;
9177 PLFLT arg6 ;
9178
9179 SWIG_check_num_args("plsdimap",6,6)
9180 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdimap",1,"PLINT");
9181 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdimap",2,"PLINT");
9182 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdimap",3,"PLINT");
9183 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdimap",4,"PLINT");
9184 if(!lua_isnumber(L,5)) SWIG_fail_arg("plsdimap",5,"PLFLT");
9185 if(!lua_isnumber(L,6)) SWIG_fail_arg("plsdimap",6,"PLFLT");
9186 arg1 = (PLINT)lua_tonumber(L, 1);
9187 arg2 = (PLINT)lua_tonumber(L, 2);
9188 arg3 = (PLINT)lua_tonumber(L, 3);
9189 arg4 = (PLINT)lua_tonumber(L, 4);
9190 arg5 = (PLFLT)lua_tonumber(L, 5);
9191 arg6 = (PLFLT)lua_tonumber(L, 6);
9192 plsdimap(arg1,arg2,arg3,arg4,arg5,arg6);
9193
9194 return SWIG_arg;
9195
9196 fail: SWIGUNUSED;
9197 lua_error(L);
9198 return 0;
9199}
9200
9201
9202static int _wrap_sdiori(lua_State* L) {
9203 int SWIG_arg = 0;
9204 PLFLT arg1 ;
9205
9206 SWIG_check_num_args("plsdiori",1,1)
9207 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiori",1,"PLFLT");
9208 arg1 = (PLFLT)lua_tonumber(L, 1);
9209 plsdiori(arg1);
9210
9211 return SWIG_arg;
9212
9213 fail: SWIGUNUSED;
9214 lua_error(L);
9215 return 0;
9216}
9217
9218
9219static int _wrap_sdiplt(lua_State* L) {
9220 int SWIG_arg = 0;
9221 PLFLT arg1 ;
9222 PLFLT arg2 ;
9223 PLFLT arg3 ;
9224 PLFLT arg4 ;
9225
9226 SWIG_check_num_args("plsdiplt",4,4)
9227 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiplt",1,"PLFLT");
9228 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdiplt",2,"PLFLT");
9229 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdiplt",3,"PLFLT");
9230 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdiplt",4,"PLFLT");
9231 arg1 = (PLFLT)lua_tonumber(L, 1);
9232 arg2 = (PLFLT)lua_tonumber(L, 2);
9233 arg3 = (PLFLT)lua_tonumber(L, 3);
9234 arg4 = (PLFLT)lua_tonumber(L, 4);
9235 plsdiplt(arg1,arg2,arg3,arg4);
9236
9237 return SWIG_arg;
9238
9239 fail: SWIGUNUSED;
9240 lua_error(L);
9241 return 0;
9242}
9243
9244
9245static int _wrap_sdiplz(lua_State* L) {
9246 int SWIG_arg = 0;
9247 PLFLT arg1 ;
9248 PLFLT arg2 ;
9249 PLFLT arg3 ;
9250 PLFLT arg4 ;
9251
9252 SWIG_check_num_args("plsdiplz",4,4)
9253 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiplz",1,"PLFLT");
9254 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdiplz",2,"PLFLT");
9255 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdiplz",3,"PLFLT");
9256 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdiplz",4,"PLFLT");
9257 arg1 = (PLFLT)lua_tonumber(L, 1);
9258 arg2 = (PLFLT)lua_tonumber(L, 2);
9259 arg3 = (PLFLT)lua_tonumber(L, 3);
9260 arg4 = (PLFLT)lua_tonumber(L, 4);
9261 plsdiplz(arg1,arg2,arg3,arg4);
9262
9263 return SWIG_arg;
9264
9265 fail: SWIGUNUSED;
9266 lua_error(L);
9267 return 0;
9268}
9269
9270
9271static int _wrap_seed(lua_State* L) {
9272 int SWIG_arg = 0;
9273 unsigned int arg1 ;
9274
9275 SWIG_check_num_args("plseed",1,1)
9276 if(!lua_isnumber(L,1)) SWIG_fail_arg("plseed",1,"unsigned int");
9277 SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
9278 arg1 = (unsigned int)lua_tonumber(L, 1);
9279 plseed(arg1);
9280
9281 return SWIG_arg;
9282
9283 fail: SWIGUNUSED;
9284 lua_error(L);
9285 return 0;
9286}
9287
9288
9289static int _wrap_sesc(lua_State* L) {
9290 int SWIG_arg = 0;
9291 char arg1 ;
9292
9293 SWIG_check_num_args("plsesc",1,1)
9294 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsesc",1,"char");
9295 arg1 = (lua_tostring(L, 1))[0];
9296 plsesc(arg1);
9297
9298 return SWIG_arg;
9299
9300 fail: SWIGUNUSED;
9301 lua_error(L);
9302 return 0;
9303}
9304
9305
9306static int _wrap_setopt(lua_State* L) {
9307 int SWIG_arg = 0;
9308 char *arg1 = 0 ;
9309 char *arg2 = 0 ;
9310 PLINT result;
9311
9312 SWIG_check_num_args("plsetopt",2,2)
9313 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsetopt",1,"char const *");
9314 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plsetopt",2,"char const *");
9315 arg1 = (char *)lua_tostring(L, 1);
9316 arg2 = (char *)lua_tostring(L, 2);
9317 result = (PLINT)plsetopt((char const *)arg1,(char const *)arg2);
9318 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
9319 return SWIG_arg;
9320
9321 fail: SWIGUNUSED;
9322 lua_error(L);
9323 return 0;
9324}
9325
9326
9327static int _wrap_sfam(lua_State* L) {
9328 int SWIG_arg = 0;
9329 PLINT arg1 ;
9330 PLINT arg2 ;
9331 PLINT arg3 ;
9332
9333 SWIG_check_num_args("plsfam",3,3)
9334 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfam",1,"PLINT");
9335 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsfam",2,"PLINT");
9336 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsfam",3,"PLINT");
9337 arg1 = (PLINT)lua_tonumber(L, 1);
9338 arg2 = (PLINT)lua_tonumber(L, 2);
9339 arg3 = (PLINT)lua_tonumber(L, 3);
9340 plsfam(arg1,arg2,arg3);
9341
9342 return SWIG_arg;
9343
9344 fail: SWIGUNUSED;
9345 lua_error(L);
9346 return 0;
9347}
9348
9349
9350static int _wrap_sfci(lua_State* L) {
9351 int SWIG_arg = 0;
9352 PLUNICODE arg1 ;
9353
9354 SWIG_check_num_args("plsfci",1,1)
9355 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfci",1,"PLUNICODE");
9356 SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative");
9357 arg1 = (PLUNICODE)lua_tonumber(L, 1);
9358 plsfci(arg1);
9359
9360 return SWIG_arg;
9361
9362 fail: SWIGUNUSED;
9363 lua_error(L);
9364 return 0;
9365}
9366
9367
9368static int _wrap_sfnam(lua_State* L) {
9369 int SWIG_arg = 0;
9370 char *arg1 = 0 ;
9371
9372 SWIG_check_num_args("plsfnam",1,1)
9373 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsfnam",1,"char const *");
9374 arg1 = (char *)lua_tostring(L, 1);
9375 plsfnam((char const *)arg1);
9376
9377 return SWIG_arg;
9378
9379 fail: SWIGUNUSED;
9380 lua_error(L);
9381 return 0;
9382}
9383
9384
9385static int _wrap_sfont(lua_State* L) {
9386 int SWIG_arg = 0;
9387 PLINT arg1 ;
9388 PLINT arg2 ;
9389 PLINT arg3 ;
9390
9391 SWIG_check_num_args("plsfont",3,3)
9392 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfont",1,"PLINT");
9393 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsfont",2,"PLINT");
9394 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsfont",3,"PLINT");
9395 arg1 = (PLINT)lua_tonumber(L, 1);
9396 arg2 = (PLINT)lua_tonumber(L, 2);
9397 arg3 = (PLINT)lua_tonumber(L, 3);
9398 plsfont(arg1,arg2,arg3);
9399
9400 return SWIG_arg;
9401
9402 fail: SWIGUNUSED;
9403 lua_error(L);
9404 return 0;
9405}
9406
9407
9408static int _wrap_shades(lua_State* L) {
9409 int SWIG_arg = 0;
9410 PLFLT **arg1 = 0 ;
9411 PLINT arg2 ;
9412 PLINT arg3 ;
9413 defined_func arg4 = 0 ;
9414 PLFLT arg5 ;
9415 PLFLT arg6 ;
9416 PLFLT arg7 ;
9417 PLFLT arg8 ;
9418 PLFLT *arg9 = 0 ;
9419 PLINT arg10 ;
9420 PLFLT arg11 ;
9421 PLINT arg12 ;
9422 PLFLT arg13 ;
9423 fill_func arg14 = 0 ;
9424 PLBOOL arg15 ;
9425 pltr_func arg16 = 0 ;
9426 PLPointer arg17 = 0 ;
9427 int ii1 ;
9428 PLcGrid cgrid117 ;
9429 PLcGrid2 cgrid217 ;
9430
9431 {
9432 cgrid117.xg = cgrid117.yg = cgrid117.zg = NULL;
9433 cgrid117.nx = cgrid117.ny = cgrid117.nz = 0;
9434 cgrid217.xg = cgrid217.yg = cgrid217.zg = NULL;
9435 cgrid217.nx = cgrid217.ny = 0;
9436 }
9437 {
9438 arg16 = NULL;
9439 }
9440 {
9441 arg17 = NULL;
9442 }
9443 {
9444 arg4 = NULL;
9445 }
9446 {
9447 arg14 = plfill;
9448 }
9449 SWIG_check_num_args("plshades",10,12)
9450 if(!lua_isnumber(L,2)) SWIG_fail_arg("plshades",2,"PLFLT");
9451 if(!lua_isnumber(L,3)) SWIG_fail_arg("plshades",3,"PLFLT");
9452 if(!lua_isnumber(L,4)) SWIG_fail_arg("plshades",4,"PLFLT");
9453 if(!lua_isnumber(L,5)) SWIG_fail_arg("plshades",5,"PLFLT");
9454 if(!lua_isnumber(L,7)) SWIG_fail_arg("plshades",7,"PLFLT");
9455 if(!lua_isnumber(L,8)) SWIG_fail_arg("plshades",8,"PLINT");
9456 if(!lua_isnumber(L,9)) SWIG_fail_arg("plshades",9,"PLFLT");
9457 if(!lua_isnumber(L,10)) SWIG_fail_arg("plshades",10,"PLBOOL");
9458 {
9459 int jj;
9460
9461 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
9462 if ( !arg1 )
9463 SWIG_fail;
9464 Xlen = arg2 = ii1;
9465 Ylen = arg3 = jj;
9466 }
9467 arg5 = (PLFLT)lua_tonumber(L, 2);
9468 arg6 = (PLFLT)lua_tonumber(L, 3);
9469 arg7 = (PLFLT)lua_tonumber(L, 4);
9470 arg8 = (PLFLT)lua_tonumber(L, 5);
9471 {
9472 int temp;
9473 arg9 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp );
9474 if ( !arg9 )
9475 SWIG_fail;
9476 arg10 = Alen = temp;
9477 }
9478 arg11 = (PLFLT)lua_tonumber(L, 7);
9479 arg12 = (PLINT)lua_tonumber(L, 8);
9480 arg13 = (PLFLT)lua_tonumber(L, 9);
9481 arg15 = (PLBOOL)lua_tonumber(L, 10);
9482 if(lua_gettop(L)>=11){
9483 {
9484 arg16 = NULL;
9485 mypltr_funcstr[0] = '\0';
9486
9487 if ( lua_isstring( L, 11 ) )
9488 {
9489 const char* funcstr = lua_tostring( L, 11 );
9490 if ( strcmp( "pltr0", funcstr ) == 0 )
9491 {
9492 arg16 = pltr0;
9493 }
9494 else if ( strcmp( "pltr1", funcstr ) == 0 )
9495 {
9496 arg16 = pltr1;
9497 }
9498 else if ( strcmp( "pltr2", funcstr ) == 0 )
9499 {
9500 arg16 = pltr2;
9501 }
9502 else
9503 {
9504 arg16 = mypltr;
9505 strncpy( mypltr_funcstr, funcstr, 255 );
9506 myL = L;
9507 }
9508 }
9509 else
9510 SWIG_fail_arg( "shades", 16, "pltr_func" );
9511 }
9512 }
9513 if(lua_gettop(L)>=12){
9514 {
9515 int nx, ny;
9516 int gridmode = 0;
9517
9518 lua_pushstring( L, "xg" );
9519 lua_gettable( L, 12 );
9520 if ( !lua_istable( L, -1 ) )
9521 {
9522 lua_pop( L, 1 ); // pop "xg"
9523 lua_pushstring( L, "expected a table xg" );
9524 SWIG_fail;
9525 }
9526 lua_rawgeti( L, -1, 1 );
9527 if ( lua_istable( L, -1 ) )
9528 gridmode = 2; // two dimensional array
9529 else if ( lua_isnumber( L, -1 ) )
9530 gridmode = 1; // one dimensional array
9531 else
9532 {
9533 lua_pop( L, 1 ); // pop "1"
9534 lua_pop( L, 1 ); // pop "xg"
9535 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
9536 SWIG_fail;
9537 }
9538 lua_pop( L, 1 ); // pop test element
9539 if ( gridmode == 1 )
9540 {
9541 cgrid117.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
9542 if ( !cgrid117.xg )
9543 {
9544 lua_pop( L, 1 ); // pop "xg"
9545 SWIG_fail;
9546 }
9547 if ( nx != Xlen )
9548 {
9549 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
9550 SWIG_fail;
9551 }
9552 cgrid117.nx = nx;
9553 }
9554 else
9555 {
9556 cgrid217.xg = read_double_Matrix( L, -1, &nx, &ny );
9557 if ( !cgrid217.xg )
9558 {
9559 lua_pop( L, 1 ); // pop "xg"
9560 SWIG_fail;
9561 }
9562 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9563 {
9564 lua_pop( L, 1 ); // pop "xg"
9565 lua_pushfstring( L, "Vectors must match matrix." );
9566 SWIG_fail;
9567 }
9568 cgrid217.nx = nx;
9569 cgrid217.ny = ny;
9570 }
9571 lua_pop( L, 1 ); // pop "xg"
9572
9573 lua_pushstring( L, "yg" );
9574 lua_gettable( L, 12 );
9575 if ( !lua_istable( L, -1 ) )
9576 {
9577 lua_pop( L, 1 );
9578 lua_pushstring( L, "expected a table yg" );
9579 SWIG_fail;
9580 }
9581 lua_rawgeti( L, -1, 1 );
9582 if ( gridmode == 2 )
9583 {
9584 if ( !lua_istable( L, -1 ) )
9585 {
9586 lua_pop( L, 1 ); // pop "1"
9587 lua_pop( L, 1 ); // pop "yg"
9588 lua_pushstring( L, "expected a two dimensional array/table in yg" );
9589 SWIG_fail;
9590 }
9591 }
9592 else
9593 {
9594 if ( !lua_isnumber( L, -1 ) )
9595 {
9596 lua_pop( L, 1 ); // pop "1"
9597 lua_pop( L, 1 ); // pop "yg"
9598 lua_pushstring( L, "expected a one dimensional array/table in yg" );
9599 SWIG_fail;
9600 }
9601 }
9602 lua_pop( L, 1 ); // pop "1"
9603 if ( gridmode == 1 )
9604 {
9605 cgrid117.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
9606 if ( !cgrid117.yg )
9607 {
9608 lua_pop( L, 1 ); // pop "yg"
9609 SWIG_fail;
9610 }
9611 if ( ny != Ylen )
9612 {
9613 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
9614 SWIG_fail;
9615 }
9616 cgrid117.ny = ny;
9617 }
9618 else
9619 {
9620 cgrid217.yg = read_double_Matrix( L, -1, &nx, &ny );
9621 if ( !cgrid217.yg )
9622 {
9623 lua_pop( L, 1 ); // pop "xg"
9624 SWIG_fail;
9625 }
9626 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9627 {
9628 lua_pop( L, 1 ); // pop "xg"
9629 lua_pushfstring( L, "Vectors must match matrix." );
9630 SWIG_fail;
9631 }
9632 // cgrid217.nx/ny already set
9633 }
9634 lua_pop( L, 1 ); // pop "yg"
9635
9636 if ( gridmode == 1 )
9637 arg17 = &cgrid117;
9638 else if ( gridmode == 2 )
9639 arg17 = &cgrid217;
9640 }
9641 }
9642 plshades((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,(double const *)arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
9643
9644 {
9645 int i;
9646
9647 if ( arg1 )
9648 {
9649 for ( i = 0; i < ii1; i++ )
9650 LUA_FREE_ARRAY( arg1[i] );
9651 LUA_FREE_ARRAY( arg1 );
9652 }
9653 }
9654 {
9655 LUA_FREE_ARRAY( arg9 );
9656 }
9657 {
9658 mypltr_funcstr[0] = '\0';
9659 }
9660 {
9661 int i;
9662
9663 LUA_FREE_ARRAY( cgrid117.xg );
9664 LUA_FREE_ARRAY( cgrid117.yg );
9665
9666 if ( cgrid217.xg )
9667 {
9668 for ( i = 0; i < Xlen; i++ )
9669 LUA_FREE_ARRAY( cgrid217.xg[i] );
9670 LUA_FREE_ARRAY( cgrid217.xg );
9671 }
9672 if ( cgrid217.yg )
9673 {
9674 for ( i = 0; i < Xlen; i++ )
9675 LUA_FREE_ARRAY( cgrid217.yg[i] );
9676 LUA_FREE_ARRAY( cgrid217.yg );
9677 }
9678 }
9679 return SWIG_arg;
9680
9681 fail: SWIGUNUSED;
9682 {
9683 int i;
9684
9685 if ( arg1 )
9686 {
9687 for ( i = 0; i < ii1; i++ )
9688 LUA_FREE_ARRAY( arg1[i] );
9689 LUA_FREE_ARRAY( arg1 );
9690 }
9691 }
9692 {
9693 LUA_FREE_ARRAY( arg9 );
9694 }
9695 {
9696 mypltr_funcstr[0] = '\0';
9697 }
9698 {
9699 int i;
9700
9701 LUA_FREE_ARRAY( cgrid117.xg );
9702 LUA_FREE_ARRAY( cgrid117.yg );
9703
9704 if ( cgrid217.xg )
9705 {
9706 for ( i = 0; i < Xlen; i++ )
9707 LUA_FREE_ARRAY( cgrid217.xg[i] );
9708 LUA_FREE_ARRAY( cgrid217.xg );
9709 }
9710 if ( cgrid217.yg )
9711 {
9712 for ( i = 0; i < Xlen; i++ )
9713 LUA_FREE_ARRAY( cgrid217.yg[i] );
9714 LUA_FREE_ARRAY( cgrid217.yg );
9715 }
9716 }
9717 lua_error(L);
9718 return 0;
9719}
9720
9721
9722static int _wrap_shade(lua_State* L) {
9723 int SWIG_arg = 0;
9724 PLFLT **arg1 = 0 ;
9725 PLINT arg2 ;
9726 PLINT arg3 ;
9727 defined_func arg4 = 0 ;
9728 PLFLT arg5 ;
9729 PLFLT arg6 ;
9730 PLFLT arg7 ;
9731 PLFLT arg8 ;
9732 PLFLT arg9 ;
9733 PLFLT arg10 ;
9734 PLINT arg11 ;
9735 PLFLT arg12 ;
9736 PLFLT arg13 ;
9737 PLINT arg14 ;
9738 PLFLT arg15 ;
9739 PLINT arg16 ;
9740 PLFLT arg17 ;
9741 fill_func arg18 = 0 ;
9742 PLBOOL arg19 ;
9743 pltr_func arg20 = 0 ;
9744 PLPointer arg21 = 0 ;
9745 int ii1 ;
9746 PLcGrid cgrid121 ;
9747 PLcGrid2 cgrid221 ;
9748
9749 {
9750 cgrid121.xg = cgrid121.yg = cgrid121.zg = NULL;
9751 cgrid121.nx = cgrid121.ny = cgrid121.nz = 0;
9752 cgrid221.xg = cgrid221.yg = cgrid221.zg = NULL;
9753 cgrid221.nx = cgrid221.ny = 0;
9754 }
9755 {
9756 arg20 = NULL;
9757 }
9758 {
9759 arg21 = NULL;
9760 }
9761 {
9762 arg4 = NULL;
9763 }
9764 {
9765 arg18 = plfill;
9766 }
9767 SWIG_check_num_args("plshade",15,17)
9768 if(!lua_isnumber(L,2)) SWIG_fail_arg("plshade",2,"PLFLT");
9769 if(!lua_isnumber(L,3)) SWIG_fail_arg("plshade",3,"PLFLT");
9770 if(!lua_isnumber(L,4)) SWIG_fail_arg("plshade",4,"PLFLT");
9771 if(!lua_isnumber(L,5)) SWIG_fail_arg("plshade",5,"PLFLT");
9772 if(!lua_isnumber(L,6)) SWIG_fail_arg("plshade",6,"PLFLT");
9773 if(!lua_isnumber(L,7)) SWIG_fail_arg("plshade",7,"PLFLT");
9774 if(!lua_isnumber(L,8)) SWIG_fail_arg("plshade",8,"PLINT");
9775 if(!lua_isnumber(L,9)) SWIG_fail_arg("plshade",9,"PLFLT");
9776 if(!lua_isnumber(L,10)) SWIG_fail_arg("plshade",10,"PLFLT");
9777 if(!lua_isnumber(L,11)) SWIG_fail_arg("plshade",11,"PLINT");
9778 if(!lua_isnumber(L,12)) SWIG_fail_arg("plshade",12,"PLFLT");
9779 if(!lua_isnumber(L,13)) SWIG_fail_arg("plshade",13,"PLINT");
9780 if(!lua_isnumber(L,14)) SWIG_fail_arg("plshade",14,"PLFLT");
9781 if(!lua_isnumber(L,15)) SWIG_fail_arg("plshade",15,"PLBOOL");
9782 {
9783 int jj;
9784
9785 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
9786 if ( !arg1 )
9787 SWIG_fail;
9788 Xlen = arg2 = ii1;
9789 Ylen = arg3 = jj;
9790 }
9791 arg5 = (PLFLT)lua_tonumber(L, 2);
9792 arg6 = (PLFLT)lua_tonumber(L, 3);
9793 arg7 = (PLFLT)lua_tonumber(L, 4);
9794 arg8 = (PLFLT)lua_tonumber(L, 5);
9795 arg9 = (PLFLT)lua_tonumber(L, 6);
9796 arg10 = (PLFLT)lua_tonumber(L, 7);
9797 arg11 = (PLINT)lua_tonumber(L, 8);
9798 arg12 = (PLFLT)lua_tonumber(L, 9);
9799 arg13 = (PLFLT)lua_tonumber(L, 10);
9800 arg14 = (PLINT)lua_tonumber(L, 11);
9801 arg15 = (PLFLT)lua_tonumber(L, 12);
9802 arg16 = (PLINT)lua_tonumber(L, 13);
9803 arg17 = (PLFLT)lua_tonumber(L, 14);
9804 arg19 = (PLBOOL)lua_tonumber(L, 15);
9805 if(lua_gettop(L)>=16){
9806 {
9807 arg20 = NULL;
9808 mypltr_funcstr[0] = '\0';
9809
9810 if ( lua_isstring( L, 16 ) )
9811 {
9812 const char* funcstr = lua_tostring( L, 16 );
9813 if ( strcmp( "pltr0", funcstr ) == 0 )
9814 {
9815 arg20 = pltr0;
9816 }
9817 else if ( strcmp( "pltr1", funcstr ) == 0 )
9818 {
9819 arg20 = pltr1;
9820 }
9821 else if ( strcmp( "pltr2", funcstr ) == 0 )
9822 {
9823 arg20 = pltr2;
9824 }
9825 else
9826 {
9827 arg20 = mypltr;
9828 strncpy( mypltr_funcstr, funcstr, 255 );
9829 myL = L;
9830 }
9831 }
9832 else
9833 SWIG_fail_arg( "shade", 20, "pltr_func" );
9834 }
9835 }
9836 if(lua_gettop(L)>=17){
9837 {
9838 int nx, ny;
9839 int gridmode = 0;
9840
9841 lua_pushstring( L, "xg" );
9842 lua_gettable( L, 17 );
9843 if ( !lua_istable( L, -1 ) )
9844 {
9845 lua_pop( L, 1 ); // pop "xg"
9846 lua_pushstring( L, "expected a table xg" );
9847 SWIG_fail;
9848 }
9849 lua_rawgeti( L, -1, 1 );
9850 if ( lua_istable( L, -1 ) )
9851 gridmode = 2; // two dimensional array
9852 else if ( lua_isnumber( L, -1 ) )
9853 gridmode = 1; // one dimensional array
9854 else
9855 {
9856 lua_pop( L, 1 ); // pop "1"
9857 lua_pop( L, 1 ); // pop "xg"
9858 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
9859 SWIG_fail;
9860 }
9861 lua_pop( L, 1 ); // pop test element
9862 if ( gridmode == 1 )
9863 {
9864 cgrid121.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
9865 if ( !cgrid121.xg )
9866 {
9867 lua_pop( L, 1 ); // pop "xg"
9868 SWIG_fail;
9869 }
9870 if ( nx != Xlen )
9871 {
9872 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
9873 SWIG_fail;
9874 }
9875 cgrid121.nx = nx;
9876 }
9877 else
9878 {
9879 cgrid221.xg = read_double_Matrix( L, -1, &nx, &ny );
9880 if ( !cgrid221.xg )
9881 {
9882 lua_pop( L, 1 ); // pop "xg"
9883 SWIG_fail;
9884 }
9885 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9886 {
9887 lua_pop( L, 1 ); // pop "xg"
9888 lua_pushfstring( L, "Vectors must match matrix." );
9889 SWIG_fail;
9890 }
9891 cgrid221.nx = nx;
9892 cgrid221.ny = ny;
9893 }
9894 lua_pop( L, 1 ); // pop "xg"
9895
9896 lua_pushstring( L, "yg" );
9897 lua_gettable( L, 17 );
9898 if ( !lua_istable( L, -1 ) )
9899 {
9900 lua_pop( L, 1 );
9901 lua_pushstring( L, "expected a table yg" );
9902 SWIG_fail;
9903 }
9904 lua_rawgeti( L, -1, 1 );
9905 if ( gridmode == 2 )
9906 {
9907 if ( !lua_istable( L, -1 ) )
9908 {
9909 lua_pop( L, 1 ); // pop "1"
9910 lua_pop( L, 1 ); // pop "yg"
9911 lua_pushstring( L, "expected a two dimensional array/table in yg" );
9912 SWIG_fail;
9913 }
9914 }
9915 else
9916 {
9917 if ( !lua_isnumber( L, -1 ) )
9918 {
9919 lua_pop( L, 1 ); // pop "1"
9920 lua_pop( L, 1 ); // pop "yg"
9921 lua_pushstring( L, "expected a one dimensional array/table in yg" );
9922 SWIG_fail;
9923 }
9924 }
9925 lua_pop( L, 1 ); // pop "1"
9926 if ( gridmode == 1 )
9927 {
9928 cgrid121.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
9929 if ( !cgrid121.yg )
9930 {
9931 lua_pop( L, 1 ); // pop "yg"
9932 SWIG_fail;
9933 }
9934 if ( ny != Ylen )
9935 {
9936 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
9937 SWIG_fail;
9938 }
9939 cgrid121.ny = ny;
9940 }
9941 else
9942 {
9943 cgrid221.yg = read_double_Matrix( L, -1, &nx, &ny );
9944 if ( !cgrid221.yg )
9945 {
9946 lua_pop( L, 1 ); // pop "xg"
9947 SWIG_fail;
9948 }
9949 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9950 {
9951 lua_pop( L, 1 ); // pop "xg"
9952 lua_pushfstring( L, "Vectors must match matrix." );
9953 SWIG_fail;
9954 }
9955 // cgrid221.nx/ny already set
9956 }
9957 lua_pop( L, 1 ); // pop "yg"
9958
9959 if ( gridmode == 1 )
9960 arg21 = &cgrid121;
9961 else if ( gridmode == 2 )
9962 arg21 = &cgrid221;
9963 }
9964 }
9965 plshade((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21);
9966
9967 {
9968 int i;
9969
9970 if ( arg1 )
9971 {
9972 for ( i = 0; i < ii1; i++ )
9973 LUA_FREE_ARRAY( arg1[i] );
9974 LUA_FREE_ARRAY( arg1 );
9975 }
9976 }
9977 {
9978 mypltr_funcstr[0] = '\0';
9979 }
9980 {
9981 int i;
9982
9983 LUA_FREE_ARRAY( cgrid121.xg );
9984 LUA_FREE_ARRAY( cgrid121.yg );
9985
9986 if ( cgrid221.xg )
9987 {
9988 for ( i = 0; i < Xlen; i++ )
9989 LUA_FREE_ARRAY( cgrid221.xg[i] );
9990 LUA_FREE_ARRAY( cgrid221.xg );
9991 }
9992 if ( cgrid221.yg )
9993 {
9994 for ( i = 0; i < Xlen; i++ )
9995 LUA_FREE_ARRAY( cgrid221.yg[i] );
9996 LUA_FREE_ARRAY( cgrid221.yg );
9997 }
9998 }
9999 return SWIG_arg;
10000
10001 fail: SWIGUNUSED;
10002 {
10003 int i;
10004
10005 if ( arg1 )
10006 {
10007 for ( i = 0; i < ii1; i++ )
10008 LUA_FREE_ARRAY( arg1[i] );
10009 LUA_FREE_ARRAY( arg1 );
10010 }
10011 }
10012 {
10013 mypltr_funcstr[0] = '\0';
10014 }
10015 {
10016 int i;
10017
10018 LUA_FREE_ARRAY( cgrid121.xg );
10019 LUA_FREE_ARRAY( cgrid121.yg );
10020
10021 if ( cgrid221.xg )
10022 {
10023 for ( i = 0; i < Xlen; i++ )
10024 LUA_FREE_ARRAY( cgrid221.xg[i] );
10025 LUA_FREE_ARRAY( cgrid221.xg );
10026 }
10027 if ( cgrid221.yg )
10028 {
10029 for ( i = 0; i < Xlen; i++ )
10030 LUA_FREE_ARRAY( cgrid221.yg[i] );
10031 LUA_FREE_ARRAY( cgrid221.yg );
10032 }
10033 }
10034 lua_error(L);
10035 return 0;
10036}
10037
10038
10039static int _wrap_slabelfunc(lua_State* L) {
10040 int SWIG_arg = 0;
10041 label_func arg1 = 0 ;
10042 PLPointer arg2 = 0 ;
10043
10044 {
10045 arg2 = NULL;
10046 }
10047 SWIG_check_num_args("plslabelfunc",1,1)
10048 {
10049 arg1 = NULL;
10050 mylabel_funcstr[0] = '\0';
10051
10052 if ( lua_isnil( L, 1 ) )
10053 {
10054 arg1 = NULL;
10055 }
10056 else if ( lua_isstring( L, 1 ) )
10057 {
10058 arg1 = mylabel;
10059 strncpy( mylabel_funcstr, lua_tostring( L, 1 ), 255 );
10060 myL = L;
10061 }
10062 else
10063 SWIG_fail_arg( "slabelfunc", 1, "label_func" );
10064 }
10065 plslabelfunc(arg1,arg2);
10066
10067 {
10068
10069 }
10070 return SWIG_arg;
10071
10072 fail: SWIGUNUSED;
10073 {
10074
10075 }
10076 lua_error(L);
10077 return 0;
10078}
10079
10080
10081static int _wrap_smaj(lua_State* L) {
10082 int SWIG_arg = 0;
10083 PLFLT arg1 ;
10084 PLFLT arg2 ;
10085
10086 SWIG_check_num_args("plsmaj",2,2)
10087 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsmaj",1,"PLFLT");
10088 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsmaj",2,"PLFLT");
10089 arg1 = (PLFLT)lua_tonumber(L, 1);
10090 arg2 = (PLFLT)lua_tonumber(L, 2);
10091 plsmaj(arg1,arg2);
10092
10093 return SWIG_arg;
10094
10095 fail: SWIGUNUSED;
10096 lua_error(L);
10097 return 0;
10098}
10099
10100
10101static int _wrap_smin(lua_State* L) {
10102 int SWIG_arg = 0;
10103 PLFLT arg1 ;
10104 PLFLT arg2 ;
10105
10106 SWIG_check_num_args("plsmin",2,2)
10107 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsmin",1,"PLFLT");
10108 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsmin",2,"PLFLT");
10109 arg1 = (PLFLT)lua_tonumber(L, 1);
10110 arg2 = (PLFLT)lua_tonumber(L, 2);
10111 plsmin(arg1,arg2);
10112
10113 return SWIG_arg;
10114
10115 fail: SWIGUNUSED;
10116 lua_error(L);
10117 return 0;
10118}
10119
10120
10121static int _wrap_sori(lua_State* L) {
10122 int SWIG_arg = 0;
10123 PLINT arg1 ;
10124
10125 SWIG_check_num_args("plsori",1,1)
10126 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsori",1,"PLINT");
10127 arg1 = (PLINT)lua_tonumber(L, 1);
10128 plsori(arg1);
10129
10130 return SWIG_arg;
10131
10132 fail: SWIGUNUSED;
10133 lua_error(L);
10134 return 0;
10135}
10136
10137
10138static int _wrap_spage(lua_State* L) {
10139 int SWIG_arg = 0;
10140 PLFLT arg1 ;
10141 PLFLT arg2 ;
10142 PLINT arg3 ;
10143 PLINT arg4 ;
10144 PLINT arg5 ;
10145 PLINT arg6 ;
10146
10147 SWIG_check_num_args("plspage",6,6)
10148 if(!lua_isnumber(L,1)) SWIG_fail_arg("plspage",1,"PLFLT");
10149 if(!lua_isnumber(L,2)) SWIG_fail_arg("plspage",2,"PLFLT");
10150 if(!lua_isnumber(L,3)) SWIG_fail_arg("plspage",3,"PLINT");
10151 if(!lua_isnumber(L,4)) SWIG_fail_arg("plspage",4,"PLINT");
10152 if(!lua_isnumber(L,5)) SWIG_fail_arg("plspage",5,"PLINT");
10153 if(!lua_isnumber(L,6)) SWIG_fail_arg("plspage",6,"PLINT");
10154 arg1 = (PLFLT)lua_tonumber(L, 1);
10155 arg2 = (PLFLT)lua_tonumber(L, 2);
10156 arg3 = (PLINT)lua_tonumber(L, 3);
10157 arg4 = (PLINT)lua_tonumber(L, 4);
10158 arg5 = (PLINT)lua_tonumber(L, 5);
10159 arg6 = (PLINT)lua_tonumber(L, 6);
10160 plspage(arg1,arg2,arg3,arg4,arg5,arg6);
10161
10162 return SWIG_arg;
10163
10164 fail: SWIGUNUSED;
10165 lua_error(L);
10166 return 0;
10167}
10168
10169
10170static int _wrap_spal0(lua_State* L) {
10171 int SWIG_arg = 0;
10172 char *arg1 = 0 ;
10173
10174 SWIG_check_num_args("plspal0",1,1)
10175 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plspal0",1,"char const *");
10176 arg1 = (char *)lua_tostring(L, 1);
10177 plspal0((char const *)arg1);
10178
10179 return SWIG_arg;
10180
10181 fail: SWIGUNUSED;
10182 lua_error(L);
10183 return 0;
10184}
10185
10186
10187static int _wrap_spal1(lua_State* L) {
10188 int SWIG_arg = 0;
10189 char *arg1 = 0 ;
10190 PLBOOL arg2 ;
10191
10192 SWIG_check_num_args("plspal1",2,2)
10193 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plspal1",1,"char const *");
10194 if(!lua_isnumber(L,2)) SWIG_fail_arg("plspal1",2,"PLBOOL");
10195 arg1 = (char *)lua_tostring(L, 1);
10196 arg2 = (PLBOOL)lua_tonumber(L, 2);
10197 plspal1((char const *)arg1,arg2);
10198
10199 return SWIG_arg;
10200
10201 fail: SWIGUNUSED;
10202 lua_error(L);
10203 return 0;
10204}
10205
10206
10207static int _wrap_spause(lua_State* L) {
10208 int SWIG_arg = 0;
10209 PLBOOL arg1 ;
10210
10211 SWIG_check_num_args("plspause",1,1)
10212 if(!lua_isnumber(L,1)) SWIG_fail_arg("plspause",1,"PLBOOL");
10213 arg1 = (PLBOOL)lua_tonumber(L, 1);
10214 plspause(arg1);
10215
10216 return SWIG_arg;
10217
10218 fail: SWIGUNUSED;
10219 lua_error(L);
10220 return 0;
10221}
10222
10223
10224static int _wrap_sstrm(lua_State* L) {
10225 int SWIG_arg = 0;
10226 PLINT arg1 ;
10227
10228 SWIG_check_num_args("plsstrm",1,1)
10229 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsstrm",1,"PLINT");
10230 arg1 = (PLINT)lua_tonumber(L, 1);
10231 plsstrm(arg1);
10232
10233 return SWIG_arg;
10234
10235 fail: SWIGUNUSED;
10236 lua_error(L);
10237 return 0;
10238}
10239
10240
10241static int _wrap_ssub(lua_State* L) {
10242 int SWIG_arg = 0;
10243 PLINT arg1 ;
10244 PLINT arg2 ;
10245
10246 SWIG_check_num_args("plssub",2,2)
10247 if(!lua_isnumber(L,1)) SWIG_fail_arg("plssub",1,"PLINT");
10248 if(!lua_isnumber(L,2)) SWIG_fail_arg("plssub",2,"PLINT");
10249 arg1 = (PLINT)lua_tonumber(L, 1);
10250 arg2 = (PLINT)lua_tonumber(L, 2);
10251 plssub(arg1,arg2);
10252
10253 return SWIG_arg;
10254
10255 fail: SWIGUNUSED;
10256 lua_error(L);
10257 return 0;
10258}
10259
10260
10261static int _wrap_ssym(lua_State* L) {
10262 int SWIG_arg = 0;
10263 PLFLT arg1 ;
10264 PLFLT arg2 ;
10265
10266 SWIG_check_num_args("plssym",2,2)
10267 if(!lua_isnumber(L,1)) SWIG_fail_arg("plssym",1,"PLFLT");
10268 if(!lua_isnumber(L,2)) SWIG_fail_arg("plssym",2,"PLFLT");
10269 arg1 = (PLFLT)lua_tonumber(L, 1);
10270 arg2 = (PLFLT)lua_tonumber(L, 2);
10271 plssym(arg1,arg2);
10272
10273 return SWIG_arg;
10274
10275 fail: SWIGUNUSED;
10276 lua_error(L);
10277 return 0;
10278}
10279
10280
10281static int _wrap_star(lua_State* L) {
10282 int SWIG_arg = 0;
10283 PLINT arg1 ;
10284 PLINT arg2 ;
10285
10286 SWIG_check_num_args("plstar",2,2)
10287 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstar",1,"PLINT");
10288 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstar",2,"PLINT");
10289 arg1 = (PLINT)lua_tonumber(L, 1);
10290 arg2 = (PLINT)lua_tonumber(L, 2);
10291 plstar(arg1,arg2);
10292
10293 return SWIG_arg;
10294
10295 fail: SWIGUNUSED;
10296 lua_error(L);
10297 return 0;
10298}
10299
10300
10301static int _wrap_start(lua_State* L) {
10302 int SWIG_arg = 0;
10303 char *arg1 = 0 ;
10304 PLINT arg2 ;
10305 PLINT arg3 ;
10306
10307 SWIG_check_num_args("plstart",3,3)
10308 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plstart",1,"char const *");
10309 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstart",2,"PLINT");
10310 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstart",3,"PLINT");
10311 arg1 = (char *)lua_tostring(L, 1);
10312 arg2 = (PLINT)lua_tonumber(L, 2);
10313 arg3 = (PLINT)lua_tonumber(L, 3);
10314 plstart((char const *)arg1,arg2,arg3);
10315
10316 return SWIG_arg;
10317
10318 fail: SWIGUNUSED;
10319 lua_error(L);
10320 return 0;
10321}
10322
10323
10324static int _wrap_stransform(lua_State* L) {
10325 int SWIG_arg = 0;
10326 ct_func arg1 = 0 ;
10327 PLPointer arg2 = 0 ;
10328
10329 {
10330 arg1 = NULL;
10331 myct_funcstr[0] = '\0';
10332 }
10333 {
10334 arg2 = NULL;
10335 }
10336 SWIG_check_num_args("plstransform",0,1)
10337 if(lua_gettop(L)>=1){
10338 {
10339 arg1 = NULL;
10340 myct_funcstr[0] = '\0';
10341
10342 if ( lua_isstring( L, 1 ) )
10343 {
10344 const char* funcstr = lua_tostring( L, 1 );
10345 arg1 = myct;
10346 strncpy( myct_funcstr, funcstr, 255 );
10347 myL = L;
10348 }
10349 else
10350 SWIG_fail_arg( "stransform", 1, "ct_func" );
10351 }
10352 }
10353 plstransform(arg1,arg2);
10354
10355 return SWIG_arg;
10356
10357 fail: SWIGUNUSED;
10358 lua_error(L);
10359 return 0;
10360}
10361
10362
10363static int _wrap_string(lua_State* L) {
10364 int SWIG_arg = 0;
10365 PLINT arg1 ;
10366 PLFLT *arg2 = 0 ;
10367 PLFLT *arg3 = 0 ;
10368 char *arg4 = 0 ;
10369 int temp3 ;
10370
10371 SWIG_check_num_args("plstring",3,3)
10372 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plstring",3,"char const *");
10373 {
10374 int temp;
10375 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10376 if ( !arg2 )
10377 SWIG_fail;
10378 arg1 = Alen = temp;
10379 }
10380 {
10381 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10382 if ( !arg3 )
10383 SWIG_fail;
10384 if ( temp3 != Alen )
10385 {
10386 lua_pushfstring( L, "Tables must be of same length." );
10387 SWIG_fail;
10388 }
10389 }
10390 arg4 = (char *)lua_tostring(L, 3);
10391 plstring(arg1,(double const *)arg2,(double const *)arg3,(char const *)arg4);
10392
10393 {
10394 LUA_FREE_ARRAY( arg2 );
10395 }
10396 {
10397 LUA_FREE_ARRAY( arg3 );
10398 }
10399 return SWIG_arg;
10400
10401 fail: SWIGUNUSED;
10402 {
10403 LUA_FREE_ARRAY( arg2 );
10404 }
10405 {
10406 LUA_FREE_ARRAY( arg3 );
10407 }
10408 lua_error(L);
10409 return 0;
10410}
10411
10412
10413static int _wrap_string3(lua_State* L) {
10414 int SWIG_arg = 0;
10415 PLINT arg1 ;
10416 PLFLT *arg2 = 0 ;
10417 PLFLT *arg3 = 0 ;
10418 PLFLT *arg4 = 0 ;
10419 char *arg5 = 0 ;
10420 int temp3 ;
10421 int temp4 ;
10422
10423 SWIG_check_num_args("plstring3",4,4)
10424 if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("plstring3",4,"char const *");
10425 {
10426 int temp;
10427 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10428 if ( !arg2 )
10429 SWIG_fail;
10430 arg1 = Alen = temp;
10431 }
10432 {
10433 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10434 if ( !arg3 )
10435 SWIG_fail;
10436 if ( temp3 != Alen )
10437 {
10438 lua_pushfstring( L, "Tables must be of same length." );
10439 SWIG_fail;
10440 }
10441 }
10442 {
10443 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
10444 if ( !arg4 )
10445 SWIG_fail;
10446 if ( temp4 != Alen )
10447 {
10448 lua_pushfstring( L, "Tables must be of same length." );
10449 SWIG_fail;
10450 }
10451 }
10452 arg5 = (char *)lua_tostring(L, 4);
10453 plstring3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,(char const *)arg5);
10454
10455 {
10456 LUA_FREE_ARRAY( arg2 );
10457 }
10458 {
10459 LUA_FREE_ARRAY( arg3 );
10460 }
10461 {
10462 LUA_FREE_ARRAY( arg4 );
10463 }
10464 return SWIG_arg;
10465
10466 fail: SWIGUNUSED;
10467 {
10468 LUA_FREE_ARRAY( arg2 );
10469 }
10470 {
10471 LUA_FREE_ARRAY( arg3 );
10472 }
10473 {
10474 LUA_FREE_ARRAY( arg4 );
10475 }
10476 lua_error(L);
10477 return 0;
10478}
10479
10480
10481static int _wrap_stripa(lua_State* L) {
10482 int SWIG_arg = 0;
10483 PLINT arg1 ;
10484 PLINT arg2 ;
10485 PLFLT arg3 ;
10486 PLFLT arg4 ;
10487
10488 SWIG_check_num_args("plstripa",4,4)
10489 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstripa",1,"PLINT");
10490 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstripa",2,"PLINT");
10491 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstripa",3,"PLFLT");
10492 if(!lua_isnumber(L,4)) SWIG_fail_arg("plstripa",4,"PLFLT");
10493 arg1 = (PLINT)lua_tonumber(L, 1);
10494 arg2 = (PLINT)lua_tonumber(L, 2);
10495 arg3 = (PLFLT)lua_tonumber(L, 3);
10496 arg4 = (PLFLT)lua_tonumber(L, 4);
10497 plstripa(arg1,arg2,arg3,arg4);
10498
10499 return SWIG_arg;
10500
10501 fail: SWIGUNUSED;
10502 lua_error(L);
10503 return 0;
10504}
10505
10506
10507static int _wrap_stripc(lua_State* L) {
10508 int SWIG_arg = 0;
10509 PLINT *arg1 = 0 ;
10510 char *arg2 = 0 ;
10511 char *arg3 = 0 ;
10512 PLFLT arg4 ;
10513 PLFLT arg5 ;
10514 PLFLT arg6 ;
10515 PLFLT arg7 ;
10516 PLFLT arg8 ;
10517 PLFLT arg9 ;
10518 PLFLT arg10 ;
10519 PLBOOL arg11 ;
10520 PLBOOL arg12 ;
10521 PLINT arg13 ;
10522 PLINT arg14 ;
10523 PLINT *arg15 = 0 ;
10524 PLINT *arg16 = 0 ;
10525 char **arg17 = (char **)0 ;
10526 char *arg18 = 0 ;
10527 char *arg19 = 0 ;
10528 char *arg20 = 0 ;
10529 PLINT temp1 ;
10530 int temp15 ;
10531 int temp16 ;
10532
10533 {
10534 arg17 = NULL;
10535 }
10536 arg1 = &temp1;
10537 SWIG_check_num_args("plstripc",15,19)
10538 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plstripc",1,"char const *");
10539 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plstripc",2,"char const *");
10540 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstripc",3,"PLFLT");
10541 if(!lua_isnumber(L,4)) SWIG_fail_arg("plstripc",4,"PLFLT");
10542 if(!lua_isnumber(L,5)) SWIG_fail_arg("plstripc",5,"PLFLT");
10543 if(!lua_isnumber(L,6)) SWIG_fail_arg("plstripc",6,"PLFLT");
10544 if(!lua_isnumber(L,7)) SWIG_fail_arg("plstripc",7,"PLFLT");
10545 if(!lua_isnumber(L,8)) SWIG_fail_arg("plstripc",8,"PLFLT");
10546 if(!lua_isnumber(L,9)) SWIG_fail_arg("plstripc",9,"PLFLT");
10547 if(!lua_isnumber(L,10)) SWIG_fail_arg("plstripc",10,"PLBOOL");
10548 if(!lua_isnumber(L,11)) SWIG_fail_arg("plstripc",11,"PLBOOL");
10549 if(!lua_isnumber(L,12)) SWIG_fail_arg("plstripc",12,"PLINT");
10550 if(!lua_isnumber(L,13)) SWIG_fail_arg("plstripc",13,"PLINT");
10551 if(lua_gettop(L)>=16 && !lua_istable(L,16)) SWIG_fail_arg("plstripc",16,"char const *[4]");
10552 if(lua_gettop(L)>=17 && !SWIG_lua_isnilstring(L,17)) SWIG_fail_arg("plstripc",17,"char const *");
10553 if(lua_gettop(L)>=18 && !SWIG_lua_isnilstring(L,18)) SWIG_fail_arg("plstripc",18,"char const *");
10554 if(lua_gettop(L)>=19 && !SWIG_lua_isnilstring(L,19)) SWIG_fail_arg("plstripc",19,"char const *");
10555 arg2 = (char *)lua_tostring(L, 1);
10556 arg3 = (char *)lua_tostring(L, 2);
10557 arg4 = (PLFLT)lua_tonumber(L, 3);
10558 arg5 = (PLFLT)lua_tonumber(L, 4);
10559 arg6 = (PLFLT)lua_tonumber(L, 5);
10560 arg7 = (PLFLT)lua_tonumber(L, 6);
10561 arg8 = (PLFLT)lua_tonumber(L, 7);
10562 arg9 = (PLFLT)lua_tonumber(L, 8);
10563 arg10 = (PLFLT)lua_tonumber(L, 9);
10564 arg11 = (PLBOOL)lua_tonumber(L, 10);
10565 arg12 = (PLBOOL)lua_tonumber(L, 11);
10566 arg13 = (PLINT)lua_tonumber(L, 12);
10567 arg14 = (PLINT)lua_tonumber(L, 13);
10568 {
10569 arg15 = (PLINT *) LUA_get_int_num_array_var( L, 14, &temp15 );
10570 if ( !arg15 )
10571 SWIG_fail;
10572 Alen = temp15;
10573 }
10574 {
10575 arg16 = (PLINT *) LUA_get_int_num_array_var( L, 15, &temp16 );
10576 if ( !arg16 )
10577 SWIG_fail;
10578 if ( temp16 != Alen )
10579 {
10580 lua_pushfstring( L, "Tables must be of same length." );
10581 SWIG_fail;
10582 }
10583 }
10584 if(lua_gettop(L)>=16){
10585 {
10586 int i;
10587 arg17 = NULL;
10588
10589 if ( SWIG_table_size( L, 16 ) != 4 )
10590 {
10591 lua_pushfstring( L, "Requires a sequence of 4 strings." );
10592 SWIG_fail;
10593 }
10594 if ( Alen != 4 )
10595 {
10596 lua_pushfstring( L, "colline and styline args must be length 4." );
10597 SWIG_fail;
10598 }
10599
10600 arg17 = malloc( sizeof ( char* ) * 4 );
10601 for ( i = 1; i <= 4; i++ )
10602 {
10603 lua_rawgeti( L, 16, i );
10604 if ( lua_isstring( L, -1 ) )
10605 {
10606 arg17[i - 1] = (char *) lua_tostring( L, -1 );
10607 }
10608 else
10609 {
10610 lua_pop( L, 1 );
10611 lua_pushfstring( L, "Requires a sequence of 4 strings." );
10612 SWIG_fail;
10613 // arg17 array is freed after 'fail:'
10614 }
10615 lua_pop( L, 1 );
10616 }
10617 }
10618 }
10619 if(lua_gettop(L)>=17){
10620 arg18 = (char *)lua_tostring(L, 17);
10621 }
10622 if(lua_gettop(L)>=18){
10623 arg19 = (char *)lua_tostring(L, 18);
10624 }
10625 if(lua_gettop(L)>=19){
10626 arg20 = (char *)lua_tostring(L, 19);
10627 }
10628 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);
10629
10630 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
10631 {
10632 LUA_FREE_ARRAY( arg15 );
10633 }
10634 {
10635 LUA_FREE_ARRAY( arg16 );
10636 }
10637 {
10638 if ( arg17 )
10639 {
10640 free( arg17 ); arg17 = NULL;
10641 }
10642 }
10643 return SWIG_arg;
10644
10645 fail: SWIGUNUSED;
10646 {
10647 LUA_FREE_ARRAY( arg15 );
10648 }
10649 {
10650 LUA_FREE_ARRAY( arg16 );
10651 }
10652 {
10653 if ( arg17 )
10654 {
10655 free( arg17 ); arg17 = NULL;
10656 }
10657 }
10658 lua_error(L);
10659 return 0;
10660}
10661
10662
10663static int _wrap_stripd(lua_State* L) {
10664 int SWIG_arg = 0;
10665 PLINT arg1 ;
10666
10667 SWIG_check_num_args("plstripd",1,1)
10668 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstripd",1,"PLINT");
10669 arg1 = (PLINT)lua_tonumber(L, 1);
10670 plstripd(arg1);
10671
10672 return SWIG_arg;
10673
10674 fail: SWIGUNUSED;
10675 lua_error(L);
10676 return 0;
10677}
10678
10679
10680static int _wrap_styl(lua_State* L) {
10681 int SWIG_arg = 0;
10682 PLINT arg1 ;
10683 PLINT *arg2 = 0 ;
10684 PLINT *arg3 = 0 ;
10685 int temp3 ;
10686
10687 SWIG_check_num_args("plstyl",2,2)
10688 {
10689 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 1, &arg1 );
10690 if ( !arg2 )
10691 SWIG_fail;
10692 Alen = arg1;
10693 }
10694 {
10695 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp3 );
10696 if ( !arg3 )
10697 SWIG_fail;
10698 if ( temp3 != Alen )
10699 {
10700 lua_pushfstring( L, "Tables must be of same length." );
10701 SWIG_fail;
10702 }
10703 }
10704 plstyl(arg1,(int const *)arg2,(int const *)arg3);
10705
10706 {
10707 LUA_FREE_ARRAY( arg2 );
10708 }
10709 {
10710 LUA_FREE_ARRAY( arg3 );
10711 }
10712 return SWIG_arg;
10713
10714 fail: SWIGUNUSED;
10715 {
10716 LUA_FREE_ARRAY( arg2 );
10717 }
10718 {
10719 LUA_FREE_ARRAY( arg3 );
10720 }
10721 lua_error(L);
10722 return 0;
10723}
10724
10725
10726static int _wrap_svect(lua_State* L) {
10727 int SWIG_arg = 0;
10728 PLFLT *arg1 = 0 ;
10729 PLFLT *arg2 = 0 ;
10730 PLINT arg3 ;
10731 PLBOOL arg4 ;
10732
10733 {
10734 arg2 = NULL; arg3 = 0;
10735 }
10736 {
10737 arg4 = 0;
10738 }
10739 SWIG_check_num_args("plsvect",1,3)
10740 if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("plsvect",3,"PLBOOL");
10741 {
10742 int temp;
10743 if ( lua_isnil( L, 1 ) )
10744 {
10745 arg1 = NULL;
10746 Alen = 0;
10747 }
10748 else
10749 {
10750 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10751 if ( !arg1 )
10752 SWIG_fail;
10753 Alen = temp;
10754 }
10755 }
10756 if(lua_gettop(L)>=2){
10757 {
10758 int temp = 0;
10759 if ( lua_isnil( L, 2 ) )
10760 {
10761 arg2 = NULL;
10762 }
10763 else
10764 {
10765 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
10766 if ( !arg2 )
10767 SWIG_fail;
10768 if ( temp != Alen )
10769 {
10770 lua_pushfstring( L, "Tables must be of same length." );
10771 SWIG_fail;
10772 }
10773 }
10774 arg3 = temp;
10775 }
10776 }
10777 if(lua_gettop(L)>=3){
10778 arg4 = (PLBOOL)lua_tonumber(L, 3);
10779 }
10780 plsvect((double const *)arg1,(double const *)arg2,arg3,arg4);
10781
10782 {
10783 LUA_FREE_ARRAY( arg2 );
10784 }
10785 return SWIG_arg;
10786
10787 fail: SWIGUNUSED;
10788 {
10789 LUA_FREE_ARRAY( arg2 );
10790 }
10791 lua_error(L);
10792 return 0;
10793}
10794
10795
10796static int _wrap_svpa(lua_State* L) {
10797 int SWIG_arg = 0;
10798 PLFLT arg1 ;
10799 PLFLT arg2 ;
10800 PLFLT arg3 ;
10801 PLFLT arg4 ;
10802
10803 SWIG_check_num_args("plsvpa",4,4)
10804 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsvpa",1,"PLFLT");
10805 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsvpa",2,"PLFLT");
10806 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsvpa",3,"PLFLT");
10807 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsvpa",4,"PLFLT");
10808 arg1 = (PLFLT)lua_tonumber(L, 1);
10809 arg2 = (PLFLT)lua_tonumber(L, 2);
10810 arg3 = (PLFLT)lua_tonumber(L, 3);
10811 arg4 = (PLFLT)lua_tonumber(L, 4);
10812 plsvpa(arg1,arg2,arg3,arg4);
10813
10814 return SWIG_arg;
10815
10816 fail: SWIGUNUSED;
10817 lua_error(L);
10818 return 0;
10819}
10820
10821
10822static int _wrap_sxax(lua_State* L) {
10823 int SWIG_arg = 0;
10824 PLINT arg1 ;
10825 PLINT arg2 ;
10826
10827 SWIG_check_num_args("plsxax",2,2)
10828 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsxax",1,"PLINT");
10829 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsxax",2,"PLINT");
10830 arg1 = (PLINT)lua_tonumber(L, 1);
10831 arg2 = (PLINT)lua_tonumber(L, 2);
10832 plsxax(arg1,arg2);
10833
10834 return SWIG_arg;
10835
10836 fail: SWIGUNUSED;
10837 lua_error(L);
10838 return 0;
10839}
10840
10841
10842static int _wrap_syax(lua_State* L) {
10843 int SWIG_arg = 0;
10844 PLINT arg1 ;
10845 PLINT arg2 ;
10846
10847 SWIG_check_num_args("plsyax",2,2)
10848 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsyax",1,"PLINT");
10849 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsyax",2,"PLINT");
10850 arg1 = (PLINT)lua_tonumber(L, 1);
10851 arg2 = (PLINT)lua_tonumber(L, 2);
10852 plsyax(arg1,arg2);
10853
10854 return SWIG_arg;
10855
10856 fail: SWIGUNUSED;
10857 lua_error(L);
10858 return 0;
10859}
10860
10861
10862static int _wrap_sym(lua_State* L) {
10863 int SWIG_arg = 0;
10864 PLINT arg1 ;
10865 PLFLT *arg2 = 0 ;
10866 PLFLT *arg3 = 0 ;
10867 PLINT arg4 ;
10868 int temp3 ;
10869
10870 SWIG_check_num_args("plsym",3,3)
10871 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsym",3,"PLINT");
10872 {
10873 int temp;
10874 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10875 if ( !arg2 )
10876 SWIG_fail;
10877 arg1 = Alen = temp;
10878 }
10879 {
10880 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10881 if ( !arg3 )
10882 SWIG_fail;
10883 if ( temp3 != Alen )
10884 {
10885 lua_pushfstring( L, "Tables must be of same length." );
10886 SWIG_fail;
10887 }
10888 }
10889 arg4 = (PLINT)lua_tonumber(L, 3);
10890 plsym(arg1,(double const *)arg2,(double const *)arg3,arg4);
10891
10892 {
10893 LUA_FREE_ARRAY( arg2 );
10894 }
10895 {
10896 LUA_FREE_ARRAY( arg3 );
10897 }
10898 return SWIG_arg;
10899
10900 fail: SWIGUNUSED;
10901 {
10902 LUA_FREE_ARRAY( arg2 );
10903 }
10904 {
10905 LUA_FREE_ARRAY( arg3 );
10906 }
10907 lua_error(L);
10908 return 0;
10909}
10910
10911
10912static int _wrap_szax(lua_State* L) {
10913 int SWIG_arg = 0;
10914 PLINT arg1 ;
10915 PLINT arg2 ;
10916
10917 SWIG_check_num_args("plszax",2,2)
10918 if(!lua_isnumber(L,1)) SWIG_fail_arg("plszax",1,"PLINT");
10919 if(!lua_isnumber(L,2)) SWIG_fail_arg("plszax",2,"PLINT");
10920 arg1 = (PLINT)lua_tonumber(L, 1);
10921 arg2 = (PLINT)lua_tonumber(L, 2);
10922 plszax(arg1,arg2);
10923
10924 return SWIG_arg;
10925
10926 fail: SWIGUNUSED;
10927 lua_error(L);
10928 return 0;
10929}
10930
10931
10932static int _wrap_text(lua_State* L) {
10933 int SWIG_arg = 0;
10934
10935 SWIG_check_num_args("pltext",0,0)
10936 pltext();
10937
10938 return SWIG_arg;
10939
10940 fail: SWIGUNUSED;
10941 lua_error(L);
10942 return 0;
10943}
10944
10945
10946static int _wrap_timefmt(lua_State* L) {
10947 int SWIG_arg = 0;
10948 char *arg1 = 0 ;
10949
10950 SWIG_check_num_args("pltimefmt",1,1)
10951 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("pltimefmt",1,"char const *");
10952 arg1 = (char *)lua_tostring(L, 1);
10953 pltimefmt((char const *)arg1);
10954
10955 return SWIG_arg;
10956
10957 fail: SWIGUNUSED;
10958 lua_error(L);
10959 return 0;
10960}
10961
10962
10963static int _wrap_vasp(lua_State* L) {
10964 int SWIG_arg = 0;
10965 PLFLT arg1 ;
10966
10967 SWIG_check_num_args("plvasp",1,1)
10968 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvasp",1,"PLFLT");
10969 arg1 = (PLFLT)lua_tonumber(L, 1);
10970 plvasp(arg1);
10971
10972 return SWIG_arg;
10973
10974 fail: SWIGUNUSED;
10975 lua_error(L);
10976 return 0;
10977}
10978
10979
10980static int _wrap_vect(lua_State* L) {
10981 int SWIG_arg = 0;
10982 PLFLT **arg1 = 0 ;
10983 PLFLT **arg2 = 0 ;
10984 PLINT arg3 ;
10985 PLINT arg4 ;
10986 PLFLT arg5 ;
10987 pltr_func arg6 = 0 ;
10988 PLPointer arg7 = 0 ;
10989 int ii1 ;
10990 int ii2 ;
10991 PLcGrid cgrid17 ;
10992 PLcGrid2 cgrid27 ;
10993
10994 {
10995 cgrid17.xg = cgrid17.yg = cgrid17.zg = NULL;
10996 cgrid17.nx = cgrid17.ny = cgrid17.nz = 0;
10997 cgrid27.xg = cgrid27.yg = cgrid27.zg = NULL;
10998 cgrid27.nx = cgrid27.ny = 0;
10999 }
11000 {
11001 arg6 = NULL;
11002 }
11003 {
11004 arg7 = NULL;
11005 }
11006 SWIG_check_num_args("plvect",3,5)
11007 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvect",3,"PLFLT");
11008 {
11009 int jj;
11010
11011 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
11012 if ( !arg1 )
11013 SWIG_fail;
11014 Xlen = ii1;
11015 Ylen = jj;
11016 }
11017 {
11018 int jj;
11019
11020 arg2 = read_double_Matrix( L, 2, &ii2, &jj );
11021 if ( !arg2 )
11022 SWIG_fail;
11023 arg3 = ii2;
11024 arg4 = jj;
11025 if ( ( arg3 != Xlen ) || ( arg4 != Ylen ) )
11026 {
11027 lua_pushfstring( L, "Vectors must match matrix." );
11028 SWIG_fail;
11029 }
11030 }
11031 arg5 = (PLFLT)lua_tonumber(L, 3);
11032 if(lua_gettop(L)>=4){
11033 {
11034 arg6 = NULL;
11035 mypltr_funcstr[0] = '\0';
11036
11037 if ( lua_isstring( L, 4 ) )
11038 {
11039 const char* funcstr = lua_tostring( L, 4 );
11040 if ( strcmp( "pltr0", funcstr ) == 0 )
11041 {
11042 arg6 = pltr0;
11043 }
11044 else if ( strcmp( "pltr1", funcstr ) == 0 )
11045 {
11046 arg6 = pltr1;
11047 }
11048 else if ( strcmp( "pltr2", funcstr ) == 0 )
11049 {
11050 arg6 = pltr2;
11051 }
11052 else
11053 {
11054 arg6 = mypltr;
11055 strncpy( mypltr_funcstr, funcstr, 255 );
11056 myL = L;
11057 }
11058 }
11059 else
11060 SWIG_fail_arg( "vect", 6, "pltr_func" );
11061 }
11062 }
11063 if(lua_gettop(L)>=5){
11064 {
11065 int nx, ny;
11066 int gridmode = 0;
11067
11068 lua_pushstring( L, "xg" );
11069 lua_gettable( L, 5 );
11070 if ( !lua_istable( L, -1 ) )
11071 {
11072 lua_pop( L, 1 ); // pop "xg"
11073 lua_pushstring( L, "expected a table xg" );
11074 SWIG_fail;
11075 }
11076 lua_rawgeti( L, -1, 1 );
11077 if ( lua_istable( L, -1 ) )
11078 gridmode = 2; // two dimensional array
11079 else if ( lua_isnumber( L, -1 ) )
11080 gridmode = 1; // one dimensional array
11081 else
11082 {
11083 lua_pop( L, 1 ); // pop "1"
11084 lua_pop( L, 1 ); // pop "xg"
11085 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
11086 SWIG_fail;
11087 }
11088 lua_pop( L, 1 ); // pop test element
11089 if ( gridmode == 1 )
11090 {
11091 cgrid17.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
11092 if ( !cgrid17.xg )
11093 {
11094 lua_pop( L, 1 ); // pop "xg"
11095 SWIG_fail;
11096 }
11097 if ( nx != Xlen )
11098 {
11099 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
11100 SWIG_fail;
11101 }
11102 cgrid17.nx = nx;
11103 }
11104 else
11105 {
11106 cgrid27.xg = read_double_Matrix( L, -1, &nx, &ny );
11107 if ( !cgrid27.xg )
11108 {
11109 lua_pop( L, 1 ); // pop "xg"
11110 SWIG_fail;
11111 }
11112 if ( ( nx != Xlen ) || ( ny != Ylen ) )
11113 {
11114 lua_pop( L, 1 ); // pop "xg"
11115 lua_pushfstring( L, "Vectors must match matrix." );
11116 SWIG_fail;
11117 }
11118 cgrid27.nx = nx;
11119 cgrid27.ny = ny;
11120 }
11121 lua_pop( L, 1 ); // pop "xg"
11122
11123 lua_pushstring( L, "yg" );
11124 lua_gettable( L, 5 );
11125 if ( !lua_istable( L, -1 ) )
11126 {
11127 lua_pop( L, 1 );
11128 lua_pushstring( L, "expected a table yg" );
11129 SWIG_fail;
11130 }
11131 lua_rawgeti( L, -1, 1 );
11132 if ( gridmode == 2 )
11133 {
11134 if ( !lua_istable( L, -1 ) )
11135 {
11136 lua_pop( L, 1 ); // pop "1"
11137 lua_pop( L, 1 ); // pop "yg"
11138 lua_pushstring( L, "expected a two dimensional array/table in yg" );
11139 SWIG_fail;
11140 }
11141 }
11142 else
11143 {
11144 if ( !lua_isnumber( L, -1 ) )
11145 {
11146 lua_pop( L, 1 ); // pop "1"
11147 lua_pop( L, 1 ); // pop "yg"
11148 lua_pushstring( L, "expected a one dimensional array/table in yg" );
11149 SWIG_fail;
11150 }
11151 }
11152 lua_pop( L, 1 ); // pop "1"
11153 if ( gridmode == 1 )
11154 {
11155 cgrid17.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
11156 if ( !cgrid17.yg )
11157 {
11158 lua_pop( L, 1 ); // pop "yg"
11159 SWIG_fail;
11160 }
11161 if ( ny != Ylen )
11162 {
11163 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
11164 SWIG_fail;
11165 }
11166 cgrid17.ny = ny;
11167 }
11168 else
11169 {
11170 cgrid27.yg = read_double_Matrix( L, -1, &nx, &ny );
11171 if ( !cgrid27.yg )
11172 {
11173 lua_pop( L, 1 ); // pop "xg"
11174 SWIG_fail;
11175 }
11176 if ( ( nx != Xlen ) || ( ny != Ylen ) )
11177 {
11178 lua_pop( L, 1 ); // pop "xg"
11179 lua_pushfstring( L, "Vectors must match matrix." );
11180 SWIG_fail;
11181 }
11182 // cgrid27.nx/ny already set
11183 }
11184 lua_pop( L, 1 ); // pop "yg"
11185
11186 if ( gridmode == 1 )
11187 arg7 = &cgrid17;
11188 else if ( gridmode == 2 )
11189 arg7 = &cgrid27;
11190 }
11191 }
11192 plvect((double const **)arg1,(double const **)arg2,arg3,arg4,arg5,arg6,arg7);
11193
11194 {
11195 int i;
11196
11197 if ( arg1 )
11198 {
11199 for ( i = 0; i < ii1; i++ )
11200 LUA_FREE_ARRAY( arg1[i] );
11201 LUA_FREE_ARRAY( arg1 );
11202 }
11203 }
11204 {
11205 int i;
11206
11207 if ( arg2 )
11208 {
11209 for ( i = 0; i < ii2; i++ )
11210 LUA_FREE_ARRAY( arg2[i] );
11211 LUA_FREE_ARRAY( arg2 );
11212 }
11213 }
11214 {
11215 mypltr_funcstr[0] = '\0';
11216 }
11217 {
11218 int i;
11219
11220 LUA_FREE_ARRAY( cgrid17.xg );
11221 LUA_FREE_ARRAY( cgrid17.yg );
11222
11223 if ( cgrid27.xg )
11224 {
11225 for ( i = 0; i < Xlen; i++ )
11226 LUA_FREE_ARRAY( cgrid27.xg[i] );
11227 LUA_FREE_ARRAY( cgrid27.xg );
11228 }
11229 if ( cgrid27.yg )
11230 {
11231 for ( i = 0; i < Xlen; i++ )
11232 LUA_FREE_ARRAY( cgrid27.yg[i] );
11233 LUA_FREE_ARRAY( cgrid27.yg );
11234 }
11235 }
11236 return SWIG_arg;
11237
11238 fail: SWIGUNUSED;
11239 {
11240 int i;
11241
11242 if ( arg1 )
11243 {
11244 for ( i = 0; i < ii1; i++ )
11245 LUA_FREE_ARRAY( arg1[i] );
11246 LUA_FREE_ARRAY( arg1 );
11247 }
11248 }
11249 {
11250 int i;
11251
11252 if ( arg2 )
11253 {
11254 for ( i = 0; i < ii2; i++ )
11255 LUA_FREE_ARRAY( arg2[i] );
11256 LUA_FREE_ARRAY( arg2 );
11257 }
11258 }
11259 {
11260 mypltr_funcstr[0] = '\0';
11261 }
11262 {
11263 int i;
11264
11265 LUA_FREE_ARRAY( cgrid17.xg );
11266 LUA_FREE_ARRAY( cgrid17.yg );
11267
11268 if ( cgrid27.xg )
11269 {
11270 for ( i = 0; i < Xlen; i++ )
11271 LUA_FREE_ARRAY( cgrid27.xg[i] );
11272 LUA_FREE_ARRAY( cgrid27.xg );
11273 }
11274 if ( cgrid27.yg )
11275 {
11276 for ( i = 0; i < Xlen; i++ )
11277 LUA_FREE_ARRAY( cgrid27.yg[i] );
11278 LUA_FREE_ARRAY( cgrid27.yg );
11279 }
11280 }
11281 lua_error(L);
11282 return 0;
11283}
11284
11285
11286static int _wrap_vpas(lua_State* L) {
11287 int SWIG_arg = 0;
11288 PLFLT arg1 ;
11289 PLFLT arg2 ;
11290 PLFLT arg3 ;
11291 PLFLT arg4 ;
11292 PLFLT arg5 ;
11293
11294 SWIG_check_num_args("plvpas",5,5)
11295 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvpas",1,"PLFLT");
11296 if(!lua_isnumber(L,2)) SWIG_fail_arg("plvpas",2,"PLFLT");
11297 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvpas",3,"PLFLT");
11298 if(!lua_isnumber(L,4)) SWIG_fail_arg("plvpas",4,"PLFLT");
11299 if(!lua_isnumber(L,5)) SWIG_fail_arg("plvpas",5,"PLFLT");
11300 arg1 = (PLFLT)lua_tonumber(L, 1);
11301 arg2 = (PLFLT)lua_tonumber(L, 2);
11302 arg3 = (PLFLT)lua_tonumber(L, 3);
11303 arg4 = (PLFLT)lua_tonumber(L, 4);
11304 arg5 = (PLFLT)lua_tonumber(L, 5);
11305 plvpas(arg1,arg2,arg3,arg4,arg5);
11306
11307 return SWIG_arg;
11308
11309 fail: SWIGUNUSED;
11310 lua_error(L);
11311 return 0;
11312}
11313
11314
11315static int _wrap_vpor(lua_State* L) {
11316 int SWIG_arg = 0;
11317 PLFLT arg1 ;
11318 PLFLT arg2 ;
11319 PLFLT arg3 ;
11320 PLFLT arg4 ;
11321
11322 SWIG_check_num_args("plvpor",4,4)
11323 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvpor",1,"PLFLT");
11324 if(!lua_isnumber(L,2)) SWIG_fail_arg("plvpor",2,"PLFLT");
11325 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvpor",3,"PLFLT");
11326 if(!lua_isnumber(L,4)) SWIG_fail_arg("plvpor",4,"PLFLT");
11327 arg1 = (PLFLT)lua_tonumber(L, 1);
11328 arg2 = (PLFLT)lua_tonumber(L, 2);
11329 arg3 = (PLFLT)lua_tonumber(L, 3);
11330 arg4 = (PLFLT)lua_tonumber(L, 4);
11331 plvpor(arg1,arg2,arg3,arg4);
11332
11333 return SWIG_arg;
11334
11335 fail: SWIGUNUSED;
11336 lua_error(L);
11337 return 0;
11338}
11339
11340
11341static int _wrap_vsta(lua_State* L) {
11342 int SWIG_arg = 0;
11343
11344 SWIG_check_num_args("plvsta",0,0)
11345 plvsta();
11346
11347 return SWIG_arg;
11348
11349 fail: SWIGUNUSED;
11350 lua_error(L);
11351 return 0;
11352}
11353
11354
11355static int _wrap_w3d(lua_State* L) {
11356 int SWIG_arg = 0;
11357 PLFLT arg1 ;
11358 PLFLT arg2 ;
11359 PLFLT arg3 ;
11360 PLFLT arg4 ;
11361 PLFLT arg5 ;
11362 PLFLT arg6 ;
11363 PLFLT arg7 ;
11364 PLFLT arg8 ;
11365 PLFLT arg9 ;
11366 PLFLT arg10 ;
11367 PLFLT arg11 ;
11368
11369 SWIG_check_num_args("plw3d",11,11)
11370 if(!lua_isnumber(L,1)) SWIG_fail_arg("plw3d",1,"PLFLT");
11371 if(!lua_isnumber(L,2)) SWIG_fail_arg("plw3d",2,"PLFLT");
11372 if(!lua_isnumber(L,3)) SWIG_fail_arg("plw3d",3,"PLFLT");
11373 if(!lua_isnumber(L,4)) SWIG_fail_arg("plw3d",4,"PLFLT");
11374 if(!lua_isnumber(L,5)) SWIG_fail_arg("plw3d",5,"PLFLT");
11375 if(!lua_isnumber(L,6)) SWIG_fail_arg("plw3d",6,"PLFLT");
11376 if(!lua_isnumber(L,7)) SWIG_fail_arg("plw3d",7,"PLFLT");
11377 if(!lua_isnumber(L,8)) SWIG_fail_arg("plw3d",8,"PLFLT");
11378 if(!lua_isnumber(L,9)) SWIG_fail_arg("plw3d",9,"PLFLT");
11379 if(!lua_isnumber(L,10)) SWIG_fail_arg("plw3d",10,"PLFLT");
11380 if(!lua_isnumber(L,11)) SWIG_fail_arg("plw3d",11,"PLFLT");
11381 arg1 = (PLFLT)lua_tonumber(L, 1);
11382 arg2 = (PLFLT)lua_tonumber(L, 2);
11383 arg3 = (PLFLT)lua_tonumber(L, 3);
11384 arg4 = (PLFLT)lua_tonumber(L, 4);
11385 arg5 = (PLFLT)lua_tonumber(L, 5);
11386 arg6 = (PLFLT)lua_tonumber(L, 6);
11387 arg7 = (PLFLT)lua_tonumber(L, 7);
11388 arg8 = (PLFLT)lua_tonumber(L, 8);
11389 arg9 = (PLFLT)lua_tonumber(L, 9);
11390 arg10 = (PLFLT)lua_tonumber(L, 10);
11391 arg11 = (PLFLT)lua_tonumber(L, 11);
11392 plw3d(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
11393
11394 return SWIG_arg;
11395
11396 fail: SWIGUNUSED;
11397 lua_error(L);
11398 return 0;
11399}
11400
11401
11402static int _wrap_width(lua_State* L) {
11403 int SWIG_arg = 0;
11404 PLFLT arg1 ;
11405
11406 SWIG_check_num_args("plwidth",1,1)
11407 if(!lua_isnumber(L,1)) SWIG_fail_arg("plwidth",1,"PLFLT");
11408 arg1 = (PLFLT)lua_tonumber(L, 1);
11409 plwidth(arg1);
11410
11411 return SWIG_arg;
11412
11413 fail: SWIGUNUSED;
11414 lua_error(L);
11415 return 0;
11416}
11417
11418
11419static int _wrap_wind(lua_State* L) {
11420 int SWIG_arg = 0;
11421 PLFLT arg1 ;
11422 PLFLT arg2 ;
11423 PLFLT arg3 ;
11424 PLFLT arg4 ;
11425
11426 SWIG_check_num_args("plwind",4,4)
11427 if(!lua_isnumber(L,1)) SWIG_fail_arg("plwind",1,"PLFLT");
11428 if(!lua_isnumber(L,2)) SWIG_fail_arg("plwind",2,"PLFLT");
11429 if(!lua_isnumber(L,3)) SWIG_fail_arg("plwind",3,"PLFLT");
11430 if(!lua_isnumber(L,4)) SWIG_fail_arg("plwind",4,"PLFLT");
11431 arg1 = (PLFLT)lua_tonumber(L, 1);
11432 arg2 = (PLFLT)lua_tonumber(L, 2);
11433 arg3 = (PLFLT)lua_tonumber(L, 3);
11434 arg4 = (PLFLT)lua_tonumber(L, 4);
11435 plwind(arg1,arg2,arg3,arg4);
11436
11437 return SWIG_arg;
11438
11439 fail: SWIGUNUSED;
11440 lua_error(L);
11441 return 0;
11442}
11443
11444
11445static int _wrap_xormod(lua_State* L) {
11446 int SWIG_arg = 0;
11447 PLBOOL arg1 ;
11448 PLBOOL *arg2 = 0 ;
11449 PLBOOL temp2 ;
11450
11451 arg2 = &temp2;
11452 SWIG_check_num_args("plxormod",1,1)
11453 if(!lua_isnumber(L,1)) SWIG_fail_arg("plxormod",1,"PLBOOL");
11454 arg1 = (PLBOOL)lua_tonumber(L, 1);
11455 plxormod(arg1,arg2);
11456
11457 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
11458 return SWIG_arg;
11459
11460 fail: SWIGUNUSED;
11461 lua_error(L);
11462 return 0;
11463}
11464
11465
11466static int _wrap_map(lua_State* L) {
11467 int SWIG_arg = 0;
11468 mapform_func arg1 = 0 ;
11469 char *arg2 = 0 ;
11470 PLFLT arg3 ;
11471 PLFLT arg4 ;
11472 PLFLT arg5 ;
11473 PLFLT arg6 ;
11474
11475 SWIG_check_num_args("plmap",6,6)
11476 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmap",2,"char const *");
11477 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmap",3,"PLFLT");
11478 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmap",4,"PLFLT");
11479 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmap",5,"PLFLT");
11480 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmap",6,"PLFLT");
11481 {
11482 arg1 = NULL;
11483 mapform_funcstr[0] = '\0';
11484
11485 if ( lua_isnil( L, 1 ) )
11486 {
11487 arg1 = NULL;
11488 }
11489 else if ( lua_isstring( L, 1 ) )
11490 {
11491 arg1 = mapform;
11492 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11493 myL = L;
11494 }
11495 else
11496 SWIG_fail_arg( "map", 1, "mapform_func" );
11497 }
11498 arg2 = (char *)lua_tostring(L, 2);
11499 arg3 = (PLFLT)lua_tonumber(L, 3);
11500 arg4 = (PLFLT)lua_tonumber(L, 4);
11501 arg5 = (PLFLT)lua_tonumber(L, 5);
11502 arg6 = (PLFLT)lua_tonumber(L, 6);
11503 plmap(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
11504
11505 {
11506 mapform_funcstr[0] = '\0';
11507 }
11508 return SWIG_arg;
11509
11510 fail: SWIGUNUSED;
11511 {
11512 mapform_funcstr[0] = '\0';
11513 }
11514 lua_error(L);
11515 return 0;
11516}
11517
11518
11519static int _wrap_mapline(lua_State* L) {
11520 int SWIG_arg = 0;
11521 mapform_func arg1 = 0 ;
11522 char *arg2 = 0 ;
11523 PLFLT arg3 ;
11524 PLFLT arg4 ;
11525 PLFLT arg5 ;
11526 PLFLT arg6 ;
11527 PLINT *arg7 = 0 ;
11528 PLINT arg8 ;
11529 int temp7 ;
11530
11531 SWIG_check_num_args("plmapline",7,7)
11532 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapline",2,"char const *");
11533 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmapline",3,"PLFLT");
11534 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapline",4,"PLFLT");
11535 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapline",5,"PLFLT");
11536 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapline",6,"PLFLT");
11537 {
11538 arg1 = NULL;
11539 mapform_funcstr[0] = '\0';
11540
11541 if ( lua_isnil( L, 1 ) )
11542 {
11543 arg1 = NULL;
11544 }
11545 else if ( lua_isstring( L, 1 ) )
11546 {
11547 arg1 = mapform;
11548 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11549 myL = L;
11550 }
11551 else
11552 SWIG_fail_arg( "mapline", 1, "mapform_func" );
11553 }
11554 arg2 = (char *)lua_tostring(L, 2);
11555 arg3 = (PLFLT)lua_tonumber(L, 3);
11556 arg4 = (PLFLT)lua_tonumber(L, 4);
11557 arg5 = (PLFLT)lua_tonumber(L, 5);
11558 arg6 = (PLFLT)lua_tonumber(L, 6);
11559 {
11560 if ( lua_isnil( L, 7 ) )
11561 {
11562 arg7 = NULL;
11563 arg8 = 0;
11564 }
11565 else
11566 {
11567 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp7 );
11568 if ( !arg7 )
11569 SWIG_fail;
11570 arg8 = temp7;
11571 }
11572 }
11573 plmapline(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,(int const *)arg7,arg8);
11574
11575 {
11576 mapform_funcstr[0] = '\0';
11577 }
11578 {
11579 LUA_FREE_ARRAY( arg7 );
11580 }
11581 return SWIG_arg;
11582
11583 fail: SWIGUNUSED;
11584 {
11585 mapform_funcstr[0] = '\0';
11586 }
11587 {
11588 LUA_FREE_ARRAY( arg7 );
11589 }
11590 lua_error(L);
11591 return 0;
11592}
11593
11594
11595static int _wrap_mapstring(lua_State* L) {
11596 int SWIG_arg = 0;
11597 mapform_func arg1 = 0 ;
11598 char *arg2 = 0 ;
11599 char *arg3 = 0 ;
11600 PLFLT arg4 ;
11601 PLFLT arg5 ;
11602 PLFLT arg6 ;
11603 PLFLT arg7 ;
11604 PLINT *arg8 = 0 ;
11605 PLINT arg9 ;
11606 int temp8 ;
11607
11608 SWIG_check_num_args("plmapstring",8,8)
11609 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapstring",2,"char const *");
11610 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plmapstring",3,"char const *");
11611 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapstring",4,"PLFLT");
11612 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapstring",5,"PLFLT");
11613 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapstring",6,"PLFLT");
11614 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmapstring",7,"PLFLT");
11615 {
11616 arg1 = NULL;
11617 mapform_funcstr[0] = '\0';
11618
11619 if ( lua_isnil( L, 1 ) )
11620 {
11621 arg1 = NULL;
11622 }
11623 else if ( lua_isstring( L, 1 ) )
11624 {
11625 arg1 = mapform;
11626 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11627 myL = L;
11628 }
11629 else
11630 SWIG_fail_arg( "mapstring", 1, "mapform_func" );
11631 }
11632 arg2 = (char *)lua_tostring(L, 2);
11633 arg3 = (char *)lua_tostring(L, 3);
11634 arg4 = (PLFLT)lua_tonumber(L, 4);
11635 arg5 = (PLFLT)lua_tonumber(L, 5);
11636 arg6 = (PLFLT)lua_tonumber(L, 6);
11637 arg7 = (PLFLT)lua_tonumber(L, 7);
11638 {
11639 if ( lua_isnil( L, 8 ) )
11640 {
11641 arg8 = NULL;
11642 arg9 = 0;
11643 }
11644 else
11645 {
11646 arg8 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp8 );
11647 if ( !arg8 )
11648 SWIG_fail;
11649 arg9 = temp8;
11650 }
11651 }
11652 plmapstring(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7,(int const *)arg8,arg9);
11653
11654 {
11655 mapform_funcstr[0] = '\0';
11656 }
11657 {
11658 LUA_FREE_ARRAY( arg8 );
11659 }
11660 return SWIG_arg;
11661
11662 fail: SWIGUNUSED;
11663 {
11664 mapform_funcstr[0] = '\0';
11665 }
11666 {
11667 LUA_FREE_ARRAY( arg8 );
11668 }
11669 lua_error(L);
11670 return 0;
11671}
11672
11673
11674static int _wrap_maptex(lua_State* L) {
11675 int SWIG_arg = 0;
11676 mapform_func arg1 = 0 ;
11677 char *arg2 = 0 ;
11678 PLFLT arg3 ;
11679 PLFLT arg4 ;
11680 PLFLT arg5 ;
11681 char *arg6 = 0 ;
11682 PLFLT arg7 ;
11683 PLFLT arg8 ;
11684 PLFLT arg9 ;
11685 PLFLT arg10 ;
11686 PLINT arg11 ;
11687
11688 SWIG_check_num_args("plmaptex",11,11)
11689 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmaptex",2,"char const *");
11690 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmaptex",3,"PLFLT");
11691 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmaptex",4,"PLFLT");
11692 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmaptex",5,"PLFLT");
11693 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plmaptex",6,"char const *");
11694 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmaptex",7,"PLFLT");
11695 if(!lua_isnumber(L,8)) SWIG_fail_arg("plmaptex",8,"PLFLT");
11696 if(!lua_isnumber(L,9)) SWIG_fail_arg("plmaptex",9,"PLFLT");
11697 if(!lua_isnumber(L,10)) SWIG_fail_arg("plmaptex",10,"PLFLT");
11698 if(!lua_isnumber(L,11)) SWIG_fail_arg("plmaptex",11,"PLINT");
11699 {
11700 arg1 = NULL;
11701 mapform_funcstr[0] = '\0';
11702
11703 if ( lua_isnil( L, 1 ) )
11704 {
11705 arg1 = NULL;
11706 }
11707 else if ( lua_isstring( L, 1 ) )
11708 {
11709 arg1 = mapform;
11710 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11711 myL = L;
11712 }
11713 else
11714 SWIG_fail_arg( "maptex", 1, "mapform_func" );
11715 }
11716 arg2 = (char *)lua_tostring(L, 2);
11717 arg3 = (PLFLT)lua_tonumber(L, 3);
11718 arg4 = (PLFLT)lua_tonumber(L, 4);
11719 arg5 = (PLFLT)lua_tonumber(L, 5);
11720 arg6 = (char *)lua_tostring(L, 6);
11721 arg7 = (PLFLT)lua_tonumber(L, 7);
11722 arg8 = (PLFLT)lua_tonumber(L, 8);
11723 arg9 = (PLFLT)lua_tonumber(L, 9);
11724 arg10 = (PLFLT)lua_tonumber(L, 10);
11725 arg11 = (PLINT)lua_tonumber(L, 11);
11726 plmaptex(arg1,(char const *)arg2,arg3,arg4,arg5,(char const *)arg6,arg7,arg8,arg9,arg10,arg11);
11727
11728 {
11729 mapform_funcstr[0] = '\0';
11730 }
11731 return SWIG_arg;
11732
11733 fail: SWIGUNUSED;
11734 {
11735 mapform_funcstr[0] = '\0';
11736 }
11737 lua_error(L);
11738 return 0;
11739}
11740
11741
11742static int _wrap_mapfill(lua_State* L) {
11743 int SWIG_arg = 0;
11744 mapform_func arg1 = 0 ;
11745 char *arg2 = 0 ;
11746 PLFLT arg3 ;
11747 PLFLT arg4 ;
11748 PLFLT arg5 ;
11749 PLFLT arg6 ;
11750 PLINT *arg7 = 0 ;
11751 PLINT arg8 ;
11752 int temp7 ;
11753
11754 SWIG_check_num_args("plmapfill",7,7)
11755 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapfill",2,"char const *");
11756 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmapfill",3,"PLFLT");
11757 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapfill",4,"PLFLT");
11758 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapfill",5,"PLFLT");
11759 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapfill",6,"PLFLT");
11760 {
11761 arg1 = NULL;
11762 mapform_funcstr[0] = '\0';
11763
11764 if ( lua_isnil( L, 1 ) )
11765 {
11766 arg1 = NULL;
11767 }
11768 else if ( lua_isstring( L, 1 ) )
11769 {
11770 arg1 = mapform;
11771 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11772 myL = L;
11773 }
11774 else
11775 SWIG_fail_arg( "mapfill", 1, "mapform_func" );
11776 }
11777 arg2 = (char *)lua_tostring(L, 2);
11778 arg3 = (PLFLT)lua_tonumber(L, 3);
11779 arg4 = (PLFLT)lua_tonumber(L, 4);
11780 arg5 = (PLFLT)lua_tonumber(L, 5);
11781 arg6 = (PLFLT)lua_tonumber(L, 6);
11782 {
11783 if ( lua_isnil( L, 7 ) )
11784 {
11785 arg7 = NULL;
11786 arg8 = 0;
11787 }
11788 else
11789 {
11790 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp7 );
11791 if ( !arg7 )
11792 SWIG_fail;
11793 arg8 = temp7;
11794 }
11795 }
11796 plmapfill(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,(int const *)arg7,arg8);
11797
11798 {
11799 mapform_funcstr[0] = '\0';
11800 }
11801 {
11802 LUA_FREE_ARRAY( arg7 );
11803 }
11804 return SWIG_arg;
11805
11806 fail: SWIGUNUSED;
11807 {
11808 mapform_funcstr[0] = '\0';
11809 }
11810 {
11811 LUA_FREE_ARRAY( arg7 );
11812 }
11813 lua_error(L);
11814 return 0;
11815}
11816
11817
11818static int _wrap_meridians(lua_State* L) {
11819 int SWIG_arg = 0;
11820 mapform_func arg1 = 0 ;
11821 PLFLT arg2 ;
11822 PLFLT arg3 ;
11823 PLFLT arg4 ;
11824 PLFLT arg5 ;
11825 PLFLT arg6 ;
11826 PLFLT arg7 ;
11827
11828 SWIG_check_num_args("plmeridians",7,7)
11829 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmeridians",2,"PLFLT");
11830 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmeridians",3,"PLFLT");
11831 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmeridians",4,"PLFLT");
11832 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmeridians",5,"PLFLT");
11833 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmeridians",6,"PLFLT");
11834 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmeridians",7,"PLFLT");
11835 {
11836 arg1 = NULL;
11837 mapform_funcstr[0] = '\0';
11838
11839 if ( lua_isnil( L, 1 ) )
11840 {
11841 arg1 = NULL;
11842 }
11843 else if ( lua_isstring( L, 1 ) )
11844 {
11845 arg1 = mapform;
11846 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11847 myL = L;
11848 }
11849 else
11850 SWIG_fail_arg( "meridians", 1, "mapform_func" );
11851 }
11852 arg2 = (PLFLT)lua_tonumber(L, 2);
11853 arg3 = (PLFLT)lua_tonumber(L, 3);
11854 arg4 = (PLFLT)lua_tonumber(L, 4);
11855 arg5 = (PLFLT)lua_tonumber(L, 5);
11856 arg6 = (PLFLT)lua_tonumber(L, 6);
11857 arg7 = (PLFLT)lua_tonumber(L, 7);
11858 plmeridians(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
11859
11860 {
11861 mapform_funcstr[0] = '\0';
11862 }
11863 return SWIG_arg;
11864
11865 fail: SWIGUNUSED;
11866 {
11867 mapform_funcstr[0] = '\0';
11868 }
11869 lua_error(L);
11870 return 0;
11871}
11872
11873
11874static int _wrap_image(lua_State* L) {
11875 int SWIG_arg = 0;
11876 PLFLT **arg1 = 0 ;
11877 PLINT arg2 ;
11878 PLINT arg3 ;
11879 PLFLT arg4 ;
11880 PLFLT arg5 ;
11881 PLFLT arg6 ;
11882 PLFLT arg7 ;
11883 PLFLT arg8 ;
11884 PLFLT arg9 ;
11885 PLFLT arg10 ;
11886 PLFLT arg11 ;
11887 PLFLT arg12 ;
11888 PLFLT arg13 ;
11889 int ii1 ;
11890
11891 SWIG_check_num_args("plimage",11,11)
11892 if(!lua_isnumber(L,2)) SWIG_fail_arg("plimage",2,"PLFLT");
11893 if(!lua_isnumber(L,3)) SWIG_fail_arg("plimage",3,"PLFLT");
11894 if(!lua_isnumber(L,4)) SWIG_fail_arg("plimage",4,"PLFLT");
11895 if(!lua_isnumber(L,5)) SWIG_fail_arg("plimage",5,"PLFLT");
11896 if(!lua_isnumber(L,6)) SWIG_fail_arg("plimage",6,"PLFLT");
11897 if(!lua_isnumber(L,7)) SWIG_fail_arg("plimage",7,"PLFLT");
11898 if(!lua_isnumber(L,8)) SWIG_fail_arg("plimage",8,"PLFLT");
11899 if(!lua_isnumber(L,9)) SWIG_fail_arg("plimage",9,"PLFLT");
11900 if(!lua_isnumber(L,10)) SWIG_fail_arg("plimage",10,"PLFLT");
11901 if(!lua_isnumber(L,11)) SWIG_fail_arg("plimage",11,"PLFLT");
11902 {
11903 int jj;
11904
11905 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
11906 if ( !arg1 )
11907 SWIG_fail;
11908 Xlen = arg2 = ii1;
11909 Ylen = arg3 = jj;
11910 }
11911 arg4 = (PLFLT)lua_tonumber(L, 2);
11912 arg5 = (PLFLT)lua_tonumber(L, 3);
11913 arg6 = (PLFLT)lua_tonumber(L, 4);
11914 arg7 = (PLFLT)lua_tonumber(L, 5);
11915 arg8 = (PLFLT)lua_tonumber(L, 6);
11916 arg9 = (PLFLT)lua_tonumber(L, 7);
11917 arg10 = (PLFLT)lua_tonumber(L, 8);
11918 arg11 = (PLFLT)lua_tonumber(L, 9);
11919 arg12 = (PLFLT)lua_tonumber(L, 10);
11920 arg13 = (PLFLT)lua_tonumber(L, 11);
11921 plimage((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
11922
11923 {
11924 int i;
11925
11926 if ( arg1 )
11927 {
11928 for ( i = 0; i < ii1; i++ )
11929 LUA_FREE_ARRAY( arg1[i] );
11930 LUA_FREE_ARRAY( arg1 );
11931 }
11932 }
11933 return SWIG_arg;
11934
11935 fail: SWIGUNUSED;
11936 {
11937 int i;
11938
11939 if ( arg1 )
11940 {
11941 for ( i = 0; i < ii1; i++ )
11942 LUA_FREE_ARRAY( arg1[i] );
11943 LUA_FREE_ARRAY( arg1 );
11944 }
11945 }
11946 lua_error(L);
11947 return 0;
11948}
11949
11950
11951static int _wrap_imagefr(lua_State* L) {
11952 int SWIG_arg = 0;
11953 PLFLT **arg1 = 0 ;
11954 PLINT arg2 ;
11955 PLINT arg3 ;
11956 PLFLT arg4 ;
11957 PLFLT arg5 ;
11958 PLFLT arg6 ;
11959 PLFLT arg7 ;
11960 PLFLT arg8 ;
11961 PLFLT arg9 ;
11962 PLFLT arg10 ;
11963 PLFLT arg11 ;
11964 pltr_func arg12 = 0 ;
11965 PLPointer arg13 = 0 ;
11966 int ii1 ;
11967 PLcGrid cgrid113 ;
11968 PLcGrid2 cgrid213 ;
11969
11970 {
11971 cgrid113.xg = cgrid113.yg = cgrid113.zg = NULL;
11972 cgrid113.nx = cgrid113.ny = cgrid113.nz = 0;
11973 cgrid213.xg = cgrid213.yg = cgrid213.zg = NULL;
11974 cgrid213.nx = cgrid213.ny = 0;
11975 }
11976 {
11977 arg12 = NULL;
11978 }
11979 {
11980 arg13 = NULL;
11981 }
11982 SWIG_check_num_args("plimagefr",9,11)
11983 if(!lua_isnumber(L,2)) SWIG_fail_arg("plimagefr",2,"PLFLT");
11984 if(!lua_isnumber(L,3)) SWIG_fail_arg("plimagefr",3,"PLFLT");
11985 if(!lua_isnumber(L,4)) SWIG_fail_arg("plimagefr",4,"PLFLT");
11986 if(!lua_isnumber(L,5)) SWIG_fail_arg("plimagefr",5,"PLFLT");
11987 if(!lua_isnumber(L,6)) SWIG_fail_arg("plimagefr",6,"PLFLT");
11988 if(!lua_isnumber(L,7)) SWIG_fail_arg("plimagefr",7,"PLFLT");
11989 if(!lua_isnumber(L,8)) SWIG_fail_arg("plimagefr",8,"PLFLT");
11990 if(!lua_isnumber(L,9)) SWIG_fail_arg("plimagefr",9,"PLFLT");
11991 {
11992 int jj;
11993
11994 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
11995 if ( !arg1 )
11996 SWIG_fail;
11997 Xlen = arg2 = ii1;
11998 Ylen = arg3 = jj;
11999 }
12000 arg4 = (PLFLT)lua_tonumber(L, 2);
12001 arg5 = (PLFLT)lua_tonumber(L, 3);
12002 arg6 = (PLFLT)lua_tonumber(L, 4);
12003 arg7 = (PLFLT)lua_tonumber(L, 5);
12004 arg8 = (PLFLT)lua_tonumber(L, 6);
12005 arg9 = (PLFLT)lua_tonumber(L, 7);
12006 arg10 = (PLFLT)lua_tonumber(L, 8);
12007 arg11 = (PLFLT)lua_tonumber(L, 9);
12008 if(lua_gettop(L)>=10){
12009 {
12010 arg12 = NULL;
12011 mypltr_funcstr[0] = '\0';
12012
12013 if ( lua_isstring( L, 10 ) )
12014 {
12015 const char* funcstr = lua_tostring( L, 10 );
12016 if ( strcmp( "pltr0", funcstr ) == 0 )
12017 {
12018 arg12 = pltr0;
12019 }
12020 else if ( strcmp( "pltr1", funcstr ) == 0 )
12021 {
12022 arg12 = pltr1;
12023 }
12024 else if ( strcmp( "pltr2", funcstr ) == 0 )
12025 {
12026 arg12 = pltr2;
12027 }
12028 else
12029 {
12030 arg12 = mypltr;
12031 strncpy( mypltr_funcstr, funcstr, 255 );
12032 myL = L;
12033 }
12034 }
12035 else
12036 SWIG_fail_arg( "imagefr", 12, "pltr_func" );
12037 }
12038 }
12039 if(lua_gettop(L)>=11){
12040 {
12041 int nx, ny;
12042 int gridmode = 0;
12043
12044 lua_pushstring( L, "xg" );
12045 lua_gettable( L, 11 );
12046 if ( !lua_istable( L, -1 ) )
12047 {
12048 lua_pop( L, 1 ); // pop "xg"
12049 lua_pushstring( L, "expected a table xg" );
12050 SWIG_fail;
12051 }
12052 lua_rawgeti( L, -1, 1 );
12053 if ( lua_istable( L, -1 ) )
12054 gridmode = 2; // two dimensional array
12055 else if ( lua_isnumber( L, -1 ) )
12056 gridmode = 1; // one dimensional array
12057 else
12058 {
12059 lua_pop( L, 1 ); // pop "1"
12060 lua_pop( L, 1 ); // pop "xg"
12061 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
12062 SWIG_fail;
12063 }
12064 lua_pop( L, 1 ); // pop test element
12065 if ( gridmode == 1 )
12066 {
12067 cgrid113.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
12068 if ( !cgrid113.xg )
12069 {
12070 lua_pop( L, 1 ); // pop "xg"
12071 SWIG_fail;
12072 }
12073 if ( nx != Xlen )
12074 {
12075 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
12076 SWIG_fail;
12077 }
12078 cgrid113.nx = nx;
12079 }
12080 else
12081 {
12082 cgrid213.xg = read_double_Matrix( L, -1, &nx, &ny );
12083 if ( !cgrid213.xg )
12084 {
12085 lua_pop( L, 1 ); // pop "xg"
12086 SWIG_fail;
12087 }
12088 if ( ( nx != Xlen ) || ( ny != Ylen ) )
12089 {
12090 lua_pop( L, 1 ); // pop "xg"
12091 lua_pushfstring( L, "Vectors must match matrix." );
12092 SWIG_fail;
12093 }
12094 cgrid213.nx = nx;
12095 cgrid213.ny = ny;
12096 }
12097 lua_pop( L, 1 ); // pop "xg"
12098
12099 lua_pushstring( L, "yg" );
12100 lua_gettable( L, 11 );
12101 if ( !lua_istable( L, -1 ) )
12102 {
12103 lua_pop( L, 1 );
12104 lua_pushstring( L, "expected a table yg" );
12105 SWIG_fail;
12106 }
12107 lua_rawgeti( L, -1, 1 );
12108 if ( gridmode == 2 )
12109 {
12110 if ( !lua_istable( L, -1 ) )
12111 {
12112 lua_pop( L, 1 ); // pop "1"
12113 lua_pop( L, 1 ); // pop "yg"
12114 lua_pushstring( L, "expected a two dimensional array/table in yg" );
12115 SWIG_fail;
12116 }
12117 }
12118 else
12119 {
12120 if ( !lua_isnumber( L, -1 ) )
12121 {
12122 lua_pop( L, 1 ); // pop "1"
12123 lua_pop( L, 1 ); // pop "yg"
12124 lua_pushstring( L, "expected a one dimensional array/table in yg" );
12125 SWIG_fail;
12126 }
12127 }
12128 lua_pop( L, 1 ); // pop "1"
12129 if ( gridmode == 1 )
12130 {
12131 cgrid113.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
12132 if ( !cgrid113.yg )
12133 {
12134 lua_pop( L, 1 ); // pop "yg"
12135 SWIG_fail;
12136 }
12137 if ( ny != Ylen )
12138 {
12139 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
12140 SWIG_fail;
12141 }
12142 cgrid113.ny = ny;
12143 }
12144 else
12145 {
12146 cgrid213.yg = read_double_Matrix( L, -1, &nx, &ny );
12147 if ( !cgrid213.yg )
12148 {
12149 lua_pop( L, 1 ); // pop "xg"
12150 SWIG_fail;
12151 }
12152 if ( ( nx != Xlen ) || ( ny != Ylen ) )
12153 {
12154 lua_pop( L, 1 ); // pop "xg"
12155 lua_pushfstring( L, "Vectors must match matrix." );
12156 SWIG_fail;
12157 }
12158 // cgrid213.nx/ny already set
12159 }
12160 lua_pop( L, 1 ); // pop "yg"
12161
12162 if ( gridmode == 1 )
12163 arg13 = &cgrid113;
12164 else if ( gridmode == 2 )
12165 arg13 = &cgrid213;
12166 }
12167 }
12168 plimagefr((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
12169
12170 {
12171 int i;
12172
12173 if ( arg1 )
12174 {
12175 for ( i = 0; i < ii1; i++ )
12176 LUA_FREE_ARRAY( arg1[i] );
12177 LUA_FREE_ARRAY( arg1 );
12178 }
12179 }
12180 {
12181 mypltr_funcstr[0] = '\0';
12182 }
12183 {
12184 int i;
12185
12186 LUA_FREE_ARRAY( cgrid113.xg );
12187 LUA_FREE_ARRAY( cgrid113.yg );
12188
12189 if ( cgrid213.xg )
12190 {
12191 for ( i = 0; i < Xlen; i++ )
12192 LUA_FREE_ARRAY( cgrid213.xg[i] );
12193 LUA_FREE_ARRAY( cgrid213.xg );
12194 }
12195 if ( cgrid213.yg )
12196 {
12197 for ( i = 0; i < Xlen; i++ )
12198 LUA_FREE_ARRAY( cgrid213.yg[i] );
12199 LUA_FREE_ARRAY( cgrid213.yg );
12200 }
12201 }
12202 return SWIG_arg;
12203
12204 fail: SWIGUNUSED;
12205 {
12206 int i;
12207
12208 if ( arg1 )
12209 {
12210 for ( i = 0; i < ii1; i++ )
12211 LUA_FREE_ARRAY( arg1[i] );
12212 LUA_FREE_ARRAY( arg1 );
12213 }
12214 }
12215 {
12216 mypltr_funcstr[0] = '\0';
12217 }
12218 {
12219 int i;
12220
12221 LUA_FREE_ARRAY( cgrid113.xg );
12222 LUA_FREE_ARRAY( cgrid113.yg );
12223
12224 if ( cgrid213.xg )
12225 {
12226 for ( i = 0; i < Xlen; i++ )
12227 LUA_FREE_ARRAY( cgrid213.xg[i] );
12228 LUA_FREE_ARRAY( cgrid213.xg );
12229 }
12230 if ( cgrid213.yg )
12231 {
12232 for ( i = 0; i < Xlen; i++ )
12233 LUA_FREE_ARRAY( cgrid213.yg[i] );
12234 LUA_FREE_ARRAY( cgrid213.yg );
12235 }
12236 }
12237 lua_error(L);
12238 return 0;
12239}
12240
12241
12242static int _wrap_plClearOpts(lua_State* L) {
12243 int SWIG_arg = 0;
12244
12245 SWIG_check_num_args("plClearOpts",0,0)
12246 plClearOpts();
12247
12248 return SWIG_arg;
12249
12250 fail: SWIGUNUSED;
12251 lua_error(L);
12252 return 0;
12253}
12254
12255
12256static int _wrap_plResetOpts(lua_State* L) {
12257 int SWIG_arg = 0;
12258
12259 SWIG_check_num_args("plResetOpts",0,0)
12260 plResetOpts();
12261
12262 return SWIG_arg;
12263
12264 fail: SWIGUNUSED;
12265 lua_error(L);
12266 return 0;
12267}
12268
12269
12270static int _wrap_plSetUsage(lua_State* L) {
12271 int SWIG_arg = 0;
12272 char *arg1 = 0 ;
12273 char *arg2 = 0 ;
12274
12275 SWIG_check_num_args("plSetUsage",2,2)
12276 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plSetUsage",1,"char const *");
12277 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plSetUsage",2,"char const *");
12278 arg1 = (char *)lua_tostring(L, 1);
12279 arg2 = (char *)lua_tostring(L, 2);
12280 plSetUsage((char const *)arg1,(char const *)arg2);
12281
12282 return SWIG_arg;
12283
12284 fail: SWIGUNUSED;
12285 lua_error(L);
12286 return 0;
12287}
12288
12289
12290static int _wrap_plOptUsage(lua_State* L) {
12291 int SWIG_arg = 0;
12292
12293 SWIG_check_num_args("plOptUsage",0,0)
12294 plOptUsage();
12295
12296 return SWIG_arg;
12297
12298 fail: SWIGUNUSED;
12299 lua_error(L);
12300 return 0;
12301}
12302
12303
12304static int _wrap_MinMax2dGrid(lua_State* L) {
12305 int SWIG_arg = 0;
12306 PLFLT **arg1 = 0 ;
12307 PLINT arg2 ;
12308 PLINT arg3 ;
12309 PLFLT *arg4 = 0 ;
12310 PLFLT *arg5 = 0 ;
12311 int ii1 ;
12312 PLFLT temp4 ;
12313 PLFLT temp5 ;
12314
12315 arg4 = &temp4;
12316 arg5 = &temp5;
12317 SWIG_check_num_args("plMinMax2dGrid",1,1)
12318 {
12319 int jj;
12320
12321 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
12322 if ( !arg1 )
12323 SWIG_fail;
12324 Xlen = arg2 = ii1;
12325 Ylen = arg3 = jj;
12326 }
12327 plMinMax2dGrid((double const **)arg1,arg2,arg3,arg4,arg5);
12328
12329 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
12330 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
12331 {
12332 int i;
12333
12334 if ( arg1 )
12335 {
12336 for ( i = 0; i < ii1; i++ )
12337 LUA_FREE_ARRAY( arg1[i] );
12338 LUA_FREE_ARRAY( arg1 );
12339 }
12340 }
12341 return SWIG_arg;
12342
12343 fail: SWIGUNUSED;
12344 {
12345 int i;
12346
12347 if ( arg1 )
12348 {
12349 for ( i = 0; i < ii1; i++ )
12350 LUA_FREE_ARRAY( arg1[i] );
12351 LUA_FREE_ARRAY( arg1 );
12352 }
12353 }
12354 lua_error(L);
12355 return 0;
12356}
12357
12358
12359static int _wrap_plGetCursor(lua_State* L) {
12360 int SWIG_arg = 0;
12361 PLGraphicsIn *arg1 = 0 ;
12362 PLINT result;
12363
12364 SWIG_check_num_args("plGetCursor",1,1)
12365 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("plGetCursor",1,"PLGraphicsIn *");
12366
12367 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
12368 SWIG_fail_ptr("plGetCursor",1,SWIGTYPE_p_PLGraphicsIn);
12369 }
12370
12371 result = (PLINT)plGetCursor(arg1);
12372 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
12373 return SWIG_arg;
12374
12375 fail: SWIGUNUSED;
12376 lua_error(L);
12377 return 0;
12378}
12379
12380
12381static int _wrap_warn(lua_State* L) {
12382 int SWIG_arg = 0;
12383 char *arg1 = 0 ;
12384
12385 SWIG_check_num_args("plwarn",1,1)
12386 if(!lua_isstring(L,1)) SWIG_fail_arg("plwarn",1,"char const *");
12387 {
12388 arg1 = (char *) lua_tostring( L, 1 );
12389 }
12390 plwarn((char const *)arg1);
12391
12392 return SWIG_arg;
12393
12394 fail: SWIGUNUSED;
12395 lua_error(L);
12396 return 0;
12397}
12398
12399
12400static int _wrap_abort(lua_State* L) {
12401 int SWIG_arg = 0;
12402 char *arg1 = 0 ;
12403
12404 SWIG_check_num_args("plabort",1,1)
12405 if(!lua_isstring(L,1)) SWIG_fail_arg("plabort",1,"char const *");
12406 {
12407 arg1 = (char *) lua_tostring( L, 1 );
12408 }
12409 plabort((char const *)arg1);
12410
12411 return SWIG_arg;
12412
12413 fail: SWIGUNUSED;
12414 lua_error(L);
12415 return 0;
12416}
12417
12418
12420 {0,0,0}
12421};
12423 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_RGB", (1))},
12424 {SWIG_LUA_CONSTTAB_INT("PLESC_ALLOC_NCOL", (2))},
12425 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_LPB", (3))},
12426 {SWIG_LUA_CONSTTAB_INT("PLESC_EXPOSE", (4))},
12427 {SWIG_LUA_CONSTTAB_INT("PLESC_RESIZE", (5))},
12428 {SWIG_LUA_CONSTTAB_INT("PLESC_REDRAW", (6))},
12429 {SWIG_LUA_CONSTTAB_INT("PLESC_TEXT", (7))},
12430 {SWIG_LUA_CONSTTAB_INT("PLESC_GRAPH", (8))},
12431 {SWIG_LUA_CONSTTAB_INT("PLESC_FILL", (9))},
12432 {SWIG_LUA_CONSTTAB_INT("PLESC_DI", (10))},
12433 {SWIG_LUA_CONSTTAB_INT("PLESC_FLUSH", (11))},
12434 {SWIG_LUA_CONSTTAB_INT("PLESC_EH", (12))},
12435 {SWIG_LUA_CONSTTAB_INT("PLESC_GETC", (13))},
12436 {SWIG_LUA_CONSTTAB_INT("PLESC_SWIN", (14))},
12437 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING", (15))},
12438 {SWIG_LUA_CONSTTAB_INT("PLESC_XORMOD", (16))},
12439 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_COMPRESSION", (17))},
12440 {SWIG_LUA_CONSTTAB_INT("PLESC_CLEAR", (18))},
12441 {SWIG_LUA_CONSTTAB_INT("PLESC_DASH", (19))},
12442 {SWIG_LUA_CONSTTAB_INT("PLESC_HAS_TEXT", (20))},
12443 {SWIG_LUA_CONSTTAB_INT("PLESC_IMAGE", (21))},
12444 {SWIG_LUA_CONSTTAB_INT("PLESC_IMAGEOPS", (22))},
12445 {SWIG_LUA_CONSTTAB_INT("PLESC_PL2DEVCOL", (23))},
12446 {SWIG_LUA_CONSTTAB_INT("PLESC_DEV2PLCOL", (24))},
12447 {SWIG_LUA_CONSTTAB_INT("PLESC_SETBGFG", (25))},
12448 {SWIG_LUA_CONSTTAB_INT("PLESC_DEVINIT", (26))},
12449 {SWIG_LUA_CONSTTAB_INT("PLESC_GETBACKEND", (27))},
12450 {SWIG_LUA_CONSTTAB_INT("PLESC_BEGIN_TEXT", (28))},
12451 {SWIG_LUA_CONSTTAB_INT("PLESC_TEXT_CHAR", (29))},
12452 {SWIG_LUA_CONSTTAB_INT("PLESC_CONTROL_CHAR", (30))},
12453 {SWIG_LUA_CONSTTAB_INT("PLESC_END_TEXT", (31))},
12454 {SWIG_LUA_CONSTTAB_INT("PLESC_START_RASTERIZE", (32))},
12455 {SWIG_LUA_CONSTTAB_INT("PLESC_END_RASTERIZE", (33))},
12456 {SWIG_LUA_CONSTTAB_INT("PLESC_ARC", (34))},
12457 {SWIG_LUA_CONSTTAB_INT("PLESC_GRADIENT", (35))},
12458 {SWIG_LUA_CONSTTAB_INT("PLESC_MODESET", (36))},
12459 {SWIG_LUA_CONSTTAB_INT("PLESC_MODEGET", (37))},
12460 {SWIG_LUA_CONSTTAB_INT("PLESC_FIXASPECT", (38))},
12461 {SWIG_LUA_CONSTTAB_INT("PLESC_IMPORT_BUFFER", (39))},
12462 {SWIG_LUA_CONSTTAB_INT("PLESC_APPEND_BUFFER", (40))},
12463 {SWIG_LUA_CONSTTAB_INT("PLESC_FLUSH_REMAINING_BUFFER", (41))},
12464 {SWIG_LUA_CONSTTAB_INT("PLTEXT_FONTCHANGE", (0))},
12465 {SWIG_LUA_CONSTTAB_INT("PLTEXT_SUPERSCRIPT", (1))},
12466 {SWIG_LUA_CONSTTAB_INT("PLTEXT_SUBSCRIPT", (2))},
12467 {SWIG_LUA_CONSTTAB_INT("PLTEXT_BACKCHAR", (3))},
12468 {SWIG_LUA_CONSTTAB_INT("PLTEXT_OVERLINE", (4))},
12469 {SWIG_LUA_CONSTTAB_INT("PLTEXT_UNDERLINE", (5))},
12470 {SWIG_LUA_CONSTTAB_INT("ZEROW2B", (1))},
12471 {SWIG_LUA_CONSTTAB_INT("ZEROW2D", (2))},
12472 {SWIG_LUA_CONSTTAB_INT("ONEW2B", (3))},
12473 {SWIG_LUA_CONSTTAB_INT("ONEW2D", (4))},
12474 {SWIG_LUA_CONSTTAB_INT("PLSWIN_DEVICE", (1))},
12475 {SWIG_LUA_CONSTTAB_INT("PLSWIN_WORLD", (2))},
12476 {SWIG_LUA_CONSTTAB_INT("PL_X_AXIS", (1))},
12477 {SWIG_LUA_CONSTTAB_INT("PL_Y_AXIS", (2))},
12478 {SWIG_LUA_CONSTTAB_INT("PL_Z_AXIS", (3))},
12479 {SWIG_LUA_CONSTTAB_INT("PL_OPT_ENABLED", (0x0001))},
12480 {SWIG_LUA_CONSTTAB_INT("PL_OPT_ARG", (0x0002))},
12481 {SWIG_LUA_CONSTTAB_INT("PL_OPT_NODELETE", (0x0004))},
12482 {SWIG_LUA_CONSTTAB_INT("PL_OPT_INVISIBLE", (0x0008))},
12483 {SWIG_LUA_CONSTTAB_INT("PL_OPT_DISABLED", (0x0010))},
12484 {SWIG_LUA_CONSTTAB_INT("PL_OPT_FUNC", (0x0100))},
12485 {SWIG_LUA_CONSTTAB_INT("PL_OPT_BOOL", (0x0200))},
12486 {SWIG_LUA_CONSTTAB_INT("PL_OPT_INT", (0x0400))},
12487 {SWIG_LUA_CONSTTAB_INT("PL_OPT_FLOAT", (0x0800))},
12488 {SWIG_LUA_CONSTTAB_INT("PL_OPT_STRING", (0x1000))},
12489 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_PARTIAL", (0x0000))},
12490 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_FULL", (0x0001))},
12491 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_QUIET", (0x0002))},
12492 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NODELETE", (0x0004))},
12493 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_SHOWALL", (0x0008))},
12494 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_OVERRIDE", (0x0010))},
12495 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NOPROGRAM", (0x0020))},
12496 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NODASH", (0x0040))},
12497 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_SKIP", (0x0080))},
12498 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MARK", (0x80000000))},
12499 {SWIG_LUA_CONSTTAB_INT("PL_FCI_IMPOSSIBLE", (0x00000000))},
12500 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXDIGIT_MASK", (0xf))},
12501 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXPOWER_MASK", (0x7))},
12502 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXPOWER_IMPOSSIBLE", (0xf))},
12503 {SWIG_LUA_CONSTTAB_INT("PL_FCI_FAMILY", (0x0))},
12504 {SWIG_LUA_CONSTTAB_INT("PL_FCI_STYLE", (0x1))},
12505 {SWIG_LUA_CONSTTAB_INT("PL_FCI_WEIGHT", (0x2))},
12506 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SANS", (0x0))},
12507 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SERIF", (0x1))},
12508 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MONO", (0x2))},
12509 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SCRIPT", (0x3))},
12510 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SYMBOL", (0x4))},
12511 {SWIG_LUA_CONSTTAB_INT("PL_FCI_UPRIGHT", (0x0))},
12512 {SWIG_LUA_CONSTTAB_INT("PL_FCI_ITALIC", (0x1))},
12513 {SWIG_LUA_CONSTTAB_INT("PL_FCI_OBLIQUE", (0x2))},
12514 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MEDIUM", (0x0))},
12515 {SWIG_LUA_CONSTTAB_INT("PL_FCI_BOLD", (0x1))},
12516 {SWIG_LUA_CONSTTAB_INT("PL_MAXKEY", (16))},
12517 {SWIG_LUA_CONSTTAB_INT("PL_MASK_SHIFT", (0x1))},
12518 {SWIG_LUA_CONSTTAB_INT("PL_MASK_CAPS", (0x2))},
12519 {SWIG_LUA_CONSTTAB_INT("PL_MASK_CONTROL", (0x4))},
12520 {SWIG_LUA_CONSTTAB_INT("PL_MASK_ALT", (0x8))},
12521 {SWIG_LUA_CONSTTAB_INT("PL_MASK_NUM", (0x10))},
12522 {SWIG_LUA_CONSTTAB_INT("PL_MASK_ALTGR", (0x20))},
12523 {SWIG_LUA_CONSTTAB_INT("PL_MASK_WIN", (0x40))},
12524 {SWIG_LUA_CONSTTAB_INT("PL_MASK_SCROLL", (0x80))},
12525 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON1", (0x100))},
12526 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON2", (0x200))},
12527 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON3", (0x400))},
12528 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON4", (0x800))},
12529 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON5", (0x1000))},
12530 {SWIG_LUA_CONSTTAB_INT("PL_MAXWINDOWS", (64))},
12531 {SWIG_LUA_CONSTTAB_INT("PL_NOTSET", ((-42)))},
12532 {SWIG_LUA_CONSTTAB_INT("PL_DEFAULT_NCOL0", (16))},
12533 {SWIG_LUA_CONSTTAB_INT("PL_DEFAULT_NCOL1", (128))},
12534 {SWIG_LUA_CONSTTAB_INT("MIN_PLINT_RGB", (0))},
12535 {SWIG_LUA_CONSTTAB_INT("MAX_PLINT_RGB", (255))},
12536 {SWIG_LUA_CONSTTAB_FLOAT("MIN_PLFLT_CMAP1", 0.)},
12537 {SWIG_LUA_CONSTTAB_FLOAT("MAX_PLFLT_CMAP1", 1.)},
12538 {SWIG_LUA_CONSTTAB_FLOAT("MIN_PLFLT_ALPHA", 0.)},
12539 {SWIG_LUA_CONSTTAB_FLOAT("MAX_PLFLT_ALPHA", 1.)},
12540 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_ENABLE", (1))},
12541 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_DISABLE", (2))},
12542 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_QUERY", (3))},
12543 {SWIG_LUA_CONSTTAB_INT("PL_BIN_DEFAULT", (0x0))},
12544 {SWIG_LUA_CONSTTAB_INT("PL_BIN_CENTRED", (0x1))},
12545 {SWIG_LUA_CONSTTAB_INT("PL_BIN_NOEXPAND", (0x2))},
12546 {SWIG_LUA_CONSTTAB_INT("PL_BIN_NOEMPTY", (0x4))},
12547 {SWIG_LUA_CONSTTAB_INT("GRID_CSA", (1))},
12548 {SWIG_LUA_CONSTTAB_INT("GRID_DTLI", (2))},
12549 {SWIG_LUA_CONSTTAB_INT("GRID_NNI", (3))},
12550 {SWIG_LUA_CONSTTAB_INT("GRID_NNIDW", (4))},
12551 {SWIG_LUA_CONSTTAB_INT("GRID_NNLI", (5))},
12552 {SWIG_LUA_CONSTTAB_INT("GRID_NNAIDW", (6))},
12553 {SWIG_LUA_CONSTTAB_INT("PL_HIST_DEFAULT", (0x00))},
12554 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOSCALING", (0x01))},
12555 {SWIG_LUA_CONSTTAB_INT("PL_HIST_IGNORE_OUTLIERS", (0x02))},
12556 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOEXPAND", (0x08))},
12557 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOEMPTY", (0x10))},
12558 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_NULL", (0x0))},
12559 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_LEFT", (0x1))},
12560 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_RIGHT", (0x2))},
12561 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_TOP", (0x4))},
12562 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_BOTTOM", (0x8))},
12563 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_INSIDE", (0x10))},
12564 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_OUTSIDE", (0x20))},
12565 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_VIEWPORT", (0x40))},
12566 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_SUBPAGE", (0x80))},
12567 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_NULL", (0x0))},
12568 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_NONE", (0x1))},
12569 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_COLOR_BOX", (0x2))},
12570 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_LINE", (0x4))},
12571 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_SYMBOL", (0x8))},
12572 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_TEXT_LEFT", (0x10))},
12573 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_BACKGROUND", (0x20))},
12574 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_BOUNDING_BOX", (0x40))},
12575 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_ROW_MAJOR", (0x80))},
12576 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_NULL", (0x0))},
12577 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_LEFT", (0x1))},
12578 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_RIGHT", (0x2))},
12579 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_TOP", (0x4))},
12580 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_BOTTOM", (0x8))},
12581 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_IMAGE", (0x10))},
12582 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_SHADE", (0x20))},
12583 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_GRADIENT", (0x40))},
12584 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_NONE", (0x80))},
12585 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_LOW", (0x100))},
12586 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_HIGH", (0x200))},
12587 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_SHADE_LABEL", (0x400))},
12588 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_RIGHT", (0x800))},
12589 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_TOP", (0x1000))},
12590 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_LEFT", (0x2000))},
12591 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_BOTTOM", (0x4000))},
12592 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_BACKGROUND", (0x8000))},
12593 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_BOUNDING_BOX", (0x10000))},
12594 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_UNKNOWN", (0x0))},
12595 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_DEFAULT", (0x1))},
12596 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_REPLACE", (0x2))},
12597 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_XOR", (0x4))},
12598 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEX", (0x001))},
12599 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEY", (0x002))},
12600 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEXY", (0x003))},
12601 {SWIG_LUA_CONSTTAB_INT("MAG_COLOR", (0x004))},
12602 {SWIG_LUA_CONSTTAB_INT("BASE_CONT", (0x008))},
12603 {SWIG_LUA_CONSTTAB_INT("TOP_CONT", (0x010))},
12604 {SWIG_LUA_CONSTTAB_INT("SURF_CONT", (0x020))},
12605 {SWIG_LUA_CONSTTAB_INT("DRAW_SIDES", (0x040))},
12606 {SWIG_LUA_CONSTTAB_INT("FACETED", (0x080))},
12607 {SWIG_LUA_CONSTTAB_INT("MESH", (0x100))},
12608 {0,0,0,0,0,0}
12609};
12611 { "setcontlabelformat", _wrap_setcontlabelformat},
12612 { "setcontlabelparam", _wrap_setcontlabelparam},
12613 { "adv", _wrap_adv},
12614 { "arc", _wrap_arc},
12615 { "axes", _wrap_axes},
12616 { "bin", _wrap_bin},
12617 { "btime", _wrap_btime},
12618 { "bop", _wrap_bop},
12619 { "box", _wrap_box},
12620 { "box3", _wrap_box3},
12621 { "calc_world", _wrap_calc_world},
12622 { "clear", _wrap_clear},
12623 { "col0", _wrap_col0},
12624 { "col1", _wrap_col1},
12625 { "configtime", _wrap_configtime},
12626 { "cont", _wrap_cont},
12627 { "ctime", _wrap_ctime},
12628 { "cpstrm", _wrap_cpstrm},
12629 { "plend", _wrap_plend},
12630 { "plend1", _wrap_plend1},
12631 { "env", _wrap_env},
12632 { "env0", _wrap_env0},
12633 { "eop", _wrap_eop},
12634 { "errx", _wrap_errx},
12635 { "erry", _wrap_erry},
12636 { "famadv", _wrap_famadv},
12637 { "fill", _wrap_fill},
12638 { "fill3", _wrap_fill3},
12639 { "gradient", _wrap_gradient},
12640 { "flush", _wrap_flush},
12641 { "font", _wrap_font},
12642 { "fontld", _wrap_fontld},
12643 { "gchr", _wrap_gchr},
12644 { "gcol0", _wrap_gcol0},
12645 { "gcol0a", _wrap_gcol0a},
12646 { "gcolbg", _wrap_gcolbg},
12647 { "gcolbga", _wrap_gcolbga},
12648 { "gcompression", _wrap_gcompression},
12649 { "gdev", _wrap_gdev},
12650 { "gdidev", _wrap_gdidev},
12651 { "gdiori", _wrap_gdiori},
12652 { "gdiplt", _wrap_gdiplt},
12653 { "gfam", _wrap_gfam},
12654 { "gfci", _wrap_gfci},
12655 { "gfnam", _wrap_gfnam},
12656 { "gfont", _wrap_gfont},
12657 { "glevel", _wrap_glevel},
12658 { "gpage", _wrap_gpage},
12659 { "gra", _wrap_gra},
12660 { "griddata", _wrap_griddata},
12661 { "gspa", _wrap_gspa},
12662 { "gstrm", _wrap_gstrm},
12663 { "gver", _wrap_gver},
12664 { "gvpd", _wrap_gvpd},
12665 { "gvpw", _wrap_gvpw},
12666 { "gxax", _wrap_gxax},
12667 { "gyax", _wrap_gyax},
12668 { "gzax", _wrap_gzax},
12669 { "hist", _wrap_hist},
12670 { "hlsrgb", _wrap_hlsrgb},
12671 { "init", _wrap_init},
12672 { "join", _wrap_join},
12673 { "lab", _wrap_lab},
12674 { "legend", _wrap_legend},
12675 { "colorbar", _wrap_colorbar},
12676 { "lightsource", _wrap_lightsource},
12677 { "line", _wrap_line},
12678 { "line3", _wrap_line3},
12679 { "lsty", _wrap_lsty},
12680 { "mesh", _wrap_mesh},
12681 { "meshc", _wrap_meshc},
12682 { "mkstrm", _wrap_mkstrm},
12683 { "mtex", _wrap_mtex},
12684 { "mtex3", _wrap_mtex3},
12685 { "plot3d", _wrap_plot3d},
12686 { "plot3dc", _wrap_plot3dc},
12687 { "plot3dcl", _wrap_plot3dcl},
12688 { "surf3d", _wrap_surf3d},
12689 { "surf3dl", _wrap_surf3dl},
12690 { "parseopts", _wrap_parseopts},
12691 { "pat", _wrap_pat},
12692 { "path", _wrap_path},
12693 { "poin", _wrap_poin},
12694 { "poin3", _wrap_poin3},
12695 { "poly3", _wrap_poly3},
12696 { "prec", _wrap_prec},
12697 { "psty", _wrap_psty},
12698 { "ptex", _wrap_ptex},
12699 { "ptex3", _wrap_ptex3},
12700 { "randd", _wrap_randd},
12701 { "replot", _wrap_replot},
12702 { "rgbhls", _wrap_rgbhls},
12703 { "schr", _wrap_schr},
12704 { "scmap0", _wrap_scmap0},
12705 { "scmap0a", _wrap_scmap0a},
12706 { "scmap0n", _wrap_scmap0n},
12707 { "scmap1", _wrap_scmap1},
12708 { "scmap1a", _wrap_scmap1a},
12709 { "scmap1l", _wrap_scmap1l},
12710 { "scmap1la", _wrap_scmap1la},
12711 { "scmap1n", _wrap_scmap1n},
12712 { "scmap1_range", _wrap_scmap1_range},
12713 { "gcmap1_range", _wrap_gcmap1_range},
12714 { "scol0", _wrap_scol0},
12715 { "scol0a", _wrap_scol0a},
12716 { "scolbg", _wrap_scolbg},
12717 { "scolbga", _wrap_scolbga},
12718 { "scolor", _wrap_scolor},
12719 { "scompression", _wrap_scompression},
12720 { "sdev", _wrap_sdev},
12721 { "sdidev", _wrap_sdidev},
12722 { "sdimap", _wrap_sdimap},
12723 { "sdiori", _wrap_sdiori},
12724 { "sdiplt", _wrap_sdiplt},
12725 { "sdiplz", _wrap_sdiplz},
12726 { "seed", _wrap_seed},
12727 { "sesc", _wrap_sesc},
12728 { "setopt", _wrap_setopt},
12729 { "sfam", _wrap_sfam},
12730 { "sfci", _wrap_sfci},
12731 { "sfnam", _wrap_sfnam},
12732 { "sfont", _wrap_sfont},
12733 { "shades", _wrap_shades},
12734 { "shade", _wrap_shade},
12735 { "slabelfunc", _wrap_slabelfunc},
12736 { "smaj", _wrap_smaj},
12737 { "smin", _wrap_smin},
12738 { "sori", _wrap_sori},
12739 { "spage", _wrap_spage},
12740 { "spal0", _wrap_spal0},
12741 { "spal1", _wrap_spal1},
12742 { "spause", _wrap_spause},
12743 { "sstrm", _wrap_sstrm},
12744 { "ssub", _wrap_ssub},
12745 { "ssym", _wrap_ssym},
12746 { "star", _wrap_star},
12747 { "start", _wrap_start},
12748 { "stransform", _wrap_stransform},
12749 { "string", _wrap_string},
12750 { "string3", _wrap_string3},
12751 { "stripa", _wrap_stripa},
12752 { "stripc", _wrap_stripc},
12753 { "stripd", _wrap_stripd},
12754 { "styl", _wrap_styl},
12755 { "svect", _wrap_svect},
12756 { "svpa", _wrap_svpa},
12757 { "sxax", _wrap_sxax},
12758 { "syax", _wrap_syax},
12759 { "sym", _wrap_sym},
12760 { "szax", _wrap_szax},
12761 { "text", _wrap_text},
12762 { "timefmt", _wrap_timefmt},
12763 { "vasp", _wrap_vasp},
12764 { "vect", _wrap_vect},
12765 { "vpas", _wrap_vpas},
12766 { "vpor", _wrap_vpor},
12767 { "vsta", _wrap_vsta},
12768 { "w3d", _wrap_w3d},
12769 { "width", _wrap_width},
12770 { "wind", _wrap_wind},
12771 { "xormod", _wrap_xormod},
12772 { "map", _wrap_map},
12773 { "mapline", _wrap_mapline},
12774 { "mapstring", _wrap_mapstring},
12775 { "maptex", _wrap_maptex},
12776 { "mapfill", _wrap_mapfill},
12777 { "meridians", _wrap_meridians},
12778 { "image", _wrap_image},
12779 { "imagefr", _wrap_imagefr},
12780 { "plClearOpts", _wrap_plClearOpts},
12781 { "plResetOpts", _wrap_plResetOpts},
12782 { "plSetUsage", _wrap_plSetUsage},
12783 { "plOptUsage", _wrap_plOptUsage},
12784 { "MinMax2dGrid", _wrap_MinMax2dGrid},
12785 { "plGetCursor", _wrap_plGetCursor},
12786 { "warn", _wrap_warn},
12787 { "abort", _wrap_abort},
12788 {0,0}
12789};
12795 0
12796};
12797
12806#ifdef __cplusplus
12807}
12808#endif
12809
12810/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
12811
12812static swig_type_info _swigt__p_PLGraphicsIn = {"_p_PLGraphicsIn", "PLGraphicsIn *", 0, 0, (void*)&_wrap_class_PLGraphicsIn, 0};
12813static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
12814static swig_type_info _swigt__p_double = {"_p_double", "PLFLT *|double *", 0, 0, (void*)0, 0};
12815static swig_type_info _swigt__p_f_double_double__int = {"_p_f_double_double__int", "defined_func|int (*)(double,double)", 0, 0, (void*)0, 0};
12816static 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};
12817static 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};
12818static 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};
12819static 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};
12820static swig_type_info _swigt__p_int = {"_p_int", "PLBOOL *|PLINT *|int *", 0, 0, (void*)0, 0};
12821static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
12822static swig_type_info _swigt__p_p_double = {"_p_p_double", "PLFLT **|double **", 0, 0, (void*)0, 0};
12823static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "PLUNICODE *|unsigned int *", 0, 0, (void*)0, 0};
12824
12839
12840static swig_cast_info _swigc__p_PLGraphicsIn[] = { {&_swigt__p_PLGraphicsIn, 0, 0, 0},{0, 0, 0, 0}};
12841static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
12842static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
12848static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
12849static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
12850static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
12851static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
12852
12867
12868
12869/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
12870
12871/* -----------------------------------------------------------------------------
12872 * Type initialization:
12873 * This problem is made tough by the requirement that no dynamic
12874 * memory is used. Also, since swig_type_info structures store pointers to
12875 * swig_cast_info structures and swig_cast_info structures store pointers back
12876 * to swig_type_info structures, we need some lookup code at initialization.
12877 * The idea is that swig generates all the structures that are needed.
12878 * The runtime then collects these partially filled structures.
12879 * The SWIG_InitializeModule function takes these initial arrays out of
12880 * swig_module, and does all the lookup, filling in the swig_module.types
12881 * array with the correct data and linking the correct swig_cast_info
12882 * structures together.
12883 *
12884 * The generated swig_type_info structures are assigned statically to an initial
12885 * array. We just loop through that array, and handle each type individually.
12886 * First we lookup if this type has been already loaded, and if so, use the
12887 * loaded structure instead of the generated one. Then we have to fill in the
12888 * cast dependencies. The cast data is initially stored in something like a
12889 * two-dimensional array. Each row corresponds to a type (there are the same
12890 * number of rows as there are in the swig_type_initial array). Each entry in
12891 * a column is one of the swig_cast_info structures for that type.
12892 * The cast_initial array is actually an array of arrays, because each row has
12893 * a variable number of columns.
12894 *
12895 * We loop through the cast[] array associated with the type and mark casts
12896 * which have not been defined in previously loaded modules by assigning
12897 * cast pointer value to cast->next. We also hash cast->type->name string
12898 * and store the value in the cast->value field. If we encounter swig_cast_info
12899 * structure that represents a cast to self we move it to the beginning
12900 * of the cast array. One trick we need to do is making sure the type pointer
12901 * in the swig_cast_info struct is correct.
12902 *
12903 * First off, we lookup the cast->type name to see if it is already loaded.
12904 * There are three cases to handle:
12905 * 1) If the cast->type has already been loaded AND the type we are adding
12906 * casting info to has not been loaded (it is in this module), THEN we
12907 * replace the cast->type pointer with the type pointer that has already
12908 * been loaded.
12909 * 2) If BOTH types (the one we are adding casting info to, and the
12910 * cast->type) are loaded, THEN the cast info has already been loaded by
12911 * the previous module so we just ignore it.
12912 * 3) Finally, if cast->type has not already been loaded, then we add that
12913 * swig_cast_info to the list (because the cast->type) pointer will
12914 * be correct.
12915 *
12916 * Once the cast array has been set up AND it does have new casts that need
12917 * to be added we sort non-self cast entries to move filtered out entries
12918 * to the end of the array and to arrange the rest in the increasing order
12919 * of their type pointer values. We store the index of the last added entry
12920 * in the cast->value field of the entry[0] (overwriting the name hash). Then
12921 * we sort <next|value> fields of the remaining entries to arrange hash values
12922 * in the increasing order. This way cast->next->type->name field matches
12923 * the cast->value hash.
12924 *
12925 * Example:
12926 * Array of casts for type stored at 0x5000, cast to type stored at 0x3000
12927 * has already been loaded
12928 *
12929 * After sweep-and-hash: After sort-by-type: After sort-by-hash:
12930 * ________________ ________________ ________________
12931 * | | | | | |
12932 * Entry | type = 0x5000 | | type = 0x5000 | | type = 0x5000 |
12933 * 0 | | | | | |
12934 * | next = Entry0 | | next = Entry0 | | next = Entry0 |
12935 * | value = 1212 | | value = 3 | | value = 3 |
12936 * | | | | | |
12937 * |================| |================| |================|
12938 * | | | | | |
12939 * Entry | type = 0x2000 | | type = 0x1000 | | type = 0x1000 |
12940 * 1 | | | | | |
12941 * | next = Entry1 | | next = Entry1 | | next = Entry3 |
12942 * | value = 3434 | | value = 4545 | | value = 2323 |
12943 * |________________| |________________| |________________|
12944 * | | | | | |
12945 * Entry | type = 0x3000 | | type = 0x2000 | | type = 0x2000 |
12946 * 2 | | | | | |
12947 * | next = 0 | | next = Entry2 | | next = Entry2 |
12948 * | value = 0 | | value = 3434 | | value = 3434 |
12949 * |________________| |________________| |________________|
12950 * | | | | | |
12951 * Entry | type = 0x1000 | | type = 0x4000 | | type = 0x4000 |
12952 * 3 | | | | | |
12953 * | next = Entry3 | | next = Entry3 | | next = Entry1 |
12954 * | value = 4545 | | value = 2323 | | value = 4545 |
12955 * |________________| |________________| |________________|
12956 * | | | | | |
12957 * Entry | type = 0x4000 | | type = 0x3000 | | type = 0x3000 |
12958 * 4 | | | | | |
12959 * | next = Entry4 | | next = 0 | | next = 0 |
12960 * | value = 2323 | | value = 0 | | value = 0 |
12961 * |________________| |________________| |________________|
12962 *
12963 * Once the cast array has been initialized, we use cast[0]->next field to link
12964 * it into the list of cast arrays for the type.
12965 * ____ ____ ____
12966 * type->cast->|next|->|next|->|next|->0
12967 * |----| |----| |----|
12968 * |----| |----| |----|
12969 * |----| |----| |----|
12970 *
12971 * Subsequent cast resolution works as follows:
12972 *
12973 * 1. Check whether the type matches the first entry in the current cast array.
12974 * 2. If not, then do a binary search over the (0:cast->value] interval using
12975 * either type address or the hash value of the type name.
12976 * 3. If not found, then move over to the next cast array (cast[0]->next).
12977 *
12978 * ----------------------------------------------------------------------------- */
12979
12980#ifdef __cplusplus
12981extern "C" {
12982#if 0
12983} /* c-mode */
12984#endif
12985#endif
12986
12987#if 0
12988#define SWIGRUNTIME_DEBUG
12989#endif
12990
12991#ifndef SWIG_INIT_CLIENT_DATA_TYPE
12992#define SWIG_INIT_CLIENT_DATA_TYPE void *
12993#endif
12994
12995/*
12996 * Sort function that puts cast entries with nonzero 'next' at the front
12997 * of the array while ordering them by addresses of their 'type' structs.
12998 */
12999SWIGINTERN int SWIG_CastCmpStruct(const void *pa, const void *pb) {
13000 swig_cast_info *pca = (swig_cast_info *)pa;
13001 swig_cast_info *pcb = (swig_cast_info *)pb;
13002 /* Entries with next != 0 (newly mapped) come before entries with next == 0 (already loaded) */
13003 if (!pca->next && pcb->next) return 1;
13004 if (pca->next && !pcb->next) return -1;
13005 /* Within the same group, sort by type pointer for binary search */
13006 if (pca->type < pcb->type) return -1;
13007 if (pca->type > pcb->type) return 1;
13008 return 0;
13009}
13010
13011/*
13012 * Shell-sort 'next' and 'value' field pairs to order them by 'value'.
13013 */
13015 const int hmax = size/9;
13016 int h, i;
13017 for(h = 1; h <= hmax; h = 3*h+1);
13018 for(; h > 0; h /= 3)
13019 {
13020 for(i = h; i < size; ++i)
13021 {
13022 swig_cast_info *p = cast[i].next;
13023 unsigned int hash = cast[i].value;
13024 int j = i;
13025 while(j >= h && hash < cast[j-h].value)
13026 {
13027 cast[j].next = cast[j-h].next;
13028 cast[j].value = cast[j-h].value;
13029 j -= h;
13030 }
13031 cast[j].next = p;
13032 cast[j].value = hash;
13033 }
13034 }
13035}
13036
13037SWIGRUNTIME void
13039 size_t i;
13040 swig_module_info *module_head, *iter;
13041 int init;
13042
13043 /* check to see if the circular list has been setup, if not, set it up */
13044 if (swig_module.next==0) {
13045 /* Initialize the swig_module */
13046 swig_module.type_initial = swig_type_initial;
13047 swig_module.cast_initial = swig_cast_initial;
13048 swig_module.next = &swig_module;
13049 init = 1;
13050 } else {
13051 init = 0;
13052 }
13053
13054 /* Try and load any already created modules */
13055 module_head = SWIG_GetModule(clientdata);
13056 if (!module_head) {
13057 /* This is the first module loaded for this interpreter */
13058 /* so set the swig module into the interpreter */
13059 SWIG_SetModule(clientdata, &swig_module);
13060 } else {
13061 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
13062 iter=module_head;
13063 do {
13064 if (iter==&swig_module) {
13065 /* Our module is already in the list, so there's nothing more to do. */
13066 return;
13067 }
13068 iter=iter->next;
13069 } while (iter!= module_head);
13070
13071 /* otherwise we must add our module into the list */
13072 swig_module.next = module_head->next;
13073 module_head->next = &swig_module;
13074 }
13075
13076 /* When multiple interpreters are used, a module could have already been initialized in
13077 a different interpreter, but not yet have a pointer in this interpreter.
13078 In this case, we do not want to continue adding types... everything should be
13079 set up already */
13080 if (init == 0) return;
13081
13082 /* Now work on filling in swig_module.types */
13083#ifdef SWIGRUNTIME_DEBUG
13084 printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
13085#endif
13086 for (i = 0; i < swig_module.size; ++i) {
13087 swig_type_info *type = 0;
13088 swig_type_info *target_type;
13089 swig_cast_info *cast, *first;
13090 int num_mapped = 0;
13091
13092#ifdef SWIGRUNTIME_DEBUG
13093 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
13094#endif
13095
13096 /* if there is another module already loaded */
13097 if (swig_module.next != &swig_module) {
13098 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
13099 }
13100 if (type) {
13101 /* Overwrite clientdata field */
13102#ifdef SWIGRUNTIME_DEBUG
13103 printf("SWIG_InitializeModule: found type %s\n", type->name);
13104#endif
13105 if (swig_module.type_initial[i]->clientdata) {
13106 type->clientdata = swig_module.type_initial[i]->clientdata;
13107#ifdef SWIGRUNTIME_DEBUG
13108 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
13109#endif
13110 }
13111 } else {
13112 type = swig_module.type_initial[i];
13113 }
13114
13115 /* Insert casting types */
13116 cast = first = swig_module.cast_initial[i];
13117 while (cast->type) {
13118
13119 /* Don't need to add information already in the list */
13120 target_type = 0;
13121#ifdef SWIGRUNTIME_DEBUG
13122 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
13123#endif
13124 if (swig_module.next != &swig_module) {
13125 target_type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
13126 if (target_type) {
13127
13128 /* Target type already defined in another module */
13129#ifdef SWIGRUNTIME_DEBUG
13130 printf("SWIG_InitializeModule: found cast %s\n", target_type->name);
13131#endif
13132 if (type == swig_module.type_initial[i]) {
13133#ifdef SWIGRUNTIME_DEBUG
13134 printf("SWIG_InitializeModule: skip old type %s\n", target_type->name);
13135#endif
13136 cast->type = target_type;
13137 target_type = 0;
13138 } else {
13139 /* Check if this cast is already in the list */
13140 swig_cast_info *ocast = SWIG_TypeCheck(target_type->name, type);
13141#ifdef SWIGRUNTIME_DEBUG
13142 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", target_type->name);
13143#endif
13144 if (!ocast) {
13145 cast->type = target_type;
13146 target_type = 0;
13147 }
13148 }
13149 }
13150 }
13151
13152 if (!target_type) {
13153#ifdef SWIGRUNTIME_DEBUG
13154 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
13155#endif
13156 /* Set inclusion mark for sorting */
13157 cast->next = cast;
13158 num_mapped++;
13159
13160 if (type == cast->type) {
13161#ifdef SWIGRUNTIME_DEBUG
13162 printf("%s : self cast at pos [%li]\n", type->name, cast - first);
13163#endif
13164 if (cast - first) {
13165
13166 /* Move cast to itself to the first entry in the array */
13167
13168 swig_cast_info tmp = *cast;
13169 *cast = *first;
13170 *first = tmp;
13171 }
13172 first++;
13173
13174 } else {
13175 cast->value = SWIG_Hash(cast->type->name, (unsigned int)strlen(cast->type->name));
13176 }
13177 }
13178 cast++;
13179 }
13180
13181 if (num_mapped) {
13182 if (cast - first) {
13183 swig_cast_info *tmp;
13184
13185 /* Sort casts by type address for binary search in SWIG_TypeCheckStruct */
13186 qsort(first, (size_t)(cast - first), sizeof(swig_cast_info), SWIG_CastCmpStruct);
13187
13188 /* Remap back links for added entries */
13189 cast = swig_module.cast_initial[i] + num_mapped;
13190 for (tmp = first; tmp < cast; tmp++) {
13191 tmp->next = tmp;
13192 }
13193 }
13194
13195 /* Set the value field of the first entry to the index of the last added entry */
13196 cast = swig_module.cast_initial[i];
13197 cast->value = (unsigned int)(num_mapped - 1);
13198
13199 num_mapped -= (int)(first - cast);
13200 if (num_mapped > 1) {
13201 /* Sort <'next','value'> pairs by 'value' for binary search in SWIG_TypeCheck */
13202
13203 SWIG_CastHashSort(first, num_mapped);
13204 }
13205
13206 first = type->cast;
13207 if (first) {
13208 /* Link the current set into the list of cast arrays */
13209 cast->next = first->next;
13210 first->next = cast;
13211 } else {
13212 cast->next = 0;
13213 type->cast = cast;
13214 }
13215 }
13216
13217 /* Set entry in modules->types array equal to the type */
13218 swig_module.types[i] = type;
13219 }
13220 swig_module.types[i] = 0;
13221
13222#ifdef SWIGRUNTIME_DEBUG
13223 printf("**** SWIG_InitializeModule: Cast List ******\n");
13224 for (i = 0; i < swig_module.size; ++i) {
13225 int j = 0;
13226 swig_cast_info *cast = swig_module.cast_initial[i];
13227 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
13228 while (cast->type) {
13229 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
13230 cast++;
13231 ++j;
13232 }
13233 printf("---- Total casts: %d\n",j);
13234 }
13235 printf("**** SWIG_InitializeModule: Cast List ******\n");
13236#endif
13237}
13238
13239/* This function will propagate the clientdata field of type to
13240* any new swig_type_info structures that have been added into the list
13241* of equivalent types. It is like calling
13242* SWIG_TypeClientData(type, clientdata) a second time.
13243*/
13244SWIGRUNTIME void
13246 size_t i;
13247 static int init_run = 0;
13248
13249 if (init_run) return;
13250 init_run = 1;
13251
13252 for (i = 0; i < swig_module.size; i++) {
13253 if (swig_module.types[i]->clientdata) {
13254 swig_cast_info *head, *cast;
13255 head = swig_module.types[i]->cast;
13256 while (head) {
13257 for (cast = head; (cast - head) <= head->value; cast++) {
13258 if (!cast->converter) {
13259 if (cast->type && !cast->type->clientdata)
13260 SWIG_TypeClientData(cast->type, swig_module.types[i]->clientdata);
13261 }
13262 }
13263 head = head->next;
13264 }
13265 }
13266 }
13267}
13268
13269#ifdef __cplusplus
13270#if 0
13271{ /* c-mode */
13272#endif
13273}
13274#endif
13275
13276
13277
13278/* Forward declaration of where the user's %init{} gets inserted */
13279void SWIG_init_user(lua_State* L );
13280
13281#ifdef __cplusplus
13282extern "C" {
13283#endif
13284/* this is the initialization function
13285 added at the very end of the code
13286 the function is always called SWIG_init, but an earlier #define will rename it
13287*/
13288#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
13289LUALIB_API int SWIG_init(lua_State* L)
13290#else
13291SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
13292#endif
13293{
13294#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
13295 int i;
13296 int globalRegister = 0;
13297 /* start with global table */
13299 /* SWIG's internal initialisation */
13300 SWIG_InitializeModule((void*)L);
13302#endif
13303
13304#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)) || defined(SWIG_LUA_ELUA_EMULATE)
13305 /* add a global fn */
13306 SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
13308#ifdef SWIG_DIRECTORS
13309 /* add director helper functions */
13310 SWIG_Lua_add_function(L,"swig_override",SWIG_Lua_director_override);
13311 SWIG_Lua_add_function(L,"swig_get_override",SWIG_Lua_director_get_override);
13312 SWIG_Lua_add_function(L,"swig_derive",SWIG_Lua_director_derive);
13313#endif
13314#endif
13315
13316#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
13317 /* set up base class pointers (the hierarchy) */
13318 for (i = 0; swig_types[i]; i++){
13319 if (swig_types[i]->clientdata){
13321 }
13322 }
13323#ifdef SWIG_LUA_MODULE_GLOBAL
13324 globalRegister = 1;
13325#endif
13326
13327
13328#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
13329 SWIG_Lua_namespace_register(L,&swig_SwigModule, globalRegister);
13330#endif
13331
13332#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
13333 for (i = 0; swig_types[i]; i++){
13334 if (swig_types[i]->clientdata){
13335 SWIG_Lua_elua_class_register_instance(L,(swig_lua_class*)(swig_types[i]->clientdata));
13336 }
13337 }
13338#endif
13339
13340#if defined(SWIG_LUA_ELUA_EMULATE)
13341 lua_newtable(L);
13342 SWIG_Lua_elua_emulate_register(L,swig_SwigModule.ns_methods);
13343 SWIG_Lua_elua_emulate_register_clear(L);
13344 if(globalRegister) {
13345 lua_pushstring(L,swig_SwigModule.name);
13346 lua_pushvalue(L,-2);
13347 lua_rawset(L,-4);
13348 }
13349#endif
13350
13351#endif
13352
13353#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
13354 /* invoke user-specific initialization */
13355 SWIG_init_user(L);
13356 /* end module */
13357 /* Note: We do not clean up the stack here (Lua will do this for us). At this
13358 point, we have the globals table and out module table on the stack. Returning
13359 one value makes the module table the result of the require command. */
13360 return 1;
13361#else
13362 return 0;
13363#endif
13364}
13365
13366#ifdef __cplusplus
13367}
13368#endif
13369
13370
13371const char* SWIG_LUACODE=
13372 "\n"
13373 " pl = plplotluac";
13374
13375void SWIG_init_user(lua_State* L)
13376{
13377 /* exec Lua code if applicable */
13379}
13380
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)
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[]
#define SWIG_init
SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State *L, swig_lua_class *clss)
luaL_Reg swig_lua_method
static int _wrap_poin3(lua_State *L)
static int _wrap_plot3d(lua_State *L)
static swig_type_info _swigt__p_f_int_p_q_const__double_p_q_const__double__void
PLINT(* defined_func)(PLFLT, PLFLT)
static int _wrap_vasp(lua_State *L)
#define SWIG_NewPointerObj(L, ptr, type, owner)
static int _wrap_imagefr(lua_State *L)
static swig_cast_info _swigc__p_p_double[]
#define SWIGINTERN
static int _wrap_gver(lua_State *L)
SWIGINTERN void SWIG_Lua_AddMetatable(lua_State *L, swig_type_info *type)
static int _wrap_scolbg(lua_State *L)
#define SWIG_FREE_ARRAY(PTR)
static int _wrap_PLGraphicsIn_keysym_set(lua_State *L)
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
static int _wrap_w3d(lua_State *L)
static swig_lua_const_info swig_SwigModule_constants[]
static int _wrap_PLGraphicsIn_dY_get(lua_State *L)
static char mapform_funcstr[255]
static int _wrap_stransform(lua_State *L)
SWIGINTERN void SWIG_Lua_class_register(lua_State *L, swig_lua_class *clss)
SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L, void *ptr, swig_type_info *type, int own)
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
static int _wrap_scolor(lua_State *L)
static int _wrap_line3(lua_State *L)
SWIGINTERN int SWIG_Lua_set_immutable(lua_State *L)
static swig_lua_const_info swig_PLGraphicsIn_Sf_SwigStatic_constants[]
static lua_State * myL
void(* ct_func)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer)
#define SWIG_POINTER_NO_NULL
static int _wrap_gdidev(lua_State *L)
static int _wrap_axes(lua_State *L)
static int _wrap_PLGraphicsIn_type_get(lua_State *L)
#define 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)
SWIGRUNTIME int SWIG_Lua_ConvertPtrAndOwn(lua_State *L, int index, void **ptr, swig_type_info *type, int flags, int *own)
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)
#define SWIG_CAST_NEW_MEMORY
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)
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:3699
char * strcpy(char *dst, const char *src)
static tclMatrixXtnsnDescr * head
Definition tclMatrix.c:466
static const char * name
Definition tkMain.c:132