PLplot 5.15.0
plplotluacLUA_wrap.c
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 4.0.2
4 *
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
10
11
12#ifndef SWIGLUA
13#define SWIGLUA
14#endif
15
16#define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA
17#define SWIG_LUA_MODULE_GLOBAL
18
19/* -----------------------------------------------------------------------------
20 * This section contains generic SWIG labels for method/variable
21 * declarations/attributes, and other compiler dependent labels.
22 * ----------------------------------------------------------------------------- */
23
24/* template workaround for compilers that cannot correctly implement the C++ standard */
25#ifndef SWIGTEMPLATEDISAMBIGUATOR
26# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
27# define SWIGTEMPLATEDISAMBIGUATOR template
28# elif defined(__HP_aCC)
29/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
30/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
31# define SWIGTEMPLATEDISAMBIGUATOR template
32# else
33# define SWIGTEMPLATEDISAMBIGUATOR
34# endif
35#endif
36
37/* inline attribute */
38#ifndef SWIGINLINE
39# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
40# define SWIGINLINE inline
41# else
42# define SWIGINLINE
43# endif
44#endif
45
46/* attribute recognised by some compilers to avoid 'unused' warnings */
47#ifndef SWIGUNUSED
48# if defined(__GNUC__)
49# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
50# define SWIGUNUSED __attribute__ ((__unused__))
51# else
52# define SWIGUNUSED
53# endif
54# elif defined(__ICC)
55# define SWIGUNUSED __attribute__ ((__unused__))
56# else
57# define SWIGUNUSED
58# endif
59#endif
60
61#ifndef SWIG_MSC_UNSUPPRESS_4505
62# if defined(_MSC_VER)
63# pragma warning(disable : 4505) /* unreferenced local function has been removed */
64# endif
65#endif
66
67#ifndef SWIGUNUSEDPARM
68# ifdef __cplusplus
69# define SWIGUNUSEDPARM(p)
70# else
71# define SWIGUNUSEDPARM(p) p SWIGUNUSED
72# endif
73#endif
74
75/* internal SWIG method */
76#ifndef SWIGINTERN
77# define SWIGINTERN static SWIGUNUSED
78#endif
79
80/* internal inline SWIG method */
81#ifndef SWIGINTERNINLINE
82# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
83#endif
84
85/* exporting methods */
86#if defined(__GNUC__)
87# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
88# ifndef GCC_HASCLASSVISIBILITY
89# define GCC_HASCLASSVISIBILITY
90# endif
91# endif
92#endif
93
94#ifndef SWIGEXPORT
95# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
96# if defined(STATIC_LINKED)
97# define SWIGEXPORT
98# else
99# define SWIGEXPORT __declspec(dllexport)
100# endif
101# else
102# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
103# define SWIGEXPORT __attribute__ ((visibility("default")))
104# else
105# define SWIGEXPORT
106# endif
107# endif
108#endif
109
110/* calling conventions for Windows */
111#ifndef SWIGSTDCALL
112# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
113# define SWIGSTDCALL __stdcall
114# else
115# define SWIGSTDCALL
116# endif
117#endif
118
119/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
120#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
121# define _CRT_SECURE_NO_DEPRECATE
122#endif
123
124/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
125#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
126# define _SCL_SECURE_NO_DEPRECATE
127#endif
128
129/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
130#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
131# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
132#endif
133
134/* Intel's compiler complains if a variable which was never initialised is
135 * cast to void, which is a common idiom which we use to indicate that we
136 * are aware a variable isn't used. So we just silence that warning.
137 * See: https://github.com/swig/swig/issues/192 for more discussion.
138 */
139#ifdef __INTEL_COMPILER
140# pragma warning disable 592
141#endif
142
143/* -----------------------------------------------------------------------------
144 * swigrun.swg
145 *
146 * This file contains generic C API SWIG runtime support for pointer
147 * type checking.
148 * ----------------------------------------------------------------------------- */
149
150/* This should only be incremented when either the layout of swig_type_info changes,
151 or for whatever reason, the runtime changes incompatibly */
152#define SWIG_RUNTIME_VERSION "4"
153
154/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
155#ifdef SWIG_TYPE_TABLE
156# define SWIG_QUOTE_STRING(x) #x
157# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
158# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
159#else
160# define SWIG_TYPE_TABLE_NAME
161#endif
162
163/*
164 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
165 creating a static or dynamic library from the SWIG runtime code.
166 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
167
168 But only do this if strictly necessary, ie, if you have problems
169 with your compiler or suchlike.
170*/
171
172#ifndef SWIGRUNTIME
173# define SWIGRUNTIME SWIGINTERN
174#endif
175
176#ifndef SWIGRUNTIMEINLINE
177# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
178#endif
179
180/* Generic buffer size */
181#ifndef SWIG_BUFFER_SIZE
182# define SWIG_BUFFER_SIZE 1024
183#endif
184
185/* Flags for pointer conversions */
186#define SWIG_POINTER_DISOWN 0x1
187#define SWIG_CAST_NEW_MEMORY 0x2
188#define SWIG_POINTER_NO_NULL 0x4
189
190/* Flags for new pointer objects */
191#define SWIG_POINTER_OWN 0x1
192
193
194/*
195 Flags/methods for returning states.
196
197 The SWIG conversion methods, as ConvertPtr, return an integer
198 that tells if the conversion was successful or not. And if not,
199 an error code can be returned (see swigerrors.swg for the codes).
200
201 Use the following macros/flags to set or process the returning
202 states.
203
204 In old versions of SWIG, code such as the following was usually written:
205
206 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
207 // success code
208 } else {
209 //fail code
210 }
211
212 Now you can be more explicit:
213
214 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
215 if (SWIG_IsOK(res)) {
216 // success code
217 } else {
218 // fail code
219 }
220
221 which is the same really, but now you can also do
222
223 Type *ptr;
224 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
225 if (SWIG_IsOK(res)) {
226 // success code
227 if (SWIG_IsNewObj(res) {
228 ...
229 delete *ptr;
230 } else {
231 ...
232 }
233 } else {
234 // fail code
235 }
236
237 I.e., now SWIG_ConvertPtr can return new objects and you can
238 identify the case and take care of the deallocation. Of course that
239 also requires SWIG_ConvertPtr to return new result values, such as
240
241 int SWIG_ConvertPtr(obj, ptr,...) {
242 if (<obj is ok>) {
243 if (<need new object>) {
244 *ptr = <ptr to new allocated object>;
245 return SWIG_NEWOBJ;
246 } else {
247 *ptr = <ptr to old object>;
248 return SWIG_OLDOBJ;
249 }
250 } else {
251 return SWIG_BADOBJ;
252 }
253 }
254
255 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
256 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
257 SWIG errors code.
258
259 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
260 allows to return the 'cast rank', for example, if you have this
261
262 int food(double)
263 int fooi(int);
264
265 and you call
266
267 food(1) // cast rank '1' (1 -> 1.0)
268 fooi(1) // cast rank '0'
269
270 just use the SWIG_AddCast()/SWIG_CheckState()
271*/
272
273#define SWIG_OK (0)
274#define SWIG_ERROR (-1)
275#define SWIG_IsOK(r) (r >= 0)
276#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
277
278/* The CastRankLimit says how many bits are used for the cast rank */
279#define SWIG_CASTRANKLIMIT (1 << 8)
280/* The NewMask denotes the object was created (using new/malloc) */
281#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
282/* The TmpMask is for in/out typemaps that use temporal objects */
283#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
284/* Simple returning values */
285#define SWIG_BADOBJ (SWIG_ERROR)
286#define SWIG_OLDOBJ (SWIG_OK)
287#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
288#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
289/* Check, add and del mask methods */
290#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
291#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
292#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
293#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
294#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
295#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
296
297/* Cast-Rank Mode */
298#if defined(SWIG_CASTRANK_MODE)
299# ifndef SWIG_TypeRank
300# define SWIG_TypeRank unsigned long
301# endif
302# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
303# define SWIG_MAXCASTRANK (2)
304# endif
305# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
306# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
308 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
309}
311 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
312}
313#else /* no cast-rank mode */
314# define SWIG_AddCast(r) (r)
315# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
316#endif
317
318
319#include <string.h>
320
321#ifdef __cplusplus
322extern "C" {
323#endif
324
325typedef void *(*swig_converter_func)(void *, int *);
326typedef struct swig_type_info *(*swig_dycast_func)(void **);
327
328/* Structure to store information on one type */
329typedef struct swig_type_info {
330 const char *name; /* mangled name of this type */
331 const char *str; /* human readable name of this type */
332 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
333 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
334 void *clientdata; /* language specific type data */
335 int owndata; /* flag if the structure owns the clientdata */
337
338/* Structure to store a type and conversion function used for casting */
339typedef struct swig_cast_info {
340 swig_type_info *type; /* pointer to type that is equivalent to this type */
341 swig_converter_func converter; /* function to cast the void pointers */
342 struct swig_cast_info *next; /* pointer to next cast in linked list */
343 struct swig_cast_info *prev; /* pointer to the previous cast */
345
346/* Structure used to store module information
347 * Each module generates one structure like this, and the runtime collects
348 * all of these structures and stores them in a circularly linked list.*/
349typedef struct swig_module_info {
350 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
351 size_t size; /* Number of types in this module */
352 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
353 swig_type_info **type_initial; /* Array of initially generated type structures */
354 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
355 void *clientdata; /* Language specific module data */
357
358/*
359 Compare two type names skipping the space characters, therefore
360 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
361
362 Return 0 when the two name types are equivalent, as in
363 strncmp, but skipping ' '.
364*/
365SWIGRUNTIME int
366SWIG_TypeNameComp(const char *f1, const char *l1,
367 const char *f2, const char *l2) {
368 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
369 while ((*f1 == ' ') && (f1 != l1)) ++f1;
370 while ((*f2 == ' ') && (f2 != l2)) ++f2;
371 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
372 }
373 return (int)((l1 - f1) - (l2 - f2));
374}
375
376/*
377 Check type equivalence in a name list like <name1>|<name2>|...
378 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
379*/
380SWIGRUNTIME int
381SWIG_TypeCmp(const char *nb, const char *tb) {
382 int equiv = 1;
383 const char* te = tb + strlen(tb);
384 const char* ne = nb;
385 while (equiv != 0 && *ne) {
386 for (nb = ne; *ne; ++ne) {
387 if (*ne == '|') break;
388 }
389 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
390 if (*ne) ++ne;
391 }
392 return equiv;
393}
394
395/*
396 Check type equivalence in a name list like <name1>|<name2>|...
397 Return 0 if not equal, 1 if equal
398*/
399SWIGRUNTIME int
400SWIG_TypeEquiv(const char *nb, const char *tb) {
401 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
402}
403
404/*
405 Check the typename
406*/
408SWIG_TypeCheck(const char *c, swig_type_info *ty) {
409 if (ty) {
410 swig_cast_info *iter = ty->cast;
411 while (iter) {
412 if (strcmp(iter->type->name, c) == 0) {
413 if (iter == ty->cast)
414 return iter;
415 /* Move iter to the top of the linked list */
416 iter->prev->next = iter->next;
417 if (iter->next)
418 iter->next->prev = iter->prev;
419 iter->next = ty->cast;
420 iter->prev = 0;
421 if (ty->cast) ty->cast->prev = iter;
422 ty->cast = iter;
423 return iter;
424 }
425 iter = iter->next;
426 }
427 }
428 return 0;
429}
430
431/*
432 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
433*/
436 if (ty) {
437 swig_cast_info *iter = ty->cast;
438 while (iter) {
439 if (iter->type == from) {
440 if (iter == ty->cast)
441 return iter;
442 /* Move iter to the top of the linked list */
443 iter->prev->next = iter->next;
444 if (iter->next)
445 iter->next->prev = iter->prev;
446 iter->next = ty->cast;
447 iter->prev = 0;
448 if (ty->cast) ty->cast->prev = iter;
449 ty->cast = iter;
450 return iter;
451 }
452 iter = iter->next;
453 }
454 }
455 return 0;
456}
457
458/*
459 Cast a pointer up an inheritance hierarchy
460*/
462SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
463 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
464}
465
466/*
467 Dynamic pointer casting. Down an inheritance hierarchy
468*/
471 swig_type_info *lastty = ty;
472 if (!ty || !ty->dcast) return ty;
473 while (ty && (ty->dcast)) {
474 ty = (*ty->dcast)(ptr);
475 if (ty) lastty = ty;
476 }
477 return lastty;
478}
479
480/*
481 Return the name associated with this type
482*/
483SWIGRUNTIMEINLINE const char *
485 return ty->name;
486}
487
488/*
489 Return the pretty name associated with this type,
490 that is an unmangled type name in a form presentable to the user.
491*/
492SWIGRUNTIME const char *
494 /* The "str" field contains the equivalent pretty names of the
495 type, separated by vertical-bar characters. We choose
496 to print the last name, as it is often (?) the most
497 specific. */
498 if (!type) return NULL;
499 if (type->str != NULL) {
500 const char *last_name = type->str;
501 const char *s;
502 for (s = type->str; *s; s++)
503 if (*s == '|') last_name = s+1;
504 return last_name;
505 }
506 else
507 return type->name;
508}
509
510/*
511 Set the clientdata field for a type
512*/
513SWIGRUNTIME void
515 swig_cast_info *cast = ti->cast;
516 /* if (ti->clientdata == clientdata) return; */
518
519 while (cast) {
520 if (!cast->converter) {
521 swig_type_info *tc = cast->type;
522 if (!tc->clientdata) {
524 }
525 }
526 cast = cast->next;
527 }
528}
529SWIGRUNTIME void
532 ti->owndata = 1;
533}
534
535/*
536 Search for a swig_type_info structure only by mangled name
537 Search is a O(log #types)
538
539 We start searching at module start, and finish searching when start == end.
540 Note: if start == end at the beginning of the function, we go all the way around
541 the circular list.
542*/
545 swig_module_info *end,
546 const char *name) {
547 swig_module_info *iter = start;
548 do {
549 if (iter->size) {
550 size_t l = 0;
551 size_t r = iter->size - 1;
552 do {
553 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
554 size_t i = (l + r) >> 1;
555 const char *iname = iter->types[i]->name;
556 if (iname) {
557 int compare = strcmp(name, iname);
558 if (compare == 0) {
559 return iter->types[i];
560 } else if (compare < 0) {
561 if (i) {
562 r = i - 1;
563 } else {
564 break;
565 }
566 } else if (compare > 0) {
567 l = i + 1;
568 }
569 } else {
570 break; /* should never happen */
571 }
572 } while (l <= r);
573 }
574 iter = iter->next;
575 } while (iter != end);
576 return 0;
577}
578
579/*
580 Search for a swig_type_info structure for either a mangled name or a human readable name.
581 It first searches the mangled names of the types, which is a O(log #types)
582 If a type is not found it then searches the human readable names, which is O(#types).
583
584 We start searching at module start, and finish searching when start == end.
585 Note: if start == end at the beginning of the function, we go all the way around
586 the circular list.
587*/
590 swig_module_info *end,
591 const char *name) {
592 /* STEP 1: Search the name field using binary search */
594 if (ret) {
595 return ret;
596 } else {
597 /* STEP 2: If the type hasn't been found, do a complete search
598 of the str field (the human readable name) */
599 swig_module_info *iter = start;
600 do {
601 size_t i = 0;
602 for (; i < iter->size; ++i) {
603 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
604 return iter->types[i];
605 }
606 iter = iter->next;
607 } while (iter != end);
608 }
609
610 /* neither found a match */
611 return 0;
612}
613
614/*
615 Pack binary data into a string
616*/
617SWIGRUNTIME char *
618SWIG_PackData(char *c, void *ptr, size_t sz) {
619 static const char hex[17] = "0123456789abcdef";
620 const unsigned char *u = (unsigned char *) ptr;
621 const unsigned char *eu = u + sz;
622 for (; u != eu; ++u) {
623 unsigned char uu = *u;
624 *(c++) = hex[(uu & 0xf0) >> 4];
625 *(c++) = hex[uu & 0xf];
626 }
627 return c;
628}
629
630/*
631 Unpack binary data from a string
632*/
633SWIGRUNTIME const char *
634SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
635 unsigned char *u = (unsigned char *) ptr;
636 const unsigned char *eu = u + sz;
637 for (; u != eu; ++u) {
638 char d = *(c++);
639 unsigned char uu;
640 if ((d >= '0') && (d <= '9'))
641 uu = (unsigned char)((d - '0') << 4);
642 else if ((d >= 'a') && (d <= 'f'))
643 uu = (unsigned char)((d - ('a'-10)) << 4);
644 else
645 return (char *) 0;
646 d = *(c++);
647 if ((d >= '0') && (d <= '9'))
648 uu |= (unsigned char)(d - '0');
649 else if ((d >= 'a') && (d <= 'f'))
650 uu |= (unsigned char)(d - ('a'-10));
651 else
652 return (char *) 0;
653 *u = uu;
654 }
655 return c;
656}
657
658/*
659 Pack 'void *' into a string buffer.
660*/
661SWIGRUNTIME char *
662SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
663 char *r = buff;
664 if ((2*sizeof(void *) + 2) > bsz) return 0;
665 *(r++) = '_';
666 r = SWIG_PackData(r,&ptr,sizeof(void *));
667 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
668 strcpy(r,name);
669 return buff;
670}
671
672SWIGRUNTIME const char *
673SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
674 if (*c != '_') {
675 if (strcmp(c,"NULL") == 0) {
676 *ptr = (void *) 0;
677 return name;
678 } else {
679 return 0;
680 }
681 }
682 return SWIG_UnpackData(++c,ptr,sizeof(void *));
683}
684
685SWIGRUNTIME char *
686SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
687 char *r = buff;
688 size_t lname = (name ? strlen(name) : 0);
689 if ((2*sz + 2 + lname) > bsz) return 0;
690 *(r++) = '_';
691 r = SWIG_PackData(r,ptr,sz);
692 if (lname) {
693 strncpy(r,name,lname+1);
694 } else {
695 *r = 0;
696 }
697 return buff;
698}
699
700SWIGRUNTIME const char *
701SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
702 if (*c != '_') {
703 if (strcmp(c,"NULL") == 0) {
704 memset(ptr,0,sz);
705 return name;
706 } else {
707 return 0;
708 }
709 }
710 return SWIG_UnpackData(++c,ptr,sz);
711}
712
713#ifdef __cplusplus
714}
715#endif
716
717/* Errors in SWIG */
718#define SWIG_UnknownError -1
719#define SWIG_IOError -2
720#define SWIG_RuntimeError -3
721#define SWIG_IndexError -4
722#define SWIG_TypeError -5
723#define SWIG_DivisionByZero -6
724#define SWIG_OverflowError -7
725#define SWIG_SyntaxError -8
726#define SWIG_ValueError -9
727#define SWIG_SystemError -10
728#define SWIG_AttributeError -11
729#define SWIG_MemoryError -12
730#define SWIG_NullReferenceError -13
731
732
733
734/* -----------------------------------------------------------------------------
735 * luarun.swg
736 *
737 * This file contains the runtime support for Lua modules
738 * and includes code for managing global variables and pointer
739 * type checking.
740 * ----------------------------------------------------------------------------- */
741
742#ifdef __cplusplus
743extern "C" {
744#endif
745
746#include "lua.h"
747#include "lauxlib.h"
748#include <stdlib.h> /* for malloc */
749#include <assert.h> /* for a few sanity tests */
750
751/* -----------------------------------------------------------------------------
752 * Lua flavors
753 * ----------------------------------------------------------------------------- */
754
755#define SWIG_LUA_FLAVOR_LUA 1
756#define SWIG_LUA_FLAVOR_ELUA 2
757#define SWIG_LUA_FLAVOR_ELUAC 3
758
759#if !defined(SWIG_LUA_TARGET)
760# error SWIG_LUA_TARGET not defined
761#endif
762
763#if defined(SWIG_LUA_ELUA_EMULATE)
764
765struct swig_elua_entry;
766
767typedef struct swig_elua_key {
768 int type;
769 union {
770 const char* strkey;
771 lua_Number numkey;
772 } key;
773} swig_elua_key;
774
775typedef struct swig_elua_val {
776 int type;
777 union {
778 lua_Number number;
779 const struct swig_elua_entry *table;
780 const char *string;
781 lua_CFunction function;
782 struct {
783 char member;
784 long lvalue;
785 void *pvalue;
786 swig_type_info **ptype;
787 } userdata;
788 } value;
789} swig_elua_val;
790
791typedef struct swig_elua_entry {
792 swig_elua_key key;
793 swig_elua_val value;
794} swig_elua_entry;
795
796#define LSTRKEY(x) {LUA_TSTRING, {.strkey = x} }
797#define LNUMKEY(x) {LUA_TNUMBER, {.numkey = x} }
798#define LNILKEY {LUA_TNIL, {.strkey = 0} }
799
800#define LNUMVAL(x) {LUA_TNUMBER, {.number = x} }
801#define LFUNCVAL(x) {LUA_TFUNCTION, {.function = x} }
802#define LROVAL(x) {LUA_TTABLE, {.table = x} }
803#define LNILVAL {LUA_TNIL, {.string = 0} }
804#define LSTRVAL(x) {LUA_TSTRING, {.string = x} }
805
806#define LUA_REG_TYPE swig_elua_entry
807
808#define SWIG_LUA_ELUA_EMUL_METATABLE_KEY "__metatable"
809
810#define lua_pushrotable(L,p)\
811 lua_newtable(L);\
812 assert(p);\
813 SWIG_Lua_elua_emulate_register(L,(swig_elua_entry*)(p));
814
815#define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
816 LSTRKEY(B), {LUA_TUSERDATA, { .userdata={0,0,(void*)(C),&D} } }
817
818#define SWIG_LUA_CONSTTAB_BINARY(B,S,C,D)\
819 LSTRKEY(B), {LUA_TUSERDATA, { .userdata={1,S,(void*)(C),&D} } }
820#endif
821
822#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
823# define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
824# define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
825# define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
826# define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
827 /* Those two types of constants are not supported in elua */
828
829#ifndef SWIG_LUA_CONSTTAB_POINTER
830#warning eLua does not support pointers as constants. By default, nil will be used as value
831#define SWIG_LUA_CONSTTAB_POINTER(B,C,D) LSTRKEY(B), LNILVAL
832#endif
833
834#ifndef SWIG_LUA_CONSTTAB_BINARY
835#warning eLua does not support pointers to member as constants. By default, nil will be used as value
836#define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D) LSTRKEY(B), LNILVAL
837#endif
838#else /* SWIG_LUA_FLAVOR_LUA */
839# define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
840# define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
841# define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
842# define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
843# define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
844 SWIG_LUA_POINTER, (char *)B, 0, 0, (void *)C, &D
845# define SWIG_LUA_CONSTTAB_BINARY(B, S, C, D)\
846 SWIG_LUA_BINARY, (char *)B, S, 0, (void *)C, &D
847#endif
848
849#ifndef SWIG_LUA_ELUA_EMULATE
850#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
851# define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
852# define LSTRVAL LRO_STRVAL
853#endif
854#endif /* SWIG_LUA_ELUA_EMULATE*/
855
856#ifndef SWIG_LUA_ELUA_EMULATE
857#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
858
859#ifndef MIN_OPT_LEVEL
860#define MIN_OPT_LEVEL 2
861#endif
862
863#include "lrodefs.h"
864#include "lrotable.h"
865#endif
866#endif /* SWIG_LUA_ELUA_EMULATE*/
867/* -----------------------------------------------------------------------------
868 * compatibility defines
869 * ----------------------------------------------------------------------------- */
870
871/* History of Lua C API length functions: In Lua 5.0 (and before?)
872 there was "lua_strlen". In Lua 5.1, this was renamed "lua_objlen",
873 but a compatibility define of "lua_strlen" was added. In Lua 5.2,
874 this function was again renamed, to "lua_rawlen" (to emphasize that
875 it doesn't call the "__len" metamethod), and the compatibility
876 define of lua_strlen was removed. All SWIG uses have been updated
877 to "lua_rawlen", and we add our own defines of that here for older
878 versions of Lua. */
879#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
880# define lua_rawlen lua_strlen
881#elif LUA_VERSION_NUM == 501
882# define lua_rawlen lua_objlen
883#endif
884
885
886/* lua_pushglobaltable is the recommended "future-proof" way to get
887 the global table for Lua 5.2 and later. Here we define
888 lua_pushglobaltable ourselves for Lua versions before 5.2. */
889#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
890# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
891#endif
892
893/* lua_absindex was introduced in Lua 5.2 */
894#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
895# define lua_absindex(L,i) ((i)>0 || (i) <= LUA_REGISTRYINDEX ? (i) : lua_gettop(L) + (i) + 1)
896#endif
897
898/* lua_rawsetp was introduced in Lua 5.2 */
899#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
900#define lua_rawsetp(L,index,ptr)\
901 lua_pushlightuserdata(L,(void*)(ptr));\
902 lua_insert(L,-2);\
903 lua_rawset(L,index);
904
905#define lua_rawgetp(L,index,ptr)\
906 lua_pushlightuserdata(L,(void*)(ptr));\
907 lua_rawget(L,index);
908
909#endif
910
911/* --------------------------------------------------------------------------
912 * Helper functions for error handling
913 * -------------------------------------------------------------------------- */
914
915/* Push the string STR on the Lua stack, like lua_pushstring, but
916 prefixed with the location of the innermost Lua call-point
917 (as formatted by luaL_where). */
918SWIGRUNTIME void
919SWIG_Lua_pusherrstring (lua_State *L, const char *str)
920{
921 luaL_where (L, 1);
922 lua_pushstring (L, str);
923 lua_concat (L, 2);
924}
925
926/* Push a formatted string generated from FMT and following args on
927 the Lua stack, like lua_pushfstring, but prefixed with the
928 location of the innermost Lua call-point (as formatted by luaL_where). */
929SWIGRUNTIME void
930SWIG_Lua_pushferrstring (lua_State *L, const char *fmt, ...)
931{
932 va_list argp;
933 va_start(argp, fmt);
934 luaL_where(L, 1);
935 lua_pushvfstring(L, fmt, argp);
936 va_end(argp);
937 lua_concat(L, 2);
938}
939
940
941/* -----------------------------------------------------------------------------
942 * global swig types
943 * ----------------------------------------------------------------------------- */
944/* Constant table */
945#define SWIG_LUA_INT 1
946#define SWIG_LUA_FLOAT 2
947#define SWIG_LUA_STRING 3
948#define SWIG_LUA_POINTER 4
949#define SWIG_LUA_BINARY 5
950#define SWIG_LUA_CHAR 6
951
952/* Structure for variable linking table */
953typedef struct {
954 const char *name;
955 lua_CFunction get;
956 lua_CFunction set;
958
959#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
960typedef const LUA_REG_TYPE swig_lua_method;
961typedef const LUA_REG_TYPE swig_lua_const_info;
962#else /* Normal lua */
963typedef luaL_Reg swig_lua_method;
964
965/* Constant information structure */
966typedef struct {
967 int type;
968 char *name;
969 long lvalue;
970 double dvalue;
971 void *pvalue;
974
975#endif
976
977typedef struct {
978 const char *name;
979 lua_CFunction getmethod;
980 lua_CFunction setmethod;
982
983
984struct swig_lua_class;
985/* Can be used to create namespaces. Currently used to wrap class static methods/variables/constants */
986typedef struct swig_lua_namespace {
987 const char *name;
994
995typedef struct swig_lua_class {
996 const char *name; /* Name that this class has in Lua */
997 const char *fqname; /* Fully qualified name - Scope + class name */
999 lua_CFunction constructor;
1000 void (*destructor)(void *);
1004 swig_lua_method *metatable; /* 0 for -eluac */
1006 const char **base_names;
1008
1009/* this is the struct for wrapping all pointers in SwigLua
1010*/
1011typedef struct {
1013 int own; /* 1 if owned & must be destroyed */
1014 void *ptr;
1016
1017/* this is the struct for wrapping arbitrary packed binary data
1018(currently it is only used for member function pointers)
1019the data ordering is similar to swig_lua_userdata, but it is currently not possible
1020to tell the two structures apart within SWIG, other than by looking at the type
1021*/
1022typedef struct {
1024 int own; /* 1 if owned & must be destroyed */
1025 char data[1]; /* arbitrary amount of data */
1027
1028/* Common SWIG API */
1029#define SWIG_NewPointerObj(L, ptr, type, owner) SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
1030#define SWIG_ConvertPtr(L,idx, ptr, type, flags) SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
1031#define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname) SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
1032/* for C++ member pointers, ie, member methods */
1033#define SWIG_ConvertMember(L, idx, ptr, sz, ty) SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
1034#define SWIG_NewMemberObj(L, ptr, sz, type) SWIG_Lua_NewPackedObj(L, ptr, sz, type)
1035
1036/* Runtime API */
1037#define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
1038#define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
1039#define SWIG_MODULE_CLIENTDATA_TYPE lua_State*
1040
1041/* Contract support */
1042#define SWIG_contract_assert(expr, msg) \
1043 if (!(expr)) { SWIG_Lua_pusherrstring(L, (char *) msg); goto fail; } else
1044
1045
1046/* helper #defines */
1047#define SWIG_fail {goto fail;}
1048#define SWIG_fail_arg(func_name,argnum,type) \
1049 {SWIG_Lua_pushferrstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
1050 func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
1051 goto fail;}
1052#define SWIG_fail_ptr(func_name,argnum,type) \
1053 SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
1054#define SWIG_check_num_args(func_name,a,b) \
1055 if (lua_gettop(L)<a || lua_gettop(L)>b) \
1056 {SWIG_Lua_pushferrstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
1057 goto fail;}
1058
1059
1060#define SWIG_Lua_get_table(L,n) \
1061 (lua_pushstring(L, n), lua_rawget(L,-2))
1062
1063#define SWIG_Lua_add_function(L,n,f) \
1064 (lua_pushstring(L, n), \
1065 lua_pushcfunction(L, f), \
1066 lua_rawset(L,-3))
1067
1068#define SWIG_Lua_add_boolean(L,n,b) \
1069 (lua_pushstring(L, n), \
1070 lua_pushboolean(L, b), \
1071 lua_rawset(L,-3))
1072
1073/* special helper for allowing 'nil' for usertypes */
1074#define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))
1075
1076#ifdef __cplusplus
1077/* Special helper for member function pointers
1078it gets the address, casts it, then dereferences it */
1079/*#define SWIG_mem_fn_as_voidptr(a) (*((char**)&(a))) */
1080#endif
1081
1082/* storing/access of swig_module_info */
1084SWIG_Lua_GetModule(lua_State *L) {
1085 swig_module_info *ret = 0;
1086 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1087 lua_rawget(L,LUA_REGISTRYINDEX);
1088 if (lua_islightuserdata(L,-1))
1089 ret=(swig_module_info*)lua_touserdata(L,-1);
1090 lua_pop(L,1); /* tidy */
1091 return ret;
1092}
1093
1094SWIGRUNTIME void
1095SWIG_Lua_SetModule(lua_State *L, swig_module_info *module) {
1096 /* add this all into the Lua registry: */
1097 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
1098 lua_pushlightuserdata(L,(void*)module);
1099 lua_rawset(L,LUA_REGISTRYINDEX);
1100}
1101
1102/* -----------------------------------------------------------------------------
1103 * global variable support code: modules
1104 * ----------------------------------------------------------------------------- */
1105
1106/* this function is called when trying to set an immutable.
1107default action is to print an error.
1108This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
1110{
1111/* there should be 1 param passed in: the new value */
1112#ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
1113 lua_pop(L,1); /* remove it */
1114 luaL_error(L,"This variable is immutable");
1115#endif
1116 return 0; /* should not return anything */
1117}
1118
1119#ifdef SWIG_LUA_ELUA_EMULATE
1120
1121SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own);
1122SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type);
1123static int swig_lua_elua_emulate_unique_key;
1124
1125/* This function emulates eLua rotables behaviour. It loads a rotable definition into the usual lua table. */
1126SWIGINTERN void SWIG_Lua_elua_emulate_register(lua_State *L, const swig_elua_entry *table)
1127{
1128 int i, table_parsed, parsed_tables_array, target_table;
1129 assert(lua_istable(L,-1));
1130 target_table = lua_gettop(L);
1131 /* Get the registry where we put all parsed tables to avoid loops */
1132 lua_rawgetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
1133 if(lua_isnil(L,-1)) {
1134 lua_pop(L,1);
1135 lua_newtable(L);
1136 lua_pushvalue(L,-1);
1137 lua_rawsetp(L,LUA_REGISTRYINDEX,(void*)(&swig_lua_elua_emulate_unique_key));
1138 }
1139 parsed_tables_array = lua_gettop(L);
1140 lua_pushvalue(L,target_table);
1141 lua_rawsetp(L, parsed_tables_array, table);
1142 table_parsed = 0;
1143 const int SWIGUNUSED pairs_start = lua_gettop(L);
1144 for(i = 0;table[i].key.type != LUA_TNIL || table[i].value.type != LUA_TNIL;i++)
1145 {
1146 const swig_elua_entry *entry = table + i;
1147 int is_metatable = 0;
1148 switch(entry->key.type) {
1149 case LUA_TSTRING:
1150 lua_pushstring(L,entry->key.key.strkey);
1151 if(strcmp(entry->key.key.strkey, SWIG_LUA_ELUA_EMUL_METATABLE_KEY) == 0)
1152 is_metatable = 1;
1153 break;
1154 case LUA_TNUMBER:
1155 lua_pushnumber(L,entry->key.key.numkey);
1156 break;
1157 case LUA_TNIL:
1158 lua_pushnil(L);
1159 break;
1160 default:
1161 assert(0);
1162 }
1163 switch(entry->value.type) {
1164 case LUA_TSTRING:
1165 lua_pushstring(L,entry->value.value.string);
1166 break;
1167 case LUA_TNUMBER:
1168 lua_pushnumber(L,entry->value.value.number);
1169 break;
1170 case LUA_TFUNCTION:
1171 lua_pushcfunction(L,entry->value.value.function);
1172 break;
1173 case LUA_TTABLE:
1174 lua_rawgetp(L,parsed_tables_array, entry->value.value.table);
1175 table_parsed = !lua_isnil(L,-1);
1176 if(!table_parsed) {
1177 lua_pop(L,1); /*remove nil */
1178 lua_newtable(L);
1179 SWIG_Lua_elua_emulate_register(L,entry->value.value.table);
1180 }
1181 if(is_metatable) {
1182 assert(lua_istable(L,-1));
1183 lua_pushvalue(L,-1);
1184 lua_setmetatable(L,target_table);
1185 }
1186
1187 break;
1188 case LUA_TUSERDATA:
1189 if(entry->value.value.userdata.member)
1190 SWIG_NewMemberObj(L,entry->value.value.userdata.pvalue,
1191 entry->value.value.userdata.lvalue,
1192 *(entry->value.value.userdata.ptype));
1193 else
1194 SWIG_NewPointerObj(L,entry->value.value.userdata.pvalue,
1195 *(entry->value.value.userdata.ptype),0);
1196 break;
1197 case LUA_TNIL:
1198 lua_pushnil(L);
1199 break;
1200 default:
1201 assert(0);
1202 }
1203 assert(lua_gettop(L) == pairs_start + 2);
1204 lua_rawset(L,target_table);
1205 }
1206 lua_pop(L,1); /* Removing parsed tables storage */
1207 assert(lua_gettop(L) == target_table);
1208}
1209
1210SWIGINTERN void SWIG_Lua_elua_emulate_register_clear(lua_State *L)
1211{
1212 lua_pushnil(L);
1213 lua_rawsetp(L, LUA_REGISTRYINDEX, &swig_lua_elua_emulate_unique_key);
1214}
1215
1216SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L);
1217
1218SWIGINTERN int SWIG_Lua_emulate_elua_getmetatable(lua_State *L)
1219{
1220 SWIG_check_num_args("getmetatable(SWIG eLua emulation)", 1, 1);
1222 lua_getfield(L,-1,"lua_getmetatable");
1223 lua_remove(L,-2); /* remove the registry*/
1224 assert(!lua_isnil(L,-1));
1225 lua_pushvalue(L,1);
1226 assert(lua_gettop(L) == 3); /* object | function | object again */
1227 lua_call(L,1,1);
1228 if(!lua_isnil(L,-1)) /*There is an ordinary metatable */
1229 return 1;
1230 /*if it is a table, then emulate elua behaviour - check for __metatable attribute of a table*/
1231 assert(lua_gettop(L) == 2);
1232 if(lua_istable(L,-2)) {
1233 lua_pop(L,1); /*remove the nil*/
1234 lua_getfield(L,-1, SWIG_LUA_ELUA_EMUL_METATABLE_KEY);
1235 }
1236 assert(lua_gettop(L) == 2);
1237 return 1;
1238
1239fail:
1240 lua_error(L);
1241 return 0;
1242}
1243
1244SWIGINTERN void SWIG_Lua_emulate_elua_swap_getmetatable(lua_State *L)
1245{
1248 lua_pushstring(L,"lua_getmetatable");
1249 lua_getfield(L,-2,"getmetatable");
1250 assert(!lua_isnil(L,-1));
1251 lua_rawset(L,-4);
1252 lua_pushstring(L, "getmetatable");
1253 lua_pushcfunction(L, SWIG_Lua_emulate_elua_getmetatable);
1254 lua_rawset(L,-3);
1255 lua_pop(L,2);
1256
1257}
1258/* END OF REMOVE */
1259
1260#endif
1261/* -----------------------------------------------------------------------------
1262 * global variable support code: namespaces and modules (which are the same thing)
1263 * ----------------------------------------------------------------------------- */
1264
1266{
1267/* there should be 2 params passed in
1268 (1) table (not the meta table)
1269 (2) string name of the attribute
1270*/
1271 assert(lua_istable(L,-2)); /* just in case */
1272 lua_getmetatable(L,-2);
1273 assert(lua_istable(L,-1));
1274 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1275 assert(lua_istable(L,-1));
1276 /* look for the key in the .get table */
1277 lua_pushvalue(L,2); /* key */
1278 lua_rawget(L,-2);
1279 lua_remove(L,-2); /* stack tidy, remove .get table */
1280 if (lua_iscfunction(L,-1))
1281 { /* found it so call the fn & return its value */
1282 lua_call(L,0,1); /* 1 value in (userdata),1 out (result) */
1283 lua_remove(L,-2); /* stack tidy, remove metatable */
1284 return 1;
1285 }
1286 lua_pop(L,1); /* remove whatever was there */
1287 /* ok, so try the .fn table */
1288 SWIG_Lua_get_table(L,".fn"); /* find the .get table */
1289 assert(lua_istable(L,-1)); /* just in case */
1290 lua_pushvalue(L,2); /* key */
1291 lua_rawget(L,-2); /* look for the fn */
1292 lua_remove(L,-2); /* stack tidy, remove .fn table */
1293 if (lua_isfunction(L,-1)) /* note: whether it's a C function or lua function */
1294 { /* found it so return the fn & let lua call it */
1295 lua_remove(L,-2); /* stack tidy, remove metatable */
1296 return 1;
1297 }
1298 lua_pop(L,1); /* remove whatever was there */
1299 return 0;
1300}
1301
1303{
1304/* there should be 3 params passed in
1305 (1) table (not the meta table)
1306 (2) string name of the attribute
1307 (3) any for the new value
1308*/
1309
1310 assert(lua_istable(L,1));
1311 lua_getmetatable(L,1); /* get the meta table */
1312 assert(lua_istable(L,-1));
1313
1314 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1315 if (lua_istable(L,-1))
1316 {
1317 /* look for the key in the .set table */
1318 lua_pushvalue(L,2); /* key */
1319 lua_rawget(L,-2);
1320 if (lua_iscfunction(L,-1))
1321 { /* found it so call the fn & return its value */
1322 lua_pushvalue(L,3); /* value */
1323 lua_call(L,1,0);
1324 return 0;
1325 }
1326 lua_pop(L,1); /* remove the value */
1327 }
1328 lua_pop(L,1); /* remove the value .set table */
1329 lua_pop(L,1); /* remote metatable */
1330 lua_rawset(L,-3);
1331 return 0;
1332}
1333
1334#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
1335SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[]); /* forward declaration */
1336SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn); /* forward declaration */
1337SWIGINTERN void SWIG_Lua_class_register(lua_State *L,swig_lua_class *clss);
1338
1339/* helper function - register namespace methods and attributes into namespace */
1341{
1342 int i;
1343 /* There must be namespace table (not metatable) at the top of the stack */
1344 assert(lua_istable(L,-1));
1346
1347 /* add methods to the namespace/module table */
1348 for(i=0;ns->ns_methods[i].name;i++){
1349 SWIG_Lua_add_function(L,ns->ns_methods[i].name,ns->ns_methods[i].func);
1350 }
1351 lua_getmetatable(L,-1);
1352
1353 /* add fns */
1354 for(i=0;ns->ns_attributes[i].name;i++){
1356 }
1357
1358 /* clear stack - remove metatble */
1359 lua_pop(L,1);
1360 return 0;
1361}
1362
1363/* Register all classes in the namespace */
1365{
1366 swig_lua_class **classes;
1367
1368 /* There must be a module/namespace table at the top of the stack */
1369 assert(lua_istable(L,-1));
1370
1371 classes = ns->ns_classes;
1372
1373 if( classes != 0 ) {
1374 while(*classes != 0) {
1375 SWIG_Lua_class_register(L, *classes);
1376 classes++;
1377 }
1378 }
1379}
1380
1381/* Helper function. Creates namespace table and adds it to module table
1382 if 'reg' is true, then will register namespace table to parent one (must be on top of the stack
1383 when function is called).
1384 Function always returns newly registered table on top of the stack.
1385*/
1387{
1388 swig_lua_namespace **sub_namespace;
1389 /* 1 argument - table on the top of the stack */
1390 const int SWIGUNUSED begin = lua_gettop(L);
1391 assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table or parent namespace table */
1392 lua_checkstack(L,5);
1393 lua_newtable(L); /* namespace itself */
1394 lua_newtable(L); /* metatable for namespace */
1395
1396 /* add a table called ".get" */
1397 lua_pushstring(L,".get");
1398 lua_newtable(L);
1399 lua_rawset(L,-3);
1400 /* add a table called ".set" */
1401 lua_pushstring(L,".set");
1402 lua_newtable(L);
1403 lua_rawset(L,-3);
1404 /* add a table called ".fn" */
1405 lua_pushstring(L,".fn");
1406 lua_newtable(L);
1407 lua_rawset(L,-3);
1408
1409 /* add accessor fns for using the .get,.set&.fn */
1412
1413 lua_setmetatable(L,-2); /* set metatable */
1414
1415 /* Register all functions, variables etc */
1417 /* Register classes */
1419
1420 sub_namespace = ns->ns_namespaces;
1421 if( sub_namespace != 0) {
1422 while(*sub_namespace != 0) {
1423 SWIG_Lua_namespace_register(L, *sub_namespace, 1);
1424 lua_pop(L,1); /* removing sub-namespace table */
1425 sub_namespace++;
1426 }
1427 }
1428
1429 if (reg) {
1430 lua_pushstring(L,ns->name);
1431 lua_pushvalue(L,-2);
1432 lua_rawset(L,-4); /* add namespace to module table */
1433 }
1434 assert(lua_gettop(L) == begin+1);
1435}
1436#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */
1437
1438/* -----------------------------------------------------------------------------
1439 * global variable support code: classes
1440 * ----------------------------------------------------------------------------- */
1441
1442SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname);
1443
1444typedef int (*swig_lua_base_iterator_func)(lua_State*,swig_type_info*, int, int *ret);
1445
1447 int first_arg, swig_lua_base_iterator_func func, int *const ret)
1448{
1449 /* first_arg - position of the object in stack. Everything that is above are arguments
1450 * and is passed to every evocation of the func */
1451 int last_arg = lua_gettop(L);/* position of last argument */
1452 int original_metatable = last_arg + 1;
1453 size_t bases_count;
1454 int result = SWIG_ERROR;
1455 int bases_table;
1456 (void)swig_type;
1457 lua_getmetatable(L,first_arg);
1458
1459 /* initialise base search */
1460#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1461 SWIG_Lua_get_table(L,".bases");
1462 assert(lua_istable(L,-1));
1463 bases_count = lua_rawlen(L,-1);
1464 bases_table = lua_gettop(L);
1465#else
1466 /* In elua .bases table doesn't exist. Use table from swig_lua_class */
1467 (void)bases_table;
1468 assert(swig_type!=0);
1470 swig_lua_class **bases= ((swig_lua_class*)(swig_type->clientdata))->bases;
1471 const char **base_names= ((swig_lua_class*)(swig_type->clientdata))->base_names;
1472 bases_count = 0;
1473 for(;base_names[bases_count];
1474 bases_count++);/* get length of bases */
1475#endif
1476
1477 if(ret)
1478 *ret = 0;
1479 if(bases_count>0)
1480 {
1481 int to_remove;
1482 size_t i;
1483 int j;
1484 int subcall_last_arg;
1485 int subcall_first_arg = lua_gettop(L) + 1;/* Here a copy of first_arg and arguments begin */
1486 int valid = 1;
1487 swig_type_info *base_swig_type = 0;
1488 for(j=first_arg;j<=last_arg;j++)
1489 lua_pushvalue(L,j);
1490 subcall_last_arg = lua_gettop(L);
1491
1492 /* Trick: temporarily replacing original metatable with metatable for base class and call getter */
1493 for(i=0;i<bases_count;i++) {
1494 /* Iteration through class bases */
1495#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1496 lua_rawgeti(L,bases_table,i+1);
1497 base_swig_type = 0;
1498 if(lua_isnil(L,-1)) {
1499 valid = 0;
1500 lua_pop(L,1);
1501 } else {
1502 valid = 1;
1503 }
1504#else /* In elua .bases table doesn't exist. Use table from swig_lua_class */
1505 swig_lua_class *base_class = bases[i];
1506 if(!base_class) {
1507 valid = 0;
1508 } else {
1509 valid = 1;
1510 SWIG_Lua_get_class_metatable(L,base_class->fqname);
1511 base_swig_type = SWIG_TypeQueryModule(module,module,base_names[i]);
1512 assert(base_swig_type != 0);
1513 }
1514#endif
1515
1516 if(!valid)
1517 continue;
1518 assert(lua_isuserdata(L, subcall_first_arg));
1519 assert(lua_istable(L,-1));
1520 lua_setmetatable(L,subcall_first_arg); /* Set new metatable */
1521 assert(lua_gettop(L) == subcall_last_arg);
1522 result = func(L, base_swig_type,subcall_first_arg, ret); /* Forward call */
1523 if(result != SWIG_ERROR) {
1524 break;
1525 }
1526 }
1527 /* Restore original metatable */
1528 lua_pushvalue(L,original_metatable);
1529 lua_setmetatable(L,first_arg);
1530 /* Clear - remove everything between last_arg and subcall_last_arg including */
1531 to_remove = subcall_last_arg - last_arg;
1532 for(j=0;j<to_remove;j++)
1533 lua_remove(L,last_arg+1);
1534 } else {
1535 /* Remove everything after last_arg */
1536 lua_pop(L, lua_gettop(L) - last_arg);
1537 }
1538 if(ret) assert(lua_gettop(L) == last_arg + *ret);
1539 return result;
1540}
1541
1542/* The class.get method helper, performs the lookup of class attributes.
1543 * It returns an error code. Number of function return values is passed inside 'ret'.
1544 * first_arg is not used in this function because function always has 2 arguments.
1545 */
1546SWIGINTERN int SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
1547{
1548/* there should be 2 params passed in
1549 (1) userdata (not the meta table)
1550 (2) string name of the attribute
1551*/
1552 int bases_search_result;
1553 int substack_start = lua_gettop(L)-2;
1554 assert(first_arg == substack_start+1);
1555 lua_checkstack(L,5);
1556 assert(lua_isuserdata(L,-2)); /* just in case */
1557 lua_getmetatable(L,-2); /* get the meta table */
1558 assert(lua_istable(L,-1)); /* just in case */
1559 /* NEW: looks for the __getitem() fn
1560 this is a user provided get fn */
1561 SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
1562 if (lua_iscfunction(L,-1)) /* if its there */
1563 { /* found it so call the fn & return its value */
1564 lua_pushvalue(L,substack_start+1); /* the userdata */
1565 lua_pushvalue(L,substack_start+2); /* the parameter */
1566 lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */
1567 lua_remove(L,-2); /* stack tidy, remove metatable */
1568 if(ret) *ret = 1;
1569 return SWIG_OK;
1570 }
1571 lua_pop(L,1);
1572 /* Remove the metatable */
1573 lua_pop(L,1);
1574 /* Search in base classes */
1575 bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get_item,ret);
1576 return bases_search_result; /* sorry not known */
1577}
1578
1579
1580/* The class.get method helper, performs the lookup of class attributes.
1581 * It returns an error code. Number of function return values is passed inside 'ret'.
1582 * first_arg is not used in this function because function always has 2 arguments.
1583 */
1584SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
1585{
1586/* there should be 2 params passed in
1587 (1) userdata (not the meta table)
1588 (2) string name of the attribute
1589*/
1590 int bases_search_result;
1591 int substack_start = lua_gettop(L)-2;
1592 assert(first_arg == substack_start+1);
1593 lua_checkstack(L,5);
1594 assert(lua_isuserdata(L,-2)); /* just in case */
1595 lua_getmetatable(L,-2); /* get the meta table */
1596 assert(lua_istable(L,-1)); /* just in case */
1597 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1598 assert(lua_istable(L,-1)); /* just in case */
1599 /* look for the key in the .get table */
1600 lua_pushvalue(L,substack_start+2); /* key */
1601 lua_rawget(L,-2);
1602 lua_remove(L,-2); /* stack tidy, remove .get table */
1603 if (lua_iscfunction(L,-1))
1604 { /* found it so call the fn & return its value */
1605 lua_pushvalue(L,substack_start+1); /* the userdata */
1606 lua_call(L,1,1); /* 1 value in (userdata),1 out (result) */
1607 lua_remove(L,-2); /* stack tidy, remove metatable */
1608 if(ret)
1609 *ret = 1;
1610 return SWIG_OK;
1611 }
1612 lua_pop(L,1); /* remove whatever was there */
1613 /* ok, so try the .fn table */
1614 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
1615 assert(lua_istable(L,-1)); /* just in case */
1616 lua_pushvalue(L,substack_start+2); /* key */
1617 lua_rawget(L,-2); /* look for the fn */
1618 lua_remove(L,-2); /* stack tidy, remove .fn table */
1619 if (lua_isfunction(L,-1)) /* note: if its a C function or lua function */
1620 { /* found it so return the fn & let lua call it */
1621 lua_remove(L,-2); /* stack tidy, remove metatable */
1622 if(ret)
1623 *ret = 1;
1624 return SWIG_OK;
1625 }
1626 lua_pop(L,1); /* remove whatever was there */
1627 /* Remove the metatable */
1628 lua_pop(L,1);
1629 /* Search in base classes */
1630 bases_search_result = SWIG_Lua_iterate_bases(L,type,substack_start+1,SWIG_Lua_class_do_get,ret);
1631 return bases_search_result; /* sorry not known */
1632}
1633
1634/* the class.get method, performs the lookup of class attributes
1635 */
1637{
1638/* there should be 2 params passed in
1639 (1) userdata (not the meta table)
1640 (2) string name of the attribute
1641*/
1642 int result;
1643 swig_lua_userdata *usr;
1644 swig_type_info *type;
1645 int ret = 0;
1646 assert(lua_isuserdata(L,1));
1647 usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1648 type = usr->type;
1649 result = SWIG_Lua_class_do_get(L,type,1,&ret);
1650 if(result == SWIG_OK)
1651 return ret;
1652
1653 result = SWIG_Lua_class_do_get_item(L,type,1,&ret);
1654 if(result == SWIG_OK)
1655 return ret;
1656
1657 return 0;
1658}
1659
1660/* helper for the class.set method, performs the lookup of class attributes
1661 * It returns error code. Number of function return values is passed inside 'ret'
1662 */
1663SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret)
1664{
1665/* there should be 3 params passed in
1666 (1) table (not the meta table)
1667 (2) string name of the attribute
1668 (3) any for the new value
1669 */
1670
1671 int bases_search_result;
1672 int substack_start = lua_gettop(L) - 3;
1673 lua_checkstack(L,5);
1674 assert(lua_isuserdata(L,substack_start+1)); /* just in case */
1675 lua_getmetatable(L,substack_start+1); /* get the meta table */
1676 assert(lua_istable(L,-1)); /* just in case */
1677 if(ret)
1678 *ret = 0; /* it is setter - number of return values is always 0 */
1679
1680 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1681 if (lua_istable(L,-1))
1682 {
1683 /* look for the key in the .set table */
1684 lua_pushvalue(L,substack_start+2); /* key */
1685 lua_rawget(L,-2);
1686 lua_remove(L,-2); /* tidy stack, remove .set table */
1687 if (lua_iscfunction(L,-1))
1688 { /* found it so call the fn & return its value */
1689 lua_pushvalue(L,substack_start+1); /* userdata */
1690 lua_pushvalue(L,substack_start+3); /* value */
1691 lua_call(L,2,0);
1692 lua_remove(L,substack_start+4); /*remove metatable*/
1693 return SWIG_OK;
1694 }
1695 lua_pop(L,1); /* remove the value */
1696 } else {
1697 lua_pop(L,1); /* remove the answer for .set table request*/
1698 }
1699 /* NEW: looks for the __setitem() fn
1700 this is a user provided set fn */
1701 SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
1702 if (lua_iscfunction(L,-1)) /* if its there */
1703 { /* found it so call the fn & return its value */
1704 lua_pushvalue(L,substack_start+1); /* the userdata */
1705 lua_pushvalue(L,substack_start+2); /* the parameter */
1706 lua_pushvalue(L,substack_start+3); /* the value */
1707 lua_call(L,3,0); /* 3 values in ,0 out */
1708 lua_remove(L,-2); /* stack tidy, remove metatable */
1709 return SWIG_OK;
1710 }
1711 lua_pop(L,1); /* remove value */
1712
1713 lua_pop(L,1); /* remove metatable */
1714 /* Search among bases */
1715 bases_search_result = SWIG_Lua_iterate_bases(L,type,first_arg,SWIG_Lua_class_do_set,ret);
1716 if(ret)
1717 assert(*ret == 0);
1718 assert(lua_gettop(L) == substack_start + 3);
1719 return bases_search_result;
1720}
1721
1722/* This is the actual method exported to Lua. It calls SWIG_Lua_class_do_set and correctly
1723 * handles return values.
1724 */
1726{
1727/* There should be 3 params passed in
1728 (1) table (not the meta table)
1729 (2) string name of the attribute
1730 (3) any for the new value
1731 */
1732 int ret = 0;
1733 int result;
1734 swig_lua_userdata *usr;
1735 swig_type_info *type;
1736 assert(lua_isuserdata(L,1));
1737 usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1738 type = usr->type;
1739 result = SWIG_Lua_class_do_set(L,type,1,&ret);
1740 if(result != SWIG_OK) {
1741 SWIG_Lua_pushferrstring(L,"Assignment not possible. No setter/member with this name. For custom assignments implement __setitem method.");
1742 lua_error(L);
1743 } else {
1744 assert(ret==0);
1745 }
1746 return 0;
1747}
1748
1749/* the class.destruct method called by the interpreter */
1751{
1752/* there should be 1 params passed in
1753 (1) userdata (not the meta table) */
1754 swig_lua_userdata *usr;
1755 swig_lua_class *clss;
1756 assert(lua_isuserdata(L,-1)); /* just in case */
1757 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1758 /* if must be destroyed & has a destructor */
1759 if (usr->own) /* if must be destroyed */
1760 {
1761 clss=(swig_lua_class*)usr->type->clientdata; /* get the class */
1762 if (clss && clss->destructor) /* there is a destroy fn */
1763 {
1764 clss->destructor(usr->ptr); /* bye bye */
1765 }
1766 }
1767 return 0;
1768}
1769
1770/* the class.__tostring method called by the interpreter and print */
1772{
1773/* there should be 1 param passed in
1774 (1) userdata (not the metatable) */
1775 swig_lua_userdata* userData;
1776 assert(lua_isuserdata(L,1)); /* just in case */
1777 userData = (swig_lua_userdata*)lua_touserdata(L,1); /* get the userdata address */
1778
1779 lua_pushfstring(L, "<userdata of type '%s' at %p>", userData->type->str, userData->ptr);
1780 return 1;
1781}
1782
1783/* to manually disown some userdata */
1785{
1786/* there should be 1 params passed in
1787 (1) userdata (not the meta table) */
1788 swig_lua_userdata *usr;
1789 assert(lua_isuserdata(L,-1)); /* just in case */
1790 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1791
1792 usr->own = 0; /* clear our ownership */
1793 return 0;
1794}
1795
1796/* lua callable function to compare userdata's value
1797the issue is that two userdata may point to the same thing
1798but to lua, they are different objects */
1800{
1801 int result;
1802 swig_lua_userdata *usr1,*usr2;
1803 if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2)) /* just in case */
1804 return 0; /* nil reply */
1805 usr1=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1806 usr2=(swig_lua_userdata*)lua_touserdata(L,2); /* get data */
1807 /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
1808 result=(usr1->ptr==usr2->ptr);
1809 lua_pushboolean(L,result);
1810 return 1;
1811}
1812
1813/* populate table at the top of the stack with metamethods that ought to be inherited */
1815{
1816 SWIG_Lua_add_boolean(L, "__add", 1);
1817 SWIG_Lua_add_boolean(L, "__sub", 1);
1818 SWIG_Lua_add_boolean(L, "__mul", 1);
1819 SWIG_Lua_add_boolean(L, "__div", 1);
1820 SWIG_Lua_add_boolean(L, "__mod", 1);
1821 SWIG_Lua_add_boolean(L, "__pow", 1);
1822 SWIG_Lua_add_boolean(L, "__unm", 1);
1823 SWIG_Lua_add_boolean(L, "__len", 1 );
1824 SWIG_Lua_add_boolean(L, "__concat", 1 );
1825 SWIG_Lua_add_boolean(L, "__eq", 1);
1826 SWIG_Lua_add_boolean(L, "__lt", 1);
1827 SWIG_Lua_add_boolean(L, "__le", 1);
1828 SWIG_Lua_add_boolean(L, "__call", 1);
1829 SWIG_Lua_add_boolean(L, "__tostring", 1);
1830 SWIG_Lua_add_boolean(L, "__gc", 0);
1831}
1832
1833/* creates the swig registry */
1835{
1836 /* create main SWIG registry table */
1837 lua_pushstring(L,"SWIG");
1838 lua_newtable(L);
1839 /* populate it with some predefined data */
1840
1841 /* .library table. Placeholder */
1842 lua_pushstring(L,".library");
1843 lua_newtable(L);
1844 {
1845 /* list of metamethods that class inherits from its bases */
1846 lua_pushstring(L,"inheritable_metamethods");
1847 lua_newtable(L);
1848 /* populate with list of metamethods */
1850 lua_rawset(L,-3);
1851 }
1852 lua_rawset(L,-3);
1853
1854 lua_rawset(L,LUA_REGISTRYINDEX);
1855}
1856
1857/* gets the swig registry (or creates it) */
1859{
1860 /* add this all into the swig registry: */
1861 lua_pushstring(L,"SWIG");
1862 lua_rawget(L,LUA_REGISTRYINDEX); /* get the registry */
1863 if (!lua_istable(L,-1)) /* not there */
1864 { /* must be first time, so add it */
1865 lua_pop(L,1); /* remove the result */
1867 /* then get it */
1868 lua_pushstring(L,"SWIG");
1869 lua_rawget(L,LUA_REGISTRYINDEX);
1870 }
1871}
1872
1874{
1876 lua_pushstring(L, ".library");
1877 lua_rawget(L,-2);
1878 assert( !lua_isnil(L,-1) );
1879 lua_pushstring(L, "inheritable_metamethods");
1880 lua_rawget(L,-2);
1881
1882 /* Remove class registry and library table */
1883 lua_remove(L,-2);
1884 lua_remove(L,-2);
1885}
1886
1887/* Helper function to get the classes metatable from the register */
1888SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L,const char *cname)
1889{
1890 SWIG_Lua_get_class_registry(L); /* get the registry */
1891 lua_pushstring(L,cname); /* get the name */
1892 lua_rawget(L,-2); /* get it */
1893 lua_remove(L,-2); /* tidy up (remove registry) */
1894}
1895
1896/* Set up the base classes pointers.
1897Each class structure has a list of pointers to the base class structures.
1898This function fills them.
1899It cannot be done at compile time, as this will not work with hireachies
1900spread over more than one swig file.
1901Therefore it must be done at runtime, querying the SWIG type system.
1902*/
1904{
1905 int i=0;
1907 for(i=0;clss->base_names[i];i++)
1908 {
1909 if (clss->bases[i]==0) /* not found yet */
1910 {
1911 /* lookup and cache the base class */
1912 swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
1913 if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
1914 }
1915 }
1916}
1917
1918#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
1919/* Merges two tables */
1920SWIGINTERN void SWIG_Lua_merge_tables_by_index(lua_State *L, int target, int source)
1921{
1922 /* iterating */
1923 lua_pushnil(L);
1924 while (lua_next(L,source) != 0) {
1925 /* -1 - value, -2 - index */
1926 /* have to copy to assign */
1927 lua_pushvalue(L,-2); /* copy of index */
1928 lua_pushvalue(L,-2); /* copy of value */
1929 lua_rawset(L, target);
1930 lua_pop(L,1);
1931 /* only key is left */
1932 }
1933}
1934
1935/* Merges two tables with given name. original - index of target metatable, base - index of source metatable */
1936SWIGINTERN void SWIG_Lua_merge_tables(lua_State *L, const char* name, int original, int base)
1937{
1938 /* push original[name], then base[name] */
1939 lua_pushstring(L,name);
1940 lua_rawget(L,original);
1941 int original_table = lua_gettop(L);
1942 lua_pushstring(L,name);
1943 lua_rawget(L,base);
1944 int base_table = lua_gettop(L);
1945 SWIG_Lua_merge_tables_by_index(L, original_table, base_table);
1946 /* clearing stack */
1947 lua_pop(L,2);
1948}
1949
1950/* Function takes all symbols from base and adds it to derived class. It's just a helper. */
1951SWIGINTERN void SWIG_Lua_class_squash_base(lua_State *L, swig_lua_class *base_cls)
1952{
1953 /* There is one parameter - original, i.e. 'derived' class metatable */
1954 assert(lua_istable(L,-1));
1955 int original = lua_gettop(L);
1957 int base = lua_gettop(L);
1958 SWIG_Lua_merge_tables(L, ".fn", original, base );
1959 SWIG_Lua_merge_tables(L, ".set", original, base );
1960 SWIG_Lua_merge_tables(L, ".get", original, base );
1961 lua_pop(L,1);
1962}
1963
1964/* Function squashes all symbols from 'clss' bases into itself */
1965SWIGINTERN void SWIG_Lua_class_squash_bases(lua_State *L, swig_lua_class *clss)
1966{
1967 int i;
1969 for(i=0;clss->base_names[i];i++)
1970 {
1971 if (clss->bases[i]==0) /* Somehow it's not found. Skip it */
1972 continue;
1973 /* Thing is: all bases are already registered. Thus they have already executed
1974 * this function. So we just need to squash them into us, because their bases
1975 * are already squashed into them. No need for recursion here!
1976 */
1977 SWIG_Lua_class_squash_base(L, clss->bases[i]);
1978 }
1979 lua_pop(L,1); /*tidy stack*/
1980}
1981#endif
1982
1983#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA) /* In elua this is useless */
1984/* helper add a variable to a registered class */
1985SWIGINTERN void SWIG_Lua_add_variable(lua_State *L,const char *name,lua_CFunction getFn,lua_CFunction setFn)
1986{
1987 assert(lua_istable(L,-1)); /* just in case */
1988 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1989 assert(lua_istable(L,-1)); /* just in case */
1990 SWIG_Lua_add_function(L,name,getFn);
1991 lua_pop(L,1); /* tidy stack (remove table) */
1992 if (setFn)
1993 {
1994 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1995 assert(lua_istable(L,-1)); /* just in case */
1996 SWIG_Lua_add_function(L,name,setFn);
1997 lua_pop(L,1); /* tidy stack (remove table) */
1998 }
1999}
2000
2001/* helper to recursively add class static details (static attributes, operations and constants) */
2003{
2004 int i = 0;
2005 /* The class namespace table must be on the top of the stack */
2006 assert(lua_istable(L,-1));
2007 /* call all the base classes first: we can then override these later: */
2008 for(i=0;clss->bases[i];i++)
2009 {
2011 }
2012
2014}
2015
2016SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss); /* forward declaration */
2017
2018/* helper to recursively add class details (attributes & operations) */
2020{
2021 int i;
2022 size_t bases_count = 0;
2023 /* Add bases to .bases table */
2024 SWIG_Lua_get_table(L,".bases");
2025 assert(lua_istable(L,-1)); /* just in case */
2026 for(i=0;clss->bases[i];i++)
2027 {
2029 /* Base class must be already registered */
2030 assert(lua_istable(L,-1));
2031 lua_rawseti(L,-2,i+1); /* In lua indexing starts from 1 */
2032 bases_count++;
2033 }
2034 assert(lua_rawlen(L,-1) == bases_count);
2035 lua_pop(L,1); /* remove .bases table */
2036 /* add attributes */
2037 for(i=0;clss->attributes[i].name;i++){
2039 }
2040 /* add methods to the metatable */
2041 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
2042 assert(lua_istable(L,-1)); /* just in case */
2043 for(i=0;clss->methods[i].name;i++){
2044 SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].func);
2045 }
2046 lua_pop(L,1); /* tidy stack (remove table) */
2047 /* add operator overloads
2048 This adds methods from metatable array to metatable. Can mess up garbage
2049 collectind if someone defines __gc method
2050 */
2051 if(clss->metatable) {
2052 for(i=0;clss->metatable[i].name;i++) {
2053 SWIG_Lua_add_function(L,clss->metatable[i].name,clss->metatable[i].func);
2054 }
2055 }
2056
2057#if !defined(SWIG_LUA_SQUASH_BASES)
2058 /* Adding metamethods that are defined in base classes. If bases were squashed
2059 * then it is obviously unnecessary
2060 */
2062#endif
2063}
2064
2065/* Helpers to add user defined class metamedhods - __add, __sub etc. The helpers are needed
2066 for the following issue: Lua runtime checks for metamethod existence with rawget function
2067 ignoring our SWIG-provided __index and __newindex functions. Thus our inheritance-aware method
2068 search algorithm doesn't work in such case. (Not to say that Lua runtime queries metamethod directly
2069 in metatable and not in object).
2070 Current solution is this: if somewhere in hierarchy metamethod __x is defined, then all descendants
2071 are automatically given a special proxy __x that calls the real __x method.
2072 Obvious idea - to copy __x instead of creating __x-proxy is wrong because if someone changes __x in runtime,
2073 those changes must be reflected in all descendants.
2074*/
2075
2076SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L); /*forward declaration*/
2077
2078/* The real function that resolves a metamethod.
2079 * Function searches given class and all it's bases(recursively) for first instance of something that is
2080 * not equal to SWIG_Lua_resolve_metatmethod. (Almost always this 'something' is actual metamethod implementation
2081 * and it is a SWIG-generated C function.). It returns value on the top of the L and there is no garbage below the
2082 * answer.
2083 * Returns 1 if found, 0 otherwise.
2084 * clss is class which metatable we will search for method
2085 * metamethod_name_idx is index in L where metamethod name (as string) lies
2086 * skip_check allows to skip searching metamethod in givel clss and immideatelly go to searching in bases. skip_check
2087 * is not caried to subsequent recursive calls - false is always passed. It is set to true only at first call from
2088 * SWIG_Lua_resolve_metamethod
2089 * */
2090SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx,
2091 int skip_check)
2092{
2093 /* This function is called recursively */
2094 int result = 0;
2095 int i = 0;
2096
2097 if (!skip_check) {
2099 lua_pushvalue(L, metamethod_name_idx);
2100 lua_rawget(L,-2);
2101 /* If this is cfunction and it is equal to SWIG_Lua_resolve_metamethod then
2102 * this isn't the function we are looking for :)
2103 * lua_tocfunction will return NULL if not cfunction
2104 */
2105 if (!lua_isnil(L,-1) && lua_tocfunction(L,-1) != SWIG_Lua_resolve_metamethod ) {
2106 lua_remove(L,-2); /* removing class metatable */
2107 return 1;
2108 }
2109 lua_pop(L,2); /* remove class metatable and query result */
2110 }
2111
2112 /* Forwarding calls to bases */
2113 for(i=0;clss->bases[i];i++)
2114 {
2115 result = SWIG_Lua_do_resolve_metamethod(L, clss->bases[i], metamethod_name_idx, 0);
2116 if (result)
2117 break;
2118 }
2119
2120 return result;
2121}
2122
2123/* The proxy function for metamethod. All parameters are passed as cclosure. Searches for actual method
2124 * and calls it */
2126{
2127 int numargs;
2128 int metamethod_name_idx;
2129 const swig_lua_class* clss;
2130 int result;
2131
2132 lua_checkstack(L,5);
2133 numargs = lua_gettop(L); /* number of arguments to pass to actual metamethod */
2134
2135 /* Get upvalues from closure */
2136 lua_pushvalue(L, lua_upvalueindex(1)); /*Get function name*/
2137 metamethod_name_idx = lua_gettop(L);
2138
2139 lua_pushvalue(L, lua_upvalueindex(2));
2140 clss = (const swig_lua_class*)(lua_touserdata(L,-1));
2141 lua_pop(L,1); /* remove lightuserdata with clss from stack */
2142
2143 /* Actual work */
2144 result = SWIG_Lua_do_resolve_metamethod(L, clss, metamethod_name_idx, 1);
2145 if (!result) {
2146 SWIG_Lua_pushferrstring(L,"The metamethod proxy is set, but it failed to find actual metamethod. Memory corruption is most likely explanation.");
2147 lua_error(L);
2148 return 0;
2149 }
2150
2151 lua_remove(L,-2); /* remove metamethod key */
2152 lua_insert(L,1); /* move function to correct position */
2153 lua_call(L, numargs, LUA_MULTRET);
2154 return lua_gettop(L); /* return all results */
2155}
2156
2157
2158/* If given metamethod must be present in given class, then creates appropriate proxy
2159 * Returns 1 if successfully added, 0 if not added because no base class has it, -1
2160 * if method is defined in the class metatable itself
2161 */
2162SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index)
2163{
2164 int key_index;
2165 int success = 0;
2166 int i = 0;
2167
2168 /* metamethod name - on the top of the stack */
2169 assert(lua_isstring(L,-1));
2170
2171 key_index = lua_gettop(L);
2172
2173 /* Check whether method is already defined in metatable */
2174 lua_pushvalue(L,key_index); /* copy of the key */
2175 lua_gettable(L,metatable_index);
2176 if( !lua_isnil(L,-1) ) {
2177 lua_pop(L,1);
2178 return -1;
2179 }
2180 lua_pop(L,1);
2181
2182 /* Iterating over immediate bases */
2183 for(i=0;clss->bases[i];i++)
2184 {
2185 const swig_lua_class *base = clss->bases[i];
2187 lua_pushvalue(L, key_index);
2188 lua_rawget(L, -2);
2189 if( !lua_isnil(L,-1) ) {
2190 lua_pushvalue(L, key_index);
2191
2192 /* Add proxy function */
2193 lua_pushvalue(L, key_index); /* first closure value is function name */
2194 lua_pushlightuserdata(L, clss); /* second closure value is swig_lua_class structure */
2195 lua_pushcclosure(L, SWIG_Lua_resolve_metamethod, 2);
2196
2197 lua_rawset(L, metatable_index);
2198 success = 1;
2199 }
2200 lua_pop(L,1); /* remove function or nil */
2201 lua_pop(L,1); /* remove base class metatable */
2202
2203 if( success )
2204 break;
2205 }
2206
2207 return success;
2208}
2209
2211{
2212 int metatable_index;
2213 int metamethods_info_index;
2214 int tostring_undefined;
2215 int eq_undefined = 0;
2216
2218 metatable_index = lua_gettop(L);
2220 assert(lua_istable(L,-1));
2221 metamethods_info_index = lua_gettop(L);
2222 lua_pushnil(L); /* first key */
2223 while(lua_next(L, metamethods_info_index) != 0 ) {
2224 /* key at index -2, value at index -1 */
2225 const int is_inheritable = lua_toboolean(L,-2);
2226 lua_pop(L,1); /* remove value - we don't need it anymore */
2227
2228 if(is_inheritable) { /* if metamethod is inheritable */
2229 SWIG_Lua_add_class_user_metamethod(L,clss,metatable_index);
2230 }
2231 }
2232
2233 lua_pop(L,1); /* remove inheritable metatmethods table */
2234
2235 /* Special handling for __tostring method */
2236 lua_pushstring(L, "__tostring");
2237 lua_pushvalue(L,-1);
2238 lua_rawget(L,metatable_index);
2239 tostring_undefined = lua_isnil(L,-1);
2240 lua_pop(L,1);
2241 if( tostring_undefined ) {
2242 lua_pushcfunction(L, SWIG_Lua_class_tostring);
2243 lua_rawset(L, metatable_index);
2244 } else {
2245 lua_pop(L,1); /* remove copy of the key */
2246 }
2247
2248 /* Special handling for __eq method */
2249 lua_pushstring(L, "__eq");
2250 lua_pushvalue(L,-1);
2251 lua_rawget(L,metatable_index);
2252 eq_undefined = lua_isnil(L,-1);
2253 lua_pop(L,1);
2254 if( eq_undefined ) {
2255 lua_pushcfunction(L, SWIG_Lua_class_equal);
2256 lua_rawset(L, metatable_index);
2257 } else {
2258 lua_pop(L,1); /* remove copy of the key */
2259 }
2260 /* Warning: __index and __newindex are SWIG-defined. For user-defined operator[]
2261 * a __getitem/__setitem method should be defined
2262 */
2263 lua_pop(L,1); /* pop class metatable */
2264}
2265
2266/* Register class static methods,attributes etc as well as constructor proxy */
2268{
2269 const int SWIGUNUSED begin = lua_gettop(L);
2270 lua_checkstack(L,5); /* just in case */
2271 assert(lua_istable(L,-1)); /* just in case */
2272 assert(strcmp(clss->name, clss->cls_static->name) == 0); /* in class those 2 must be equal */
2273
2275
2276 assert(lua_istable(L,-1)); /* just in case */
2277
2278 /* add its constructor to module with the name of the class
2279 so you can do MyClass(...) as well as new_MyClass(...)
2280 BUT only if a constructor is defined
2281 (this overcomes the problem of pure virtual classes without constructors)*/
2282 if (clss->constructor)
2283 {
2284 lua_getmetatable(L,-1);
2285 assert(lua_istable(L,-1)); /* just in case */
2286 SWIG_Lua_add_function(L,"__call", clss->constructor);
2287 lua_pop(L,1);
2288 }
2289
2290 assert(lua_istable(L,-1)); /* just in case */
2292
2293 /* clear stack */
2294 lua_pop(L,1);
2295 assert( lua_gettop(L) == begin );
2296}
2297
2298/* Performs the instance (non-static) class registration process. Metatable for class is created
2299 * and added to the class registry.
2300 */
2302{
2303 const int SWIGUNUSED begin = lua_gettop(L);
2304 int i;
2305 /* if name already there (class is already registered) then do nothing */
2306 SWIG_Lua_get_class_registry(L); /* get the registry */
2307 lua_pushstring(L,clss->fqname); /* get the name */
2308 lua_rawget(L,-2);
2309 if(!lua_isnil(L,-1)) {
2310 lua_pop(L,2);
2311 assert(lua_gettop(L)==begin);
2312 return;
2313 }
2314 lua_pop(L,2); /* tidy stack */
2315 /* Recursively initialize all bases */
2316 for(i=0;clss->bases[i];i++)
2317 {
2319 }
2320 /* Again, get registry and push name */
2321 SWIG_Lua_get_class_registry(L); /* get the registry */
2322 lua_pushstring(L,clss->fqname); /* get the name */
2323 lua_newtable(L); /* create the metatable */
2324#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
2325 /* If squashing is requested, then merges all bases metatable into this one.
2326 * It would get us all special methods: __getitem, __add etc.
2327 * This would set .fn, .type, and other .xxx incorrectly, but we will overwrite it right away
2328 */
2329 {
2330 int new_metatable_index = lua_absindex(L,-1);
2331 for(i=0;clss->bases[i];i++)
2332 {
2333 int base_metatable;
2335 base_metatable = lua_absindex(L,-1);
2336 SWIG_Lua_merge_tables_by_index(L,new_metatable_index, base_metatable);
2337 lua_pop(L,1);
2338 }
2339 }
2340 /* And now we will overwrite all incorrectly set data */
2341#endif
2342 /* add string of class name called ".type" */
2343 lua_pushstring(L,".type");
2344 lua_pushstring(L,clss->fqname);
2345 lua_rawset(L,-3);
2346 /* add a table called bases */
2347 lua_pushstring(L,".bases");
2348 lua_newtable(L);
2349 lua_rawset(L,-3);
2350 /* add a table called ".get" */
2351 lua_pushstring(L,".get");
2352 lua_newtable(L);
2353 lua_rawset(L,-3);
2354 /* add a table called ".set" */
2355 lua_pushstring(L,".set");
2356 lua_newtable(L);
2357 lua_rawset(L,-3);
2358 /* add a table called ".fn" */
2359 lua_pushstring(L,".fn");
2360 lua_newtable(L);
2361 /* add manual disown method */
2363 lua_rawset(L,-3);
2364 /* add accessor fns for using the .get,.set&.fn */
2368 /* add it */
2369 lua_rawset(L,-3); /* metatable into registry */
2370 lua_pop(L,1); /* tidy stack (remove registry) */
2371 assert(lua_gettop(L) == begin);
2372
2373#if defined(SWIG_LUA_SQUASH_BASES) && (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
2374 /* Now merge all symbols from .fn, .set, .get etc from bases to our tables */
2375 SWIG_Lua_class_squash_bases(L,clss);
2376#endif
2378 SWIG_Lua_add_class_instance_details(L,clss); /* recursive adding of details (atts & ops) */
2379 lua_pop(L,1); /* tidy stack (remove class metatable) */
2380 assert( lua_gettop(L) == begin );
2381}
2382
2384{
2385 int SWIGUNUSED begin;
2386 assert(lua_istable(L,-1)); /* This is a table (module or namespace) where classes will be added */
2389
2390 /* Add links from static part to instance part and vice versa */
2391 /* [SWIG registry] [Module]
2392 * "MyClass" ----> [MyClass metatable] <===== "MyClass" -+> [static part]
2393 * ".get" ----> ... | | getmetatable()----|
2394 * ".set" ----> ... | | |
2395 * ".static" --------------)----------------/ [static part metatable]
2396 * | ".get" --> ...
2397 * | ".set" --> ....
2398 * |=============================== ".instance"
2399 */
2400 begin = lua_gettop(L);
2401 lua_pushstring(L,clss->cls_static->name);
2402 lua_rawget(L,-2); /* get class static table */
2403 assert(lua_istable(L,-1));
2404 lua_getmetatable(L,-1);
2405 assert(lua_istable(L,-1)); /* get class static metatable */
2406 lua_pushstring(L,".instance"); /* prepare key */
2407
2408 SWIG_Lua_get_class_metatable(L,clss->fqname); /* get class metatable */
2409 assert(lua_istable(L,-1));
2410 lua_pushstring(L,".static"); /* prepare key */
2411 lua_pushvalue(L, -4); /* push static class TABLE */
2412 assert(lua_istable(L,-1));
2413 lua_rawset(L,-3); /* assign static class table(!NOT metatable) as ".static" member of class metatable */
2414 lua_rawset(L,-3); /* assign class metatable as ".instance" member of class static METATABLE */
2415 lua_pop(L,2);
2416 assert(lua_gettop(L) == begin);
2417}
2418#endif /* SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA */
2419
2420#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
2421SWIGINTERN void SWIG_Lua_elua_class_register_instance(lua_State *L, swig_lua_class *clss)
2422{
2423 const int SWIGUNUSED begin = lua_gettop(L);
2424 int i;
2425 /* if name already there (class is already registered) then do nothing */
2426 SWIG_Lua_get_class_registry(L); /* get the registry */
2427 lua_pushstring(L,clss->fqname); /* get the name */
2428 lua_rawget(L,-2);
2429 if(!lua_isnil(L,-1)) {
2430 lua_pop(L,2);
2431 assert(lua_gettop(L)==begin);
2432 return;
2433 }
2434 lua_pop(L,2); /* tidy stack */
2435 /* Recursively initialize all bases */
2436 for(i=0;clss->bases[i];i++)
2437 {
2438 SWIG_Lua_elua_class_register_instance(L,clss->bases[i]);
2439 }
2440 /* Again, get registry and push name */
2441 SWIG_Lua_get_class_registry(L); /* get the registry */
2442 lua_pushstring(L,clss->fqname); /* get the name */
2443 assert(clss->metatable);
2444 lua_pushrotable(L, (void*)(clss->metatable)); /* create the metatable */
2445 lua_rawset(L,-3);
2446 lua_pop(L,1);
2447 assert(lua_gettop(L) == begin);
2448}
2449#endif /* elua && eluac */
2450
2451/* -----------------------------------------------------------------------------
2452 * Class/structure conversion fns
2453 * ----------------------------------------------------------------------------- */
2454
2455/* helper to add metatable to new lua object */
2457{
2458 if (type->clientdata) /* there is clientdata: so add the metatable */
2459 {
2461 if (lua_istable(L,-1))
2462 {
2463 lua_setmetatable(L,-2);
2464 }
2465 else
2466 {
2467 lua_pop(L,1);
2468 }
2469 }
2470}
2471
2472/* pushes a new object into the lua stack */
2473SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L,void *ptr,swig_type_info *type, int own)
2474{
2475 swig_lua_userdata *usr;
2476 if (!ptr){
2477 lua_pushnil(L);
2478 return;
2479 }
2480 usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata)); /* get data */
2481 usr->ptr=ptr; /* set the ptr */
2482 usr->type=type;
2483 usr->own=own;
2484#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
2485 SWIG_Lua_AddMetatable(L,type); /* add metatable */
2486#endif
2487}
2488
2489/* takes a object from the lua stack & converts it into an object of the correct type
2490 (if possible) */
2491SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L,int index,void **ptr,swig_type_info *type,int flags)
2492{
2493 swig_lua_userdata *usr;
2494 swig_cast_info *cast;
2495 /* special case: lua nil => NULL pointer */
2496 if (lua_isnil(L,index))
2497 {
2498 *ptr=0;
2500 }
2501 if (lua_islightuserdata(L,index))
2502 {
2503 *ptr=lua_touserdata(L,index);
2505 }
2506 usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */
2507 if (usr)
2508 {
2509 if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
2510 {
2511 usr->own=0;
2512 }
2513 if (!type) /* special cast void*, no casting fn */
2514 {
2515 *ptr=usr->ptr;
2516 return SWIG_OK; /* ok */
2517 }
2518 cast=SWIG_TypeCheckStruct(usr->type,type); /* performs normal type checking */
2519 if (cast)
2520 {
2521 int newmemory = 0;
2522 *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
2523 assert(!newmemory); /* newmemory handling not yet implemented */
2524 return SWIG_OK; /* ok */
2525 }
2526 }
2527 return SWIG_ERROR; /* error */
2528}
2529
2530SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State *L,int index,swig_type_info *type,int flags,
2531 int argnum,const char *func_name){
2532 void *result;
2533 if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
2534 luaL_error (L,"Error in %s, expected a %s at argument number %d\n",
2535 func_name,(type && type->str)?type->str:"void*",argnum);
2536 }
2537 return result;
2538}
2539
2540/* pushes a packed userdata. user for member fn pointers only */
2541SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L,void *ptr,size_t size,swig_type_info *type)
2542{
2543 swig_lua_rawdata *raw;
2544 assert(ptr); /* not acceptable to pass in a NULL value */
2545 raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size); /* alloc data */
2546 raw->type=type;
2547 raw->own=0;
2548 memcpy(raw->data,ptr,size); /* copy the data */
2549 SWIG_Lua_AddMetatable(L,type); /* add metatable */
2550}
2551
2552/* converts a packed userdata. user for member fn pointers only */
2553SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L,int index,void *ptr,size_t size,swig_type_info *type)
2554{
2555 swig_lua_rawdata *raw;
2556 raw=(swig_lua_rawdata*)lua_touserdata(L,index); /* get data */
2557 if (!raw) return SWIG_ERROR; /* error */
2558 if (type==0 || type==raw->type) /* void* or identical type */
2559 {
2560 memcpy(ptr,raw->data,size); /* copy it */
2561 return SWIG_OK; /* ok */
2562 }
2563 return SWIG_ERROR; /* error */
2564}
2565
2566/* a function to get the typestring of a piece of data */
2567SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
2568{
2569 swig_lua_userdata *usr;
2570 if (lua_isuserdata(L,tp))
2571 {
2572 usr=(swig_lua_userdata*)lua_touserdata(L,tp); /* get data */
2573 if (usr && usr->type && usr->type->str)
2574 return usr->type->str;
2575 return "userdata (unknown type)";
2576 }
2577 return lua_typename(L,lua_type(L,tp));
2578}
2579
2580/* lua callable function to get the userdata's type */
2582{
2583 lua_pushstring(L,SWIG_Lua_typename(L,1));
2584 return 1;
2585}
2586
2587/* -----------------------------------------------------------------------------
2588 * global variable support code: class/struct typemap functions
2589 * ----------------------------------------------------------------------------- */
2590
2591#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
2592/* Install Constants */
2593SWIGINTERN void
2595 int i;
2596 for (i = 0; constants[i].type; i++) {
2597 switch(constants[i].type) {
2598 case SWIG_LUA_INT:
2599 lua_pushstring(L,constants[i].name);
2600 lua_pushinteger(L,(lua_Integer)constants[i].lvalue);
2601 lua_rawset(L,-3);
2602 break;
2603 case SWIG_LUA_FLOAT:
2604 lua_pushstring(L,constants[i].name);
2605 lua_pushnumber(L,(lua_Number)constants[i].dvalue);
2606 lua_rawset(L,-3);
2607 break;
2608 case SWIG_LUA_CHAR:
2609 lua_pushstring(L,constants[i].name);
2610 {
2611 char c = (char)constants[i].lvalue;
2612 lua_pushlstring(L,&c,1);
2613 }
2614 lua_rawset(L,-3);
2615 break;
2616 case SWIG_LUA_STRING:
2617 lua_pushstring(L,constants[i].name);
2618 lua_pushstring(L,(char *) constants[i].pvalue);
2619 lua_rawset(L,-3);
2620 break;
2621 case SWIG_LUA_POINTER:
2622 lua_pushstring(L,constants[i].name);
2623 SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
2624 lua_rawset(L,-3);
2625 break;
2626 case SWIG_LUA_BINARY:
2627 lua_pushstring(L,constants[i].name);
2628 SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
2629 lua_rawset(L,-3);
2630 break;
2631 default:
2632 break;
2633 }
2634 }
2635}
2636#endif
2637
2638/* -----------------------------------------------------------------------------
2639 * executing lua code from within the wrapper
2640 * ----------------------------------------------------------------------------- */
2641
2642#ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
2643#define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
2644#endif
2645/* Executes a C string in Lua which is a really simple way of calling lua from C
2646Unfortunately lua keeps changing its APIs, so we need a conditional compile
2647In lua 5.0.X it's lua_dostring()
2648In lua 5.1.X it's luaL_dostring()
2649*/
2650SWIGINTERN int
2651SWIG_Lua_dostring(lua_State *L, const char *str) {
2652 int ok,top;
2653 if (str==0 || str[0]==0) return 0; /* nothing to do */
2654 top=lua_gettop(L); /* save stack */
2655#if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
2656 ok=luaL_dostring(L,str); /* looks like this is lua 5.1.X or later, good */
2657#else
2658 ok=lua_dostring(L,str); /* might be lua 5.0.x, using lua_dostring */
2659#endif
2660 if (ok!=0) {
2661 SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
2662 }
2663 lua_settop(L,top); /* restore the stack */
2664 return ok;
2665}
2666
2667#ifdef __cplusplus
2668}
2669#endif
2670
2671/* ------------------------------ end luarun.swg ------------------------------ */
2672
2673
2674/* -------- TYPES TABLE (BEGIN) -------- */
2675
2676#define SWIGTYPE_p_PLGraphicsIn swig_types[0]
2677#define SWIGTYPE_p_char swig_types[1]
2678#define SWIGTYPE_p_double swig_types[2]
2679#define SWIGTYPE_p_f_double_double__int swig_types[3]
2680#define SWIGTYPE_p_f_double_double_p_double_p_double_p_void__void swig_types[4]
2681#define SWIGTYPE_p_f_int_double_p_char_int_p_void__void swig_types[5]
2682#define SWIGTYPE_p_f_int_p_double_p_double__void swig_types[6]
2683#define SWIGTYPE_p_f_int_p_q_const__double_p_q_const__double__void swig_types[7]
2684#define SWIGTYPE_p_int swig_types[8]
2685#define SWIGTYPE_p_p_char swig_types[9]
2686#define SWIGTYPE_p_p_double swig_types[10]
2687#define SWIGTYPE_p_unsigned_int swig_types[11]
2689static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
2690#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2691#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2692
2693/* -------- TYPES TABLE (END) -------- */
2694
2695#define SWIG_name "plplotluac"
2696#define SWIG_init luaopen_plplotluac
2697#define SWIG_init_user luaopen_plplotluac_user
2698
2699#define SWIG_LUACODE luaopen_plplotluac_luacode
2700
2701#include "plplotP.h"
2702
2703
2704#define LUA_ALLOC_ARRAY( TYPE, LEN ) (TYPE *) malloc( LEN * sizeof ( TYPE ) )
2705#define LUA_FREE_ARRAY( PTR ) if ( PTR ) { free( PTR ); PTR = NULL;}
2706
2707// super macro to declare array typemap helper fns
2708 SWIGINTERN int SWIG_itable_size( lua_State* L, int index );
2709#define LUA_DECLARE_TYPEMAP_ARR_FN( NAME, TYPE ) \
2710 SWIGINTERN int LUA_read_ ## NAME ## _num_array( lua_State * L, int index, TYPE * array, int size ){ \
2711 int i; \
2712 for ( i = 0; i < size; i++ ) { \
2713 lua_rawgeti( L, index, i + 1 ); \
2714 if ( lua_isnumber( L, -1 ) ) { \
2715 array[i] = (TYPE) lua_tonumber( L, -1 ); \
2716 } else { \
2717 lua_pop( L, 1 ); \
2718 return 0; \
2719 } \
2720 lua_pop( L, 1 ); \
2721 } \
2722 return 1; \
2723 } \
2724 SWIGINTERN TYPE* LUA_get_ ## NAME ## _num_array_var( lua_State * L, int index, int* size ) \
2725 { \
2726 TYPE *array; \
2727 if ( !lua_istable( L, index ) ) { \
2728 lua_pushstring( L, "expected a table" ); \
2729 return 0; \
2730 } \
2731 *size = SWIG_itable_size( L, index ); \
2732 if ( *size < 1 ) { \
2733 array = LUA_ALLOC_ARRAY( TYPE, 1 ); \
2734 array[0] = (TYPE) 0; \
2735 return array; \
2736 } \
2737 array = LUA_ALLOC_ARRAY( TYPE, *size ); \
2738 if ( !LUA_read_ ## NAME ## _num_array( L, index, array, *size ) ) { \
2739 lua_pushstring( L, "table must contain numbers" ); \
2740 LUA_FREE_ARRAY( array ); \
2741 return 0; \
2742 } \
2743 return array; \
2744 }
2745
2748
2749
2750 static PLINT Alen = 0;
2751 static PLINT Xlen = 0, Ylen = 0;
2752
2753
2754#ifdef __cplusplus /* generic alloc/dealloc fns*/
2755#define SWIG_ALLOC_ARRAY(TYPE,LEN) new TYPE[LEN]
2756#define SWIG_FREE_ARRAY(PTR) delete[] PTR
2757#else
2758#define SWIG_ALLOC_ARRAY(TYPE,LEN) (TYPE *)malloc(LEN*sizeof(TYPE))
2759#define SWIG_FREE_ARRAY(PTR) free(PTR)
2760#endif
2761/* counting the size of arrays:*/
2762SWIGINTERN int SWIG_itable_size(lua_State* L, int index)
2763{
2764 int n=0;
2765 while(1){
2766 lua_rawgeti(L,index,n+1);
2767 if (lua_isnil(L,-1))break;
2768 ++n;
2769 lua_pop(L,1);
2770 }
2771 lua_pop(L,1);
2772 return n;
2773}
2774
2775SWIGINTERN int SWIG_table_size(lua_State* L, int index)
2776{
2777 int n=0;
2778 lua_pushnil(L); /* first key*/
2779 while (lua_next(L, index) != 0) {
2780 ++n;
2781 lua_pop(L, 1); /* removes `value'; keeps `key' for next iteration*/
2782 }
2783 return n;
2784}
2785
2786/* super macro to declare array typemap helper fns */
2787#define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME,TYPE)\
2788 SWIGINTERN int SWIG_read_##NAME##_num_array(lua_State* L,int index,TYPE *array,int size){\
2789 int i;\
2790 for (i = 0; i < size; i++) {\
2791 lua_rawgeti(L,index,i+1);\
2792 if (lua_isnumber(L,-1)){\
2793 array[i] = (TYPE)lua_tonumber(L,-1);\
2794 } else {\
2795 lua_pop(L,1);\
2796 return 0;\
2797 }\
2798 lua_pop(L,1);\
2799 }\
2800 return 1;\
2801 }\
2802 SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_fixed(lua_State* L, int index, int size){\
2803 TYPE *array;\
2804 if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {\
2805 SWIG_Lua_pushferrstring(L,"expected a table of size %d",size);\
2806 return 0;\
2807 }\
2808 array=SWIG_ALLOC_ARRAY(TYPE,size);\
2809 if (!SWIG_read_##NAME##_num_array(L,index,array,size)){\
2810 SWIG_Lua_pusherrstring(L,"table must contain numbers");\
2811 SWIG_FREE_ARRAY(array);\
2812 return 0;\
2813 }\
2814 return array;\
2815 }\
2816 SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_var(lua_State* L, int index, int* size)\
2817 {\
2818 TYPE *array;\
2819 if (!lua_istable(L,index)) {\
2820 SWIG_Lua_pusherrstring(L,"expected a table");\
2821 return 0;\
2822 }\
2823 *size=SWIG_itable_size(L,index);\
2824 if (*size<1){\
2825 SWIG_Lua_pusherrstring(L,"table appears to be empty");\
2826 return 0;\
2827 }\
2828 array=SWIG_ALLOC_ARRAY(TYPE,*size);\
2829 if (!SWIG_read_##NAME##_num_array(L,index,array,*size)){\
2830 SWIG_Lua_pusherrstring(L,"table must contain numbers");\
2831 SWIG_FREE_ARRAY(array);\
2832 return 0;\
2833 }\
2834 return array;\
2835 }\
2836 SWIGINTERN void SWIG_write_##NAME##_num_array(lua_State* L,TYPE *array,int size){\
2837 int i;\
2838 lua_newtable(L);\
2839 for (i = 0; i < size; i++){\
2840 lua_pushnumber(L,(lua_Number)array[i]);\
2841 lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/ \
2842 }\
2843 }
2844
2845SWIG_DECLARE_TYPEMAP_ARR_FN(schar,signed char)
2846SWIG_DECLARE_TYPEMAP_ARR_FN(uchar,unsigned char)
2849SWIG_DECLARE_TYPEMAP_ARR_FN(short,short)
2850SWIG_DECLARE_TYPEMAP_ARR_FN(ushort,unsigned short)
2852SWIG_DECLARE_TYPEMAP_ARR_FN(ulong,unsigned long)
2853SWIG_DECLARE_TYPEMAP_ARR_FN(float,float)
2854SWIG_DECLARE_TYPEMAP_ARR_FN(double,double)
2855
2856SWIGINTERN int SWIG_read_ptr_array(lua_State* L,int index,void **array,int size,swig_type_info *type){
2857 int i;
2858 for (i = 0; i < size; i++) {
2859 lua_rawgeti(L,index,i+1);
2860 if (!lua_isuserdata(L,-1) || SWIG_ConvertPtr(L,-1,&array[i],type,0)==-1){
2861 lua_pop(L,1);
2862 return 0;
2863 }
2864 lua_pop(L,1);
2865 }
2866 return 1;
2867}
2868SWIGINTERN void** SWIG_get_ptr_array_fixed(lua_State* L, int index, int size,swig_type_info *type){
2869 void **array;
2870 if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {
2871 SWIG_Lua_pushferrstring(L,"expected a table of size %d",size);
2872 return 0;
2873 }
2874 array=SWIG_ALLOC_ARRAY(void*,size);
2875 if (!SWIG_read_ptr_array(L,index,array,size,type)){
2876 SWIG_Lua_pushferrstring(L,"table must contain pointers of type %s",type->name);
2877 SWIG_FREE_ARRAY(array);
2878 return 0;
2879 }
2880 return array;
2881}
2882SWIGINTERN void** SWIG_get_ptr_array_var(lua_State* L, int index, int* size,swig_type_info *type){
2883 void **array;
2884 if (!lua_istable(L,index)) {
2885 SWIG_Lua_pusherrstring(L,"expected a table");
2886 return 0;
2887 }
2888 *size=SWIG_itable_size(L,index);
2889 if (*size<1){
2890 SWIG_Lua_pusherrstring(L,"table appears to be empty");
2891 return 0;
2892 }
2893 array=SWIG_ALLOC_ARRAY(void*,*size);
2894 if (!SWIG_read_ptr_array(L,index,array,*size,type)){
2895 SWIG_Lua_pushferrstring(L,"table must contain pointers of type %s",type->name);
2896 SWIG_FREE_ARRAY(array);
2897 return 0;
2898 }
2899 return array;
2900}
2901SWIGINTERN void SWIG_write_ptr_array(lua_State* L,void **array,int size,swig_type_info *type,int own){
2902 int i;
2903 lua_newtable(L);
2904 for (i = 0; i < size; i++){
2905 SWIG_NewPointerObj(L,array[i],type,own);
2906 lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/
2907 }
2908}
2909
2910
2911 PLFLT** read_double_Matrix( lua_State* L, int index, int* nx, int *ny );
2912
2913 PLFLT** read_double_Matrix( lua_State* L, int index, int* nx, int *ny )
2914 {
2915 int i, j;
2916 PLFLT** matrix;
2917
2918 *nx = 0;
2919 *ny = 0;
2920
2921 if ( !lua_istable( L, index ) )
2922 {
2923 lua_pushstring( L, "expected a table" );
2924 return NULL;
2925 }
2926 *nx = SWIG_itable_size( L, index );
2927 if ( *nx < 1 )
2928 {
2929 lua_pushstring( L, "table appears to be empty" );
2930 return NULL;
2931 }
2932 matrix = LUA_ALLOC_ARRAY( PLFLT *, *nx );
2933 for ( i = 0; i < *nx; i++ )
2934 matrix[i] = NULL;
2935
2936 lua_rawgeti( L, index, 1 );
2937 if ( !lua_istable( L, -1 ) )
2938 {
2939 lua_pop( L, 1 );
2940 lua_pushstring( L, "expected a table" );
2941 LUA_FREE_ARRAY( matrix );
2942 return NULL;
2943 }
2944 *ny = SWIG_itable_size( L, -1 );
2945 if ( *ny < 1 )
2946 {
2947 lua_pushstring( L, "table appears to be empty" );
2948 LUA_FREE_ARRAY( matrix );
2949 return NULL;
2950 }
2951 lua_pop( L, 1 );
2952
2953 for ( i = 0; i < *nx; i++ )
2954 {
2955 lua_rawgeti( L, index, i + 1 );
2956 if ( !lua_istable( L, -1 ) )
2957 {
2958 lua_pop( L, 1 );
2959 lua_pushstring( L, "expected a table" );
2960 for ( j = 0; j < *ny; j++ )
2961 LUA_FREE_ARRAY( matrix[j] );
2962 LUA_FREE_ARRAY( matrix );
2963 return NULL;
2964 }
2965 if ( *ny != SWIG_itable_size( L, -1 ) )
2966 {
2967 lua_pop( L, 1 );
2968 lua_pushstring( L, "inconsistent table sizes" );
2969 for ( j = 0; j < i; j++ )
2970 LUA_FREE_ARRAY( matrix[j] );
2971 LUA_FREE_ARRAY( matrix );
2972 return NULL;
2973 }
2974 matrix[i] = LUA_ALLOC_ARRAY( PLFLT, *ny );
2975 for ( j = 0; j < *ny; j++ )
2976 {
2977 lua_rawgeti( L, -1, j + 1 );
2978 if ( lua_isnumber( L, -1 ) )
2979 {
2980 matrix[i][j] = (PLFLT) lua_tonumber( L, -1 );
2981 }
2982 else
2983 {
2984 lua_pop( L, 1 );
2985 lua_pushstring( L, "table must contain numbers" );
2986 for ( j = 0; j < i + 1; j++ )
2987 LUA_FREE_ARRAY( matrix[j] );
2988 LUA_FREE_ARRAY( matrix );
2989 return NULL;
2990 }
2991 lua_pop( L, 1 );
2992 }
2993 lua_pop( L, 1 );
2994 }
2995
2996 return matrix;
2997 }
2998
2999
3000 void mapform( PLINT n, PLFLT* x, PLFLT* y );
3001
3002 static lua_State* myL = NULL;
3003 static char mapform_funcstr[255];
3004
3005 void mapform( PLINT n, PLFLT* x, PLFLT* y )
3006 {
3007 PLFLT *xtemp, *ytemp;
3008 int len, i;
3009
3010 // check Lua state
3011 if ( myL == NULL )
3012 {
3013 fprintf( stderr, "Lua state is not set!" );
3014 return;
3015 }
3016
3017 // push functions and arguments
3018 lua_getglobal( myL, mapform_funcstr ); // function to be called
3019 lua_pushnumber( myL, n ); // push 1st argument
3020 SWIG_write_double_num_array( myL, x, n ); // push 2nd argument
3021 SWIG_write_double_num_array( myL, y, n ); // push 3rd argument
3022
3023 // do the call (3 arguments, 2 result)
3024 if ( lua_pcall( myL, 3, 2, 0 ) != 0 )
3025 fprintf( stderr, "error running function `%s':%s",
3026 mapform_funcstr, lua_tostring( myL, -1 ) );
3027
3028 // retrieve results
3029 if ( !lua_istable( myL, -2 ) )
3030 {
3031 fprintf( stderr, "function `%s' must return a table as 1st result", mapform_funcstr );
3032 return;
3033 }
3034 if ( !lua_istable( myL, -1 ) )
3035 {
3036 fprintf( stderr, "function `%s' must return a table as 2nd result", mapform_funcstr );
3037 return;
3038 }
3039 xtemp = (PLFLT *) LUA_get_double_num_array_var( myL, -2, &len );
3040 if ( !xtemp || len != n )
3041 {
3042 fprintf( stderr, "function `%s' must return a table of length%d", mapform_funcstr, n );
3043 return;
3044 }
3045 for ( i = 0; i < n; i++ )
3046 x[i] = xtemp[i];
3047 LUA_FREE_ARRAY( xtemp );
3048
3049 ytemp = (PLFLT *) LUA_get_double_num_array_var( myL, -1, &len );
3050 if ( !ytemp || len != n )
3051 {
3052 fprintf( stderr, "function `%s' must return a table of length%d", mapform_funcstr, n );
3053 return;
3054 }
3055 for ( i = 0; i < n; i++ )
3056 y[i] = ytemp[i];
3057 LUA_FREE_ARRAY( ytemp );
3058
3059 lua_pop( myL, 2 ); // pop returned values
3060
3061 return;
3062 }
3063
3064
3065 typedef PLINT ( *defined_func )( PLFLT, PLFLT );
3066 typedef void ( *fill_func )( PLINT, const PLFLT*, const PLFLT* );
3067 typedef void ( *pltr_func )( PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer );
3068 typedef void ( *ct_func )( PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer );
3069 typedef void ( *mapform_func )( PLINT, PLFLT *, PLFLT* );
3071 typedef void ( *label_func )( PLINT, PLFLT, char*, PLINT, PLPointer );
3072
3073// Function prototypes
3074 void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * pltr_data );
3075 void myct( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * pltr_data );
3076 void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer data );
3077
3078 static char mypltr_funcstr[255];
3079
3080// This is the callback that gets handed to the C code.
3081// It, in turn, calls the Lua callback
3082 void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * PL_UNUSED( pltr_data ) )
3083 {
3084 *tx = 0;
3085 *ty = 0;
3086
3087 // check Lua state
3088 if ( myL == NULL )
3089 {
3090 fprintf( stderr, "Lua state is not set!" );
3091 return;
3092 }
3093
3094 // push functions and arguments
3095 lua_getglobal( myL, mypltr_funcstr ); // function to be called
3096 lua_pushnumber( myL, x ); // push 1st argument
3097 lua_pushnumber( myL, y ); // push 2nd argument
3098
3099 // do the call (2 arguments, 2 result)
3100 if ( lua_pcall( myL, 2, 2, 0 ) != 0 )
3101 fprintf( stderr, "error running function `%s':%s",
3102 mypltr_funcstr, lua_tostring( myL, -1 ) );
3103
3104 // retrieve results
3105 if ( !lua_isnumber( myL, -2 ) )
3106 {
3107 fprintf( stderr, "function `%s' must return a number as 1st result", mypltr_funcstr );
3108 return;
3109 }
3110 if ( !lua_isnumber( myL, -1 ) )
3111 {
3112 fprintf( stderr, "function `%s' must return a number as 2nd result", mypltr_funcstr );
3113 return;
3114 }
3115 *tx = lua_tonumber( myL, -2 );
3116 *ty = lua_tonumber( myL, -1 );
3117 lua_pop( myL, 2 ); // pop returned values
3118
3119 return;
3120 }
3121
3122 static char myct_funcstr[255];
3123
3124// This is the callback that gets handed to the C code.
3125// It, in turn, calls the Lua callback
3126 void myct( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * PL_UNUSED( pltr_data ) )
3127 {
3128 *tx = 0;
3129 *ty = 0;
3130
3131 // check Lua state
3132 if ( myL == NULL )
3133 {
3134 fprintf( stderr, "Lua state is not set!" );
3135 return;
3136 }
3137
3138 // push functions and arguments
3139 lua_getglobal( myL, myct_funcstr ); // function to be called
3140 lua_pushnumber( myL, x ); // push 1st argument
3141 lua_pushnumber( myL, y ); // push 2nd argument
3142
3143 // do the call (2 arguments, 2 result)
3144 if ( lua_pcall( myL, 2, 2, 0 ) != 0 )
3145 fprintf( stderr, "error running function `%s':%s",
3146 myct_funcstr, lua_tostring( myL, -1 ) );
3147
3148 // retrieve results
3149 if ( !lua_isnumber( myL, -2 ) )
3150 {
3151 fprintf( stderr, "function `%s' must return a number as 1st result", myct_funcstr );
3152 return;
3153 }
3154 if ( !lua_isnumber( myL, -1 ) )
3155 {
3156 fprintf( stderr, "function `%s' must return a number as 2nd result", myct_funcstr );
3157 return;
3158 }
3159 *tx = lua_tonumber( myL, -2 );
3160 *ty = lua_tonumber( myL, -1 );
3161 lua_pop( myL, 2 ); // pop returned values
3162
3163 return;
3164 }
3165
3166 static char mylabel_funcstr[255];
3167
3168 void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer PL_UNUSED( data ) )
3169 {
3170 // check Lua state
3171 if ( myL == NULL )
3172 {
3173 fprintf( stderr, "Lua state is not set!" );
3174 return;
3175 }
3176
3177 // push functions and arguments
3178 lua_getglobal( myL, mylabel_funcstr ); // function to be called
3179 lua_pushnumber( myL, axis ); // push 1st argument
3180 lua_pushnumber( myL, value ); // push 1st argument
3181
3182 // do the call (2 arguments, 1 result)
3183 if ( lua_pcall( myL, 2, 1, 0 ) != 0 )
3184 fprintf( stderr, "error running function `%s':%s",
3185 mylabel_funcstr, lua_tostring( myL, -1 ) );
3186
3187 // retrieve results
3188 if ( !lua_isstring( myL, -1 ) )
3189 {
3190 fprintf( stderr, "function `%s' must return a string as result", mylabel_funcstr );
3191 return;
3192 }
3193 strncpy( label, lua_tostring( myL, -1 ), length );
3194
3195 lua_pop( myL, 1 ); // pop returned values
3196
3197 return;
3198 }
3199
3200
3201SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
3202 int ret = lua_isstring(L, idx);
3203 if (!ret)
3204 ret = lua_isnil(L, idx);
3205 return ret;
3206}
3207
3208#ifdef __cplusplus
3209extern "C" {
3210#endif
3211static int _wrap_PLGraphicsIn_type_set(lua_State* L) {
3212 int SWIG_arg = 0;
3213 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3214 int arg2 ;
3215
3216 SWIG_check_num_args("PLGraphicsIn::type",2,2)
3217 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::type",1,"PLGraphicsIn *");
3218 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::type",2,"int");
3219
3220 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3221 SWIG_fail_ptr("PLGraphicsIn_type_set",1,SWIGTYPE_p_PLGraphicsIn);
3222 }
3223
3224 arg2 = (int)lua_tonumber(L, 2);
3225 if (arg1) (arg1)->type = arg2;
3226
3227 return SWIG_arg;
3228
3229 if(0) SWIG_fail;
3230
3231fail:
3232 lua_error(L);
3233 return SWIG_arg;
3234}
3235
3236
3237static int _wrap_PLGraphicsIn_type_get(lua_State* L) {
3238 int SWIG_arg = 0;
3239 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3240 int result;
3241
3242 SWIG_check_num_args("PLGraphicsIn::type",1,1)
3243 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::type",1,"PLGraphicsIn *");
3244
3245 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3246 SWIG_fail_ptr("PLGraphicsIn_type_get",1,SWIGTYPE_p_PLGraphicsIn);
3247 }
3248
3249 result = (int) ((arg1)->type);
3250 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3251 return SWIG_arg;
3252
3253 if(0) SWIG_fail;
3254
3255fail:
3256 lua_error(L);
3257 return SWIG_arg;
3258}
3259
3260
3261static int _wrap_PLGraphicsIn_state_set(lua_State* L) {
3262 int SWIG_arg = 0;
3263 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3264 unsigned int arg2 ;
3265
3266 SWIG_check_num_args("PLGraphicsIn::state",2,2)
3267 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::state",1,"PLGraphicsIn *");
3268 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::state",2,"unsigned int");
3269
3270 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3271 SWIG_fail_ptr("PLGraphicsIn_state_set",1,SWIGTYPE_p_PLGraphicsIn);
3272 }
3273
3274 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
3275 arg2 = (unsigned int)lua_tonumber(L, 2);
3276 if (arg1) (arg1)->state = arg2;
3277
3278 return SWIG_arg;
3279
3280 if(0) SWIG_fail;
3281
3282fail:
3283 lua_error(L);
3284 return SWIG_arg;
3285}
3286
3287
3288static int _wrap_PLGraphicsIn_state_get(lua_State* L) {
3289 int SWIG_arg = 0;
3290 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3291 unsigned int result;
3292
3293 SWIG_check_num_args("PLGraphicsIn::state",1,1)
3294 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::state",1,"PLGraphicsIn *");
3295
3296 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3297 SWIG_fail_ptr("PLGraphicsIn_state_get",1,SWIGTYPE_p_PLGraphicsIn);
3298 }
3299
3300 result = (unsigned int) ((arg1)->state);
3301 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3302 return SWIG_arg;
3303
3304 if(0) SWIG_fail;
3305
3306fail:
3307 lua_error(L);
3308 return SWIG_arg;
3309}
3310
3311
3312static int _wrap_PLGraphicsIn_keysym_set(lua_State* L) {
3313 int SWIG_arg = 0;
3314 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3315 unsigned int arg2 ;
3316
3317 SWIG_check_num_args("PLGraphicsIn::keysym",2,2)
3318 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::keysym",1,"PLGraphicsIn *");
3319 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::keysym",2,"unsigned int");
3320
3321 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3322 SWIG_fail_ptr("PLGraphicsIn_keysym_set",1,SWIGTYPE_p_PLGraphicsIn);
3323 }
3324
3325 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
3326 arg2 = (unsigned int)lua_tonumber(L, 2);
3327 if (arg1) (arg1)->keysym = arg2;
3328
3329 return SWIG_arg;
3330
3331 if(0) SWIG_fail;
3332
3333fail:
3334 lua_error(L);
3335 return SWIG_arg;
3336}
3337
3338
3339static int _wrap_PLGraphicsIn_keysym_get(lua_State* L) {
3340 int SWIG_arg = 0;
3341 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3342 unsigned int result;
3343
3344 SWIG_check_num_args("PLGraphicsIn::keysym",1,1)
3345 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::keysym",1,"PLGraphicsIn *");
3346
3347 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3348 SWIG_fail_ptr("PLGraphicsIn_keysym_get",1,SWIGTYPE_p_PLGraphicsIn);
3349 }
3350
3351 result = (unsigned int) ((arg1)->keysym);
3352 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3353 return SWIG_arg;
3354
3355 if(0) SWIG_fail;
3356
3357fail:
3358 lua_error(L);
3359 return SWIG_arg;
3360}
3361
3362
3363static int _wrap_PLGraphicsIn_button_set(lua_State* L) {
3364 int SWIG_arg = 0;
3365 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3366 unsigned int arg2 ;
3367
3368 SWIG_check_num_args("PLGraphicsIn::button",2,2)
3369 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::button",1,"PLGraphicsIn *");
3370 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::button",2,"unsigned int");
3371
3372 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3373 SWIG_fail_ptr("PLGraphicsIn_button_set",1,SWIGTYPE_p_PLGraphicsIn);
3374 }
3375
3376 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
3377 arg2 = (unsigned int)lua_tonumber(L, 2);
3378 if (arg1) (arg1)->button = arg2;
3379
3380 return SWIG_arg;
3381
3382 if(0) SWIG_fail;
3383
3384fail:
3385 lua_error(L);
3386 return SWIG_arg;
3387}
3388
3389
3390static int _wrap_PLGraphicsIn_button_get(lua_State* L) {
3391 int SWIG_arg = 0;
3392 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3393 unsigned int result;
3394
3395 SWIG_check_num_args("PLGraphicsIn::button",1,1)
3396 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::button",1,"PLGraphicsIn *");
3397
3398 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3399 SWIG_fail_ptr("PLGraphicsIn_button_get",1,SWIGTYPE_p_PLGraphicsIn);
3400 }
3401
3402 result = (unsigned int) ((arg1)->button);
3403 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3404 return SWIG_arg;
3405
3406 if(0) SWIG_fail;
3407
3408fail:
3409 lua_error(L);
3410 return SWIG_arg;
3411}
3412
3413
3414static int _wrap_PLGraphicsIn_subwindow_set(lua_State* L) {
3415 int SWIG_arg = 0;
3416 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3417 PLINT arg2 ;
3418
3419 SWIG_check_num_args("PLGraphicsIn::subwindow",2,2)
3420 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::subwindow",1,"PLGraphicsIn *");
3421 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::subwindow",2,"PLINT");
3422
3423 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3424 SWIG_fail_ptr("PLGraphicsIn_subwindow_set",1,SWIGTYPE_p_PLGraphicsIn);
3425 }
3426
3427 arg2 = (PLINT)lua_tonumber(L, 2);
3428 if (arg1) (arg1)->subwindow = arg2;
3429
3430 return SWIG_arg;
3431
3432 if(0) SWIG_fail;
3433
3434fail:
3435 lua_error(L);
3436 return SWIG_arg;
3437}
3438
3439
3440static int _wrap_PLGraphicsIn_subwindow_get(lua_State* L) {
3441 int SWIG_arg = 0;
3442 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3443 PLINT result;
3444
3445 SWIG_check_num_args("PLGraphicsIn::subwindow",1,1)
3446 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::subwindow",1,"PLGraphicsIn *");
3447
3448 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3449 SWIG_fail_ptr("PLGraphicsIn_subwindow_get",1,SWIGTYPE_p_PLGraphicsIn);
3450 }
3451
3452 result = (PLINT) ((arg1)->subwindow);
3453 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3454 return SWIG_arg;
3455
3456 if(0) SWIG_fail;
3457
3458fail:
3459 lua_error(L);
3460 return SWIG_arg;
3461}
3462
3463
3464static int _wrap_PLGraphicsIn_string_set(lua_State* L) {
3465 int SWIG_arg = 0;
3466 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3467 char *arg2 ;
3468
3469 SWIG_check_num_args("PLGraphicsIn::string",2,2)
3470 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::string",1,"PLGraphicsIn *");
3471 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("PLGraphicsIn::string",2,"char [16]");
3472
3473 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3474 SWIG_fail_ptr("PLGraphicsIn_string_set",1,SWIGTYPE_p_PLGraphicsIn);
3475 }
3476
3477 arg2 = (char *)lua_tostring(L, 2);
3478 {
3479 if(arg2) {
3480 strncpy((char*)arg1->string, (const char *)arg2, 16-1);
3481 arg1->string[16-1] = 0;
3482 } else {
3483 arg1->string[0] = 0;
3484 }
3485 }
3486
3487 return SWIG_arg;
3488
3489 if(0) SWIG_fail;
3490
3491fail:
3492 lua_error(L);
3493 return SWIG_arg;
3494}
3495
3496
3497static int _wrap_PLGraphicsIn_string_get(lua_State* L) {
3498 int SWIG_arg = 0;
3499 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3500 char *result = 0 ;
3501
3502 SWIG_check_num_args("PLGraphicsIn::string",1,1)
3503 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::string",1,"PLGraphicsIn *");
3504
3505 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3506 SWIG_fail_ptr("PLGraphicsIn_string_get",1,SWIGTYPE_p_PLGraphicsIn);
3507 }
3508
3509 result = (char *)(char *) ((arg1)->string);
3510 lua_pushstring(L,(const char *)result); SWIG_arg++;
3511 return SWIG_arg;
3512
3513 if(0) SWIG_fail;
3514
3515fail:
3516 lua_error(L);
3517 return SWIG_arg;
3518}
3519
3520
3521static int _wrap_PLGraphicsIn_pX_set(lua_State* L) {
3522 int SWIG_arg = 0;
3523 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3524 int arg2 ;
3525
3526 SWIG_check_num_args("PLGraphicsIn::pX",2,2)
3527 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pX",1,"PLGraphicsIn *");
3528 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::pX",2,"int");
3529
3530 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3531 SWIG_fail_ptr("PLGraphicsIn_pX_set",1,SWIGTYPE_p_PLGraphicsIn);
3532 }
3533
3534 arg2 = (int)lua_tonumber(L, 2);
3535 if (arg1) (arg1)->pX = arg2;
3536
3537 return SWIG_arg;
3538
3539 if(0) SWIG_fail;
3540
3541fail:
3542 lua_error(L);
3543 return SWIG_arg;
3544}
3545
3546
3547static int _wrap_PLGraphicsIn_pX_get(lua_State* L) {
3548 int SWIG_arg = 0;
3549 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3550 int result;
3551
3552 SWIG_check_num_args("PLGraphicsIn::pX",1,1)
3553 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pX",1,"PLGraphicsIn *");
3554
3555 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3556 SWIG_fail_ptr("PLGraphicsIn_pX_get",1,SWIGTYPE_p_PLGraphicsIn);
3557 }
3558
3559 result = (int) ((arg1)->pX);
3560 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3561 return SWIG_arg;
3562
3563 if(0) SWIG_fail;
3564
3565fail:
3566 lua_error(L);
3567 return SWIG_arg;
3568}
3569
3570
3571static int _wrap_PLGraphicsIn_pY_set(lua_State* L) {
3572 int SWIG_arg = 0;
3573 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3574 int arg2 ;
3575
3576 SWIG_check_num_args("PLGraphicsIn::pY",2,2)
3577 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pY",1,"PLGraphicsIn *");
3578 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::pY",2,"int");
3579
3580 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3581 SWIG_fail_ptr("PLGraphicsIn_pY_set",1,SWIGTYPE_p_PLGraphicsIn);
3582 }
3583
3584 arg2 = (int)lua_tonumber(L, 2);
3585 if (arg1) (arg1)->pY = arg2;
3586
3587 return SWIG_arg;
3588
3589 if(0) SWIG_fail;
3590
3591fail:
3592 lua_error(L);
3593 return SWIG_arg;
3594}
3595
3596
3597static int _wrap_PLGraphicsIn_pY_get(lua_State* L) {
3598 int SWIG_arg = 0;
3599 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3600 int result;
3601
3602 SWIG_check_num_args("PLGraphicsIn::pY",1,1)
3603 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pY",1,"PLGraphicsIn *");
3604
3605 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3606 SWIG_fail_ptr("PLGraphicsIn_pY_get",1,SWIGTYPE_p_PLGraphicsIn);
3607 }
3608
3609 result = (int) ((arg1)->pY);
3610 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3611 return SWIG_arg;
3612
3613 if(0) SWIG_fail;
3614
3615fail:
3616 lua_error(L);
3617 return SWIG_arg;
3618}
3619
3620
3621static int _wrap_PLGraphicsIn_dX_set(lua_State* L) {
3622 int SWIG_arg = 0;
3623 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3624 PLFLT arg2 ;
3625
3626 SWIG_check_num_args("PLGraphicsIn::dX",2,2)
3627 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dX",1,"PLGraphicsIn *");
3628 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::dX",2,"PLFLT");
3629
3630 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3631 SWIG_fail_ptr("PLGraphicsIn_dX_set",1,SWIGTYPE_p_PLGraphicsIn);
3632 }
3633
3634 arg2 = (PLFLT)lua_tonumber(L, 2);
3635 if (arg1) (arg1)->dX = arg2;
3636
3637 return SWIG_arg;
3638
3639 if(0) SWIG_fail;
3640
3641fail:
3642 lua_error(L);
3643 return SWIG_arg;
3644}
3645
3646
3647static int _wrap_PLGraphicsIn_dX_get(lua_State* L) {
3648 int SWIG_arg = 0;
3649 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3650 PLFLT result;
3651
3652 SWIG_check_num_args("PLGraphicsIn::dX",1,1)
3653 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dX",1,"PLGraphicsIn *");
3654
3655 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3656 SWIG_fail_ptr("PLGraphicsIn_dX_get",1,SWIGTYPE_p_PLGraphicsIn);
3657 }
3658
3659 result = (PLFLT) ((arg1)->dX);
3660 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3661 return SWIG_arg;
3662
3663 if(0) SWIG_fail;
3664
3665fail:
3666 lua_error(L);
3667 return SWIG_arg;
3668}
3669
3670
3671static int _wrap_PLGraphicsIn_dY_set(lua_State* L) {
3672 int SWIG_arg = 0;
3673 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3674 PLFLT arg2 ;
3675
3676 SWIG_check_num_args("PLGraphicsIn::dY",2,2)
3677 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dY",1,"PLGraphicsIn *");
3678 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::dY",2,"PLFLT");
3679
3680 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3681 SWIG_fail_ptr("PLGraphicsIn_dY_set",1,SWIGTYPE_p_PLGraphicsIn);
3682 }
3683
3684 arg2 = (PLFLT)lua_tonumber(L, 2);
3685 if (arg1) (arg1)->dY = arg2;
3686
3687 return SWIG_arg;
3688
3689 if(0) SWIG_fail;
3690
3691fail:
3692 lua_error(L);
3693 return SWIG_arg;
3694}
3695
3696
3697static int _wrap_PLGraphicsIn_dY_get(lua_State* L) {
3698 int SWIG_arg = 0;
3699 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3700 PLFLT result;
3701
3702 SWIG_check_num_args("PLGraphicsIn::dY",1,1)
3703 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dY",1,"PLGraphicsIn *");
3704
3705 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3706 SWIG_fail_ptr("PLGraphicsIn_dY_get",1,SWIGTYPE_p_PLGraphicsIn);
3707 }
3708
3709 result = (PLFLT) ((arg1)->dY);
3710 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3711 return SWIG_arg;
3712
3713 if(0) SWIG_fail;
3714
3715fail:
3716 lua_error(L);
3717 return SWIG_arg;
3718}
3719
3720
3721static int _wrap_PLGraphicsIn_wX_set(lua_State* L) {
3722 int SWIG_arg = 0;
3723 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3724 PLFLT arg2 ;
3725
3726 SWIG_check_num_args("PLGraphicsIn::wX",2,2)
3727 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wX",1,"PLGraphicsIn *");
3728 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::wX",2,"PLFLT");
3729
3730 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3731 SWIG_fail_ptr("PLGraphicsIn_wX_set",1,SWIGTYPE_p_PLGraphicsIn);
3732 }
3733
3734 arg2 = (PLFLT)lua_tonumber(L, 2);
3735 if (arg1) (arg1)->wX = arg2;
3736
3737 return SWIG_arg;
3738
3739 if(0) SWIG_fail;
3740
3741fail:
3742 lua_error(L);
3743 return SWIG_arg;
3744}
3745
3746
3747static int _wrap_PLGraphicsIn_wX_get(lua_State* L) {
3748 int SWIG_arg = 0;
3749 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3750 PLFLT result;
3751
3752 SWIG_check_num_args("PLGraphicsIn::wX",1,1)
3753 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wX",1,"PLGraphicsIn *");
3754
3755 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3756 SWIG_fail_ptr("PLGraphicsIn_wX_get",1,SWIGTYPE_p_PLGraphicsIn);
3757 }
3758
3759 result = (PLFLT) ((arg1)->wX);
3760 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3761 return SWIG_arg;
3762
3763 if(0) SWIG_fail;
3764
3765fail:
3766 lua_error(L);
3767 return SWIG_arg;
3768}
3769
3770
3771static int _wrap_PLGraphicsIn_wY_set(lua_State* L) {
3772 int SWIG_arg = 0;
3773 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3774 PLFLT arg2 ;
3775
3776 SWIG_check_num_args("PLGraphicsIn::wY",2,2)
3777 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wY",1,"PLGraphicsIn *");
3778 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::wY",2,"PLFLT");
3779
3780 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3781 SWIG_fail_ptr("PLGraphicsIn_wY_set",1,SWIGTYPE_p_PLGraphicsIn);
3782 }
3783
3784 arg2 = (PLFLT)lua_tonumber(L, 2);
3785 if (arg1) (arg1)->wY = arg2;
3786
3787 return SWIG_arg;
3788
3789 if(0) SWIG_fail;
3790
3791fail:
3792 lua_error(L);
3793 return SWIG_arg;
3794}
3795
3796
3797static int _wrap_PLGraphicsIn_wY_get(lua_State* L) {
3798 int SWIG_arg = 0;
3799 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
3800 PLFLT result;
3801
3802 SWIG_check_num_args("PLGraphicsIn::wY",1,1)
3803 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wY",1,"PLGraphicsIn *");
3804
3805 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
3806 SWIG_fail_ptr("PLGraphicsIn_wY_get",1,SWIGTYPE_p_PLGraphicsIn);
3807 }
3808
3809 result = (PLFLT) ((arg1)->wY);
3810 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
3811 return SWIG_arg;
3812
3813 if(0) SWIG_fail;
3814
3815fail:
3816 lua_error(L);
3817 return SWIG_arg;
3818}
3819
3820
3821static int _wrap_new_PLGraphicsIn(lua_State* L) {
3822 int SWIG_arg = 0;
3823 PLGraphicsIn *result = 0 ;
3824
3825 SWIG_check_num_args("PLGraphicsIn::PLGraphicsIn",0,0)
3826 result = (PLGraphicsIn *)calloc(1, sizeof(PLGraphicsIn));
3827 SWIG_NewPointerObj(L,result,SWIGTYPE_p_PLGraphicsIn,1); SWIG_arg++;
3828 return SWIG_arg;
3829
3830 if(0) SWIG_fail;
3831
3832fail:
3833 lua_error(L);
3834 return SWIG_arg;
3835}
3836
3837
3838static void swig_delete_PLGraphicsIn(void *obj) {
3839PLGraphicsIn *arg1 = (PLGraphicsIn *) obj;
3840free((char *) arg1);
3841}
3842static int _proxy__wrap_new_PLGraphicsIn(lua_State *L) {
3843 assert(lua_istable(L,1));
3844 lua_pushcfunction(L,_wrap_new_PLGraphicsIn);
3845 assert(!lua_isnil(L,-1));
3846 lua_replace(L,1); /* replace our table with real constructor */
3847 lua_call(L,lua_gettop(L)-1,1);
3848 return 1;
3849}
3863 {0,0,0}
3864};
3866 {0,0}
3867};
3869 {0,0}
3870};
3871
3873 {0,0,0}
3874};
3876 {0,0,0,0,0,0}
3877};
3879 {0,0}
3880};
3882 0
3883};
3884
3886 "PLGraphicsIn",
3891 0
3892};
3894static const char *swig_PLGraphicsIn_base_names[] = {0};
3896
3897static int _wrap_setcontlabelformat(lua_State* L) {
3898 int SWIG_arg = 0;
3899 PLINT arg1 ;
3900 PLINT arg2 ;
3901
3902 SWIG_check_num_args("pl_setcontlabelformat",2,2)
3903 if(!lua_isnumber(L,1)) SWIG_fail_arg("pl_setcontlabelformat",1,"PLINT");
3904 if(!lua_isnumber(L,2)) SWIG_fail_arg("pl_setcontlabelformat",2,"PLINT");
3905 arg1 = (PLINT)lua_tonumber(L, 1);
3906 arg2 = (PLINT)lua_tonumber(L, 2);
3907 pl_setcontlabelformat(arg1,arg2);
3908
3909 return SWIG_arg;
3910
3911 if(0) SWIG_fail;
3912
3913fail:
3914 lua_error(L);
3915 return SWIG_arg;
3916}
3917
3918
3919static int _wrap_setcontlabelparam(lua_State* L) {
3920 int SWIG_arg = 0;
3921 PLFLT arg1 ;
3922 PLFLT arg2 ;
3923 PLFLT arg3 ;
3924 PLINT arg4 ;
3925
3926 SWIG_check_num_args("pl_setcontlabelparam",4,4)
3927 if(!lua_isnumber(L,1)) SWIG_fail_arg("pl_setcontlabelparam",1,"PLFLT");
3928 if(!lua_isnumber(L,2)) SWIG_fail_arg("pl_setcontlabelparam",2,"PLFLT");
3929 if(!lua_isnumber(L,3)) SWIG_fail_arg("pl_setcontlabelparam",3,"PLFLT");
3930 if(!lua_isnumber(L,4)) SWIG_fail_arg("pl_setcontlabelparam",4,"PLINT");
3931 arg1 = (PLFLT)lua_tonumber(L, 1);
3932 arg2 = (PLFLT)lua_tonumber(L, 2);
3933 arg3 = (PLFLT)lua_tonumber(L, 3);
3934 arg4 = (PLINT)lua_tonumber(L, 4);
3935 pl_setcontlabelparam(arg1,arg2,arg3,arg4);
3936
3937 return SWIG_arg;
3938
3939 if(0) SWIG_fail;
3940
3941fail:
3942 lua_error(L);
3943 return SWIG_arg;
3944}
3945
3946
3947static int _wrap_adv(lua_State* L) {
3948 int SWIG_arg = 0;
3949 PLINT arg1 ;
3950
3951 SWIG_check_num_args("pladv",1,1)
3952 if(!lua_isnumber(L,1)) SWIG_fail_arg("pladv",1,"PLINT");
3953 arg1 = (PLINT)lua_tonumber(L, 1);
3954 pladv(arg1);
3955
3956 return SWIG_arg;
3957
3958 if(0) SWIG_fail;
3959
3960fail:
3961 lua_error(L);
3962 return SWIG_arg;
3963}
3964
3965
3966static int _wrap_arc(lua_State* L) {
3967 int SWIG_arg = 0;
3968 PLFLT arg1 ;
3969 PLFLT arg2 ;
3970 PLFLT arg3 ;
3971 PLFLT arg4 ;
3972 PLFLT arg5 ;
3973 PLFLT arg6 ;
3974 PLFLT arg7 ;
3975 PLBOOL arg8 ;
3976
3977 SWIG_check_num_args("plarc",8,8)
3978 if(!lua_isnumber(L,1)) SWIG_fail_arg("plarc",1,"PLFLT");
3979 if(!lua_isnumber(L,2)) SWIG_fail_arg("plarc",2,"PLFLT");
3980 if(!lua_isnumber(L,3)) SWIG_fail_arg("plarc",3,"PLFLT");
3981 if(!lua_isnumber(L,4)) SWIG_fail_arg("plarc",4,"PLFLT");
3982 if(!lua_isnumber(L,5)) SWIG_fail_arg("plarc",5,"PLFLT");
3983 if(!lua_isnumber(L,6)) SWIG_fail_arg("plarc",6,"PLFLT");
3984 if(!lua_isnumber(L,7)) SWIG_fail_arg("plarc",7,"PLFLT");
3985 if(!lua_isnumber(L,8)) SWIG_fail_arg("plarc",8,"PLBOOL");
3986 arg1 = (PLFLT)lua_tonumber(L, 1);
3987 arg2 = (PLFLT)lua_tonumber(L, 2);
3988 arg3 = (PLFLT)lua_tonumber(L, 3);
3989 arg4 = (PLFLT)lua_tonumber(L, 4);
3990 arg5 = (PLFLT)lua_tonumber(L, 5);
3991 arg6 = (PLFLT)lua_tonumber(L, 6);
3992 arg7 = (PLFLT)lua_tonumber(L, 7);
3993 arg8 = (PLBOOL)lua_tonumber(L, 8);
3994 plarc(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
3995
3996 return SWIG_arg;
3997
3998 if(0) SWIG_fail;
3999
4000fail:
4001 lua_error(L);
4002 return SWIG_arg;
4003}
4004
4005
4006static int _wrap_axes(lua_State* L) {
4007 int SWIG_arg = 0;
4008 PLFLT arg1 ;
4009 PLFLT arg2 ;
4010 char *arg3 = (char *) 0 ;
4011 PLFLT arg4 ;
4012 PLINT arg5 ;
4013 char *arg6 = (char *) 0 ;
4014 PLFLT arg7 ;
4015 PLINT arg8 ;
4016
4017 SWIG_check_num_args("plaxes",8,8)
4018 if(!lua_isnumber(L,1)) SWIG_fail_arg("plaxes",1,"PLFLT");
4019 if(!lua_isnumber(L,2)) SWIG_fail_arg("plaxes",2,"PLFLT");
4020 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plaxes",3,"char const *");
4021 if(!lua_isnumber(L,4)) SWIG_fail_arg("plaxes",4,"PLFLT");
4022 if(!lua_isnumber(L,5)) SWIG_fail_arg("plaxes",5,"PLINT");
4023 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plaxes",6,"char const *");
4024 if(!lua_isnumber(L,7)) SWIG_fail_arg("plaxes",7,"PLFLT");
4025 if(!lua_isnumber(L,8)) SWIG_fail_arg("plaxes",8,"PLINT");
4026 arg1 = (PLFLT)lua_tonumber(L, 1);
4027 arg2 = (PLFLT)lua_tonumber(L, 2);
4028 arg3 = (char *)lua_tostring(L, 3);
4029 arg4 = (PLFLT)lua_tonumber(L, 4);
4030 arg5 = (PLINT)lua_tonumber(L, 5);
4031 arg6 = (char *)lua_tostring(L, 6);
4032 arg7 = (PLFLT)lua_tonumber(L, 7);
4033 arg8 = (PLINT)lua_tonumber(L, 8);
4034 plaxes(arg1,arg2,(char const *)arg3,arg4,arg5,(char const *)arg6,arg7,arg8);
4035
4036 return SWIG_arg;
4037
4038 if(0) SWIG_fail;
4039
4040fail:
4041 lua_error(L);
4042 return SWIG_arg;
4043}
4044
4045
4046static int _wrap_bin(lua_State* L) {
4047 int SWIG_arg = 0;
4048 PLINT arg1 ;
4049 PLFLT *arg2 = (PLFLT *) 0 ;
4050 PLFLT *arg3 = (PLFLT *) 0 ;
4051 PLINT arg4 ;
4052 int temp3 ;
4053
4054 SWIG_check_num_args("plbin",3,3)
4055 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbin",3,"PLINT");
4056 {
4057 int temp;
4058 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4059 if ( !arg2 )
4060 SWIG_fail;
4061 arg1 = Alen = temp;
4062 }
4063 {
4064 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4065 if ( !arg3 )
4066 SWIG_fail;
4067 if ( temp3 != Alen )
4068 {
4069 lua_pushfstring( L, "Tables must be of same length." );
4070 SWIG_fail;
4071 }
4072 }
4073 arg4 = (PLINT)lua_tonumber(L, 3);
4074 plbin(arg1,(double const *)arg2,(double const *)arg3,arg4);
4075
4076 {
4077 LUA_FREE_ARRAY( arg2 );
4078 }
4079 {
4080 LUA_FREE_ARRAY( arg3 );
4081 }
4082 return SWIG_arg;
4083
4084 if(0) SWIG_fail;
4085
4086fail:
4087 {
4088 LUA_FREE_ARRAY( arg2 );
4089 }
4090 {
4091 LUA_FREE_ARRAY( arg3 );
4092 }
4093 lua_error(L);
4094 return SWIG_arg;
4095}
4096
4097
4098static int _wrap_btime(lua_State* L) {
4099 int SWIG_arg = 0;
4100 PLINT *arg1 = (PLINT *) 0 ;
4101 PLINT *arg2 = (PLINT *) 0 ;
4102 PLINT *arg3 = (PLINT *) 0 ;
4103 PLINT *arg4 = (PLINT *) 0 ;
4104 PLINT *arg5 = (PLINT *) 0 ;
4105 PLFLT *arg6 = (PLFLT *) 0 ;
4106 PLFLT arg7 ;
4107 PLINT temp1 ;
4108 PLINT temp2 ;
4109 PLINT temp3 ;
4110 PLINT temp4 ;
4111 PLINT temp5 ;
4112 PLFLT temp6 ;
4113
4114 arg1 = &temp1;
4115 arg2 = &temp2;
4116 arg3 = &temp3;
4117 arg4 = &temp4;
4118 arg5 = &temp5;
4119 arg6 = &temp6;
4120 SWIG_check_num_args("plbtime",1,1)
4121 if(!lua_isnumber(L,1)) SWIG_fail_arg("plbtime",1,"PLFLT");
4122 arg7 = (PLFLT)lua_tonumber(L, 1);
4123 plbtime(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
4124
4125 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4126 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4127 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4128 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4129 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
4130 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
4131 return SWIG_arg;
4132
4133 if(0) SWIG_fail;
4134
4135fail:
4136 lua_error(L);
4137 return SWIG_arg;
4138}
4139
4140
4141static int _wrap_bop(lua_State* L) {
4142 int SWIG_arg = 0;
4143
4144 SWIG_check_num_args("plbop",0,0)
4145 plbop();
4146
4147 return SWIG_arg;
4148
4149 if(0) SWIG_fail;
4150
4151fail:
4152 lua_error(L);
4153 return SWIG_arg;
4154}
4155
4156
4157static int _wrap_box(lua_State* L) {
4158 int SWIG_arg = 0;
4159 char *arg1 = (char *) 0 ;
4160 PLFLT arg2 ;
4161 PLINT arg3 ;
4162 char *arg4 = (char *) 0 ;
4163 PLFLT arg5 ;
4164 PLINT arg6 ;
4165
4166 SWIG_check_num_args("plbox",6,6)
4167 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plbox",1,"char const *");
4168 if(!lua_isnumber(L,2)) SWIG_fail_arg("plbox",2,"PLFLT");
4169 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbox",3,"PLINT");
4170 if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("plbox",4,"char const *");
4171 if(!lua_isnumber(L,5)) SWIG_fail_arg("plbox",5,"PLFLT");
4172 if(!lua_isnumber(L,6)) SWIG_fail_arg("plbox",6,"PLINT");
4173 arg1 = (char *)lua_tostring(L, 1);
4174 arg2 = (PLFLT)lua_tonumber(L, 2);
4175 arg3 = (PLINT)lua_tonumber(L, 3);
4176 arg4 = (char *)lua_tostring(L, 4);
4177 arg5 = (PLFLT)lua_tonumber(L, 5);
4178 arg6 = (PLINT)lua_tonumber(L, 6);
4179 plbox((char const *)arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
4180
4181 return SWIG_arg;
4182
4183 if(0) SWIG_fail;
4184
4185fail:
4186 lua_error(L);
4187 return SWIG_arg;
4188}
4189
4190
4191static int _wrap_box3(lua_State* L) {
4192 int SWIG_arg = 0;
4193 char *arg1 = (char *) 0 ;
4194 char *arg2 = (char *) 0 ;
4195 PLFLT arg3 ;
4196 PLINT arg4 ;
4197 char *arg5 = (char *) 0 ;
4198 char *arg6 = (char *) 0 ;
4199 PLFLT arg7 ;
4200 PLINT arg8 ;
4201 char *arg9 = (char *) 0 ;
4202 char *arg10 = (char *) 0 ;
4203 PLFLT arg11 ;
4204 PLINT arg12 ;
4205
4206 SWIG_check_num_args("plbox3",12,12)
4207 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plbox3",1,"char const *");
4208 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plbox3",2,"char const *");
4209 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbox3",3,"PLFLT");
4210 if(!lua_isnumber(L,4)) SWIG_fail_arg("plbox3",4,"PLINT");
4211 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plbox3",5,"char const *");
4212 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plbox3",6,"char const *");
4213 if(!lua_isnumber(L,7)) SWIG_fail_arg("plbox3",7,"PLFLT");
4214 if(!lua_isnumber(L,8)) SWIG_fail_arg("plbox3",8,"PLINT");
4215 if(!SWIG_lua_isnilstring(L,9)) SWIG_fail_arg("plbox3",9,"char const *");
4216 if(!SWIG_lua_isnilstring(L,10)) SWIG_fail_arg("plbox3",10,"char const *");
4217 if(!lua_isnumber(L,11)) SWIG_fail_arg("plbox3",11,"PLFLT");
4218 if(!lua_isnumber(L,12)) SWIG_fail_arg("plbox3",12,"PLINT");
4219 arg1 = (char *)lua_tostring(L, 1);
4220 arg2 = (char *)lua_tostring(L, 2);
4221 arg3 = (PLFLT)lua_tonumber(L, 3);
4222 arg4 = (PLINT)lua_tonumber(L, 4);
4223 arg5 = (char *)lua_tostring(L, 5);
4224 arg6 = (char *)lua_tostring(L, 6);
4225 arg7 = (PLFLT)lua_tonumber(L, 7);
4226 arg8 = (PLINT)lua_tonumber(L, 8);
4227 arg9 = (char *)lua_tostring(L, 9);
4228 arg10 = (char *)lua_tostring(L, 10);
4229 arg11 = (PLFLT)lua_tonumber(L, 11);
4230 arg12 = (PLINT)lua_tonumber(L, 12);
4231 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);
4232
4233 return SWIG_arg;
4234
4235 if(0) SWIG_fail;
4236
4237fail:
4238 lua_error(L);
4239 return SWIG_arg;
4240}
4241
4242
4243static int _wrap_calc_world(lua_State* L) {
4244 int SWIG_arg = 0;
4245 PLFLT arg1 ;
4246 PLFLT arg2 ;
4247 PLFLT *arg3 = (PLFLT *) 0 ;
4248 PLFLT *arg4 = (PLFLT *) 0 ;
4249 PLINT *arg5 = (PLINT *) 0 ;
4250 PLFLT temp3 ;
4251 PLFLT temp4 ;
4252 PLINT temp5 ;
4253
4254 arg3 = &temp3;
4255 arg4 = &temp4;
4256 arg5 = &temp5;
4257 SWIG_check_num_args("plcalc_world",2,2)
4258 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcalc_world",1,"PLFLT");
4259 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcalc_world",2,"PLFLT");
4260 arg1 = (PLFLT)lua_tonumber(L, 1);
4261 arg2 = (PLFLT)lua_tonumber(L, 2);
4262 plcalc_world(arg1,arg2,arg3,arg4,arg5);
4263
4264 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4265 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4266 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
4267 return SWIG_arg;
4268
4269 if(0) SWIG_fail;
4270
4271fail:
4272 lua_error(L);
4273 return SWIG_arg;
4274}
4275
4276
4277static int _wrap_clear(lua_State* L) {
4278 int SWIG_arg = 0;
4279
4280 SWIG_check_num_args("plclear",0,0)
4281 plclear();
4282
4283 return SWIG_arg;
4284
4285 if(0) SWIG_fail;
4286
4287fail:
4288 lua_error(L);
4289 return SWIG_arg;
4290}
4291
4292
4293static int _wrap_col0(lua_State* L) {
4294 int SWIG_arg = 0;
4295 PLINT arg1 ;
4296
4297 SWIG_check_num_args("plcol0",1,1)
4298 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcol0",1,"PLINT");
4299 arg1 = (PLINT)lua_tonumber(L, 1);
4300 plcol0(arg1);
4301
4302 return SWIG_arg;
4303
4304 if(0) SWIG_fail;
4305
4306fail:
4307 lua_error(L);
4308 return SWIG_arg;
4309}
4310
4311
4312static int _wrap_col1(lua_State* L) {
4313 int SWIG_arg = 0;
4314 PLFLT arg1 ;
4315
4316 SWIG_check_num_args("plcol1",1,1)
4317 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcol1",1,"PLFLT");
4318 arg1 = (PLFLT)lua_tonumber(L, 1);
4319 plcol1(arg1);
4320
4321 return SWIG_arg;
4322
4323 if(0) SWIG_fail;
4324
4325fail:
4326 lua_error(L);
4327 return SWIG_arg;
4328}
4329
4330
4331static int _wrap_configtime(lua_State* L) {
4332 int SWIG_arg = 0;
4333 PLFLT arg1 ;
4334 PLFLT arg2 ;
4335 PLFLT arg3 ;
4336 PLINT arg4 ;
4337 PLBOOL arg5 ;
4338 PLINT arg6 ;
4339 PLINT arg7 ;
4340 PLINT arg8 ;
4341 PLINT arg9 ;
4342 PLINT arg10 ;
4343 PLFLT arg11 ;
4344
4345 SWIG_check_num_args("plconfigtime",11,11)
4346 if(!lua_isnumber(L,1)) SWIG_fail_arg("plconfigtime",1,"PLFLT");
4347 if(!lua_isnumber(L,2)) SWIG_fail_arg("plconfigtime",2,"PLFLT");
4348 if(!lua_isnumber(L,3)) SWIG_fail_arg("plconfigtime",3,"PLFLT");
4349 if(!lua_isnumber(L,4)) SWIG_fail_arg("plconfigtime",4,"PLINT");
4350 if(!lua_isnumber(L,5)) SWIG_fail_arg("plconfigtime",5,"PLBOOL");
4351 if(!lua_isnumber(L,6)) SWIG_fail_arg("plconfigtime",6,"PLINT");
4352 if(!lua_isnumber(L,7)) SWIG_fail_arg("plconfigtime",7,"PLINT");
4353 if(!lua_isnumber(L,8)) SWIG_fail_arg("plconfigtime",8,"PLINT");
4354 if(!lua_isnumber(L,9)) SWIG_fail_arg("plconfigtime",9,"PLINT");
4355 if(!lua_isnumber(L,10)) SWIG_fail_arg("plconfigtime",10,"PLINT");
4356 if(!lua_isnumber(L,11)) SWIG_fail_arg("plconfigtime",11,"PLFLT");
4357 arg1 = (PLFLT)lua_tonumber(L, 1);
4358 arg2 = (PLFLT)lua_tonumber(L, 2);
4359 arg3 = (PLFLT)lua_tonumber(L, 3);
4360 arg4 = (PLINT)lua_tonumber(L, 4);
4361 arg5 = (PLBOOL)lua_tonumber(L, 5);
4362 arg6 = (PLINT)lua_tonumber(L, 6);
4363 arg7 = (PLINT)lua_tonumber(L, 7);
4364 arg8 = (PLINT)lua_tonumber(L, 8);
4365 arg9 = (PLINT)lua_tonumber(L, 9);
4366 arg10 = (PLINT)lua_tonumber(L, 10);
4367 arg11 = (PLFLT)lua_tonumber(L, 11);
4368 plconfigtime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
4369
4370 return SWIG_arg;
4371
4372 if(0) SWIG_fail;
4373
4374fail:
4375 lua_error(L);
4376 return SWIG_arg;
4377}
4378
4379
4380static int _wrap_cont(lua_State* L) {
4381 int SWIG_arg = 0;
4382 PLFLT **arg1 = (PLFLT **) 0 ;
4383 PLINT arg2 ;
4384 PLINT arg3 ;
4385 PLINT arg4 ;
4386 PLINT arg5 ;
4387 PLINT arg6 ;
4388 PLINT arg7 ;
4389 PLFLT *arg8 = (PLFLT *) 0 ;
4390 PLINT arg9 ;
4391 pltr_func arg10 = (pltr_func) 0 ;
4392 PLPointer arg11 = (PLPointer) 0 ;
4393 int ii1 ;
4394 PLcGrid cgrid111 ;
4395 PLcGrid2 cgrid211 ;
4396
4397 {
4398 cgrid111.xg = cgrid111.yg = cgrid111.zg = NULL;
4399 cgrid111.nx = cgrid111.ny = cgrid111.nz = 0;
4400 cgrid211.xg = cgrid211.yg = cgrid211.zg = NULL;
4401 cgrid211.nx = cgrid211.ny = 0;
4402 }
4403 {
4404 arg10 = NULL;
4405 }
4406 {
4407 arg11 = NULL;
4408 }
4409 SWIG_check_num_args("plcont",6,8)
4410 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcont",2,"PLINT");
4411 if(!lua_isnumber(L,3)) SWIG_fail_arg("plcont",3,"PLINT");
4412 if(!lua_isnumber(L,4)) SWIG_fail_arg("plcont",4,"PLINT");
4413 if(!lua_isnumber(L,5)) SWIG_fail_arg("plcont",5,"PLINT");
4414 {
4415 int jj;
4416
4417 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
4418 if ( !arg1 )
4419 SWIG_fail;
4420 Xlen = arg2 = ii1;
4421 Ylen = arg3 = jj;
4422 }
4423 arg4 = (PLINT)lua_tonumber(L, 2);
4424 arg5 = (PLINT)lua_tonumber(L, 3);
4425 arg6 = (PLINT)lua_tonumber(L, 4);
4426 arg7 = (PLINT)lua_tonumber(L, 5);
4427 {
4428 int temp;
4429 arg8 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp );
4430 if ( !arg8 )
4431 SWIG_fail;
4432 arg9 = Alen = temp;
4433 }
4434 if(lua_gettop(L)>=7){
4435 {
4436 arg10 = NULL;
4437 mypltr_funcstr[0] = '\0';
4438
4439 if ( lua_isstring( L, 7 ) )
4440 {
4441 const char* funcstr = lua_tostring( L, 7 );
4442 if ( strcmp( "pltr0", funcstr ) == 0 )
4443 {
4444 arg10 = pltr0;
4445 }
4446 else if ( strcmp( "pltr1", funcstr ) == 0 )
4447 {
4448 arg10 = pltr1;
4449 }
4450 else if ( strcmp( "pltr2", funcstr ) == 0 )
4451 {
4452 arg10 = pltr2;
4453 }
4454 else
4455 {
4456 arg10 = mypltr;
4457 strncpy( mypltr_funcstr, funcstr, 255 );
4458 myL = L;
4459 }
4460 }
4461 else
4462 SWIG_fail_arg( "cont", 10, "pltr_func" );
4463 }
4464 }
4465 if(lua_gettop(L)>=8){
4466 {
4467 int nx, ny;
4468 int gridmode = 0;
4469
4470 lua_pushstring( L, "xg" );
4471 lua_gettable( L, 8 );
4472 if ( !lua_istable( L, -1 ) )
4473 {
4474 lua_pop( L, 1 ); // pop "xg"
4475 lua_pushstring( L, "expected a table xg" );
4476 SWIG_fail;
4477 }
4478 lua_rawgeti( L, -1, 1 );
4479 if ( lua_istable( L, -1 ) )
4480 gridmode = 2; // two dimensional array
4481 else if ( lua_isnumber( L, -1 ) )
4482 gridmode = 1; // one dimensional array
4483 else
4484 {
4485 lua_pop( L, 1 ); // pop "1"
4486 lua_pop( L, 1 ); // pop "xg"
4487 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
4488 SWIG_fail;
4489 }
4490 lua_pop( L, 1 ); // pop test element
4491 if ( gridmode == 1 )
4492 {
4493 cgrid111.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
4494 if ( !cgrid111.xg )
4495 {
4496 lua_pop( L, 1 ); // pop "xg"
4497 SWIG_fail;
4498 }
4499 if ( nx != Xlen )
4500 {
4501 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
4502 SWIG_fail;
4503 }
4504 cgrid111.nx = nx;
4505 }
4506 else
4507 {
4508 cgrid211.xg = read_double_Matrix( L, -1, &nx, &ny );
4509 if ( !cgrid211.xg )
4510 {
4511 lua_pop( L, 1 ); // pop "xg"
4512 SWIG_fail;
4513 }
4514 if ( ( nx != Xlen ) || ( ny != Ylen ) )
4515 {
4516 lua_pop( L, 1 ); // pop "xg"
4517 lua_pushfstring( L, "Vectors must match matrix." );
4518 SWIG_fail;
4519 }
4520 cgrid211.nx = nx;
4521 cgrid211.ny = ny;
4522 }
4523 lua_pop( L, 1 ); // pop "xg"
4524
4525 lua_pushstring( L, "yg" );
4526 lua_gettable( L, 8 );
4527 if ( !lua_istable( L, -1 ) )
4528 {
4529 lua_pop( L, 1 );
4530 lua_pushstring( L, "expected a table yg" );
4531 SWIG_fail;
4532 }
4533 lua_rawgeti( L, -1, 1 );
4534 if ( gridmode == 2 )
4535 {
4536 if ( !lua_istable( L, -1 ) )
4537 {
4538 lua_pop( L, 1 ); // pop "1"
4539 lua_pop( L, 1 ); // pop "yg"
4540 lua_pushstring( L, "expected a two dimensional array/table in yg" );
4541 SWIG_fail;
4542 }
4543 }
4544 else
4545 {
4546 if ( !lua_isnumber( L, -1 ) )
4547 {
4548 lua_pop( L, 1 ); // pop "1"
4549 lua_pop( L, 1 ); // pop "yg"
4550 lua_pushstring( L, "expected a one dimensional array/table in yg" );
4551 SWIG_fail;
4552 }
4553 }
4554 lua_pop( L, 1 ); // pop "1"
4555 if ( gridmode == 1 )
4556 {
4557 cgrid111.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
4558 if ( !cgrid111.yg )
4559 {
4560 lua_pop( L, 1 ); // pop "yg"
4561 SWIG_fail;
4562 }
4563 if ( ny != Ylen )
4564 {
4565 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
4566 SWIG_fail;
4567 }
4568 cgrid111.ny = ny;
4569 }
4570 else
4571 {
4572 cgrid211.yg = read_double_Matrix( L, -1, &nx, &ny );
4573 if ( !cgrid211.yg )
4574 {
4575 lua_pop( L, 1 ); // pop "xg"
4576 SWIG_fail;
4577 }
4578 if ( ( nx != Xlen ) || ( ny != Ylen ) )
4579 {
4580 lua_pop( L, 1 ); // pop "xg"
4581 lua_pushfstring( L, "Vectors must match matrix." );
4582 SWIG_fail;
4583 }
4584 // cgrid211.nx/ny already set
4585 }
4586 lua_pop( L, 1 ); // pop "yg"
4587
4588 if ( gridmode == 1 )
4589 arg11 = &cgrid111;
4590 else if ( gridmode == 2 )
4591 arg11 = &cgrid211;
4592 }
4593 }
4594 plcont((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,(double const *)arg8,arg9,arg10,arg11);
4595
4596 {
4597 int i;
4598
4599 if ( arg1 )
4600 {
4601 for ( i = 0; i < ii1; i++ )
4602 LUA_FREE_ARRAY( arg1[i] );
4603 LUA_FREE_ARRAY( arg1 );
4604 }
4605 }
4606 {
4607 LUA_FREE_ARRAY( arg8 );
4608 }
4609 {
4610 mypltr_funcstr[0] = '\0';
4611 }
4612 {
4613 int i;
4614
4615 LUA_FREE_ARRAY( cgrid111.xg );
4616 LUA_FREE_ARRAY( cgrid111.yg );
4617
4618 if ( cgrid211.xg )
4619 {
4620 for ( i = 0; i < Xlen; i++ )
4621 LUA_FREE_ARRAY( cgrid211.xg[i] );
4622 LUA_FREE_ARRAY( cgrid211.xg );
4623 }
4624 if ( cgrid211.yg )
4625 {
4626 for ( i = 0; i < Xlen; i++ )
4627 LUA_FREE_ARRAY( cgrid211.yg[i] );
4628 LUA_FREE_ARRAY( cgrid211.yg );
4629 }
4630 }
4631 return SWIG_arg;
4632
4633 if(0) SWIG_fail;
4634
4635fail:
4636 {
4637 int i;
4638
4639 if ( arg1 )
4640 {
4641 for ( i = 0; i < ii1; i++ )
4642 LUA_FREE_ARRAY( arg1[i] );
4643 LUA_FREE_ARRAY( arg1 );
4644 }
4645 }
4646 {
4647 LUA_FREE_ARRAY( arg8 );
4648 }
4649 {
4650 mypltr_funcstr[0] = '\0';
4651 }
4652 {
4653 int i;
4654
4655 LUA_FREE_ARRAY( cgrid111.xg );
4656 LUA_FREE_ARRAY( cgrid111.yg );
4657
4658 if ( cgrid211.xg )
4659 {
4660 for ( i = 0; i < Xlen; i++ )
4661 LUA_FREE_ARRAY( cgrid211.xg[i] );
4662 LUA_FREE_ARRAY( cgrid211.xg );
4663 }
4664 if ( cgrid211.yg )
4665 {
4666 for ( i = 0; i < Xlen; i++ )
4667 LUA_FREE_ARRAY( cgrid211.yg[i] );
4668 LUA_FREE_ARRAY( cgrid211.yg );
4669 }
4670 }
4671 lua_error(L);
4672 return SWIG_arg;
4673}
4674
4675
4676static int _wrap_ctime(lua_State* L) {
4677 int SWIG_arg = 0;
4678 PLINT arg1 ;
4679 PLINT arg2 ;
4680 PLINT arg3 ;
4681 PLINT arg4 ;
4682 PLINT arg5 ;
4683 PLFLT arg6 ;
4684 PLFLT *arg7 = (PLFLT *) 0 ;
4685 PLFLT temp7 ;
4686
4687 arg7 = &temp7;
4688 SWIG_check_num_args("plctime",6,6)
4689 if(!lua_isnumber(L,1)) SWIG_fail_arg("plctime",1,"PLINT");
4690 if(!lua_isnumber(L,2)) SWIG_fail_arg("plctime",2,"PLINT");
4691 if(!lua_isnumber(L,3)) SWIG_fail_arg("plctime",3,"PLINT");
4692 if(!lua_isnumber(L,4)) SWIG_fail_arg("plctime",4,"PLINT");
4693 if(!lua_isnumber(L,5)) SWIG_fail_arg("plctime",5,"PLINT");
4694 if(!lua_isnumber(L,6)) SWIG_fail_arg("plctime",6,"PLFLT");
4695 arg1 = (PLINT)lua_tonumber(L, 1);
4696 arg2 = (PLINT)lua_tonumber(L, 2);
4697 arg3 = (PLINT)lua_tonumber(L, 3);
4698 arg4 = (PLINT)lua_tonumber(L, 4);
4699 arg5 = (PLINT)lua_tonumber(L, 5);
4700 arg6 = (PLFLT)lua_tonumber(L, 6);
4701 plctime(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
4702
4703 lua_pushnumber(L, (lua_Number) *arg7); SWIG_arg++;
4704 return SWIG_arg;
4705
4706 if(0) SWIG_fail;
4707
4708fail:
4709 lua_error(L);
4710 return SWIG_arg;
4711}
4712
4713
4714static int _wrap_cpstrm(lua_State* L) {
4715 int SWIG_arg = 0;
4716 PLINT arg1 ;
4717 PLBOOL arg2 ;
4718
4719 SWIG_check_num_args("plcpstrm",2,2)
4720 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcpstrm",1,"PLINT");
4721 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcpstrm",2,"PLBOOL");
4722 arg1 = (PLINT)lua_tonumber(L, 1);
4723 arg2 = (PLBOOL)lua_tonumber(L, 2);
4724 plcpstrm(arg1,arg2);
4725
4726 return SWIG_arg;
4727
4728 if(0) SWIG_fail;
4729
4730fail:
4731 lua_error(L);
4732 return SWIG_arg;
4733}
4734
4735
4736static int _wrap_plend(lua_State* L) {
4737 int SWIG_arg = 0;
4738
4739 SWIG_check_num_args("plend",0,0)
4740 plend();
4741
4742 return SWIG_arg;
4743
4744 if(0) SWIG_fail;
4745
4746fail:
4747 lua_error(L);
4748 return SWIG_arg;
4749}
4750
4751
4752static int _wrap_plend1(lua_State* L) {
4753 int SWIG_arg = 0;
4754
4755 SWIG_check_num_args("plend1",0,0)
4756 plend1();
4757
4758 return SWIG_arg;
4759
4760 if(0) SWIG_fail;
4761
4762fail:
4763 lua_error(L);
4764 return SWIG_arg;
4765}
4766
4767
4768static int _wrap_env(lua_State* L) {
4769 int SWIG_arg = 0;
4770 PLFLT arg1 ;
4771 PLFLT arg2 ;
4772 PLFLT arg3 ;
4773 PLFLT arg4 ;
4774 PLINT arg5 ;
4775 PLINT arg6 ;
4776
4777 SWIG_check_num_args("plenv",6,6)
4778 if(!lua_isnumber(L,1)) SWIG_fail_arg("plenv",1,"PLFLT");
4779 if(!lua_isnumber(L,2)) SWIG_fail_arg("plenv",2,"PLFLT");
4780 if(!lua_isnumber(L,3)) SWIG_fail_arg("plenv",3,"PLFLT");
4781 if(!lua_isnumber(L,4)) SWIG_fail_arg("plenv",4,"PLFLT");
4782 if(!lua_isnumber(L,5)) SWIG_fail_arg("plenv",5,"PLINT");
4783 if(!lua_isnumber(L,6)) SWIG_fail_arg("plenv",6,"PLINT");
4784 arg1 = (PLFLT)lua_tonumber(L, 1);
4785 arg2 = (PLFLT)lua_tonumber(L, 2);
4786 arg3 = (PLFLT)lua_tonumber(L, 3);
4787 arg4 = (PLFLT)lua_tonumber(L, 4);
4788 arg5 = (PLINT)lua_tonumber(L, 5);
4789 arg6 = (PLINT)lua_tonumber(L, 6);
4790 plenv(arg1,arg2,arg3,arg4,arg5,arg6);
4791
4792 return SWIG_arg;
4793
4794 if(0) SWIG_fail;
4795
4796fail:
4797 lua_error(L);
4798 return SWIG_arg;
4799}
4800
4801
4802static int _wrap_env0(lua_State* L) {
4803 int SWIG_arg = 0;
4804 PLFLT arg1 ;
4805 PLFLT arg2 ;
4806 PLFLT arg3 ;
4807 PLFLT arg4 ;
4808 PLINT arg5 ;
4809 PLINT arg6 ;
4810
4811 SWIG_check_num_args("plenv0",6,6)
4812 if(!lua_isnumber(L,1)) SWIG_fail_arg("plenv0",1,"PLFLT");
4813 if(!lua_isnumber(L,2)) SWIG_fail_arg("plenv0",2,"PLFLT");
4814 if(!lua_isnumber(L,3)) SWIG_fail_arg("plenv0",3,"PLFLT");
4815 if(!lua_isnumber(L,4)) SWIG_fail_arg("plenv0",4,"PLFLT");
4816 if(!lua_isnumber(L,5)) SWIG_fail_arg("plenv0",5,"PLINT");
4817 if(!lua_isnumber(L,6)) SWIG_fail_arg("plenv0",6,"PLINT");
4818 arg1 = (PLFLT)lua_tonumber(L, 1);
4819 arg2 = (PLFLT)lua_tonumber(L, 2);
4820 arg3 = (PLFLT)lua_tonumber(L, 3);
4821 arg4 = (PLFLT)lua_tonumber(L, 4);
4822 arg5 = (PLINT)lua_tonumber(L, 5);
4823 arg6 = (PLINT)lua_tonumber(L, 6);
4824 plenv0(arg1,arg2,arg3,arg4,arg5,arg6);
4825
4826 return SWIG_arg;
4827
4828 if(0) SWIG_fail;
4829
4830fail:
4831 lua_error(L);
4832 return SWIG_arg;
4833}
4834
4835
4836static int _wrap_eop(lua_State* L) {
4837 int SWIG_arg = 0;
4838
4839 SWIG_check_num_args("pleop",0,0)
4840 pleop();
4841
4842 return SWIG_arg;
4843
4844 if(0) SWIG_fail;
4845
4846fail:
4847 lua_error(L);
4848 return SWIG_arg;
4849}
4850
4851
4852static int _wrap_errx(lua_State* L) {
4853 int SWIG_arg = 0;
4854 PLINT arg1 ;
4855 PLFLT *arg2 = (PLFLT *) 0 ;
4856 PLFLT *arg3 = (PLFLT *) 0 ;
4857 PLFLT *arg4 = (PLFLT *) 0 ;
4858 int temp3 ;
4859 int temp4 ;
4860
4861 SWIG_check_num_args("plerrx",3,3)
4862 {
4863 int temp;
4864 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4865 if ( !arg2 )
4866 SWIG_fail;
4867 arg1 = Alen = temp;
4868 }
4869 {
4870 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4871 if ( !arg3 )
4872 SWIG_fail;
4873 if ( temp3 != Alen )
4874 {
4875 lua_pushfstring( L, "Tables must be of same length." );
4876 SWIG_fail;
4877 }
4878 }
4879 {
4880 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
4881 if ( !arg4 )
4882 SWIG_fail;
4883 if ( temp4 != Alen )
4884 {
4885 lua_pushfstring( L, "Tables must be of same length." );
4886 SWIG_fail;
4887 }
4888 }
4889 plerrx(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
4890
4891 {
4892 LUA_FREE_ARRAY( arg2 );
4893 }
4894 {
4895 LUA_FREE_ARRAY( arg3 );
4896 }
4897 {
4898 LUA_FREE_ARRAY( arg4 );
4899 }
4900 return SWIG_arg;
4901
4902 if(0) SWIG_fail;
4903
4904fail:
4905 {
4906 LUA_FREE_ARRAY( arg2 );
4907 }
4908 {
4909 LUA_FREE_ARRAY( arg3 );
4910 }
4911 {
4912 LUA_FREE_ARRAY( arg4 );
4913 }
4914 lua_error(L);
4915 return SWIG_arg;
4916}
4917
4918
4919static int _wrap_erry(lua_State* L) {
4920 int SWIG_arg = 0;
4921 PLINT arg1 ;
4922 PLFLT *arg2 = (PLFLT *) 0 ;
4923 PLFLT *arg3 = (PLFLT *) 0 ;
4924 PLFLT *arg4 = (PLFLT *) 0 ;
4925 int temp3 ;
4926 int temp4 ;
4927
4928 SWIG_check_num_args("plerry",3,3)
4929 {
4930 int temp;
4931 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4932 if ( !arg2 )
4933 SWIG_fail;
4934 arg1 = Alen = temp;
4935 }
4936 {
4937 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4938 if ( !arg3 )
4939 SWIG_fail;
4940 if ( temp3 != Alen )
4941 {
4942 lua_pushfstring( L, "Tables must be of same length." );
4943 SWIG_fail;
4944 }
4945 }
4946 {
4947 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
4948 if ( !arg4 )
4949 SWIG_fail;
4950 if ( temp4 != Alen )
4951 {
4952 lua_pushfstring( L, "Tables must be of same length." );
4953 SWIG_fail;
4954 }
4955 }
4956 plerry(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
4957
4958 {
4959 LUA_FREE_ARRAY( arg2 );
4960 }
4961 {
4962 LUA_FREE_ARRAY( arg3 );
4963 }
4964 {
4965 LUA_FREE_ARRAY( arg4 );
4966 }
4967 return SWIG_arg;
4968
4969 if(0) SWIG_fail;
4970
4971fail:
4972 {
4973 LUA_FREE_ARRAY( arg2 );
4974 }
4975 {
4976 LUA_FREE_ARRAY( arg3 );
4977 }
4978 {
4979 LUA_FREE_ARRAY( arg4 );
4980 }
4981 lua_error(L);
4982 return SWIG_arg;
4983}
4984
4985
4986static int _wrap_famadv(lua_State* L) {
4987 int SWIG_arg = 0;
4988
4989 SWIG_check_num_args("plfamadv",0,0)
4990 plfamadv();
4991
4992 return SWIG_arg;
4993
4994 if(0) SWIG_fail;
4995
4996fail:
4997 lua_error(L);
4998 return SWIG_arg;
4999}
5000
5001
5002static int _wrap_fill(lua_State* L) {
5003 int SWIG_arg = 0;
5004 PLINT arg1 ;
5005 PLFLT *arg2 = (PLFLT *) 0 ;
5006 PLFLT *arg3 = (PLFLT *) 0 ;
5007 int temp3 ;
5008
5009 SWIG_check_num_args("plfill",2,2)
5010 {
5011 int temp;
5012 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5013 if ( !arg2 )
5014 SWIG_fail;
5015 arg1 = Alen = temp;
5016 }
5017 {
5018 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
5019 if ( !arg3 )
5020 SWIG_fail;
5021 if ( temp3 != Alen )
5022 {
5023 lua_pushfstring( L, "Tables must be of same length." );
5024 SWIG_fail;
5025 }
5026 }
5027 plfill(arg1,(double const *)arg2,(double const *)arg3);
5028
5029 {
5030 LUA_FREE_ARRAY( arg2 );
5031 }
5032 {
5033 LUA_FREE_ARRAY( arg3 );
5034 }
5035 return SWIG_arg;
5036
5037 if(0) SWIG_fail;
5038
5039fail:
5040 {
5041 LUA_FREE_ARRAY( arg2 );
5042 }
5043 {
5044 LUA_FREE_ARRAY( arg3 );
5045 }
5046 lua_error(L);
5047 return SWIG_arg;
5048}
5049
5050
5051static int _wrap_fill3(lua_State* L) {
5052 int SWIG_arg = 0;
5053 PLINT arg1 ;
5054 PLFLT *arg2 = (PLFLT *) 0 ;
5055 PLFLT *arg3 = (PLFLT *) 0 ;
5056 PLFLT *arg4 = (PLFLT *) 0 ;
5057 int temp3 ;
5058 int temp4 ;
5059
5060 SWIG_check_num_args("plfill3",3,3)
5061 {
5062 int temp;
5063 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5064 if ( !arg2 )
5065 SWIG_fail;
5066 arg1 = Alen = temp;
5067 }
5068 {
5069 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
5070 if ( !arg3 )
5071 SWIG_fail;
5072 if ( temp3 != Alen )
5073 {
5074 lua_pushfstring( L, "Tables must be of same length." );
5075 SWIG_fail;
5076 }
5077 }
5078 {
5079 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
5080 if ( !arg4 )
5081 SWIG_fail;
5082 if ( temp4 != Alen )
5083 {
5084 lua_pushfstring( L, "Tables must be of same length." );
5085 SWIG_fail;
5086 }
5087 }
5088 plfill3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
5089
5090 {
5091 LUA_FREE_ARRAY( arg2 );
5092 }
5093 {
5094 LUA_FREE_ARRAY( arg3 );
5095 }
5096 {
5097 LUA_FREE_ARRAY( arg4 );
5098 }
5099 return SWIG_arg;
5100
5101 if(0) SWIG_fail;
5102
5103fail:
5104 {
5105 LUA_FREE_ARRAY( arg2 );
5106 }
5107 {
5108 LUA_FREE_ARRAY( arg3 );
5109 }
5110 {
5111 LUA_FREE_ARRAY( arg4 );
5112 }
5113 lua_error(L);
5114 return SWIG_arg;
5115}
5116
5117
5118static int _wrap_gradient(lua_State* L) {
5119 int SWIG_arg = 0;
5120 PLINT arg1 ;
5121 PLFLT *arg2 = (PLFLT *) 0 ;
5122 PLFLT *arg3 = (PLFLT *) 0 ;
5123 PLFLT arg4 ;
5124 int temp3 ;
5125
5126 SWIG_check_num_args("plgradient",3,3)
5127 if(!lua_isnumber(L,3)) SWIG_fail_arg("plgradient",3,"PLFLT");
5128 {
5129 int temp;
5130 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5131 if ( !arg2 )
5132 SWIG_fail;
5133 arg1 = Alen = temp;
5134 }
5135 {
5136 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
5137 if ( !arg3 )
5138 SWIG_fail;
5139 if ( temp3 != Alen )
5140 {
5141 lua_pushfstring( L, "Tables must be of same length." );
5142 SWIG_fail;
5143 }
5144 }
5145 arg4 = (PLFLT)lua_tonumber(L, 3);
5146 plgradient(arg1,(double const *)arg2,(double const *)arg3,arg4);
5147
5148 {
5149 LUA_FREE_ARRAY( arg2 );
5150 }
5151 {
5152 LUA_FREE_ARRAY( arg3 );
5153 }
5154 return SWIG_arg;
5155
5156 if(0) SWIG_fail;
5157
5158fail:
5159 {
5160 LUA_FREE_ARRAY( arg2 );
5161 }
5162 {
5163 LUA_FREE_ARRAY( arg3 );
5164 }
5165 lua_error(L);
5166 return SWIG_arg;
5167}
5168
5169
5170static int _wrap_flush(lua_State* L) {
5171 int SWIG_arg = 0;
5172
5173 SWIG_check_num_args("plflush",0,0)
5174 plflush();
5175
5176 return SWIG_arg;
5177
5178 if(0) SWIG_fail;
5179
5180fail:
5181 lua_error(L);
5182 return SWIG_arg;
5183}
5184
5185
5186static int _wrap_font(lua_State* L) {
5187 int SWIG_arg = 0;
5188 PLINT arg1 ;
5189
5190 SWIG_check_num_args("plfont",1,1)
5191 if(!lua_isnumber(L,1)) SWIG_fail_arg("plfont",1,"PLINT");
5192 arg1 = (PLINT)lua_tonumber(L, 1);
5193 plfont(arg1);
5194
5195 return SWIG_arg;
5196
5197 if(0) SWIG_fail;
5198
5199fail:
5200 lua_error(L);
5201 return SWIG_arg;
5202}
5203
5204
5205static int _wrap_fontld(lua_State* L) {
5206 int SWIG_arg = 0;
5207 PLINT arg1 ;
5208
5209 SWIG_check_num_args("plfontld",1,1)
5210 if(!lua_isnumber(L,1)) SWIG_fail_arg("plfontld",1,"PLINT");
5211 arg1 = (PLINT)lua_tonumber(L, 1);
5212 plfontld(arg1);
5213
5214 return SWIG_arg;
5215
5216 if(0) SWIG_fail;
5217
5218fail:
5219 lua_error(L);
5220 return SWIG_arg;
5221}
5222
5223
5224static int _wrap_gchr(lua_State* L) {
5225 int SWIG_arg = 0;
5226 PLFLT *arg1 = (PLFLT *) 0 ;
5227 PLFLT *arg2 = (PLFLT *) 0 ;
5228 PLFLT temp1 ;
5229 PLFLT temp2 ;
5230
5231 arg1 = &temp1;
5232 arg2 = &temp2;
5233 SWIG_check_num_args("plgchr",0,0)
5234 plgchr(arg1,arg2);
5235
5236 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5237 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5238 return SWIG_arg;
5239
5240 if(0) SWIG_fail;
5241
5242fail:
5243 lua_error(L);
5244 return SWIG_arg;
5245}
5246
5247
5248static int _wrap_gcol0(lua_State* L) {
5249 int SWIG_arg = 0;
5250 PLINT arg1 ;
5251 PLINT *arg2 = (PLINT *) 0 ;
5252 PLINT *arg3 = (PLINT *) 0 ;
5253 PLINT *arg4 = (PLINT *) 0 ;
5254 PLINT temp2 ;
5255 PLINT temp3 ;
5256 PLINT temp4 ;
5257
5258 arg2 = &temp2;
5259 arg3 = &temp3;
5260 arg4 = &temp4;
5261 SWIG_check_num_args("plgcol0",1,1)
5262 if(!lua_isnumber(L,1)) SWIG_fail_arg("plgcol0",1,"PLINT");
5263 arg1 = (PLINT)lua_tonumber(L, 1);
5264 plgcol0(arg1,arg2,arg3,arg4);
5265
5266 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5267 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5268 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5269 return SWIG_arg;
5270
5271 if(0) SWIG_fail;
5272
5273fail:
5274 lua_error(L);
5275 return SWIG_arg;
5276}
5277
5278
5279static int _wrap_gcol0a(lua_State* L) {
5280 int SWIG_arg = 0;
5281 PLINT arg1 ;
5282 PLINT *arg2 = (PLINT *) 0 ;
5283 PLINT *arg3 = (PLINT *) 0 ;
5284 PLINT *arg4 = (PLINT *) 0 ;
5285 PLFLT *arg5 = (PLFLT *) 0 ;
5286 PLINT temp2 ;
5287 PLINT temp3 ;
5288 PLINT temp4 ;
5289 PLFLT temp5 ;
5290
5291 arg2 = &temp2;
5292 arg3 = &temp3;
5293 arg4 = &temp4;
5294 arg5 = &temp5;
5295 SWIG_check_num_args("plgcol0a",1,1)
5296 if(!lua_isnumber(L,1)) SWIG_fail_arg("plgcol0a",1,"PLINT");
5297 arg1 = (PLINT)lua_tonumber(L, 1);
5298 plgcol0a(arg1,arg2,arg3,arg4,arg5);
5299
5300 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5301 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5302 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5303 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
5304 return SWIG_arg;
5305
5306 if(0) SWIG_fail;
5307
5308fail:
5309 lua_error(L);
5310 return SWIG_arg;
5311}
5312
5313
5314static int _wrap_gcolbg(lua_State* L) {
5315 int SWIG_arg = 0;
5316 PLINT *arg1 = (PLINT *) 0 ;
5317 PLINT *arg2 = (PLINT *) 0 ;
5318 PLINT *arg3 = (PLINT *) 0 ;
5319 PLINT temp1 ;
5320 PLINT temp2 ;
5321 PLINT temp3 ;
5322
5323 arg1 = &temp1;
5324 arg2 = &temp2;
5325 arg3 = &temp3;
5326 SWIG_check_num_args("plgcolbg",0,0)
5327 plgcolbg(arg1,arg2,arg3);
5328
5329 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5330 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5331 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5332 return SWIG_arg;
5333
5334 if(0) SWIG_fail;
5335
5336fail:
5337 lua_error(L);
5338 return SWIG_arg;
5339}
5340
5341
5342static int _wrap_gcolbga(lua_State* L) {
5343 int SWIG_arg = 0;
5344 PLINT *arg1 = (PLINT *) 0 ;
5345 PLINT *arg2 = (PLINT *) 0 ;
5346 PLINT *arg3 = (PLINT *) 0 ;
5347 PLFLT *arg4 = (PLFLT *) 0 ;
5348 PLINT temp1 ;
5349 PLINT temp2 ;
5350 PLINT temp3 ;
5351 PLFLT temp4 ;
5352
5353 arg1 = &temp1;
5354 arg2 = &temp2;
5355 arg3 = &temp3;
5356 arg4 = &temp4;
5357 SWIG_check_num_args("plgcolbga",0,0)
5358 plgcolbga(arg1,arg2,arg3,arg4);
5359
5360 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5361 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5362 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5363 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5364 return SWIG_arg;
5365
5366 if(0) SWIG_fail;
5367
5368fail:
5369 lua_error(L);
5370 return SWIG_arg;
5371}
5372
5373
5374static int _wrap_gcompression(lua_State* L) {
5375 int SWIG_arg = 0;
5376 PLINT *arg1 = (PLINT *) 0 ;
5377 PLINT temp1 ;
5378
5379 arg1 = &temp1;
5380 SWIG_check_num_args("plgcompression",0,0)
5381 plgcompression(arg1);
5382
5383 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5384 return SWIG_arg;
5385
5386 if(0) SWIG_fail;
5387
5388fail:
5389 lua_error(L);
5390 return SWIG_arg;
5391}
5392
5393
5394static int _wrap_gdev(lua_State* L) {
5395 int SWIG_arg = 0;
5396 char *arg1 = (char *) 0 ;
5397 char buff1[1000] ;
5398
5399 {
5400 arg1 = buff1;
5401 }
5402 SWIG_check_num_args("plgdev",0,0)
5403 plgdev(arg1);
5404
5405 {
5406 lua_pushstring( L, arg1 );
5407 SWIG_arg++;
5408 }
5409 return SWIG_arg;
5410
5411 if(0) SWIG_fail;
5412
5413fail:
5414 lua_error(L);
5415 return SWIG_arg;
5416}
5417
5418
5419static int _wrap_gdidev(lua_State* L) {
5420 int SWIG_arg = 0;
5421 PLFLT *arg1 = (PLFLT *) 0 ;
5422 PLFLT *arg2 = (PLFLT *) 0 ;
5423 PLFLT *arg3 = (PLFLT *) 0 ;
5424 PLFLT *arg4 = (PLFLT *) 0 ;
5425 PLFLT temp1 ;
5426 PLFLT temp2 ;
5427 PLFLT temp3 ;
5428 PLFLT temp4 ;
5429
5430 arg1 = &temp1;
5431 arg2 = &temp2;
5432 arg3 = &temp3;
5433 arg4 = &temp4;
5434 SWIG_check_num_args("plgdidev",0,0)
5435 plgdidev(arg1,arg2,arg3,arg4);
5436
5437 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5438 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5439 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5440 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5441 return SWIG_arg;
5442
5443 if(0) SWIG_fail;
5444
5445fail:
5446 lua_error(L);
5447 return SWIG_arg;
5448}
5449
5450
5451static int _wrap_gdiori(lua_State* L) {
5452 int SWIG_arg = 0;
5453 PLFLT *arg1 = (PLFLT *) 0 ;
5454 PLFLT temp1 ;
5455
5456 arg1 = &temp1;
5457 SWIG_check_num_args("plgdiori",0,0)
5458 plgdiori(arg1);
5459
5460 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5461 return SWIG_arg;
5462
5463 if(0) SWIG_fail;
5464
5465fail:
5466 lua_error(L);
5467 return SWIG_arg;
5468}
5469
5470
5471static int _wrap_gdiplt(lua_State* L) {
5472 int SWIG_arg = 0;
5473 PLFLT *arg1 = (PLFLT *) 0 ;
5474 PLFLT *arg2 = (PLFLT *) 0 ;
5475 PLFLT *arg3 = (PLFLT *) 0 ;
5476 PLFLT *arg4 = (PLFLT *) 0 ;
5477 PLFLT temp1 ;
5478 PLFLT temp2 ;
5479 PLFLT temp3 ;
5480 PLFLT temp4 ;
5481
5482 arg1 = &temp1;
5483 arg2 = &temp2;
5484 arg3 = &temp3;
5485 arg4 = &temp4;
5486 SWIG_check_num_args("plgdiplt",0,0)
5487 plgdiplt(arg1,arg2,arg3,arg4);
5488
5489 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5490 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5491 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5492 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5493 return SWIG_arg;
5494
5495 if(0) SWIG_fail;
5496
5497fail:
5498 lua_error(L);
5499 return SWIG_arg;
5500}
5501
5502
5503static int _wrap_gfam(lua_State* L) {
5504 int SWIG_arg = 0;
5505 PLINT *arg1 = (PLINT *) 0 ;
5506 PLINT *arg2 = (PLINT *) 0 ;
5507 PLINT *arg3 = (PLINT *) 0 ;
5508 PLINT temp1 ;
5509 PLINT temp2 ;
5510 PLINT temp3 ;
5511
5512 arg1 = &temp1;
5513 arg2 = &temp2;
5514 arg3 = &temp3;
5515 SWIG_check_num_args("plgfam",0,0)
5516 plgfam(arg1,arg2,arg3);
5517
5518 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5519 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5520 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5521 return SWIG_arg;
5522
5523 if(0) SWIG_fail;
5524
5525fail:
5526 lua_error(L);
5527 return SWIG_arg;
5528}
5529
5530
5531static int _wrap_gfci(lua_State* L) {
5532 int SWIG_arg = 0;
5533 PLUNICODE *arg1 = (PLUNICODE *) 0 ;
5534 PLUNICODE temp1 ;
5535
5536 arg1 = &temp1;
5537 SWIG_check_num_args("plgfci",0,0)
5538 plgfci(arg1);
5539
5540 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5541 return SWIG_arg;
5542
5543 if(0) SWIG_fail;
5544
5545fail:
5546 lua_error(L);
5547 return SWIG_arg;
5548}
5549
5550
5551static int _wrap_gfnam(lua_State* L) {
5552 int SWIG_arg = 0;
5553 char *arg1 = (char *) 0 ;
5554 char buff1[1000] ;
5555
5556 {
5557 arg1 = buff1;
5558 }
5559 SWIG_check_num_args("plgfnam",0,0)
5560 plgfnam(arg1);
5561
5562 {
5563 lua_pushstring( L, arg1 );
5564 SWIG_arg++;
5565 }
5566 return SWIG_arg;
5567
5568 if(0) SWIG_fail;
5569
5570fail:
5571 lua_error(L);
5572 return SWIG_arg;
5573}
5574
5575
5576static int _wrap_gfont(lua_State* L) {
5577 int SWIG_arg = 0;
5578 PLINT *arg1 = (PLINT *) 0 ;
5579 PLINT *arg2 = (PLINT *) 0 ;
5580 PLINT *arg3 = (PLINT *) 0 ;
5581 PLINT temp1 ;
5582 PLINT temp2 ;
5583 PLINT temp3 ;
5584
5585 arg1 = &temp1;
5586 arg2 = &temp2;
5587 arg3 = &temp3;
5588 SWIG_check_num_args("plgfont",0,0)
5589 plgfont(arg1,arg2,arg3);
5590
5591 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5592 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5593 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5594 return SWIG_arg;
5595
5596 if(0) SWIG_fail;
5597
5598fail:
5599 lua_error(L);
5600 return SWIG_arg;
5601}
5602
5603
5604static int _wrap_glevel(lua_State* L) {
5605 int SWIG_arg = 0;
5606 PLINT *arg1 = (PLINT *) 0 ;
5607 PLINT temp1 ;
5608
5609 arg1 = &temp1;
5610 SWIG_check_num_args("plglevel",0,0)
5611 plglevel(arg1);
5612
5613 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5614 return SWIG_arg;
5615
5616 if(0) SWIG_fail;
5617
5618fail:
5619 lua_error(L);
5620 return SWIG_arg;
5621}
5622
5623
5624static int _wrap_gpage(lua_State* L) {
5625 int SWIG_arg = 0;
5626 PLFLT *arg1 = (PLFLT *) 0 ;
5627 PLFLT *arg2 = (PLFLT *) 0 ;
5628 PLINT *arg3 = (PLINT *) 0 ;
5629 PLINT *arg4 = (PLINT *) 0 ;
5630 PLINT *arg5 = (PLINT *) 0 ;
5631 PLINT *arg6 = (PLINT *) 0 ;
5632 PLFLT temp1 ;
5633 PLFLT temp2 ;
5634 PLINT temp3 ;
5635 PLINT temp4 ;
5636 PLINT temp5 ;
5637 PLINT temp6 ;
5638
5639 arg1 = &temp1;
5640 arg2 = &temp2;
5641 arg3 = &temp3;
5642 arg4 = &temp4;
5643 arg5 = &temp5;
5644 arg6 = &temp6;
5645 SWIG_check_num_args("plgpage",0,0)
5646 plgpage(arg1,arg2,arg3,arg4,arg5,arg6);
5647
5648 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5649 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5650 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5651 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5652 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
5653 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
5654 return SWIG_arg;
5655
5656 if(0) SWIG_fail;
5657
5658fail:
5659 lua_error(L);
5660 return SWIG_arg;
5661}
5662
5663
5664static int _wrap_gra(lua_State* L) {
5665 int SWIG_arg = 0;
5666
5667 SWIG_check_num_args("plgra",0,0)
5668 plgra();
5669
5670 return SWIG_arg;
5671
5672 if(0) SWIG_fail;
5673
5674fail:
5675 lua_error(L);
5676 return SWIG_arg;
5677}
5678
5679
5680static int _wrap_griddata(lua_State* L) {
5681 int SWIG_arg = 0;
5682 PLFLT *arg1 = (PLFLT *) 0 ;
5683 PLFLT *arg2 = (PLFLT *) 0 ;
5684 PLFLT *arg3 = (PLFLT *) 0 ;
5685 PLINT arg4 ;
5686 PLFLT *arg5 = (PLFLT *) 0 ;
5687 PLINT arg6 ;
5688 PLFLT *arg7 = (PLFLT *) 0 ;
5689 PLINT arg8 ;
5690 PLFLT **arg9 = (PLFLT **) 0 ;
5691 PLINT arg10 ;
5692 PLFLT arg11 ;
5693 int temp2 ;
5694
5695 SWIG_check_num_args("plgriddata",7,7)
5696 if(!lua_isnumber(L,6)) SWIG_fail_arg("plgriddata",6,"PLINT");
5697 if(!lua_isnumber(L,7)) SWIG_fail_arg("plgriddata",7,"PLFLT");
5698 {
5699 int temp;
5700 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5701 if ( !arg1 )
5702 SWIG_fail;
5703 Alen = temp;
5704 }
5705 {
5706 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp2 );
5707 if ( !arg2 )
5708 SWIG_fail;
5709 if ( temp2 != Alen )
5710 {
5711 lua_pushfstring( L, "Tables must be of same length." );
5712 SWIG_fail;
5713 }
5714 }
5715 {
5716 int temp;
5717 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp );
5718 if ( !arg3 )
5719 SWIG_fail;
5720 if ( temp != Alen )
5721 {
5722 lua_pushfstring( L, "Tables must be of same length." );
5723 SWIG_fail;
5724 }
5725 arg4 = temp;
5726 }
5727 {
5728 int temp;
5729 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
5730 if ( !arg5 )
5731 SWIG_fail;
5732 arg6 = Xlen = temp;
5733 }
5734 {
5735 int temp, i;
5736
5737 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
5738 if ( !arg7 )
5739 SWIG_fail;
5740 arg8 = Ylen = temp;
5741
5742 arg9 = LUA_ALLOC_ARRAY( PLFLT *, Xlen );
5743 if ( !arg9 )
5744 SWIG_fail;
5745 for ( i = 0; i < Xlen; i++ )
5746 arg9[i] = NULL;
5747
5748 for ( i = 0; i < Xlen; i++ )
5749 {
5750 arg9[i] = LUA_ALLOC_ARRAY( PLFLT, Ylen );
5751 if ( !arg9[i] )
5752 SWIG_fail;
5753 }
5754 }
5755 arg10 = (PLINT)lua_tonumber(L, 6);
5756 arg11 = (PLFLT)lua_tonumber(L, 7);
5757 plgriddata((double const *)arg1,(double const *)arg2,(double const *)arg3,arg4,(double const *)arg5,arg6,(double const *)arg7,arg8,arg9,arg10,arg11);
5758
5759 {
5760 int i;
5761
5762 if ( arg9 )
5763 {
5764 lua_newtable( L );
5765 for ( i = 0; i < Xlen; i++ )
5766 {
5767 SWIG_write_double_num_array( L, arg9[i], Ylen );
5768 lua_rawseti( L, -2, i + 1 ); // -1 is the inner table, -2 is the outer table
5769 }
5770 SWIG_arg++;
5771 }
5772 }
5773 {
5774 LUA_FREE_ARRAY( arg1 );
5775 }
5776 {
5777 LUA_FREE_ARRAY( arg2 );
5778 }
5779 {
5780 LUA_FREE_ARRAY( arg3 );
5781 }
5782 {
5783 LUA_FREE_ARRAY( arg5 );
5784 }
5785 {
5786 int i;
5787
5788 LUA_FREE_ARRAY( arg7 );
5789
5790 if ( arg9 )
5791 {
5792 for ( i = 0; i < Xlen; i++ )
5793 LUA_FREE_ARRAY( arg9[i] );
5794 LUA_FREE_ARRAY( arg9 );
5795 }
5796 }
5797 return SWIG_arg;
5798
5799 if(0) SWIG_fail;
5800
5801fail:
5802 {
5803 LUA_FREE_ARRAY( arg1 );
5804 }
5805 {
5806 LUA_FREE_ARRAY( arg2 );
5807 }
5808 {
5809 LUA_FREE_ARRAY( arg3 );
5810 }
5811 {
5812 LUA_FREE_ARRAY( arg5 );
5813 }
5814 {
5815 int i;
5816
5817 LUA_FREE_ARRAY( arg7 );
5818
5819 if ( arg9 )
5820 {
5821 for ( i = 0; i < Xlen; i++ )
5822 LUA_FREE_ARRAY( arg9[i] );
5823 LUA_FREE_ARRAY( arg9 );
5824 }
5825 }
5826 lua_error(L);
5827 return SWIG_arg;
5828}
5829
5830
5831static int _wrap_gspa(lua_State* L) {
5832 int SWIG_arg = 0;
5833 PLFLT *arg1 = (PLFLT *) 0 ;
5834 PLFLT *arg2 = (PLFLT *) 0 ;
5835 PLFLT *arg3 = (PLFLT *) 0 ;
5836 PLFLT *arg4 = (PLFLT *) 0 ;
5837 PLFLT temp1 ;
5838 PLFLT temp2 ;
5839 PLFLT temp3 ;
5840 PLFLT temp4 ;
5841
5842 arg1 = &temp1;
5843 arg2 = &temp2;
5844 arg3 = &temp3;
5845 arg4 = &temp4;
5846 SWIG_check_num_args("plgspa",0,0)
5847 plgspa(arg1,arg2,arg3,arg4);
5848
5849 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5850 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5851 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5852 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5853 return SWIG_arg;
5854
5855 if(0) SWIG_fail;
5856
5857fail:
5858 lua_error(L);
5859 return SWIG_arg;
5860}
5861
5862
5863static int _wrap_gstrm(lua_State* L) {
5864 int SWIG_arg = 0;
5865 PLINT *arg1 = (PLINT *) 0 ;
5866 PLINT temp1 ;
5867
5868 arg1 = &temp1;
5869 SWIG_check_num_args("plgstrm",0,0)
5870 plgstrm(arg1);
5871
5872 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5873 return SWIG_arg;
5874
5875 if(0) SWIG_fail;
5876
5877fail:
5878 lua_error(L);
5879 return SWIG_arg;
5880}
5881
5882
5883static int _wrap_gver(lua_State* L) {
5884 int SWIG_arg = 0;
5885 char *arg1 = (char *) 0 ;
5886 char buff1[1000] ;
5887
5888 {
5889 arg1 = buff1;
5890 }
5891 SWIG_check_num_args("plgver",0,0)
5892 plgver(arg1);
5893
5894 {
5895 lua_pushstring( L, arg1 );
5896 SWIG_arg++;
5897 }
5898 return SWIG_arg;
5899
5900 if(0) SWIG_fail;
5901
5902fail:
5903 lua_error(L);
5904 return SWIG_arg;
5905}
5906
5907
5908static int _wrap_gvpd(lua_State* L) {
5909 int SWIG_arg = 0;
5910 PLFLT *arg1 = (PLFLT *) 0 ;
5911 PLFLT *arg2 = (PLFLT *) 0 ;
5912 PLFLT *arg3 = (PLFLT *) 0 ;
5913 PLFLT *arg4 = (PLFLT *) 0 ;
5914 PLFLT temp1 ;
5915 PLFLT temp2 ;
5916 PLFLT temp3 ;
5917 PLFLT temp4 ;
5918
5919 arg1 = &temp1;
5920 arg2 = &temp2;
5921 arg3 = &temp3;
5922 arg4 = &temp4;
5923 SWIG_check_num_args("plgvpd",0,0)
5924 plgvpd(arg1,arg2,arg3,arg4);
5925
5926 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5927 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5928 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5929 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5930 return SWIG_arg;
5931
5932 if(0) SWIG_fail;
5933
5934fail:
5935 lua_error(L);
5936 return SWIG_arg;
5937}
5938
5939
5940static int _wrap_gvpw(lua_State* L) {
5941 int SWIG_arg = 0;
5942 PLFLT *arg1 = (PLFLT *) 0 ;
5943 PLFLT *arg2 = (PLFLT *) 0 ;
5944 PLFLT *arg3 = (PLFLT *) 0 ;
5945 PLFLT *arg4 = (PLFLT *) 0 ;
5946 PLFLT temp1 ;
5947 PLFLT temp2 ;
5948 PLFLT temp3 ;
5949 PLFLT temp4 ;
5950
5951 arg1 = &temp1;
5952 arg2 = &temp2;
5953 arg3 = &temp3;
5954 arg4 = &temp4;
5955 SWIG_check_num_args("plgvpw",0,0)
5956 plgvpw(arg1,arg2,arg3,arg4);
5957
5958 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5959 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5960 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
5961 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5962 return SWIG_arg;
5963
5964 if(0) SWIG_fail;
5965
5966fail:
5967 lua_error(L);
5968 return SWIG_arg;
5969}
5970
5971
5972static int _wrap_gxax(lua_State* L) {
5973 int SWIG_arg = 0;
5974 PLINT *arg1 = (PLINT *) 0 ;
5975 PLINT *arg2 = (PLINT *) 0 ;
5976 PLINT temp1 ;
5977 PLINT temp2 ;
5978
5979 arg1 = &temp1;
5980 arg2 = &temp2;
5981 SWIG_check_num_args("plgxax",0,0)
5982 plgxax(arg1,arg2);
5983
5984 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5985 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5986 return SWIG_arg;
5987
5988 if(0) SWIG_fail;
5989
5990fail:
5991 lua_error(L);
5992 return SWIG_arg;
5993}
5994
5995
5996static int _wrap_gyax(lua_State* L) {
5997 int SWIG_arg = 0;
5998 PLINT *arg1 = (PLINT *) 0 ;
5999 PLINT *arg2 = (PLINT *) 0 ;
6000 PLINT temp1 ;
6001 PLINT temp2 ;
6002
6003 arg1 = &temp1;
6004 arg2 = &temp2;
6005 SWIG_check_num_args("plgyax",0,0)
6006 plgyax(arg1,arg2);
6007
6008 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6009 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
6010 return SWIG_arg;
6011
6012 if(0) SWIG_fail;
6013
6014fail:
6015 lua_error(L);
6016 return SWIG_arg;
6017}
6018
6019
6020static int _wrap_gzax(lua_State* L) {
6021 int SWIG_arg = 0;
6022 PLINT *arg1 = (PLINT *) 0 ;
6023 PLINT *arg2 = (PLINT *) 0 ;
6024 PLINT temp1 ;
6025 PLINT temp2 ;
6026
6027 arg1 = &temp1;
6028 arg2 = &temp2;
6029 SWIG_check_num_args("plgzax",0,0)
6030 plgzax(arg1,arg2);
6031
6032 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6033 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
6034 return SWIG_arg;
6035
6036 if(0) SWIG_fail;
6037
6038fail:
6039 lua_error(L);
6040 return SWIG_arg;
6041}
6042
6043
6044static int _wrap_hist(lua_State* L) {
6045 int SWIG_arg = 0;
6046 PLINT arg1 ;
6047 PLFLT *arg2 = (PLFLT *) 0 ;
6048 PLFLT arg3 ;
6049 PLFLT arg4 ;
6050 PLINT arg5 ;
6051 PLINT arg6 ;
6052
6053 SWIG_check_num_args("plhist",5,5)
6054 if(!lua_isnumber(L,2)) SWIG_fail_arg("plhist",2,"PLFLT");
6055 if(!lua_isnumber(L,3)) SWIG_fail_arg("plhist",3,"PLFLT");
6056 if(!lua_isnumber(L,4)) SWIG_fail_arg("plhist",4,"PLINT");
6057 if(!lua_isnumber(L,5)) SWIG_fail_arg("plhist",5,"PLINT");
6058 {
6059 int temp;
6060 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6061 if ( !arg2 )
6062 SWIG_fail;
6063 arg1 = Alen = temp;
6064 }
6065 arg3 = (PLFLT)lua_tonumber(L, 2);
6066 arg4 = (PLFLT)lua_tonumber(L, 3);
6067 arg5 = (PLINT)lua_tonumber(L, 4);
6068 arg6 = (PLINT)lua_tonumber(L, 5);
6069 plhist(arg1,(double const *)arg2,arg3,arg4,arg5,arg6);
6070
6071 {
6072 LUA_FREE_ARRAY( arg2 );
6073 }
6074 return SWIG_arg;
6075
6076 if(0) SWIG_fail;
6077
6078fail:
6079 {
6080 LUA_FREE_ARRAY( arg2 );
6081 }
6082 lua_error(L);
6083 return SWIG_arg;
6084}
6085
6086
6087static int _wrap_hlsrgb(lua_State* L) {
6088 int SWIG_arg = 0;
6089 PLFLT arg1 ;
6090 PLFLT arg2 ;
6091 PLFLT arg3 ;
6092 PLFLT *arg4 = (PLFLT *) 0 ;
6093 PLFLT *arg5 = (PLFLT *) 0 ;
6094 PLFLT *arg6 = (PLFLT *) 0 ;
6095 PLFLT temp4 ;
6096 PLFLT temp5 ;
6097 PLFLT temp6 ;
6098
6099 arg4 = &temp4;
6100 arg5 = &temp5;
6101 arg6 = &temp6;
6102 SWIG_check_num_args("plhlsrgb",3,3)
6103 if(!lua_isnumber(L,1)) SWIG_fail_arg("plhlsrgb",1,"PLFLT");
6104 if(!lua_isnumber(L,2)) SWIG_fail_arg("plhlsrgb",2,"PLFLT");
6105 if(!lua_isnumber(L,3)) SWIG_fail_arg("plhlsrgb",3,"PLFLT");
6106 arg1 = (PLFLT)lua_tonumber(L, 1);
6107 arg2 = (PLFLT)lua_tonumber(L, 2);
6108 arg3 = (PLFLT)lua_tonumber(L, 3);
6109 plhlsrgb(arg1,arg2,arg3,arg4,arg5,arg6);
6110
6111 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
6112 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
6113 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
6114 return SWIG_arg;
6115
6116 if(0) SWIG_fail;
6117
6118fail:
6119 lua_error(L);
6120 return SWIG_arg;
6121}
6122
6123
6124static int _wrap_init(lua_State* L) {
6125 int SWIG_arg = 0;
6126
6127 SWIG_check_num_args("plinit",0,0)
6128 plinit();
6129
6130 return SWIG_arg;
6131
6132 if(0) SWIG_fail;
6133
6134fail:
6135 lua_error(L);
6136 return SWIG_arg;
6137}
6138
6139
6140static int _wrap_join(lua_State* L) {
6141 int SWIG_arg = 0;
6142 PLFLT arg1 ;
6143 PLFLT arg2 ;
6144 PLFLT arg3 ;
6145 PLFLT arg4 ;
6146
6147 SWIG_check_num_args("pljoin",4,4)
6148 if(!lua_isnumber(L,1)) SWIG_fail_arg("pljoin",1,"PLFLT");
6149 if(!lua_isnumber(L,2)) SWIG_fail_arg("pljoin",2,"PLFLT");
6150 if(!lua_isnumber(L,3)) SWIG_fail_arg("pljoin",3,"PLFLT");
6151 if(!lua_isnumber(L,4)) SWIG_fail_arg("pljoin",4,"PLFLT");
6152 arg1 = (PLFLT)lua_tonumber(L, 1);
6153 arg2 = (PLFLT)lua_tonumber(L, 2);
6154 arg3 = (PLFLT)lua_tonumber(L, 3);
6155 arg4 = (PLFLT)lua_tonumber(L, 4);
6156 pljoin(arg1,arg2,arg3,arg4);
6157
6158 return SWIG_arg;
6159
6160 if(0) SWIG_fail;
6161
6162fail:
6163 lua_error(L);
6164 return SWIG_arg;
6165}
6166
6167
6168static int _wrap_lab(lua_State* L) {
6169 int SWIG_arg = 0;
6170 char *arg1 = (char *) 0 ;
6171 char *arg2 = (char *) 0 ;
6172 char *arg3 = (char *) 0 ;
6173
6174 SWIG_check_num_args("pllab",3,3)
6175 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("pllab",1,"char const *");
6176 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("pllab",2,"char const *");
6177 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("pllab",3,"char const *");
6178 arg1 = (char *)lua_tostring(L, 1);
6179 arg2 = (char *)lua_tostring(L, 2);
6180 arg3 = (char *)lua_tostring(L, 3);
6181 pllab((char const *)arg1,(char const *)arg2,(char const *)arg3);
6182
6183 return SWIG_arg;
6184
6185 if(0) SWIG_fail;
6186
6187fail:
6188 lua_error(L);
6189 return SWIG_arg;
6190}
6191
6192
6193static int _wrap_legend(lua_State* L) {
6194 int SWIG_arg = 0;
6195 PLFLT *arg1 = (PLFLT *) 0 ;
6196 PLFLT *arg2 = (PLFLT *) 0 ;
6197 PLINT arg3 ;
6198 PLINT arg4 ;
6199 PLFLT arg5 ;
6200 PLFLT arg6 ;
6201 PLFLT arg7 ;
6202 PLINT arg8 ;
6203 PLINT arg9 ;
6204 PLINT arg10 ;
6205 PLINT arg11 ;
6206 PLINT arg12 ;
6207 PLINT arg13 ;
6208 PLINT *arg14 = (PLINT *) 0 ;
6209 PLFLT arg15 ;
6210 PLFLT arg16 ;
6211 PLFLT arg17 ;
6212 PLFLT arg18 ;
6213 PLINT *arg19 = (PLINT *) 0 ;
6214 char **arg20 = (char **) 0 ;
6215 PLINT *arg21 = (PLINT *) 0 ;
6216 PLINT *arg22 = (PLINT *) 0 ;
6217 PLFLT *arg23 = (PLFLT *) 0 ;
6218 PLFLT *arg24 = (PLFLT *) 0 ;
6219 PLINT *arg25 = (PLINT *) 0 ;
6220 PLINT *arg26 = (PLINT *) 0 ;
6221 PLFLT *arg27 = (PLFLT *) 0 ;
6222 PLINT *arg28 = (PLINT *) 0 ;
6223 PLFLT *arg29 = (PLFLT *) 0 ;
6224 PLINT *arg30 = (PLINT *) 0 ;
6225 char **arg31 = (char **) 0 ;
6226 PLFLT temp1 ;
6227 PLFLT temp2 ;
6228 int temp19 ;
6229 int temp21 ;
6230 int temp22 ;
6231 int temp23 ;
6232 int temp24 ;
6233 int temp25 ;
6234 int temp26 ;
6235 int temp27 ;
6236 int temp28 ;
6237 int temp29 ;
6238 int temp30 ;
6239
6240 {
6241 arg21 = NULL;
6242 }
6243 {
6244 arg22 = NULL;
6245 }
6246 {
6247 arg23 = NULL;
6248 }
6249 {
6250 arg24 = NULL;
6251 }
6252 {
6253 arg25 = NULL;
6254 }
6255 {
6256 arg26 = NULL;
6257 }
6258 {
6259 arg27 = NULL;
6260 }
6261 {
6262 arg28 = NULL;
6263 }
6264 {
6265 arg29 = NULL;
6266 }
6267 {
6268 arg30 = NULL;
6269 }
6270 arg1 = &temp1;
6271 arg2 = &temp2;
6272 SWIG_check_num_args("pllegend",17,28)
6273 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllegend",1,"PLINT");
6274 if(!lua_isnumber(L,2)) SWIG_fail_arg("pllegend",2,"PLINT");
6275 if(!lua_isnumber(L,3)) SWIG_fail_arg("pllegend",3,"PLFLT");
6276 if(!lua_isnumber(L,4)) SWIG_fail_arg("pllegend",4,"PLFLT");
6277 if(!lua_isnumber(L,5)) SWIG_fail_arg("pllegend",5,"PLFLT");
6278 if(!lua_isnumber(L,6)) SWIG_fail_arg("pllegend",6,"PLINT");
6279 if(!lua_isnumber(L,7)) SWIG_fail_arg("pllegend",7,"PLINT");
6280 if(!lua_isnumber(L,8)) SWIG_fail_arg("pllegend",8,"PLINT");
6281 if(!lua_isnumber(L,9)) SWIG_fail_arg("pllegend",9,"PLINT");
6282 if(!lua_isnumber(L,10)) SWIG_fail_arg("pllegend",10,"PLINT");
6283 if(!lua_isnumber(L,12)) SWIG_fail_arg("pllegend",12,"PLFLT");
6284 if(!lua_isnumber(L,13)) SWIG_fail_arg("pllegend",13,"PLFLT");
6285 if(!lua_isnumber(L,14)) SWIG_fail_arg("pllegend",14,"PLFLT");
6286 if(!lua_isnumber(L,15)) SWIG_fail_arg("pllegend",15,"PLFLT");
6287 if(!lua_istable(L,17)) SWIG_fail_arg("pllegend",17,"char const **");
6288 if(lua_gettop(L)>=28 && !lua_istable(L,28)) SWIG_fail_arg("pllegend",28,"char const **");
6289 arg3 = (PLINT)lua_tonumber(L, 1);
6290 arg4 = (PLINT)lua_tonumber(L, 2);
6291 arg5 = (PLFLT)lua_tonumber(L, 3);
6292 arg6 = (PLFLT)lua_tonumber(L, 4);
6293 arg7 = (PLFLT)lua_tonumber(L, 5);
6294 arg8 = (PLINT)lua_tonumber(L, 6);
6295 arg9 = (PLINT)lua_tonumber(L, 7);
6296 arg10 = (PLINT)lua_tonumber(L, 8);
6297 arg11 = (PLINT)lua_tonumber(L, 9);
6298 arg12 = (PLINT)lua_tonumber(L, 10);
6299 {
6300 arg14 = (PLINT *) LUA_get_int_num_array_var( L, 11, &arg13 );
6301 if ( !arg14 )
6302 SWIG_fail;
6303 Alen = arg13;
6304 }
6305 arg15 = (PLFLT)lua_tonumber(L, 12);
6306 arg16 = (PLFLT)lua_tonumber(L, 13);
6307 arg17 = (PLFLT)lua_tonumber(L, 14);
6308 arg18 = (PLFLT)lua_tonumber(L, 15);
6309 {
6310 arg19 = (PLINT *) LUA_get_int_num_array_var( L, 16, &temp19 );
6311 if ( !arg19 )
6312 SWIG_fail;
6313 if ( temp19 != Alen )
6314 {
6315 lua_pushfstring( L, "Tables must be of same length." );
6316 SWIG_fail;
6317 }
6318 }
6319 {
6320 int i;
6321 arg20 = NULL;
6322
6323 if ( SWIG_table_size( L, 17 ) != Alen )
6324 {
6325 lua_pushfstring( L, "Tables must be of same length." );
6326 SWIG_fail;
6327 }
6328 arg20 = malloc( sizeof ( char* ) * Alen );
6329 for ( i = 1; i <= Alen; i++ )
6330 {
6331 lua_rawgeti( L, 17, i );
6332 if ( lua_isstring( L, -1 ) )
6333 {
6334 arg20[i - 1] = (char *) lua_tostring( L, -1 );
6335 }
6336 else
6337 {
6338 lua_pop( L, 1 );
6339 lua_pushfstring( L, "Requires a sequence of strings." );
6340 SWIG_fail;
6341 // arg20 array is freed after 'fail:'
6342 }
6343 lua_pop( L, 1 );
6344 }
6345 }
6346 if(lua_gettop(L)>=18){
6347 {
6348 if ( lua_isnil( L, 18 ) )
6349 {
6350 arg21 = NULL;
6351 }
6352 else
6353 {
6354 arg21 = (PLINT *) LUA_get_int_num_array_var( L, 18, &temp21 );
6355 if ( !arg21 )
6356 SWIG_fail;
6357 if ( temp21 != Alen )
6358 {
6359 lua_pushfstring( L, "Tables must be of same length." );
6360 SWIG_fail;
6361 }
6362 }
6363 }
6364 }
6365 if(lua_gettop(L)>=19){
6366 {
6367 if ( lua_isnil( L, 19 ) )
6368 {
6369 arg22 = NULL;
6370 }
6371 else
6372 {
6373 arg22 = (PLINT *) LUA_get_int_num_array_var( L, 19, &temp22 );
6374 if ( !arg22 )
6375 SWIG_fail;
6376 if ( temp22 != Alen )
6377 {
6378 lua_pushfstring( L, "Tables must be of same length." );
6379 SWIG_fail;
6380 }
6381 }
6382 }
6383 }
6384 if(lua_gettop(L)>=20){
6385 {
6386 if ( lua_isnil( L, 20 ) )
6387 {
6388 arg23 = NULL;
6389 }
6390 else
6391 {
6392 arg23 = (PLFLT *) LUA_get_double_num_array_var( L, 20, &temp23 );
6393 if ( !arg23 )
6394 SWIG_fail;
6395 if ( temp23 != Alen )
6396 {
6397 lua_pushfstring( L, "Tables must be of same length." );
6398 SWIG_fail;
6399 }
6400 }
6401 }
6402 }
6403 if(lua_gettop(L)>=21){
6404 {
6405 if ( lua_isnil( L, 21 ) )
6406 {
6407 arg24 = NULL;
6408 }
6409 else
6410 {
6411 arg24 = (PLFLT *) LUA_get_double_num_array_var( L, 21, &temp24 );
6412 if ( !arg24 )
6413 SWIG_fail;
6414 if ( temp24 != Alen )
6415 {
6416 lua_pushfstring( L, "Tables must be of same length." );
6417 SWIG_fail;
6418 }
6419 }
6420 }
6421 }
6422 if(lua_gettop(L)>=22){
6423 {
6424 if ( lua_isnil( L, 22 ) )
6425 {
6426 arg25 = NULL;
6427 }
6428 else
6429 {
6430 arg25 = (PLINT *) LUA_get_int_num_array_var( L, 22, &temp25 );
6431 if ( !arg25 )
6432 SWIG_fail;
6433 if ( temp25 != Alen )
6434 {
6435 lua_pushfstring( L, "Tables must be of same length." );
6436 SWIG_fail;
6437 }
6438 }
6439 }
6440 }
6441 if(lua_gettop(L)>=23){
6442 {
6443 if ( lua_isnil( L, 23 ) )
6444 {
6445 arg26 = NULL;
6446 }
6447 else
6448 {
6449 arg26 = (PLINT *) LUA_get_int_num_array_var( L, 23, &temp26 );
6450 if ( !arg26 )
6451 SWIG_fail;
6452 if ( temp26 != Alen )
6453 {
6454 lua_pushfstring( L, "Tables must be of same length." );
6455 SWIG_fail;
6456 }
6457 }
6458 }
6459 }
6460 if(lua_gettop(L)>=24){
6461 {
6462 if ( lua_isnil( L, 24 ) )
6463 {
6464 arg27 = NULL;
6465 }
6466 else
6467 {
6468 arg27 = (PLFLT *) LUA_get_double_num_array_var( L, 24, &temp27 );
6469 if ( !arg27 )
6470 SWIG_fail;
6471 if ( temp27 != Alen )
6472 {
6473 lua_pushfstring( L, "Tables must be of same length." );
6474 SWIG_fail;
6475 }
6476 }
6477 }
6478 }
6479 if(lua_gettop(L)>=25){
6480 {
6481 if ( lua_isnil( L, 25 ) )
6482 {
6483 arg28 = NULL;
6484 }
6485 else
6486 {
6487 arg28 = (PLINT *) LUA_get_int_num_array_var( L, 25, &temp28 );
6488 if ( !arg28 )
6489 SWIG_fail;
6490 if ( temp28 != Alen )
6491 {
6492 lua_pushfstring( L, "Tables must be of same length." );
6493 SWIG_fail;
6494 }
6495 }
6496 }
6497 }
6498 if(lua_gettop(L)>=26){
6499 {
6500 if ( lua_isnil( L, 26 ) )
6501 {
6502 arg29 = NULL;
6503 }
6504 else
6505 {
6506 arg29 = (PLFLT *) LUA_get_double_num_array_var( L, 26, &temp29 );
6507 if ( !arg29 )
6508 SWIG_fail;
6509 if ( temp29 != Alen )
6510 {
6511 lua_pushfstring( L, "Tables must be of same length." );
6512 SWIG_fail;
6513 }
6514 }
6515 }
6516 }
6517 if(lua_gettop(L)>=27){
6518 {
6519 if ( lua_isnil( L, 27 ) )
6520 {
6521 arg30 = NULL;
6522 }
6523 else
6524 {
6525 arg30 = (PLINT *) LUA_get_int_num_array_var( L, 27, &temp30 );
6526 if ( !arg30 )
6527 SWIG_fail;
6528 if ( temp30 != Alen )
6529 {
6530 lua_pushfstring( L, "Tables must be of same length." );
6531 SWIG_fail;
6532 }
6533 }
6534 }
6535 }
6536 if(lua_gettop(L)>=28){
6537 {
6538 int i;
6539 arg31 = NULL;
6540
6541 if ( SWIG_table_size( L, 28 ) != Alen )
6542 {
6543 lua_pushfstring( L, "Tables must be of same length." );
6544 SWIG_fail;
6545 }
6546 arg31 = malloc( sizeof ( char* ) * Alen );
6547 for ( i = 1; i <= Alen; i++ )
6548 {
6549 lua_rawgeti( L, 28, i );
6550 if ( lua_isstring( L, -1 ) )
6551 {
6552 arg31[i - 1] = (char *) lua_tostring( L, -1 );
6553 }
6554 else
6555 {
6556 lua_pop( L, 1 );
6557 lua_pushfstring( L, "Requires a sequence of strings." );
6558 SWIG_fail;
6559 // arg31 array is freed after 'fail:'
6560 }
6561 lua_pop( L, 1 );
6562 }
6563 }
6564 }
6565 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);
6566
6567 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6568 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
6569 {
6570 LUA_FREE_ARRAY( arg14 );
6571 }
6572 {
6573 LUA_FREE_ARRAY( arg19 );
6574 }
6575 {
6576 if ( arg20 )
6577 {
6578 free( arg20 ); arg20 = NULL;
6579 }
6580 }
6581 {
6582 LUA_FREE_ARRAY( arg21 );
6583 }
6584 {
6585 LUA_FREE_ARRAY( arg22 );
6586 }
6587 {
6588 LUA_FREE_ARRAY( arg23 );
6589 }
6590 {
6591 LUA_FREE_ARRAY( arg24 );
6592 }
6593 {
6594 LUA_FREE_ARRAY( arg25 );
6595 }
6596 {
6597 LUA_FREE_ARRAY( arg26 );
6598 }
6599 {
6600 LUA_FREE_ARRAY( arg27 );
6601 }
6602 {
6603 LUA_FREE_ARRAY( arg28 );
6604 }
6605 {
6606 LUA_FREE_ARRAY( arg29 );
6607 }
6608 {
6609 LUA_FREE_ARRAY( arg30 );
6610 }
6611 {
6612 if ( arg31 )
6613 {
6614 free( arg31 ); arg31 = NULL;
6615 }
6616 }
6617 return SWIG_arg;
6618
6619 if(0) SWIG_fail;
6620
6621fail:
6622 {
6623 LUA_FREE_ARRAY( arg14 );
6624 }
6625 {
6626 LUA_FREE_ARRAY( arg19 );
6627 }
6628 {
6629 if ( arg20 )
6630 {
6631 free( arg20 ); arg20 = NULL;
6632 }
6633 }
6634 {
6635 LUA_FREE_ARRAY( arg21 );
6636 }
6637 {
6638 LUA_FREE_ARRAY( arg22 );
6639 }
6640 {
6641 LUA_FREE_ARRAY( arg23 );
6642 }
6643 {
6644 LUA_FREE_ARRAY( arg24 );
6645 }
6646 {
6647 LUA_FREE_ARRAY( arg25 );
6648 }
6649 {
6650 LUA_FREE_ARRAY( arg26 );
6651 }
6652 {
6653 LUA_FREE_ARRAY( arg27 );
6654 }
6655 {
6656 LUA_FREE_ARRAY( arg28 );
6657 }
6658 {
6659 LUA_FREE_ARRAY( arg29 );
6660 }
6661 {
6662 LUA_FREE_ARRAY( arg30 );
6663 }
6664 {
6665 if ( arg31 )
6666 {
6667 free( arg31 ); arg31 = NULL;
6668 }
6669 }
6670 lua_error(L);
6671 return SWIG_arg;
6672}
6673
6674
6675static int _wrap_colorbar(lua_State* L) {
6676 int SWIG_arg = 0;
6677 PLFLT *arg1 = (PLFLT *) 0 ;
6678 PLFLT *arg2 = (PLFLT *) 0 ;
6679 PLINT arg3 ;
6680 PLINT arg4 ;
6681 PLFLT arg5 ;
6682 PLFLT arg6 ;
6683 PLFLT arg7 ;
6684 PLFLT arg8 ;
6685 PLINT arg9 ;
6686 PLINT arg10 ;
6687 PLINT arg11 ;
6688 PLFLT arg12 ;
6689 PLFLT arg13 ;
6690 PLINT arg14 ;
6691 PLFLT arg15 ;
6692 PLINT arg16 ;
6693 PLINT *arg17 = (PLINT *) 0 ;
6694 char **arg18 = (char **) 0 ;
6695 PLINT arg19 ;
6696 char **arg20 = (char **) 0 ;
6697 PLFLT *arg21 = (PLFLT *) 0 ;
6698 PLINT *arg22 = (PLINT *) 0 ;
6699 PLINT *arg23 = (PLINT *) 0 ;
6700 PLFLT **arg24 = (PLFLT **) 0 ;
6701 PLFLT temp1 ;
6702 PLFLT temp2 ;
6703 int temp21 ;
6704 int temp22 ;
6705 int temp23 ;
6706 int ii24 ;
6707
6708 arg1 = &temp1;
6709 arg2 = &temp2;
6710 SWIG_check_num_args("plcolorbar",20,20)
6711 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcolorbar",1,"PLINT");
6712 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcolorbar",2,"PLINT");
6713 if(!lua_isnumber(L,3)) SWIG_fail_arg("plcolorbar",3,"PLFLT");
6714 if(!lua_isnumber(L,4)) SWIG_fail_arg("plcolorbar",4,"PLFLT");
6715 if(!lua_isnumber(L,5)) SWIG_fail_arg("plcolorbar",5,"PLFLT");
6716 if(!lua_isnumber(L,6)) SWIG_fail_arg("plcolorbar",6,"PLFLT");
6717 if(!lua_isnumber(L,7)) SWIG_fail_arg("plcolorbar",7,"PLINT");
6718 if(!lua_isnumber(L,8)) SWIG_fail_arg("plcolorbar",8,"PLINT");
6719 if(!lua_isnumber(L,9)) SWIG_fail_arg("plcolorbar",9,"PLINT");
6720 if(!lua_isnumber(L,10)) SWIG_fail_arg("plcolorbar",10,"PLFLT");
6721 if(!lua_isnumber(L,11)) SWIG_fail_arg("plcolorbar",11,"PLFLT");
6722 if(!lua_isnumber(L,12)) SWIG_fail_arg("plcolorbar",12,"PLINT");
6723 if(!lua_isnumber(L,13)) SWIG_fail_arg("plcolorbar",13,"PLFLT");
6724 if(!lua_istable(L,15)) SWIG_fail_arg("plcolorbar",15,"char const **");
6725 arg3 = (PLINT)lua_tonumber(L, 1);
6726 arg4 = (PLINT)lua_tonumber(L, 2);
6727 arg5 = (PLFLT)lua_tonumber(L, 3);
6728 arg6 = (PLFLT)lua_tonumber(L, 4);
6729 arg7 = (PLFLT)lua_tonumber(L, 5);
6730 arg8 = (PLFLT)lua_tonumber(L, 6);
6731 arg9 = (PLINT)lua_tonumber(L, 7);
6732 arg10 = (PLINT)lua_tonumber(L, 8);
6733 arg11 = (PLINT)lua_tonumber(L, 9);
6734 arg12 = (PLFLT)lua_tonumber(L, 10);
6735 arg13 = (PLFLT)lua_tonumber(L, 11);
6736 arg14 = (PLINT)lua_tonumber(L, 12);
6737 arg15 = (PLFLT)lua_tonumber(L, 13);
6738 {
6739 arg17 = (PLINT *) LUA_get_int_num_array_var( L, 14, &arg16 );
6740 if ( !arg17 )
6741 SWIG_fail;
6742 Alen = arg16;
6743 }
6744 {
6745 int i;
6746 arg18 = NULL;
6747
6748 if ( SWIG_table_size( L, 15 ) != Alen )
6749 {
6750 lua_pushfstring( L, "Tables must be of same length." );
6751 SWIG_fail;
6752 }
6753 arg18 = malloc( sizeof ( char* ) * Alen );
6754 for ( i = 1; i <= Alen; i++ )
6755 {
6756 lua_rawgeti( L, 15, i );
6757 if ( lua_isstring( L, -1 ) )
6758 {
6759 arg18[i - 1] = (char *) lua_tostring( L, -1 );
6760 }
6761 else
6762 {
6763 lua_pop( L, 1 );
6764 lua_pushfstring( L, "Requires a sequence of strings." );
6765 SWIG_fail;
6766 // arg18 array is freed after 'fail:'
6767 }
6768 lua_pop( L, 1 );
6769 }
6770 }
6771 {
6772 int i;
6773 arg19 = SWIG_table_size( L, 16 );
6774 Alen = arg19;
6775
6776 arg20 = malloc( sizeof ( char* ) * Alen );
6777 for ( i = 1; i <= Alen; i++ )
6778 {
6779 lua_rawgeti( L, 16, i );
6780 if ( lua_isstring( L, -1 ) )
6781 {
6782 arg20[i - 1] = (char *) lua_tostring( L, -1 );
6783 }
6784 else
6785 {
6786 lua_pop( L, 1 );
6787 lua_pushfstring( L, "Requires a sequence of strings." );
6788 SWIG_fail;
6789 }
6790 lua_pop( L, 1 );
6791 }
6792 }
6793 {
6794 arg21 = (PLFLT *) LUA_get_double_num_array_var( L, 17, &temp21 );
6795 if ( !arg21 )
6796 SWIG_fail;
6797 if ( temp21 != Alen )
6798 {
6799 lua_pushfstring( L, "Tables must be of same length." );
6800 SWIG_fail;
6801 }
6802 }
6803 {
6804 arg22 = (PLINT *) LUA_get_int_num_array_var( L, 18, &temp22 );
6805 if ( !arg22 )
6806 SWIG_fail;
6807 if ( temp22 != Alen )
6808 {
6809 lua_pushfstring( L, "Tables must be of same length." );
6810 SWIG_fail;
6811 }
6812 }
6813 {
6814 int i;
6815
6816 arg23 = (PLINT *) LUA_get_int_num_array_var( L, 19, &temp23 );
6817 if ( !arg23 )
6818 SWIG_fail;
6819 if ( temp23 != Alen )
6820 {
6821 lua_pushfstring( L, "Tables must be of same length." );
6822 SWIG_fail;
6823 }
6824
6825 Xlen = temp23;
6826 Ylen = -1;
6827 for ( i = 0; i < Xlen; i++ )
6828 if ( arg23[i] > Ylen )
6829 Ylen = arg23[i];
6830 }
6831 {
6832 int jj;
6833
6834 arg24 = read_double_Matrix( L, 20, &ii24, &jj );
6835 if ( !arg24 )
6836 SWIG_fail;
6837 if ( ( ii24 != Xlen ) || ( jj != Ylen ) )
6838 {
6839 lua_pushfstring( L, "Vectors must match matrix." );
6840 SWIG_fail;
6841 }
6842 }
6843 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);
6844
6845 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6846 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
6847 {
6848 LUA_FREE_ARRAY( arg17 );
6849 }
6850 {
6851 if ( arg18 )
6852 {
6853 free( arg18 ); arg18 = NULL;
6854 }
6855 }
6856 {
6857 if ( arg20 )
6858 {
6859 free( arg20 ); arg20 = NULL;
6860 }
6861 }
6862 {
6863 LUA_FREE_ARRAY( arg21 );
6864 }
6865 {
6866 LUA_FREE_ARRAY( arg22 );
6867 }
6868 {
6869 LUA_FREE_ARRAY( arg23 );
6870 }
6871 {
6872 int i;
6873
6874 if ( arg24 )
6875 {
6876 for ( i = 0; i < ii24; i++ )
6877 LUA_FREE_ARRAY( arg24[i] );
6878 LUA_FREE_ARRAY( arg24 );
6879 }
6880 }
6881 return SWIG_arg;
6882
6883 if(0) SWIG_fail;
6884
6885fail:
6886 {
6887 LUA_FREE_ARRAY( arg17 );
6888 }
6889 {
6890 if ( arg18 )
6891 {
6892 free( arg18 ); arg18 = NULL;
6893 }
6894 }
6895 {
6896 if ( arg20 )
6897 {
6898 free( arg20 ); arg20 = NULL;
6899 }
6900 }
6901 {
6902 LUA_FREE_ARRAY( arg21 );
6903 }
6904 {
6905 LUA_FREE_ARRAY( arg22 );
6906 }
6907 {
6908 LUA_FREE_ARRAY( arg23 );
6909 }
6910 {
6911 int i;
6912
6913 if ( arg24 )
6914 {
6915 for ( i = 0; i < ii24; i++ )
6916 LUA_FREE_ARRAY( arg24[i] );
6917 LUA_FREE_ARRAY( arg24 );
6918 }
6919 }
6920 lua_error(L);
6921 return SWIG_arg;
6922}
6923
6924
6925static int _wrap_lightsource(lua_State* L) {
6926 int SWIG_arg = 0;
6927 PLFLT arg1 ;
6928 PLFLT arg2 ;
6929 PLFLT arg3 ;
6930
6931 SWIG_check_num_args("pllightsource",3,3)
6932 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllightsource",1,"PLFLT");
6933 if(!lua_isnumber(L,2)) SWIG_fail_arg("pllightsource",2,"PLFLT");
6934 if(!lua_isnumber(L,3)) SWIG_fail_arg("pllightsource",3,"PLFLT");
6935 arg1 = (PLFLT)lua_tonumber(L, 1);
6936 arg2 = (PLFLT)lua_tonumber(L, 2);
6937 arg3 = (PLFLT)lua_tonumber(L, 3);
6938 pllightsource(arg1,arg2,arg3);
6939
6940 return SWIG_arg;
6941
6942 if(0) SWIG_fail;
6943
6944fail:
6945 lua_error(L);
6946 return SWIG_arg;
6947}
6948
6949
6950static int _wrap_line(lua_State* L) {
6951 int SWIG_arg = 0;
6952 PLINT arg1 ;
6953 PLFLT *arg2 = (PLFLT *) 0 ;
6954 PLFLT *arg3 = (PLFLT *) 0 ;
6955 int temp3 ;
6956
6957 SWIG_check_num_args("plline",2,2)
6958 {
6959 int temp;
6960 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6961 if ( !arg2 )
6962 SWIG_fail;
6963 arg1 = Alen = temp;
6964 }
6965 {
6966 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
6967 if ( !arg3 )
6968 SWIG_fail;
6969 if ( temp3 != Alen )
6970 {
6971 lua_pushfstring( L, "Tables must be of same length." );
6972 SWIG_fail;
6973 }
6974 }
6975 plline(arg1,(double const *)arg2,(double const *)arg3);
6976
6977 {
6978 LUA_FREE_ARRAY( arg2 );
6979 }
6980 {
6981 LUA_FREE_ARRAY( arg3 );
6982 }
6983 return SWIG_arg;
6984
6985 if(0) SWIG_fail;
6986
6987fail:
6988 {
6989 LUA_FREE_ARRAY( arg2 );
6990 }
6991 {
6992 LUA_FREE_ARRAY( arg3 );
6993 }
6994 lua_error(L);
6995 return SWIG_arg;
6996}
6997
6998
6999static int _wrap_line3(lua_State* L) {
7000 int SWIG_arg = 0;
7001 PLINT arg1 ;
7002 PLFLT *arg2 = (PLFLT *) 0 ;
7003 PLFLT *arg3 = (PLFLT *) 0 ;
7004 PLFLT *arg4 = (PLFLT *) 0 ;
7005 int temp3 ;
7006 int temp4 ;
7007
7008 SWIG_check_num_args("plline3",3,3)
7009 {
7010 int temp;
7011 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7012 if ( !arg2 )
7013 SWIG_fail;
7014 arg1 = Alen = temp;
7015 }
7016 {
7017 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
7018 if ( !arg3 )
7019 SWIG_fail;
7020 if ( temp3 != Alen )
7021 {
7022 lua_pushfstring( L, "Tables must be of same length." );
7023 SWIG_fail;
7024 }
7025 }
7026 {
7027 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
7028 if ( !arg4 )
7029 SWIG_fail;
7030 if ( temp4 != Alen )
7031 {
7032 lua_pushfstring( L, "Tables must be of same length." );
7033 SWIG_fail;
7034 }
7035 }
7036 plline3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
7037
7038 {
7039 LUA_FREE_ARRAY( arg2 );
7040 }
7041 {
7042 LUA_FREE_ARRAY( arg3 );
7043 }
7044 {
7045 LUA_FREE_ARRAY( arg4 );
7046 }
7047 return SWIG_arg;
7048
7049 if(0) SWIG_fail;
7050
7051fail:
7052 {
7053 LUA_FREE_ARRAY( arg2 );
7054 }
7055 {
7056 LUA_FREE_ARRAY( arg3 );
7057 }
7058 {
7059 LUA_FREE_ARRAY( arg4 );
7060 }
7061 lua_error(L);
7062 return SWIG_arg;
7063}
7064
7065
7066static int _wrap_lsty(lua_State* L) {
7067 int SWIG_arg = 0;
7068 PLINT arg1 ;
7069
7070 SWIG_check_num_args("pllsty",1,1)
7071 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllsty",1,"PLINT");
7072 arg1 = (PLINT)lua_tonumber(L, 1);
7073 pllsty(arg1);
7074
7075 return SWIG_arg;
7076
7077 if(0) SWIG_fail;
7078
7079fail:
7080 lua_error(L);
7081 return SWIG_arg;
7082}
7083
7084
7085static int _wrap_mesh(lua_State* L) {
7086 int SWIG_arg = 0;
7087 PLFLT *arg1 = (PLFLT *) 0 ;
7088 PLFLT *arg2 = (PLFLT *) 0 ;
7089 PLFLT **arg3 = (PLFLT **) 0 ;
7090 PLINT arg4 ;
7091 PLINT arg5 ;
7092 PLINT arg6 ;
7093 int ii3 ;
7094
7095 SWIG_check_num_args("plmesh",4,4)
7096 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmesh",4,"PLINT");
7097 {
7098 int temp;
7099 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7100 if ( !arg1 )
7101 SWIG_fail;
7102 Xlen = temp;
7103 }
7104 {
7105 int temp;
7106 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7107 if ( !arg2 )
7108 SWIG_fail;
7109 Ylen = temp;
7110 }
7111 {
7112 int jj;
7113
7114 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7115 if ( !arg3 )
7116 SWIG_fail;
7117 arg4 = ii3;
7118 arg5 = jj;
7119 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7120 {
7121 lua_pushfstring( L, "Vectors must match matrix." );
7122 SWIG_fail;
7123 }
7124 }
7125 arg6 = (PLINT)lua_tonumber(L, 4);
7126 plmesh((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6);
7127
7128 {
7129 LUA_FREE_ARRAY( arg1 );
7130 }
7131 {
7132 LUA_FREE_ARRAY( arg2 );
7133 }
7134 {
7135 int i;
7136
7137 if ( arg3 )
7138 {
7139 for ( i = 0; i < ii3; i++ )
7140 LUA_FREE_ARRAY( arg3[i] );
7141 LUA_FREE_ARRAY( arg3 );
7142 }
7143 }
7144 return SWIG_arg;
7145
7146 if(0) SWIG_fail;
7147
7148fail:
7149 {
7150 LUA_FREE_ARRAY( arg1 );
7151 }
7152 {
7153 LUA_FREE_ARRAY( arg2 );
7154 }
7155 {
7156 int i;
7157
7158 if ( arg3 )
7159 {
7160 for ( i = 0; i < ii3; i++ )
7161 LUA_FREE_ARRAY( arg3[i] );
7162 LUA_FREE_ARRAY( arg3 );
7163 }
7164 }
7165 lua_error(L);
7166 return SWIG_arg;
7167}
7168
7169
7170static int _wrap_meshc(lua_State* L) {
7171 int SWIG_arg = 0;
7172 PLFLT *arg1 = (PLFLT *) 0 ;
7173 PLFLT *arg2 = (PLFLT *) 0 ;
7174 PLFLT **arg3 = (PLFLT **) 0 ;
7175 PLINT arg4 ;
7176 PLINT arg5 ;
7177 PLINT arg6 ;
7178 PLFLT *arg7 = (PLFLT *) 0 ;
7179 PLINT arg8 ;
7180 int ii3 ;
7181
7182 SWIG_check_num_args("plmeshc",5,5)
7183 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmeshc",4,"PLINT");
7184 {
7185 int temp;
7186 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7187 if ( !arg1 )
7188 SWIG_fail;
7189 Xlen = temp;
7190 }
7191 {
7192 int temp;
7193 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7194 if ( !arg2 )
7195 SWIG_fail;
7196 Ylen = temp;
7197 }
7198 {
7199 int jj;
7200
7201 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7202 if ( !arg3 )
7203 SWIG_fail;
7204 arg4 = ii3;
7205 arg5 = jj;
7206 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7207 {
7208 lua_pushfstring( L, "Vectors must match matrix." );
7209 SWIG_fail;
7210 }
7211 }
7212 arg6 = (PLINT)lua_tonumber(L, 4);
7213 {
7214 int temp;
7215 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7216 if ( !arg7 )
7217 SWIG_fail;
7218 arg8 = Alen = temp;
7219 }
7220 plmeshc((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7221
7222 {
7223 LUA_FREE_ARRAY( arg1 );
7224 }
7225 {
7226 LUA_FREE_ARRAY( arg2 );
7227 }
7228 {
7229 int i;
7230
7231 if ( arg3 )
7232 {
7233 for ( i = 0; i < ii3; i++ )
7234 LUA_FREE_ARRAY( arg3[i] );
7235 LUA_FREE_ARRAY( arg3 );
7236 }
7237 }
7238 {
7239 LUA_FREE_ARRAY( arg7 );
7240 }
7241 return SWIG_arg;
7242
7243 if(0) SWIG_fail;
7244
7245fail:
7246 {
7247 LUA_FREE_ARRAY( arg1 );
7248 }
7249 {
7250 LUA_FREE_ARRAY( arg2 );
7251 }
7252 {
7253 int i;
7254
7255 if ( arg3 )
7256 {
7257 for ( i = 0; i < ii3; i++ )
7258 LUA_FREE_ARRAY( arg3[i] );
7259 LUA_FREE_ARRAY( arg3 );
7260 }
7261 }
7262 {
7263 LUA_FREE_ARRAY( arg7 );
7264 }
7265 lua_error(L);
7266 return SWIG_arg;
7267}
7268
7269
7270static int _wrap_mkstrm(lua_State* L) {
7271 int SWIG_arg = 0;
7272 PLINT *arg1 = (PLINT *) 0 ;
7273 PLINT temp1 ;
7274
7275 arg1 = &temp1;
7276 SWIG_check_num_args("plmkstrm",0,0)
7277 plmkstrm(arg1);
7278
7279 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
7280 return SWIG_arg;
7281
7282 if(0) SWIG_fail;
7283
7284fail:
7285 lua_error(L);
7286 return SWIG_arg;
7287}
7288
7289
7290static int _wrap_mtex(lua_State* L) {
7291 int SWIG_arg = 0;
7292 char *arg1 = (char *) 0 ;
7293 PLFLT arg2 ;
7294 PLFLT arg3 ;
7295 PLFLT arg4 ;
7296 char *arg5 = (char *) 0 ;
7297
7298 SWIG_check_num_args("plmtex",5,5)
7299 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plmtex",1,"char const *");
7300 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmtex",2,"PLFLT");
7301 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmtex",3,"PLFLT");
7302 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmtex",4,"PLFLT");
7303 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plmtex",5,"char const *");
7304 arg1 = (char *)lua_tostring(L, 1);
7305 arg2 = (PLFLT)lua_tonumber(L, 2);
7306 arg3 = (PLFLT)lua_tonumber(L, 3);
7307 arg4 = (PLFLT)lua_tonumber(L, 4);
7308 arg5 = (char *)lua_tostring(L, 5);
7309 plmtex((char const *)arg1,arg2,arg3,arg4,(char const *)arg5);
7310
7311 return SWIG_arg;
7312
7313 if(0) SWIG_fail;
7314
7315fail:
7316 lua_error(L);
7317 return SWIG_arg;
7318}
7319
7320
7321static int _wrap_mtex3(lua_State* L) {
7322 int SWIG_arg = 0;
7323 char *arg1 = (char *) 0 ;
7324 PLFLT arg2 ;
7325 PLFLT arg3 ;
7326 PLFLT arg4 ;
7327 char *arg5 = (char *) 0 ;
7328
7329 SWIG_check_num_args("plmtex3",5,5)
7330 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plmtex3",1,"char const *");
7331 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmtex3",2,"PLFLT");
7332 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmtex3",3,"PLFLT");
7333 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmtex3",4,"PLFLT");
7334 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plmtex3",5,"char const *");
7335 arg1 = (char *)lua_tostring(L, 1);
7336 arg2 = (PLFLT)lua_tonumber(L, 2);
7337 arg3 = (PLFLT)lua_tonumber(L, 3);
7338 arg4 = (PLFLT)lua_tonumber(L, 4);
7339 arg5 = (char *)lua_tostring(L, 5);
7340 plmtex3((char const *)arg1,arg2,arg3,arg4,(char const *)arg5);
7341
7342 return SWIG_arg;
7343
7344 if(0) SWIG_fail;
7345
7346fail:
7347 lua_error(L);
7348 return SWIG_arg;
7349}
7350
7351
7352static int _wrap_plot3d(lua_State* L) {
7353 int SWIG_arg = 0;
7354 PLFLT *arg1 = (PLFLT *) 0 ;
7355 PLFLT *arg2 = (PLFLT *) 0 ;
7356 PLFLT **arg3 = (PLFLT **) 0 ;
7357 PLINT arg4 ;
7358 PLINT arg5 ;
7359 PLINT arg6 ;
7360 PLBOOL arg7 ;
7361 int ii3 ;
7362
7363 SWIG_check_num_args("plot3d",5,5)
7364 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3d",4,"PLINT");
7365 if(!lua_isnumber(L,5)) SWIG_fail_arg("plot3d",5,"PLBOOL");
7366 {
7367 int temp;
7368 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7369 if ( !arg1 )
7370 SWIG_fail;
7371 Xlen = temp;
7372 }
7373 {
7374 int temp;
7375 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7376 if ( !arg2 )
7377 SWIG_fail;
7378 Ylen = temp;
7379 }
7380 {
7381 int jj;
7382
7383 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7384 if ( !arg3 )
7385 SWIG_fail;
7386 arg4 = ii3;
7387 arg5 = jj;
7388 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7389 {
7390 lua_pushfstring( L, "Vectors must match matrix." );
7391 SWIG_fail;
7392 }
7393 }
7394 arg6 = (PLINT)lua_tonumber(L, 4);
7395 arg7 = (PLBOOL)lua_tonumber(L, 5);
7396 plot3d((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,arg7);
7397
7398 {
7399 LUA_FREE_ARRAY( arg1 );
7400 }
7401 {
7402 LUA_FREE_ARRAY( arg2 );
7403 }
7404 {
7405 int i;
7406
7407 if ( arg3 )
7408 {
7409 for ( i = 0; i < ii3; i++ )
7410 LUA_FREE_ARRAY( arg3[i] );
7411 LUA_FREE_ARRAY( arg3 );
7412 }
7413 }
7414 return SWIG_arg;
7415
7416 if(0) SWIG_fail;
7417
7418fail:
7419 {
7420 LUA_FREE_ARRAY( arg1 );
7421 }
7422 {
7423 LUA_FREE_ARRAY( arg2 );
7424 }
7425 {
7426 int i;
7427
7428 if ( arg3 )
7429 {
7430 for ( i = 0; i < ii3; i++ )
7431 LUA_FREE_ARRAY( arg3[i] );
7432 LUA_FREE_ARRAY( arg3 );
7433 }
7434 }
7435 lua_error(L);
7436 return SWIG_arg;
7437}
7438
7439
7440static int _wrap_plot3dc(lua_State* L) {
7441 int SWIG_arg = 0;
7442 PLFLT *arg1 = (PLFLT *) 0 ;
7443 PLFLT *arg2 = (PLFLT *) 0 ;
7444 PLFLT **arg3 = (PLFLT **) 0 ;
7445 PLINT arg4 ;
7446 PLINT arg5 ;
7447 PLINT arg6 ;
7448 PLFLT *arg7 = (PLFLT *) 0 ;
7449 PLINT arg8 ;
7450 int ii3 ;
7451
7452 SWIG_check_num_args("plot3dc",5,5)
7453 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3dc",4,"PLINT");
7454 {
7455 int temp;
7456 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7457 if ( !arg1 )
7458 SWIG_fail;
7459 Xlen = temp;
7460 }
7461 {
7462 int temp;
7463 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7464 if ( !arg2 )
7465 SWIG_fail;
7466 Ylen = temp;
7467 }
7468 {
7469 int jj;
7470
7471 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7472 if ( !arg3 )
7473 SWIG_fail;
7474 arg4 = ii3;
7475 arg5 = jj;
7476 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7477 {
7478 lua_pushfstring( L, "Vectors must match matrix." );
7479 SWIG_fail;
7480 }
7481 }
7482 arg6 = (PLINT)lua_tonumber(L, 4);
7483 {
7484 int temp;
7485 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7486 if ( !arg7 )
7487 SWIG_fail;
7488 arg8 = Alen = temp;
7489 }
7490 plot3dc((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7491
7492 {
7493 LUA_FREE_ARRAY( arg1 );
7494 }
7495 {
7496 LUA_FREE_ARRAY( arg2 );
7497 }
7498 {
7499 int i;
7500
7501 if ( arg3 )
7502 {
7503 for ( i = 0; i < ii3; i++ )
7504 LUA_FREE_ARRAY( arg3[i] );
7505 LUA_FREE_ARRAY( arg3 );
7506 }
7507 }
7508 {
7509 LUA_FREE_ARRAY( arg7 );
7510 }
7511 return SWIG_arg;
7512
7513 if(0) SWIG_fail;
7514
7515fail:
7516 {
7517 LUA_FREE_ARRAY( arg1 );
7518 }
7519 {
7520 LUA_FREE_ARRAY( arg2 );
7521 }
7522 {
7523 int i;
7524
7525 if ( arg3 )
7526 {
7527 for ( i = 0; i < ii3; i++ )
7528 LUA_FREE_ARRAY( arg3[i] );
7529 LUA_FREE_ARRAY( arg3 );
7530 }
7531 }
7532 {
7533 LUA_FREE_ARRAY( arg7 );
7534 }
7535 lua_error(L);
7536 return SWIG_arg;
7537}
7538
7539
7540static int _wrap_plot3dcl(lua_State* L) {
7541 int SWIG_arg = 0;
7542 PLFLT *arg1 = (PLFLT *) 0 ;
7543 PLFLT *arg2 = (PLFLT *) 0 ;
7544 PLFLT **arg3 = (PLFLT **) 0 ;
7545 PLINT arg4 ;
7546 PLINT arg5 ;
7547 PLINT arg6 ;
7548 PLFLT *arg7 = (PLFLT *) 0 ;
7549 PLINT arg8 ;
7550 PLINT arg9 ;
7551 PLINT arg10 ;
7552 PLINT *arg11 = (PLINT *) 0 ;
7553 PLINT *arg12 = (PLINT *) 0 ;
7554 int ii3 ;
7555 int temp12 ;
7556
7557 SWIG_check_num_args("plot3dcl",8,8)
7558 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3dcl",4,"PLINT");
7559 if(!lua_isnumber(L,6)) SWIG_fail_arg("plot3dcl",6,"PLINT");
7560 {
7561 int temp;
7562 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7563 if ( !arg1 )
7564 SWIG_fail;
7565 Xlen = temp;
7566 }
7567 {
7568 int temp;
7569 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7570 if ( !arg2 )
7571 SWIG_fail;
7572 Ylen = temp;
7573 }
7574 {
7575 int jj;
7576
7577 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7578 if ( !arg3 )
7579 SWIG_fail;
7580 arg4 = ii3;
7581 arg5 = jj;
7582 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7583 {
7584 lua_pushfstring( L, "Vectors must match matrix." );
7585 SWIG_fail;
7586 }
7587 }
7588 arg6 = (PLINT)lua_tonumber(L, 4);
7589 {
7590 int temp;
7591 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7592 if ( !arg7 )
7593 SWIG_fail;
7594 arg8 = Alen = temp;
7595 }
7596 arg9 = (PLINT)lua_tonumber(L, 6);
7597 {
7598 arg11 = (PLINT *) LUA_get_int_num_array_var( L, 7, &arg10 );
7599 if ( !arg11 )
7600 SWIG_fail;
7601 Alen = arg10;
7602 }
7603 {
7604 arg12 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp12 );
7605 if ( !arg12 )
7606 SWIG_fail;
7607 if ( temp12 != Alen )
7608 {
7609 lua_pushfstring( L, "Tables must be of same length." );
7610 SWIG_fail;
7611 }
7612 }
7613 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);
7614
7615 {
7616 LUA_FREE_ARRAY( arg1 );
7617 }
7618 {
7619 LUA_FREE_ARRAY( arg2 );
7620 }
7621 {
7622 int i;
7623
7624 if ( arg3 )
7625 {
7626 for ( i = 0; i < ii3; i++ )
7627 LUA_FREE_ARRAY( arg3[i] );
7628 LUA_FREE_ARRAY( arg3 );
7629 }
7630 }
7631 {
7632 LUA_FREE_ARRAY( arg7 );
7633 }
7634 {
7635 LUA_FREE_ARRAY( arg11 );
7636 }
7637 {
7638 LUA_FREE_ARRAY( arg12 );
7639 }
7640 return SWIG_arg;
7641
7642 if(0) SWIG_fail;
7643
7644fail:
7645 {
7646 LUA_FREE_ARRAY( arg1 );
7647 }
7648 {
7649 LUA_FREE_ARRAY( arg2 );
7650 }
7651 {
7652 int i;
7653
7654 if ( arg3 )
7655 {
7656 for ( i = 0; i < ii3; i++ )
7657 LUA_FREE_ARRAY( arg3[i] );
7658 LUA_FREE_ARRAY( arg3 );
7659 }
7660 }
7661 {
7662 LUA_FREE_ARRAY( arg7 );
7663 }
7664 {
7665 LUA_FREE_ARRAY( arg11 );
7666 }
7667 {
7668 LUA_FREE_ARRAY( arg12 );
7669 }
7670 lua_error(L);
7671 return SWIG_arg;
7672}
7673
7674
7675static int _wrap_surf3d(lua_State* L) {
7676 int SWIG_arg = 0;
7677 PLFLT *arg1 = (PLFLT *) 0 ;
7678 PLFLT *arg2 = (PLFLT *) 0 ;
7679 PLFLT **arg3 = (PLFLT **) 0 ;
7680 PLINT arg4 ;
7681 PLINT arg5 ;
7682 PLINT arg6 ;
7683 PLFLT *arg7 = (PLFLT *) 0 ;
7684 PLINT arg8 ;
7685 int ii3 ;
7686
7687 SWIG_check_num_args("plsurf3d",5,5)
7688 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsurf3d",4,"PLINT");
7689 {
7690 int temp;
7691 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7692 if ( !arg1 )
7693 SWIG_fail;
7694 Xlen = temp;
7695 }
7696 {
7697 int temp;
7698 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7699 if ( !arg2 )
7700 SWIG_fail;
7701 Ylen = temp;
7702 }
7703 {
7704 int jj;
7705
7706 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7707 if ( !arg3 )
7708 SWIG_fail;
7709 arg4 = ii3;
7710 arg5 = jj;
7711 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7712 {
7713 lua_pushfstring( L, "Vectors must match matrix." );
7714 SWIG_fail;
7715 }
7716 }
7717 arg6 = (PLINT)lua_tonumber(L, 4);
7718 {
7719 int temp;
7720 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7721 if ( !arg7 )
7722 SWIG_fail;
7723 arg8 = Alen = temp;
7724 }
7725 plsurf3d((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
7726
7727 {
7728 LUA_FREE_ARRAY( arg1 );
7729 }
7730 {
7731 LUA_FREE_ARRAY( arg2 );
7732 }
7733 {
7734 int i;
7735
7736 if ( arg3 )
7737 {
7738 for ( i = 0; i < ii3; i++ )
7739 LUA_FREE_ARRAY( arg3[i] );
7740 LUA_FREE_ARRAY( arg3 );
7741 }
7742 }
7743 {
7744 LUA_FREE_ARRAY( arg7 );
7745 }
7746 return SWIG_arg;
7747
7748 if(0) SWIG_fail;
7749
7750fail:
7751 {
7752 LUA_FREE_ARRAY( arg1 );
7753 }
7754 {
7755 LUA_FREE_ARRAY( arg2 );
7756 }
7757 {
7758 int i;
7759
7760 if ( arg3 )
7761 {
7762 for ( i = 0; i < ii3; i++ )
7763 LUA_FREE_ARRAY( arg3[i] );
7764 LUA_FREE_ARRAY( arg3 );
7765 }
7766 }
7767 {
7768 LUA_FREE_ARRAY( arg7 );
7769 }
7770 lua_error(L);
7771 return SWIG_arg;
7772}
7773
7774
7775static int _wrap_surf3dl(lua_State* L) {
7776 int SWIG_arg = 0;
7777 PLFLT *arg1 = (PLFLT *) 0 ;
7778 PLFLT *arg2 = (PLFLT *) 0 ;
7779 PLFLT **arg3 = (PLFLT **) 0 ;
7780 PLINT arg4 ;
7781 PLINT arg5 ;
7782 PLINT arg6 ;
7783 PLFLT *arg7 = (PLFLT *) 0 ;
7784 PLINT arg8 ;
7785 PLINT arg9 ;
7786 PLINT arg10 ;
7787 PLINT *arg11 = (PLINT *) 0 ;
7788 PLINT *arg12 = (PLINT *) 0 ;
7789 int ii3 ;
7790 int temp12 ;
7791
7792 SWIG_check_num_args("plsurf3dl",8,8)
7793 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsurf3dl",4,"PLINT");
7794 if(!lua_isnumber(L,6)) SWIG_fail_arg("plsurf3dl",6,"PLINT");
7795 {
7796 int temp;
7797 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7798 if ( !arg1 )
7799 SWIG_fail;
7800 Xlen = temp;
7801 }
7802 {
7803 int temp;
7804 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7805 if ( !arg2 )
7806 SWIG_fail;
7807 Ylen = temp;
7808 }
7809 {
7810 int jj;
7811
7812 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
7813 if ( !arg3 )
7814 SWIG_fail;
7815 arg4 = ii3;
7816 arg5 = jj;
7817 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
7818 {
7819 lua_pushfstring( L, "Vectors must match matrix." );
7820 SWIG_fail;
7821 }
7822 }
7823 arg6 = (PLINT)lua_tonumber(L, 4);
7824 {
7825 int temp;
7826 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
7827 if ( !arg7 )
7828 SWIG_fail;
7829 arg8 = Alen = temp;
7830 }
7831 arg9 = (PLINT)lua_tonumber(L, 6);
7832 {
7833 arg11 = (PLINT *) LUA_get_int_num_array_var( L, 7, &arg10 );
7834 if ( !arg11 )
7835 SWIG_fail;
7836 Alen = arg10;
7837 }
7838 {
7839 arg12 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp12 );
7840 if ( !arg12 )
7841 SWIG_fail;
7842 if ( temp12 != Alen )
7843 {
7844 lua_pushfstring( L, "Tables must be of same length." );
7845 SWIG_fail;
7846 }
7847 }
7848 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);
7849
7850 {
7851 LUA_FREE_ARRAY( arg1 );
7852 }
7853 {
7854 LUA_FREE_ARRAY( arg2 );
7855 }
7856 {
7857 int i;
7858
7859 if ( arg3 )
7860 {
7861 for ( i = 0; i < ii3; i++ )
7862 LUA_FREE_ARRAY( arg3[i] );
7863 LUA_FREE_ARRAY( arg3 );
7864 }
7865 }
7866 {
7867 LUA_FREE_ARRAY( arg7 );
7868 }
7869 {
7870 LUA_FREE_ARRAY( arg11 );
7871 }
7872 {
7873 LUA_FREE_ARRAY( arg12 );
7874 }
7875 return SWIG_arg;
7876
7877 if(0) SWIG_fail;
7878
7879fail:
7880 {
7881 LUA_FREE_ARRAY( arg1 );
7882 }
7883 {
7884 LUA_FREE_ARRAY( arg2 );
7885 }
7886 {
7887 int i;
7888
7889 if ( arg3 )
7890 {
7891 for ( i = 0; i < ii3; i++ )
7892 LUA_FREE_ARRAY( arg3[i] );
7893 LUA_FREE_ARRAY( arg3 );
7894 }
7895 }
7896 {
7897 LUA_FREE_ARRAY( arg7 );
7898 }
7899 {
7900 LUA_FREE_ARRAY( arg11 );
7901 }
7902 {
7903 LUA_FREE_ARRAY( arg12 );
7904 }
7905 lua_error(L);
7906 return SWIG_arg;
7907}
7908
7909
7910static int _wrap_parseopts(lua_State* L) {
7911 int SWIG_arg = 0;
7912 int *arg1 = (int *) 0 ;
7913 char **arg2 = (char **) 0 ;
7914 PLINT arg3 ;
7915 PLINT result;
7916
7917 SWIG_check_num_args("plparseopts",2,2)
7918 if(!lua_istable(L,1)) SWIG_fail_arg("plparseopts",1,"int *");
7919 if(!lua_isnumber(L,2)) SWIG_fail_arg("plparseopts",2,"PLINT");
7920 {
7921 int i, n;
7922
7923 // from lua 5.1 on there is no element "n" anymore,
7924 // so we need to find out the number of command line
7925 // options manually
7926 for ( i = 1;; i++ )
7927 {
7928 lua_rawgeti( L, 1, i );
7929 if ( lua_isnil( L, -1 ) )
7930 {
7931 // ok, this index doesn't exist anymore, we have i-1
7932 // command line options
7933 lua_pop( L, 1 );
7934 break;
7935 }
7936 }
7937 n = i;
7938 arg1 = &n;
7939
7940 arg2 = LUA_ALLOC_ARRAY( char*, ( n + 1 ) );
7941
7942 for ( i = 0; i < n; i++ )
7943 {
7944 lua_rawgeti( L, 1, i );
7945 if ( lua_isstring( L, -1 ) )
7946 {
7947 arg2[i] = (char *) lua_tostring( L, -1 );
7948 }
7949 else
7950 {
7951 lua_pop( L, 1 );
7952 lua_pushfstring( L, "List items must be strings" );
7953 SWIG_fail;
7954 // arg2 array is freed after 'fail:'
7955 }
7956 lua_pop( L, 1 );
7957 }
7958 arg2[n] = NULL;
7959 }
7960 arg3 = (PLINT)lua_tonumber(L, 2);
7961 result = (PLINT)plparseopts(arg1,arg2,arg3);
7962 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
7963 {
7964 LUA_FREE_ARRAY( arg2 );
7965 }
7966 return SWIG_arg;
7967
7968 if(0) SWIG_fail;
7969
7970fail:
7971 {
7972 LUA_FREE_ARRAY( arg2 );
7973 }
7974 lua_error(L);
7975 return SWIG_arg;
7976}
7977
7978
7979static int _wrap_pat(lua_State* L) {
7980 int SWIG_arg = 0;
7981 PLINT arg1 ;
7982 PLINT *arg2 = (PLINT *) 0 ;
7983 PLINT *arg3 = (PLINT *) 0 ;
7984 int temp3 ;
7985
7986 SWIG_check_num_args("plpat",2,2)
7987 {
7988 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 1, &arg1 );
7989 if ( !arg2 )
7990 SWIG_fail;
7991 Alen = arg1;
7992 }
7993 {
7994 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp3 );
7995 if ( !arg3 )
7996 SWIG_fail;
7997 if ( temp3 != Alen )
7998 {
7999 lua_pushfstring( L, "Tables must be of same length." );
8000 SWIG_fail;
8001 }
8002 }
8003 plpat(arg1,(int const *)arg2,(int const *)arg3);
8004
8005 {
8006 LUA_FREE_ARRAY( arg2 );
8007 }
8008 {
8009 LUA_FREE_ARRAY( arg3 );
8010 }
8011 return SWIG_arg;
8012
8013 if(0) SWIG_fail;
8014
8015fail:
8016 {
8017 LUA_FREE_ARRAY( arg2 );
8018 }
8019 {
8020 LUA_FREE_ARRAY( arg3 );
8021 }
8022 lua_error(L);
8023 return SWIG_arg;
8024}
8025
8026
8027static int _wrap_path(lua_State* L) {
8028 int SWIG_arg = 0;
8029 PLINT arg1 ;
8030 PLFLT arg2 ;
8031 PLFLT arg3 ;
8032 PLFLT arg4 ;
8033 PLFLT arg5 ;
8034
8035 SWIG_check_num_args("plpath",5,5)
8036 if(!lua_isnumber(L,1)) SWIG_fail_arg("plpath",1,"PLINT");
8037 if(!lua_isnumber(L,2)) SWIG_fail_arg("plpath",2,"PLFLT");
8038 if(!lua_isnumber(L,3)) SWIG_fail_arg("plpath",3,"PLFLT");
8039 if(!lua_isnumber(L,4)) SWIG_fail_arg("plpath",4,"PLFLT");
8040 if(!lua_isnumber(L,5)) SWIG_fail_arg("plpath",5,"PLFLT");
8041 arg1 = (PLINT)lua_tonumber(L, 1);
8042 arg2 = (PLFLT)lua_tonumber(L, 2);
8043 arg3 = (PLFLT)lua_tonumber(L, 3);
8044 arg4 = (PLFLT)lua_tonumber(L, 4);
8045 arg5 = (PLFLT)lua_tonumber(L, 5);
8046 plpath(arg1,arg2,arg3,arg4,arg5);
8047
8048 return SWIG_arg;
8049
8050 if(0) SWIG_fail;
8051
8052fail:
8053 lua_error(L);
8054 return SWIG_arg;
8055}
8056
8057
8058static int _wrap_poin(lua_State* L) {
8059 int SWIG_arg = 0;
8060 PLINT arg1 ;
8061 PLFLT *arg2 = (PLFLT *) 0 ;
8062 PLFLT *arg3 = (PLFLT *) 0 ;
8063 PLINT arg4 ;
8064 int temp3 ;
8065
8066 SWIG_check_num_args("plpoin",3,3)
8067 if(!lua_isnumber(L,3)) SWIG_fail_arg("plpoin",3,"PLINT");
8068 {
8069 int temp;
8070 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
8071 if ( !arg2 )
8072 SWIG_fail;
8073 arg1 = Alen = temp;
8074 }
8075 {
8076 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
8077 if ( !arg3 )
8078 SWIG_fail;
8079 if ( temp3 != Alen )
8080 {
8081 lua_pushfstring( L, "Tables must be of same length." );
8082 SWIG_fail;
8083 }
8084 }
8085 arg4 = (PLINT)lua_tonumber(L, 3);
8086 plpoin(arg1,(double const *)arg2,(double const *)arg3,arg4);
8087
8088 {
8089 LUA_FREE_ARRAY( arg2 );
8090 }
8091 {
8092 LUA_FREE_ARRAY( arg3 );
8093 }
8094 return SWIG_arg;
8095
8096 if(0) SWIG_fail;
8097
8098fail:
8099 {
8100 LUA_FREE_ARRAY( arg2 );
8101 }
8102 {
8103 LUA_FREE_ARRAY( arg3 );
8104 }
8105 lua_error(L);
8106 return SWIG_arg;
8107}
8108
8109
8110static int _wrap_poin3(lua_State* L) {
8111 int SWIG_arg = 0;
8112 PLINT arg1 ;
8113 PLFLT *arg2 = (PLFLT *) 0 ;
8114 PLFLT *arg3 = (PLFLT *) 0 ;
8115 PLFLT *arg4 = (PLFLT *) 0 ;
8116 PLINT arg5 ;
8117 int temp3 ;
8118 int temp4 ;
8119
8120 SWIG_check_num_args("plpoin3",4,4)
8121 if(!lua_isnumber(L,4)) SWIG_fail_arg("plpoin3",4,"PLINT");
8122 {
8123 int temp;
8124 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
8125 if ( !arg2 )
8126 SWIG_fail;
8127 arg1 = Alen = temp;
8128 }
8129 {
8130 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
8131 if ( !arg3 )
8132 SWIG_fail;
8133 if ( temp3 != Alen )
8134 {
8135 lua_pushfstring( L, "Tables must be of same length." );
8136 SWIG_fail;
8137 }
8138 }
8139 {
8140 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8141 if ( !arg4 )
8142 SWIG_fail;
8143 if ( temp4 != Alen )
8144 {
8145 lua_pushfstring( L, "Tables must be of same length." );
8146 SWIG_fail;
8147 }
8148 }
8149 arg5 = (PLINT)lua_tonumber(L, 4);
8150 plpoin3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,arg5);
8151
8152 {
8153 LUA_FREE_ARRAY( arg2 );
8154 }
8155 {
8156 LUA_FREE_ARRAY( arg3 );
8157 }
8158 {
8159 LUA_FREE_ARRAY( arg4 );
8160 }
8161 return SWIG_arg;
8162
8163 if(0) SWIG_fail;
8164
8165fail:
8166 {
8167 LUA_FREE_ARRAY( arg2 );
8168 }
8169 {
8170 LUA_FREE_ARRAY( arg3 );
8171 }
8172 {
8173 LUA_FREE_ARRAY( arg4 );
8174 }
8175 lua_error(L);
8176 return SWIG_arg;
8177}
8178
8179
8180static int _wrap_poly3(lua_State* L) {
8181 int SWIG_arg = 0;
8182 PLINT arg1 ;
8183 PLFLT *arg2 = (PLFLT *) 0 ;
8184 PLFLT *arg3 = (PLFLT *) 0 ;
8185 PLFLT *arg4 = (PLFLT *) 0 ;
8186 PLBOOL *arg5 = (PLBOOL *) 0 ;
8187 PLBOOL arg6 ;
8188 int temp3 ;
8189 int temp4 ;
8190 int temp5 ;
8191
8192 SWIG_check_num_args("plpoly3",5,5)
8193 if(!lua_isnumber(L,5)) SWIG_fail_arg("plpoly3",5,"PLBOOL");
8194 {
8195 int temp;
8196 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
8197 if ( !arg2 )
8198 SWIG_fail;
8199 arg1 = Alen = temp;
8200 }
8201 {
8202 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
8203 if ( !arg3 )
8204 SWIG_fail;
8205 if ( temp3 != Alen )
8206 {
8207 lua_pushfstring( L, "Tables must be of same length." );
8208 SWIG_fail;
8209 }
8210 }
8211 {
8212 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8213 if ( !arg4 )
8214 SWIG_fail;
8215 if ( temp4 != Alen )
8216 {
8217 lua_pushfstring( L, "Tables must be of same length." );
8218 SWIG_fail;
8219 }
8220 }
8221 {
8222 arg5 = (PLINT *) LUA_get_int_num_array_var( L, 4, &temp5 );
8223 if ( !arg5 )
8224 SWIG_fail;
8225 if ( temp5 < Alen - 1 )
8226 {
8227 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8228 SWIG_fail;
8229 }
8230 }
8231 arg6 = (PLBOOL)lua_tonumber(L, 5);
8232 plpoly3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,(int const *)arg5,arg6);
8233
8234 {
8235 LUA_FREE_ARRAY( arg2 );
8236 }
8237 {
8238 LUA_FREE_ARRAY( arg3 );
8239 }
8240 {
8241 LUA_FREE_ARRAY( arg4 );
8242 }
8243 {
8244 LUA_FREE_ARRAY( arg5 );
8245 }
8246 return SWIG_arg;
8247
8248 if(0) SWIG_fail;
8249
8250fail:
8251 {
8252 LUA_FREE_ARRAY( arg2 );
8253 }
8254 {
8255 LUA_FREE_ARRAY( arg3 );
8256 }
8257 {
8258 LUA_FREE_ARRAY( arg4 );
8259 }
8260 {
8261 LUA_FREE_ARRAY( arg5 );
8262 }
8263 lua_error(L);
8264 return SWIG_arg;
8265}
8266
8267
8268static int _wrap_prec(lua_State* L) {
8269 int SWIG_arg = 0;
8270 PLINT arg1 ;
8271 PLINT arg2 ;
8272
8273 SWIG_check_num_args("plprec",2,2)
8274 if(!lua_isnumber(L,1)) SWIG_fail_arg("plprec",1,"PLINT");
8275 if(!lua_isnumber(L,2)) SWIG_fail_arg("plprec",2,"PLINT");
8276 arg1 = (PLINT)lua_tonumber(L, 1);
8277 arg2 = (PLINT)lua_tonumber(L, 2);
8278 plprec(arg1,arg2);
8279
8280 return SWIG_arg;
8281
8282 if(0) SWIG_fail;
8283
8284fail:
8285 lua_error(L);
8286 return SWIG_arg;
8287}
8288
8289
8290static int _wrap_psty(lua_State* L) {
8291 int SWIG_arg = 0;
8292 PLINT arg1 ;
8293
8294 SWIG_check_num_args("plpsty",1,1)
8295 if(!lua_isnumber(L,1)) SWIG_fail_arg("plpsty",1,"PLINT");
8296 arg1 = (PLINT)lua_tonumber(L, 1);
8297 plpsty(arg1);
8298
8299 return SWIG_arg;
8300
8301 if(0) SWIG_fail;
8302
8303fail:
8304 lua_error(L);
8305 return SWIG_arg;
8306}
8307
8308
8309static int _wrap_ptex(lua_State* L) {
8310 int SWIG_arg = 0;
8311 PLFLT arg1 ;
8312 PLFLT arg2 ;
8313 PLFLT arg3 ;
8314 PLFLT arg4 ;
8315 PLFLT arg5 ;
8316 char *arg6 = (char *) 0 ;
8317
8318 SWIG_check_num_args("plptex",6,6)
8319 if(!lua_isnumber(L,1)) SWIG_fail_arg("plptex",1,"PLFLT");
8320 if(!lua_isnumber(L,2)) SWIG_fail_arg("plptex",2,"PLFLT");
8321 if(!lua_isnumber(L,3)) SWIG_fail_arg("plptex",3,"PLFLT");
8322 if(!lua_isnumber(L,4)) SWIG_fail_arg("plptex",4,"PLFLT");
8323 if(!lua_isnumber(L,5)) SWIG_fail_arg("plptex",5,"PLFLT");
8324 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plptex",6,"char const *");
8325 arg1 = (PLFLT)lua_tonumber(L, 1);
8326 arg2 = (PLFLT)lua_tonumber(L, 2);
8327 arg3 = (PLFLT)lua_tonumber(L, 3);
8328 arg4 = (PLFLT)lua_tonumber(L, 4);
8329 arg5 = (PLFLT)lua_tonumber(L, 5);
8330 arg6 = (char *)lua_tostring(L, 6);
8331 plptex(arg1,arg2,arg3,arg4,arg5,(char const *)arg6);
8332
8333 return SWIG_arg;
8334
8335 if(0) SWIG_fail;
8336
8337fail:
8338 lua_error(L);
8339 return SWIG_arg;
8340}
8341
8342
8343static int _wrap_ptex3(lua_State* L) {
8344 int SWIG_arg = 0;
8345 PLFLT arg1 ;
8346 PLFLT arg2 ;
8347 PLFLT arg3 ;
8348 PLFLT arg4 ;
8349 PLFLT arg5 ;
8350 PLFLT arg6 ;
8351 PLFLT arg7 ;
8352 PLFLT arg8 ;
8353 PLFLT arg9 ;
8354 PLFLT arg10 ;
8355 char *arg11 = (char *) 0 ;
8356
8357 SWIG_check_num_args("plptex3",11,11)
8358 if(!lua_isnumber(L,1)) SWIG_fail_arg("plptex3",1,"PLFLT");
8359 if(!lua_isnumber(L,2)) SWIG_fail_arg("plptex3",2,"PLFLT");
8360 if(!lua_isnumber(L,3)) SWIG_fail_arg("plptex3",3,"PLFLT");
8361 if(!lua_isnumber(L,4)) SWIG_fail_arg("plptex3",4,"PLFLT");
8362 if(!lua_isnumber(L,5)) SWIG_fail_arg("plptex3",5,"PLFLT");
8363 if(!lua_isnumber(L,6)) SWIG_fail_arg("plptex3",6,"PLFLT");
8364 if(!lua_isnumber(L,7)) SWIG_fail_arg("plptex3",7,"PLFLT");
8365 if(!lua_isnumber(L,8)) SWIG_fail_arg("plptex3",8,"PLFLT");
8366 if(!lua_isnumber(L,9)) SWIG_fail_arg("plptex3",9,"PLFLT");
8367 if(!lua_isnumber(L,10)) SWIG_fail_arg("plptex3",10,"PLFLT");
8368 if(!SWIG_lua_isnilstring(L,11)) SWIG_fail_arg("plptex3",11,"char const *");
8369 arg1 = (PLFLT)lua_tonumber(L, 1);
8370 arg2 = (PLFLT)lua_tonumber(L, 2);
8371 arg3 = (PLFLT)lua_tonumber(L, 3);
8372 arg4 = (PLFLT)lua_tonumber(L, 4);
8373 arg5 = (PLFLT)lua_tonumber(L, 5);
8374 arg6 = (PLFLT)lua_tonumber(L, 6);
8375 arg7 = (PLFLT)lua_tonumber(L, 7);
8376 arg8 = (PLFLT)lua_tonumber(L, 8);
8377 arg9 = (PLFLT)lua_tonumber(L, 9);
8378 arg10 = (PLFLT)lua_tonumber(L, 10);
8379 arg11 = (char *)lua_tostring(L, 11);
8380 plptex3(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,(char const *)arg11);
8381
8382 return SWIG_arg;
8383
8384 if(0) SWIG_fail;
8385
8386fail:
8387 lua_error(L);
8388 return SWIG_arg;
8389}
8390
8391
8392static int _wrap_randd(lua_State* L) {
8393 int SWIG_arg = 0;
8394 PLFLT result;
8395
8396 SWIG_check_num_args("plrandd",0,0)
8397 result = (PLFLT)plrandd();
8398 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
8399 return SWIG_arg;
8400
8401 if(0) SWIG_fail;
8402
8403fail:
8404 lua_error(L);
8405 return SWIG_arg;
8406}
8407
8408
8409static int _wrap_replot(lua_State* L) {
8410 int SWIG_arg = 0;
8411
8412 SWIG_check_num_args("plreplot",0,0)
8413 plreplot();
8414
8415 return SWIG_arg;
8416
8417 if(0) SWIG_fail;
8418
8419fail:
8420 lua_error(L);
8421 return SWIG_arg;
8422}
8423
8424
8425static int _wrap_rgbhls(lua_State* L) {
8426 int SWIG_arg = 0;
8427 PLFLT arg1 ;
8428 PLFLT arg2 ;
8429 PLFLT arg3 ;
8430 PLFLT *arg4 = (PLFLT *) 0 ;
8431 PLFLT *arg5 = (PLFLT *) 0 ;
8432 PLFLT *arg6 = (PLFLT *) 0 ;
8433 PLFLT temp4 ;
8434 PLFLT temp5 ;
8435 PLFLT temp6 ;
8436
8437 arg4 = &temp4;
8438 arg5 = &temp5;
8439 arg6 = &temp6;
8440 SWIG_check_num_args("plrgbhls",3,3)
8441 if(!lua_isnumber(L,1)) SWIG_fail_arg("plrgbhls",1,"PLFLT");
8442 if(!lua_isnumber(L,2)) SWIG_fail_arg("plrgbhls",2,"PLFLT");
8443 if(!lua_isnumber(L,3)) SWIG_fail_arg("plrgbhls",3,"PLFLT");
8444 arg1 = (PLFLT)lua_tonumber(L, 1);
8445 arg2 = (PLFLT)lua_tonumber(L, 2);
8446 arg3 = (PLFLT)lua_tonumber(L, 3);
8447 plrgbhls(arg1,arg2,arg3,arg4,arg5,arg6);
8448
8449 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
8450 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
8451 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
8452 return SWIG_arg;
8453
8454 if(0) SWIG_fail;
8455
8456fail:
8457 lua_error(L);
8458 return SWIG_arg;
8459}
8460
8461
8462static int _wrap_schr(lua_State* L) {
8463 int SWIG_arg = 0;
8464 PLFLT arg1 ;
8465 PLFLT arg2 ;
8466
8467 SWIG_check_num_args("plschr",2,2)
8468 if(!lua_isnumber(L,1)) SWIG_fail_arg("plschr",1,"PLFLT");
8469 if(!lua_isnumber(L,2)) SWIG_fail_arg("plschr",2,"PLFLT");
8470 arg1 = (PLFLT)lua_tonumber(L, 1);
8471 arg2 = (PLFLT)lua_tonumber(L, 2);
8472 plschr(arg1,arg2);
8473
8474 return SWIG_arg;
8475
8476 if(0) SWIG_fail;
8477
8478fail:
8479 lua_error(L);
8480 return SWIG_arg;
8481}
8482
8483
8484static int _wrap_scmap0(lua_State* L) {
8485 int SWIG_arg = 0;
8486 PLINT *arg1 = (PLINT *) 0 ;
8487 PLINT *arg2 = (PLINT *) 0 ;
8488 PLINT *arg3 = (PLINT *) 0 ;
8489 PLINT arg4 ;
8490 int temp1 ;
8491 int temp2 ;
8492 int temp3 ;
8493
8494 SWIG_check_num_args("plscmap0",3,3)
8495 {
8496 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8497 if ( !arg1 )
8498 SWIG_fail;
8499 Alen = temp1;
8500 }
8501 {
8502 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8503 if ( !arg2 )
8504 SWIG_fail;
8505 if ( temp2 != Alen )
8506 {
8507 lua_pushfstring( L, "Tables must be of same length." );
8508 SWIG_fail;
8509 }
8510 }
8511 {
8512 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8513 if ( !arg3 )
8514 SWIG_fail;
8515 if ( temp3 != Alen )
8516 {
8517 lua_pushfstring( L, "Tables must be of same length." );
8518 SWIG_fail;
8519 }
8520 arg4 = temp3;
8521 }
8522 plscmap0((int const *)arg1,(int const *)arg2,(int const *)arg3,arg4);
8523
8524 {
8525 LUA_FREE_ARRAY( arg1 );
8526 }
8527 {
8528 LUA_FREE_ARRAY( arg2 );
8529 }
8530 {
8531 LUA_FREE_ARRAY( arg3 );
8532 }
8533 return SWIG_arg;
8534
8535 if(0) SWIG_fail;
8536
8537fail:
8538 {
8539 LUA_FREE_ARRAY( arg1 );
8540 }
8541 {
8542 LUA_FREE_ARRAY( arg2 );
8543 }
8544 {
8545 LUA_FREE_ARRAY( arg3 );
8546 }
8547 lua_error(L);
8548 return SWIG_arg;
8549}
8550
8551
8552static int _wrap_scmap0a(lua_State* L) {
8553 int SWIG_arg = 0;
8554 PLINT *arg1 = (PLINT *) 0 ;
8555 PLINT *arg2 = (PLINT *) 0 ;
8556 PLINT *arg3 = (PLINT *) 0 ;
8557 PLFLT *arg4 = (PLFLT *) 0 ;
8558 PLINT arg5 ;
8559 int temp1 ;
8560 int temp2 ;
8561 int temp3 ;
8562
8563 SWIG_check_num_args("plscmap0a",4,4)
8564 {
8565 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8566 if ( !arg1 )
8567 SWIG_fail;
8568 Alen = temp1;
8569 }
8570 {
8571 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8572 if ( !arg2 )
8573 SWIG_fail;
8574 if ( temp2 != Alen )
8575 {
8576 lua_pushfstring( L, "Tables must be of same length." );
8577 SWIG_fail;
8578 }
8579 }
8580 {
8581 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8582 if ( !arg3 )
8583 SWIG_fail;
8584 if ( temp3 != Alen )
8585 {
8586 lua_pushfstring( L, "Tables must be of same length." );
8587 SWIG_fail;
8588 }
8589 }
8590 {
8591 int temp;
8592 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
8593 if ( !arg4 )
8594 SWIG_fail;
8595 if ( temp != Alen )
8596 {
8597 lua_pushfstring( L, "Tables must be of same length." );
8598 SWIG_fail;
8599 }
8600 arg5 = temp;
8601 }
8602 plscmap0a((int const *)arg1,(int const *)arg2,(int const *)arg3,(double const *)arg4,arg5);
8603
8604 {
8605 LUA_FREE_ARRAY( arg1 );
8606 }
8607 {
8608 LUA_FREE_ARRAY( arg2 );
8609 }
8610 {
8611 LUA_FREE_ARRAY( arg3 );
8612 }
8613 {
8614 LUA_FREE_ARRAY( arg4 );
8615 }
8616 return SWIG_arg;
8617
8618 if(0) SWIG_fail;
8619
8620fail:
8621 {
8622 LUA_FREE_ARRAY( arg1 );
8623 }
8624 {
8625 LUA_FREE_ARRAY( arg2 );
8626 }
8627 {
8628 LUA_FREE_ARRAY( arg3 );
8629 }
8630 {
8631 LUA_FREE_ARRAY( arg4 );
8632 }
8633 lua_error(L);
8634 return SWIG_arg;
8635}
8636
8637
8638static int _wrap_scmap0n(lua_State* L) {
8639 int SWIG_arg = 0;
8640 PLINT arg1 ;
8641
8642 SWIG_check_num_args("plscmap0n",1,1)
8643 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap0n",1,"PLINT");
8644 arg1 = (PLINT)lua_tonumber(L, 1);
8645 plscmap0n(arg1);
8646
8647 return SWIG_arg;
8648
8649 if(0) SWIG_fail;
8650
8651fail:
8652 lua_error(L);
8653 return SWIG_arg;
8654}
8655
8656
8657static int _wrap_scmap1(lua_State* L) {
8658 int SWIG_arg = 0;
8659 PLINT *arg1 = (PLINT *) 0 ;
8660 PLINT *arg2 = (PLINT *) 0 ;
8661 PLINT *arg3 = (PLINT *) 0 ;
8662 PLINT arg4 ;
8663 int temp1 ;
8664 int temp2 ;
8665 int temp3 ;
8666
8667 SWIG_check_num_args("plscmap1",3,3)
8668 {
8669 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8670 if ( !arg1 )
8671 SWIG_fail;
8672 Alen = temp1;
8673 }
8674 {
8675 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8676 if ( !arg2 )
8677 SWIG_fail;
8678 if ( temp2 != Alen )
8679 {
8680 lua_pushfstring( L, "Tables must be of same length." );
8681 SWIG_fail;
8682 }
8683 }
8684 {
8685 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8686 if ( !arg3 )
8687 SWIG_fail;
8688 if ( temp3 != Alen )
8689 {
8690 lua_pushfstring( L, "Tables must be of same length." );
8691 SWIG_fail;
8692 }
8693 arg4 = temp3;
8694 }
8695 plscmap1((int const *)arg1,(int const *)arg2,(int const *)arg3,arg4);
8696
8697 {
8698 LUA_FREE_ARRAY( arg1 );
8699 }
8700 {
8701 LUA_FREE_ARRAY( arg2 );
8702 }
8703 {
8704 LUA_FREE_ARRAY( arg3 );
8705 }
8706 return SWIG_arg;
8707
8708 if(0) SWIG_fail;
8709
8710fail:
8711 {
8712 LUA_FREE_ARRAY( arg1 );
8713 }
8714 {
8715 LUA_FREE_ARRAY( arg2 );
8716 }
8717 {
8718 LUA_FREE_ARRAY( arg3 );
8719 }
8720 lua_error(L);
8721 return SWIG_arg;
8722}
8723
8724
8725static int _wrap_scmap1a(lua_State* L) {
8726 int SWIG_arg = 0;
8727 PLINT *arg1 = (PLINT *) 0 ;
8728 PLINT *arg2 = (PLINT *) 0 ;
8729 PLINT *arg3 = (PLINT *) 0 ;
8730 PLFLT *arg4 = (PLFLT *) 0 ;
8731 PLINT arg5 ;
8732 int temp1 ;
8733 int temp2 ;
8734 int temp3 ;
8735
8736 SWIG_check_num_args("plscmap1a",4,4)
8737 {
8738 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
8739 if ( !arg1 )
8740 SWIG_fail;
8741 Alen = temp1;
8742 }
8743 {
8744 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
8745 if ( !arg2 )
8746 SWIG_fail;
8747 if ( temp2 != Alen )
8748 {
8749 lua_pushfstring( L, "Tables must be of same length." );
8750 SWIG_fail;
8751 }
8752 }
8753 {
8754 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
8755 if ( !arg3 )
8756 SWIG_fail;
8757 if ( temp3 != Alen )
8758 {
8759 lua_pushfstring( L, "Tables must be of same length." );
8760 SWIG_fail;
8761 }
8762 }
8763 {
8764 int temp;
8765 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
8766 if ( !arg4 )
8767 SWIG_fail;
8768 if ( temp != Alen )
8769 {
8770 lua_pushfstring( L, "Tables must be of same length." );
8771 SWIG_fail;
8772 }
8773 arg5 = temp;
8774 }
8775 plscmap1a((int const *)arg1,(int const *)arg2,(int const *)arg3,(double const *)arg4,arg5);
8776
8777 {
8778 LUA_FREE_ARRAY( arg1 );
8779 }
8780 {
8781 LUA_FREE_ARRAY( arg2 );
8782 }
8783 {
8784 LUA_FREE_ARRAY( arg3 );
8785 }
8786 {
8787 LUA_FREE_ARRAY( arg4 );
8788 }
8789 return SWIG_arg;
8790
8791 if(0) SWIG_fail;
8792
8793fail:
8794 {
8795 LUA_FREE_ARRAY( arg1 );
8796 }
8797 {
8798 LUA_FREE_ARRAY( arg2 );
8799 }
8800 {
8801 LUA_FREE_ARRAY( arg3 );
8802 }
8803 {
8804 LUA_FREE_ARRAY( arg4 );
8805 }
8806 lua_error(L);
8807 return SWIG_arg;
8808}
8809
8810
8811static int _wrap_scmap1l(lua_State* L) {
8812 int SWIG_arg = 0;
8813 PLBOOL arg1 ;
8814 PLINT arg2 ;
8815 PLFLT *arg3 = (PLFLT *) 0 ;
8816 PLFLT *arg4 = (PLFLT *) 0 ;
8817 PLFLT *arg5 = (PLFLT *) 0 ;
8818 PLFLT *arg6 = (PLFLT *) 0 ;
8819 PLBOOL *arg7 = (PLBOOL *) 0 ;
8820 int temp4 ;
8821 int temp5 ;
8822 int temp6 ;
8823 int temp7 ;
8824
8825 {
8826 arg7 = NULL;
8827 }
8828 SWIG_check_num_args("plscmap1l",5,6)
8829 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1l",1,"PLBOOL");
8830 arg1 = (PLBOOL)lua_tonumber(L, 1);
8831 {
8832 int temp;
8833 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
8834 if ( !arg3 )
8835 SWIG_fail;
8836 arg2 = Alen = temp;
8837 }
8838 {
8839 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8840 if ( !arg4 )
8841 SWIG_fail;
8842 if ( temp4 != Alen )
8843 {
8844 lua_pushfstring( L, "Tables must be of same length." );
8845 SWIG_fail;
8846 }
8847 }
8848 {
8849 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp5 );
8850 if ( !arg5 )
8851 SWIG_fail;
8852 if ( temp5 != Alen )
8853 {
8854 lua_pushfstring( L, "Tables must be of same length." );
8855 SWIG_fail;
8856 }
8857 }
8858 {
8859 arg6 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp6 );
8860 if ( !arg6 )
8861 SWIG_fail;
8862 if ( temp6 != Alen )
8863 {
8864 lua_pushfstring( L, "Tables must be of same length." );
8865 SWIG_fail;
8866 }
8867 }
8868 if(lua_gettop(L)>=6){
8869 {
8870 if ( lua_isnil( L, 6 ) )
8871 {
8872 arg7 = NULL;
8873 }
8874 else
8875 {
8876 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 6, &temp7 );
8877 if ( !arg7 )
8878 SWIG_fail;
8879 if ( temp7 < Alen - 1 )
8880 {
8881 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
8882 SWIG_fail;
8883 }
8884 }
8885 }
8886 }
8887 plscmap1l(arg1,arg2,(double const *)arg3,(double const *)arg4,(double const *)arg5,(double const *)arg6,(int const *)arg7);
8888
8889 {
8890 LUA_FREE_ARRAY( arg3 );
8891 }
8892 {
8893 LUA_FREE_ARRAY( arg4 );
8894 }
8895 {
8896 LUA_FREE_ARRAY( arg5 );
8897 }
8898 {
8899 LUA_FREE_ARRAY( arg6 );
8900 }
8901 {
8902 LUA_FREE_ARRAY( arg7 );
8903 }
8904 return SWIG_arg;
8905
8906 if(0) SWIG_fail;
8907
8908fail:
8909 {
8910 LUA_FREE_ARRAY( arg3 );
8911 }
8912 {
8913 LUA_FREE_ARRAY( arg4 );
8914 }
8915 {
8916 LUA_FREE_ARRAY( arg5 );
8917 }
8918 {
8919 LUA_FREE_ARRAY( arg6 );
8920 }
8921 {
8922 LUA_FREE_ARRAY( arg7 );
8923 }
8924 lua_error(L);
8925 return SWIG_arg;
8926}
8927
8928
8929static int _wrap_scmap1la(lua_State* L) {
8930 int SWIG_arg = 0;
8931 PLBOOL arg1 ;
8932 PLINT arg2 ;
8933 PLFLT *arg3 = (PLFLT *) 0 ;
8934 PLFLT *arg4 = (PLFLT *) 0 ;
8935 PLFLT *arg5 = (PLFLT *) 0 ;
8936 PLFLT *arg6 = (PLFLT *) 0 ;
8937 PLFLT *arg7 = (PLFLT *) 0 ;
8938 PLBOOL *arg8 = (PLBOOL *) 0 ;
8939 int temp4 ;
8940 int temp5 ;
8941 int temp6 ;
8942 int temp7 ;
8943 int temp8 ;
8944
8945 {
8946 arg8 = NULL;
8947 }
8948 SWIG_check_num_args("plscmap1la",6,7)
8949 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1la",1,"PLBOOL");
8950 arg1 = (PLBOOL)lua_tonumber(L, 1);
8951 {
8952 int temp;
8953 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
8954 if ( !arg3 )
8955 SWIG_fail;
8956 arg2 = Alen = temp;
8957 }
8958 {
8959 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
8960 if ( !arg4 )
8961 SWIG_fail;
8962 if ( temp4 != Alen )
8963 {
8964 lua_pushfstring( L, "Tables must be of same length." );
8965 SWIG_fail;
8966 }
8967 }
8968 {
8969 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp5 );
8970 if ( !arg5 )
8971 SWIG_fail;
8972 if ( temp5 != Alen )
8973 {
8974 lua_pushfstring( L, "Tables must be of same length." );
8975 SWIG_fail;
8976 }
8977 }
8978 {
8979 arg6 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp6 );
8980 if ( !arg6 )
8981 SWIG_fail;
8982 if ( temp6 != Alen )
8983 {
8984 lua_pushfstring( L, "Tables must be of same length." );
8985 SWIG_fail;
8986 }
8987 }
8988 {
8989 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp7 );
8990 if ( !arg7 )
8991 SWIG_fail;
8992 if ( temp7 != Alen )
8993 {
8994 lua_pushfstring( L, "Tables must be of same length." );
8995 SWIG_fail;
8996 }
8997 }
8998 if(lua_gettop(L)>=7){
8999 {
9000 if ( lua_isnil( L, 7 ) )
9001 {
9002 arg8 = NULL;
9003 }
9004 else
9005 {
9006 arg8 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp8 );
9007 if ( !arg8 )
9008 SWIG_fail;
9009 if ( temp8 < Alen - 1 )
9010 {
9011 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
9012 SWIG_fail;
9013 }
9014 }
9015 }
9016 }
9017 plscmap1la(arg1,arg2,(double const *)arg3,(double const *)arg4,(double const *)arg5,(double const *)arg6,(double const *)arg7,(int const *)arg8);
9018
9019 {
9020 LUA_FREE_ARRAY( arg3 );
9021 }
9022 {
9023 LUA_FREE_ARRAY( arg4 );
9024 }
9025 {
9026 LUA_FREE_ARRAY( arg5 );
9027 }
9028 {
9029 LUA_FREE_ARRAY( arg6 );
9030 }
9031 {
9032 LUA_FREE_ARRAY( arg7 );
9033 }
9034 {
9035 LUA_FREE_ARRAY( arg8 );
9036 }
9037 return SWIG_arg;
9038
9039 if(0) SWIG_fail;
9040
9041fail:
9042 {
9043 LUA_FREE_ARRAY( arg3 );
9044 }
9045 {
9046 LUA_FREE_ARRAY( arg4 );
9047 }
9048 {
9049 LUA_FREE_ARRAY( arg5 );
9050 }
9051 {
9052 LUA_FREE_ARRAY( arg6 );
9053 }
9054 {
9055 LUA_FREE_ARRAY( arg7 );
9056 }
9057 {
9058 LUA_FREE_ARRAY( arg8 );
9059 }
9060 lua_error(L);
9061 return SWIG_arg;
9062}
9063
9064
9065static int _wrap_scmap1n(lua_State* L) {
9066 int SWIG_arg = 0;
9067 PLINT arg1 ;
9068
9069 SWIG_check_num_args("plscmap1n",1,1)
9070 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1n",1,"PLINT");
9071 arg1 = (PLINT)lua_tonumber(L, 1);
9072 plscmap1n(arg1);
9073
9074 return SWIG_arg;
9075
9076 if(0) SWIG_fail;
9077
9078fail:
9079 lua_error(L);
9080 return SWIG_arg;
9081}
9082
9083
9084static int _wrap_scmap1_range(lua_State* L) {
9085 int SWIG_arg = 0;
9086 PLFLT arg1 ;
9087 PLFLT arg2 ;
9088
9089 SWIG_check_num_args("plscmap1_range",2,2)
9090 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1_range",1,"PLFLT");
9091 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscmap1_range",2,"PLFLT");
9092 arg1 = (PLFLT)lua_tonumber(L, 1);
9093 arg2 = (PLFLT)lua_tonumber(L, 2);
9094 plscmap1_range(arg1,arg2);
9095
9096 return SWIG_arg;
9097
9098 if(0) SWIG_fail;
9099
9100fail:
9101 lua_error(L);
9102 return SWIG_arg;
9103}
9104
9105
9106static int _wrap_gcmap1_range(lua_State* L) {
9107 int SWIG_arg = 0;
9108 PLFLT *arg1 = (PLFLT *) 0 ;
9109 PLFLT *arg2 = (PLFLT *) 0 ;
9110 PLFLT temp1 ;
9111 PLFLT temp2 ;
9112
9113 arg1 = &temp1;
9114 arg2 = &temp2;
9115 SWIG_check_num_args("plgcmap1_range",0,0)
9116 plgcmap1_range(arg1,arg2);
9117
9118 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
9119 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
9120 return SWIG_arg;
9121
9122 if(0) SWIG_fail;
9123
9124fail:
9125 lua_error(L);
9126 return SWIG_arg;
9127}
9128
9129
9130static int _wrap_scol0(lua_State* L) {
9131 int SWIG_arg = 0;
9132 PLINT arg1 ;
9133 PLINT arg2 ;
9134 PLINT arg3 ;
9135 PLINT arg4 ;
9136
9137 SWIG_check_num_args("plscol0",4,4)
9138 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscol0",1,"PLINT");
9139 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscol0",2,"PLINT");
9140 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscol0",3,"PLINT");
9141 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscol0",4,"PLINT");
9142 arg1 = (PLINT)lua_tonumber(L, 1);
9143 arg2 = (PLINT)lua_tonumber(L, 2);
9144 arg3 = (PLINT)lua_tonumber(L, 3);
9145 arg4 = (PLINT)lua_tonumber(L, 4);
9146 plscol0(arg1,arg2,arg3,arg4);
9147
9148 return SWIG_arg;
9149
9150 if(0) SWIG_fail;
9151
9152fail:
9153 lua_error(L);
9154 return SWIG_arg;
9155}
9156
9157
9158static int _wrap_scol0a(lua_State* L) {
9159 int SWIG_arg = 0;
9160 PLINT arg1 ;
9161 PLINT arg2 ;
9162 PLINT arg3 ;
9163 PLINT arg4 ;
9164 PLFLT arg5 ;
9165
9166 SWIG_check_num_args("plscol0a",5,5)
9167 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscol0a",1,"PLINT");
9168 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscol0a",2,"PLINT");
9169 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscol0a",3,"PLINT");
9170 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscol0a",4,"PLINT");
9171 if(!lua_isnumber(L,5)) SWIG_fail_arg("plscol0a",5,"PLFLT");
9172 arg1 = (PLINT)lua_tonumber(L, 1);
9173 arg2 = (PLINT)lua_tonumber(L, 2);
9174 arg3 = (PLINT)lua_tonumber(L, 3);
9175 arg4 = (PLINT)lua_tonumber(L, 4);
9176 arg5 = (PLFLT)lua_tonumber(L, 5);
9177 plscol0a(arg1,arg2,arg3,arg4,arg5);
9178
9179 return SWIG_arg;
9180
9181 if(0) SWIG_fail;
9182
9183fail:
9184 lua_error(L);
9185 return SWIG_arg;
9186}
9187
9188
9189static int _wrap_scolbg(lua_State* L) {
9190 int SWIG_arg = 0;
9191 PLINT arg1 ;
9192 PLINT arg2 ;
9193 PLINT arg3 ;
9194
9195 SWIG_check_num_args("plscolbg",3,3)
9196 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolbg",1,"PLINT");
9197 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscolbg",2,"PLINT");
9198 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscolbg",3,"PLINT");
9199 arg1 = (PLINT)lua_tonumber(L, 1);
9200 arg2 = (PLINT)lua_tonumber(L, 2);
9201 arg3 = (PLINT)lua_tonumber(L, 3);
9202 plscolbg(arg1,arg2,arg3);
9203
9204 return SWIG_arg;
9205
9206 if(0) SWIG_fail;
9207
9208fail:
9209 lua_error(L);
9210 return SWIG_arg;
9211}
9212
9213
9214static int _wrap_scolbga(lua_State* L) {
9215 int SWIG_arg = 0;
9216 PLINT arg1 ;
9217 PLINT arg2 ;
9218 PLINT arg3 ;
9219 PLFLT arg4 ;
9220
9221 SWIG_check_num_args("plscolbga",4,4)
9222 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolbga",1,"PLINT");
9223 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscolbga",2,"PLINT");
9224 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscolbga",3,"PLINT");
9225 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscolbga",4,"PLFLT");
9226 arg1 = (PLINT)lua_tonumber(L, 1);
9227 arg2 = (PLINT)lua_tonumber(L, 2);
9228 arg3 = (PLINT)lua_tonumber(L, 3);
9229 arg4 = (PLFLT)lua_tonumber(L, 4);
9230 plscolbga(arg1,arg2,arg3,arg4);
9231
9232 return SWIG_arg;
9233
9234 if(0) SWIG_fail;
9235
9236fail:
9237 lua_error(L);
9238 return SWIG_arg;
9239}
9240
9241
9242static int _wrap_scolor(lua_State* L) {
9243 int SWIG_arg = 0;
9244 PLINT arg1 ;
9245
9246 SWIG_check_num_args("plscolor",1,1)
9247 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolor",1,"PLINT");
9248 arg1 = (PLINT)lua_tonumber(L, 1);
9249 plscolor(arg1);
9250
9251 return SWIG_arg;
9252
9253 if(0) SWIG_fail;
9254
9255fail:
9256 lua_error(L);
9257 return SWIG_arg;
9258}
9259
9260
9261static int _wrap_scompression(lua_State* L) {
9262 int SWIG_arg = 0;
9263 PLINT arg1 ;
9264
9265 SWIG_check_num_args("plscompression",1,1)
9266 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscompression",1,"PLINT");
9267 arg1 = (PLINT)lua_tonumber(L, 1);
9268 plscompression(arg1);
9269
9270 return SWIG_arg;
9271
9272 if(0) SWIG_fail;
9273
9274fail:
9275 lua_error(L);
9276 return SWIG_arg;
9277}
9278
9279
9280static int _wrap_sdev(lua_State* L) {
9281 int SWIG_arg = 0;
9282 char *arg1 = (char *) 0 ;
9283
9284 SWIG_check_num_args("plsdev",1,1)
9285 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsdev",1,"char const *");
9286 arg1 = (char *)lua_tostring(L, 1);
9287 plsdev((char const *)arg1);
9288
9289 return SWIG_arg;
9290
9291 if(0) SWIG_fail;
9292
9293fail:
9294 lua_error(L);
9295 return SWIG_arg;
9296}
9297
9298
9299static int _wrap_sdidev(lua_State* L) {
9300 int SWIG_arg = 0;
9301 PLFLT arg1 ;
9302 PLFLT arg2 ;
9303 PLFLT arg3 ;
9304 PLFLT arg4 ;
9305
9306 SWIG_check_num_args("plsdidev",4,4)
9307 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdidev",1,"PLFLT");
9308 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdidev",2,"PLFLT");
9309 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdidev",3,"PLFLT");
9310 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdidev",4,"PLFLT");
9311 arg1 = (PLFLT)lua_tonumber(L, 1);
9312 arg2 = (PLFLT)lua_tonumber(L, 2);
9313 arg3 = (PLFLT)lua_tonumber(L, 3);
9314 arg4 = (PLFLT)lua_tonumber(L, 4);
9315 plsdidev(arg1,arg2,arg3,arg4);
9316
9317 return SWIG_arg;
9318
9319 if(0) SWIG_fail;
9320
9321fail:
9322 lua_error(L);
9323 return SWIG_arg;
9324}
9325
9326
9327static int _wrap_sdimap(lua_State* L) {
9328 int SWIG_arg = 0;
9329 PLINT arg1 ;
9330 PLINT arg2 ;
9331 PLINT arg3 ;
9332 PLINT arg4 ;
9333 PLFLT arg5 ;
9334 PLFLT arg6 ;
9335
9336 SWIG_check_num_args("plsdimap",6,6)
9337 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdimap",1,"PLINT");
9338 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdimap",2,"PLINT");
9339 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdimap",3,"PLINT");
9340 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdimap",4,"PLINT");
9341 if(!lua_isnumber(L,5)) SWIG_fail_arg("plsdimap",5,"PLFLT");
9342 if(!lua_isnumber(L,6)) SWIG_fail_arg("plsdimap",6,"PLFLT");
9343 arg1 = (PLINT)lua_tonumber(L, 1);
9344 arg2 = (PLINT)lua_tonumber(L, 2);
9345 arg3 = (PLINT)lua_tonumber(L, 3);
9346 arg4 = (PLINT)lua_tonumber(L, 4);
9347 arg5 = (PLFLT)lua_tonumber(L, 5);
9348 arg6 = (PLFLT)lua_tonumber(L, 6);
9349 plsdimap(arg1,arg2,arg3,arg4,arg5,arg6);
9350
9351 return SWIG_arg;
9352
9353 if(0) SWIG_fail;
9354
9355fail:
9356 lua_error(L);
9357 return SWIG_arg;
9358}
9359
9360
9361static int _wrap_sdiori(lua_State* L) {
9362 int SWIG_arg = 0;
9363 PLFLT arg1 ;
9364
9365 SWIG_check_num_args("plsdiori",1,1)
9366 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiori",1,"PLFLT");
9367 arg1 = (PLFLT)lua_tonumber(L, 1);
9368 plsdiori(arg1);
9369
9370 return SWIG_arg;
9371
9372 if(0) SWIG_fail;
9373
9374fail:
9375 lua_error(L);
9376 return SWIG_arg;
9377}
9378
9379
9380static int _wrap_sdiplt(lua_State* L) {
9381 int SWIG_arg = 0;
9382 PLFLT arg1 ;
9383 PLFLT arg2 ;
9384 PLFLT arg3 ;
9385 PLFLT arg4 ;
9386
9387 SWIG_check_num_args("plsdiplt",4,4)
9388 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiplt",1,"PLFLT");
9389 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdiplt",2,"PLFLT");
9390 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdiplt",3,"PLFLT");
9391 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdiplt",4,"PLFLT");
9392 arg1 = (PLFLT)lua_tonumber(L, 1);
9393 arg2 = (PLFLT)lua_tonumber(L, 2);
9394 arg3 = (PLFLT)lua_tonumber(L, 3);
9395 arg4 = (PLFLT)lua_tonumber(L, 4);
9396 plsdiplt(arg1,arg2,arg3,arg4);
9397
9398 return SWIG_arg;
9399
9400 if(0) SWIG_fail;
9401
9402fail:
9403 lua_error(L);
9404 return SWIG_arg;
9405}
9406
9407
9408static int _wrap_sdiplz(lua_State* L) {
9409 int SWIG_arg = 0;
9410 PLFLT arg1 ;
9411 PLFLT arg2 ;
9412 PLFLT arg3 ;
9413 PLFLT arg4 ;
9414
9415 SWIG_check_num_args("plsdiplz",4,4)
9416 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiplz",1,"PLFLT");
9417 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdiplz",2,"PLFLT");
9418 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdiplz",3,"PLFLT");
9419 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdiplz",4,"PLFLT");
9420 arg1 = (PLFLT)lua_tonumber(L, 1);
9421 arg2 = (PLFLT)lua_tonumber(L, 2);
9422 arg3 = (PLFLT)lua_tonumber(L, 3);
9423 arg4 = (PLFLT)lua_tonumber(L, 4);
9424 plsdiplz(arg1,arg2,arg3,arg4);
9425
9426 return SWIG_arg;
9427
9428 if(0) SWIG_fail;
9429
9430fail:
9431 lua_error(L);
9432 return SWIG_arg;
9433}
9434
9435
9436static int _wrap_seed(lua_State* L) {
9437 int SWIG_arg = 0;
9438 unsigned int arg1 ;
9439
9440 SWIG_check_num_args("plseed",1,1)
9441 if(!lua_isnumber(L,1)) SWIG_fail_arg("plseed",1,"unsigned int");
9442 SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
9443 arg1 = (unsigned int)lua_tonumber(L, 1);
9444 plseed(arg1);
9445
9446 return SWIG_arg;
9447
9448 if(0) SWIG_fail;
9449
9450fail:
9451 lua_error(L);
9452 return SWIG_arg;
9453}
9454
9455
9456static int _wrap_sesc(lua_State* L) {
9457 int SWIG_arg = 0;
9458 char arg1 ;
9459
9460 SWIG_check_num_args("plsesc",1,1)
9461 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsesc",1,"char");
9462 arg1 = (lua_tostring(L, 1))[0];
9463 plsesc(arg1);
9464
9465 return SWIG_arg;
9466
9467 if(0) SWIG_fail;
9468
9469fail:
9470 lua_error(L);
9471 return SWIG_arg;
9472}
9473
9474
9475static int _wrap_setopt(lua_State* L) {
9476 int SWIG_arg = 0;
9477 char *arg1 = (char *) 0 ;
9478 char *arg2 = (char *) 0 ;
9479 PLINT result;
9480
9481 SWIG_check_num_args("plsetopt",2,2)
9482 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsetopt",1,"char const *");
9483 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plsetopt",2,"char const *");
9484 arg1 = (char *)lua_tostring(L, 1);
9485 arg2 = (char *)lua_tostring(L, 2);
9486 result = (PLINT)plsetopt((char const *)arg1,(char const *)arg2);
9487 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
9488 return SWIG_arg;
9489
9490 if(0) SWIG_fail;
9491
9492fail:
9493 lua_error(L);
9494 return SWIG_arg;
9495}
9496
9497
9498static int _wrap_sfam(lua_State* L) {
9499 int SWIG_arg = 0;
9500 PLINT arg1 ;
9501 PLINT arg2 ;
9502 PLINT arg3 ;
9503
9504 SWIG_check_num_args("plsfam",3,3)
9505 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfam",1,"PLINT");
9506 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsfam",2,"PLINT");
9507 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsfam",3,"PLINT");
9508 arg1 = (PLINT)lua_tonumber(L, 1);
9509 arg2 = (PLINT)lua_tonumber(L, 2);
9510 arg3 = (PLINT)lua_tonumber(L, 3);
9511 plsfam(arg1,arg2,arg3);
9512
9513 return SWIG_arg;
9514
9515 if(0) SWIG_fail;
9516
9517fail:
9518 lua_error(L);
9519 return SWIG_arg;
9520}
9521
9522
9523static int _wrap_sfci(lua_State* L) {
9524 int SWIG_arg = 0;
9525 PLUNICODE arg1 ;
9526
9527 SWIG_check_num_args("plsfci",1,1)
9528 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfci",1,"PLUNICODE");
9529 SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
9530 arg1 = (PLUNICODE)lua_tonumber(L, 1);
9531 plsfci(arg1);
9532
9533 return SWIG_arg;
9534
9535 if(0) SWIG_fail;
9536
9537fail:
9538 lua_error(L);
9539 return SWIG_arg;
9540}
9541
9542
9543static int _wrap_sfnam(lua_State* L) {
9544 int SWIG_arg = 0;
9545 char *arg1 = (char *) 0 ;
9546
9547 SWIG_check_num_args("plsfnam",1,1)
9548 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsfnam",1,"char const *");
9549 arg1 = (char *)lua_tostring(L, 1);
9550 plsfnam((char const *)arg1);
9551
9552 return SWIG_arg;
9553
9554 if(0) SWIG_fail;
9555
9556fail:
9557 lua_error(L);
9558 return SWIG_arg;
9559}
9560
9561
9562static int _wrap_sfont(lua_State* L) {
9563 int SWIG_arg = 0;
9564 PLINT arg1 ;
9565 PLINT arg2 ;
9566 PLINT arg3 ;
9567
9568 SWIG_check_num_args("plsfont",3,3)
9569 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfont",1,"PLINT");
9570 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsfont",2,"PLINT");
9571 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsfont",3,"PLINT");
9572 arg1 = (PLINT)lua_tonumber(L, 1);
9573 arg2 = (PLINT)lua_tonumber(L, 2);
9574 arg3 = (PLINT)lua_tonumber(L, 3);
9575 plsfont(arg1,arg2,arg3);
9576
9577 return SWIG_arg;
9578
9579 if(0) SWIG_fail;
9580
9581fail:
9582 lua_error(L);
9583 return SWIG_arg;
9584}
9585
9586
9587static int _wrap_shades(lua_State* L) {
9588 int SWIG_arg = 0;
9589 PLFLT **arg1 = (PLFLT **) 0 ;
9590 PLINT arg2 ;
9591 PLINT arg3 ;
9592 defined_func arg4 = (defined_func) 0 ;
9593 PLFLT arg5 ;
9594 PLFLT arg6 ;
9595 PLFLT arg7 ;
9596 PLFLT arg8 ;
9597 PLFLT *arg9 = (PLFLT *) 0 ;
9598 PLINT arg10 ;
9599 PLFLT arg11 ;
9600 PLINT arg12 ;
9601 PLFLT arg13 ;
9602 fill_func arg14 = (fill_func) 0 ;
9603 PLBOOL arg15 ;
9604 pltr_func arg16 = (pltr_func) 0 ;
9605 PLPointer arg17 = (PLPointer) 0 ;
9606 int ii1 ;
9607 PLcGrid cgrid117 ;
9608 PLcGrid2 cgrid217 ;
9609
9610 {
9611 cgrid117.xg = cgrid117.yg = cgrid117.zg = NULL;
9612 cgrid117.nx = cgrid117.ny = cgrid117.nz = 0;
9613 cgrid217.xg = cgrid217.yg = cgrid217.zg = NULL;
9614 cgrid217.nx = cgrid217.ny = 0;
9615 }
9616 {
9617 arg16 = NULL;
9618 }
9619 {
9620 arg17 = NULL;
9621 }
9622 {
9623 arg4 = NULL;
9624 }
9625 {
9626 arg14 = plfill;
9627 }
9628 SWIG_check_num_args("plshades",10,12)
9629 if(!lua_isnumber(L,2)) SWIG_fail_arg("plshades",2,"PLFLT");
9630 if(!lua_isnumber(L,3)) SWIG_fail_arg("plshades",3,"PLFLT");
9631 if(!lua_isnumber(L,4)) SWIG_fail_arg("plshades",4,"PLFLT");
9632 if(!lua_isnumber(L,5)) SWIG_fail_arg("plshades",5,"PLFLT");
9633 if(!lua_isnumber(L,7)) SWIG_fail_arg("plshades",7,"PLFLT");
9634 if(!lua_isnumber(L,8)) SWIG_fail_arg("plshades",8,"PLINT");
9635 if(!lua_isnumber(L,9)) SWIG_fail_arg("plshades",9,"PLFLT");
9636 if(!lua_isnumber(L,10)) SWIG_fail_arg("plshades",10,"PLBOOL");
9637 {
9638 int jj;
9639
9640 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
9641 if ( !arg1 )
9642 SWIG_fail;
9643 Xlen = arg2 = ii1;
9644 Ylen = arg3 = jj;
9645 }
9646 arg5 = (PLFLT)lua_tonumber(L, 2);
9647 arg6 = (PLFLT)lua_tonumber(L, 3);
9648 arg7 = (PLFLT)lua_tonumber(L, 4);
9649 arg8 = (PLFLT)lua_tonumber(L, 5);
9650 {
9651 int temp;
9652 arg9 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp );
9653 if ( !arg9 )
9654 SWIG_fail;
9655 arg10 = Alen = temp;
9656 }
9657 arg11 = (PLFLT)lua_tonumber(L, 7);
9658 arg12 = (PLINT)lua_tonumber(L, 8);
9659 arg13 = (PLFLT)lua_tonumber(L, 9);
9660 arg15 = (PLBOOL)lua_tonumber(L, 10);
9661 if(lua_gettop(L)>=11){
9662 {
9663 arg16 = NULL;
9664 mypltr_funcstr[0] = '\0';
9665
9666 if ( lua_isstring( L, 11 ) )
9667 {
9668 const char* funcstr = lua_tostring( L, 11 );
9669 if ( strcmp( "pltr0", funcstr ) == 0 )
9670 {
9671 arg16 = pltr0;
9672 }
9673 else if ( strcmp( "pltr1", funcstr ) == 0 )
9674 {
9675 arg16 = pltr1;
9676 }
9677 else if ( strcmp( "pltr2", funcstr ) == 0 )
9678 {
9679 arg16 = pltr2;
9680 }
9681 else
9682 {
9683 arg16 = mypltr;
9684 strncpy( mypltr_funcstr, funcstr, 255 );
9685 myL = L;
9686 }
9687 }
9688 else
9689 SWIG_fail_arg( "shades", 16, "pltr_func" );
9690 }
9691 }
9692 if(lua_gettop(L)>=12){
9693 {
9694 int nx, ny;
9695 int gridmode = 0;
9696
9697 lua_pushstring( L, "xg" );
9698 lua_gettable( L, 12 );
9699 if ( !lua_istable( L, -1 ) )
9700 {
9701 lua_pop( L, 1 ); // pop "xg"
9702 lua_pushstring( L, "expected a table xg" );
9703 SWIG_fail;
9704 }
9705 lua_rawgeti( L, -1, 1 );
9706 if ( lua_istable( L, -1 ) )
9707 gridmode = 2; // two dimensional array
9708 else if ( lua_isnumber( L, -1 ) )
9709 gridmode = 1; // one dimensional array
9710 else
9711 {
9712 lua_pop( L, 1 ); // pop "1"
9713 lua_pop( L, 1 ); // pop "xg"
9714 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
9715 SWIG_fail;
9716 }
9717 lua_pop( L, 1 ); // pop test element
9718 if ( gridmode == 1 )
9719 {
9720 cgrid117.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
9721 if ( !cgrid117.xg )
9722 {
9723 lua_pop( L, 1 ); // pop "xg"
9724 SWIG_fail;
9725 }
9726 if ( nx != Xlen )
9727 {
9728 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
9729 SWIG_fail;
9730 }
9731 cgrid117.nx = nx;
9732 }
9733 else
9734 {
9735 cgrid217.xg = read_double_Matrix( L, -1, &nx, &ny );
9736 if ( !cgrid217.xg )
9737 {
9738 lua_pop( L, 1 ); // pop "xg"
9739 SWIG_fail;
9740 }
9741 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9742 {
9743 lua_pop( L, 1 ); // pop "xg"
9744 lua_pushfstring( L, "Vectors must match matrix." );
9745 SWIG_fail;
9746 }
9747 cgrid217.nx = nx;
9748 cgrid217.ny = ny;
9749 }
9750 lua_pop( L, 1 ); // pop "xg"
9751
9752 lua_pushstring( L, "yg" );
9753 lua_gettable( L, 12 );
9754 if ( !lua_istable( L, -1 ) )
9755 {
9756 lua_pop( L, 1 );
9757 lua_pushstring( L, "expected a table yg" );
9758 SWIG_fail;
9759 }
9760 lua_rawgeti( L, -1, 1 );
9761 if ( gridmode == 2 )
9762 {
9763 if ( !lua_istable( L, -1 ) )
9764 {
9765 lua_pop( L, 1 ); // pop "1"
9766 lua_pop( L, 1 ); // pop "yg"
9767 lua_pushstring( L, "expected a two dimensional array/table in yg" );
9768 SWIG_fail;
9769 }
9770 }
9771 else
9772 {
9773 if ( !lua_isnumber( L, -1 ) )
9774 {
9775 lua_pop( L, 1 ); // pop "1"
9776 lua_pop( L, 1 ); // pop "yg"
9777 lua_pushstring( L, "expected a one dimensional array/table in yg" );
9778 SWIG_fail;
9779 }
9780 }
9781 lua_pop( L, 1 ); // pop "1"
9782 if ( gridmode == 1 )
9783 {
9784 cgrid117.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
9785 if ( !cgrid117.yg )
9786 {
9787 lua_pop( L, 1 ); // pop "yg"
9788 SWIG_fail;
9789 }
9790 if ( ny != Ylen )
9791 {
9792 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
9793 SWIG_fail;
9794 }
9795 cgrid117.ny = ny;
9796 }
9797 else
9798 {
9799 cgrid217.yg = read_double_Matrix( L, -1, &nx, &ny );
9800 if ( !cgrid217.yg )
9801 {
9802 lua_pop( L, 1 ); // pop "xg"
9803 SWIG_fail;
9804 }
9805 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9806 {
9807 lua_pop( L, 1 ); // pop "xg"
9808 lua_pushfstring( L, "Vectors must match matrix." );
9809 SWIG_fail;
9810 }
9811 // cgrid217.nx/ny already set
9812 }
9813 lua_pop( L, 1 ); // pop "yg"
9814
9815 if ( gridmode == 1 )
9816 arg17 = &cgrid117;
9817 else if ( gridmode == 2 )
9818 arg17 = &cgrid217;
9819 }
9820 }
9821 plshades((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,(double const *)arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
9822
9823 {
9824 int i;
9825
9826 if ( arg1 )
9827 {
9828 for ( i = 0; i < ii1; i++ )
9829 LUA_FREE_ARRAY( arg1[i] );
9830 LUA_FREE_ARRAY( arg1 );
9831 }
9832 }
9833 {
9834 LUA_FREE_ARRAY( arg9 );
9835 }
9836 {
9837 mypltr_funcstr[0] = '\0';
9838 }
9839 {
9840 int i;
9841
9842 LUA_FREE_ARRAY( cgrid117.xg );
9843 LUA_FREE_ARRAY( cgrid117.yg );
9844
9845 if ( cgrid217.xg )
9846 {
9847 for ( i = 0; i < Xlen; i++ )
9848 LUA_FREE_ARRAY( cgrid217.xg[i] );
9849 LUA_FREE_ARRAY( cgrid217.xg );
9850 }
9851 if ( cgrid217.yg )
9852 {
9853 for ( i = 0; i < Xlen; i++ )
9854 LUA_FREE_ARRAY( cgrid217.yg[i] );
9855 LUA_FREE_ARRAY( cgrid217.yg );
9856 }
9857 }
9858 return SWIG_arg;
9859
9860 if(0) SWIG_fail;
9861
9862fail:
9863 {
9864 int i;
9865
9866 if ( arg1 )
9867 {
9868 for ( i = 0; i < ii1; i++ )
9869 LUA_FREE_ARRAY( arg1[i] );
9870 LUA_FREE_ARRAY( arg1 );
9871 }
9872 }
9873 {
9874 LUA_FREE_ARRAY( arg9 );
9875 }
9876 {
9877 mypltr_funcstr[0] = '\0';
9878 }
9879 {
9880 int i;
9881
9882 LUA_FREE_ARRAY( cgrid117.xg );
9883 LUA_FREE_ARRAY( cgrid117.yg );
9884
9885 if ( cgrid217.xg )
9886 {
9887 for ( i = 0; i < Xlen; i++ )
9888 LUA_FREE_ARRAY( cgrid217.xg[i] );
9889 LUA_FREE_ARRAY( cgrid217.xg );
9890 }
9891 if ( cgrid217.yg )
9892 {
9893 for ( i = 0; i < Xlen; i++ )
9894 LUA_FREE_ARRAY( cgrid217.yg[i] );
9895 LUA_FREE_ARRAY( cgrid217.yg );
9896 }
9897 }
9898 lua_error(L);
9899 return SWIG_arg;
9900}
9901
9902
9903static int _wrap_shade(lua_State* L) {
9904 int SWIG_arg = 0;
9905 PLFLT **arg1 = (PLFLT **) 0 ;
9906 PLINT arg2 ;
9907 PLINT arg3 ;
9908 defined_func arg4 = (defined_func) 0 ;
9909 PLFLT arg5 ;
9910 PLFLT arg6 ;
9911 PLFLT arg7 ;
9912 PLFLT arg8 ;
9913 PLFLT arg9 ;
9914 PLFLT arg10 ;
9915 PLINT arg11 ;
9916 PLFLT arg12 ;
9917 PLFLT arg13 ;
9918 PLINT arg14 ;
9919 PLFLT arg15 ;
9920 PLINT arg16 ;
9921 PLFLT arg17 ;
9922 fill_func arg18 = (fill_func) 0 ;
9923 PLBOOL arg19 ;
9924 pltr_func arg20 = (pltr_func) 0 ;
9925 PLPointer arg21 = (PLPointer) 0 ;
9926 int ii1 ;
9927 PLcGrid cgrid121 ;
9928 PLcGrid2 cgrid221 ;
9929
9930 {
9931 cgrid121.xg = cgrid121.yg = cgrid121.zg = NULL;
9932 cgrid121.nx = cgrid121.ny = cgrid121.nz = 0;
9933 cgrid221.xg = cgrid221.yg = cgrid221.zg = NULL;
9934 cgrid221.nx = cgrid221.ny = 0;
9935 }
9936 {
9937 arg20 = NULL;
9938 }
9939 {
9940 arg21 = NULL;
9941 }
9942 {
9943 arg4 = NULL;
9944 }
9945 {
9946 arg18 = plfill;
9947 }
9948 SWIG_check_num_args("plshade",15,17)
9949 if(!lua_isnumber(L,2)) SWIG_fail_arg("plshade",2,"PLFLT");
9950 if(!lua_isnumber(L,3)) SWIG_fail_arg("plshade",3,"PLFLT");
9951 if(!lua_isnumber(L,4)) SWIG_fail_arg("plshade",4,"PLFLT");
9952 if(!lua_isnumber(L,5)) SWIG_fail_arg("plshade",5,"PLFLT");
9953 if(!lua_isnumber(L,6)) SWIG_fail_arg("plshade",6,"PLFLT");
9954 if(!lua_isnumber(L,7)) SWIG_fail_arg("plshade",7,"PLFLT");
9955 if(!lua_isnumber(L,8)) SWIG_fail_arg("plshade",8,"PLINT");
9956 if(!lua_isnumber(L,9)) SWIG_fail_arg("plshade",9,"PLFLT");
9957 if(!lua_isnumber(L,10)) SWIG_fail_arg("plshade",10,"PLFLT");
9958 if(!lua_isnumber(L,11)) SWIG_fail_arg("plshade",11,"PLINT");
9959 if(!lua_isnumber(L,12)) SWIG_fail_arg("plshade",12,"PLFLT");
9960 if(!lua_isnumber(L,13)) SWIG_fail_arg("plshade",13,"PLINT");
9961 if(!lua_isnumber(L,14)) SWIG_fail_arg("plshade",14,"PLFLT");
9962 if(!lua_isnumber(L,15)) SWIG_fail_arg("plshade",15,"PLBOOL");
9963 {
9964 int jj;
9965
9966 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
9967 if ( !arg1 )
9968 SWIG_fail;
9969 Xlen = arg2 = ii1;
9970 Ylen = arg3 = jj;
9971 }
9972 arg5 = (PLFLT)lua_tonumber(L, 2);
9973 arg6 = (PLFLT)lua_tonumber(L, 3);
9974 arg7 = (PLFLT)lua_tonumber(L, 4);
9975 arg8 = (PLFLT)lua_tonumber(L, 5);
9976 arg9 = (PLFLT)lua_tonumber(L, 6);
9977 arg10 = (PLFLT)lua_tonumber(L, 7);
9978 arg11 = (PLINT)lua_tonumber(L, 8);
9979 arg12 = (PLFLT)lua_tonumber(L, 9);
9980 arg13 = (PLFLT)lua_tonumber(L, 10);
9981 arg14 = (PLINT)lua_tonumber(L, 11);
9982 arg15 = (PLFLT)lua_tonumber(L, 12);
9983 arg16 = (PLINT)lua_tonumber(L, 13);
9984 arg17 = (PLFLT)lua_tonumber(L, 14);
9985 arg19 = (PLBOOL)lua_tonumber(L, 15);
9986 if(lua_gettop(L)>=16){
9987 {
9988 arg20 = NULL;
9989 mypltr_funcstr[0] = '\0';
9990
9991 if ( lua_isstring( L, 16 ) )
9992 {
9993 const char* funcstr = lua_tostring( L, 16 );
9994 if ( strcmp( "pltr0", funcstr ) == 0 )
9995 {
9996 arg20 = pltr0;
9997 }
9998 else if ( strcmp( "pltr1", funcstr ) == 0 )
9999 {
10000 arg20 = pltr1;
10001 }
10002 else if ( strcmp( "pltr2", funcstr ) == 0 )
10003 {
10004 arg20 = pltr2;
10005 }
10006 else
10007 {
10008 arg20 = mypltr;
10009 strncpy( mypltr_funcstr, funcstr, 255 );
10010 myL = L;
10011 }
10012 }
10013 else
10014 SWIG_fail_arg( "shade", 20, "pltr_func" );
10015 }
10016 }
10017 if(lua_gettop(L)>=17){
10018 {
10019 int nx, ny;
10020 int gridmode = 0;
10021
10022 lua_pushstring( L, "xg" );
10023 lua_gettable( L, 17 );
10024 if ( !lua_istable( L, -1 ) )
10025 {
10026 lua_pop( L, 1 ); // pop "xg"
10027 lua_pushstring( L, "expected a table xg" );
10028 SWIG_fail;
10029 }
10030 lua_rawgeti( L, -1, 1 );
10031 if ( lua_istable( L, -1 ) )
10032 gridmode = 2; // two dimensional array
10033 else if ( lua_isnumber( L, -1 ) )
10034 gridmode = 1; // one dimensional array
10035 else
10036 {
10037 lua_pop( L, 1 ); // pop "1"
10038 lua_pop( L, 1 ); // pop "xg"
10039 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
10040 SWIG_fail;
10041 }
10042 lua_pop( L, 1 ); // pop test element
10043 if ( gridmode == 1 )
10044 {
10045 cgrid121.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
10046 if ( !cgrid121.xg )
10047 {
10048 lua_pop( L, 1 ); // pop "xg"
10049 SWIG_fail;
10050 }
10051 if ( nx != Xlen )
10052 {
10053 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
10054 SWIG_fail;
10055 }
10056 cgrid121.nx = nx;
10057 }
10058 else
10059 {
10060 cgrid221.xg = read_double_Matrix( L, -1, &nx, &ny );
10061 if ( !cgrid221.xg )
10062 {
10063 lua_pop( L, 1 ); // pop "xg"
10064 SWIG_fail;
10065 }
10066 if ( ( nx != Xlen ) || ( ny != Ylen ) )
10067 {
10068 lua_pop( L, 1 ); // pop "xg"
10069 lua_pushfstring( L, "Vectors must match matrix." );
10070 SWIG_fail;
10071 }
10072 cgrid221.nx = nx;
10073 cgrid221.ny = ny;
10074 }
10075 lua_pop( L, 1 ); // pop "xg"
10076
10077 lua_pushstring( L, "yg" );
10078 lua_gettable( L, 17 );
10079 if ( !lua_istable( L, -1 ) )
10080 {
10081 lua_pop( L, 1 );
10082 lua_pushstring( L, "expected a table yg" );
10083 SWIG_fail;
10084 }
10085 lua_rawgeti( L, -1, 1 );
10086 if ( gridmode == 2 )
10087 {
10088 if ( !lua_istable( L, -1 ) )
10089 {
10090 lua_pop( L, 1 ); // pop "1"
10091 lua_pop( L, 1 ); // pop "yg"
10092 lua_pushstring( L, "expected a two dimensional array/table in yg" );
10093 SWIG_fail;
10094 }
10095 }
10096 else
10097 {
10098 if ( !lua_isnumber( L, -1 ) )
10099 {
10100 lua_pop( L, 1 ); // pop "1"
10101 lua_pop( L, 1 ); // pop "yg"
10102 lua_pushstring( L, "expected a one dimensional array/table in yg" );
10103 SWIG_fail;
10104 }
10105 }
10106 lua_pop( L, 1 ); // pop "1"
10107 if ( gridmode == 1 )
10108 {
10109 cgrid121.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
10110 if ( !cgrid121.yg )
10111 {
10112 lua_pop( L, 1 ); // pop "yg"
10113 SWIG_fail;
10114 }
10115 if ( ny != Ylen )
10116 {
10117 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
10118 SWIG_fail;
10119 }
10120 cgrid121.ny = ny;
10121 }
10122 else
10123 {
10124 cgrid221.yg = read_double_Matrix( L, -1, &nx, &ny );
10125 if ( !cgrid221.yg )
10126 {
10127 lua_pop( L, 1 ); // pop "xg"
10128 SWIG_fail;
10129 }
10130 if ( ( nx != Xlen ) || ( ny != Ylen ) )
10131 {
10132 lua_pop( L, 1 ); // pop "xg"
10133 lua_pushfstring( L, "Vectors must match matrix." );
10134 SWIG_fail;
10135 }
10136 // cgrid221.nx/ny already set
10137 }
10138 lua_pop( L, 1 ); // pop "yg"
10139
10140 if ( gridmode == 1 )
10141 arg21 = &cgrid121;
10142 else if ( gridmode == 2 )
10143 arg21 = &cgrid221;
10144 }
10145 }
10146 plshade((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21);
10147
10148 {
10149 int i;
10150
10151 if ( arg1 )
10152 {
10153 for ( i = 0; i < ii1; i++ )
10154 LUA_FREE_ARRAY( arg1[i] );
10155 LUA_FREE_ARRAY( arg1 );
10156 }
10157 }
10158 {
10159 mypltr_funcstr[0] = '\0';
10160 }
10161 {
10162 int i;
10163
10164 LUA_FREE_ARRAY( cgrid121.xg );
10165 LUA_FREE_ARRAY( cgrid121.yg );
10166
10167 if ( cgrid221.xg )
10168 {
10169 for ( i = 0; i < Xlen; i++ )
10170 LUA_FREE_ARRAY( cgrid221.xg[i] );
10171 LUA_FREE_ARRAY( cgrid221.xg );
10172 }
10173 if ( cgrid221.yg )
10174 {
10175 for ( i = 0; i < Xlen; i++ )
10176 LUA_FREE_ARRAY( cgrid221.yg[i] );
10177 LUA_FREE_ARRAY( cgrid221.yg );
10178 }
10179 }
10180 return SWIG_arg;
10181
10182 if(0) SWIG_fail;
10183
10184fail:
10185 {
10186 int i;
10187
10188 if ( arg1 )
10189 {
10190 for ( i = 0; i < ii1; i++ )
10191 LUA_FREE_ARRAY( arg1[i] );
10192 LUA_FREE_ARRAY( arg1 );
10193 }
10194 }
10195 {
10196 mypltr_funcstr[0] = '\0';
10197 }
10198 {
10199 int i;
10200
10201 LUA_FREE_ARRAY( cgrid121.xg );
10202 LUA_FREE_ARRAY( cgrid121.yg );
10203
10204 if ( cgrid221.xg )
10205 {
10206 for ( i = 0; i < Xlen; i++ )
10207 LUA_FREE_ARRAY( cgrid221.xg[i] );
10208 LUA_FREE_ARRAY( cgrid221.xg );
10209 }
10210 if ( cgrid221.yg )
10211 {
10212 for ( i = 0; i < Xlen; i++ )
10213 LUA_FREE_ARRAY( cgrid221.yg[i] );
10214 LUA_FREE_ARRAY( cgrid221.yg );
10215 }
10216 }
10217 lua_error(L);
10218 return SWIG_arg;
10219}
10220
10221
10222static int _wrap_slabelfunc(lua_State* L) {
10223 int SWIG_arg = 0;
10224 label_func arg1 = (label_func) 0 ;
10225 PLPointer arg2 = (PLPointer) 0 ;
10226
10227 {
10228 arg2 = NULL;
10229 }
10230 SWIG_check_num_args("plslabelfunc",1,1)
10231 {
10232 arg1 = NULL;
10233 mylabel_funcstr[0] = '\0';
10234
10235 if ( lua_isnil( L, 1 ) )
10236 {
10237 arg1 = NULL;
10238 }
10239 else if ( lua_isstring( L, 1 ) )
10240 {
10241 arg1 = mylabel;
10242 strncpy( mylabel_funcstr, lua_tostring( L, 1 ), 255 );
10243 myL = L;
10244 }
10245 else
10246 SWIG_fail_arg( "slabelfunc", 1, "label_func" );
10247 }
10248 plslabelfunc(arg1,arg2);
10249
10250 {
10251
10252 }
10253 return SWIG_arg;
10254
10255 if(0) SWIG_fail;
10256
10257fail:
10258 {
10259
10260 }
10261 lua_error(L);
10262 return SWIG_arg;
10263}
10264
10265
10266static int _wrap_smaj(lua_State* L) {
10267 int SWIG_arg = 0;
10268 PLFLT arg1 ;
10269 PLFLT arg2 ;
10270
10271 SWIG_check_num_args("plsmaj",2,2)
10272 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsmaj",1,"PLFLT");
10273 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsmaj",2,"PLFLT");
10274 arg1 = (PLFLT)lua_tonumber(L, 1);
10275 arg2 = (PLFLT)lua_tonumber(L, 2);
10276 plsmaj(arg1,arg2);
10277
10278 return SWIG_arg;
10279
10280 if(0) SWIG_fail;
10281
10282fail:
10283 lua_error(L);
10284 return SWIG_arg;
10285}
10286
10287
10288static int _wrap_smin(lua_State* L) {
10289 int SWIG_arg = 0;
10290 PLFLT arg1 ;
10291 PLFLT arg2 ;
10292
10293 SWIG_check_num_args("plsmin",2,2)
10294 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsmin",1,"PLFLT");
10295 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsmin",2,"PLFLT");
10296 arg1 = (PLFLT)lua_tonumber(L, 1);
10297 arg2 = (PLFLT)lua_tonumber(L, 2);
10298 plsmin(arg1,arg2);
10299
10300 return SWIG_arg;
10301
10302 if(0) SWIG_fail;
10303
10304fail:
10305 lua_error(L);
10306 return SWIG_arg;
10307}
10308
10309
10310static int _wrap_sori(lua_State* L) {
10311 int SWIG_arg = 0;
10312 PLINT arg1 ;
10313
10314 SWIG_check_num_args("plsori",1,1)
10315 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsori",1,"PLINT");
10316 arg1 = (PLINT)lua_tonumber(L, 1);
10317 plsori(arg1);
10318
10319 return SWIG_arg;
10320
10321 if(0) SWIG_fail;
10322
10323fail:
10324 lua_error(L);
10325 return SWIG_arg;
10326}
10327
10328
10329static int _wrap_spage(lua_State* L) {
10330 int SWIG_arg = 0;
10331 PLFLT arg1 ;
10332 PLFLT arg2 ;
10333 PLINT arg3 ;
10334 PLINT arg4 ;
10335 PLINT arg5 ;
10336 PLINT arg6 ;
10337
10338 SWIG_check_num_args("plspage",6,6)
10339 if(!lua_isnumber(L,1)) SWIG_fail_arg("plspage",1,"PLFLT");
10340 if(!lua_isnumber(L,2)) SWIG_fail_arg("plspage",2,"PLFLT");
10341 if(!lua_isnumber(L,3)) SWIG_fail_arg("plspage",3,"PLINT");
10342 if(!lua_isnumber(L,4)) SWIG_fail_arg("plspage",4,"PLINT");
10343 if(!lua_isnumber(L,5)) SWIG_fail_arg("plspage",5,"PLINT");
10344 if(!lua_isnumber(L,6)) SWIG_fail_arg("plspage",6,"PLINT");
10345 arg1 = (PLFLT)lua_tonumber(L, 1);
10346 arg2 = (PLFLT)lua_tonumber(L, 2);
10347 arg3 = (PLINT)lua_tonumber(L, 3);
10348 arg4 = (PLINT)lua_tonumber(L, 4);
10349 arg5 = (PLINT)lua_tonumber(L, 5);
10350 arg6 = (PLINT)lua_tonumber(L, 6);
10351 plspage(arg1,arg2,arg3,arg4,arg5,arg6);
10352
10353 return SWIG_arg;
10354
10355 if(0) SWIG_fail;
10356
10357fail:
10358 lua_error(L);
10359 return SWIG_arg;
10360}
10361
10362
10363static int _wrap_spal0(lua_State* L) {
10364 int SWIG_arg = 0;
10365 char *arg1 = (char *) 0 ;
10366
10367 SWIG_check_num_args("plspal0",1,1)
10368 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plspal0",1,"char const *");
10369 arg1 = (char *)lua_tostring(L, 1);
10370 plspal0((char const *)arg1);
10371
10372 return SWIG_arg;
10373
10374 if(0) SWIG_fail;
10375
10376fail:
10377 lua_error(L);
10378 return SWIG_arg;
10379}
10380
10381
10382static int _wrap_spal1(lua_State* L) {
10383 int SWIG_arg = 0;
10384 char *arg1 = (char *) 0 ;
10385 PLBOOL arg2 ;
10386
10387 SWIG_check_num_args("plspal1",2,2)
10388 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plspal1",1,"char const *");
10389 if(!lua_isnumber(L,2)) SWIG_fail_arg("plspal1",2,"PLBOOL");
10390 arg1 = (char *)lua_tostring(L, 1);
10391 arg2 = (PLBOOL)lua_tonumber(L, 2);
10392 plspal1((char const *)arg1,arg2);
10393
10394 return SWIG_arg;
10395
10396 if(0) SWIG_fail;
10397
10398fail:
10399 lua_error(L);
10400 return SWIG_arg;
10401}
10402
10403
10404static int _wrap_spause(lua_State* L) {
10405 int SWIG_arg = 0;
10406 PLBOOL arg1 ;
10407
10408 SWIG_check_num_args("plspause",1,1)
10409 if(!lua_isnumber(L,1)) SWIG_fail_arg("plspause",1,"PLBOOL");
10410 arg1 = (PLBOOL)lua_tonumber(L, 1);
10411 plspause(arg1);
10412
10413 return SWIG_arg;
10414
10415 if(0) SWIG_fail;
10416
10417fail:
10418 lua_error(L);
10419 return SWIG_arg;
10420}
10421
10422
10423static int _wrap_sstrm(lua_State* L) {
10424 int SWIG_arg = 0;
10425 PLINT arg1 ;
10426
10427 SWIG_check_num_args("plsstrm",1,1)
10428 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsstrm",1,"PLINT");
10429 arg1 = (PLINT)lua_tonumber(L, 1);
10430 plsstrm(arg1);
10431
10432 return SWIG_arg;
10433
10434 if(0) SWIG_fail;
10435
10436fail:
10437 lua_error(L);
10438 return SWIG_arg;
10439}
10440
10441
10442static int _wrap_ssub(lua_State* L) {
10443 int SWIG_arg = 0;
10444 PLINT arg1 ;
10445 PLINT arg2 ;
10446
10447 SWIG_check_num_args("plssub",2,2)
10448 if(!lua_isnumber(L,1)) SWIG_fail_arg("plssub",1,"PLINT");
10449 if(!lua_isnumber(L,2)) SWIG_fail_arg("plssub",2,"PLINT");
10450 arg1 = (PLINT)lua_tonumber(L, 1);
10451 arg2 = (PLINT)lua_tonumber(L, 2);
10452 plssub(arg1,arg2);
10453
10454 return SWIG_arg;
10455
10456 if(0) SWIG_fail;
10457
10458fail:
10459 lua_error(L);
10460 return SWIG_arg;
10461}
10462
10463
10464static int _wrap_ssym(lua_State* L) {
10465 int SWIG_arg = 0;
10466 PLFLT arg1 ;
10467 PLFLT arg2 ;
10468
10469 SWIG_check_num_args("plssym",2,2)
10470 if(!lua_isnumber(L,1)) SWIG_fail_arg("plssym",1,"PLFLT");
10471 if(!lua_isnumber(L,2)) SWIG_fail_arg("plssym",2,"PLFLT");
10472 arg1 = (PLFLT)lua_tonumber(L, 1);
10473 arg2 = (PLFLT)lua_tonumber(L, 2);
10474 plssym(arg1,arg2);
10475
10476 return SWIG_arg;
10477
10478 if(0) SWIG_fail;
10479
10480fail:
10481 lua_error(L);
10482 return SWIG_arg;
10483}
10484
10485
10486static int _wrap_star(lua_State* L) {
10487 int SWIG_arg = 0;
10488 PLINT arg1 ;
10489 PLINT arg2 ;
10490
10491 SWIG_check_num_args("plstar",2,2)
10492 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstar",1,"PLINT");
10493 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstar",2,"PLINT");
10494 arg1 = (PLINT)lua_tonumber(L, 1);
10495 arg2 = (PLINT)lua_tonumber(L, 2);
10496 plstar(arg1,arg2);
10497
10498 return SWIG_arg;
10499
10500 if(0) SWIG_fail;
10501
10502fail:
10503 lua_error(L);
10504 return SWIG_arg;
10505}
10506
10507
10508static int _wrap_start(lua_State* L) {
10509 int SWIG_arg = 0;
10510 char *arg1 = (char *) 0 ;
10511 PLINT arg2 ;
10512 PLINT arg3 ;
10513
10514 SWIG_check_num_args("plstart",3,3)
10515 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plstart",1,"char const *");
10516 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstart",2,"PLINT");
10517 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstart",3,"PLINT");
10518 arg1 = (char *)lua_tostring(L, 1);
10519 arg2 = (PLINT)lua_tonumber(L, 2);
10520 arg3 = (PLINT)lua_tonumber(L, 3);
10521 plstart((char const *)arg1,arg2,arg3);
10522
10523 return SWIG_arg;
10524
10525 if(0) SWIG_fail;
10526
10527fail:
10528 lua_error(L);
10529 return SWIG_arg;
10530}
10531
10532
10533static int _wrap_stransform(lua_State* L) {
10534 int SWIG_arg = 0;
10535 ct_func arg1 = (ct_func) 0 ;
10536 PLPointer arg2 = (PLPointer) 0 ;
10537
10538 {
10539 arg1 = NULL;
10540 myct_funcstr[0] = '\0';
10541 }
10542 {
10543 arg2 = NULL;
10544 }
10545 SWIG_check_num_args("plstransform",0,1)
10546 if(lua_gettop(L)>=1){
10547 {
10548 arg1 = NULL;
10549 myct_funcstr[0] = '\0';
10550
10551 if ( lua_isstring( L, 1 ) )
10552 {
10553 const char* funcstr = lua_tostring( L, 1 );
10554 arg1 = myct;
10555 strncpy( myct_funcstr, funcstr, 255 );
10556 myL = L;
10557 }
10558 else
10559 SWIG_fail_arg( "stransform", 1, "ct_func" );
10560 }
10561 }
10562 plstransform(arg1,arg2);
10563
10564 return SWIG_arg;
10565
10566 if(0) SWIG_fail;
10567
10568fail:
10569 lua_error(L);
10570 return SWIG_arg;
10571}
10572
10573
10574static int _wrap_string(lua_State* L) {
10575 int SWIG_arg = 0;
10576 PLINT arg1 ;
10577 PLFLT *arg2 = (PLFLT *) 0 ;
10578 PLFLT *arg3 = (PLFLT *) 0 ;
10579 char *arg4 = (char *) 0 ;
10580 int temp3 ;
10581
10582 SWIG_check_num_args("plstring",3,3)
10583 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plstring",3,"char const *");
10584 {
10585 int temp;
10586 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10587 if ( !arg2 )
10588 SWIG_fail;
10589 arg1 = Alen = temp;
10590 }
10591 {
10592 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10593 if ( !arg3 )
10594 SWIG_fail;
10595 if ( temp3 != Alen )
10596 {
10597 lua_pushfstring( L, "Tables must be of same length." );
10598 SWIG_fail;
10599 }
10600 }
10601 arg4 = (char *)lua_tostring(L, 3);
10602 plstring(arg1,(double const *)arg2,(double const *)arg3,(char const *)arg4);
10603
10604 {
10605 LUA_FREE_ARRAY( arg2 );
10606 }
10607 {
10608 LUA_FREE_ARRAY( arg3 );
10609 }
10610 return SWIG_arg;
10611
10612 if(0) SWIG_fail;
10613
10614fail:
10615 {
10616 LUA_FREE_ARRAY( arg2 );
10617 }
10618 {
10619 LUA_FREE_ARRAY( arg3 );
10620 }
10621 lua_error(L);
10622 return SWIG_arg;
10623}
10624
10625
10626static int _wrap_string3(lua_State* L) {
10627 int SWIG_arg = 0;
10628 PLINT arg1 ;
10629 PLFLT *arg2 = (PLFLT *) 0 ;
10630 PLFLT *arg3 = (PLFLT *) 0 ;
10631 PLFLT *arg4 = (PLFLT *) 0 ;
10632 char *arg5 = (char *) 0 ;
10633 int temp3 ;
10634 int temp4 ;
10635
10636 SWIG_check_num_args("plstring3",4,4)
10637 if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("plstring3",4,"char const *");
10638 {
10639 int temp;
10640 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10641 if ( !arg2 )
10642 SWIG_fail;
10643 arg1 = Alen = temp;
10644 }
10645 {
10646 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10647 if ( !arg3 )
10648 SWIG_fail;
10649 if ( temp3 != Alen )
10650 {
10651 lua_pushfstring( L, "Tables must be of same length." );
10652 SWIG_fail;
10653 }
10654 }
10655 {
10656 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
10657 if ( !arg4 )
10658 SWIG_fail;
10659 if ( temp4 != Alen )
10660 {
10661 lua_pushfstring( L, "Tables must be of same length." );
10662 SWIG_fail;
10663 }
10664 }
10665 arg5 = (char *)lua_tostring(L, 4);
10666 plstring3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,(char const *)arg5);
10667
10668 {
10669 LUA_FREE_ARRAY( arg2 );
10670 }
10671 {
10672 LUA_FREE_ARRAY( arg3 );
10673 }
10674 {
10675 LUA_FREE_ARRAY( arg4 );
10676 }
10677 return SWIG_arg;
10678
10679 if(0) SWIG_fail;
10680
10681fail:
10682 {
10683 LUA_FREE_ARRAY( arg2 );
10684 }
10685 {
10686 LUA_FREE_ARRAY( arg3 );
10687 }
10688 {
10689 LUA_FREE_ARRAY( arg4 );
10690 }
10691 lua_error(L);
10692 return SWIG_arg;
10693}
10694
10695
10696static int _wrap_stripa(lua_State* L) {
10697 int SWIG_arg = 0;
10698 PLINT arg1 ;
10699 PLINT arg2 ;
10700 PLFLT arg3 ;
10701 PLFLT arg4 ;
10702
10703 SWIG_check_num_args("plstripa",4,4)
10704 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstripa",1,"PLINT");
10705 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstripa",2,"PLINT");
10706 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstripa",3,"PLFLT");
10707 if(!lua_isnumber(L,4)) SWIG_fail_arg("plstripa",4,"PLFLT");
10708 arg1 = (PLINT)lua_tonumber(L, 1);
10709 arg2 = (PLINT)lua_tonumber(L, 2);
10710 arg3 = (PLFLT)lua_tonumber(L, 3);
10711 arg4 = (PLFLT)lua_tonumber(L, 4);
10712 plstripa(arg1,arg2,arg3,arg4);
10713
10714 return SWIG_arg;
10715
10716 if(0) SWIG_fail;
10717
10718fail:
10719 lua_error(L);
10720 return SWIG_arg;
10721}
10722
10723
10724static int _wrap_stripc(lua_State* L) {
10725 int SWIG_arg = 0;
10726 PLINT *arg1 = (PLINT *) 0 ;
10727 char *arg2 = (char *) 0 ;
10728 char *arg3 = (char *) 0 ;
10729 PLFLT arg4 ;
10730 PLFLT arg5 ;
10731 PLFLT arg6 ;
10732 PLFLT arg7 ;
10733 PLFLT arg8 ;
10734 PLFLT arg9 ;
10735 PLFLT arg10 ;
10736 PLBOOL arg11 ;
10737 PLBOOL arg12 ;
10738 PLINT arg13 ;
10739 PLINT arg14 ;
10740 PLINT *arg15 = (PLINT *) 0 ;
10741 PLINT *arg16 = (PLINT *) 0 ;
10742 char **arg17 ;
10743 char *arg18 = (char *) 0 ;
10744 char *arg19 = (char *) 0 ;
10745 char *arg20 = (char *) 0 ;
10746 PLINT temp1 ;
10747 int temp15 ;
10748 int temp16 ;
10749
10750 {
10751 arg17 = NULL;
10752 }
10753 arg1 = &temp1;
10754 SWIG_check_num_args("plstripc",15,19)
10755 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plstripc",1,"char const *");
10756 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plstripc",2,"char const *");
10757 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstripc",3,"PLFLT");
10758 if(!lua_isnumber(L,4)) SWIG_fail_arg("plstripc",4,"PLFLT");
10759 if(!lua_isnumber(L,5)) SWIG_fail_arg("plstripc",5,"PLFLT");
10760 if(!lua_isnumber(L,6)) SWIG_fail_arg("plstripc",6,"PLFLT");
10761 if(!lua_isnumber(L,7)) SWIG_fail_arg("plstripc",7,"PLFLT");
10762 if(!lua_isnumber(L,8)) SWIG_fail_arg("plstripc",8,"PLFLT");
10763 if(!lua_isnumber(L,9)) SWIG_fail_arg("plstripc",9,"PLFLT");
10764 if(!lua_isnumber(L,10)) SWIG_fail_arg("plstripc",10,"PLBOOL");
10765 if(!lua_isnumber(L,11)) SWIG_fail_arg("plstripc",11,"PLBOOL");
10766 if(!lua_isnumber(L,12)) SWIG_fail_arg("plstripc",12,"PLINT");
10767 if(!lua_isnumber(L,13)) SWIG_fail_arg("plstripc",13,"PLINT");
10768 if(lua_gettop(L)>=16 && !lua_istable(L,16)) SWIG_fail_arg("plstripc",16,"char const *[4]");
10769 if(lua_gettop(L)>=17 && !SWIG_lua_isnilstring(L,17)) SWIG_fail_arg("plstripc",17,"char const *");
10770 if(lua_gettop(L)>=18 && !SWIG_lua_isnilstring(L,18)) SWIG_fail_arg("plstripc",18,"char const *");
10771 if(lua_gettop(L)>=19 && !SWIG_lua_isnilstring(L,19)) SWIG_fail_arg("plstripc",19,"char const *");
10772 arg2 = (char *)lua_tostring(L, 1);
10773 arg3 = (char *)lua_tostring(L, 2);
10774 arg4 = (PLFLT)lua_tonumber(L, 3);
10775 arg5 = (PLFLT)lua_tonumber(L, 4);
10776 arg6 = (PLFLT)lua_tonumber(L, 5);
10777 arg7 = (PLFLT)lua_tonumber(L, 6);
10778 arg8 = (PLFLT)lua_tonumber(L, 7);
10779 arg9 = (PLFLT)lua_tonumber(L, 8);
10780 arg10 = (PLFLT)lua_tonumber(L, 9);
10781 arg11 = (PLBOOL)lua_tonumber(L, 10);
10782 arg12 = (PLBOOL)lua_tonumber(L, 11);
10783 arg13 = (PLINT)lua_tonumber(L, 12);
10784 arg14 = (PLINT)lua_tonumber(L, 13);
10785 {
10786 arg15 = (PLINT *) LUA_get_int_num_array_var( L, 14, &temp15 );
10787 if ( !arg15 )
10788 SWIG_fail;
10789 Alen = temp15;
10790 }
10791 {
10792 arg16 = (PLINT *) LUA_get_int_num_array_var( L, 15, &temp16 );
10793 if ( !arg16 )
10794 SWIG_fail;
10795 if ( temp16 != Alen )
10796 {
10797 lua_pushfstring( L, "Tables must be of same length." );
10798 SWIG_fail;
10799 }
10800 }
10801 if(lua_gettop(L)>=16){
10802 {
10803 int i;
10804 arg17 = NULL;
10805
10806 if ( SWIG_table_size( L, 16 ) != 4 )
10807 {
10808 lua_pushfstring( L, "Requires a sequence of 4 strings." );
10809 SWIG_fail;
10810 }
10811 if ( Alen != 4 )
10812 {
10813 lua_pushfstring( L, "colline and styline args must be length 4." );
10814 SWIG_fail;
10815 }
10816
10817 arg17 = malloc( sizeof ( char* ) * 4 );
10818 for ( i = 1; i <= 4; i++ )
10819 {
10820 lua_rawgeti( L, 16, i );
10821 if ( lua_isstring( L, -1 ) )
10822 {
10823 arg17[i - 1] = (char *) lua_tostring( L, -1 );
10824 }
10825 else
10826 {
10827 lua_pop( L, 1 );
10828 lua_pushfstring( L, "Requires a sequence of 4 strings." );
10829 SWIG_fail;
10830 // arg17 array is freed after 'fail:'
10831 }
10832 lua_pop( L, 1 );
10833 }
10834 }
10835 }
10836 if(lua_gettop(L)>=17){
10837 arg18 = (char *)lua_tostring(L, 17);
10838 }
10839 if(lua_gettop(L)>=18){
10840 arg19 = (char *)lua_tostring(L, 18);
10841 }
10842 if(lua_gettop(L)>=19){
10843 arg20 = (char *)lua_tostring(L, 19);
10844 }
10845 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);
10846
10847 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
10848 {
10849 LUA_FREE_ARRAY( arg15 );
10850 }
10851 {
10852 LUA_FREE_ARRAY( arg16 );
10853 }
10854 {
10855 if ( arg17 )
10856 {
10857 free( arg17 ); arg17 = NULL;
10858 }
10859 }
10860 return SWIG_arg;
10861
10862 if(0) SWIG_fail;
10863
10864fail:
10865 {
10866 LUA_FREE_ARRAY( arg15 );
10867 }
10868 {
10869 LUA_FREE_ARRAY( arg16 );
10870 }
10871 {
10872 if ( arg17 )
10873 {
10874 free( arg17 ); arg17 = NULL;
10875 }
10876 }
10877 lua_error(L);
10878 return SWIG_arg;
10879}
10880
10881
10882static int _wrap_stripd(lua_State* L) {
10883 int SWIG_arg = 0;
10884 PLINT arg1 ;
10885
10886 SWIG_check_num_args("plstripd",1,1)
10887 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstripd",1,"PLINT");
10888 arg1 = (PLINT)lua_tonumber(L, 1);
10889 plstripd(arg1);
10890
10891 return SWIG_arg;
10892
10893 if(0) SWIG_fail;
10894
10895fail:
10896 lua_error(L);
10897 return SWIG_arg;
10898}
10899
10900
10901static int _wrap_styl(lua_State* L) {
10902 int SWIG_arg = 0;
10903 PLINT arg1 ;
10904 PLINT *arg2 = (PLINT *) 0 ;
10905 PLINT *arg3 = (PLINT *) 0 ;
10906 int temp3 ;
10907
10908 SWIG_check_num_args("plstyl",2,2)
10909 {
10910 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 1, &arg1 );
10911 if ( !arg2 )
10912 SWIG_fail;
10913 Alen = arg1;
10914 }
10915 {
10916 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp3 );
10917 if ( !arg3 )
10918 SWIG_fail;
10919 if ( temp3 != Alen )
10920 {
10921 lua_pushfstring( L, "Tables must be of same length." );
10922 SWIG_fail;
10923 }
10924 }
10925 plstyl(arg1,(int const *)arg2,(int const *)arg3);
10926
10927 {
10928 LUA_FREE_ARRAY( arg2 );
10929 }
10930 {
10931 LUA_FREE_ARRAY( arg3 );
10932 }
10933 return SWIG_arg;
10934
10935 if(0) SWIG_fail;
10936
10937fail:
10938 {
10939 LUA_FREE_ARRAY( arg2 );
10940 }
10941 {
10942 LUA_FREE_ARRAY( arg3 );
10943 }
10944 lua_error(L);
10945 return SWIG_arg;
10946}
10947
10948
10949static int _wrap_svect(lua_State* L) {
10950 int SWIG_arg = 0;
10951 PLFLT *arg1 = (PLFLT *) 0 ;
10952 PLFLT *arg2 = (PLFLT *) 0 ;
10953 PLINT arg3 ;
10954 PLBOOL arg4 ;
10955
10956 {
10957 arg2 = NULL; arg3 = 0;
10958 }
10959 {
10960 arg4 = 0;
10961 }
10962 SWIG_check_num_args("plsvect",1,3)
10963 if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("plsvect",3,"PLBOOL");
10964 {
10965 int temp;
10966 if ( lua_isnil( L, 1 ) )
10967 {
10968 arg1 = NULL;
10969 Alen = 0;
10970 }
10971 else
10972 {
10973 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10974 if ( !arg1 )
10975 SWIG_fail;
10976 Alen = temp;
10977 }
10978 }
10979 if(lua_gettop(L)>=2){
10980 {
10981 int temp = 0;
10982 if ( lua_isnil( L, 2 ) )
10983 {
10984 arg2 = NULL;
10985 }
10986 else
10987 {
10988 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
10989 if ( !arg2 )
10990 SWIG_fail;
10991 if ( temp != Alen )
10992 {
10993 lua_pushfstring( L, "Tables must be of same length." );
10994 SWIG_fail;
10995 }
10996 }
10997 arg3 = temp;
10998 }
10999 }
11000 if(lua_gettop(L)>=3){
11001 arg4 = (PLBOOL)lua_tonumber(L, 3);
11002 }
11003 plsvect((double const *)arg1,(double const *)arg2,arg3,arg4);
11004
11005 {
11006 LUA_FREE_ARRAY( arg2 );
11007 }
11008 return SWIG_arg;
11009
11010 if(0) SWIG_fail;
11011
11012fail:
11013 {
11014 LUA_FREE_ARRAY( arg2 );
11015 }
11016 lua_error(L);
11017 return SWIG_arg;
11018}
11019
11020
11021static int _wrap_svpa(lua_State* L) {
11022 int SWIG_arg = 0;
11023 PLFLT arg1 ;
11024 PLFLT arg2 ;
11025 PLFLT arg3 ;
11026 PLFLT arg4 ;
11027
11028 SWIG_check_num_args("plsvpa",4,4)
11029 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsvpa",1,"PLFLT");
11030 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsvpa",2,"PLFLT");
11031 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsvpa",3,"PLFLT");
11032 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsvpa",4,"PLFLT");
11033 arg1 = (PLFLT)lua_tonumber(L, 1);
11034 arg2 = (PLFLT)lua_tonumber(L, 2);
11035 arg3 = (PLFLT)lua_tonumber(L, 3);
11036 arg4 = (PLFLT)lua_tonumber(L, 4);
11037 plsvpa(arg1,arg2,arg3,arg4);
11038
11039 return SWIG_arg;
11040
11041 if(0) SWIG_fail;
11042
11043fail:
11044 lua_error(L);
11045 return SWIG_arg;
11046}
11047
11048
11049static int _wrap_sxax(lua_State* L) {
11050 int SWIG_arg = 0;
11051 PLINT arg1 ;
11052 PLINT arg2 ;
11053
11054 SWIG_check_num_args("plsxax",2,2)
11055 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsxax",1,"PLINT");
11056 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsxax",2,"PLINT");
11057 arg1 = (PLINT)lua_tonumber(L, 1);
11058 arg2 = (PLINT)lua_tonumber(L, 2);
11059 plsxax(arg1,arg2);
11060
11061 return SWIG_arg;
11062
11063 if(0) SWIG_fail;
11064
11065fail:
11066 lua_error(L);
11067 return SWIG_arg;
11068}
11069
11070
11071static int _wrap_syax(lua_State* L) {
11072 int SWIG_arg = 0;
11073 PLINT arg1 ;
11074 PLINT arg2 ;
11075
11076 SWIG_check_num_args("plsyax",2,2)
11077 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsyax",1,"PLINT");
11078 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsyax",2,"PLINT");
11079 arg1 = (PLINT)lua_tonumber(L, 1);
11080 arg2 = (PLINT)lua_tonumber(L, 2);
11081 plsyax(arg1,arg2);
11082
11083 return SWIG_arg;
11084
11085 if(0) SWIG_fail;
11086
11087fail:
11088 lua_error(L);
11089 return SWIG_arg;
11090}
11091
11092
11093static int _wrap_sym(lua_State* L) {
11094 int SWIG_arg = 0;
11095 PLINT arg1 ;
11096 PLFLT *arg2 = (PLFLT *) 0 ;
11097 PLFLT *arg3 = (PLFLT *) 0 ;
11098 PLINT arg4 ;
11099 int temp3 ;
11100
11101 SWIG_check_num_args("plsym",3,3)
11102 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsym",3,"PLINT");
11103 {
11104 int temp;
11105 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
11106 if ( !arg2 )
11107 SWIG_fail;
11108 arg1 = Alen = temp;
11109 }
11110 {
11111 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
11112 if ( !arg3 )
11113 SWIG_fail;
11114 if ( temp3 != Alen )
11115 {
11116 lua_pushfstring( L, "Tables must be of same length." );
11117 SWIG_fail;
11118 }
11119 }
11120 arg4 = (PLINT)lua_tonumber(L, 3);
11121 plsym(arg1,(double const *)arg2,(double const *)arg3,arg4);
11122
11123 {
11124 LUA_FREE_ARRAY( arg2 );
11125 }
11126 {
11127 LUA_FREE_ARRAY( arg3 );
11128 }
11129 return SWIG_arg;
11130
11131 if(0) SWIG_fail;
11132
11133fail:
11134 {
11135 LUA_FREE_ARRAY( arg2 );
11136 }
11137 {
11138 LUA_FREE_ARRAY( arg3 );
11139 }
11140 lua_error(L);
11141 return SWIG_arg;
11142}
11143
11144
11145static int _wrap_szax(lua_State* L) {
11146 int SWIG_arg = 0;
11147 PLINT arg1 ;
11148 PLINT arg2 ;
11149
11150 SWIG_check_num_args("plszax",2,2)
11151 if(!lua_isnumber(L,1)) SWIG_fail_arg("plszax",1,"PLINT");
11152 if(!lua_isnumber(L,2)) SWIG_fail_arg("plszax",2,"PLINT");
11153 arg1 = (PLINT)lua_tonumber(L, 1);
11154 arg2 = (PLINT)lua_tonumber(L, 2);
11155 plszax(arg1,arg2);
11156
11157 return SWIG_arg;
11158
11159 if(0) SWIG_fail;
11160
11161fail:
11162 lua_error(L);
11163 return SWIG_arg;
11164}
11165
11166
11167static int _wrap_text(lua_State* L) {
11168 int SWIG_arg = 0;
11169
11170 SWIG_check_num_args("pltext",0,0)
11171 pltext();
11172
11173 return SWIG_arg;
11174
11175 if(0) SWIG_fail;
11176
11177fail:
11178 lua_error(L);
11179 return SWIG_arg;
11180}
11181
11182
11183static int _wrap_timefmt(lua_State* L) {
11184 int SWIG_arg = 0;
11185 char *arg1 = (char *) 0 ;
11186
11187 SWIG_check_num_args("pltimefmt",1,1)
11188 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("pltimefmt",1,"char const *");
11189 arg1 = (char *)lua_tostring(L, 1);
11190 pltimefmt((char const *)arg1);
11191
11192 return SWIG_arg;
11193
11194 if(0) SWIG_fail;
11195
11196fail:
11197 lua_error(L);
11198 return SWIG_arg;
11199}
11200
11201
11202static int _wrap_vasp(lua_State* L) {
11203 int SWIG_arg = 0;
11204 PLFLT arg1 ;
11205
11206 SWIG_check_num_args("plvasp",1,1)
11207 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvasp",1,"PLFLT");
11208 arg1 = (PLFLT)lua_tonumber(L, 1);
11209 plvasp(arg1);
11210
11211 return SWIG_arg;
11212
11213 if(0) SWIG_fail;
11214
11215fail:
11216 lua_error(L);
11217 return SWIG_arg;
11218}
11219
11220
11221static int _wrap_vect(lua_State* L) {
11222 int SWIG_arg = 0;
11223 PLFLT **arg1 = (PLFLT **) 0 ;
11224 PLFLT **arg2 = (PLFLT **) 0 ;
11225 PLINT arg3 ;
11226 PLINT arg4 ;
11227 PLFLT arg5 ;
11228 pltr_func arg6 = (pltr_func) 0 ;
11229 PLPointer arg7 = (PLPointer) 0 ;
11230 int ii1 ;
11231 int ii2 ;
11232 PLcGrid cgrid17 ;
11233 PLcGrid2 cgrid27 ;
11234
11235 {
11236 cgrid17.xg = cgrid17.yg = cgrid17.zg = NULL;
11237 cgrid17.nx = cgrid17.ny = cgrid17.nz = 0;
11238 cgrid27.xg = cgrid27.yg = cgrid27.zg = NULL;
11239 cgrid27.nx = cgrid27.ny = 0;
11240 }
11241 {
11242 arg6 = NULL;
11243 }
11244 {
11245 arg7 = NULL;
11246 }
11247 SWIG_check_num_args("plvect",3,5)
11248 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvect",3,"PLFLT");
11249 {
11250 int jj;
11251
11252 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
11253 if ( !arg1 )
11254 SWIG_fail;
11255 Xlen = ii1;
11256 Ylen = jj;
11257 }
11258 {
11259 int jj;
11260
11261 arg2 = read_double_Matrix( L, 2, &ii2, &jj );
11262 if ( !arg2 )
11263 SWIG_fail;
11264 arg3 = ii2;
11265 arg4 = jj;
11266 if ( ( arg3 != Xlen ) || ( arg4 != Ylen ) )
11267 {
11268 lua_pushfstring( L, "Vectors must match matrix." );
11269 SWIG_fail;
11270 }
11271 }
11272 arg5 = (PLFLT)lua_tonumber(L, 3);
11273 if(lua_gettop(L)>=4){
11274 {
11275 arg6 = NULL;
11276 mypltr_funcstr[0] = '\0';
11277
11278 if ( lua_isstring( L, 4 ) )
11279 {
11280 const char* funcstr = lua_tostring( L, 4 );
11281 if ( strcmp( "pltr0", funcstr ) == 0 )
11282 {
11283 arg6 = pltr0;
11284 }
11285 else if ( strcmp( "pltr1", funcstr ) == 0 )
11286 {
11287 arg6 = pltr1;
11288 }
11289 else if ( strcmp( "pltr2", funcstr ) == 0 )
11290 {
11291 arg6 = pltr2;
11292 }
11293 else
11294 {
11295 arg6 = mypltr;
11296 strncpy( mypltr_funcstr, funcstr, 255 );
11297 myL = L;
11298 }
11299 }
11300 else
11301 SWIG_fail_arg( "vect", 6, "pltr_func" );
11302 }
11303 }
11304 if(lua_gettop(L)>=5){
11305 {
11306 int nx, ny;
11307 int gridmode = 0;
11308
11309 lua_pushstring( L, "xg" );
11310 lua_gettable( L, 5 );
11311 if ( !lua_istable( L, -1 ) )
11312 {
11313 lua_pop( L, 1 ); // pop "xg"
11314 lua_pushstring( L, "expected a table xg" );
11315 SWIG_fail;
11316 }
11317 lua_rawgeti( L, -1, 1 );
11318 if ( lua_istable( L, -1 ) )
11319 gridmode = 2; // two dimensional array
11320 else if ( lua_isnumber( L, -1 ) )
11321 gridmode = 1; // one dimensional array
11322 else
11323 {
11324 lua_pop( L, 1 ); // pop "1"
11325 lua_pop( L, 1 ); // pop "xg"
11326 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
11327 SWIG_fail;
11328 }
11329 lua_pop( L, 1 ); // pop test element
11330 if ( gridmode == 1 )
11331 {
11332 cgrid17.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
11333 if ( !cgrid17.xg )
11334 {
11335 lua_pop( L, 1 ); // pop "xg"
11336 SWIG_fail;
11337 }
11338 if ( nx != Xlen )
11339 {
11340 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
11341 SWIG_fail;
11342 }
11343 cgrid17.nx = nx;
11344 }
11345 else
11346 {
11347 cgrid27.xg = read_double_Matrix( L, -1, &nx, &ny );
11348 if ( !cgrid27.xg )
11349 {
11350 lua_pop( L, 1 ); // pop "xg"
11351 SWIG_fail;
11352 }
11353 if ( ( nx != Xlen ) || ( ny != Ylen ) )
11354 {
11355 lua_pop( L, 1 ); // pop "xg"
11356 lua_pushfstring( L, "Vectors must match matrix." );
11357 SWIG_fail;
11358 }
11359 cgrid27.nx = nx;
11360 cgrid27.ny = ny;
11361 }
11362 lua_pop( L, 1 ); // pop "xg"
11363
11364 lua_pushstring( L, "yg" );
11365 lua_gettable( L, 5 );
11366 if ( !lua_istable( L, -1 ) )
11367 {
11368 lua_pop( L, 1 );
11369 lua_pushstring( L, "expected a table yg" );
11370 SWIG_fail;
11371 }
11372 lua_rawgeti( L, -1, 1 );
11373 if ( gridmode == 2 )
11374 {
11375 if ( !lua_istable( L, -1 ) )
11376 {
11377 lua_pop( L, 1 ); // pop "1"
11378 lua_pop( L, 1 ); // pop "yg"
11379 lua_pushstring( L, "expected a two dimensional array/table in yg" );
11380 SWIG_fail;
11381 }
11382 }
11383 else
11384 {
11385 if ( !lua_isnumber( L, -1 ) )
11386 {
11387 lua_pop( L, 1 ); // pop "1"
11388 lua_pop( L, 1 ); // pop "yg"
11389 lua_pushstring( L, "expected a one dimensional array/table in yg" );
11390 SWIG_fail;
11391 }
11392 }
11393 lua_pop( L, 1 ); // pop "1"
11394 if ( gridmode == 1 )
11395 {
11396 cgrid17.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
11397 if ( !cgrid17.yg )
11398 {
11399 lua_pop( L, 1 ); // pop "yg"
11400 SWIG_fail;
11401 }
11402 if ( ny != Ylen )
11403 {
11404 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
11405 SWIG_fail;
11406 }
11407 cgrid17.ny = ny;
11408 }
11409 else
11410 {
11411 cgrid27.yg = read_double_Matrix( L, -1, &nx, &ny );
11412 if ( !cgrid27.yg )
11413 {
11414 lua_pop( L, 1 ); // pop "xg"
11415 SWIG_fail;
11416 }
11417 if ( ( nx != Xlen ) || ( ny != Ylen ) )
11418 {
11419 lua_pop( L, 1 ); // pop "xg"
11420 lua_pushfstring( L, "Vectors must match matrix." );
11421 SWIG_fail;
11422 }
11423 // cgrid27.nx/ny already set
11424 }
11425 lua_pop( L, 1 ); // pop "yg"
11426
11427 if ( gridmode == 1 )
11428 arg7 = &cgrid17;
11429 else if ( gridmode == 2 )
11430 arg7 = &cgrid27;
11431 }
11432 }
11433 plvect((double const **)arg1,(double const **)arg2,arg3,arg4,arg5,arg6,arg7);
11434
11435 {
11436 int i;
11437
11438 if ( arg1 )
11439 {
11440 for ( i = 0; i < ii1; i++ )
11441 LUA_FREE_ARRAY( arg1[i] );
11442 LUA_FREE_ARRAY( arg1 );
11443 }
11444 }
11445 {
11446 int i;
11447
11448 if ( arg2 )
11449 {
11450 for ( i = 0; i < ii2; i++ )
11451 LUA_FREE_ARRAY( arg2[i] );
11452 LUA_FREE_ARRAY( arg2 );
11453 }
11454 }
11455 {
11456 mypltr_funcstr[0] = '\0';
11457 }
11458 {
11459 int i;
11460
11461 LUA_FREE_ARRAY( cgrid17.xg );
11462 LUA_FREE_ARRAY( cgrid17.yg );
11463
11464 if ( cgrid27.xg )
11465 {
11466 for ( i = 0; i < Xlen; i++ )
11467 LUA_FREE_ARRAY( cgrid27.xg[i] );
11468 LUA_FREE_ARRAY( cgrid27.xg );
11469 }
11470 if ( cgrid27.yg )
11471 {
11472 for ( i = 0; i < Xlen; i++ )
11473 LUA_FREE_ARRAY( cgrid27.yg[i] );
11474 LUA_FREE_ARRAY( cgrid27.yg );
11475 }
11476 }
11477 return SWIG_arg;
11478
11479 if(0) SWIG_fail;
11480
11481fail:
11482 {
11483 int i;
11484
11485 if ( arg1 )
11486 {
11487 for ( i = 0; i < ii1; i++ )
11488 LUA_FREE_ARRAY( arg1[i] );
11489 LUA_FREE_ARRAY( arg1 );
11490 }
11491 }
11492 {
11493 int i;
11494
11495 if ( arg2 )
11496 {
11497 for ( i = 0; i < ii2; i++ )
11498 LUA_FREE_ARRAY( arg2[i] );
11499 LUA_FREE_ARRAY( arg2 );
11500 }
11501 }
11502 {
11503 mypltr_funcstr[0] = '\0';
11504 }
11505 {
11506 int i;
11507
11508 LUA_FREE_ARRAY( cgrid17.xg );
11509 LUA_FREE_ARRAY( cgrid17.yg );
11510
11511 if ( cgrid27.xg )
11512 {
11513 for ( i = 0; i < Xlen; i++ )
11514 LUA_FREE_ARRAY( cgrid27.xg[i] );
11515 LUA_FREE_ARRAY( cgrid27.xg );
11516 }
11517 if ( cgrid27.yg )
11518 {
11519 for ( i = 0; i < Xlen; i++ )
11520 LUA_FREE_ARRAY( cgrid27.yg[i] );
11521 LUA_FREE_ARRAY( cgrid27.yg );
11522 }
11523 }
11524 lua_error(L);
11525 return SWIG_arg;
11526}
11527
11528
11529static int _wrap_vpas(lua_State* L) {
11530 int SWIG_arg = 0;
11531 PLFLT arg1 ;
11532 PLFLT arg2 ;
11533 PLFLT arg3 ;
11534 PLFLT arg4 ;
11535 PLFLT arg5 ;
11536
11537 SWIG_check_num_args("plvpas",5,5)
11538 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvpas",1,"PLFLT");
11539 if(!lua_isnumber(L,2)) SWIG_fail_arg("plvpas",2,"PLFLT");
11540 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvpas",3,"PLFLT");
11541 if(!lua_isnumber(L,4)) SWIG_fail_arg("plvpas",4,"PLFLT");
11542 if(!lua_isnumber(L,5)) SWIG_fail_arg("plvpas",5,"PLFLT");
11543 arg1 = (PLFLT)lua_tonumber(L, 1);
11544 arg2 = (PLFLT)lua_tonumber(L, 2);
11545 arg3 = (PLFLT)lua_tonumber(L, 3);
11546 arg4 = (PLFLT)lua_tonumber(L, 4);
11547 arg5 = (PLFLT)lua_tonumber(L, 5);
11548 plvpas(arg1,arg2,arg3,arg4,arg5);
11549
11550 return SWIG_arg;
11551
11552 if(0) SWIG_fail;
11553
11554fail:
11555 lua_error(L);
11556 return SWIG_arg;
11557}
11558
11559
11560static int _wrap_vpor(lua_State* L) {
11561 int SWIG_arg = 0;
11562 PLFLT arg1 ;
11563 PLFLT arg2 ;
11564 PLFLT arg3 ;
11565 PLFLT arg4 ;
11566
11567 SWIG_check_num_args("plvpor",4,4)
11568 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvpor",1,"PLFLT");
11569 if(!lua_isnumber(L,2)) SWIG_fail_arg("plvpor",2,"PLFLT");
11570 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvpor",3,"PLFLT");
11571 if(!lua_isnumber(L,4)) SWIG_fail_arg("plvpor",4,"PLFLT");
11572 arg1 = (PLFLT)lua_tonumber(L, 1);
11573 arg2 = (PLFLT)lua_tonumber(L, 2);
11574 arg3 = (PLFLT)lua_tonumber(L, 3);
11575 arg4 = (PLFLT)lua_tonumber(L, 4);
11576 plvpor(arg1,arg2,arg3,arg4);
11577
11578 return SWIG_arg;
11579
11580 if(0) SWIG_fail;
11581
11582fail:
11583 lua_error(L);
11584 return SWIG_arg;
11585}
11586
11587
11588static int _wrap_vsta(lua_State* L) {
11589 int SWIG_arg = 0;
11590
11591 SWIG_check_num_args("plvsta",0,0)
11592 plvsta();
11593
11594 return SWIG_arg;
11595
11596 if(0) SWIG_fail;
11597
11598fail:
11599 lua_error(L);
11600 return SWIG_arg;
11601}
11602
11603
11604static int _wrap_w3d(lua_State* L) {
11605 int SWIG_arg = 0;
11606 PLFLT arg1 ;
11607 PLFLT arg2 ;
11608 PLFLT arg3 ;
11609 PLFLT arg4 ;
11610 PLFLT arg5 ;
11611 PLFLT arg6 ;
11612 PLFLT arg7 ;
11613 PLFLT arg8 ;
11614 PLFLT arg9 ;
11615 PLFLT arg10 ;
11616 PLFLT arg11 ;
11617
11618 SWIG_check_num_args("plw3d",11,11)
11619 if(!lua_isnumber(L,1)) SWIG_fail_arg("plw3d",1,"PLFLT");
11620 if(!lua_isnumber(L,2)) SWIG_fail_arg("plw3d",2,"PLFLT");
11621 if(!lua_isnumber(L,3)) SWIG_fail_arg("plw3d",3,"PLFLT");
11622 if(!lua_isnumber(L,4)) SWIG_fail_arg("plw3d",4,"PLFLT");
11623 if(!lua_isnumber(L,5)) SWIG_fail_arg("plw3d",5,"PLFLT");
11624 if(!lua_isnumber(L,6)) SWIG_fail_arg("plw3d",6,"PLFLT");
11625 if(!lua_isnumber(L,7)) SWIG_fail_arg("plw3d",7,"PLFLT");
11626 if(!lua_isnumber(L,8)) SWIG_fail_arg("plw3d",8,"PLFLT");
11627 if(!lua_isnumber(L,9)) SWIG_fail_arg("plw3d",9,"PLFLT");
11628 if(!lua_isnumber(L,10)) SWIG_fail_arg("plw3d",10,"PLFLT");
11629 if(!lua_isnumber(L,11)) SWIG_fail_arg("plw3d",11,"PLFLT");
11630 arg1 = (PLFLT)lua_tonumber(L, 1);
11631 arg2 = (PLFLT)lua_tonumber(L, 2);
11632 arg3 = (PLFLT)lua_tonumber(L, 3);
11633 arg4 = (PLFLT)lua_tonumber(L, 4);
11634 arg5 = (PLFLT)lua_tonumber(L, 5);
11635 arg6 = (PLFLT)lua_tonumber(L, 6);
11636 arg7 = (PLFLT)lua_tonumber(L, 7);
11637 arg8 = (PLFLT)lua_tonumber(L, 8);
11638 arg9 = (PLFLT)lua_tonumber(L, 9);
11639 arg10 = (PLFLT)lua_tonumber(L, 10);
11640 arg11 = (PLFLT)lua_tonumber(L, 11);
11641 plw3d(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
11642
11643 return SWIG_arg;
11644
11645 if(0) SWIG_fail;
11646
11647fail:
11648 lua_error(L);
11649 return SWIG_arg;
11650}
11651
11652
11653static int _wrap_width(lua_State* L) {
11654 int SWIG_arg = 0;
11655 PLFLT arg1 ;
11656
11657 SWIG_check_num_args("plwidth",1,1)
11658 if(!lua_isnumber(L,1)) SWIG_fail_arg("plwidth",1,"PLFLT");
11659 arg1 = (PLFLT)lua_tonumber(L, 1);
11660 plwidth(arg1);
11661
11662 return SWIG_arg;
11663
11664 if(0) SWIG_fail;
11665
11666fail:
11667 lua_error(L);
11668 return SWIG_arg;
11669}
11670
11671
11672static int _wrap_wind(lua_State* L) {
11673 int SWIG_arg = 0;
11674 PLFLT arg1 ;
11675 PLFLT arg2 ;
11676 PLFLT arg3 ;
11677 PLFLT arg4 ;
11678
11679 SWIG_check_num_args("plwind",4,4)
11680 if(!lua_isnumber(L,1)) SWIG_fail_arg("plwind",1,"PLFLT");
11681 if(!lua_isnumber(L,2)) SWIG_fail_arg("plwind",2,"PLFLT");
11682 if(!lua_isnumber(L,3)) SWIG_fail_arg("plwind",3,"PLFLT");
11683 if(!lua_isnumber(L,4)) SWIG_fail_arg("plwind",4,"PLFLT");
11684 arg1 = (PLFLT)lua_tonumber(L, 1);
11685 arg2 = (PLFLT)lua_tonumber(L, 2);
11686 arg3 = (PLFLT)lua_tonumber(L, 3);
11687 arg4 = (PLFLT)lua_tonumber(L, 4);
11688 plwind(arg1,arg2,arg3,arg4);
11689
11690 return SWIG_arg;
11691
11692 if(0) SWIG_fail;
11693
11694fail:
11695 lua_error(L);
11696 return SWIG_arg;
11697}
11698
11699
11700static int _wrap_xormod(lua_State* L) {
11701 int SWIG_arg = 0;
11702 PLBOOL arg1 ;
11703 PLBOOL *arg2 = (PLBOOL *) 0 ;
11704 PLBOOL temp2 ;
11705
11706 arg2 = &temp2;
11707 SWIG_check_num_args("plxormod",1,1)
11708 if(!lua_isnumber(L,1)) SWIG_fail_arg("plxormod",1,"PLBOOL");
11709 arg1 = (PLBOOL)lua_tonumber(L, 1);
11710 plxormod(arg1,arg2);
11711
11712 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
11713 return SWIG_arg;
11714
11715 if(0) SWIG_fail;
11716
11717fail:
11718 lua_error(L);
11719 return SWIG_arg;
11720}
11721
11722
11723static int _wrap_map(lua_State* L) {
11724 int SWIG_arg = 0;
11725 mapform_func arg1 = (mapform_func) 0 ;
11726 char *arg2 = (char *) 0 ;
11727 PLFLT arg3 ;
11728 PLFLT arg4 ;
11729 PLFLT arg5 ;
11730 PLFLT arg6 ;
11731
11732 SWIG_check_num_args("plmap",6,6)
11733 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmap",2,"char const *");
11734 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmap",3,"PLFLT");
11735 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmap",4,"PLFLT");
11736 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmap",5,"PLFLT");
11737 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmap",6,"PLFLT");
11738 {
11739 arg1 = NULL;
11740 mapform_funcstr[0] = '\0';
11741
11742 if ( lua_isnil( L, 1 ) )
11743 {
11744 arg1 = NULL;
11745 }
11746 else if ( lua_isstring( L, 1 ) )
11747 {
11748 arg1 = mapform;
11749 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11750 myL = L;
11751 }
11752 else
11753 SWIG_fail_arg( "map", 1, "mapform_func" );
11754 }
11755 arg2 = (char *)lua_tostring(L, 2);
11756 arg3 = (PLFLT)lua_tonumber(L, 3);
11757 arg4 = (PLFLT)lua_tonumber(L, 4);
11758 arg5 = (PLFLT)lua_tonumber(L, 5);
11759 arg6 = (PLFLT)lua_tonumber(L, 6);
11760 plmap(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
11761
11762 {
11763 mapform_funcstr[0] = '\0';
11764 }
11765 return SWIG_arg;
11766
11767 if(0) SWIG_fail;
11768
11769fail:
11770 {
11771 mapform_funcstr[0] = '\0';
11772 }
11773 lua_error(L);
11774 return SWIG_arg;
11775}
11776
11777
11778static int _wrap_mapline(lua_State* L) {
11779 int SWIG_arg = 0;
11780 mapform_func arg1 = (mapform_func) 0 ;
11781 char *arg2 = (char *) 0 ;
11782 PLFLT arg3 ;
11783 PLFLT arg4 ;
11784 PLFLT arg5 ;
11785 PLFLT arg6 ;
11786 PLINT *arg7 = (PLINT *) 0 ;
11787 PLINT arg8 ;
11788 int temp7 ;
11789
11790 SWIG_check_num_args("plmapline",7,7)
11791 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapline",2,"char const *");
11792 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmapline",3,"PLFLT");
11793 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapline",4,"PLFLT");
11794 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapline",5,"PLFLT");
11795 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapline",6,"PLFLT");
11796 {
11797 arg1 = NULL;
11798 mapform_funcstr[0] = '\0';
11799
11800 if ( lua_isnil( L, 1 ) )
11801 {
11802 arg1 = NULL;
11803 }
11804 else if ( lua_isstring( L, 1 ) )
11805 {
11806 arg1 = mapform;
11807 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11808 myL = L;
11809 }
11810 else
11811 SWIG_fail_arg( "mapline", 1, "mapform_func" );
11812 }
11813 arg2 = (char *)lua_tostring(L, 2);
11814 arg3 = (PLFLT)lua_tonumber(L, 3);
11815 arg4 = (PLFLT)lua_tonumber(L, 4);
11816 arg5 = (PLFLT)lua_tonumber(L, 5);
11817 arg6 = (PLFLT)lua_tonumber(L, 6);
11818 {
11819 if ( lua_isnil( L, 7 ) )
11820 {
11821 arg7 = NULL;
11822 arg8 = 0;
11823 }
11824 else
11825 {
11826 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp7 );
11827 if ( !arg7 )
11828 SWIG_fail;
11829 arg8 = temp7;
11830 }
11831 }
11832 plmapline(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,(int const *)arg7,arg8);
11833
11834 {
11835 mapform_funcstr[0] = '\0';
11836 }
11837 {
11838 LUA_FREE_ARRAY( arg7 );
11839 }
11840 return SWIG_arg;
11841
11842 if(0) SWIG_fail;
11843
11844fail:
11845 {
11846 mapform_funcstr[0] = '\0';
11847 }
11848 {
11849 LUA_FREE_ARRAY( arg7 );
11850 }
11851 lua_error(L);
11852 return SWIG_arg;
11853}
11854
11855
11856static int _wrap_mapstring(lua_State* L) {
11857 int SWIG_arg = 0;
11858 mapform_func arg1 = (mapform_func) 0 ;
11859 char *arg2 = (char *) 0 ;
11860 char *arg3 = (char *) 0 ;
11861 PLFLT arg4 ;
11862 PLFLT arg5 ;
11863 PLFLT arg6 ;
11864 PLFLT arg7 ;
11865 PLINT *arg8 = (PLINT *) 0 ;
11866 PLINT arg9 ;
11867 int temp8 ;
11868
11869 SWIG_check_num_args("plmapstring",8,8)
11870 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapstring",2,"char const *");
11871 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plmapstring",3,"char const *");
11872 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapstring",4,"PLFLT");
11873 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapstring",5,"PLFLT");
11874 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapstring",6,"PLFLT");
11875 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmapstring",7,"PLFLT");
11876 {
11877 arg1 = NULL;
11878 mapform_funcstr[0] = '\0';
11879
11880 if ( lua_isnil( L, 1 ) )
11881 {
11882 arg1 = NULL;
11883 }
11884 else if ( lua_isstring( L, 1 ) )
11885 {
11886 arg1 = mapform;
11887 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11888 myL = L;
11889 }
11890 else
11891 SWIG_fail_arg( "mapstring", 1, "mapform_func" );
11892 }
11893 arg2 = (char *)lua_tostring(L, 2);
11894 arg3 = (char *)lua_tostring(L, 3);
11895 arg4 = (PLFLT)lua_tonumber(L, 4);
11896 arg5 = (PLFLT)lua_tonumber(L, 5);
11897 arg6 = (PLFLT)lua_tonumber(L, 6);
11898 arg7 = (PLFLT)lua_tonumber(L, 7);
11899 {
11900 if ( lua_isnil( L, 8 ) )
11901 {
11902 arg8 = NULL;
11903 arg9 = 0;
11904 }
11905 else
11906 {
11907 arg8 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp8 );
11908 if ( !arg8 )
11909 SWIG_fail;
11910 arg9 = temp8;
11911 }
11912 }
11913 plmapstring(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7,(int const *)arg8,arg9);
11914
11915 {
11916 mapform_funcstr[0] = '\0';
11917 }
11918 {
11919 LUA_FREE_ARRAY( arg8 );
11920 }
11921 return SWIG_arg;
11922
11923 if(0) SWIG_fail;
11924
11925fail:
11926 {
11927 mapform_funcstr[0] = '\0';
11928 }
11929 {
11930 LUA_FREE_ARRAY( arg8 );
11931 }
11932 lua_error(L);
11933 return SWIG_arg;
11934}
11935
11936
11937static int _wrap_maptex(lua_State* L) {
11938 int SWIG_arg = 0;
11939 mapform_func arg1 = (mapform_func) 0 ;
11940 char *arg2 = (char *) 0 ;
11941 PLFLT arg3 ;
11942 PLFLT arg4 ;
11943 PLFLT arg5 ;
11944 char *arg6 = (char *) 0 ;
11945 PLFLT arg7 ;
11946 PLFLT arg8 ;
11947 PLFLT arg9 ;
11948 PLFLT arg10 ;
11949 PLINT arg11 ;
11950
11951 SWIG_check_num_args("plmaptex",11,11)
11952 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmaptex",2,"char const *");
11953 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmaptex",3,"PLFLT");
11954 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmaptex",4,"PLFLT");
11955 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmaptex",5,"PLFLT");
11956 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plmaptex",6,"char const *");
11957 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmaptex",7,"PLFLT");
11958 if(!lua_isnumber(L,8)) SWIG_fail_arg("plmaptex",8,"PLFLT");
11959 if(!lua_isnumber(L,9)) SWIG_fail_arg("plmaptex",9,"PLFLT");
11960 if(!lua_isnumber(L,10)) SWIG_fail_arg("plmaptex",10,"PLFLT");
11961 if(!lua_isnumber(L,11)) SWIG_fail_arg("plmaptex",11,"PLINT");
11962 {
11963 arg1 = NULL;
11964 mapform_funcstr[0] = '\0';
11965
11966 if ( lua_isnil( L, 1 ) )
11967 {
11968 arg1 = NULL;
11969 }
11970 else if ( lua_isstring( L, 1 ) )
11971 {
11972 arg1 = mapform;
11973 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
11974 myL = L;
11975 }
11976 else
11977 SWIG_fail_arg( "maptex", 1, "mapform_func" );
11978 }
11979 arg2 = (char *)lua_tostring(L, 2);
11980 arg3 = (PLFLT)lua_tonumber(L, 3);
11981 arg4 = (PLFLT)lua_tonumber(L, 4);
11982 arg5 = (PLFLT)lua_tonumber(L, 5);
11983 arg6 = (char *)lua_tostring(L, 6);
11984 arg7 = (PLFLT)lua_tonumber(L, 7);
11985 arg8 = (PLFLT)lua_tonumber(L, 8);
11986 arg9 = (PLFLT)lua_tonumber(L, 9);
11987 arg10 = (PLFLT)lua_tonumber(L, 10);
11988 arg11 = (PLINT)lua_tonumber(L, 11);
11989 plmaptex(arg1,(char const *)arg2,arg3,arg4,arg5,(char const *)arg6,arg7,arg8,arg9,arg10,arg11);
11990
11991 {
11992 mapform_funcstr[0] = '\0';
11993 }
11994 return SWIG_arg;
11995
11996 if(0) SWIG_fail;
11997
11998fail:
11999 {
12000 mapform_funcstr[0] = '\0';
12001 }
12002 lua_error(L);
12003 return SWIG_arg;
12004}
12005
12006
12007static int _wrap_mapfill(lua_State* L) {
12008 int SWIG_arg = 0;
12009 mapform_func arg1 = (mapform_func) 0 ;
12010 char *arg2 = (char *) 0 ;
12011 PLFLT arg3 ;
12012 PLFLT arg4 ;
12013 PLFLT arg5 ;
12014 PLFLT arg6 ;
12015 PLINT *arg7 = (PLINT *) 0 ;
12016 PLINT arg8 ;
12017 int temp7 ;
12018
12019 SWIG_check_num_args("plmapfill",7,7)
12020 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmapfill",2,"char const *");
12021 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmapfill",3,"PLFLT");
12022 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmapfill",4,"PLFLT");
12023 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmapfill",5,"PLFLT");
12024 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmapfill",6,"PLFLT");
12025 {
12026 arg1 = NULL;
12027 mapform_funcstr[0] = '\0';
12028
12029 if ( lua_isnil( L, 1 ) )
12030 {
12031 arg1 = NULL;
12032 }
12033 else if ( lua_isstring( L, 1 ) )
12034 {
12035 arg1 = mapform;
12036 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
12037 myL = L;
12038 }
12039 else
12040 SWIG_fail_arg( "mapfill", 1, "mapform_func" );
12041 }
12042 arg2 = (char *)lua_tostring(L, 2);
12043 arg3 = (PLFLT)lua_tonumber(L, 3);
12044 arg4 = (PLFLT)lua_tonumber(L, 4);
12045 arg5 = (PLFLT)lua_tonumber(L, 5);
12046 arg6 = (PLFLT)lua_tonumber(L, 6);
12047 {
12048 if ( lua_isnil( L, 7 ) )
12049 {
12050 arg7 = NULL;
12051 arg8 = 0;
12052 }
12053 else
12054 {
12055 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp7 );
12056 if ( !arg7 )
12057 SWIG_fail;
12058 arg8 = temp7;
12059 }
12060 }
12061 plmapfill(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,(int const *)arg7,arg8);
12062
12063 {
12064 mapform_funcstr[0] = '\0';
12065 }
12066 {
12067 LUA_FREE_ARRAY( arg7 );
12068 }
12069 return SWIG_arg;
12070
12071 if(0) SWIG_fail;
12072
12073fail:
12074 {
12075 mapform_funcstr[0] = '\0';
12076 }
12077 {
12078 LUA_FREE_ARRAY( arg7 );
12079 }
12080 lua_error(L);
12081 return SWIG_arg;
12082}
12083
12084
12085static int _wrap_meridians(lua_State* L) {
12086 int SWIG_arg = 0;
12087 mapform_func arg1 = (mapform_func) 0 ;
12088 PLFLT arg2 ;
12089 PLFLT arg3 ;
12090 PLFLT arg4 ;
12091 PLFLT arg5 ;
12092 PLFLT arg6 ;
12093 PLFLT arg7 ;
12094
12095 SWIG_check_num_args("plmeridians",7,7)
12096 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmeridians",2,"PLFLT");
12097 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmeridians",3,"PLFLT");
12098 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmeridians",4,"PLFLT");
12099 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmeridians",5,"PLFLT");
12100 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmeridians",6,"PLFLT");
12101 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmeridians",7,"PLFLT");
12102 {
12103 arg1 = NULL;
12104 mapform_funcstr[0] = '\0';
12105
12106 if ( lua_isnil( L, 1 ) )
12107 {
12108 arg1 = NULL;
12109 }
12110 else if ( lua_isstring( L, 1 ) )
12111 {
12112 arg1 = mapform;
12113 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
12114 myL = L;
12115 }
12116 else
12117 SWIG_fail_arg( "meridians", 1, "mapform_func" );
12118 }
12119 arg2 = (PLFLT)lua_tonumber(L, 2);
12120 arg3 = (PLFLT)lua_tonumber(L, 3);
12121 arg4 = (PLFLT)lua_tonumber(L, 4);
12122 arg5 = (PLFLT)lua_tonumber(L, 5);
12123 arg6 = (PLFLT)lua_tonumber(L, 6);
12124 arg7 = (PLFLT)lua_tonumber(L, 7);
12125 plmeridians(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
12126
12127 {
12128 mapform_funcstr[0] = '\0';
12129 }
12130 return SWIG_arg;
12131
12132 if(0) SWIG_fail;
12133
12134fail:
12135 {
12136 mapform_funcstr[0] = '\0';
12137 }
12138 lua_error(L);
12139 return SWIG_arg;
12140}
12141
12142
12143static int _wrap_image(lua_State* L) {
12144 int SWIG_arg = 0;
12145 PLFLT **arg1 = (PLFLT **) 0 ;
12146 PLINT arg2 ;
12147 PLINT arg3 ;
12148 PLFLT arg4 ;
12149 PLFLT arg5 ;
12150 PLFLT arg6 ;
12151 PLFLT arg7 ;
12152 PLFLT arg8 ;
12153 PLFLT arg9 ;
12154 PLFLT arg10 ;
12155 PLFLT arg11 ;
12156 PLFLT arg12 ;
12157 PLFLT arg13 ;
12158 int ii1 ;
12159
12160 SWIG_check_num_args("plimage",11,11)
12161 if(!lua_isnumber(L,2)) SWIG_fail_arg("plimage",2,"PLFLT");
12162 if(!lua_isnumber(L,3)) SWIG_fail_arg("plimage",3,"PLFLT");
12163 if(!lua_isnumber(L,4)) SWIG_fail_arg("plimage",4,"PLFLT");
12164 if(!lua_isnumber(L,5)) SWIG_fail_arg("plimage",5,"PLFLT");
12165 if(!lua_isnumber(L,6)) SWIG_fail_arg("plimage",6,"PLFLT");
12166 if(!lua_isnumber(L,7)) SWIG_fail_arg("plimage",7,"PLFLT");
12167 if(!lua_isnumber(L,8)) SWIG_fail_arg("plimage",8,"PLFLT");
12168 if(!lua_isnumber(L,9)) SWIG_fail_arg("plimage",9,"PLFLT");
12169 if(!lua_isnumber(L,10)) SWIG_fail_arg("plimage",10,"PLFLT");
12170 if(!lua_isnumber(L,11)) SWIG_fail_arg("plimage",11,"PLFLT");
12171 {
12172 int jj;
12173
12174 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
12175 if ( !arg1 )
12176 SWIG_fail;
12177 Xlen = arg2 = ii1;
12178 Ylen = arg3 = jj;
12179 }
12180 arg4 = (PLFLT)lua_tonumber(L, 2);
12181 arg5 = (PLFLT)lua_tonumber(L, 3);
12182 arg6 = (PLFLT)lua_tonumber(L, 4);
12183 arg7 = (PLFLT)lua_tonumber(L, 5);
12184 arg8 = (PLFLT)lua_tonumber(L, 6);
12185 arg9 = (PLFLT)lua_tonumber(L, 7);
12186 arg10 = (PLFLT)lua_tonumber(L, 8);
12187 arg11 = (PLFLT)lua_tonumber(L, 9);
12188 arg12 = (PLFLT)lua_tonumber(L, 10);
12189 arg13 = (PLFLT)lua_tonumber(L, 11);
12190 plimage((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
12191
12192 {
12193 int i;
12194
12195 if ( arg1 )
12196 {
12197 for ( i = 0; i < ii1; i++ )
12198 LUA_FREE_ARRAY( arg1[i] );
12199 LUA_FREE_ARRAY( arg1 );
12200 }
12201 }
12202 return SWIG_arg;
12203
12204 if(0) SWIG_fail;
12205
12206fail:
12207 {
12208 int i;
12209
12210 if ( arg1 )
12211 {
12212 for ( i = 0; i < ii1; i++ )
12213 LUA_FREE_ARRAY( arg1[i] );
12214 LUA_FREE_ARRAY( arg1 );
12215 }
12216 }
12217 lua_error(L);
12218 return SWIG_arg;
12219}
12220
12221
12222static int _wrap_imagefr(lua_State* L) {
12223 int SWIG_arg = 0;
12224 PLFLT **arg1 = (PLFLT **) 0 ;
12225 PLINT arg2 ;
12226 PLINT arg3 ;
12227 PLFLT arg4 ;
12228 PLFLT arg5 ;
12229 PLFLT arg6 ;
12230 PLFLT arg7 ;
12231 PLFLT arg8 ;
12232 PLFLT arg9 ;
12233 PLFLT arg10 ;
12234 PLFLT arg11 ;
12235 pltr_func arg12 = (pltr_func) 0 ;
12236 PLPointer arg13 = (PLPointer) 0 ;
12237 int ii1 ;
12238 PLcGrid cgrid113 ;
12239 PLcGrid2 cgrid213 ;
12240
12241 {
12242 cgrid113.xg = cgrid113.yg = cgrid113.zg = NULL;
12243 cgrid113.nx = cgrid113.ny = cgrid113.nz = 0;
12244 cgrid213.xg = cgrid213.yg = cgrid213.zg = NULL;
12245 cgrid213.nx = cgrid213.ny = 0;
12246 }
12247 {
12248 arg12 = NULL;
12249 }
12250 {
12251 arg13 = NULL;
12252 }
12253 SWIG_check_num_args("plimagefr",9,11)
12254 if(!lua_isnumber(L,2)) SWIG_fail_arg("plimagefr",2,"PLFLT");
12255 if(!lua_isnumber(L,3)) SWIG_fail_arg("plimagefr",3,"PLFLT");
12256 if(!lua_isnumber(L,4)) SWIG_fail_arg("plimagefr",4,"PLFLT");
12257 if(!lua_isnumber(L,5)) SWIG_fail_arg("plimagefr",5,"PLFLT");
12258 if(!lua_isnumber(L,6)) SWIG_fail_arg("plimagefr",6,"PLFLT");
12259 if(!lua_isnumber(L,7)) SWIG_fail_arg("plimagefr",7,"PLFLT");
12260 if(!lua_isnumber(L,8)) SWIG_fail_arg("plimagefr",8,"PLFLT");
12261 if(!lua_isnumber(L,9)) SWIG_fail_arg("plimagefr",9,"PLFLT");
12262 {
12263 int jj;
12264
12265 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
12266 if ( !arg1 )
12267 SWIG_fail;
12268 Xlen = arg2 = ii1;
12269 Ylen = arg3 = jj;
12270 }
12271 arg4 = (PLFLT)lua_tonumber(L, 2);
12272 arg5 = (PLFLT)lua_tonumber(L, 3);
12273 arg6 = (PLFLT)lua_tonumber(L, 4);
12274 arg7 = (PLFLT)lua_tonumber(L, 5);
12275 arg8 = (PLFLT)lua_tonumber(L, 6);
12276 arg9 = (PLFLT)lua_tonumber(L, 7);
12277 arg10 = (PLFLT)lua_tonumber(L, 8);
12278 arg11 = (PLFLT)lua_tonumber(L, 9);
12279 if(lua_gettop(L)>=10){
12280 {
12281 arg12 = NULL;
12282 mypltr_funcstr[0] = '\0';
12283
12284 if ( lua_isstring( L, 10 ) )
12285 {
12286 const char* funcstr = lua_tostring( L, 10 );
12287 if ( strcmp( "pltr0", funcstr ) == 0 )
12288 {
12289 arg12 = pltr0;
12290 }
12291 else if ( strcmp( "pltr1", funcstr ) == 0 )
12292 {
12293 arg12 = pltr1;
12294 }
12295 else if ( strcmp( "pltr2", funcstr ) == 0 )
12296 {
12297 arg12 = pltr2;
12298 }
12299 else
12300 {
12301 arg12 = mypltr;
12302 strncpy( mypltr_funcstr, funcstr, 255 );
12303 myL = L;
12304 }
12305 }
12306 else
12307 SWIG_fail_arg( "imagefr", 12, "pltr_func" );
12308 }
12309 }
12310 if(lua_gettop(L)>=11){
12311 {
12312 int nx, ny;
12313 int gridmode = 0;
12314
12315 lua_pushstring( L, "xg" );
12316 lua_gettable( L, 11 );
12317 if ( !lua_istable( L, -1 ) )
12318 {
12319 lua_pop( L, 1 ); // pop "xg"
12320 lua_pushstring( L, "expected a table xg" );
12321 SWIG_fail;
12322 }
12323 lua_rawgeti( L, -1, 1 );
12324 if ( lua_istable( L, -1 ) )
12325 gridmode = 2; // two dimensional array
12326 else if ( lua_isnumber( L, -1 ) )
12327 gridmode = 1; // one dimensional array
12328 else
12329 {
12330 lua_pop( L, 1 ); // pop "1"
12331 lua_pop( L, 1 ); // pop "xg"
12332 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
12333 SWIG_fail;
12334 }
12335 lua_pop( L, 1 ); // pop test element
12336 if ( gridmode == 1 )
12337 {
12338 cgrid113.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
12339 if ( !cgrid113.xg )
12340 {
12341 lua_pop( L, 1 ); // pop "xg"
12342 SWIG_fail;
12343 }
12344 if ( nx != Xlen )
12345 {
12346 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
12347 SWIG_fail;
12348 }
12349 cgrid113.nx = nx;
12350 }
12351 else
12352 {
12353 cgrid213.xg = read_double_Matrix( L, -1, &nx, &ny );
12354 if ( !cgrid213.xg )
12355 {
12356 lua_pop( L, 1 ); // pop "xg"
12357 SWIG_fail;
12358 }
12359 if ( ( nx != Xlen ) || ( ny != Ylen ) )
12360 {
12361 lua_pop( L, 1 ); // pop "xg"
12362 lua_pushfstring( L, "Vectors must match matrix." );
12363 SWIG_fail;
12364 }
12365 cgrid213.nx = nx;
12366 cgrid213.ny = ny;
12367 }
12368 lua_pop( L, 1 ); // pop "xg"
12369
12370 lua_pushstring( L, "yg" );
12371 lua_gettable( L, 11 );
12372 if ( !lua_istable( L, -1 ) )
12373 {
12374 lua_pop( L, 1 );
12375 lua_pushstring( L, "expected a table yg" );
12376 SWIG_fail;
12377 }
12378 lua_rawgeti( L, -1, 1 );
12379 if ( gridmode == 2 )
12380 {
12381 if ( !lua_istable( L, -1 ) )
12382 {
12383 lua_pop( L, 1 ); // pop "1"
12384 lua_pop( L, 1 ); // pop "yg"
12385 lua_pushstring( L, "expected a two dimensional array/table in yg" );
12386 SWIG_fail;
12387 }
12388 }
12389 else
12390 {
12391 if ( !lua_isnumber( L, -1 ) )
12392 {
12393 lua_pop( L, 1 ); // pop "1"
12394 lua_pop( L, 1 ); // pop "yg"
12395 lua_pushstring( L, "expected a one dimensional array/table in yg" );
12396 SWIG_fail;
12397 }
12398 }
12399 lua_pop( L, 1 ); // pop "1"
12400 if ( gridmode == 1 )
12401 {
12402 cgrid113.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
12403 if ( !cgrid113.yg )
12404 {
12405 lua_pop( L, 1 ); // pop "yg"
12406 SWIG_fail;
12407 }
12408 if ( ny != Ylen )
12409 {
12410 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
12411 SWIG_fail;
12412 }
12413 cgrid113.ny = ny;
12414 }
12415 else
12416 {
12417 cgrid213.yg = read_double_Matrix( L, -1, &nx, &ny );
12418 if ( !cgrid213.yg )
12419 {
12420 lua_pop( L, 1 ); // pop "xg"
12421 SWIG_fail;
12422 }
12423 if ( ( nx != Xlen ) || ( ny != Ylen ) )
12424 {
12425 lua_pop( L, 1 ); // pop "xg"
12426 lua_pushfstring( L, "Vectors must match matrix." );
12427 SWIG_fail;
12428 }
12429 // cgrid213.nx/ny already set
12430 }
12431 lua_pop( L, 1 ); // pop "yg"
12432
12433 if ( gridmode == 1 )
12434 arg13 = &cgrid113;
12435 else if ( gridmode == 2 )
12436 arg13 = &cgrid213;
12437 }
12438 }
12439 plimagefr((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
12440
12441 {
12442 int i;
12443
12444 if ( arg1 )
12445 {
12446 for ( i = 0; i < ii1; i++ )
12447 LUA_FREE_ARRAY( arg1[i] );
12448 LUA_FREE_ARRAY( arg1 );
12449 }
12450 }
12451 {
12452 mypltr_funcstr[0] = '\0';
12453 }
12454 {
12455 int i;
12456
12457 LUA_FREE_ARRAY( cgrid113.xg );
12458 LUA_FREE_ARRAY( cgrid113.yg );
12459
12460 if ( cgrid213.xg )
12461 {
12462 for ( i = 0; i < Xlen; i++ )
12463 LUA_FREE_ARRAY( cgrid213.xg[i] );
12464 LUA_FREE_ARRAY( cgrid213.xg );
12465 }
12466 if ( cgrid213.yg )
12467 {
12468 for ( i = 0; i < Xlen; i++ )
12469 LUA_FREE_ARRAY( cgrid213.yg[i] );
12470 LUA_FREE_ARRAY( cgrid213.yg );
12471 }
12472 }
12473 return SWIG_arg;
12474
12475 if(0) SWIG_fail;
12476
12477fail:
12478 {
12479 int i;
12480
12481 if ( arg1 )
12482 {
12483 for ( i = 0; i < ii1; i++ )
12484 LUA_FREE_ARRAY( arg1[i] );
12485 LUA_FREE_ARRAY( arg1 );
12486 }
12487 }
12488 {
12489 mypltr_funcstr[0] = '\0';
12490 }
12491 {
12492 int i;
12493
12494 LUA_FREE_ARRAY( cgrid113.xg );
12495 LUA_FREE_ARRAY( cgrid113.yg );
12496
12497 if ( cgrid213.xg )
12498 {
12499 for ( i = 0; i < Xlen; i++ )
12500 LUA_FREE_ARRAY( cgrid213.xg[i] );
12501 LUA_FREE_ARRAY( cgrid213.xg );
12502 }
12503 if ( cgrid213.yg )
12504 {
12505 for ( i = 0; i < Xlen; i++ )
12506 LUA_FREE_ARRAY( cgrid213.yg[i] );
12507 LUA_FREE_ARRAY( cgrid213.yg );
12508 }
12509 }
12510 lua_error(L);
12511 return SWIG_arg;
12512}
12513
12514
12515static int _wrap_plClearOpts(lua_State* L) {
12516 int SWIG_arg = 0;
12517
12518 SWIG_check_num_args("plClearOpts",0,0)
12519 plClearOpts();
12520
12521 return SWIG_arg;
12522
12523 if(0) SWIG_fail;
12524
12525fail:
12526 lua_error(L);
12527 return SWIG_arg;
12528}
12529
12530
12531static int _wrap_plResetOpts(lua_State* L) {
12532 int SWIG_arg = 0;
12533
12534 SWIG_check_num_args("plResetOpts",0,0)
12535 plResetOpts();
12536
12537 return SWIG_arg;
12538
12539 if(0) SWIG_fail;
12540
12541fail:
12542 lua_error(L);
12543 return SWIG_arg;
12544}
12545
12546
12547static int _wrap_plSetUsage(lua_State* L) {
12548 int SWIG_arg = 0;
12549 char *arg1 = (char *) 0 ;
12550 char *arg2 = (char *) 0 ;
12551
12552 SWIG_check_num_args("plSetUsage",2,2)
12553 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plSetUsage",1,"char const *");
12554 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plSetUsage",2,"char const *");
12555 arg1 = (char *)lua_tostring(L, 1);
12556 arg2 = (char *)lua_tostring(L, 2);
12557 plSetUsage((char const *)arg1,(char const *)arg2);
12558
12559 return SWIG_arg;
12560
12561 if(0) SWIG_fail;
12562
12563fail:
12564 lua_error(L);
12565 return SWIG_arg;
12566}
12567
12568
12569static int _wrap_plOptUsage(lua_State* L) {
12570 int SWIG_arg = 0;
12571
12572 SWIG_check_num_args("plOptUsage",0,0)
12573 plOptUsage();
12574
12575 return SWIG_arg;
12576
12577 if(0) SWIG_fail;
12578
12579fail:
12580 lua_error(L);
12581 return SWIG_arg;
12582}
12583
12584
12585static int _wrap_MinMax2dGrid(lua_State* L) {
12586 int SWIG_arg = 0;
12587 PLFLT **arg1 = (PLFLT **) 0 ;
12588 PLINT arg2 ;
12589 PLINT arg3 ;
12590 PLFLT *arg4 = (PLFLT *) 0 ;
12591 PLFLT *arg5 = (PLFLT *) 0 ;
12592 int ii1 ;
12593 PLFLT temp4 ;
12594 PLFLT temp5 ;
12595
12596 arg4 = &temp4;
12597 arg5 = &temp5;
12598 SWIG_check_num_args("plMinMax2dGrid",1,1)
12599 {
12600 int jj;
12601
12602 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
12603 if ( !arg1 )
12604 SWIG_fail;
12605 Xlen = arg2 = ii1;
12606 Ylen = arg3 = jj;
12607 }
12608 plMinMax2dGrid((double const **)arg1,arg2,arg3,arg4,arg5);
12609
12610 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
12611 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
12612 {
12613 int i;
12614
12615 if ( arg1 )
12616 {
12617 for ( i = 0; i < ii1; i++ )
12618 LUA_FREE_ARRAY( arg1[i] );
12619 LUA_FREE_ARRAY( arg1 );
12620 }
12621 }
12622 return SWIG_arg;
12623
12624 if(0) SWIG_fail;
12625
12626fail:
12627 {
12628 int i;
12629
12630 if ( arg1 )
12631 {
12632 for ( i = 0; i < ii1; i++ )
12633 LUA_FREE_ARRAY( arg1[i] );
12634 LUA_FREE_ARRAY( arg1 );
12635 }
12636 }
12637 lua_error(L);
12638 return SWIG_arg;
12639}
12640
12641
12642static int _wrap_plGetCursor(lua_State* L) {
12643 int SWIG_arg = 0;
12644 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
12645 PLINT result;
12646
12647 SWIG_check_num_args("plGetCursor",1,1)
12648 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("plGetCursor",1,"PLGraphicsIn *");
12649
12650 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
12651 SWIG_fail_ptr("plGetCursor",1,SWIGTYPE_p_PLGraphicsIn);
12652 }
12653
12654 result = (PLINT)plGetCursor(arg1);
12655 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
12656 return SWIG_arg;
12657
12658 if(0) SWIG_fail;
12659
12660fail:
12661 lua_error(L);
12662 return SWIG_arg;
12663}
12664
12665
12666static int _wrap_warn(lua_State* L) {
12667 int SWIG_arg = 0;
12668 char *arg1 = (char *) 0 ;
12669
12670 SWIG_check_num_args("plwarn",1,1)
12671 if(!lua_isstring(L,1)) SWIG_fail_arg("plwarn",1,"char const *");
12672 {
12673 arg1 = (char *) lua_tostring( L, 1 );
12674 }
12675 plwarn((char const *)arg1);
12676
12677 return SWIG_arg;
12678
12679 if(0) SWIG_fail;
12680
12681fail:
12682 lua_error(L);
12683 return SWIG_arg;
12684}
12685
12686
12687static int _wrap_abort(lua_State* L) {
12688 int SWIG_arg = 0;
12689 char *arg1 = (char *) 0 ;
12690
12691 SWIG_check_num_args("plabort",1,1)
12692 if(!lua_isstring(L,1)) SWIG_fail_arg("plabort",1,"char const *");
12693 {
12694 arg1 = (char *) lua_tostring( L, 1 );
12695 }
12696 plabort((char const *)arg1);
12697
12698 return SWIG_arg;
12699
12700 if(0) SWIG_fail;
12701
12702fail:
12703 lua_error(L);
12704 return SWIG_arg;
12705}
12706
12707
12709 {0,0,0}
12710};
12712 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_RGB", 1)},
12713 {SWIG_LUA_CONSTTAB_INT("PLESC_ALLOC_NCOL", 2)},
12714 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_LPB", 3)},
12715 {SWIG_LUA_CONSTTAB_INT("PLESC_EXPOSE", 4)},
12716 {SWIG_LUA_CONSTTAB_INT("PLESC_RESIZE", 5)},
12717 {SWIG_LUA_CONSTTAB_INT("PLESC_REDRAW", 6)},
12718 {SWIG_LUA_CONSTTAB_INT("PLESC_TEXT", 7)},
12719 {SWIG_LUA_CONSTTAB_INT("PLESC_GRAPH", 8)},
12720 {SWIG_LUA_CONSTTAB_INT("PLESC_FILL", 9)},
12721 {SWIG_LUA_CONSTTAB_INT("PLESC_DI", 10)},
12722 {SWIG_LUA_CONSTTAB_INT("PLESC_FLUSH", 11)},
12723 {SWIG_LUA_CONSTTAB_INT("PLESC_EH", 12)},
12724 {SWIG_LUA_CONSTTAB_INT("PLESC_GETC", 13)},
12725 {SWIG_LUA_CONSTTAB_INT("PLESC_SWIN", 14)},
12726 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING", 15)},
12727 {SWIG_LUA_CONSTTAB_INT("PLESC_XORMOD", 16)},
12728 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_COMPRESSION", 17)},
12729 {SWIG_LUA_CONSTTAB_INT("PLESC_CLEAR", 18)},
12730 {SWIG_LUA_CONSTTAB_INT("PLESC_DASH", 19)},
12731 {SWIG_LUA_CONSTTAB_INT("PLESC_HAS_TEXT", 20)},
12732 {SWIG_LUA_CONSTTAB_INT("PLESC_IMAGE", 21)},
12733 {SWIG_LUA_CONSTTAB_INT("PLESC_IMAGEOPS", 22)},
12734 {SWIG_LUA_CONSTTAB_INT("PLESC_PL2DEVCOL", 23)},
12735 {SWIG_LUA_CONSTTAB_INT("PLESC_DEV2PLCOL", 24)},
12736 {SWIG_LUA_CONSTTAB_INT("PLESC_SETBGFG", 25)},
12737 {SWIG_LUA_CONSTTAB_INT("PLESC_DEVINIT", 26)},
12738 {SWIG_LUA_CONSTTAB_INT("PLESC_GETBACKEND", 27)},
12739 {SWIG_LUA_CONSTTAB_INT("PLESC_BEGIN_TEXT", 28)},
12740 {SWIG_LUA_CONSTTAB_INT("PLESC_TEXT_CHAR", 29)},
12741 {SWIG_LUA_CONSTTAB_INT("PLESC_CONTROL_CHAR", 30)},
12742 {SWIG_LUA_CONSTTAB_INT("PLESC_END_TEXT", 31)},
12743 {SWIG_LUA_CONSTTAB_INT("PLESC_START_RASTERIZE", 32)},
12744 {SWIG_LUA_CONSTTAB_INT("PLESC_END_RASTERIZE", 33)},
12745 {SWIG_LUA_CONSTTAB_INT("PLESC_ARC", 34)},
12746 {SWIG_LUA_CONSTTAB_INT("PLESC_GRADIENT", 35)},
12747 {SWIG_LUA_CONSTTAB_INT("PLESC_MODESET", 36)},
12748 {SWIG_LUA_CONSTTAB_INT("PLESC_MODEGET", 37)},
12749 {SWIG_LUA_CONSTTAB_INT("PLESC_FIXASPECT", 38)},
12750 {SWIG_LUA_CONSTTAB_INT("PLESC_IMPORT_BUFFER", 39)},
12751 {SWIG_LUA_CONSTTAB_INT("PLESC_APPEND_BUFFER", 40)},
12752 {SWIG_LUA_CONSTTAB_INT("PLESC_FLUSH_REMAINING_BUFFER", 41)},
12753 {SWIG_LUA_CONSTTAB_INT("PLTEXT_FONTCHANGE", 0)},
12754 {SWIG_LUA_CONSTTAB_INT("PLTEXT_SUPERSCRIPT", 1)},
12755 {SWIG_LUA_CONSTTAB_INT("PLTEXT_SUBSCRIPT", 2)},
12756 {SWIG_LUA_CONSTTAB_INT("PLTEXT_BACKCHAR", 3)},
12757 {SWIG_LUA_CONSTTAB_INT("PLTEXT_OVERLINE", 4)},
12758 {SWIG_LUA_CONSTTAB_INT("PLTEXT_UNDERLINE", 5)},
12759 {SWIG_LUA_CONSTTAB_INT("ZEROW2B", 1)},
12760 {SWIG_LUA_CONSTTAB_INT("ZEROW2D", 2)},
12761 {SWIG_LUA_CONSTTAB_INT("ONEW2B", 3)},
12762 {SWIG_LUA_CONSTTAB_INT("ONEW2D", 4)},
12763 {SWIG_LUA_CONSTTAB_INT("PLSWIN_DEVICE", 1)},
12764 {SWIG_LUA_CONSTTAB_INT("PLSWIN_WORLD", 2)},
12765 {SWIG_LUA_CONSTTAB_INT("PL_X_AXIS", 1)},
12766 {SWIG_LUA_CONSTTAB_INT("PL_Y_AXIS", 2)},
12767 {SWIG_LUA_CONSTTAB_INT("PL_Z_AXIS", 3)},
12768 {SWIG_LUA_CONSTTAB_INT("PL_OPT_ENABLED", 0x0001)},
12769 {SWIG_LUA_CONSTTAB_INT("PL_OPT_ARG", 0x0002)},
12770 {SWIG_LUA_CONSTTAB_INT("PL_OPT_NODELETE", 0x0004)},
12771 {SWIG_LUA_CONSTTAB_INT("PL_OPT_INVISIBLE", 0x0008)},
12772 {SWIG_LUA_CONSTTAB_INT("PL_OPT_DISABLED", 0x0010)},
12773 {SWIG_LUA_CONSTTAB_INT("PL_OPT_FUNC", 0x0100)},
12774 {SWIG_LUA_CONSTTAB_INT("PL_OPT_BOOL", 0x0200)},
12775 {SWIG_LUA_CONSTTAB_INT("PL_OPT_INT", 0x0400)},
12776 {SWIG_LUA_CONSTTAB_INT("PL_OPT_FLOAT", 0x0800)},
12777 {SWIG_LUA_CONSTTAB_INT("PL_OPT_STRING", 0x1000)},
12778 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_PARTIAL", 0x0000)},
12779 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_FULL", 0x0001)},
12780 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_QUIET", 0x0002)},
12781 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NODELETE", 0x0004)},
12782 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_SHOWALL", 0x0008)},
12783 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_OVERRIDE", 0x0010)},
12784 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NOPROGRAM", 0x0020)},
12785 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NODASH", 0x0040)},
12786 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_SKIP", 0x0080)},
12787 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MARK", 0x80000000)},
12788 {SWIG_LUA_CONSTTAB_INT("PL_FCI_IMPOSSIBLE", 0x00000000)},
12789 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXDIGIT_MASK", 0xf)},
12790 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXPOWER_MASK", 0x7)},
12791 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXPOWER_IMPOSSIBLE", 0xf)},
12792 {SWIG_LUA_CONSTTAB_INT("PL_FCI_FAMILY", 0x0)},
12793 {SWIG_LUA_CONSTTAB_INT("PL_FCI_STYLE", 0x1)},
12794 {SWIG_LUA_CONSTTAB_INT("PL_FCI_WEIGHT", 0x2)},
12795 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SANS", 0x0)},
12796 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SERIF", 0x1)},
12797 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MONO", 0x2)},
12798 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SCRIPT", 0x3)},
12799 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SYMBOL", 0x4)},
12800 {SWIG_LUA_CONSTTAB_INT("PL_FCI_UPRIGHT", 0x0)},
12801 {SWIG_LUA_CONSTTAB_INT("PL_FCI_ITALIC", 0x1)},
12802 {SWIG_LUA_CONSTTAB_INT("PL_FCI_OBLIQUE", 0x2)},
12803 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MEDIUM", 0x0)},
12804 {SWIG_LUA_CONSTTAB_INT("PL_FCI_BOLD", 0x1)},
12805 {SWIG_LUA_CONSTTAB_INT("PL_MAXKEY", 16)},
12806 {SWIG_LUA_CONSTTAB_INT("PL_MASK_SHIFT", 0x1)},
12807 {SWIG_LUA_CONSTTAB_INT("PL_MASK_CAPS", 0x2)},
12808 {SWIG_LUA_CONSTTAB_INT("PL_MASK_CONTROL", 0x4)},
12809 {SWIG_LUA_CONSTTAB_INT("PL_MASK_ALT", 0x8)},
12810 {SWIG_LUA_CONSTTAB_INT("PL_MASK_NUM", 0x10)},
12811 {SWIG_LUA_CONSTTAB_INT("PL_MASK_ALTGR", 0x20)},
12812 {SWIG_LUA_CONSTTAB_INT("PL_MASK_WIN", 0x40)},
12813 {SWIG_LUA_CONSTTAB_INT("PL_MASK_SCROLL", 0x80)},
12814 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON1", 0x100)},
12815 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON2", 0x200)},
12816 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON3", 0x400)},
12817 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON4", 0x800)},
12818 {SWIG_LUA_CONSTTAB_INT("PL_MASK_BUTTON5", 0x1000)},
12819 {SWIG_LUA_CONSTTAB_INT("PL_MAXWINDOWS", 64)},
12820 {SWIG_LUA_CONSTTAB_INT("PL_NOTSET", (-42))},
12821 {SWIG_LUA_CONSTTAB_INT("PL_DEFAULT_NCOL0", 16)},
12822 {SWIG_LUA_CONSTTAB_INT("PL_DEFAULT_NCOL1", 128)},
12823 {SWIG_LUA_CONSTTAB_INT("MIN_PLINT_RGB", 0)},
12824 {SWIG_LUA_CONSTTAB_INT("MAX_PLINT_RGB", 255)},
12825 {SWIG_LUA_CONSTTAB_FLOAT("MIN_PLFLT_CMAP1", 0.)},
12826 {SWIG_LUA_CONSTTAB_FLOAT("MAX_PLFLT_CMAP1", 1.)},
12827 {SWIG_LUA_CONSTTAB_FLOAT("MIN_PLFLT_ALPHA", 0.)},
12828 {SWIG_LUA_CONSTTAB_FLOAT("MAX_PLFLT_ALPHA", 1.)},
12829 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_ENABLE", 1)},
12830 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_DISABLE", 2)},
12831 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_QUERY", 3)},
12832 {SWIG_LUA_CONSTTAB_INT("PL_BIN_DEFAULT", 0x0)},
12833 {SWIG_LUA_CONSTTAB_INT("PL_BIN_CENTRED", 0x1)},
12834 {SWIG_LUA_CONSTTAB_INT("PL_BIN_NOEXPAND", 0x2)},
12835 {SWIG_LUA_CONSTTAB_INT("PL_BIN_NOEMPTY", 0x4)},
12836 {SWIG_LUA_CONSTTAB_INT("GRID_CSA", 1)},
12837 {SWIG_LUA_CONSTTAB_INT("GRID_DTLI", 2)},
12838 {SWIG_LUA_CONSTTAB_INT("GRID_NNI", 3)},
12839 {SWIG_LUA_CONSTTAB_INT("GRID_NNIDW", 4)},
12840 {SWIG_LUA_CONSTTAB_INT("GRID_NNLI", 5)},
12841 {SWIG_LUA_CONSTTAB_INT("GRID_NNAIDW", 6)},
12842 {SWIG_LUA_CONSTTAB_INT("PL_HIST_DEFAULT", 0x00)},
12843 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOSCALING", 0x01)},
12844 {SWIG_LUA_CONSTTAB_INT("PL_HIST_IGNORE_OUTLIERS", 0x02)},
12845 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOEXPAND", 0x08)},
12846 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOEMPTY", 0x10)},
12847 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_NULL", 0x0)},
12848 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_LEFT", 0x1)},
12849 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_RIGHT", 0x2)},
12850 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_TOP", 0x4)},
12851 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_BOTTOM", 0x8)},
12852 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_INSIDE", 0x10)},
12853 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_OUTSIDE", 0x20)},
12854 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_VIEWPORT", 0x40)},
12855 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_SUBPAGE", 0x80)},
12856 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_NULL", 0x0)},
12857 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_NONE", 0x1)},
12858 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_COLOR_BOX", 0x2)},
12859 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_LINE", 0x4)},
12860 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_SYMBOL", 0x8)},
12861 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_TEXT_LEFT", 0x10)},
12862 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_BACKGROUND", 0x20)},
12863 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_BOUNDING_BOX", 0x40)},
12864 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_ROW_MAJOR", 0x80)},
12865 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_NULL", 0x0)},
12866 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_LEFT", 0x1)},
12867 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_RIGHT", 0x2)},
12868 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_TOP", 0x4)},
12869 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_BOTTOM", 0x8)},
12870 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_IMAGE", 0x10)},
12871 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_SHADE", 0x20)},
12872 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_GRADIENT", 0x40)},
12873 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_NONE", 0x80)},
12874 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_LOW", 0x100)},
12875 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_HIGH", 0x200)},
12876 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_SHADE_LABEL", 0x400)},
12877 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_RIGHT", 0x800)},
12878 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_TOP", 0x1000)},
12879 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_LEFT", 0x2000)},
12880 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_BOTTOM", 0x4000)},
12881 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_BACKGROUND", 0x8000)},
12882 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_BOUNDING_BOX", 0x10000)},
12883 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_UNKNOWN", 0x0)},
12884 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_DEFAULT", 0x1)},
12885 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_REPLACE", 0x2)},
12886 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_XOR", 0x4)},
12887 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEX", 0x001)},
12888 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEY", 0x002)},
12889 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEXY", 0x003)},
12890 {SWIG_LUA_CONSTTAB_INT("MAG_COLOR", 0x004)},
12891 {SWIG_LUA_CONSTTAB_INT("BASE_CONT", 0x008)},
12892 {SWIG_LUA_CONSTTAB_INT("TOP_CONT", 0x010)},
12893 {SWIG_LUA_CONSTTAB_INT("SURF_CONT", 0x020)},
12894 {SWIG_LUA_CONSTTAB_INT("DRAW_SIDES", 0x040)},
12895 {SWIG_LUA_CONSTTAB_INT("FACETED", 0x080)},
12896 {SWIG_LUA_CONSTTAB_INT("MESH", 0x100)},
12897 {0,0,0,0,0,0}
12898};
12900 { "setcontlabelformat", _wrap_setcontlabelformat},
12901 { "setcontlabelparam", _wrap_setcontlabelparam},
12902 { "adv", _wrap_adv},
12903 { "arc", _wrap_arc},
12904 { "axes", _wrap_axes},
12905 { "bin", _wrap_bin},
12906 { "btime", _wrap_btime},
12907 { "bop", _wrap_bop},
12908 { "box", _wrap_box},
12909 { "box3", _wrap_box3},
12910 { "calc_world", _wrap_calc_world},
12911 { "clear", _wrap_clear},
12912 { "col0", _wrap_col0},
12913 { "col1", _wrap_col1},
12914 { "configtime", _wrap_configtime},
12915 { "cont", _wrap_cont},
12916 { "ctime", _wrap_ctime},
12917 { "cpstrm", _wrap_cpstrm},
12918 { "plend", _wrap_plend},
12919 { "plend1", _wrap_plend1},
12920 { "env", _wrap_env},
12921 { "env0", _wrap_env0},
12922 { "eop", _wrap_eop},
12923 { "errx", _wrap_errx},
12924 { "erry", _wrap_erry},
12925 { "famadv", _wrap_famadv},
12926 { "fill", _wrap_fill},
12927 { "fill3", _wrap_fill3},
12928 { "gradient", _wrap_gradient},
12929 { "flush", _wrap_flush},
12930 { "font", _wrap_font},
12931 { "fontld", _wrap_fontld},
12932 { "gchr", _wrap_gchr},
12933 { "gcol0", _wrap_gcol0},
12934 { "gcol0a", _wrap_gcol0a},
12935 { "gcolbg", _wrap_gcolbg},
12936 { "gcolbga", _wrap_gcolbga},
12937 { "gcompression", _wrap_gcompression},
12938 { "gdev", _wrap_gdev},
12939 { "gdidev", _wrap_gdidev},
12940 { "gdiori", _wrap_gdiori},
12941 { "gdiplt", _wrap_gdiplt},
12942 { "gfam", _wrap_gfam},
12943 { "gfci", _wrap_gfci},
12944 { "gfnam", _wrap_gfnam},
12945 { "gfont", _wrap_gfont},
12946 { "glevel", _wrap_glevel},
12947 { "gpage", _wrap_gpage},
12948 { "gra", _wrap_gra},
12949 { "griddata", _wrap_griddata},
12950 { "gspa", _wrap_gspa},
12951 { "gstrm", _wrap_gstrm},
12952 { "gver", _wrap_gver},
12953 { "gvpd", _wrap_gvpd},
12954 { "gvpw", _wrap_gvpw},
12955 { "gxax", _wrap_gxax},
12956 { "gyax", _wrap_gyax},
12957 { "gzax", _wrap_gzax},
12958 { "hist", _wrap_hist},
12959 { "hlsrgb", _wrap_hlsrgb},
12960 { "init", _wrap_init},
12961 { "join", _wrap_join},
12962 { "lab", _wrap_lab},
12963 { "legend", _wrap_legend},
12964 { "colorbar", _wrap_colorbar},
12965 { "lightsource", _wrap_lightsource},
12966 { "line", _wrap_line},
12967 { "line3", _wrap_line3},
12968 { "lsty", _wrap_lsty},
12969 { "mesh", _wrap_mesh},
12970 { "meshc", _wrap_meshc},
12971 { "mkstrm", _wrap_mkstrm},
12972 { "mtex", _wrap_mtex},
12973 { "mtex3", _wrap_mtex3},
12974 { "plot3d", _wrap_plot3d},
12975 { "plot3dc", _wrap_plot3dc},
12976 { "plot3dcl", _wrap_plot3dcl},
12977 { "surf3d", _wrap_surf3d},
12978 { "surf3dl", _wrap_surf3dl},
12979 { "parseopts", _wrap_parseopts},
12980 { "pat", _wrap_pat},
12981 { "path", _wrap_path},
12982 { "poin", _wrap_poin},
12983 { "poin3", _wrap_poin3},
12984 { "poly3", _wrap_poly3},
12985 { "prec", _wrap_prec},
12986 { "psty", _wrap_psty},
12987 { "ptex", _wrap_ptex},
12988 { "ptex3", _wrap_ptex3},
12989 { "randd", _wrap_randd},
12990 { "replot", _wrap_replot},
12991 { "rgbhls", _wrap_rgbhls},
12992 { "schr", _wrap_schr},
12993 { "scmap0", _wrap_scmap0},
12994 { "scmap0a", _wrap_scmap0a},
12995 { "scmap0n", _wrap_scmap0n},
12996 { "scmap1", _wrap_scmap1},
12997 { "scmap1a", _wrap_scmap1a},
12998 { "scmap1l", _wrap_scmap1l},
12999 { "scmap1la", _wrap_scmap1la},
13000 { "scmap1n", _wrap_scmap1n},
13001 { "scmap1_range", _wrap_scmap1_range},
13002 { "gcmap1_range", _wrap_gcmap1_range},
13003 { "scol0", _wrap_scol0},
13004 { "scol0a", _wrap_scol0a},
13005 { "scolbg", _wrap_scolbg},
13006 { "scolbga", _wrap_scolbga},
13007 { "scolor", _wrap_scolor},
13008 { "scompression", _wrap_scompression},
13009 { "sdev", _wrap_sdev},
13010 { "sdidev", _wrap_sdidev},
13011 { "sdimap", _wrap_sdimap},
13012 { "sdiori", _wrap_sdiori},
13013 { "sdiplt", _wrap_sdiplt},
13014 { "sdiplz", _wrap_sdiplz},
13015 { "seed", _wrap_seed},
13016 { "sesc", _wrap_sesc},
13017 { "setopt", _wrap_setopt},
13018 { "sfam", _wrap_sfam},
13019 { "sfci", _wrap_sfci},
13020 { "sfnam", _wrap_sfnam},
13021 { "sfont", _wrap_sfont},
13022 { "shades", _wrap_shades},
13023 { "shade", _wrap_shade},
13024 { "slabelfunc", _wrap_slabelfunc},
13025 { "smaj", _wrap_smaj},
13026 { "smin", _wrap_smin},
13027 { "sori", _wrap_sori},
13028 { "spage", _wrap_spage},
13029 { "spal0", _wrap_spal0},
13030 { "spal1", _wrap_spal1},
13031 { "spause", _wrap_spause},
13032 { "sstrm", _wrap_sstrm},
13033 { "ssub", _wrap_ssub},
13034 { "ssym", _wrap_ssym},
13035 { "star", _wrap_star},
13036 { "start", _wrap_start},
13037 { "stransform", _wrap_stransform},
13038 { "string", _wrap_string},
13039 { "string3", _wrap_string3},
13040 { "stripa", _wrap_stripa},
13041 { "stripc", _wrap_stripc},
13042 { "stripd", _wrap_stripd},
13043 { "styl", _wrap_styl},
13044 { "svect", _wrap_svect},
13045 { "svpa", _wrap_svpa},
13046 { "sxax", _wrap_sxax},
13047 { "syax", _wrap_syax},
13048 { "sym", _wrap_sym},
13049 { "szax", _wrap_szax},
13050 { "text", _wrap_text},
13051 { "timefmt", _wrap_timefmt},
13052 { "vasp", _wrap_vasp},
13053 { "vect", _wrap_vect},
13054 { "vpas", _wrap_vpas},
13055 { "vpor", _wrap_vpor},
13056 { "vsta", _wrap_vsta},
13057 { "w3d", _wrap_w3d},
13058 { "width", _wrap_width},
13059 { "wind", _wrap_wind},
13060 { "xormod", _wrap_xormod},
13061 { "map", _wrap_map},
13062 { "mapline", _wrap_mapline},
13063 { "mapstring", _wrap_mapstring},
13064 { "maptex", _wrap_maptex},
13065 { "mapfill", _wrap_mapfill},
13066 { "meridians", _wrap_meridians},
13067 { "image", _wrap_image},
13068 { "imagefr", _wrap_imagefr},
13069 { "plClearOpts", _wrap_plClearOpts},
13070 { "plResetOpts", _wrap_plResetOpts},
13071 { "plSetUsage", _wrap_plSetUsage},
13072 { "plOptUsage", _wrap_plOptUsage},
13073 { "MinMax2dGrid", _wrap_MinMax2dGrid},
13074 { "plGetCursor", _wrap_plGetCursor},
13075 { "warn", _wrap_warn},
13076 { "abort", _wrap_abort},
13077 {0,0}
13078};
13081 0
13082};
13084 0
13085};
13086
13088 "plplotluac",
13094};
13095#ifdef __cplusplus
13096}
13097#endif
13098
13099/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
13100
13101static swig_type_info _swigt__p_PLGraphicsIn = {"_p_PLGraphicsIn", "PLGraphicsIn *", 0, 0, (void*)&_wrap_class_PLGraphicsIn, 0};
13102static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
13103static swig_type_info _swigt__p_double = {"_p_double", "double *|PLFLT *", 0, 0, (void*)0, 0};
13104static swig_type_info _swigt__p_f_double_double__int = {"_p_f_double_double__int", "defined_func|int (*)(double,double)", 0, 0, (void*)0, 0};
13105static 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};
13106static swig_type_info _swigt__p_f_int_double_p_char_int_p_void__void = {"_p_f_int_double_p_char_int_p_void__void", "void (*)(int,double,char *,int,void *)|label_func", 0, 0, (void*)0, 0};
13107static 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};
13108static 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", "void (*)(int,double const *,double const *)|fill_func", 0, 0, (void*)0, 0};
13109static swig_type_info _swigt__p_int = {"_p_int", "PLBOOL *|int *|PLINT *", 0, 0, (void*)0, 0};
13110static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
13111static swig_type_info _swigt__p_p_double = {"_p_p_double", "PLFLT **|double **", 0, 0, (void*)0, 0};
13112static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|PLUNICODE *", 0, 0, (void*)0, 0};
13113
13127};
13128
13129static swig_cast_info _swigc__p_PLGraphicsIn[] = { {&_swigt__p_PLGraphicsIn, 0, 0, 0},{0, 0, 0, 0}};
13130static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
13131static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
13137static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
13138static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
13139static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
13140static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
13141
13155};
13156
13157
13158/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
13159
13160/* -----------------------------------------------------------------------------
13161 * Type initialization:
13162 * This problem is tough by the requirement that no dynamic
13163 * memory is used. Also, since swig_type_info structures store pointers to
13164 * swig_cast_info structures and swig_cast_info structures store pointers back
13165 * to swig_type_info structures, we need some lookup code at initialization.
13166 * The idea is that swig generates all the structures that are needed.
13167 * The runtime then collects these partially filled structures.
13168 * The SWIG_InitializeModule function takes these initial arrays out of
13169 * swig_module, and does all the lookup, filling in the swig_module.types
13170 * array with the correct data and linking the correct swig_cast_info
13171 * structures together.
13172 *
13173 * The generated swig_type_info structures are assigned statically to an initial
13174 * array. We just loop through that array, and handle each type individually.
13175 * First we lookup if this type has been already loaded, and if so, use the
13176 * loaded structure instead of the generated one. Then we have to fill in the
13177 * cast linked list. The cast data is initially stored in something like a
13178 * two-dimensional array. Each row corresponds to a type (there are the same
13179 * number of rows as there are in the swig_type_initial array). Each entry in
13180 * a column is one of the swig_cast_info structures for that type.
13181 * The cast_initial array is actually an array of arrays, because each row has
13182 * a variable number of columns. So to actually build the cast linked list,
13183 * we find the array of casts associated with the type, and loop through it
13184 * adding the casts to the list. The one last trick we need to do is making
13185 * sure the type pointer in the swig_cast_info struct is correct.
13186 *
13187 * First off, we lookup the cast->type name to see if it is already loaded.
13188 * There are three cases to handle:
13189 * 1) If the cast->type has already been loaded AND the type we are adding
13190 * casting info to has not been loaded (it is in this module), THEN we
13191 * replace the cast->type pointer with the type pointer that has already
13192 * been loaded.
13193 * 2) If BOTH types (the one we are adding casting info to, and the
13194 * cast->type) are loaded, THEN the cast info has already been loaded by
13195 * the previous module so we just ignore it.
13196 * 3) Finally, if cast->type has not already been loaded, then we add that
13197 * swig_cast_info to the linked list (because the cast->type) pointer will
13198 * be correct.
13199 * ----------------------------------------------------------------------------- */
13200
13201#ifdef __cplusplus
13202extern "C" {
13203#if 0
13204} /* c-mode */
13205#endif
13206#endif
13207
13208#if 0
13209#define SWIGRUNTIME_DEBUG
13210#endif
13211
13212
13213SWIGRUNTIME void
13214SWIG_InitializeModule(void *clientdata) {
13215 size_t i;
13216 swig_module_info *module_head, *iter;
13217 int init;
13218
13219 /* check to see if the circular list has been setup, if not, set it up */
13220 if (swig_module.next==0) {
13221 /* Initialize the swig_module */
13225 init = 1;
13226 } else {
13227 init = 0;
13228 }
13229
13230 /* Try and load any already created modules */
13231 module_head = SWIG_GetModule(clientdata);
13232 if (!module_head) {
13233 /* This is the first module loaded for this interpreter */
13234 /* so set the swig module into the interpreter */
13235 SWIG_SetModule(clientdata, &swig_module);
13236 } else {
13237 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
13238 iter=module_head;
13239 do {
13240 if (iter==&swig_module) {
13241 /* Our module is already in the list, so there's nothing more to do. */
13242 return;
13243 }
13244 iter=iter->next;
13245 } while (iter!= module_head);
13246
13247 /* otherwise we must add our module into the list */
13248 swig_module.next = module_head->next;
13249 module_head->next = &swig_module;
13250 }
13251
13252 /* When multiple interpreters are used, a module could have already been initialized in
13253 a different interpreter, but not yet have a pointer in this interpreter.
13254 In this case, we do not want to continue adding types... everything should be
13255 set up already */
13256 if (init == 0) return;
13257
13258 /* Now work on filling in swig_module.types */
13259#ifdef SWIGRUNTIME_DEBUG
13260 printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
13261#endif
13262 for (i = 0; i < swig_module.size; ++i) {
13263 swig_type_info *type = 0;
13264 swig_type_info *ret;
13265 swig_cast_info *cast;
13266
13267#ifdef SWIGRUNTIME_DEBUG
13268 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
13269#endif
13270
13271 /* if there is another module already loaded */
13272 if (swig_module.next != &swig_module) {
13274 }
13275 if (type) {
13276 /* Overwrite clientdata field */
13277#ifdef SWIGRUNTIME_DEBUG
13278 printf("SWIG_InitializeModule: found type %s\n", type->name);
13279#endif
13282#ifdef SWIGRUNTIME_DEBUG
13283 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
13284#endif
13285 }
13286 } else {
13287 type = swig_module.type_initial[i];
13288 }
13289
13290 /* Insert casting types */
13291 cast = swig_module.cast_initial[i];
13292 while (cast->type) {
13293
13294 /* Don't need to add information already in the list */
13295 ret = 0;
13296#ifdef SWIGRUNTIME_DEBUG
13297 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
13298#endif
13299 if (swig_module.next != &swig_module) {
13301#ifdef SWIGRUNTIME_DEBUG
13302 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
13303#endif
13304 }
13305 if (ret) {
13306 if (type == swig_module.type_initial[i]) {
13307#ifdef SWIGRUNTIME_DEBUG
13308 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
13309#endif
13310 cast->type = ret;
13311 ret = 0;
13312 } else {
13313 /* Check for casting already in the list */
13314 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
13315#ifdef SWIGRUNTIME_DEBUG
13316 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
13317#endif
13318 if (!ocast) ret = 0;
13319 }
13320 }
13321
13322 if (!ret) {
13323#ifdef SWIGRUNTIME_DEBUG
13324 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
13325#endif
13326 if (type->cast) {
13327 type->cast->prev = cast;
13328 cast->next = type->cast;
13329 }
13330 type->cast = cast;
13331 }
13332 cast++;
13333 }
13334 /* Set entry in modules->types array equal to the type */
13335 swig_module.types[i] = type;
13336 }
13337 swig_module.types[i] = 0;
13338
13339#ifdef SWIGRUNTIME_DEBUG
13340 printf("**** SWIG_InitializeModule: Cast List ******\n");
13341 for (i = 0; i < swig_module.size; ++i) {
13342 int j = 0;
13344 printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
13345 while (cast->type) {
13346 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
13347 cast++;
13348 ++j;
13349 }
13350 printf("---- Total casts: %d\n",j);
13351 }
13352 printf("**** SWIG_InitializeModule: Cast List ******\n");
13353#endif
13354}
13355
13356/* This function will propagate the clientdata field of type to
13357* any new swig_type_info structures that have been added into the list
13358* of equivalent types. It is like calling
13359* SWIG_TypeClientData(type, clientdata) a second time.
13360*/
13361SWIGRUNTIME void
13363 size_t i;
13364 swig_cast_info *equiv;
13365 static int init_run = 0;
13366
13367 if (init_run) return;
13368 init_run = 1;
13369
13370 for (i = 0; i < swig_module.size; i++) {
13371 if (swig_module.types[i]->clientdata) {
13372 equiv = swig_module.types[i]->cast;
13373 while (equiv) {
13374 if (!equiv->converter) {
13375 if (equiv->type && !equiv->type->clientdata)
13377 }
13378 equiv = equiv->next;
13379 }
13380 }
13381 }
13382}
13383
13384#ifdef __cplusplus
13385#if 0
13386{ /* c-mode */
13387#endif
13388}
13389#endif
13390
13391
13392
13393/* Forward declaration of where the user's %init{} gets inserted */
13394void SWIG_init_user(lua_State* L );
13395
13396#ifdef __cplusplus
13397extern "C" {
13398#endif
13399/* this is the initialization function
13400 added at the very end of the code
13401 the function is always called SWIG_init, but an earlier #define will rename it
13402*/
13403#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
13404LUALIB_API int SWIG_init(lua_State* L)
13405#else
13406SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
13407#endif
13408{
13409#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
13410 int i;
13411 int globalRegister = 0;
13412 /* start with global table */
13414 /* SWIG's internal initialisation */
13415 SWIG_InitializeModule((void*)L);
13417#endif
13418
13419#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)) || defined(SWIG_LUA_ELUA_EMULATE)
13420 /* add a global fn */
13421 SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
13423#endif
13424
13425#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
13426 /* set up base class pointers (the hierarchy) */
13427 for (i = 0; swig_types[i]; i++){
13428 if (swig_types[i]->clientdata){
13430 }
13431 }
13432#ifdef SWIG_LUA_MODULE_GLOBAL
13433 globalRegister = 1;
13434#endif
13435
13436
13437#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_LUA)
13438 SWIG_Lua_namespace_register(L,&swig_SwigModule, globalRegister);
13439#endif
13440
13441#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
13442 for (i = 0; swig_types[i]; i++){
13443 if (swig_types[i]->clientdata){
13444 SWIG_Lua_elua_class_register_instance(L,(swig_lua_class*)(swig_types[i]->clientdata));
13445 }
13446 }
13447#endif
13448
13449#if defined(SWIG_LUA_ELUA_EMULATE)
13450 lua_newtable(L);
13451 SWIG_Lua_elua_emulate_register(L,swig_SwigModule.ns_methods);
13452 SWIG_Lua_elua_emulate_register_clear(L);
13453 if(globalRegister) {
13454 lua_pushstring(L,swig_SwigModule.name);
13455 lua_pushvalue(L,-2);
13456 lua_rawset(L,-4);
13457 }
13458#endif
13459
13460#endif
13461
13462#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
13463 /* invoke user-specific initialization */
13464 SWIG_init_user(L);
13465 /* end module */
13466 /* Note: We do not clean up the stack here (Lua will do this for us). At this
13467 point, we have the globals table and out module table on the stack. Returning
13468 one value makes the module table the result of the require command. */
13469 return 1;
13470#else
13471 return 0;
13472#endif
13473}
13474
13475#ifdef __cplusplus
13476}
13477#endif
13478
13479
13480const char* SWIG_LUACODE=
13481 "\n"
13482 " pl = plplotluac";
13483
13484void SWIG_init_user(lua_State* L)
13485{
13486 /* exec Lua code if applicable */
13488}
13489
unsigned int uint
Definition: build/sip.h:82
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 plmaptex(PLMAPFORM_callback mapform, PLCHAR_VECTOR name, PLFLT dx, PLFLT dy, PLFLT just, PLCHAR_VECTOR text, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT plotentry)
Definition: plmap.c:639
void plmapstring(PLMAPFORM_callback mapform, PLCHAR_VECTOR name, PLCHAR_VECTOR string, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT_VECTOR plotentries, PLINT nplotentries)
Definition: plmap.c:616
void plmapfill(PLMAPFORM_callback mapform, PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT_VECTOR plotentries, PLINT nplotentries)
Definition: plmap.c:661
void plmeridians(PLMAPFORM_callback mapform, PLFLT dlong, PLFLT dlat, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat)
Definition: plmap.c:708
void plmap(PLMAPFORM_callback mapform, PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy)
Definition: plmap.c:565
void plmapline(PLMAPFORM_callback mapform, PLCHAR_VECTOR name, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy, PLINT_VECTOR plotentries, PLINT nplotentries)
Definition: plmap.c:594
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 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 plcol1
Definition: plplot.h:703
#define pltimefmt
Definition: plplot.h:856
PLUINT PLUNICODE
Definition: plplot.h:201
#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 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 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 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
SWIGRUNTIME int SWIG_Lua_class_equal(lua_State *L)
static int _wrap_ptex(lua_State *L)
static int _wrap_PLGraphicsIn_wX_get(lua_State *L)
static int _wrap_surf3dl(lua_State *L)
static int _wrap_scmap1(lua_State *L)
PLFLT ** read_double_Matrix(lua_State *L, int index, int *nx, int *ny)
static int _wrap_clear(lua_State *L)
SWIGRUNTIME void * SWIG_Lua_MustGetPtr(lua_State *L, int index, swig_type_info *type, int flags, int argnum, const char *func_name)
static int _wrap_szax(lua_State *L)
#define SWIG_DOSTRING_FAIL(S)
static int _wrap_wind(lua_State *L)
static swig_cast_info * swig_cast_initial[]
static int _wrap_PLGraphicsIn_button_get(lua_State *L)
#define lua_rawlen
void mylabel(PLINT axis, PLFLT value, char *label, PLINT length, PLPointer data)
static int _wrap_configtime(lua_State *L)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty)
static int _wrap_sori(lua_State *L)
SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State *L, int index, void **ptr, swig_type_info *type, int flags)
static int _wrap_mesh(lua_State *L)
static int _wrap_gyax(lua_State *L)
static int _wrap_box(lua_State *L)
#define SWIG_ALLOC_ARRAY(TYPE, LEN)
static int _wrap_spage(lua_State *L)
static int _wrap_mkstrm(lua_State *L)
SWIGRUNTIME void SWIG_Lua_SetModule(lua_State *L, swig_module_info *module)
static int _wrap_PLGraphicsIn_keysym_get(lua_State *L)
SWIGINTERN int SWIG_Lua_do_resolve_metamethod(lua_State *L, const swig_lua_class *clss, int metamethod_name_idx, int skip_check)
static swig_type_info _swigt__p_f_double_double_p_double_p_double_p_void__void
static int _wrap_PLGraphicsIn_subwindow_get(lua_State *L)
static int _wrap_rgbhls(lua_State *L)
static int _wrap_scmap1_range(lua_State *L)
SWIGRUNTIME void SWIG_Lua_pusherrstring(lua_State *L, const char *str)
static int _wrap_plend(lua_State *L)
SWIGINTERN int SWIG_Lua_class_do_get(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
#define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME, TYPE)
SWIGRUNTIME int SWIG_Lua_resolve_metamethod(lua_State *L)
static int _wrap_hlsrgb(lua_State *L)
SWIGINTERN void SWIG_Lua_add_namespace_classes(lua_State *L, swig_lua_namespace *ns)
struct swig_lua_class swig_lua_class
#define SWIG_CheckState(r)
static int _wrap_meridians(lua_State *L)
#define SWIG_fail_ptr(func_name, argnum, type)
static swig_cast_info _swigc__p_f_double_double__int[]
#define SWIG_NewMemberObj(L, ptr, sz, type)
static int _wrap_env0(lua_State *L)
static swig_cast_info _swigc__p_int[]
SWIGINTERN void SWIG_Lua_add_class_user_metamethods(lua_State *L, swig_lua_class *clss)
static int _wrap_gcolbga(lua_State *L)
struct swig_lua_namespace swig_lua_namespace
SWIGRUNTIME int SWIG_TypeEquiv(const char *nb, const char *tb)
static int _wrap_gvpd(lua_State *L)
void myct(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data)
SWIGINTERN void SWIG_Lua_class_register_static(lua_State *L, swig_lua_class *clss)
SWIGRUNTIME const char * SWIG_Lua_typename(lua_State *L, int tp)
static int _wrap_ssym(lua_State *L)
static PLINT Alen
static swig_cast_info _swigc__p_double[]
static swig_lua_method swig_PLGraphicsIn_meta[]
#define SWIGTYPE_p_PLGraphicsIn
static int _wrap_plGetCursor(lua_State *L)
static int _wrap_gxax(lua_State *L)
struct swig_cast_info swig_cast_info
void(* label_func)(PLINT, PLFLT, char *, PLINT, PLPointer)
static int _wrap_PLGraphicsIn_pY_set(lua_State *L)
static swig_lua_attribute swig_PLGraphicsIn_Sf_SwigStatic_attributes[]
#define SWIG_LUA_POINTER
SWIGRUNTIME int SWIG_TypeNameComp(const char *f1, const char *l1, const char *f2, const char *l2)
static int _wrap_seed(lua_State *L)
static int _wrap_sdiplt(lua_State *L)
static int _wrap_psty(lua_State *L)
static swig_lua_attribute swig_PLGraphicsIn_attributes[]
static int _wrap_cont(lua_State *L)
SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State *L, int index, void *ptr, size_t size, swig_type_info *type)
static int _wrap_scmap0a(lua_State *L)
static int _wrap_gradient(lua_State *L)
SWIGINTERN void SWIG_write_ptr_array(lua_State *L, void **array, int size, swig_type_info *type, int own)
static int _wrap_setcontlabelparam(lua_State *L)
SWIGINTERN int SWIG_Lua_iterate_bases(lua_State *L, swig_type_info *SWIGUNUSED swig_type, int first_arg, swig_lua_base_iterator_func func, int *const ret)
void(* mapform_func)(PLINT, PLFLT *, PLFLT *)
void mypltr(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void *pltr_data)
static int _wrap_width(lua_State *L)
static int _wrap_hist(lua_State *L)
static int _wrap_text(lua_State *L)
#define SWIG_ConvertPtr(L, idx, ptr, type, flags)
static int _wrap_gspa(lua_State *L)
SWIGINTERN int SWIG_Lua_dostring(lua_State *L, const char *str)
static int _wrap_vpor(lua_State *L)
void(* pltr_func)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer)
static int _wrap_colorbar(lua_State *L)
static int _wrap_flush(lua_State *L)
static int _wrap_sym(lua_State *L)
static swig_cast_info _swigc__p_f_double_double_p_double_p_double_p_void__void[]
static int _wrap_PLGraphicsIn_state_get(lua_State *L)
static int _wrap_xormod(lua_State *L)
#define SWIG_fail_arg(func_name, argnum, type)
static int _wrap_spause(lua_State *L)
#define SWIGRUNTIME
#define SWIG_Lua_get_table(L, n)
static int _wrap_sdidev(lua_State *L)
static int _wrap_scmap1n(lua_State *L)
static int _wrap_setcontlabelformat(lua_State *L)
static int _wrap_gcmap1_range(lua_State *L)
#define SWIG_RUNTIME_VERSION
static int _wrap_sdimap(lua_State *L)
SWIGRUNTIME void SWIG_TypeClientData(swig_type_info *ti, void *clientdata)
SWIGRUNTIME swig_type_info * SWIG_TypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
SWIGINTERN int SWIG_Lua_class_do_get_item(lua_State *L, swig_type_info *type, int SWIGUNUSED first_arg, int *ret)
static int _wrap_ssub(lua_State *L)
static int _wrap_new_PLGraphicsIn(lua_State *L)
static int _wrap_scmap1a(lua_State *L)
#define SWIG_Lua_add_function(L, n, f)
static int _wrap_abort(lua_State *L)
SWIGRUNTIME char * SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz)
static int _wrap_glevel(lua_State *L)
#define SWIG_AddCast(r)
#define SWIG_LUA_CHAR
static int _wrap_PLGraphicsIn_dX_get(lua_State *L)
static int _wrap_pat(lua_State *L)
static char mylabel_funcstr[255]
static int _wrap_gchr(lua_State *L)
SWIGINTERN int SWIG_Lua_add_class_user_metamethod(lua_State *L, swig_lua_class *clss, const int metatable_index)
static int _wrap_PLGraphicsIn_pY_get(lua_State *L)
static int _wrap_sfci(lua_State *L)
static int _wrap_shade(lua_State *L)
SWIGINTERN void SWIG_Lua_populate_inheritable_metamethods(lua_State *L)
static swig_type_info * swig_types[13]
static int _wrap_gpage(lua_State *L)
static int _wrap_plResetOpts(lua_State *L)
static swig_cast_info _swigc__p_f_int_p_double_p_double__void[]
static int _wrap_lightsource(lua_State *L)
static int _wrap_sfont(lua_State *L)
SWIGRUNTIME const char * SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name)
static int _wrap_calc_world(lua_State *L)
static int _wrap_plot3dcl(lua_State *L)
static int _wrap_gvpw(lua_State *L)
static int _wrap_plOptUsage(lua_State *L)
static swig_module_info swig_module
static int _wrap_image(lua_State *L)
static const char * swig_PLGraphicsIn_base_names[]
static int _wrap_PLGraphicsIn_state_set(lua_State *L)
static swig_lua_class * swig_PLGraphicsIn_bases[]
static PLINT Ylen
static int _wrap_parseopts(lua_State *L)
static int _wrap_MinMax2dGrid(lua_State *L)
static swig_type_info _swigt__p_double
static int _wrap_gdiori(lua_State *L)
#define SWIG_SetModule(clientdata, pointer)
static int _wrap_famadv(lua_State *L)
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)
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
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)
void *(* swig_converter_func)(void *, int *)
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[]
SWIGRUNTIME void SWIG_InitializeModule(void *clientdata)
static int _wrap_svect(lua_State *L)
#define SWIG_LUA_CONSTTAB_INT(B, C)
static int _wrap_poin(lua_State *L)
static int _wrap_mapfill(lua_State *L)
SWIGINTERN int SWIG_Lua_namespace_get(lua_State *L)
static int _wrap_scol0a(lua_State *L)
static int _wrap_PLGraphicsIn_string_set(lua_State *L)
static int _wrap_star(lua_State *L)
static int _wrap_fontld(lua_State *L)
static int _wrap_line(lua_State *L)
SWIGINTERN int SWIG_Lua_class_get(lua_State *L)
SWIGRUNTIME int SWIG_Lua_type(lua_State *L)
SWIGINTERN void SWIG_Lua_namespace_register(lua_State *L, swig_lua_namespace *ns, int reg)
#define SWIG_LUA_CONSTTAB_FLOAT(B, C)
PLFLT(* f2eval_func)(PLINT, PLINT, PLPointer)
static int _wrap_plClearOpts(lua_State *L)
static int _wrap_legend(lua_State *L)
SWIGINTERN void SWIG_Lua_get_class_registry(lua_State *L)
static swig_cast_info _swigc__p_char[]
SWIGINTERN void SWIG_Lua_add_class_static_details(lua_State *L, swig_lua_class *clss)
luaL_Reg swig_lua_method
static int _wrap_poin3(lua_State *L)
static int _wrap_plot3d(lua_State *L)
static swig_type_info _swigt__p_f_int_p_q_const__double_p_q_const__double__void
PLINT(* defined_func)(PLFLT, PLFLT)
static int _wrap_vasp(lua_State *L)
#define SWIG_NewPointerObj(L, ptr, type, owner)
static int _wrap_imagefr(lua_State *L)
static swig_cast_info _swigc__p_p_double[]
#define SWIGINTERN
static int _wrap_gver(lua_State *L)
SWIGINTERN void SWIG_Lua_AddMetatable(lua_State *L, swig_type_info *type)
static int _wrap_scolbg(lua_State *L)
#define SWIG_FREE_ARRAY(PTR)
static int _wrap_PLGraphicsIn_keysym_set(lua_State *L)
SWIGRUNTIME swig_type_info * SWIG_MangledTypeQueryModule(swig_module_info *start, swig_module_info *end, const char *name)
static int _wrap_w3d(lua_State *L)
static swig_lua_const_info swig_SwigModule_constants[]
static int _wrap_PLGraphicsIn_dY_get(lua_State *L)
static char mapform_funcstr[255]
static int _wrap_stransform(lua_State *L)
SWIGINTERN void SWIG_Lua_class_register(lua_State *L, swig_lua_class *clss)
SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State *L, void *ptr, swig_type_info *type, int own)
SWIGRUNTIME const char * SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name)
static int _wrap_scolor(lua_State *L)
static int _wrap_line3(lua_State *L)
SWIGINTERN int SWIG_Lua_set_immutable(lua_State *L)
static swig_lua_const_info swig_PLGraphicsIn_Sf_SwigStatic_constants[]
static lua_State * myL
void(* ct_func)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer)
#define SWIG_POINTER_NO_NULL
static int _wrap_gdidev(lua_State *L)
static int _wrap_axes(lua_State *L)
static int _wrap_PLGraphicsIn_type_get(lua_State *L)
#define lua_absindex(L, i)
#define SWIG_LUA_FLOAT
static int _wrap_warn(lua_State *L)
struct swig_type_info *(* swig_dycast_func)(void **)
SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State *L, swig_lua_namespace *ns)
static int _wrap_randd(lua_State *L)
#define SWIG_NullReferenceError
static int _wrap_arc(lua_State *L)
SWIGRUNTIMEINLINE const char * SWIG_TypeName(const swig_type_info *ty)
static int _wrap_stripa(lua_State *L)
static int _wrap_PLGraphicsIn_type_set(lua_State *L)
static int _wrap_join(lua_State *L)
static void swig_delete_PLGraphicsIn(void *obj)
static int _wrap_cpstrm(lua_State *L)
static int _wrap_gdiplt(lua_State *L)
#define SWIG_POINTER_DISOWN
SWIGINTERN int SWIG_Lua_namespace_set(lua_State *L)
SWIGINTERN void ** SWIG_get_ptr_array_var(lua_State *L, int index, int *size, swig_type_info *type)
struct swig_type_info swig_type_info
static char myct_funcstr[255]
static int _wrap_gcompression(lua_State *L)
static int _wrap_string(lua_State *L)
SWIGINTERN int SWIG_Lua_class_disown(lua_State *L)
SWIGRUNTIME char * SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz)
static swig_type_info _swigt__p_PLGraphicsIn
SWIGINTERN void SWIG_Lua_class_register_instance(lua_State *L, swig_lua_class *clss)
static int _wrap_path(lua_State *L)
static swig_type_info _swigt__p_f_double_double__int
static int _wrap_PLGraphicsIn_subwindow_set(lua_State *L)
SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz)
static int _wrap_smaj(lua_State *L)
static int _wrap_gfci(lua_State *L)
static int _wrap_start(lua_State *L)
static int _wrap_meshc(lua_State *L)
static int _wrap_plot3dc(lua_State *L)
static int _wrap_PLGraphicsIn_wY_get(lua_State *L)
static int _wrap_ctime(lua_State *L)
SWIGINTERN int SWIG_read_ptr_array(lua_State *L, int index, void **array, int size, swig_type_info *type)
SWIGINTERN int SWIG_Lua_class_do_set(lua_State *L, swig_type_info *type, int first_arg, int *ret)
static int _wrap_lsty(lua_State *L)
static int _wrap_gfnam(lua_State *L)
static int _wrap_bin(lua_State *L)
static int _wrap_mapline(lua_State *L)
static int _wrap_gcol0(lua_State *L)
static int _wrap_PLGraphicsIn_dX_set(lua_State *L)
SWIGINTERN int SWIG_Lua_class_set(lua_State *L)
SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx)
#define SWIG_GetModule(clientdata)
SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State *L, void *ptr, size_t size, swig_type_info *type)
static int _wrap_PLGraphicsIn_wX_set(lua_State *L)
static int _wrap_bop(lua_State *L)
SWIGINTERN int SWIG_Lua_class_destruct(lua_State *L)
static swig_cast_info _swigc__p_unsigned_int[]
#define SWIG_fail
static int _wrap_ptex3(lua_State *L)
static swig_type_info _swigt__p_int
static swig_lua_method swig_SwigModule_methods[]
static int _wrap_eop(lua_State *L)
SWIGRUNTIME void SWIG_PropagateClientData(void)
static swig_cast_info _swigc__p_f_int_double_p_char_int_p_void__void[]
static int _wrap_plSetUsage(lua_State *L)
#define lua_pushglobaltable(L)
static int _wrap_poly3(lua_State *L)
#define SWIG_init_user
static swig_lua_method swig_PLGraphicsIn_Sf_SwigStatic_methods[]
SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type)
#define LUA_ALLOC_ARRAY(TYPE, LEN)
static int _wrap_prec(lua_State *L)
static int _wrap_sdev(lua_State *L)
SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty)
#define SWIG_isptrtype(L, I)
static int _wrap_PLGraphicsIn_pX_set(lua_State *L)
#define LUA_DECLARE_TYPEMAP_ARR_FN(NAME, TYPE)
static int _wrap_string3(lua_State *L)
static int _wrap_spal1(lua_State *L)
#define SWIG_TYPE_TABLE_NAME
static int _wrap_surf3d(lua_State *L)
static swig_type_info _swigt__p_unsigned_int
static swig_lua_namespace swig_PLGraphicsIn_Sf_SwigStatic
SWIGINTERN void SWIG_Lua_init_base_class(lua_State *L, swig_lua_class *clss)
static int _wrap_spal0(lua_State *L)
static int _wrap_griddata(lua_State *L)
static PLINT Xlen
static swig_type_info _swigt__p_f_int_p_double_p_double__void
static int _wrap_adv(lua_State *L)
static int _wrap_gra(lua_State *L)
#define SWIG_contract_assert(expr, msg)
int(* swig_lua_base_iterator_func)(lua_State *, swig_type_info *, int, int *ret)
static int _wrap_smin(lua_State *L)
struct swig_module_info swig_module_info
#define SWIG_init
SWIGINTERN void SWIG_Lua_create_class_registry(lua_State *L)
static int _wrap_gcol0a(lua_State *L)
#define SWIG_ERROR
static int _wrap_vect(lua_State *L)
static swig_lua_namespace swig_SwigModule
#define LUA_FREE_ARRAY(PTR)
static int _wrap_lab(lua_State *L)
static swig_type_info _swigt__p_f_int_double_p_char_int_p_void__void
static int _wrap_setopt(lua_State *L)
static int _wrap_shades(lua_State *L)
static int _wrap_PLGraphicsIn_button_set(lua_State *L)
SWIGRUNTIME void SWIG_Lua_pushferrstring(lua_State *L, const char *fmt,...)
static swig_type_info * swig_type_initial[]
static int _wrap_mapstring(lua_State *L)
static int _wrap_col1(lua_State *L)
static int _wrap_btime(lua_State *L)
SWIGINTERN int SWIG_table_size(lua_State *L, int index)
static int _wrap_mtex3(lua_State *L)
static int _wrap_sdiplz(lua_State *L)
static int _wrap_styl(lua_State *L)
static int _wrap_vsta(lua_State *L)
static swig_cast_info _swigc__p_PLGraphicsIn[]
static int _wrap_sfnam(lua_State *L)
static int _wrap_fill(lua_State *L)
static int _wrap_mtex(lua_State *L)
static int _wrap_scmap1l(lua_State *L)
static swig_cast_info _swigc__p_p_char[]
static int _wrap_erry(lua_State *L)
static swig_lua_attribute swig_SwigModule_attributes[]
static int _wrap_PLGraphicsIn_pX_get(lua_State *L)
#define SWIG_LUACODE
#define SWIG_LUA_INT
static swig_type_info _swigt__p_char
static int _wrap_col0(lua_State *L)
static swig_lua_method swig_PLGraphicsIn_methods[]
static int _wrap_gfont(lua_State *L)
#define SWIGEXPORT
#define SWIG_IsOK(r)
SWIGINTERN int SWIG_Lua_class_tostring(lua_State *L)
void(* fill_func)(PLINT, const PLFLT *, const PLFLT *)
static int _wrap_svpa(lua_State *L)
static int _wrap_scmap0(lua_State *L)
static int _wrap_vpas(lua_State *L)
#define SWIG_LUA_BINARY
static int _wrap_schr(lua_State *L)
static int _wrap_sxax(lua_State *L)
static int _wrap_stripd(lua_State *L)
static int _wrap_syax(lua_State *L)
static int _wrap_gcolbg(lua_State *L)
static swig_lua_class _wrap_class_PLGraphicsIn
static int _wrap_scompression(lua_State *L)
static int _wrap_maptex(lua_State *L)
static int _wrap_PLGraphicsIn_dY_set(lua_State *L)
static swig_cast_info _swigc__p_f_int_p_q_const__double_p_q_const__double__void[]
#define SWIG_LUA_STRING
static int _wrap_scol0(lua_State *L)
SWIGINTERN void SWIG_Lua_InstallConstants(lua_State *L, swig_lua_const_info constants[])
static int _wrap_sesc(lua_State *L)
SWIGINTERN void ** SWIG_get_ptr_array_fixed(lua_State *L, int index, int size, swig_type_info *type)
static int _wrap_sdiori(lua_State *L)
static int _proxy__wrap_new_PLGraphicsIn(lua_State *L)
SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State *L, const char *cname)
#define SWIG_OK
static int _wrap_PLGraphicsIn_wY_set(lua_State *L)
SWIGINTERN void SWIG_Lua_add_class_instance_details(lua_State *L, swig_lua_class *clss)
#define SWIGINTERNINLINE
static int _wrap_gdev(lua_State *L)
#define SWIG_Lua_add_boolean(L, n, b)
static int _wrap_fill3(lua_State *L)
#define lua_rawgetp(L, index, ptr)
#define SWIGRUNTIMEINLINE
SWIGRUNTIMEINLINE void * SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory)
char string[PL_MAXKEY]
Definition: plplot.h:440
PLINT nx
Definition: plplot.h:521
PLFLT_NC_MATRIX xg
Definition: plplot.h:520
PLINT ny
Definition: plplot.h:521
PLFLT_NC_MATRIX zg
Definition: plplot.h:520
PLFLT_NC_MATRIX yg
Definition: plplot.h:520
PLFLT_NC_FE_POINTER xg
Definition: plplot.h:508
PLFLT_NC_FE_POINTER yg
Definition: plplot.h:508
PLINT nz
Definition: plplot.h:509
PLINT nx
Definition: plplot.h:509
PLFLT_NC_FE_POINTER zg
Definition: plplot.h:508
PLINT ny
Definition: plplot.h:509
swig_type_info * type
struct swig_cast_info * prev
struct swig_cast_info * next
swig_converter_func converter
swig_type_info ** type
void(* destructor)(void *)
const char ** base_names
swig_lua_attribute * attributes
const char * fqname
swig_lua_namespace * cls_static
struct swig_lua_class ** bases
swig_lua_method * metatable
lua_CFunction constructor
swig_lua_method * methods
swig_type_info ** ptype
swig_lua_method * ns_methods
swig_lua_attribute * ns_attributes
struct swig_lua_class ** ns_classes
swig_lua_const_info * ns_constants
struct swig_lua_namespace ** ns_namespaces
swig_type_info * type
swig_type_info * type
swig_type_info ** types
swig_cast_info ** cast_initial
swig_type_info ** type_initial
struct swig_module_info * next
swig_dycast_func dcast
struct swig_cast_info * cast
static const char * name
Definition: tkMain.c:135