PLplot: plplotluacLUA_wrap.c Source File

PLplot 5.10.0

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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 2.0.7
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 #define SWIGLUA
12 #define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA
13 #define SWIG_LUA_MODULE_GLOBAL
14
15 /* -----------------------------------------------------------------------------
16 * This section contains generic SWIG labels for method/variable
17 * declarations/attributes, and other compiler dependent labels.
18 * ----------------------------------------------------------------------------- */
19
20 /* template workaround for compilers that cannot correctly implement the C++ standard */
21 #ifndef SWIGTEMPLATEDISAMBIGUATOR
22 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
23 # define SWIGTEMPLATEDISAMBIGUATOR template
24 # elif defined(__HP_aCC)
25 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
26 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
27 # define SWIGTEMPLATEDISAMBIGUATOR template
28 # else
29 # define SWIGTEMPLATEDISAMBIGUATOR
30 # endif
31 #endif
32
33 /* inline attribute */
34 #ifndef SWIGINLINE
35 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
36 # define SWIGINLINE inline
37 # else
38 # define SWIGINLINE
39 # endif
40 #endif
41
42 /* attribute recognised by some compilers to avoid 'unused' warnings */
43 #ifndef SWIGUNUSED
44 # if defined(__GNUC__)
45 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
46 # define SWIGUNUSED __attribute__ ((__unused__))
47 # else
48 # define SWIGUNUSED
49 # endif
50 # elif defined(__ICC)
51 # define SWIGUNUSED __attribute__ ((__unused__))
52 # else
53 # define SWIGUNUSED
54 # endif
55 #endif
56
57 #ifndef SWIG_MSC_UNSUPPRESS_4505
58 # if defined(_MSC_VER)
59 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
60 # endif
61 #endif
62
63 #ifndef SWIGUNUSEDPARM
64 # ifdef __cplusplus
65 # define SWIGUNUSEDPARM(p)
66 # else
67 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
68 # endif
69 #endif
70
71 /* internal SWIG method */
72 #ifndef SWIGINTERN
73 # define SWIGINTERN static SWIGUNUSED
74 #endif
75
76 /* internal inline SWIG method */
77 #ifndef SWIGINTERNINLINE
78 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
79 #endif
80
81 /* exporting methods */
82 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
83 # ifndef GCC_HASCLASSVISIBILITY
84 # define GCC_HASCLASSVISIBILITY
85 # endif
86 #endif
87
88 #ifndef SWIGEXPORT
89 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
90 # if defined(STATIC_LINKED)
91 # define SWIGEXPORT
92 # else
93 # define SWIGEXPORT __declspec(dllexport)
94 # endif
95 # else
96 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
97 # define SWIGEXPORT __attribute__ ((visibility("default")))
98 # else
99 # define SWIGEXPORT
100 # endif
101 # endif
102 #endif
103
104 /* calling conventions for Windows */
105 #ifndef SWIGSTDCALL
106 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
107 # define SWIGSTDCALL __stdcall
108 # else
109 # define SWIGSTDCALL
110 # endif
111 #endif
112
113 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
114 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
115 # define _CRT_SECURE_NO_DEPRECATE
116 #endif
117
118 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
119 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
120 # define _SCL_SECURE_NO_DEPRECATE
121 #endif
122
123
124 /* -----------------------------------------------------------------------------
125 * swigrun.swg
126 *
127 * This file contains generic C API SWIG runtime support for pointer
128 * type checking.
129 * ----------------------------------------------------------------------------- */
130
131 /* This should only be incremented when either the layout of swig_type_info changes,
132 or for whatever reason, the runtime changes incompatibly */
133 #define SWIG_RUNTIME_VERSION "4"
134
135 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
136 #ifdef SWIG_TYPE_TABLE
137 # define SWIG_QUOTE_STRING(x) #x
138 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
139 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
140 #else
141 # define SWIG_TYPE_TABLE_NAME
142 #endif
143
144 /*
145 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
146 creating a static or dynamic library from the SWIG runtime code.
147 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
148
149 But only do this if strictly necessary, ie, if you have problems
150 with your compiler or suchlike.
151 */
152
153 #ifndef SWIGRUNTIME
154 # define SWIGRUNTIME SWIGINTERN
155 #endif
156
157 #ifndef SWIGRUNTIMEINLINE
158 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
159 #endif
160
161 /* Generic buffer size */
162 #ifndef SWIG_BUFFER_SIZE
163 # define SWIG_BUFFER_SIZE 1024
164 #endif
165
166 /* Flags for pointer conversions */
167 #define SWIG_POINTER_DISOWN 0x1
168 #define SWIG_CAST_NEW_MEMORY 0x2
169
170 /* Flags for new pointer objects */
171 #define SWIG_POINTER_OWN 0x1
172
173
174 /*
175 Flags/methods for returning states.
176
177 The SWIG conversion methods, as ConvertPtr, return an integer
178 that tells if the conversion was successful or not. And if not,
179 an error code can be returned (see swigerrors.swg for the codes).
180
181 Use the following macros/flags to set or process the returning
182 states.
183
184 In old versions of SWIG, code such as the following was usually written:
185
186 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
187 // success code
188 } else {
189 //fail code
190 }
191
192 Now you can be more explicit:
193
194 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
195 if (SWIG_IsOK(res)) {
196 // success code
197 } else {
198 // fail code
199 }
200
201 which is the same really, but now you can also do
202
203 Type *ptr;
204 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
205 if (SWIG_IsOK(res)) {
206 // success code
207 if (SWIG_IsNewObj(res) {
208 ...
209 delete *ptr;
210 } else {
211 ...
212 }
213 } else {
214 // fail code
215 }
216
217 I.e., now SWIG_ConvertPtr can return new objects and you can
218 identify the case and take care of the deallocation. Of course that
219 also requires SWIG_ConvertPtr to return new result values, such as
220
221 int SWIG_ConvertPtr(obj, ptr,...) {
222 if (<obj is ok>) {
223 if (<need new object>) {
224 *ptr = <ptr to new allocated object>;
225 return SWIG_NEWOBJ;
226 } else {
227 *ptr = <ptr to old object>;
228 return SWIG_OLDOBJ;
229 }
230 } else {
231 return SWIG_BADOBJ;
232 }
233 }
234
235 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
236 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
237 SWIG errors code.
238
239 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
240 allows to return the 'cast rank', for example, if you have this
241
242 int food(double)
243 int fooi(int);
244
245 and you call
246
247 food(1) // cast rank '1' (1 -> 1.0)
248 fooi(1) // cast rank '0'
249
250 just use the SWIG_AddCast()/SWIG_CheckState()
251 */
252
253 #define SWIG_OK (0)
254 #define SWIG_ERROR (-1)
255 #define SWIG_IsOK(r) (r >= 0)
256 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
257
258 /* The CastRankLimit says how many bits are used for the cast rank */
259 #define SWIG_CASTRANKLIMIT (1 << 8)
260 /* The NewMask denotes the object was created (using new/malloc) */
261 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
262 /* The TmpMask is for in/out typemaps that use temporal objects */
263 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
264 /* Simple returning values */
265 #define SWIG_BADOBJ (SWIG_ERROR)
266 #define SWIG_OLDOBJ (SWIG_OK)
267 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
268 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
269 /* Check, add and del mask methods */
270 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
271 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
272 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
273 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
274 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
275 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
276
277 /* Cast-Rank Mode */
278 #if defined(SWIG_CASTRANK_MODE)
279 # ifndef SWIG_TypeRank
280 # define SWIG_TypeRank unsigned long
281 # endif
282 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
283 # define SWIG_MAXCASTRANK (2)
284 # endif
285 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
286 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
287 SWIGINTERNINLINE int SWIG_AddCast(int r) {
288 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
289 }
290 SWIGINTERNINLINE int SWIG_CheckState(int r) {
291 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
292 }
293 #else /* no cast-rank mode */
294 # define SWIG_AddCast
295 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
296 #endif
297
298
299 #include <string.h>
300
301 #ifdef __cplusplus
302 extern "C" {
303 #endif
304
305 typedef void *(*swig_converter_func)(void *, int *);
306 typedef struct swig_type_info *(*swig_dycast_func)(void **);
307
308 /* Structure to store information on one type */
309 typedef struct swig_type_info {
310 const char *name; /* mangled name of this type */
311 const char *str; /* human readable name of this type */
312 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
313 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
314 void *clientdata; /* language specific type data */
315 int owndata; /* flag if the structure owns the clientdata */
316 } swig_type_info;
317
318 /* Structure to store a type and conversion function used for casting */
319 typedef struct swig_cast_info {
320 swig_type_info *type; /* pointer to type that is equivalent to this type */
321 swig_converter_func converter; /* function to cast the void pointers */
322 struct swig_cast_info *next; /* pointer to next cast in linked list */
323 struct swig_cast_info *prev; /* pointer to the previous cast */
324 } swig_cast_info;
325
326 /* Structure used to store module information
327 * Each module generates one structure like this, and the runtime collects
328 * all of these structures and stores them in a circularly linked list.*/
329 typedef struct swig_module_info {
330 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
331 size_t size; /* Number of types in this module */
332 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
333 swig_type_info **type_initial; /* Array of initially generated type structures */
334 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
335 void *clientdata; /* Language specific module data */
336 } swig_module_info;
337
338 /*
339 Compare two type names skipping the space characters, therefore
340 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
341
342 Return 0 when the two name types are equivalent, as in
343 strncmp, but skipping ' '.
344 */
345 SWIGRUNTIME int
346 SWIG_TypeNameComp(const char *f1, const char *l1,
347 const char *f2, const char *l2) {
348 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
349 while ((*f1 == ' ') && (f1 != l1)) ++f1;
350 while ((*f2 == ' ') && (f2 != l2)) ++f2;
351 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
352 }
353 return (int)((l1 - f1) - (l2 - f2));
354 }
355
356 /*
357 Check type equivalence in a name list like <name1>|<name2>|...
358 Return 0 if not equal, 1 if equal
359 */
360 SWIGRUNTIME int
361 SWIG_TypeEquiv(const char *nb, const char *tb) {
362 int equiv = 0;
363 const char* te = tb + strlen(tb);
364 const char* ne = nb;
365 while (!equiv && *ne) {
366 for (nb = ne; *ne; ++ne) {
367 if (*ne == '|') break;
368 }
369 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
370 if (*ne) ++ne;
371 }
372 return equiv;
373 }
374
375 /*
376 Check type equivalence in a name list like <name1>|<name2>|...
377 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
378 */
379 SWIGRUNTIME int
380 SWIG_TypeCompare(const char *nb, const char *tb) {
381 int equiv = 0;
382 const char* te = tb + strlen(tb);
383 const char* ne = nb;
384 while (!equiv && *ne) {
385 for (nb = ne; *ne; ++ne) {
386 if (*ne == '|') break;
387 }
388 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
389 if (*ne) ++ne;
390 }
391 return equiv;
392 }
393
394
395 /*
396 Check the typename
397 */
398 SWIGRUNTIME swig_cast_info *
399 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
400 if (ty) {
401 swig_cast_info *iter = ty->cast;
402 while (iter) {
403 if (strcmp(iter->type->name, c) == 0) {
404 if (iter == ty->cast)
405 return iter;
406 /* Move iter to the top of the linked list */
407 iter->prev->next = iter->next;
408 if (iter->next)
409 iter->next->prev = iter->prev;
410 iter->next = ty->cast;
411 iter->prev = 0;
412 if (ty->cast) ty->cast->prev = iter;
413 ty->cast = iter;
414 return iter;
415 }
416 iter = iter->next;
417 }
418 }
419 return 0;
420 }
421
422 /*
423 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
424 */
425 SWIGRUNTIME swig_cast_info *
426 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
427 if (ty) {
428 swig_cast_info *iter = ty->cast;
429 while (iter) {
430 if (iter->type == from) {
431 if (iter == ty->cast)
432 return iter;
433 /* Move iter to the top of the linked list */
434 iter->prev->next = iter->next;
435 if (iter->next)
436 iter->next->prev = iter->prev;
437 iter->next = ty->cast;
438 iter->prev = 0;
439 if (ty->cast) ty->cast->prev = iter;
440 ty->cast = iter;
441 return iter;
442 }
443 iter = iter->next;
444 }
445 }
446 return 0;
447 }
448
449 /*
450 Cast a pointer up an inheritance hierarchy
451 */
452 SWIGRUNTIMEINLINE void *
453 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
454 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
455 }
456
457 /*
458 Dynamic pointer casting. Down an inheritance hierarchy
459 */
460 SWIGRUNTIME swig_type_info *
461 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
462 swig_type_info *lastty = ty;
463 if (!ty || !ty->dcast) return ty;
464 while (ty && (ty->dcast)) {
465 ty = (*ty->dcast)(ptr);
466 if (ty) lastty = ty;
467 }
468 return lastty;
469 }
470
471 /*
472 Return the name associated with this type
473 */
474 SWIGRUNTIMEINLINE const char *
475 SWIG_TypeName(const swig_type_info *ty) {
476 return ty->name;
477 }
478
479 /*
480 Return the pretty name associated with this type,
481 that is an unmangled type name in a form presentable to the user.
482 */
483 SWIGRUNTIME const char *
484 SWIG_TypePrettyName(const swig_type_info *type) {
485 /* The "str" field contains the equivalent pretty names of the
486 type, separated by vertical-bar characters. We choose
487 to print the last name, as it is often (?) the most
488 specific. */
489 if (!type) return NULL;
490 if (type->str != NULL) {
491 const char *last_name = type->str;
492 const char *s;
493 for (s = type->str; *s; s++)
494 if (*s == '|') last_name = s+1;
495 return last_name;
496 }
497 else
498 return type->name;
499 }
500
501 /*
502 Set the clientdata field for a type
503 */
504 SWIGRUNTIME void
505 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
506 swig_cast_info *cast = ti->cast;
507 /* if (ti->clientdata == clientdata) return; */
508 ti->clientdata = clientdata;
509
510 while (cast) {
511 if (!cast->converter) {
512 swig_type_info *tc = cast->type;
513 if (!tc->clientdata) {
514 SWIG_TypeClientData(tc, clientdata);
515 }
516 }
517 cast = cast->next;
518 }
519 }
520 SWIGRUNTIME void
521 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
522 SWIG_TypeClientData(ti, clientdata);
523 ti->owndata = 1;
524 }
525
526 /*
527 Search for a swig_type_info structure only by mangled name
528 Search is a O(log #types)
529
530 We start searching at module start, and finish searching when start == end.
531 Note: if start == end at the beginning of the function, we go all the way around
532 the circular list.
533 */
534 SWIGRUNTIME swig_type_info *
535 SWIG_MangledTypeQueryModule(swig_module_info *start,
536 swig_module_info *end,
537 const char *name) {
538 swig_module_info *iter = start;
539 do {
540 if (iter->size) {
541 register size_t l = 0;
542 register size_t r = iter->size - 1;
543 do {
544 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
545 register size_t i = (l + r) >> 1;
546 const char *iname = iter->types[i]->name;
547 if (iname) {
548 register int compare = strcmp(name, iname);
549 if (compare == 0) {
550 return iter->types[i];
551 } else if (compare < 0) {
552 if (i) {
553 r = i - 1;
554 } else {
555 break;
556 }
557 } else if (compare > 0) {
558 l = i + 1;
559 }
560 } else {
561 break; /* should never happen */
562 }
563 } while (l <= r);
564 }
565 iter = iter->next;
566 } while (iter != end);
567 return 0;
568 }
569
570 /*
571 Search for a swig_type_info structure for either a mangled name or a human readable name.
572 It first searches the mangled names of the types, which is a O(log #types)
573 If a type is not found it then searches the human readable names, which is O(#types).
574
575 We start searching at module start, and finish searching when start == end.
576 Note: if start == end at the beginning of the function, we go all the way around
577 the circular list.
578 */
579 SWIGRUNTIME swig_type_info *
580 SWIG_TypeQueryModule(swig_module_info *start,
581 swig_module_info *end,
582 const char *name) {
583 /* STEP 1: Search the name field using binary search */
584 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
585 if (ret) {
586 return ret;
587 } else {
588 /* STEP 2: If the type hasn't been found, do a complete search
589 of the str field (the human readable name) */
590 swig_module_info *iter = start;
591 do {
592 register size_t i = 0;
593 for (; i < iter->size; ++i) {
594 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
595 return iter->types[i];
596 }
597 iter = iter->next;
598 } while (iter != end);
599 }
600
601 /* neither found a match */
602 return 0;
603 }
604
605 /*
606 Pack binary data into a string
607 */
608 SWIGRUNTIME char *
609 SWIG_PackData(char *c, void *ptr, size_t sz) {
610 static const char hex[17] = "0123456789abcdef";
611 register const unsigned char *u = (unsigned char *) ptr;
612 register const unsigned char *eu = u + sz;
613 for (; u != eu; ++u) {
614 register unsigned char uu = *u;
615 *(c++) = hex[(uu & 0xf0) >> 4];
616 *(c++) = hex[uu & 0xf];
617 }
618 return c;
619 }
620
621 /*
622 Unpack binary data from a string
623 */
624 SWIGRUNTIME const char *
625 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
626 register unsigned char *u = (unsigned char *) ptr;
627 register const unsigned char *eu = u + sz;
628 for (; u != eu; ++u) {
629 register char d = *(c++);
630 register unsigned char uu;
631 if ((d >= '0') && (d <= '9'))
632 uu = ((d - '0') << 4);
633 else if ((d >= 'a') && (d <= 'f'))
634 uu = ((d - ('a'-10)) << 4);
635 else
636 return (char *) 0;
637 d = *(c++);
638 if ((d >= '0') && (d <= '9'))
639 uu |= (d - '0');
640 else if ((d >= 'a') && (d <= 'f'))
641 uu |= (d - ('a'-10));
642 else
643 return (char *) 0;
644 *u = uu;
645 }
646 return c;
647 }
648
649 /*
650 Pack 'void *' into a string buffer.
651 */
652 SWIGRUNTIME char *
653 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
654 char *r = buff;
655 if ((2*sizeof(void *) + 2) > bsz) return 0;
656 *(r++) = '_';
657 r = SWIG_PackData(r,&ptr,sizeof(void *));
658 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
659 strcpy(r,name);
660 return buff;
661 }
662
663 SWIGRUNTIME const char *
664 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
665 if (*c != '_') {
666 if (strcmp(c,"NULL") == 0) {
667 *ptr = (void *) 0;
668 return name;
669 } else {
670 return 0;
671 }
672 }
673 return SWIG_UnpackData(++c,ptr,sizeof(void *));
674 }
675
676 SWIGRUNTIME char *
677 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
678 char *r = buff;
679 size_t lname = (name ? strlen(name) : 0);
680 if ((2*sz + 2 + lname) > bsz) return 0;
681 *(r++) = '_';
682 r = SWIG_PackData(r,ptr,sz);
683 if (lname) {
684 strncpy(r,name,lname+1);
685 } else {
686 *r = 0;
687 }
688 return buff;
689 }
690
691 SWIGRUNTIME const char *
692 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
693 if (*c != '_') {
694 if (strcmp(c,"NULL") == 0) {
695 memset(ptr,0,sz);
696 return name;
697 } else {
698 return 0;
699 }
700 }
701 return SWIG_UnpackData(++c,ptr,sz);
702 }
703
704 #ifdef __cplusplus
705 }
706 #endif
707
708 /* -----------------------------------------------------------------------------
709 * luarun.swg
710 *
711 * This file contains the runtime support for Lua modules
712 * and includes code for managing global variables and pointer
713 * type checking.
714 * ----------------------------------------------------------------------------- */
715
716 #ifdef __cplusplus
717 extern "C" {
718 #endif
719
720 #include "lua.h"
721 #include "lauxlib.h"
722 #include <stdlib.h> /* for malloc */
723 #include <assert.h> /* for a few sanity tests */
724
725 /* -----------------------------------------------------------------------------
726 * Lua flavors
727 * ----------------------------------------------------------------------------- */
728
729 #define SWIG_LUA_FLAVOR_LUA 1
730 #define SWIG_LUA_FLAVOR_ELUA 2
731 #define SWIG_LUA_FLAVOR_ELUAC 3
732
733 #if !defined(SWIG_LUA_TARGET)
734 # error SWIG_LUA_TARGET not defined
735 #endif
736
737 #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
738 # define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
739 # define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
740 # define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
741 # define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
742 #else /* SWIG_LUA_FLAVOR_LUA */
743 # define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
744 # define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
745 # define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
746 # define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
747 #endif
748
749 #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
750 # define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
751 # define LSTRVAL LRO_STRVAL
752 #endif
753
754 /* -----------------------------------------------------------------------------
755 * compatibility defines
756 * ----------------------------------------------------------------------------- */
757
758 /* History of Lua C API length functions: In Lua 5.0 (and before?)
759 there was "lua_strlen". In Lua 5.1, this was renamed "lua_objlen",
760 but a compatibility define of "lua_strlen" was added. In Lua 5.2,
761 this function was again renamed, to "lua_rawlen" (to emphasize that
762 it doesn't call the "__len" metamethod), and the compatibility
763 define of lua_strlen was removed. All SWIG uses have been updated
764 to "lua_rawlen", and we add our own defines of that here for older
765 versions of Lua. */
766 #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
767 # define lua_rawlen lua_strlen
768 #elif LUA_VERSION_NUM == 501
769 # define lua_rawlen lua_objlen
770 #endif
771
772
773 /* lua_pushglobaltable is the recommended "future-proof" way to get
774 the global table for Lua 5.2 and later. Here we define
775 lua_pushglobaltable ourselves for Lua versions before 5.2. */
776 #if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
777 # define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
778 #endif
779
780
781 /* -----------------------------------------------------------------------------
782 * global swig types
783 * ----------------------------------------------------------------------------- */
784 /* Constant table */
785 #define SWIG_LUA_INT 1
786 #define SWIG_LUA_FLOAT 2
787 #define SWIG_LUA_STRING 3
788 #define SWIG_LUA_POINTER 4
789 #define SWIG_LUA_BINARY 5
790 #define SWIG_LUA_CHAR 6
791
792 /* Structure for variable linking table */
793 typedef struct {
794 const char *name;
795 lua_CFunction get;
796 lua_CFunction set;
797 } swig_lua_var_info;
798
799 /* Constant information structure */
800 typedef struct {
801 int type;
802 char *name;
803 long lvalue;
804 double dvalue;
805 void *pvalue;
806 swig_type_info **ptype;
807 } swig_lua_const_info;
808
809 typedef struct {
810 const char *name;
811 lua_CFunction method;
812 } swig_lua_method;
813
814 typedef struct {
815 const char *name;
816 lua_CFunction getmethod;
817 lua_CFunction setmethod;
818 } swig_lua_attribute;
819
820 typedef struct swig_lua_class {
821 const char *name;
822 swig_type_info **type;
823 lua_CFunction constructor;
824 void (*destructor)(void *);
825 swig_lua_method *methods;
826 swig_lua_attribute *attributes;
827 struct swig_lua_class **bases;
828 const char **base_names;
829 } swig_lua_class;
830
831 /* this is the struct for wrappering all pointers in SwigLua
832 */
833 typedef struct {
834 swig_type_info *type;
835 int own; /* 1 if owned & must be destroyed */
836 void *ptr;
837 } swig_lua_userdata;
838
839 /* this is the struct for wrapping arbitary packed binary data
840 (currently it is only used for member function pointers)
841 the data ordering is similar to swig_lua_userdata, but it is currently not possible
842 to tell the two structures apart within SWIG, other than by looking at the type
843 */
844 typedef struct {
845 swig_type_info *type;
846 int own; /* 1 if owned & must be destroyed */
847 char data[1]; /* arbitary amount of data */
848 } swig_lua_rawdata;
849
850 /* Common SWIG API */
851 #define SWIG_NewPointerObj(L, ptr, type, owner) SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
852 #define SWIG_ConvertPtr(L,idx, ptr, type, flags) SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
853 #define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname) SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
854 /* for C++ member pointers, ie, member methods */
855 #define SWIG_ConvertMember(L, idx, ptr, sz, ty) SWIG_Lua_ConvertPacked(L, idx, ptr, sz, ty)
856 #define SWIG_NewMemberObj(L, ptr, sz, type) SWIG_Lua_NewPackedObj(L, ptr, sz, type)
857
858 /* Runtime API */
859 #define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
860 #define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
861 #define SWIG_MODULE_CLIENTDATA_TYPE lua_State*
862
863 /* Contract support */
864 #define SWIG_contract_assert(expr, msg) \
865 if (!(expr)) { lua_pushstring(L, (char *) msg); goto fail; } else
866
867 /* helper #defines */
868 #define SWIG_fail {goto fail;}
869 #define SWIG_fail_arg(func_name,argnum,type) \
870 {lua_pushfstring(L,"Error in %s (arg %d), expected '%s' got '%s'",\
871 func_name,argnum,type,SWIG_Lua_typename(L,argnum));\
872 goto fail;}
873 #define SWIG_fail_ptr(func_name,argnum,type) \
874 SWIG_fail_arg(func_name,argnum,(type && type->str)?type->str:"void*")
875 #define SWIG_check_num_args(func_name,a,b) \
876 if (lua_gettop(L)<a || lua_gettop(L)>b) \
877 {lua_pushfstring(L,"Error in %s expected %d..%d args, got %d",func_name,a,b,lua_gettop(L));\
878 goto fail;}
879
880
881 #define SWIG_Lua_get_table(L,n) \
882 (lua_pushstring(L, n), lua_rawget(L,-2))
883
884 #define SWIG_Lua_add_function(L,n,f) \
885 (lua_pushstring(L, n), \
886 lua_pushcfunction(L, f), \
887 lua_rawset(L,-3))
888
889 /* special helper for allowing 'nil' for usertypes */
890 #define SWIG_isptrtype(L,I) (lua_isuserdata(L,I) || lua_isnil(L,I))
891
892 #ifdef __cplusplus
893 /* Special helper for member function pointers
894 it gets the address, casts it, then dereferences it */
895 //#define SWIG_mem_fn_as_voidptr(a) (*((char**)&(a)))
896 #endif
897
898 /* storing/access of swig_module_info */
899 SWIGRUNTIME swig_module_info *
900 SWIG_Lua_GetModule(lua_State* L) {
901 swig_module_info *ret = 0;
902 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
903 lua_rawget(L,LUA_REGISTRYINDEX);
904 if (lua_islightuserdata(L,-1))
905 ret=(swig_module_info*)lua_touserdata(L,-1);
906 lua_pop(L,1); /* tidy */
907 return ret;
908 }
909
910 SWIGRUNTIME void
911 SWIG_Lua_SetModule(lua_State* L, swig_module_info *module) {
912 /* add this all into the Lua registry: */
913 lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
914 lua_pushlightuserdata(L,(void*)module);
915 lua_rawset(L,LUA_REGISTRYINDEX);
916 }
917
918 /* -----------------------------------------------------------------------------
919 * global variable support code: modules
920 * ----------------------------------------------------------------------------- */
921
922 /* this function is called when trying to set an immutable.
923 default value is to print an error.
924 This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */
925 SWIGINTERN int SWIG_Lua_set_immutable(lua_State* L)
926 {
927 /* there should be 1 param passed in: the new value */
928 #ifndef SWIGLUA_IGNORE_SET_IMMUTABLE
929 lua_pop(L,1); /* remove it */
930 lua_pushstring(L,"This variable is immutable");
931 lua_error(L);
932 #endif
933 return 0; /* should not return anything */
934 }
935
936 /* the module.get method used for getting linked data */
937 SWIGINTERN int SWIG_Lua_module_get(lua_State* L)
938 {
939 /* there should be 2 params passed in
940 (1) table (not the meta table)
941 (2) string name of the attribute
942 printf("SWIG_Lua_module_get %p(%s) '%s'\n",
943 lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
944 lua_tostring(L,2));
945 */
946 /* get the metatable */
947 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
948 assert(lua_isrotable(L,1)); /* just in case */
949 #else
950 assert(lua_istable(L,1)); /* default Lua action */
951 #endif
952 lua_getmetatable(L,1); /* get the metatable */
953 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
954 assert(lua_isrotable(L,-1)); /* just in case */
955 #else
956 assert(lua_istable(L,-1));
957 #endif
958 SWIG_Lua_get_table(L,".get"); /* get the .get table */
959 lua_remove(L,3); /* remove metatable */
960 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
961 if (lua_isrotable(L,-1))
962 #else
963 if (lua_istable(L,-1))
964 #endif
965 {
966 /* look for the key in the .get table */
967 lua_pushvalue(L,2); /* key */
968 lua_rawget(L,-2);
969 lua_remove(L,3); /* remove .get */
970 if (lua_iscfunction(L,-1))
971 { /* found it so call the fn & return its value */
972 lua_call(L,0,1);
973 return 1;
974 }
975 lua_pop(L,1); /* remove the top */
976 }
977 lua_pop(L,1); /* remove the .get */
978 lua_pushnil(L); /* return a nil */
979 return 1;
980 }
981
982 /* the module.set method used for setting linked data */
983 SWIGINTERN int SWIG_Lua_module_set(lua_State* L)
984 {
985 /* there should be 3 params passed in
986 (1) table (not the meta table)
987 (2) string name of the attribute
988 (3) any for the new value
989 */
990 /* get the metatable */
991 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
992 assert(lua_isrotable(L,1)); /* just in case */
993 #else
994 assert(lua_istable(L,1)); /* default Lua action */
995 #endif
996 lua_getmetatable(L,1); /* get the metatable */
997 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
998 assert(lua_isrotable(L,-1)); /* just in case */
999 #else
1000 assert(lua_istable(L,-1));
1001 #endif
1002 SWIG_Lua_get_table(L,".set"); /* get the .set table */
1003 lua_remove(L,4); /* remove metatable */
1004 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
1005 if (lua_isrotable(L,-1))
1006 #else
1007 if (lua_istable(L,-1))
1008 #endif
1009 {
1010 /* look for the key in the .set table */
1011 lua_pushvalue(L,2); /* key */
1012 lua_rawget(L,-2);
1013 lua_remove(L,4); /* remove .set */
1014 if (lua_iscfunction(L,-1))
1015 { /* found it so call the fn & return its value */
1016 lua_pushvalue(L,3); /* value */
1017 lua_call(L,1,0);
1018 return 0;
1019 }
1020 #if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA)
1021 else {
1022 return 0; // Exits stoically if an invalid key is initialized.
1023 }
1024 #endif
1025 }
1026 lua_settop(L,3); /* reset back to start */
1027 /* we now have the table, key & new value, so just set directly */
1028 lua_rawset(L,1); /* add direct */
1029 return 0;
1030 }
1031
1032 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
1033 /* registering a module in lua. Pushes the module table on the stack. */
1034 SWIGINTERN void SWIG_Lua_module_begin(lua_State* L,const char* name)
1035 {
1036 assert(lua_istable(L,-1)); /* just in case */
1037 lua_pushstring(L,name);
1038 lua_newtable(L); /* the table */
1039 /* add meta table */
1040 lua_newtable(L); /* the meta table */
1041 SWIG_Lua_add_function(L,"__index",SWIG_Lua_module_get);
1042 SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_module_set);
1043 lua_pushstring(L,".get");
1044 lua_newtable(L); /* the .get table */
1045 lua_rawset(L,-3); /* add .get into metatable */
1046 lua_pushstring(L,".set");
1047 lua_newtable(L); /* the .set table */
1048 lua_rawset(L,-3); /* add .set into metatable */
1049 lua_setmetatable(L,-2); /* sets meta table in module */
1050 #ifdef SWIG_LUA_MODULE_GLOBAL
1051 /* If requested, install the module directly into the global namespace. */
1052 lua_rawset(L,-3); /* add module into parent */
1053 SWIG_Lua_get_table(L,name); /* get the table back out */
1054 #else
1055 /* Do not install the module table as global name. The stack top has
1056 the module table with the name below. We pop the top and replace
1057 the name with it. */
1058 lua_replace(L,-2);
1059 #endif
1060 }
1061
1062 /* ending the register */
1063 SWIGINTERN void SWIG_Lua_module_end(lua_State* L)
1064 {
1065 lua_pop(L,1); /* tidy stack (remove module) */
1066 }
1067
1068 /* adding a linked variable to the module */
1069 SWIGINTERN void SWIG_Lua_module_add_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
1070 {
1071 assert(lua_istable(L,-1)); /* just in case */
1072 lua_getmetatable(L,-1); /* get the metatable */
1073 assert(lua_istable(L,-1)); /* just in case */
1074 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1075 assert(lua_istable(L,-1)); /* should be a table: */
1076 SWIG_Lua_add_function(L,name,getFn);
1077 lua_pop(L,1); /* tidy stack (remove table) */
1078 if (setFn) /* if there is a set fn */
1079 {
1080 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1081 assert(lua_istable(L,-1)); /* should be a table: */
1082 SWIG_Lua_add_function(L,name,setFn);
1083 lua_pop(L,1); /* tidy stack (remove table) */
1084 }
1085 lua_pop(L,1); /* tidy stack (remove meta) */
1086 }
1087 #endif
1088
1089 /* adding a function module */
1090 SWIGINTERN void SWIG_Lua_module_add_function(lua_State* L,const char* name,lua_CFunction fn)
1091 {
1092 SWIG_Lua_add_function(L,name,fn);
1093 }
1094
1095 /* -----------------------------------------------------------------------------
1096 * global variable support code: classes
1097 * ----------------------------------------------------------------------------- */
1098
1099 /* the class.get method, performs the lookup of class attributes */
1100 SWIGINTERN int SWIG_Lua_class_get(lua_State* L)
1101 {
1102 /* there should be 2 params passed in
1103 (1) userdata (not the meta table)
1104 (2) string name of the attribute
1105 */
1106 assert(lua_isuserdata(L,-2)); /* just in case */
1107 lua_getmetatable(L,-2); /* get the meta table */
1108 assert(lua_istable(L,-1)); /* just in case */
1109 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1110 assert(lua_istable(L,-1)); /* just in case */
1111 /* look for the key in the .get table */
1112 lua_pushvalue(L,2); /* key */
1113 lua_rawget(L,-2);
1114 lua_remove(L,-2); /* stack tidy, remove .get table */
1115 if (lua_iscfunction(L,-1))
1116 { /* found it so call the fn & return its value */
1117 lua_pushvalue(L,1); /* the userdata */
1118 lua_call(L,1,1); /* 1 value in (userdata),1 out (result) */
1119 lua_remove(L,-2); /* stack tidy, remove metatable */
1120 return 1;
1121 }
1122 lua_pop(L,1); /* remove whatever was there */
1123 /* ok, so try the .fn table */
1124 SWIG_Lua_get_table(L,".fn"); /* find the .get table */
1125 assert(lua_istable(L,-1)); /* just in case */
1126 lua_pushvalue(L,2); /* key */
1127 lua_rawget(L,-2); /* look for the fn */
1128 lua_remove(L,-2); /* stack tidy, remove .fn table */
1129 if (lua_isfunction(L,-1)) /* note: if its a C function or lua function */
1130 { /* found it so return the fn & let lua call it */
1131 lua_remove(L,-2); /* stack tidy, remove metatable */
1132 return 1;
1133 }
1134 lua_pop(L,1); /* remove whatever was there */
1135 /* NEW: looks for the __getitem() fn
1136 this is a user provided get fn */
1137 SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
1138 if (lua_iscfunction(L,-1)) /* if its there */
1139 { /* found it so call the fn & return its value */
1140 lua_pushvalue(L,1); /* the userdata */
1141 lua_pushvalue(L,2); /* the parameter */
1142 lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */
1143 lua_remove(L,-2); /* stack tidy, remove metatable */
1144 return 1;
1145 }
1146 return 0; /* sorry not known */
1147 }
1148
1149 /* the class.set method, performs the lookup of class attributes */
1150 SWIGINTERN int SWIG_Lua_class_set(lua_State* L)
1151 {
1152 /* there should be 3 params passed in
1153 (1) table (not the meta table)
1154 (2) string name of the attribute
1155 (3) any for the new value
1156 printf("SWIG_Lua_class_set %p(%s) '%s' %p(%s)\n",
1157 lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
1158 lua_tostring(L,2),
1159 lua_topointer(L,3),lua_typename(L,lua_type(L,3)));*/
1160
1161 assert(lua_isuserdata(L,1)); /* just in case */
1162 lua_getmetatable(L,1); /* get the meta table */
1163 assert(lua_istable(L,-1)); /* just in case */
1164
1165 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1166 if (lua_istable(L,-1))
1167 {
1168 /* look for the key in the .set table */
1169 lua_pushvalue(L,2); /* key */
1170 lua_rawget(L,-2);
1171 if (lua_iscfunction(L,-1))
1172 { /* found it so call the fn & return its value */
1173 lua_pushvalue(L,1); /* userdata */
1174 lua_pushvalue(L,3); /* value */
1175 lua_call(L,2,0);
1176 return 0;
1177 }
1178 lua_pop(L,1); /* remove the value */
1179 }
1180 lua_pop(L,1); /* remove the value .set table */
1181 /* NEW: looks for the __setitem() fn
1182 this is a user provided set fn */
1183 SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
1184 if (lua_iscfunction(L,-1)) /* if its there */
1185 { /* found it so call the fn & return its value */
1186 lua_pushvalue(L,1); /* the userdata */
1187 lua_pushvalue(L,2); /* the parameter */
1188 lua_pushvalue(L,3); /* the value */
1189 lua_call(L,3,0); /* 3 values in ,0 out */
1190 lua_remove(L,-2); /* stack tidy, remove metatable */
1191 return 1;
1192 }
1193 return 0;
1194 }
1195
1196 /* the class.destruct method called by the interpreter */
1197 SWIGINTERN int SWIG_Lua_class_destruct(lua_State* L)
1198 {
1199 /* there should be 1 params passed in
1200 (1) userdata (not the meta table) */
1201 swig_lua_userdata* usr;
1202 swig_lua_class* clss;
1203 assert(lua_isuserdata(L,-1)); /* just in case */
1204 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1205 /* if must be destroyed & has a destructor */
1206 if (usr->own) /* if must be destroyed */
1207 {
1208 clss=(swig_lua_class*)usr->type->clientdata; /* get the class */
1209 if (clss && clss->destructor) /* there is a destroy fn */
1210 {
1211 clss->destructor(usr->ptr); /* bye bye */
1212 }
1213 }
1214 return 0;
1215 }
1216
1217 /* the class.__tostring method called by the interpreter and print */
1218 SWIGINTERN int SWIG_Lua_class_tostring(lua_State* L)
1219 {
1220 /* there should be 1 param passed in
1221 (1) userdata (not the metatable) */
1222 assert(lua_isuserdata(L,1)); /* just in case */
1223 unsigned long userData = (unsigned long)lua_touserdata(L,1); /* get the userdata address for later */
1224 lua_getmetatable(L,1); /* get the meta table */
1225 assert(lua_istable(L,-1)); /* just in case */
1226
1227 lua_getfield(L, -1, ".type");
1228 const char* className = lua_tostring(L, -1);
1229
1230 char output[256];
1231 sprintf(output, "<%s userdata: %lX>", className, userData);
1232
1233 lua_pushstring(L, (const char*)output);
1234 return 1;
1235 }
1236
1237 /* to manually disown some userdata */
1238 SWIGINTERN int SWIG_Lua_class_disown(lua_State* L)
1239 {
1240 /* there should be 1 params passed in
1241 (1) userdata (not the meta table) */
1242 swig_lua_userdata* usr;
1243 assert(lua_isuserdata(L,-1)); /* just in case */
1244 usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
1245
1246 usr->own = 0; /* clear our ownership */
1247 return 0;
1248 }
1249
1250 /* gets the swig class registry (or creates it) */
1251 SWIGINTERN void SWIG_Lua_get_class_registry(lua_State* L)
1252 {
1253 /* add this all into the swig registry: */
1254 lua_pushstring(L,"SWIG");
1255 lua_rawget(L,LUA_REGISTRYINDEX); /* get the registry */
1256 if (!lua_istable(L,-1)) /* not there */
1257 { /* must be first time, so add it */
1258 lua_pop(L,1); /* remove the result */
1259 lua_pushstring(L,"SWIG");
1260 lua_newtable(L);
1261 lua_rawset(L,LUA_REGISTRYINDEX);
1262 /* then get it */
1263 lua_pushstring(L,"SWIG");
1264 lua_rawget(L,LUA_REGISTRYINDEX);
1265 }
1266 }
1267
1268 /* helper fn to get the classes metatable from the register */
1269 SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State* L,const char* cname)
1270 {
1271 SWIG_Lua_get_class_registry(L); /* get the registry */
1272 lua_pushstring(L,cname); /* get the name */
1273 lua_rawget(L,-2); /* get it */
1274 lua_remove(L,-2); /* tidy up (remove registry) */
1275 }
1276
1277 /* helper add a variable to a registered class */
1278 SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
1279 {
1280 assert(lua_istable(L,-1)); /* just in case */
1281 SWIG_Lua_get_table(L,".get"); /* find the .get table */
1282 assert(lua_istable(L,-1)); /* just in case */
1283 SWIG_Lua_add_function(L,name,getFn);
1284 lua_pop(L,1); /* tidy stack (remove table) */
1285 if (setFn)
1286 {
1287 SWIG_Lua_get_table(L,".set"); /* find the .set table */
1288 assert(lua_istable(L,-1)); /* just in case */
1289 SWIG_Lua_add_function(L,name,setFn);
1290 lua_pop(L,1); /* tidy stack (remove table) */
1291 }
1292 }
1293
1294 /* helper to recursively add class details (attributes & operations) */
1295 SWIGINTERN void SWIG_Lua_add_class_details(lua_State* L,swig_lua_class* clss)
1296 {
1297 int i;
1298 /* call all the base classes first: we can then override these later: */
1299 for(i=0;clss->bases[i];i++)
1300 {
1301 SWIG_Lua_add_class_details(L,clss->bases[i]);
1302 }
1303 /* add fns */
1304 for(i=0;clss->attributes[i].name;i++){
1305 SWIG_Lua_add_class_variable(L,clss->attributes[i].name,clss->attributes[i].getmethod,clss->attributes[i].setmethod);
1306 }
1307 /* add methods to the metatable */
1308 SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
1309 assert(lua_istable(L,-1)); /* just in case */
1310 for(i=0;clss->methods[i].name;i++){
1311 SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
1312 }
1313 lua_pop(L,1); /* tidy stack (remove table) */
1314 /* add operator overloads
1315 these look ANY method which start with "__" and assume they
1316 are operator overloads & add them to the metatable
1317 (this might mess up is someone defines a method __gc (the destructor)*/
1318 for(i=0;clss->methods[i].name;i++){
1319 if (clss->methods[i].name[0]=='_' && clss->methods[i].name[1]=='_'){
1320 SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
1321 }
1322 }
1323 }
1324
1325 /* set up the base classes pointers.
1326 Each class structure has a list of pointers to the base class structures.
1327 This function fills them.
1328 It cannot be done at compile time, as this will not work with hireachies
1329 spread over more than one swig file.
1330 Therefore it must be done at runtime, querying the SWIG type system.
1331 */
1332 SWIGINTERN void SWIG_Lua_init_base_class(lua_State* L,swig_lua_class* clss)
1333 {
1334 int i=0;
1335 swig_module_info* module=SWIG_GetModule(L);
1336 for(i=0;clss->base_names[i];i++)
1337 {
1338 if (clss->bases[i]==0) /* not found yet */
1339 {
1340 /* lookup and cache the base class */
1341 swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]);
1342 if (info) clss->bases[i] = (swig_lua_class *) info->clientdata;
1343 }
1344 }
1345 }
1346
1347 /* performs the entire class registration process */
1348 SWIGINTERN void SWIG_Lua_class_register(lua_State* L,swig_lua_class* clss)
1349 {
1350 /* add its constructor to module with the name of the class
1351 so you can do MyClass(...) as well as new_MyClass(...)
1352 BUT only if a constructor is defined
1353 (this overcomes the problem of pure virtual classes without constructors)*/
1354 if (clss->constructor)
1355 SWIG_Lua_add_function(L,clss->name,clss->constructor);
1356
1357 SWIG_Lua_get_class_registry(L); /* get the registry */
1358 lua_pushstring(L,clss->name); /* get the name */
1359 lua_newtable(L); /* create the metatable */
1360 /* add string of class name called ".type" */
1361 lua_pushstring(L,".type");
1362 lua_pushstring(L,clss->name);
1363 lua_rawset(L,-3);
1364 /* add a table called ".get" */
1365 lua_pushstring(L,".get");
1366 lua_newtable(L);
1367 lua_rawset(L,-3);
1368 /* add a table called ".set" */
1369 lua_pushstring(L,".set");
1370 lua_newtable(L);
1371 lua_rawset(L,-3);
1372 /* add a table called ".fn" */
1373 lua_pushstring(L,".fn");
1374 lua_newtable(L);
1375 /* add manual disown method */
1376 SWIG_Lua_add_function(L,"__disown",SWIG_Lua_class_disown);
1377 lua_rawset(L,-3);
1378 /* add accessor fns for using the .get,.set&.fn */
1379 SWIG_Lua_add_function(L,"__index",SWIG_Lua_class_get);
1380 SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_class_set);
1381 SWIG_Lua_add_function(L,"__gc",SWIG_Lua_class_destruct);
1382 /* add tostring method for better output */
1383 SWIG_Lua_add_function(L,"__tostring",SWIG_Lua_class_tostring);
1384 /* add it */
1385 lua_rawset(L,-3); /* metatable into registry */
1386 lua_pop(L,1); /* tidy stack (remove registry) */
1387
1388 SWIG_Lua_get_class_metatable(L,clss->name);
1389 SWIG_Lua_add_class_details(L,clss); /* recursive adding of details (atts & ops) */
1390 lua_pop(L,1); /* tidy stack (remove class metatable) */
1391 }
1392
1393 /* -----------------------------------------------------------------------------
1394 * Class/structure conversion fns
1395 * ----------------------------------------------------------------------------- */
1396
1397 /* helper to add metatable to new lua object */
1398 SWIGINTERN void _SWIG_Lua_AddMetatable(lua_State* L,swig_type_info *type)
1399 {
1400 if (type->clientdata) /* there is clientdata: so add the metatable */
1401 {
1402 SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->name);
1403 if (lua_istable(L,-1))
1404 {
1405 lua_setmetatable(L,-2);
1406 }
1407 else
1408 {
1409 lua_pop(L,1);
1410 }
1411 }
1412 }
1413
1414 /* pushes a new object into the lua stack */
1415 SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State* L,void* ptr,swig_type_info *type, int own)
1416 {
1417 swig_lua_userdata* usr;
1418 if (!ptr){
1419 lua_pushnil(L);
1420 return;
1421 }
1422 usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata)); /* get data */
1423 usr->ptr=ptr; /* set the ptr */
1424 usr->type=type;
1425 usr->own=own;
1426 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
1427 _SWIG_Lua_AddMetatable(L,type); /* add metatable */
1428 #endif
1429 }
1430
1431 /* takes a object from the lua stack & converts it into an object of the correct type
1432 (if possible) */
1433 SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State* L,int index,void** ptr,swig_type_info *type,int flags)
1434 {
1435 swig_lua_userdata* usr;
1436 swig_cast_info *cast;
1437 if (lua_isnil(L,index)){*ptr=0; return SWIG_OK;} /* special case: lua nil => NULL pointer */
1438 usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */
1439 if (usr)
1440 {
1441 if (flags & SWIG_POINTER_DISOWN) /* must disown the object */
1442 {
1443 usr->own=0;
1444 }
1445 if (!type) /* special cast void*, no casting fn */
1446 {
1447 *ptr=usr->ptr;
1448 return SWIG_OK; /* ok */
1449 }
1450 cast=SWIG_TypeCheckStruct(usr->type,type); /* performs normal type checking */
1451 if (cast)
1452 {
1453 int newmemory = 0;
1454 *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory);
1455 assert(!newmemory); /* newmemory handling not yet implemented */
1456 return SWIG_OK; /* ok */
1457 }
1458 }
1459 return SWIG_ERROR; /* error */
1460 }
1461
1462 SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State* L,int index,swig_type_info *type,int flags,
1463 int argnum,const char* func_name){
1464 void* result;
1465 if (!SWIG_IsOK(SWIG_ConvertPtr(L,index,&result,type,flags))){
1466 lua_pushfstring(L,"Error in %s, expected a %s at argument number %d\n",
1467 func_name,(type && type->str)?type->str:"void*",argnum);
1468 lua_error(L);
1469 }
1470 return result;
1471 }
1472
1473 /* pushes a packed userdata. user for member fn pointers only */
1474 SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State* L,void* ptr,size_t size,swig_type_info *type)
1475 {
1476 swig_lua_rawdata* raw;
1477 assert(ptr); /* not acceptable to pass in a NULL value */
1478 raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size); /* alloc data */
1479 raw->type=type;
1480 raw->own=0;
1481 memcpy(raw->data,ptr,size); /* copy the data */
1482 _SWIG_Lua_AddMetatable(L,type); /* add metatable */
1483 }
1484
1485 /* converts a packed userdata. user for member fn pointers only */
1486 SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State* L,int index,void* ptr,size_t size,swig_type_info *type)
1487 {
1488 swig_lua_rawdata* raw;
1489 raw=(swig_lua_rawdata*)lua_touserdata(L,index); /* get data */
1490 if (!raw) return SWIG_ERROR; /* error */
1491 if (type==0 || type==raw->type) /* void* or identical type */
1492 {
1493 memcpy(ptr,raw->data,size); /* copy it */
1494 return SWIG_OK; /* ok */
1495 }
1496 return SWIG_ERROR; /* error */
1497 }
1498
1499 /* a function to get the typestring of a piece of data */
1500 SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp)
1501 {
1502 swig_lua_userdata* usr;
1503 if (lua_isuserdata(L,tp))
1504 {
1505 usr=(swig_lua_userdata*)lua_touserdata(L,tp); /* get data */
1506 if (usr && usr->type && usr->type->str)
1507 return usr->type->str;
1508 return "userdata (unknown type)";
1509 }
1510 return lua_typename(L,lua_type(L,tp));
1511 }
1512
1513 /* lua callable function to get the userdata's type */
1514 SWIGRUNTIME int SWIG_Lua_type(lua_State* L)
1515 {
1516 lua_pushstring(L,SWIG_Lua_typename(L,1));
1517 return 1;
1518 }
1519
1520 /* lua callable function to compare userdata's value
1521 the issue is that two userdata may point to the same thing
1522 but to lua, they are different objects */
1523 SWIGRUNTIME int SWIG_Lua_equal(lua_State* L)
1524 {
1525 int result;
1526 swig_lua_userdata *usr1,*usr2;
1527 if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2)) /* just in case */
1528 return 0; /* nil reply */
1529 usr1=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
1530 usr2=(swig_lua_userdata*)lua_touserdata(L,2); /* get data */
1531 /*result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type); only works if type is the same*/
1532 result=(usr1->ptr==usr2->ptr);
1533 lua_pushboolean(L,result);
1534 return 1;
1535 }
1536
1537 /* -----------------------------------------------------------------------------
1538 * global variable support code: class/struct typemap functions
1539 * ----------------------------------------------------------------------------- */
1540
1541 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
1542 /* Install Constants */
1543 SWIGINTERN void
1544 SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]) {
1545 int i;
1546 for (i = 0; constants[i].type; i++) {
1547 switch(constants[i].type) {
1548 case SWIG_LUA_INT:
1549 lua_pushstring(L,constants[i].name);
1550 lua_pushnumber(L,(lua_Number)constants[i].lvalue);
1551 lua_rawset(L,-3);
1552 break;
1553 case SWIG_LUA_FLOAT:
1554 lua_pushstring(L,constants[i].name);
1555 lua_pushnumber(L,(lua_Number)constants[i].dvalue);
1556 lua_rawset(L,-3);
1557 break;
1558 case SWIG_LUA_CHAR:
1559 lua_pushstring(L,constants[i].name);
1560 lua_pushfstring(L,"%c",(char)constants[i].lvalue);
1561 lua_rawset(L,-3);
1562 break;
1563 case SWIG_LUA_STRING:
1564 lua_pushstring(L,constants[i].name);
1565 lua_pushstring(L,(char *) constants[i].pvalue);
1566 lua_rawset(L,-3);
1567 break;
1568 case SWIG_LUA_POINTER:
1569 lua_pushstring(L,constants[i].name);
1570 SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
1571 lua_rawset(L,-3);
1572 break;
1573 case SWIG_LUA_BINARY:
1574 lua_pushstring(L,constants[i].name);
1575 SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype);
1576 lua_rawset(L,-3);
1577 break;
1578 default:
1579 break;
1580 }
1581 }
1582 }
1583 #endif
1584
1585 /* -----------------------------------------------------------------------------
1586 * executing lua code from within the wrapper
1587 * ----------------------------------------------------------------------------- */
1588
1589 #ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */
1590 #define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S)
1591 #endif
1592 /* Executes a C string in Lua a really simple way of calling lua from C
1593 Unfortunately lua keeps changing its API's, so we need a conditional compile
1594 In lua 5.0.X its lua_dostring()
1595 In lua 5.1.X its luaL_dostring()
1596 */
1597 SWIGINTERN int
1598 SWIG_Lua_dostring(lua_State *L, const char* str) {
1599 int ok,top;
1600 if (str==0 || str[0]==0) return 0; /* nothing to do */
1601 top=lua_gettop(L); /* save stack */
1602 #if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501))
1603 ok=luaL_dostring(L,str); /* looks like this is lua 5.1.X or later, good */
1604 #else
1605 ok=lua_dostring(L,str); /* might be lua 5.0.x, using lua_dostring */
1606 #endif
1607 if (ok!=0) {
1608 SWIG_DOSTRING_FAIL(lua_tostring(L,-1));
1609 }
1610 lua_settop(L,top); /* restore the stack */
1611 return ok;
1612 }
1613
1614 #ifdef __cplusplus
1615 }
1616 #endif
1617
1618 /* ------------------------------ end luarun.swg ------------------------------ */
1619
1620
1621 /* -------- TYPES TABLE (BEGIN) -------- */
1622
1623 #define SWIGTYPE_p_PLGraphicsIn swig_types[0]
1624 #define SWIGTYPE_p_char swig_types[1]
1625 #define SWIGTYPE_p_double swig_types[2]
1626 #define SWIGTYPE_p_f_double_double__int swig_types[3]
1627 #define SWIGTYPE_p_f_double_double_p_double_p_double_p_void__void swig_types[4]
1628 #define SWIGTYPE_p_f_int_double_p_char_int_p_void__void swig_types[5]
1629 #define SWIGTYPE_p_f_int_p_double_p_double__void swig_types[6]
1630 #define SWIGTYPE_p_f_int_p_q_const__double_p_q_const__double__void swig_types[7]
1631 #define SWIGTYPE_p_int swig_types[8]
1632 #define SWIGTYPE_p_p_char swig_types[9]
1633 #define SWIGTYPE_p_p_double swig_types[10]
1634 #define SWIGTYPE_p_unsigned_int swig_types[11]
1635 static swig_type_info *swig_types[13];
1636 static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
1637 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1638 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1639
1640 /* -------- TYPES TABLE (END) -------- */
1641
1642 #define SWIG_name "plplotluac"
1643 #define SWIG_init luaopen_plplotluac
1644 #define SWIG_init_user luaopen_plplotluac_user
1645
1646 #define SWIG_LUACODE luaopen_plplotluac_luacode
1647
1648 #include "plplotP.h"
1649
1650
1651 #define LUA_ALLOC_ARRAY( TYPE, LEN ) (TYPE *) malloc( LEN * sizeof ( TYPE ) )
1652 #define LUA_FREE_ARRAY( PTR ) if ( PTR ) { free( PTR ); PTR = NULL;}
1653
1654 // super macro to declare array typemap helper fns
1655 SWIGINTERN int SWIG_itable_size( lua_State* L, int index );
1656 #define LUA_DECLARE_TYPEMAP_ARR_FN( NAME, TYPE ) \
1657 SWIGINTERN int LUA_read_ ## NAME ## _num_array( lua_State * L, int index, TYPE * array, int size ){ \
1658 int i; \
1659 for ( i = 0; i < size; i++ ) { \
1660 lua_rawgeti( L, index, i + 1 ); \
1661 if ( lua_isnumber( L, -1 ) ) { \
1662 array[i] = (TYPE) lua_tonumber( L, -1 ); \
1663 } else { \
1664 lua_pop( L, 1 ); \
1665 return 0; \
1666 } \
1667 lua_pop( L, 1 ); \
1668 } \
1669 return 1; \
1670 } \
1671 SWIGINTERN TYPE* LUA_get_ ## NAME ## _num_array_var( lua_State * L, int index, int* size ) \
1672 { \
1673 TYPE *array; \
1674 if ( !lua_istable( L, index ) ) { \
1675 lua_pushstring( L, "expected a table" ); \
1676 return 0; \
1677 } \
1678 *size = SWIG_itable_size( L, index ); \
1679 if ( *size < 1 ) { \
1680 array = LUA_ALLOC_ARRAY( TYPE, 1 ); \
1681 array[0] = (TYPE) 0; \
1682 return array; \
1683 } \
1684 array = LUA_ALLOC_ARRAY( TYPE, *size ); \
1685 if ( !LUA_read_ ## NAME ## _num_array( L, index, array, *size ) ) { \
1686 lua_pushstring( L, "table must contain numbers" ); \
1687 LUA_FREE_ARRAY( array ); \
1688 return 0; \
1689 } \
1690 return array; \
1691 }
1692
1693 LUA_DECLARE_TYPEMAP_ARR_FN( double, double );
1694 LUA_DECLARE_TYPEMAP_ARR_FN( int, int );
1695
1696
1697 static PLINT Alen = 0;
1698 static PLINT Xlen = 0, Ylen = 0;
1699
1700
1701 #ifdef __cplusplus /* generic alloc/dealloc fns*/
1702 #define SWIG_ALLOC_ARRAY(TYPE,LEN) new TYPE[LEN]
1703 #define SWIG_FREE_ARRAY(PTR) delete[] PTR
1704 #else
1705 #define SWIG_ALLOC_ARRAY(TYPE,LEN) (TYPE *)malloc(LEN*sizeof(TYPE))
1706 #define SWIG_FREE_ARRAY(PTR) free(PTR)
1707 #endif
1708 /* counting the size of arrays:*/
1709 SWIGINTERN int SWIG_itable_size(lua_State* L, int index)
1710 {
1711 int n=0;
1712 while(1){
1713 lua_rawgeti(L,index,n+1);
1714 if (lua_isnil(L,-1))break;
1715 ++n;
1716 lua_pop(L,1);
1717 }
1718 lua_pop(L,1);
1719 return n;
1720 }
1721
1722 SWIGINTERN int SWIG_table_size(lua_State* L, int index)
1723 {
1724 int n=0;
1725 lua_pushnil(L); /* first key*/
1726 while (lua_next(L, index) != 0) {
1727 ++n;
1728 lua_pop(L, 1); /* removes `value'; keeps `key' for next iteration*/
1729 }
1730 return n;
1731 }
1732
1733 /* super macro to declare array typemap helper fns */
1734 #define SWIG_DECLARE_TYPEMAP_ARR_FN(NAME,TYPE)\
1735 SWIGINTERN int SWIG_read_##NAME##_num_array(lua_State* L,int index,TYPE *array,int size){\
1736 int i;\
1737 for (i = 0; i < size; i++) {\
1738 lua_rawgeti(L,index,i+1);\
1739 if (lua_isnumber(L,-1)){\
1740 array[i] = (TYPE)lua_tonumber(L,-1);\
1741 } else {\
1742 lua_pop(L,1);\
1743 return 0;\
1744 }\
1745 lua_pop(L,1);\
1746 }\
1747 return 1;\
1748 }\
1749 SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_fixed(lua_State* L, int index, int size){\
1750 TYPE *array;\
1751 if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {\
1752 lua_pushfstring(L,"expected a table of size %d",size);\
1753 return 0;\
1754 }\
1755 array=SWIG_ALLOC_ARRAY(TYPE,size);\
1756 if (!SWIG_read_##NAME##_num_array(L,index,array,size)){\
1757 lua_pushstring(L,"table must contain numbers");\
1758 SWIG_FREE_ARRAY(array);\
1759 return 0;\
1760 }\
1761 return array;\
1762 }\
1763 SWIGINTERN TYPE* SWIG_get_##NAME##_num_array_var(lua_State* L, int index, int* size)\
1764 {\
1765 TYPE *array;\
1766 if (!lua_istable(L,index)) {\
1767 lua_pushstring(L,"expected a table");\
1768 return 0;\
1769 }\
1770 *size=SWIG_itable_size(L,index);\
1771 if (*size<1){\
1772 lua_pushstring(L,"table appears to be empty");\
1773 return 0;\
1774 }\
1775 array=SWIG_ALLOC_ARRAY(TYPE,*size);\
1776 if (!SWIG_read_##NAME##_num_array(L,index,array,*size)){\
1777 lua_pushstring(L,"table must contain numbers");\
1778 SWIG_FREE_ARRAY(array);\
1779 return 0;\
1780 }\
1781 return array;\
1782 }\
1783 SWIGINTERN void SWIG_write_##NAME##_num_array(lua_State* L,TYPE *array,int size){\
1784 int i;\
1785 lua_newtable(L);\
1786 for (i = 0; i < size; i++){\
1787 lua_pushnumber(L,(lua_Number)array[i]);\
1788 lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/ \
1789 }\
1790 }
1791
1792 SWIG_DECLARE_TYPEMAP_ARR_FN(schar,signed char);
1793 SWIG_DECLARE_TYPEMAP_ARR_FN(uchar,unsigned char);
1794 SWIG_DECLARE_TYPEMAP_ARR_FN(int,int);
1795 SWIG_DECLARE_TYPEMAP_ARR_FN(uint,unsigned int);
1796 SWIG_DECLARE_TYPEMAP_ARR_FN(short,short);
1797 SWIG_DECLARE_TYPEMAP_ARR_FN(ushort,unsigned short);
1798 SWIG_DECLARE_TYPEMAP_ARR_FN(long,long);
1799 SWIG_DECLARE_TYPEMAP_ARR_FN(ulong,unsigned long);
1800 SWIG_DECLARE_TYPEMAP_ARR_FN(float,float);
1801 SWIG_DECLARE_TYPEMAP_ARR_FN(double,double);
1802
1803 SWIGINTERN int SWIG_read_ptr_array(lua_State* L,int index,void **array,int size,swig_type_info *type){
1804 int i;
1805 for (i = 0; i < size; i++) {
1806 lua_rawgeti(L,index,i+1);
1807 if (!lua_isuserdata(L,-1) || SWIG_ConvertPtr(L,-1,&array[i],type,0)==-1){
1808 lua_pop(L,1);
1809 return 0;
1810 }
1811 lua_pop(L,1);
1812 }
1813 return 1;
1814 }
1815 SWIGINTERN void** SWIG_get_ptr_array_fixed(lua_State* L, int index, int size,swig_type_info *type){
1816 void **array;
1817 if (!lua_istable(L,index) || SWIG_itable_size(L,index) != size) {
1818 lua_pushfstring(L,"expected a table of size %d",size);
1819 return 0;
1820 }
1821 array=SWIG_ALLOC_ARRAY(void*,size);
1822 if (!SWIG_read_ptr_array(L,index,array,size,type)){
1823 lua_pushfstring(L,"table must contain pointers of type %s",type->name);
1824 SWIG_FREE_ARRAY(array);
1825 return 0;
1826 }
1827 return array;
1828 }
1829 SWIGINTERN void** SWIG_get_ptr_array_var(lua_State* L, int index, int* size,swig_type_info *type){
1830 void **array;
1831 if (!lua_istable(L,index)) {
1832 lua_pushstring(L,"expected a table");
1833 return 0;
1834 }
1835 *size=SWIG_itable_size(L,index);
1836 if (*size<1){
1837 lua_pushstring(L,"table appears to be empty");
1838 return 0;
1839 }
1840 array=SWIG_ALLOC_ARRAY(void*,*size);
1841 if (!SWIG_read_ptr_array(L,index,array,*size,type)){
1842 lua_pushfstring(L,"table must contain pointers of type %s",type->name);
1843 SWIG_FREE_ARRAY(array);
1844 return 0;
1845 }
1846 return array;
1847 }
1848 SWIGINTERN void SWIG_write_ptr_array(lua_State* L,void **array,int size,swig_type_info *type,int own){
1849 int i;
1850 lua_newtable(L);
1851 for (i = 0; i < size; i++){
1852 SWIG_NewPointerObj(L,array[i],type,own);
1853 lua_rawseti(L,-2,i+1);/* -1 is the number, -2 is the table*/
1854 }
1855 }
1856
1857
1858 PLFLT** read_double_Matrix( lua_State* L, int index, int* nx, int *ny );
1859
1860 PLFLT** read_double_Matrix( lua_State* L, int index, int* nx, int *ny )
1861 {
1862 int i, j;
1863 PLFLT** matrix;
1864
1865 *nx = 0;
1866 *ny = 0;
1867
1868 if ( !lua_istable( L, index ) )
1869 {
1870 lua_pushstring( L, "expected a table" );
1871 return NULL;
1872 }
1873 *nx = SWIG_itable_size( L, index );
1874 if ( *nx < 1 )
1875 {
1876 lua_pushstring( L, "table appears to be empty" );
1877 return NULL;
1878 }
1879 matrix = LUA_ALLOC_ARRAY( PLFLT *, *nx );
1880 for ( i = 0; i < *nx; i++ )
1881 matrix[i] = NULL;
1882
1883 lua_rawgeti( L, index, 1 );
1884 if ( !lua_istable( L, -1 ) )
1885 {
1886 lua_pop( L, 1 );
1887 lua_pushstring( L, "expected a table" );
1888 LUA_FREE_ARRAY( matrix );
1889 return NULL;
1890 }
1891 *ny = SWIG_itable_size( L, -1 );
1892 if ( *ny < 1 )
1893 {
1894 lua_pushstring( L, "table appears to be empty" );
1895 LUA_FREE_ARRAY( matrix );
1896 return NULL;
1897 }
1898 lua_pop( L, 1 );
1899
1900 for ( i = 0; i < *nx; i++ )
1901 {
1902 lua_rawgeti( L, index, i + 1 );
1903 if ( !lua_istable( L, -1 ) )
1904 {
1905 lua_pop( L, 1 );
1906 lua_pushstring( L, "expected a table" );
1907 for ( j = 0; j < *ny; j++ )
1908 LUA_FREE_ARRAY( matrix[j] );
1909 LUA_FREE_ARRAY( matrix );
1910 return NULL;
1911 }
1912 if ( *ny != SWIG_itable_size( L, -1 ) )
1913 {
1914 lua_pop( L, 1 );
1915 lua_pushstring( L, "inconsistent table sizes" );
1916 for ( j = 0; j < i; j++ )
1917 LUA_FREE_ARRAY( matrix[j] );
1918 LUA_FREE_ARRAY( matrix );
1919 return NULL;
1920 }
1921 matrix[i] = LUA_ALLOC_ARRAY( PLFLT, *ny );
1922 for ( j = 0; j < *ny; j++ )
1923 {
1924 lua_rawgeti( L, -1, j + 1 );
1925 if ( lua_isnumber( L, -1 ) )
1926 {
1927 matrix[i][j] = (PLFLT) lua_tonumber( L, -1 );
1928 }
1929 else
1930 {
1931 lua_pop( L, 1 );
1932 lua_pushstring( L, "table must contain numbers" );
1933 for ( j = 0; j < i + 1; j++ )
1934 LUA_FREE_ARRAY( matrix[j] );
1935 LUA_FREE_ARRAY( matrix );
1936 return NULL;
1937 }
1938 lua_pop( L, 1 );
1939 }
1940 lua_pop( L, 1 );
1941 }
1942
1943 return matrix;
1944 }
1945
1946
1947 void mapform( PLINT n, PLFLT* x, PLFLT* y );
1948
1949 static lua_State* myL = NULL;
1950 static char mapform_funcstr[255];
1951
1952 void mapform( PLINT n, PLFLT* x, PLFLT* y )
1953 {
1954 PLFLT *xtemp, *ytemp;
1955 int len, i;
1956
1957 // check Lua state
1958 if ( myL == NULL )
1959 {
1960 fprintf( stderr, "Lua state is not set!" );
1961 return;
1962 }
1963
1964 // push functions and arguments
1965 lua_getglobal( myL, mapform_funcstr ); // function to be called
1966 lua_pushnumber( myL, n ); // push 1st argument
1967 SWIG_write_double_num_array( myL, x, n ); // push 2nd argument
1968 SWIG_write_double_num_array( myL, y, n ); // push 3rd argument
1969
1970 // do the call (3 arguments, 2 result)
1971 if ( lua_pcall( myL, 3, 2, 0 ) != 0 )
1972 fprintf( stderr, "error running function `%s':%s",
1973 mapform_funcstr, lua_tostring( myL, -1 ) );
1974
1975 // retrieve results
1976 if ( !lua_istable( myL, -2 ) )
1977 {
1978 fprintf( stderr, "function `%s' must return a table as 1st result", mapform_funcstr );
1979 return;
1980 }
1981 if ( !lua_istable( myL, -1 ) )
1982 {
1983 fprintf( stderr, "function `%s' must return a table as 2nd result", mapform_funcstr );
1984 return;
1985 }
1986 xtemp = (PLFLT *) LUA_get_double_num_array_var( myL, -2, &len );
1987 if ( !xtemp || len != n )
1988 {
1989 fprintf( stderr, "function `%s' must return a table of length%d", mapform_funcstr, n );
1990 return;
1991 }
1992 for ( i = 0; i < n; i++ )
1993 x[i] = xtemp[i];
1994 LUA_FREE_ARRAY( xtemp );
1995
1996 ytemp = (PLFLT *) LUA_get_double_num_array_var( myL, -1, &len );
1997 if ( !ytemp || len != n )
1998 {
1999 fprintf( stderr, "function `%s' must return a table of length%d", mapform_funcstr, n );
2000 return;
2001 }
2002 for ( i = 0; i < n; i++ )
2003 y[i] = ytemp[i];
2004 LUA_FREE_ARRAY( ytemp );
2005
2006 lua_pop( myL, 2 ); // pop returned values
2007
2008 return;
2009 }
2010
2011
2012 typedef PLINT ( *defined_func )( PLFLT, PLFLT );
2013 typedef void ( *fill_func )( PLINT, const PLFLT*, const PLFLT* );
2014 typedef void ( *pltr_func )( PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer );
2015 typedef void ( *ct_func )( PLFLT, PLFLT, PLFLT *, PLFLT*, PLPointer );
2016 typedef void ( *mapform_func )( PLINT, PLFLT *, PLFLT* );
2017 typedef PLFLT ( *f2eval_func )( PLINT, PLINT, PLPointer );
2018 typedef void ( *label_func )( PLINT, PLFLT, char*, PLINT, PLPointer );
2019
2020 // Function prototypes
2021 void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * pltr_data );
2022 void myct( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * pltr_data );
2023 void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer data );
2024
2025 static char mypltr_funcstr[255];
2026
2027 // This is the callback that gets handed to the C code.
2028 // It, in turn, calls the Lua callback
2029 void mypltr( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * PL_UNUSED( pltr_data ) )
2030 {
2031 *tx = 0;
2032 *ty = 0;
2033
2034 // check Lua state
2035 if ( myL == NULL )
2036 {
2037 fprintf( stderr, "Lua state is not set!" );
2038 return;
2039 }
2040
2041 // push functions and arguments
2042 lua_getglobal( myL, mypltr_funcstr ); // function to be called
2043 lua_pushnumber( myL, x ); // push 1st argument
2044 lua_pushnumber( myL, y ); // push 2nd argument
2045
2046 // do the call (2 arguments, 2 result)
2047 if ( lua_pcall( myL, 2, 2, 0 ) != 0 )
2048 fprintf( stderr, "error running function `%s':%s",
2049 mypltr_funcstr, lua_tostring( myL, -1 ) );
2050
2051 // retrieve results
2052 if ( !lua_isnumber( myL, -2 ) )
2053 {
2054 fprintf( stderr, "function `%s' must return a number as 1st result", mypltr_funcstr );
2055 return;
2056 }
2057 if ( !lua_isnumber( myL, -1 ) )
2058 {
2059 fprintf( stderr, "function `%s' must return a number as 2nd result", mypltr_funcstr );
2060 return;
2061 }
2062 *tx = lua_tonumber( myL, -2 );
2063 *ty = lua_tonumber( myL, -1 );
2064 lua_pop( myL, 2 ); // pop returned values
2065
2066 return;
2067 }
2068
2069 static char myct_funcstr[255];
2070
2071 // This is the callback that gets handed to the C code.
2072 // It, in turn, calls the Lua callback
2073 void myct( PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, void * PL_UNUSED( pltr_data ) )
2074 {
2075 *tx = 0;
2076 *ty = 0;
2077
2078 // check Lua state
2079 if ( myL == NULL )
2080 {
2081 fprintf( stderr, "Lua state is not set!" );
2082 return;
2083 }
2084
2085 // push functions and arguments
2086 lua_getglobal( myL, myct_funcstr ); // function to be called
2087 lua_pushnumber( myL, x ); // push 1st argument
2088 lua_pushnumber( myL, y ); // push 2nd argument
2089
2090 // do the call (2 arguments, 2 result)
2091 if ( lua_pcall( myL, 2, 2, 0 ) != 0 )
2092 fprintf( stderr, "error running function `%s':%s",
2093 myct_funcstr, lua_tostring( myL, -1 ) );
2094
2095 // retrieve results
2096 if ( !lua_isnumber( myL, -2 ) )
2097 {
2098 fprintf( stderr, "function `%s' must return a number as 1st result", myct_funcstr );
2099 return;
2100 }
2101 if ( !lua_isnumber( myL, -1 ) )
2102 {
2103 fprintf( stderr, "function `%s' must return a number as 2nd result", myct_funcstr );
2104 return;
2105 }
2106 *tx = lua_tonumber( myL, -2 );
2107 *ty = lua_tonumber( myL, -1 );
2108 lua_pop( myL, 2 ); // pop returned values
2109
2110 return;
2111 }
2112
2113 static char mylabel_funcstr[255];
2114
2115 void mylabel( PLINT axis, PLFLT value, char* label, PLINT length, PLPointer PL_UNUSED( data ) )
2116 {
2117 // check Lua state
2118 if ( myL == NULL )
2119 {
2120 fprintf( stderr, "Lua state is not set!" );
2121 return;
2122 }
2123
2124 // push functions and arguments
2125 lua_getglobal( myL, mylabel_funcstr ); // function to be called
2126 lua_pushnumber( myL, axis ); // push 1st argument
2127 lua_pushnumber( myL, value ); // push 1st argument
2128
2129 // do the call (2 arguments, 1 result)
2130 if ( lua_pcall( myL, 2, 1, 0 ) != 0 )
2131 fprintf( stderr, "error running function `%s':%s",
2132 mylabel_funcstr, lua_tostring( myL, -1 ) );
2133
2134 // retrieve results
2135 if ( !lua_isstring( myL, -1 ) )
2136 {
2137 fprintf( stderr, "function `%s' must return a string as result", mylabel_funcstr );
2138 return;
2139 }
2140 strncpy( label, lua_tostring( myL, -1 ), length );
2141
2142 lua_pop( myL, 1 ); // pop returned values
2143
2144 return;
2145 }
2146
2147
2148 SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
2149 int ret = lua_isstring(L, idx);
2150 if (!ret)
2151 ret = lua_isnil(L, idx);
2152 return ret;
2153 }
2154
2155 #ifdef __cplusplus
2156 extern "C" {
2157 #endif
2158 static int _wrap_PLGraphicsIn_type_set(lua_State* L) {
2159 int SWIG_arg = 0;
2160 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2161 int arg2 ;
2162
2163 SWIG_check_num_args("PLGraphicsIn::type",2,2)
2164 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::type",1,"PLGraphicsIn *");
2165 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::type",2,"int");
2166
2167 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2168 SWIG_fail_ptr("PLGraphicsIn_type_set",1,SWIGTYPE_p_PLGraphicsIn);
2169 }
2170
2171 arg2 = (int)lua_tonumber(L, 2);
2172 if (arg1) (arg1)->type = arg2;
2173
2174 return SWIG_arg;
2175
2176 if(0) SWIG_fail;
2177
2178 fail:
2179 lua_error(L);
2180 return SWIG_arg;
2181 }
2182
2183
2184 static int _wrap_PLGraphicsIn_type_get(lua_State* L) {
2185 int SWIG_arg = 0;
2186 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2187 int result;
2188
2189 SWIG_check_num_args("PLGraphicsIn::type",1,1)
2190 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::type",1,"PLGraphicsIn *");
2191
2192 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2193 SWIG_fail_ptr("PLGraphicsIn_type_get",1,SWIGTYPE_p_PLGraphicsIn);
2194 }
2195
2196 result = (int) ((arg1)->type);
2197 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2198 return SWIG_arg;
2199
2200 if(0) SWIG_fail;
2201
2202 fail:
2203 lua_error(L);
2204 return SWIG_arg;
2205 }
2206
2207
2208 static int _wrap_PLGraphicsIn_state_set(lua_State* L) {
2209 int SWIG_arg = 0;
2210 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2211 unsigned int arg2 ;
2212
2213 SWIG_check_num_args("PLGraphicsIn::state",2,2)
2214 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::state",1,"PLGraphicsIn *");
2215 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::state",2,"unsigned int");
2216
2217 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2218 SWIG_fail_ptr("PLGraphicsIn_state_set",1,SWIGTYPE_p_PLGraphicsIn);
2219 }
2220
2221 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
2222 arg2 = (unsigned int)lua_tonumber(L, 2);
2223 if (arg1) (arg1)->state = arg2;
2224
2225 return SWIG_arg;
2226
2227 if(0) SWIG_fail;
2228
2229 fail:
2230 lua_error(L);
2231 return SWIG_arg;
2232 }
2233
2234
2235 static int _wrap_PLGraphicsIn_state_get(lua_State* L) {
2236 int SWIG_arg = 0;
2237 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2238 unsigned int result;
2239
2240 SWIG_check_num_args("PLGraphicsIn::state",1,1)
2241 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::state",1,"PLGraphicsIn *");
2242
2243 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2244 SWIG_fail_ptr("PLGraphicsIn_state_get",1,SWIGTYPE_p_PLGraphicsIn);
2245 }
2246
2247 result = (unsigned int) ((arg1)->state);
2248 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2249 return SWIG_arg;
2250
2251 if(0) SWIG_fail;
2252
2253 fail:
2254 lua_error(L);
2255 return SWIG_arg;
2256 }
2257
2258
2259 static int _wrap_PLGraphicsIn_keysym_set(lua_State* L) {
2260 int SWIG_arg = 0;
2261 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2262 unsigned int arg2 ;
2263
2264 SWIG_check_num_args("PLGraphicsIn::keysym",2,2)
2265 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::keysym",1,"PLGraphicsIn *");
2266 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::keysym",2,"unsigned int");
2267
2268 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2269 SWIG_fail_ptr("PLGraphicsIn_keysym_set",1,SWIGTYPE_p_PLGraphicsIn);
2270 }
2271
2272 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
2273 arg2 = (unsigned int)lua_tonumber(L, 2);
2274 if (arg1) (arg1)->keysym = arg2;
2275
2276 return SWIG_arg;
2277
2278 if(0) SWIG_fail;
2279
2280 fail:
2281 lua_error(L);
2282 return SWIG_arg;
2283 }
2284
2285
2286 static int _wrap_PLGraphicsIn_keysym_get(lua_State* L) {
2287 int SWIG_arg = 0;
2288 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2289 unsigned int result;
2290
2291 SWIG_check_num_args("PLGraphicsIn::keysym",1,1)
2292 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::keysym",1,"PLGraphicsIn *");
2293
2294 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2295 SWIG_fail_ptr("PLGraphicsIn_keysym_get",1,SWIGTYPE_p_PLGraphicsIn);
2296 }
2297
2298 result = (unsigned int) ((arg1)->keysym);
2299 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2300 return SWIG_arg;
2301
2302 if(0) SWIG_fail;
2303
2304 fail:
2305 lua_error(L);
2306 return SWIG_arg;
2307 }
2308
2309
2310 static int _wrap_PLGraphicsIn_button_set(lua_State* L) {
2311 int SWIG_arg = 0;
2312 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2313 unsigned int arg2 ;
2314
2315 SWIG_check_num_args("PLGraphicsIn::button",2,2)
2316 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::button",1,"PLGraphicsIn *");
2317 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::button",2,"unsigned int");
2318
2319 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2320 SWIG_fail_ptr("PLGraphicsIn_button_set",1,SWIGTYPE_p_PLGraphicsIn);
2321 }
2322
2323 SWIG_contract_assert((lua_tonumber(L,2)>=0),"number must not be negative")
2324 arg2 = (unsigned int)lua_tonumber(L, 2);
2325 if (arg1) (arg1)->button = arg2;
2326
2327 return SWIG_arg;
2328
2329 if(0) SWIG_fail;
2330
2331 fail:
2332 lua_error(L);
2333 return SWIG_arg;
2334 }
2335
2336
2337 static int _wrap_PLGraphicsIn_button_get(lua_State* L) {
2338 int SWIG_arg = 0;
2339 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2340 unsigned int result;
2341
2342 SWIG_check_num_args("PLGraphicsIn::button",1,1)
2343 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::button",1,"PLGraphicsIn *");
2344
2345 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2346 SWIG_fail_ptr("PLGraphicsIn_button_get",1,SWIGTYPE_p_PLGraphicsIn);
2347 }
2348
2349 result = (unsigned int) ((arg1)->button);
2350 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2351 return SWIG_arg;
2352
2353 if(0) SWIG_fail;
2354
2355 fail:
2356 lua_error(L);
2357 return SWIG_arg;
2358 }
2359
2360
2361 static int _wrap_PLGraphicsIn_subwindow_set(lua_State* L) {
2362 int SWIG_arg = 0;
2363 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2364 PLINT arg2 ;
2365
2366 SWIG_check_num_args("PLGraphicsIn::subwindow",2,2)
2367 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::subwindow",1,"PLGraphicsIn *");
2368 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::subwindow",2,"PLINT");
2369
2370 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2371 SWIG_fail_ptr("PLGraphicsIn_subwindow_set",1,SWIGTYPE_p_PLGraphicsIn);
2372 }
2373
2374 arg2 = (PLINT)lua_tonumber(L, 2);
2375 if (arg1) (arg1)->subwindow = arg2;
2376
2377 return SWIG_arg;
2378
2379 if(0) SWIG_fail;
2380
2381 fail:
2382 lua_error(L);
2383 return SWIG_arg;
2384 }
2385
2386
2387 static int _wrap_PLGraphicsIn_subwindow_get(lua_State* L) {
2388 int SWIG_arg = 0;
2389 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2390 PLINT result;
2391
2392 SWIG_check_num_args("PLGraphicsIn::subwindow",1,1)
2393 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::subwindow",1,"PLGraphicsIn *");
2394
2395 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2396 SWIG_fail_ptr("PLGraphicsIn_subwindow_get",1,SWIGTYPE_p_PLGraphicsIn);
2397 }
2398
2399 result = (PLINT) ((arg1)->subwindow);
2400 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2401 return SWIG_arg;
2402
2403 if(0) SWIG_fail;
2404
2405 fail:
2406 lua_error(L);
2407 return SWIG_arg;
2408 }
2409
2410
2411 static int _wrap_PLGraphicsIn_string_set(lua_State* L) {
2412 int SWIG_arg = 0;
2413 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2414 char *arg2 ;
2415
2416 SWIG_check_num_args("PLGraphicsIn::string",2,2)
2417 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::string",1,"PLGraphicsIn *");
2418 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("PLGraphicsIn::string",2,"char [16]");
2419
2420 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2421 SWIG_fail_ptr("PLGraphicsIn_string_set",1,SWIGTYPE_p_PLGraphicsIn);
2422 }
2423
2424 arg2 = (char *)lua_tostring(L, 2);
2425 {
2426 if(arg2) {
2427 strncpy((char*)arg1->string, (const char *)arg2, 16-1);
2428 arg1->string[16-1] = 0;
2429 } else {
2430 arg1->string[0] = 0;
2431 }
2432 }
2433
2434 return SWIG_arg;
2435
2436 if(0) SWIG_fail;
2437
2438 fail:
2439 lua_error(L);
2440 return SWIG_arg;
2441 }
2442
2443
2444 static int _wrap_PLGraphicsIn_string_get(lua_State* L) {
2445 int SWIG_arg = 0;
2446 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2447 char *result = 0 ;
2448
2449 SWIG_check_num_args("PLGraphicsIn::string",1,1)
2450 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::string",1,"PLGraphicsIn *");
2451
2452 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2453 SWIG_fail_ptr("PLGraphicsIn_string_get",1,SWIGTYPE_p_PLGraphicsIn);
2454 }
2455
2456 result = (char *)(char *) ((arg1)->string);
2457 lua_pushstring(L,(const char *)result); SWIG_arg++;
2458 return SWIG_arg;
2459
2460 if(0) SWIG_fail;
2461
2462 fail:
2463 lua_error(L);
2464 return SWIG_arg;
2465 }
2466
2467
2468 static int _wrap_PLGraphicsIn_pX_set(lua_State* L) {
2469 int SWIG_arg = 0;
2470 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2471 int arg2 ;
2472
2473 SWIG_check_num_args("PLGraphicsIn::pX",2,2)
2474 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pX",1,"PLGraphicsIn *");
2475 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::pX",2,"int");
2476
2477 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2478 SWIG_fail_ptr("PLGraphicsIn_pX_set",1,SWIGTYPE_p_PLGraphicsIn);
2479 }
2480
2481 arg2 = (int)lua_tonumber(L, 2);
2482 if (arg1) (arg1)->pX = arg2;
2483
2484 return SWIG_arg;
2485
2486 if(0) SWIG_fail;
2487
2488 fail:
2489 lua_error(L);
2490 return SWIG_arg;
2491 }
2492
2493
2494 static int _wrap_PLGraphicsIn_pX_get(lua_State* L) {
2495 int SWIG_arg = 0;
2496 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2497 int result;
2498
2499 SWIG_check_num_args("PLGraphicsIn::pX",1,1)
2500 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pX",1,"PLGraphicsIn *");
2501
2502 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2503 SWIG_fail_ptr("PLGraphicsIn_pX_get",1,SWIGTYPE_p_PLGraphicsIn);
2504 }
2505
2506 result = (int) ((arg1)->pX);
2507 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2508 return SWIG_arg;
2509
2510 if(0) SWIG_fail;
2511
2512 fail:
2513 lua_error(L);
2514 return SWIG_arg;
2515 }
2516
2517
2518 static int _wrap_PLGraphicsIn_pY_set(lua_State* L) {
2519 int SWIG_arg = 0;
2520 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2521 int arg2 ;
2522
2523 SWIG_check_num_args("PLGraphicsIn::pY",2,2)
2524 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pY",1,"PLGraphicsIn *");
2525 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::pY",2,"int");
2526
2527 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2528 SWIG_fail_ptr("PLGraphicsIn_pY_set",1,SWIGTYPE_p_PLGraphicsIn);
2529 }
2530
2531 arg2 = (int)lua_tonumber(L, 2);
2532 if (arg1) (arg1)->pY = arg2;
2533
2534 return SWIG_arg;
2535
2536 if(0) SWIG_fail;
2537
2538 fail:
2539 lua_error(L);
2540 return SWIG_arg;
2541 }
2542
2543
2544 static int _wrap_PLGraphicsIn_pY_get(lua_State* L) {
2545 int SWIG_arg = 0;
2546 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2547 int result;
2548
2549 SWIG_check_num_args("PLGraphicsIn::pY",1,1)
2550 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::pY",1,"PLGraphicsIn *");
2551
2552 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2553 SWIG_fail_ptr("PLGraphicsIn_pY_get",1,SWIGTYPE_p_PLGraphicsIn);
2554 }
2555
2556 result = (int) ((arg1)->pY);
2557 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2558 return SWIG_arg;
2559
2560 if(0) SWIG_fail;
2561
2562 fail:
2563 lua_error(L);
2564 return SWIG_arg;
2565 }
2566
2567
2568 static int _wrap_PLGraphicsIn_dX_set(lua_State* L) {
2569 int SWIG_arg = 0;
2570 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2571 PLFLT arg2 ;
2572
2573 SWIG_check_num_args("PLGraphicsIn::dX",2,2)
2574 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dX",1,"PLGraphicsIn *");
2575 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::dX",2,"PLFLT");
2576
2577 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2578 SWIG_fail_ptr("PLGraphicsIn_dX_set",1,SWIGTYPE_p_PLGraphicsIn);
2579 }
2580
2581 arg2 = (PLFLT)lua_tonumber(L, 2);
2582 if (arg1) (arg1)->dX = arg2;
2583
2584 return SWIG_arg;
2585
2586 if(0) SWIG_fail;
2587
2588 fail:
2589 lua_error(L);
2590 return SWIG_arg;
2591 }
2592
2593
2594 static int _wrap_PLGraphicsIn_dX_get(lua_State* L) {
2595 int SWIG_arg = 0;
2596 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2597 PLFLT result;
2598
2599 SWIG_check_num_args("PLGraphicsIn::dX",1,1)
2600 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dX",1,"PLGraphicsIn *");
2601
2602 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2603 SWIG_fail_ptr("PLGraphicsIn_dX_get",1,SWIGTYPE_p_PLGraphicsIn);
2604 }
2605
2606 result = (PLFLT) ((arg1)->dX);
2607 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2608 return SWIG_arg;
2609
2610 if(0) SWIG_fail;
2611
2612 fail:
2613 lua_error(L);
2614 return SWIG_arg;
2615 }
2616
2617
2618 static int _wrap_PLGraphicsIn_dY_set(lua_State* L) {
2619 int SWIG_arg = 0;
2620 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2621 PLFLT arg2 ;
2622
2623 SWIG_check_num_args("PLGraphicsIn::dY",2,2)
2624 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dY",1,"PLGraphicsIn *");
2625 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::dY",2,"PLFLT");
2626
2627 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2628 SWIG_fail_ptr("PLGraphicsIn_dY_set",1,SWIGTYPE_p_PLGraphicsIn);
2629 }
2630
2631 arg2 = (PLFLT)lua_tonumber(L, 2);
2632 if (arg1) (arg1)->dY = arg2;
2633
2634 return SWIG_arg;
2635
2636 if(0) SWIG_fail;
2637
2638 fail:
2639 lua_error(L);
2640 return SWIG_arg;
2641 }
2642
2643
2644 static int _wrap_PLGraphicsIn_dY_get(lua_State* L) {
2645 int SWIG_arg = 0;
2646 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2647 PLFLT result;
2648
2649 SWIG_check_num_args("PLGraphicsIn::dY",1,1)
2650 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::dY",1,"PLGraphicsIn *");
2651
2652 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2653 SWIG_fail_ptr("PLGraphicsIn_dY_get",1,SWIGTYPE_p_PLGraphicsIn);
2654 }
2655
2656 result = (PLFLT) ((arg1)->dY);
2657 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2658 return SWIG_arg;
2659
2660 if(0) SWIG_fail;
2661
2662 fail:
2663 lua_error(L);
2664 return SWIG_arg;
2665 }
2666
2667
2668 static int _wrap_PLGraphicsIn_wX_set(lua_State* L) {
2669 int SWIG_arg = 0;
2670 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2671 PLFLT arg2 ;
2672
2673 SWIG_check_num_args("PLGraphicsIn::wX",2,2)
2674 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wX",1,"PLGraphicsIn *");
2675 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::wX",2,"PLFLT");
2676
2677 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2678 SWIG_fail_ptr("PLGraphicsIn_wX_set",1,SWIGTYPE_p_PLGraphicsIn);
2679 }
2680
2681 arg2 = (PLFLT)lua_tonumber(L, 2);
2682 if (arg1) (arg1)->wX = arg2;
2683
2684 return SWIG_arg;
2685
2686 if(0) SWIG_fail;
2687
2688 fail:
2689 lua_error(L);
2690 return SWIG_arg;
2691 }
2692
2693
2694 static int _wrap_PLGraphicsIn_wX_get(lua_State* L) {
2695 int SWIG_arg = 0;
2696 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2697 PLFLT result;
2698
2699 SWIG_check_num_args("PLGraphicsIn::wX",1,1)
2700 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wX",1,"PLGraphicsIn *");
2701
2702 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2703 SWIG_fail_ptr("PLGraphicsIn_wX_get",1,SWIGTYPE_p_PLGraphicsIn);
2704 }
2705
2706 result = (PLFLT) ((arg1)->wX);
2707 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2708 return SWIG_arg;
2709
2710 if(0) SWIG_fail;
2711
2712 fail:
2713 lua_error(L);
2714 return SWIG_arg;
2715 }
2716
2717
2718 static int _wrap_PLGraphicsIn_wY_set(lua_State* L) {
2719 int SWIG_arg = 0;
2720 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2721 PLFLT arg2 ;
2722
2723 SWIG_check_num_args("PLGraphicsIn::wY",2,2)
2724 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wY",1,"PLGraphicsIn *");
2725 if(!lua_isnumber(L,2)) SWIG_fail_arg("PLGraphicsIn::wY",2,"PLFLT");
2726
2727 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2728 SWIG_fail_ptr("PLGraphicsIn_wY_set",1,SWIGTYPE_p_PLGraphicsIn);
2729 }
2730
2731 arg2 = (PLFLT)lua_tonumber(L, 2);
2732 if (arg1) (arg1)->wY = arg2;
2733
2734 return SWIG_arg;
2735
2736 if(0) SWIG_fail;
2737
2738 fail:
2739 lua_error(L);
2740 return SWIG_arg;
2741 }
2742
2743
2744 static int _wrap_PLGraphicsIn_wY_get(lua_State* L) {
2745 int SWIG_arg = 0;
2746 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
2747 PLFLT result;
2748
2749 SWIG_check_num_args("PLGraphicsIn::wY",1,1)
2750 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("PLGraphicsIn::wY",1,"PLGraphicsIn *");
2751
2752 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
2753 SWIG_fail_ptr("PLGraphicsIn_wY_get",1,SWIGTYPE_p_PLGraphicsIn);
2754 }
2755
2756 result = (PLFLT) ((arg1)->wY);
2757 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
2758 return SWIG_arg;
2759
2760 if(0) SWIG_fail;
2761
2762 fail:
2763 lua_error(L);
2764 return SWIG_arg;
2765 }
2766
2767
2768 static int _wrap_new_PLGraphicsIn(lua_State* L) {
2769 int SWIG_arg = 0;
2770 PLGraphicsIn *result = 0 ;
2771
2772 SWIG_check_num_args("PLGraphicsIn::PLGraphicsIn",0,0)
2773 result = (PLGraphicsIn *)calloc(1, sizeof(PLGraphicsIn));
2774 SWIG_NewPointerObj(L,result,SWIGTYPE_p_PLGraphicsIn,1); SWIG_arg++;
2775 return SWIG_arg;
2776
2777 if(0) SWIG_fail;
2778
2779 fail:
2780 lua_error(L);
2781 return SWIG_arg;
2782 }
2783
2784
2785 static void swig_delete_PLGraphicsIn(void *obj) {
2786 PLGraphicsIn *arg1 = (PLGraphicsIn *) obj;
2787 free((char *) arg1);
2788 }
2789 static swig_lua_method swig_PLGraphicsIn_methods[] = {
2790 {0,0}
2791 };
2792 static swig_lua_attribute swig_PLGraphicsIn_attributes[] = {
2793 { "type", _wrap_PLGraphicsIn_type_get, _wrap_PLGraphicsIn_type_set},
2794 { "state", _wrap_PLGraphicsIn_state_get, _wrap_PLGraphicsIn_state_set},
2795 { "keysym", _wrap_PLGraphicsIn_keysym_get, _wrap_PLGraphicsIn_keysym_set},
2796 { "button", _wrap_PLGraphicsIn_button_get, _wrap_PLGraphicsIn_button_set},
2797 { "subwindow", _wrap_PLGraphicsIn_subwindow_get, _wrap_PLGraphicsIn_subwindow_set},
2798 { "string", _wrap_PLGraphicsIn_string_get, _wrap_PLGraphicsIn_string_set},
2799 { "pX", _wrap_PLGraphicsIn_pX_get, _wrap_PLGraphicsIn_pX_set},
2800 { "pY", _wrap_PLGraphicsIn_pY_get, _wrap_PLGraphicsIn_pY_set},
2801 { "dX", _wrap_PLGraphicsIn_dX_get, _wrap_PLGraphicsIn_dX_set},
2802 { "dY", _wrap_PLGraphicsIn_dY_get, _wrap_PLGraphicsIn_dY_set},
2803 { "wX", _wrap_PLGraphicsIn_wX_get, _wrap_PLGraphicsIn_wX_set},
2804 { "wY", _wrap_PLGraphicsIn_wY_get, _wrap_PLGraphicsIn_wY_set},
2805 {0,0,0}
2806 };
2807 static swig_lua_class *swig_PLGraphicsIn_bases[] = {0};
2808 static const char *swig_PLGraphicsIn_base_names[] = {0};
2809 static swig_lua_class _wrap_class_PLGraphicsIn = { "PLGraphicsIn", &SWIGTYPE_p_PLGraphicsIn,_wrap_new_PLGraphicsIn, swig_delete_PLGraphicsIn, swig_PLGraphicsIn_methods, swig_PLGraphicsIn_attributes, swig_PLGraphicsIn_bases, swig_PLGraphicsIn_base_names };
2810
2811 static int _wrap_setcontlabelformat(lua_State* L) {
2812 int SWIG_arg = 0;
2813 PLINT arg1 ;
2814 PLINT arg2 ;
2815
2816 SWIG_check_num_args("pl_setcontlabelformat",2,2)
2817 if(!lua_isnumber(L,1)) SWIG_fail_arg("pl_setcontlabelformat",1,"PLINT");
2818 if(!lua_isnumber(L,2)) SWIG_fail_arg("pl_setcontlabelformat",2,"PLINT");
2819 arg1 = (PLINT)lua_tonumber(L, 1);
2820 arg2 = (PLINT)lua_tonumber(L, 2);
2821 pl_setcontlabelformat(arg1,arg2);
2822
2823 return SWIG_arg;
2824
2825 if(0) SWIG_fail;
2826
2827 fail:
2828 lua_error(L);
2829 return SWIG_arg;
2830 }
2831
2832
2833 static int _wrap_setcontlabelparam(lua_State* L) {
2834 int SWIG_arg = 0;
2835 PLFLT arg1 ;
2836 PLFLT arg2 ;
2837 PLFLT arg3 ;
2838 PLINT arg4 ;
2839
2840 SWIG_check_num_args("pl_setcontlabelparam",4,4)
2841 if(!lua_isnumber(L,1)) SWIG_fail_arg("pl_setcontlabelparam",1,"PLFLT");
2842 if(!lua_isnumber(L,2)) SWIG_fail_arg("pl_setcontlabelparam",2,"PLFLT");
2843 if(!lua_isnumber(L,3)) SWIG_fail_arg("pl_setcontlabelparam",3,"PLFLT");
2844 if(!lua_isnumber(L,4)) SWIG_fail_arg("pl_setcontlabelparam",4,"PLINT");
2845 arg1 = (PLFLT)lua_tonumber(L, 1);
2846 arg2 = (PLFLT)lua_tonumber(L, 2);
2847 arg3 = (PLFLT)lua_tonumber(L, 3);
2848 arg4 = (PLINT)lua_tonumber(L, 4);
2849 pl_setcontlabelparam(arg1,arg2,arg3,arg4);
2850
2851 return SWIG_arg;
2852
2853 if(0) SWIG_fail;
2854
2855 fail:
2856 lua_error(L);
2857 return SWIG_arg;
2858 }
2859
2860
2861 static int _wrap_adv(lua_State* L) {
2862 int SWIG_arg = 0;
2863 PLINT arg1 ;
2864
2865 SWIG_check_num_args("pladv",1,1)
2866 if(!lua_isnumber(L,1)) SWIG_fail_arg("pladv",1,"PLINT");
2867 arg1 = (PLINT)lua_tonumber(L, 1);
2868 pladv(arg1);
2869
2870 return SWIG_arg;
2871
2872 if(0) SWIG_fail;
2873
2874 fail:
2875 lua_error(L);
2876 return SWIG_arg;
2877 }
2878
2879
2880 static int _wrap_arc(lua_State* L) {
2881 int SWIG_arg = 0;
2882 PLFLT arg1 ;
2883 PLFLT arg2 ;
2884 PLFLT arg3 ;
2885 PLFLT arg4 ;
2886 PLFLT arg5 ;
2887 PLFLT arg6 ;
2888 PLFLT arg7 ;
2889 PLBOOL arg8 ;
2890
2891 SWIG_check_num_args("plarc",8,8)
2892 if(!lua_isnumber(L,1)) SWIG_fail_arg("plarc",1,"PLFLT");
2893 if(!lua_isnumber(L,2)) SWIG_fail_arg("plarc",2,"PLFLT");
2894 if(!lua_isnumber(L,3)) SWIG_fail_arg("plarc",3,"PLFLT");
2895 if(!lua_isnumber(L,4)) SWIG_fail_arg("plarc",4,"PLFLT");
2896 if(!lua_isnumber(L,5)) SWIG_fail_arg("plarc",5,"PLFLT");
2897 if(!lua_isnumber(L,6)) SWIG_fail_arg("plarc",6,"PLFLT");
2898 if(!lua_isnumber(L,7)) SWIG_fail_arg("plarc",7,"PLFLT");
2899 if(!lua_isnumber(L,8)) SWIG_fail_arg("plarc",8,"PLBOOL");
2900 arg1 = (PLFLT)lua_tonumber(L, 1);
2901 arg2 = (PLFLT)lua_tonumber(L, 2);
2902 arg3 = (PLFLT)lua_tonumber(L, 3);
2903 arg4 = (PLFLT)lua_tonumber(L, 4);
2904 arg5 = (PLFLT)lua_tonumber(L, 5);
2905 arg6 = (PLFLT)lua_tonumber(L, 6);
2906 arg7 = (PLFLT)lua_tonumber(L, 7);
2907 arg8 = (PLBOOL)lua_tonumber(L, 8);
2908 plarc(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
2909
2910 return SWIG_arg;
2911
2912 if(0) SWIG_fail;
2913
2914 fail:
2915 lua_error(L);
2916 return SWIG_arg;
2917 }
2918
2919
2920 static int _wrap_axes(lua_State* L) {
2921 int SWIG_arg = 0;
2922 PLFLT arg1 ;
2923 PLFLT arg2 ;
2924 char *arg3 = (char *) 0 ;
2925 PLFLT arg4 ;
2926 PLINT arg5 ;
2927 char *arg6 = (char *) 0 ;
2928 PLFLT arg7 ;
2929 PLINT arg8 ;
2930
2931 SWIG_check_num_args("plaxes",8,8)
2932 if(!lua_isnumber(L,1)) SWIG_fail_arg("plaxes",1,"PLFLT");
2933 if(!lua_isnumber(L,2)) SWIG_fail_arg("plaxes",2,"PLFLT");
2934 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plaxes",3,"char const *");
2935 if(!lua_isnumber(L,4)) SWIG_fail_arg("plaxes",4,"PLFLT");
2936 if(!lua_isnumber(L,5)) SWIG_fail_arg("plaxes",5,"PLINT");
2937 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plaxes",6,"char const *");
2938 if(!lua_isnumber(L,7)) SWIG_fail_arg("plaxes",7,"PLFLT");
2939 if(!lua_isnumber(L,8)) SWIG_fail_arg("plaxes",8,"PLINT");
2940 arg1 = (PLFLT)lua_tonumber(L, 1);
2941 arg2 = (PLFLT)lua_tonumber(L, 2);
2942 arg3 = (char *)lua_tostring(L, 3);
2943 arg4 = (PLFLT)lua_tonumber(L, 4);
2944 arg5 = (PLINT)lua_tonumber(L, 5);
2945 arg6 = (char *)lua_tostring(L, 6);
2946 arg7 = (PLFLT)lua_tonumber(L, 7);
2947 arg8 = (PLINT)lua_tonumber(L, 8);
2948 plaxes(arg1,arg2,(char const *)arg3,arg4,arg5,(char const *)arg6,arg7,arg8);
2949
2950 return SWIG_arg;
2951
2952 if(0) SWIG_fail;
2953
2954 fail:
2955 lua_error(L);
2956 return SWIG_arg;
2957 }
2958
2959
2960 static int _wrap_bin(lua_State* L) {
2961 int SWIG_arg = 0;
2962 PLINT arg1 ;
2963 PLFLT *arg2 = (PLFLT *) 0 ;
2964 PLFLT *arg3 = (PLFLT *) 0 ;
2965 PLINT arg4 ;
2966 int temp3 ;
2967
2968 SWIG_check_num_args("plbin",3,3)
2969 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbin",3,"PLINT");
2970 {
2971 int temp;
2972 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
2973 if ( !arg2 )
2974 SWIG_fail;
2975 arg1 = Alen = temp;
2976 }
2977 {
2978 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
2979 if ( !arg3 )
2980 SWIG_fail;
2981 if ( temp3 != Alen )
2982 {
2983 lua_pushfstring( L, "Tables must be of same length." );
2984 SWIG_fail;
2985 }
2986 }
2987 arg4 = (PLINT)lua_tonumber(L, 3);
2988 plbin(arg1,(double const *)arg2,(double const *)arg3,arg4);
2989
2990 {
2991 LUA_FREE_ARRAY( arg2 );
2992 }
2993 {
2994 LUA_FREE_ARRAY( arg3 );
2995 }
2996 return SWIG_arg;
2997
2998 if(0) SWIG_fail;
2999
3000 fail:
3001 {
3002 LUA_FREE_ARRAY( arg2 );
3003 }
3004 {
3005 LUA_FREE_ARRAY( arg3 );
3006 }
3007 lua_error(L);
3008 return SWIG_arg;
3009 }
3010
3011
3012 static int _wrap_btime(lua_State* L) {
3013 int SWIG_arg = 0;
3014 PLINT *arg1 = (PLINT *) 0 ;
3015 PLINT *arg2 = (PLINT *) 0 ;
3016 PLINT *arg3 = (PLINT *) 0 ;
3017 PLINT *arg4 = (PLINT *) 0 ;
3018 PLINT *arg5 = (PLINT *) 0 ;
3019 PLFLT *arg6 = (PLFLT *) 0 ;
3020 PLFLT arg7 ;
3021 PLINT temp1 ;
3022 PLINT temp2 ;
3023 PLINT temp3 ;
3024 PLINT temp4 ;
3025 PLINT temp5 ;
3026 PLFLT temp6 ;
3027
3028 arg1 = &temp1;
3029 arg2 = &temp2;
3030 arg3 = &temp3;
3031 arg4 = &temp4;
3032 arg5 = &temp5;
3033 arg6 = &temp6;
3034 SWIG_check_num_args("plbtime",1,1)
3035 if(!lua_isnumber(L,1)) SWIG_fail_arg("plbtime",1,"PLFLT");
3036 arg7 = (PLFLT)lua_tonumber(L, 1);
3037 plbtime(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
3038
3039 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
3040 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
3041 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
3042 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
3043 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
3044 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
3045 return SWIG_arg;
3046
3047 if(0) SWIG_fail;
3048
3049 fail:
3050 lua_error(L);
3051 return SWIG_arg;
3052 }
3053
3054
3055 static int _wrap_bop(lua_State* L) {
3056 int SWIG_arg = 0;
3057
3058 SWIG_check_num_args("plbop",0,0)
3059 plbop();
3060
3061 return SWIG_arg;
3062
3063 if(0) SWIG_fail;
3064
3065 fail:
3066 lua_error(L);
3067 return SWIG_arg;
3068 }
3069
3070
3071 static int _wrap_box(lua_State* L) {
3072 int SWIG_arg = 0;
3073 char *arg1 = (char *) 0 ;
3074 PLFLT arg2 ;
3075 PLINT arg3 ;
3076 char *arg4 = (char *) 0 ;
3077 PLFLT arg5 ;
3078 PLINT arg6 ;
3079
3080 SWIG_check_num_args("plbox",6,6)
3081 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plbox",1,"char const *");
3082 if(!lua_isnumber(L,2)) SWIG_fail_arg("plbox",2,"PLFLT");
3083 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbox",3,"PLINT");
3084 if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("plbox",4,"char const *");
3085 if(!lua_isnumber(L,5)) SWIG_fail_arg("plbox",5,"PLFLT");
3086 if(!lua_isnumber(L,6)) SWIG_fail_arg("plbox",6,"PLINT");
3087 arg1 = (char *)lua_tostring(L, 1);
3088 arg2 = (PLFLT)lua_tonumber(L, 2);
3089 arg3 = (PLINT)lua_tonumber(L, 3);
3090 arg4 = (char *)lua_tostring(L, 4);
3091 arg5 = (PLFLT)lua_tonumber(L, 5);
3092 arg6 = (PLINT)lua_tonumber(L, 6);
3093 plbox((char const *)arg1,arg2,arg3,(char const *)arg4,arg5,arg6);
3094
3095 return SWIG_arg;
3096
3097 if(0) SWIG_fail;
3098
3099 fail:
3100 lua_error(L);
3101 return SWIG_arg;
3102 }
3103
3104
3105 static int _wrap_box3(lua_State* L) {
3106 int SWIG_arg = 0;
3107 char *arg1 = (char *) 0 ;
3108 char *arg2 = (char *) 0 ;
3109 PLFLT arg3 ;
3110 PLINT arg4 ;
3111 char *arg5 = (char *) 0 ;
3112 char *arg6 = (char *) 0 ;
3113 PLFLT arg7 ;
3114 PLINT arg8 ;
3115 char *arg9 = (char *) 0 ;
3116 char *arg10 = (char *) 0 ;
3117 PLFLT arg11 ;
3118 PLINT arg12 ;
3119
3120 SWIG_check_num_args("plbox3",12,12)
3121 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plbox3",1,"char const *");
3122 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plbox3",2,"char const *");
3123 if(!lua_isnumber(L,3)) SWIG_fail_arg("plbox3",3,"PLFLT");
3124 if(!lua_isnumber(L,4)) SWIG_fail_arg("plbox3",4,"PLINT");
3125 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plbox3",5,"char const *");
3126 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plbox3",6,"char const *");
3127 if(!lua_isnumber(L,7)) SWIG_fail_arg("plbox3",7,"PLFLT");
3128 if(!lua_isnumber(L,8)) SWIG_fail_arg("plbox3",8,"PLINT");
3129 if(!SWIG_lua_isnilstring(L,9)) SWIG_fail_arg("plbox3",9,"char const *");
3130 if(!SWIG_lua_isnilstring(L,10)) SWIG_fail_arg("plbox3",10,"char const *");
3131 if(!lua_isnumber(L,11)) SWIG_fail_arg("plbox3",11,"PLFLT");
3132 if(!lua_isnumber(L,12)) SWIG_fail_arg("plbox3",12,"PLINT");
3133 arg1 = (char *)lua_tostring(L, 1);
3134 arg2 = (char *)lua_tostring(L, 2);
3135 arg3 = (PLFLT)lua_tonumber(L, 3);
3136 arg4 = (PLINT)lua_tonumber(L, 4);
3137 arg5 = (char *)lua_tostring(L, 5);
3138 arg6 = (char *)lua_tostring(L, 6);
3139 arg7 = (PLFLT)lua_tonumber(L, 7);
3140 arg8 = (PLINT)lua_tonumber(L, 8);
3141 arg9 = (char *)lua_tostring(L, 9);
3142 arg10 = (char *)lua_tostring(L, 10);
3143 arg11 = (PLFLT)lua_tonumber(L, 11);
3144 arg12 = (PLINT)lua_tonumber(L, 12);
3145 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);
3146
3147 return SWIG_arg;
3148
3149 if(0) SWIG_fail;
3150
3151 fail:
3152 lua_error(L);
3153 return SWIG_arg;
3154 }
3155
3156
3157 static int _wrap_calc_world(lua_State* L) {
3158 int SWIG_arg = 0;
3159 PLFLT arg1 ;
3160 PLFLT arg2 ;
3161 PLFLT *arg3 = (PLFLT *) 0 ;
3162 PLFLT *arg4 = (PLFLT *) 0 ;
3163 PLINT *arg5 = (PLINT *) 0 ;
3164 PLFLT temp3 ;
3165 PLFLT temp4 ;
3166 PLINT temp5 ;
3167
3168 arg3 = &temp3;
3169 arg4 = &temp4;
3170 arg5 = &temp5;
3171 SWIG_check_num_args("plcalc_world",2,2)
3172 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcalc_world",1,"PLFLT");
3173 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcalc_world",2,"PLFLT");
3174 arg1 = (PLFLT)lua_tonumber(L, 1);
3175 arg2 = (PLFLT)lua_tonumber(L, 2);
3176 plcalc_world(arg1,arg2,arg3,arg4,arg5);
3177
3178 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
3179 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
3180 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
3181 return SWIG_arg;
3182
3183 if(0) SWIG_fail;
3184
3185 fail:
3186 lua_error(L);
3187 return SWIG_arg;
3188 }
3189
3190
3191 static int _wrap_clear(lua_State* L) {
3192 int SWIG_arg = 0;
3193
3194 SWIG_check_num_args("plclear",0,0)
3195 plclear();
3196
3197 return SWIG_arg;
3198
3199 if(0) SWIG_fail;
3200
3201 fail:
3202 lua_error(L);
3203 return SWIG_arg;
3204 }
3205
3206
3207 static int _wrap_col0(lua_State* L) {
3208 int SWIG_arg = 0;
3209 PLINT arg1 ;
3210
3211 SWIG_check_num_args("plcol0",1,1)
3212 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcol0",1,"PLINT");
3213 arg1 = (PLINT)lua_tonumber(L, 1);
3214 plcol0(arg1);
3215
3216 return SWIG_arg;
3217
3218 if(0) SWIG_fail;
3219
3220 fail:
3221 lua_error(L);
3222 return SWIG_arg;
3223 }
3224
3225
3226 static int _wrap_col1(lua_State* L) {
3227 int SWIG_arg = 0;
3228 PLFLT arg1 ;
3229
3230 SWIG_check_num_args("plcol1",1,1)
3231 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcol1",1,"PLFLT");
3232 arg1 = (PLFLT)lua_tonumber(L, 1);
3233 plcol1(arg1);
3234
3235 return SWIG_arg;
3236
3237 if(0) SWIG_fail;
3238
3239 fail:
3240 lua_error(L);
3241 return SWIG_arg;
3242 }
3243
3244
3245 static int _wrap_configtime(lua_State* L) {
3246 int SWIG_arg = 0;
3247 PLFLT arg1 ;
3248 PLFLT arg2 ;
3249 PLFLT arg3 ;
3250 PLINT arg4 ;
3251 PLBOOL arg5 ;
3252 PLINT arg6 ;
3253 PLINT arg7 ;
3254 PLINT arg8 ;
3255 PLINT arg9 ;
3256 PLINT arg10 ;
3257 PLFLT arg11 ;
3258
3259 SWIG_check_num_args("plconfigtime",11,11)
3260 if(!lua_isnumber(L,1)) SWIG_fail_arg("plconfigtime",1,"PLFLT");
3261 if(!lua_isnumber(L,2)) SWIG_fail_arg("plconfigtime",2,"PLFLT");
3262 if(!lua_isnumber(L,3)) SWIG_fail_arg("plconfigtime",3,"PLFLT");
3263 if(!lua_isnumber(L,4)) SWIG_fail_arg("plconfigtime",4,"PLINT");
3264 if(!lua_isnumber(L,5)) SWIG_fail_arg("plconfigtime",5,"PLBOOL");
3265 if(!lua_isnumber(L,6)) SWIG_fail_arg("plconfigtime",6,"PLINT");
3266 if(!lua_isnumber(L,7)) SWIG_fail_arg("plconfigtime",7,"PLINT");
3267 if(!lua_isnumber(L,8)) SWIG_fail_arg("plconfigtime",8,"PLINT");
3268 if(!lua_isnumber(L,9)) SWIG_fail_arg("plconfigtime",9,"PLINT");
3269 if(!lua_isnumber(L,10)) SWIG_fail_arg("plconfigtime",10,"PLINT");
3270 if(!lua_isnumber(L,11)) SWIG_fail_arg("plconfigtime",11,"PLFLT");
3271 arg1 = (PLFLT)lua_tonumber(L, 1);
3272 arg2 = (PLFLT)lua_tonumber(L, 2);
3273 arg3 = (PLFLT)lua_tonumber(L, 3);
3274 arg4 = (PLINT)lua_tonumber(L, 4);
3275 arg5 = (PLBOOL)lua_tonumber(L, 5);
3276 arg6 = (PLINT)lua_tonumber(L, 6);
3277 arg7 = (PLINT)lua_tonumber(L, 7);
3278 arg8 = (PLINT)lua_tonumber(L, 8);
3279 arg9 = (PLINT)lua_tonumber(L, 9);
3280 arg10 = (PLINT)lua_tonumber(L, 10);
3281 arg11 = (PLFLT)lua_tonumber(L, 11);
3282 plconfigtime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
3283
3284 return SWIG_arg;
3285
3286 if(0) SWIG_fail;
3287
3288 fail:
3289 lua_error(L);
3290 return SWIG_arg;
3291 }
3292
3293
3294 static int _wrap_cont(lua_State* L) {
3295 int SWIG_arg = 0;
3296 PLFLT **arg1 = (PLFLT **) 0 ;
3297 PLINT arg2 ;
3298 PLINT arg3 ;
3299 PLINT arg4 ;
3300 PLINT arg5 ;
3301 PLINT arg6 ;
3302 PLINT arg7 ;
3303 PLFLT *arg8 = (PLFLT *) 0 ;
3304 PLINT arg9 ;
3305 pltr_func arg10 = (pltr_func) 0 ;
3306 PLPointer arg11 = (PLPointer) 0 ;
3307 int ii1 ;
3308 PLcGrid cgrid111 ;
3309 PLcGrid2 cgrid211 ;
3310
3311 {
3312 cgrid111.xg = cgrid111.yg = cgrid111.zg = NULL;
3313 cgrid111.nx = cgrid111.ny = cgrid111.nz = 0;
3314 cgrid211.xg = cgrid211.yg = cgrid211.zg = NULL;
3315 cgrid211.nx = cgrid211.ny = 0;
3316 }
3317 {
3318 arg10 = NULL;
3319 }
3320 {
3321 arg11 = NULL;
3322 }
3323 SWIG_check_num_args("plcont",6,8)
3324 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcont",2,"PLINT");
3325 if(!lua_isnumber(L,3)) SWIG_fail_arg("plcont",3,"PLINT");
3326 if(!lua_isnumber(L,4)) SWIG_fail_arg("plcont",4,"PLINT");
3327 if(!lua_isnumber(L,5)) SWIG_fail_arg("plcont",5,"PLINT");
3328 {
3329 int jj;
3330
3331 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
3332 if ( !arg1 )
3333 SWIG_fail;
3334 Xlen = arg2 = ii1;
3335 Ylen = arg3 = jj;
3336 }
3337 arg4 = (PLINT)lua_tonumber(L, 2);
3338 arg5 = (PLINT)lua_tonumber(L, 3);
3339 arg6 = (PLINT)lua_tonumber(L, 4);
3340 arg7 = (PLINT)lua_tonumber(L, 5);
3341 {
3342 int temp;
3343 arg8 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp );
3344 if ( !arg8 )
3345 SWIG_fail;
3346 arg9 = Alen = temp;
3347 }
3348 if(lua_gettop(L)>=7){
3349 {
3350 arg10 = NULL;
3351 mypltr_funcstr[0] = '\0';
3352
3353 if ( lua_isstring( L, 7 ) )
3354 {
3355 const char* funcstr = lua_tostring( L, 7 );
3356 if ( strcmp( "pltr0", funcstr ) == 0 )
3357 {
3358 arg10 = pltr0;
3359 }
3360 else if ( strcmp( "pltr1", funcstr ) == 0 )
3361 {
3362 arg10 = pltr1;
3363 }
3364 else if ( strcmp( "pltr2", funcstr ) == 0 )
3365 {
3366 arg10 = pltr2;
3367 }
3368 else
3369 {
3370 arg10 = mypltr;
3371 strncpy( mypltr_funcstr, funcstr, 255 );
3372 myL = L;
3373 }
3374 }
3375 else
3376 SWIG_fail_arg( "cont", 10, "pltr_func" );
3377 }
3378 }
3379 if(lua_gettop(L)>=8){
3380 {
3381 int nx, ny;
3382 int gridmode = 0;
3383
3384 lua_pushstring( L, "xg" );
3385 lua_gettable( L, 8 );
3386 if ( !lua_istable( L, -1 ) )
3387 {
3388 lua_pop( L, 1 ); // pop "xg"
3389 lua_pushstring( L, "expected a table xg" );
3390 SWIG_fail;
3391 }
3392 lua_rawgeti( L, -1, 1 );
3393 if ( lua_istable( L, -1 ) )
3394 gridmode = 2; // two dimensional array
3395 else if ( lua_isnumber( L, -1 ) )
3396 gridmode = 1; // one dimensional array
3397 else
3398 {
3399 lua_pop( L, 1 ); // pop "1"
3400 lua_pop( L, 1 ); // pop "xg"
3401 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
3402 SWIG_fail;
3403 }
3404 lua_pop( L, 1 ); // pop test element
3405 if ( gridmode == 1 )
3406 {
3407 cgrid111.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
3408 if ( !cgrid111.xg )
3409 {
3410 lua_pop( L, 1 ); // pop "xg"
3411 SWIG_fail;
3412 }
3413 if ( nx != Xlen )
3414 {
3415 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
3416 SWIG_fail;
3417 }
3418 cgrid111.nx = nx;
3419 }
3420 else
3421 {
3422 cgrid211.xg = read_double_Matrix( L, -1, &nx, &ny );
3423 if ( !cgrid211.xg )
3424 {
3425 lua_pop( L, 1 ); // pop "xg"
3426 SWIG_fail;
3427 }
3428 if ( ( nx != Xlen ) || ( ny != Ylen ) )
3429 {
3430 lua_pop( L, 1 ); // pop "xg"
3431 lua_pushfstring( L, "Vectors must match matrix." );
3432 SWIG_fail;
3433 }
3434 cgrid211.nx = nx;
3435 cgrid211.ny = ny;
3436 }
3437 lua_pop( L, 1 ); // pop "xg"
3438
3439 lua_pushstring( L, "yg" );
3440 lua_gettable( L, 8 );
3441 if ( !lua_istable( L, -1 ) )
3442 {
3443 lua_pop( L, 1 );
3444 lua_pushstring( L, "expected a table yg" );
3445 SWIG_fail;
3446 }
3447 lua_rawgeti( L, -1, 1 );
3448 if ( gridmode == 2 )
3449 {
3450 if ( !lua_istable( L, -1 ) )
3451 {
3452 lua_pop( L, 1 ); // pop "1"
3453 lua_pop( L, 1 ); // pop "yg"
3454 lua_pushstring( L, "expected a two dimensional array/table in yg" );
3455 SWIG_fail;
3456 }
3457 }
3458 else
3459 {
3460 if ( !lua_isnumber( L, -1 ) )
3461 {
3462 lua_pop( L, 1 ); // pop "1"
3463 lua_pop( L, 1 ); // pop "yg"
3464 lua_pushstring( L, "expected a one dimensional array/table in yg" );
3465 SWIG_fail;
3466 }
3467 }
3468 lua_pop( L, 1 ); // pop "1"
3469 if ( gridmode == 1 )
3470 {
3471 cgrid111.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
3472 if ( !cgrid111.yg )
3473 {
3474 lua_pop( L, 1 ); // pop "yg"
3475 SWIG_fail;
3476 }
3477 if ( ny != Ylen )
3478 {
3479 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
3480 SWIG_fail;
3481 }
3482 cgrid111.ny = ny;
3483 }
3484 else
3485 {
3486 cgrid211.yg = read_double_Matrix( L, -1, &nx, &ny );
3487 if ( !cgrid211.yg )
3488 {
3489 lua_pop( L, 1 ); // pop "xg"
3490 SWIG_fail;
3491 }
3492 if ( ( nx != Xlen ) || ( ny != Ylen ) )
3493 {
3494 lua_pop( L, 1 ); // pop "xg"
3495 lua_pushfstring( L, "Vectors must match matrix." );
3496 SWIG_fail;
3497 }
3498 // cgrid211.nx/ny already set
3499 }
3500 lua_pop( L, 1 ); // pop "yg"
3501
3502 if ( gridmode == 1 )
3503 arg11 = &cgrid111;
3504 else if ( gridmode == 2 )
3505 arg11 = &cgrid211;
3506 }
3507 }
3508 plcont((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,(double const *)arg8,arg9,arg10,arg11);
3509
3510 {
3511 int i;
3512
3513 if ( arg1 )
3514 {
3515 for ( i = 0; i < ii1; i++ )
3516 LUA_FREE_ARRAY( arg1[i] );
3517 LUA_FREE_ARRAY( arg1 );
3518 }
3519 }
3520 {
3521 LUA_FREE_ARRAY( arg8 );
3522 }
3523 {
3524 mypltr_funcstr[0] = '\0';
3525 }
3526 {
3527 int i;
3528
3529 LUA_FREE_ARRAY( cgrid111.xg );
3530 LUA_FREE_ARRAY( cgrid111.yg );
3531
3532 if ( cgrid211.xg )
3533 {
3534 for ( i = 0; i < Xlen; i++ )
3535 LUA_FREE_ARRAY( cgrid211.xg[i] );
3536 LUA_FREE_ARRAY( cgrid211.xg );
3537 }
3538 if ( cgrid211.yg )
3539 {
3540 for ( i = 0; i < Xlen; i++ )
3541 LUA_FREE_ARRAY( cgrid211.yg[i] );
3542 LUA_FREE_ARRAY( cgrid211.yg );
3543 }
3544 }
3545 return SWIG_arg;
3546
3547 if(0) SWIG_fail;
3548
3549 fail:
3550 {
3551 int i;
3552
3553 if ( arg1 )
3554 {
3555 for ( i = 0; i < ii1; i++ )
3556 LUA_FREE_ARRAY( arg1[i] );
3557 LUA_FREE_ARRAY( arg1 );
3558 }
3559 }
3560 {
3561 LUA_FREE_ARRAY( arg8 );
3562 }
3563 {
3564 mypltr_funcstr[0] = '\0';
3565 }
3566 {
3567 int i;
3568
3569 LUA_FREE_ARRAY( cgrid111.xg );
3570 LUA_FREE_ARRAY( cgrid111.yg );
3571
3572 if ( cgrid211.xg )
3573 {
3574 for ( i = 0; i < Xlen; i++ )
3575 LUA_FREE_ARRAY( cgrid211.xg[i] );
3576 LUA_FREE_ARRAY( cgrid211.xg );
3577 }
3578 if ( cgrid211.yg )
3579 {
3580 for ( i = 0; i < Xlen; i++ )
3581 LUA_FREE_ARRAY( cgrid211.yg[i] );
3582 LUA_FREE_ARRAY( cgrid211.yg );
3583 }
3584 }
3585 lua_error(L);
3586 return SWIG_arg;
3587 }
3588
3589
3590 static int _wrap_ctime(lua_State* L) {
3591 int SWIG_arg = 0;
3592 PLINT arg1 ;
3593 PLINT arg2 ;
3594 PLINT arg3 ;
3595 PLINT arg4 ;
3596 PLINT arg5 ;
3597 PLFLT arg6 ;
3598 PLFLT *arg7 = (PLFLT *) 0 ;
3599 PLFLT temp7 ;
3600
3601 arg7 = &temp7;
3602 SWIG_check_num_args("plctime",6,6)
3603 if(!lua_isnumber(L,1)) SWIG_fail_arg("plctime",1,"PLINT");
3604 if(!lua_isnumber(L,2)) SWIG_fail_arg("plctime",2,"PLINT");
3605 if(!lua_isnumber(L,3)) SWIG_fail_arg("plctime",3,"PLINT");
3606 if(!lua_isnumber(L,4)) SWIG_fail_arg("plctime",4,"PLINT");
3607 if(!lua_isnumber(L,5)) SWIG_fail_arg("plctime",5,"PLINT");
3608 if(!lua_isnumber(L,6)) SWIG_fail_arg("plctime",6,"PLFLT");
3609 arg1 = (PLINT)lua_tonumber(L, 1);
3610 arg2 = (PLINT)lua_tonumber(L, 2);
3611 arg3 = (PLINT)lua_tonumber(L, 3);
3612 arg4 = (PLINT)lua_tonumber(L, 4);
3613 arg5 = (PLINT)lua_tonumber(L, 5);
3614 arg6 = (PLFLT)lua_tonumber(L, 6);
3615 plctime(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
3616
3617 lua_pushnumber(L, (lua_Number) *arg7); SWIG_arg++;
3618 return SWIG_arg;
3619
3620 if(0) SWIG_fail;
3621
3622 fail:
3623 lua_error(L);
3624 return SWIG_arg;
3625 }
3626
3627
3628 static int _wrap_cpstrm(lua_State* L) {
3629 int SWIG_arg = 0;
3630 PLINT arg1 ;
3631 PLBOOL arg2 ;
3632
3633 SWIG_check_num_args("plcpstrm",2,2)
3634 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcpstrm",1,"PLINT");
3635 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcpstrm",2,"PLBOOL");
3636 arg1 = (PLINT)lua_tonumber(L, 1);
3637 arg2 = (PLBOOL)lua_tonumber(L, 2);
3638 plcpstrm(arg1,arg2);
3639
3640 return SWIG_arg;
3641
3642 if(0) SWIG_fail;
3643
3644 fail:
3645 lua_error(L);
3646 return SWIG_arg;
3647 }
3648
3649
3650 static int _wrap_plend(lua_State* L) {
3651 int SWIG_arg = 0;
3652
3653 SWIG_check_num_args("plend",0,0)
3654 plend();
3655
3656 return SWIG_arg;
3657
3658 if(0) SWIG_fail;
3659
3660 fail:
3661 lua_error(L);
3662 return SWIG_arg;
3663 }
3664
3665
3666 static int _wrap_plend1(lua_State* L) {
3667 int SWIG_arg = 0;
3668
3669 SWIG_check_num_args("plend1",0,0)
3670 plend1();
3671
3672 return SWIG_arg;
3673
3674 if(0) SWIG_fail;
3675
3676 fail:
3677 lua_error(L);
3678 return SWIG_arg;
3679 }
3680
3681
3682 static int _wrap_env(lua_State* L) {
3683 int SWIG_arg = 0;
3684 PLFLT arg1 ;
3685 PLFLT arg2 ;
3686 PLFLT arg3 ;
3687 PLFLT arg4 ;
3688 PLINT arg5 ;
3689 PLINT arg6 ;
3690
3691 SWIG_check_num_args("plenv",6,6)
3692 if(!lua_isnumber(L,1)) SWIG_fail_arg("plenv",1,"PLFLT");
3693 if(!lua_isnumber(L,2)) SWIG_fail_arg("plenv",2,"PLFLT");
3694 if(!lua_isnumber(L,3)) SWIG_fail_arg("plenv",3,"PLFLT");
3695 if(!lua_isnumber(L,4)) SWIG_fail_arg("plenv",4,"PLFLT");
3696 if(!lua_isnumber(L,5)) SWIG_fail_arg("plenv",5,"PLINT");
3697 if(!lua_isnumber(L,6)) SWIG_fail_arg("plenv",6,"PLINT");
3698 arg1 = (PLFLT)lua_tonumber(L, 1);
3699 arg2 = (PLFLT)lua_tonumber(L, 2);
3700 arg3 = (PLFLT)lua_tonumber(L, 3);
3701 arg4 = (PLFLT)lua_tonumber(L, 4);
3702 arg5 = (PLINT)lua_tonumber(L, 5);
3703 arg6 = (PLINT)lua_tonumber(L, 6);
3704 plenv(arg1,arg2,arg3,arg4,arg5,arg6);
3705
3706 return SWIG_arg;
3707
3708 if(0) SWIG_fail;
3709
3710 fail:
3711 lua_error(L);
3712 return SWIG_arg;
3713 }
3714
3715
3716 static int _wrap_env0(lua_State* L) {
3717 int SWIG_arg = 0;
3718 PLFLT arg1 ;
3719 PLFLT arg2 ;
3720 PLFLT arg3 ;
3721 PLFLT arg4 ;
3722 PLINT arg5 ;
3723 PLINT arg6 ;
3724
3725 SWIG_check_num_args("plenv0",6,6)
3726 if(!lua_isnumber(L,1)) SWIG_fail_arg("plenv0",1,"PLFLT");
3727 if(!lua_isnumber(L,2)) SWIG_fail_arg("plenv0",2,"PLFLT");
3728 if(!lua_isnumber(L,3)) SWIG_fail_arg("plenv0",3,"PLFLT");
3729 if(!lua_isnumber(L,4)) SWIG_fail_arg("plenv0",4,"PLFLT");
3730 if(!lua_isnumber(L,5)) SWIG_fail_arg("plenv0",5,"PLINT");
3731 if(!lua_isnumber(L,6)) SWIG_fail_arg("plenv0",6,"PLINT");
3732 arg1 = (PLFLT)lua_tonumber(L, 1);
3733 arg2 = (PLFLT)lua_tonumber(L, 2);
3734 arg3 = (PLFLT)lua_tonumber(L, 3);
3735 arg4 = (PLFLT)lua_tonumber(L, 4);
3736 arg5 = (PLINT)lua_tonumber(L, 5);
3737 arg6 = (PLINT)lua_tonumber(L, 6);
3738 plenv0(arg1,arg2,arg3,arg4,arg5,arg6);
3739
3740 return SWIG_arg;
3741
3742 if(0) SWIG_fail;
3743
3744 fail:
3745 lua_error(L);
3746 return SWIG_arg;
3747 }
3748
3749
3750 static int _wrap_eop(lua_State* L) {
3751 int SWIG_arg = 0;
3752
3753 SWIG_check_num_args("pleop",0,0)
3754 pleop();
3755
3756 return SWIG_arg;
3757
3758 if(0) SWIG_fail;
3759
3760 fail:
3761 lua_error(L);
3762 return SWIG_arg;
3763 }
3764
3765
3766 static int _wrap_errx(lua_State* L) {
3767 int SWIG_arg = 0;
3768 PLINT arg1 ;
3769 PLFLT *arg2 = (PLFLT *) 0 ;
3770 PLFLT *arg3 = (PLFLT *) 0 ;
3771 PLFLT *arg4 = (PLFLT *) 0 ;
3772 int temp3 ;
3773 int temp4 ;
3774
3775 SWIG_check_num_args("plerrx",3,3)
3776 {
3777 int temp;
3778 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
3779 if ( !arg2 )
3780 SWIG_fail;
3781 arg1 = Alen = temp;
3782 }
3783 {
3784 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
3785 if ( !arg3 )
3786 SWIG_fail;
3787 if ( temp3 != Alen )
3788 {
3789 lua_pushfstring( L, "Tables must be of same length." );
3790 SWIG_fail;
3791 }
3792 }
3793 {
3794 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
3795 if ( !arg4 )
3796 SWIG_fail;
3797 if ( temp4 != Alen )
3798 {
3799 lua_pushfstring( L, "Tables must be of same length." );
3800 SWIG_fail;
3801 }
3802 }
3803 plerrx(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
3804
3805 {
3806 LUA_FREE_ARRAY( arg2 );
3807 }
3808 {
3809 LUA_FREE_ARRAY( arg3 );
3810 }
3811 {
3812 LUA_FREE_ARRAY( arg4 );
3813 }
3814 return SWIG_arg;
3815
3816 if(0) SWIG_fail;
3817
3818 fail:
3819 {
3820 LUA_FREE_ARRAY( arg2 );
3821 }
3822 {
3823 LUA_FREE_ARRAY( arg3 );
3824 }
3825 {
3826 LUA_FREE_ARRAY( arg4 );
3827 }
3828 lua_error(L);
3829 return SWIG_arg;
3830 }
3831
3832
3833 static int _wrap_erry(lua_State* L) {
3834 int SWIG_arg = 0;
3835 PLINT arg1 ;
3836 PLFLT *arg2 = (PLFLT *) 0 ;
3837 PLFLT *arg3 = (PLFLT *) 0 ;
3838 PLFLT *arg4 = (PLFLT *) 0 ;
3839 int temp3 ;
3840 int temp4 ;
3841
3842 SWIG_check_num_args("plerry",3,3)
3843 {
3844 int temp;
3845 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
3846 if ( !arg2 )
3847 SWIG_fail;
3848 arg1 = Alen = temp;
3849 }
3850 {
3851 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
3852 if ( !arg3 )
3853 SWIG_fail;
3854 if ( temp3 != Alen )
3855 {
3856 lua_pushfstring( L, "Tables must be of same length." );
3857 SWIG_fail;
3858 }
3859 }
3860 {
3861 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
3862 if ( !arg4 )
3863 SWIG_fail;
3864 if ( temp4 != Alen )
3865 {
3866 lua_pushfstring( L, "Tables must be of same length." );
3867 SWIG_fail;
3868 }
3869 }
3870 plerry(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
3871
3872 {
3873 LUA_FREE_ARRAY( arg2 );
3874 }
3875 {
3876 LUA_FREE_ARRAY( arg3 );
3877 }
3878 {
3879 LUA_FREE_ARRAY( arg4 );
3880 }
3881 return SWIG_arg;
3882
3883 if(0) SWIG_fail;
3884
3885 fail:
3886 {
3887 LUA_FREE_ARRAY( arg2 );
3888 }
3889 {
3890 LUA_FREE_ARRAY( arg3 );
3891 }
3892 {
3893 LUA_FREE_ARRAY( arg4 );
3894 }
3895 lua_error(L);
3896 return SWIG_arg;
3897 }
3898
3899
3900 static int _wrap_famadv(lua_State* L) {
3901 int SWIG_arg = 0;
3902
3903 SWIG_check_num_args("plfamadv",0,0)
3904 plfamadv();
3905
3906 return SWIG_arg;
3907
3908 if(0) SWIG_fail;
3909
3910 fail:
3911 lua_error(L);
3912 return SWIG_arg;
3913 }
3914
3915
3916 static int _wrap_fill(lua_State* L) {
3917 int SWIG_arg = 0;
3918 PLINT arg1 ;
3919 PLFLT *arg2 = (PLFLT *) 0 ;
3920 PLFLT *arg3 = (PLFLT *) 0 ;
3921 int temp3 ;
3922
3923 SWIG_check_num_args("plfill",2,2)
3924 {
3925 int temp;
3926 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
3927 if ( !arg2 )
3928 SWIG_fail;
3929 arg1 = Alen = temp;
3930 }
3931 {
3932 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
3933 if ( !arg3 )
3934 SWIG_fail;
3935 if ( temp3 != Alen )
3936 {
3937 lua_pushfstring( L, "Tables must be of same length." );
3938 SWIG_fail;
3939 }
3940 }
3941 plfill(arg1,(double const *)arg2,(double const *)arg3);
3942
3943 {
3944 LUA_FREE_ARRAY( arg2 );
3945 }
3946 {
3947 LUA_FREE_ARRAY( arg3 );
3948 }
3949 return SWIG_arg;
3950
3951 if(0) SWIG_fail;
3952
3953 fail:
3954 {
3955 LUA_FREE_ARRAY( arg2 );
3956 }
3957 {
3958 LUA_FREE_ARRAY( arg3 );
3959 }
3960 lua_error(L);
3961 return SWIG_arg;
3962 }
3963
3964
3965 static int _wrap_fill3(lua_State* L) {
3966 int SWIG_arg = 0;
3967 PLINT arg1 ;
3968 PLFLT *arg2 = (PLFLT *) 0 ;
3969 PLFLT *arg3 = (PLFLT *) 0 ;
3970 PLFLT *arg4 = (PLFLT *) 0 ;
3971 int temp3 ;
3972 int temp4 ;
3973
3974 SWIG_check_num_args("plfill3",3,3)
3975 {
3976 int temp;
3977 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
3978 if ( !arg2 )
3979 SWIG_fail;
3980 arg1 = Alen = temp;
3981 }
3982 {
3983 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
3984 if ( !arg3 )
3985 SWIG_fail;
3986 if ( temp3 != Alen )
3987 {
3988 lua_pushfstring( L, "Tables must be of same length." );
3989 SWIG_fail;
3990 }
3991 }
3992 {
3993 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
3994 if ( !arg4 )
3995 SWIG_fail;
3996 if ( temp4 != Alen )
3997 {
3998 lua_pushfstring( L, "Tables must be of same length." );
3999 SWIG_fail;
4000 }
4001 }
4002 plfill3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
4003
4004 {
4005 LUA_FREE_ARRAY( arg2 );
4006 }
4007 {
4008 LUA_FREE_ARRAY( arg3 );
4009 }
4010 {
4011 LUA_FREE_ARRAY( arg4 );
4012 }
4013 return SWIG_arg;
4014
4015 if(0) SWIG_fail;
4016
4017 fail:
4018 {
4019 LUA_FREE_ARRAY( arg2 );
4020 }
4021 {
4022 LUA_FREE_ARRAY( arg3 );
4023 }
4024 {
4025 LUA_FREE_ARRAY( arg4 );
4026 }
4027 lua_error(L);
4028 return SWIG_arg;
4029 }
4030
4031
4032 static int _wrap_gradient(lua_State* L) {
4033 int SWIG_arg = 0;
4034 PLINT arg1 ;
4035 PLFLT *arg2 = (PLFLT *) 0 ;
4036 PLFLT *arg3 = (PLFLT *) 0 ;
4037 PLFLT arg4 ;
4038 int temp3 ;
4039
4040 SWIG_check_num_args("plgradient",3,3)
4041 if(!lua_isnumber(L,3)) SWIG_fail_arg("plgradient",3,"PLFLT");
4042 {
4043 int temp;
4044 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4045 if ( !arg2 )
4046 SWIG_fail;
4047 arg1 = Alen = temp;
4048 }
4049 {
4050 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
4051 if ( !arg3 )
4052 SWIG_fail;
4053 if ( temp3 != Alen )
4054 {
4055 lua_pushfstring( L, "Tables must be of same length." );
4056 SWIG_fail;
4057 }
4058 }
4059 arg4 = (PLFLT)lua_tonumber(L, 3);
4060 plgradient(arg1,(double const *)arg2,(double const *)arg3,arg4);
4061
4062 {
4063 LUA_FREE_ARRAY( arg2 );
4064 }
4065 {
4066 LUA_FREE_ARRAY( arg3 );
4067 }
4068 return SWIG_arg;
4069
4070 if(0) SWIG_fail;
4071
4072 fail:
4073 {
4074 LUA_FREE_ARRAY( arg2 );
4075 }
4076 {
4077 LUA_FREE_ARRAY( arg3 );
4078 }
4079 lua_error(L);
4080 return SWIG_arg;
4081 }
4082
4083
4084 static int _wrap_flush(lua_State* L) {
4085 int SWIG_arg = 0;
4086
4087 SWIG_check_num_args("plflush",0,0)
4088 plflush();
4089
4090 return SWIG_arg;
4091
4092 if(0) SWIG_fail;
4093
4094 fail:
4095 lua_error(L);
4096 return SWIG_arg;
4097 }
4098
4099
4100 static int _wrap_font(lua_State* L) {
4101 int SWIG_arg = 0;
4102 PLINT arg1 ;
4103
4104 SWIG_check_num_args("plfont",1,1)
4105 if(!lua_isnumber(L,1)) SWIG_fail_arg("plfont",1,"PLINT");
4106 arg1 = (PLINT)lua_tonumber(L, 1);
4107 plfont(arg1);
4108
4109 return SWIG_arg;
4110
4111 if(0) SWIG_fail;
4112
4113 fail:
4114 lua_error(L);
4115 return SWIG_arg;
4116 }
4117
4118
4119 static int _wrap_fontld(lua_State* L) {
4120 int SWIG_arg = 0;
4121 PLINT arg1 ;
4122
4123 SWIG_check_num_args("plfontld",1,1)
4124 if(!lua_isnumber(L,1)) SWIG_fail_arg("plfontld",1,"PLINT");
4125 arg1 = (PLINT)lua_tonumber(L, 1);
4126 plfontld(arg1);
4127
4128 return SWIG_arg;
4129
4130 if(0) SWIG_fail;
4131
4132 fail:
4133 lua_error(L);
4134 return SWIG_arg;
4135 }
4136
4137
4138 static int _wrap_gchr(lua_State* L) {
4139 int SWIG_arg = 0;
4140 PLFLT *arg1 = (PLFLT *) 0 ;
4141 PLFLT *arg2 = (PLFLT *) 0 ;
4142 PLFLT temp1 ;
4143 PLFLT temp2 ;
4144
4145 arg1 = &temp1;
4146 arg2 = &temp2;
4147 SWIG_check_num_args("plgchr",0,0)
4148 plgchr(arg1,arg2);
4149
4150 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4151 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4152 return SWIG_arg;
4153
4154 if(0) SWIG_fail;
4155
4156 fail:
4157 lua_error(L);
4158 return SWIG_arg;
4159 }
4160
4161
4162 static int _wrap_gcol0(lua_State* L) {
4163 int SWIG_arg = 0;
4164 PLINT arg1 ;
4165 PLINT *arg2 = (PLINT *) 0 ;
4166 PLINT *arg3 = (PLINT *) 0 ;
4167 PLINT *arg4 = (PLINT *) 0 ;
4168 PLINT temp2 ;
4169 PLINT temp3 ;
4170 PLINT temp4 ;
4171
4172 arg2 = &temp2;
4173 arg3 = &temp3;
4174 arg4 = &temp4;
4175 SWIG_check_num_args("plgcol0",1,1)
4176 if(!lua_isnumber(L,1)) SWIG_fail_arg("plgcol0",1,"PLINT");
4177 arg1 = (PLINT)lua_tonumber(L, 1);
4178 plgcol0(arg1,arg2,arg3,arg4);
4179
4180 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4181 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4182 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4183 return SWIG_arg;
4184
4185 if(0) SWIG_fail;
4186
4187 fail:
4188 lua_error(L);
4189 return SWIG_arg;
4190 }
4191
4192
4193 static int _wrap_gcol0a(lua_State* L) {
4194 int SWIG_arg = 0;
4195 PLINT arg1 ;
4196 PLINT *arg2 = (PLINT *) 0 ;
4197 PLINT *arg3 = (PLINT *) 0 ;
4198 PLINT *arg4 = (PLINT *) 0 ;
4199 PLFLT *arg5 = (PLFLT *) 0 ;
4200 PLINT temp2 ;
4201 PLINT temp3 ;
4202 PLINT temp4 ;
4203 PLFLT temp5 ;
4204
4205 arg2 = &temp2;
4206 arg3 = &temp3;
4207 arg4 = &temp4;
4208 arg5 = &temp5;
4209 SWIG_check_num_args("plgcol0a",1,1)
4210 if(!lua_isnumber(L,1)) SWIG_fail_arg("plgcol0a",1,"PLINT");
4211 arg1 = (PLINT)lua_tonumber(L, 1);
4212 plgcol0a(arg1,arg2,arg3,arg4,arg5);
4213
4214 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4215 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4216 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4217 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
4218 return SWIG_arg;
4219
4220 if(0) SWIG_fail;
4221
4222 fail:
4223 lua_error(L);
4224 return SWIG_arg;
4225 }
4226
4227
4228 static int _wrap_gcolbg(lua_State* L) {
4229 int SWIG_arg = 0;
4230 PLINT *arg1 = (PLINT *) 0 ;
4231 PLINT *arg2 = (PLINT *) 0 ;
4232 PLINT *arg3 = (PLINT *) 0 ;
4233 PLINT temp1 ;
4234 PLINT temp2 ;
4235 PLINT temp3 ;
4236
4237 arg1 = &temp1;
4238 arg2 = &temp2;
4239 arg3 = &temp3;
4240 SWIG_check_num_args("plgcolbg",0,0)
4241 plgcolbg(arg1,arg2,arg3);
4242
4243 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4244 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4245 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4246 return SWIG_arg;
4247
4248 if(0) SWIG_fail;
4249
4250 fail:
4251 lua_error(L);
4252 return SWIG_arg;
4253 }
4254
4255
4256 static int _wrap_gcolbga(lua_State* L) {
4257 int SWIG_arg = 0;
4258 PLINT *arg1 = (PLINT *) 0 ;
4259 PLINT *arg2 = (PLINT *) 0 ;
4260 PLINT *arg3 = (PLINT *) 0 ;
4261 PLFLT *arg4 = (PLFLT *) 0 ;
4262 PLINT temp1 ;
4263 PLINT temp2 ;
4264 PLINT temp3 ;
4265 PLFLT temp4 ;
4266
4267 arg1 = &temp1;
4268 arg2 = &temp2;
4269 arg3 = &temp3;
4270 arg4 = &temp4;
4271 SWIG_check_num_args("plgcolbga",0,0)
4272 plgcolbga(arg1,arg2,arg3,arg4);
4273
4274 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4275 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4276 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4277 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4278 return SWIG_arg;
4279
4280 if(0) SWIG_fail;
4281
4282 fail:
4283 lua_error(L);
4284 return SWIG_arg;
4285 }
4286
4287
4288 static int _wrap_gcompression(lua_State* L) {
4289 int SWIG_arg = 0;
4290 PLINT *arg1 = (PLINT *) 0 ;
4291 PLINT temp1 ;
4292
4293 arg1 = &temp1;
4294 SWIG_check_num_args("plgcompression",0,0)
4295 plgcompression(arg1);
4296
4297 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4298 return SWIG_arg;
4299
4300 if(0) SWIG_fail;
4301
4302 fail:
4303 lua_error(L);
4304 return SWIG_arg;
4305 }
4306
4307
4308 static int _wrap_gdev(lua_State* L) {
4309 int SWIG_arg = 0;
4310 char *arg1 = (char *) 0 ;
4311 char buff1[1000] ;
4312
4313 {
4314 arg1 = buff1;
4315 }
4316 SWIG_check_num_args("plgdev",0,0)
4317 plgdev(arg1);
4318
4319 {
4320 lua_pushstring( L, arg1 );
4321 SWIG_arg++;
4322 }
4323 return SWIG_arg;
4324
4325 if(0) SWIG_fail;
4326
4327 fail:
4328 lua_error(L);
4329 return SWIG_arg;
4330 }
4331
4332
4333 static int _wrap_gdidev(lua_State* L) {
4334 int SWIG_arg = 0;
4335 PLFLT *arg1 = (PLFLT *) 0 ;
4336 PLFLT *arg2 = (PLFLT *) 0 ;
4337 PLFLT *arg3 = (PLFLT *) 0 ;
4338 PLFLT *arg4 = (PLFLT *) 0 ;
4339 PLFLT temp1 ;
4340 PLFLT temp2 ;
4341 PLFLT temp3 ;
4342 PLFLT temp4 ;
4343
4344 arg1 = &temp1;
4345 arg2 = &temp2;
4346 arg3 = &temp3;
4347 arg4 = &temp4;
4348 SWIG_check_num_args("plgdidev",0,0)
4349 plgdidev(arg1,arg2,arg3,arg4);
4350
4351 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4352 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4353 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4354 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4355 return SWIG_arg;
4356
4357 if(0) SWIG_fail;
4358
4359 fail:
4360 lua_error(L);
4361 return SWIG_arg;
4362 }
4363
4364
4365 static int _wrap_gdiori(lua_State* L) {
4366 int SWIG_arg = 0;
4367 PLFLT *arg1 = (PLFLT *) 0 ;
4368 PLFLT temp1 ;
4369
4370 arg1 = &temp1;
4371 SWIG_check_num_args("plgdiori",0,0)
4372 plgdiori(arg1);
4373
4374 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4375 return SWIG_arg;
4376
4377 if(0) SWIG_fail;
4378
4379 fail:
4380 lua_error(L);
4381 return SWIG_arg;
4382 }
4383
4384
4385 static int _wrap_gdiplt(lua_State* L) {
4386 int SWIG_arg = 0;
4387 PLFLT *arg1 = (PLFLT *) 0 ;
4388 PLFLT *arg2 = (PLFLT *) 0 ;
4389 PLFLT *arg3 = (PLFLT *) 0 ;
4390 PLFLT *arg4 = (PLFLT *) 0 ;
4391 PLFLT temp1 ;
4392 PLFLT temp2 ;
4393 PLFLT temp3 ;
4394 PLFLT temp4 ;
4395
4396 arg1 = &temp1;
4397 arg2 = &temp2;
4398 arg3 = &temp3;
4399 arg4 = &temp4;
4400 SWIG_check_num_args("plgdiplt",0,0)
4401 plgdiplt(arg1,arg2,arg3,arg4);
4402
4403 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4404 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4405 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4406 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4407 return SWIG_arg;
4408
4409 if(0) SWIG_fail;
4410
4411 fail:
4412 lua_error(L);
4413 return SWIG_arg;
4414 }
4415
4416
4417 static int _wrap_gfam(lua_State* L) {
4418 int SWIG_arg = 0;
4419 PLINT *arg1 = (PLINT *) 0 ;
4420 PLINT *arg2 = (PLINT *) 0 ;
4421 PLINT *arg3 = (PLINT *) 0 ;
4422 PLINT temp1 ;
4423 PLINT temp2 ;
4424 PLINT temp3 ;
4425
4426 arg1 = &temp1;
4427 arg2 = &temp2;
4428 arg3 = &temp3;
4429 SWIG_check_num_args("plgfam",0,0)
4430 plgfam(arg1,arg2,arg3);
4431
4432 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4433 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4434 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4435 return SWIG_arg;
4436
4437 if(0) SWIG_fail;
4438
4439 fail:
4440 lua_error(L);
4441 return SWIG_arg;
4442 }
4443
4444
4445 static int _wrap_gfci(lua_State* L) {
4446 int SWIG_arg = 0;
4447 PLUNICODE *arg1 = (PLUNICODE *) 0 ;
4448 PLUNICODE temp1 ;
4449
4450 arg1 = &temp1;
4451 SWIG_check_num_args("plgfci",0,0)
4452 plgfci(arg1);
4453
4454 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4455 return SWIG_arg;
4456
4457 if(0) SWIG_fail;
4458
4459 fail:
4460 lua_error(L);
4461 return SWIG_arg;
4462 }
4463
4464
4465 static int _wrap_gfnam(lua_State* L) {
4466 int SWIG_arg = 0;
4467 char *arg1 = (char *) 0 ;
4468 char buff1[1000] ;
4469
4470 {
4471 arg1 = buff1;
4472 }
4473 SWIG_check_num_args("plgfnam",0,0)
4474 plgfnam(arg1);
4475
4476 {
4477 lua_pushstring( L, arg1 );
4478 SWIG_arg++;
4479 }
4480 return SWIG_arg;
4481
4482 if(0) SWIG_fail;
4483
4484 fail:
4485 lua_error(L);
4486 return SWIG_arg;
4487 }
4488
4489
4490 static int _wrap_gfont(lua_State* L) {
4491 int SWIG_arg = 0;
4492 PLINT *arg1 = (PLINT *) 0 ;
4493 PLINT *arg2 = (PLINT *) 0 ;
4494 PLINT *arg3 = (PLINT *) 0 ;
4495 PLINT temp1 ;
4496 PLINT temp2 ;
4497 PLINT temp3 ;
4498
4499 arg1 = &temp1;
4500 arg2 = &temp2;
4501 arg3 = &temp3;
4502 SWIG_check_num_args("plgfont",0,0)
4503 plgfont(arg1,arg2,arg3);
4504
4505 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4506 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4507 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4508 return SWIG_arg;
4509
4510 if(0) SWIG_fail;
4511
4512 fail:
4513 lua_error(L);
4514 return SWIG_arg;
4515 }
4516
4517
4518 static int _wrap_glevel(lua_State* L) {
4519 int SWIG_arg = 0;
4520 PLINT *arg1 = (PLINT *) 0 ;
4521 PLINT temp1 ;
4522
4523 arg1 = &temp1;
4524 SWIG_check_num_args("plglevel",0,0)
4525 plglevel(arg1);
4526
4527 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4528 return SWIG_arg;
4529
4530 if(0) SWIG_fail;
4531
4532 fail:
4533 lua_error(L);
4534 return SWIG_arg;
4535 }
4536
4537
4538 static int _wrap_gpage(lua_State* L) {
4539 int SWIG_arg = 0;
4540 PLFLT *arg1 = (PLFLT *) 0 ;
4541 PLFLT *arg2 = (PLFLT *) 0 ;
4542 PLINT *arg3 = (PLINT *) 0 ;
4543 PLINT *arg4 = (PLINT *) 0 ;
4544 PLINT *arg5 = (PLINT *) 0 ;
4545 PLINT *arg6 = (PLINT *) 0 ;
4546 PLFLT temp1 ;
4547 PLFLT temp2 ;
4548 PLINT temp3 ;
4549 PLINT temp4 ;
4550 PLINT temp5 ;
4551 PLINT temp6 ;
4552
4553 arg1 = &temp1;
4554 arg2 = &temp2;
4555 arg3 = &temp3;
4556 arg4 = &temp4;
4557 arg5 = &temp5;
4558 arg6 = &temp6;
4559 SWIG_check_num_args("plgpage",0,0)
4560 plgpage(arg1,arg2,arg3,arg4,arg5,arg6);
4561
4562 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4563 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4564 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4565 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4566 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
4567 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
4568 return SWIG_arg;
4569
4570 if(0) SWIG_fail;
4571
4572 fail:
4573 lua_error(L);
4574 return SWIG_arg;
4575 }
4576
4577
4578 static int _wrap_gra(lua_State* L) {
4579 int SWIG_arg = 0;
4580
4581 SWIG_check_num_args("plgra",0,0)
4582 plgra();
4583
4584 return SWIG_arg;
4585
4586 if(0) SWIG_fail;
4587
4588 fail:
4589 lua_error(L);
4590 return SWIG_arg;
4591 }
4592
4593
4594 static int _wrap_griddata(lua_State* L) {
4595 int SWIG_arg = 0;
4596 PLFLT *arg1 = (PLFLT *) 0 ;
4597 PLFLT *arg2 = (PLFLT *) 0 ;
4598 PLFLT *arg3 = (PLFLT *) 0 ;
4599 PLINT arg4 ;
4600 PLFLT *arg5 = (PLFLT *) 0 ;
4601 PLINT arg6 ;
4602 PLFLT *arg7 = (PLFLT *) 0 ;
4603 PLINT arg8 ;
4604 PLFLT **arg9 = (PLFLT **) 0 ;
4605 PLINT arg10 ;
4606 PLFLT arg11 ;
4607 int temp2 ;
4608
4609 SWIG_check_num_args("plgriddata",7,7)
4610 if(!lua_isnumber(L,6)) SWIG_fail_arg("plgriddata",6,"PLINT");
4611 if(!lua_isnumber(L,7)) SWIG_fail_arg("plgriddata",7,"PLFLT");
4612 {
4613 int temp;
4614 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4615 if ( !arg1 )
4616 SWIG_fail;
4617 Alen = temp;
4618 }
4619 {
4620 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp2 );
4621 if ( !arg2 )
4622 SWIG_fail;
4623 if ( temp2 != Alen )
4624 {
4625 lua_pushfstring( L, "Tables must be of same length." );
4626 SWIG_fail;
4627 }
4628 }
4629 {
4630 int temp;
4631 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp );
4632 if ( !arg3 )
4633 SWIG_fail;
4634 if ( temp != Alen )
4635 {
4636 lua_pushfstring( L, "Tables must be of same length." );
4637 SWIG_fail;
4638 }
4639 arg4 = temp;
4640 }
4641 {
4642 int temp;
4643 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
4644 if ( !arg5 )
4645 SWIG_fail;
4646 arg6 = Xlen = temp;
4647 }
4648 {
4649 int temp, i;
4650
4651 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
4652 if ( !arg7 )
4653 SWIG_fail;
4654 arg8 = Ylen = temp;
4655
4656 arg9 = LUA_ALLOC_ARRAY( PLFLT *, Xlen );
4657 if ( !arg9 )
4658 SWIG_fail;
4659 for ( i = 0; i < Xlen; i++ )
4660 arg9[i] = NULL;
4661
4662 for ( i = 0; i < Xlen; i++ )
4663 {
4664 arg9[i] = LUA_ALLOC_ARRAY( PLFLT, Ylen );
4665 if ( !arg9[i] )
4666 SWIG_fail;
4667 }
4668 }
4669 arg10 = (PLINT)lua_tonumber(L, 6);
4670 arg11 = (PLFLT)lua_tonumber(L, 7);
4671 plgriddata((double const *)arg1,(double const *)arg2,(double const *)arg3,arg4,(double const *)arg5,arg6,(double const *)arg7,arg8,arg9,arg10,arg11);
4672
4673 {
4674 int i;
4675
4676 if ( arg9 )
4677 {
4678 lua_newtable( L );
4679 for ( i = 0; i < Xlen; i++ )
4680 {
4681 SWIG_write_double_num_array( L, arg9[i], Ylen );
4682 lua_rawseti( L, -2, i + 1 ); // -1 is the inner table, -2 is the outer table
4683 }
4684 SWIG_arg++;
4685 }
4686 }
4687 {
4688 LUA_FREE_ARRAY( arg1 );
4689 }
4690 {
4691 LUA_FREE_ARRAY( arg2 );
4692 }
4693 {
4694 LUA_FREE_ARRAY( arg3 );
4695 }
4696 {
4697 LUA_FREE_ARRAY( arg5 );
4698 }
4699 {
4700 int i;
4701
4702 LUA_FREE_ARRAY( arg7 );
4703
4704 if ( arg9 )
4705 {
4706 for ( i = 0; i < Xlen; i++ )
4707 LUA_FREE_ARRAY( arg9[i] );
4708 LUA_FREE_ARRAY( arg9 );
4709 }
4710 }
4711 return SWIG_arg;
4712
4713 if(0) SWIG_fail;
4714
4715 fail:
4716 {
4717 LUA_FREE_ARRAY( arg1 );
4718 }
4719 {
4720 LUA_FREE_ARRAY( arg2 );
4721 }
4722 {
4723 LUA_FREE_ARRAY( arg3 );
4724 }
4725 {
4726 LUA_FREE_ARRAY( arg5 );
4727 }
4728 {
4729 int i;
4730
4731 LUA_FREE_ARRAY( arg7 );
4732
4733 if ( arg9 )
4734 {
4735 for ( i = 0; i < Xlen; i++ )
4736 LUA_FREE_ARRAY( arg9[i] );
4737 LUA_FREE_ARRAY( arg9 );
4738 }
4739 }
4740 lua_error(L);
4741 return SWIG_arg;
4742 }
4743
4744
4745 static int _wrap_gspa(lua_State* L) {
4746 int SWIG_arg = 0;
4747 PLFLT *arg1 = (PLFLT *) 0 ;
4748 PLFLT *arg2 = (PLFLT *) 0 ;
4749 PLFLT *arg3 = (PLFLT *) 0 ;
4750 PLFLT *arg4 = (PLFLT *) 0 ;
4751 PLFLT temp1 ;
4752 PLFLT temp2 ;
4753 PLFLT temp3 ;
4754 PLFLT temp4 ;
4755
4756 arg1 = &temp1;
4757 arg2 = &temp2;
4758 arg3 = &temp3;
4759 arg4 = &temp4;
4760 SWIG_check_num_args("plgspa",0,0)
4761 plgspa(arg1,arg2,arg3,arg4);
4762
4763 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4764 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4765 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4766 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4767 return SWIG_arg;
4768
4769 if(0) SWIG_fail;
4770
4771 fail:
4772 lua_error(L);
4773 return SWIG_arg;
4774 }
4775
4776
4777 static int _wrap_gstrm(lua_State* L) {
4778 int SWIG_arg = 0;
4779 PLINT *arg1 = (PLINT *) 0 ;
4780 PLINT temp1 ;
4781
4782 arg1 = &temp1;
4783 SWIG_check_num_args("plgstrm",0,0)
4784 plgstrm(arg1);
4785
4786 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4787 return SWIG_arg;
4788
4789 if(0) SWIG_fail;
4790
4791 fail:
4792 lua_error(L);
4793 return SWIG_arg;
4794 }
4795
4796
4797 static int _wrap_gver(lua_State* L) {
4798 int SWIG_arg = 0;
4799 char *arg1 = (char *) 0 ;
4800 char buff1[1000] ;
4801
4802 {
4803 arg1 = buff1;
4804 }
4805 SWIG_check_num_args("plgver",0,0)
4806 plgver(arg1);
4807
4808 {
4809 lua_pushstring( L, arg1 );
4810 SWIG_arg++;
4811 }
4812 return SWIG_arg;
4813
4814 if(0) SWIG_fail;
4815
4816 fail:
4817 lua_error(L);
4818 return SWIG_arg;
4819 }
4820
4821
4822 static int _wrap_gvpd(lua_State* L) {
4823 int SWIG_arg = 0;
4824 PLFLT *arg1 = (PLFLT *) 0 ;
4825 PLFLT *arg2 = (PLFLT *) 0 ;
4826 PLFLT *arg3 = (PLFLT *) 0 ;
4827 PLFLT *arg4 = (PLFLT *) 0 ;
4828 PLFLT temp1 ;
4829 PLFLT temp2 ;
4830 PLFLT temp3 ;
4831 PLFLT temp4 ;
4832
4833 arg1 = &temp1;
4834 arg2 = &temp2;
4835 arg3 = &temp3;
4836 arg4 = &temp4;
4837 SWIG_check_num_args("plgvpd",0,0)
4838 plgvpd(arg1,arg2,arg3,arg4);
4839
4840 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4841 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4842 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4843 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4844 return SWIG_arg;
4845
4846 if(0) SWIG_fail;
4847
4848 fail:
4849 lua_error(L);
4850 return SWIG_arg;
4851 }
4852
4853
4854 static int _wrap_gvpw(lua_State* L) {
4855 int SWIG_arg = 0;
4856 PLFLT *arg1 = (PLFLT *) 0 ;
4857 PLFLT *arg2 = (PLFLT *) 0 ;
4858 PLFLT *arg3 = (PLFLT *) 0 ;
4859 PLFLT *arg4 = (PLFLT *) 0 ;
4860 PLFLT temp1 ;
4861 PLFLT temp2 ;
4862 PLFLT temp3 ;
4863 PLFLT temp4 ;
4864
4865 arg1 = &temp1;
4866 arg2 = &temp2;
4867 arg3 = &temp3;
4868 arg4 = &temp4;
4869 SWIG_check_num_args("plgvpw",0,0)
4870 plgvpw(arg1,arg2,arg3,arg4);
4871
4872 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4873 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4874 lua_pushnumber(L, (lua_Number) *arg3); SWIG_arg++;
4875 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
4876 return SWIG_arg;
4877
4878 if(0) SWIG_fail;
4879
4880 fail:
4881 lua_error(L);
4882 return SWIG_arg;
4883 }
4884
4885
4886 static int _wrap_gxax(lua_State* L) {
4887 int SWIG_arg = 0;
4888 PLINT *arg1 = (PLINT *) 0 ;
4889 PLINT *arg2 = (PLINT *) 0 ;
4890 PLINT temp1 ;
4891 PLINT temp2 ;
4892
4893 arg1 = &temp1;
4894 arg2 = &temp2;
4895 SWIG_check_num_args("plgxax",0,0)
4896 plgxax(arg1,arg2);
4897
4898 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4899 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4900 return SWIG_arg;
4901
4902 if(0) SWIG_fail;
4903
4904 fail:
4905 lua_error(L);
4906 return SWIG_arg;
4907 }
4908
4909
4910 static int _wrap_gyax(lua_State* L) {
4911 int SWIG_arg = 0;
4912 PLINT *arg1 = (PLINT *) 0 ;
4913 PLINT *arg2 = (PLINT *) 0 ;
4914 PLINT temp1 ;
4915 PLINT temp2 ;
4916
4917 arg1 = &temp1;
4918 arg2 = &temp2;
4919 SWIG_check_num_args("plgyax",0,0)
4920 plgyax(arg1,arg2);
4921
4922 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4923 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4924 return SWIG_arg;
4925
4926 if(0) SWIG_fail;
4927
4928 fail:
4929 lua_error(L);
4930 return SWIG_arg;
4931 }
4932
4933
4934 static int _wrap_gzax(lua_State* L) {
4935 int SWIG_arg = 0;
4936 PLINT *arg1 = (PLINT *) 0 ;
4937 PLINT *arg2 = (PLINT *) 0 ;
4938 PLINT temp1 ;
4939 PLINT temp2 ;
4940
4941 arg1 = &temp1;
4942 arg2 = &temp2;
4943 SWIG_check_num_args("plgzax",0,0)
4944 plgzax(arg1,arg2);
4945
4946 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
4947 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
4948 return SWIG_arg;
4949
4950 if(0) SWIG_fail;
4951
4952 fail:
4953 lua_error(L);
4954 return SWIG_arg;
4955 }
4956
4957
4958 static int _wrap_hist(lua_State* L) {
4959 int SWIG_arg = 0;
4960 PLINT arg1 ;
4961 PLFLT *arg2 = (PLFLT *) 0 ;
4962 PLFLT arg3 ;
4963 PLFLT arg4 ;
4964 PLINT arg5 ;
4965 PLINT arg6 ;
4966
4967 SWIG_check_num_args("plhist",5,5)
4968 if(!lua_isnumber(L,2)) SWIG_fail_arg("plhist",2,"PLFLT");
4969 if(!lua_isnumber(L,3)) SWIG_fail_arg("plhist",3,"PLFLT");
4970 if(!lua_isnumber(L,4)) SWIG_fail_arg("plhist",4,"PLINT");
4971 if(!lua_isnumber(L,5)) SWIG_fail_arg("plhist",5,"PLINT");
4972 {
4973 int temp;
4974 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
4975 if ( !arg2 )
4976 SWIG_fail;
4977 arg1 = Alen = temp;
4978 }
4979 arg3 = (PLFLT)lua_tonumber(L, 2);
4980 arg4 = (PLFLT)lua_tonumber(L, 3);
4981 arg5 = (PLINT)lua_tonumber(L, 4);
4982 arg6 = (PLINT)lua_tonumber(L, 5);
4983 plhist(arg1,(double const *)arg2,arg3,arg4,arg5,arg6);
4984
4985 {
4986 LUA_FREE_ARRAY( arg2 );
4987 }
4988 return SWIG_arg;
4989
4990 if(0) SWIG_fail;
4991
4992 fail:
4993 {
4994 LUA_FREE_ARRAY( arg2 );
4995 }
4996 lua_error(L);
4997 return SWIG_arg;
4998 }
4999
5000
5001 static int _wrap_hlsrgb(lua_State* L) {
5002 int SWIG_arg = 0;
5003 PLFLT arg1 ;
5004 PLFLT arg2 ;
5005 PLFLT arg3 ;
5006 PLFLT *arg4 = (PLFLT *) 0 ;
5007 PLFLT *arg5 = (PLFLT *) 0 ;
5008 PLFLT *arg6 = (PLFLT *) 0 ;
5009 PLFLT temp4 ;
5010 PLFLT temp5 ;
5011 PLFLT temp6 ;
5012
5013 arg4 = &temp4;
5014 arg5 = &temp5;
5015 arg6 = &temp6;
5016 SWIG_check_num_args("plhlsrgb",3,3)
5017 if(!lua_isnumber(L,1)) SWIG_fail_arg("plhlsrgb",1,"PLFLT");
5018 if(!lua_isnumber(L,2)) SWIG_fail_arg("plhlsrgb",2,"PLFLT");
5019 if(!lua_isnumber(L,3)) SWIG_fail_arg("plhlsrgb",3,"PLFLT");
5020 arg1 = (PLFLT)lua_tonumber(L, 1);
5021 arg2 = (PLFLT)lua_tonumber(L, 2);
5022 arg3 = (PLFLT)lua_tonumber(L, 3);
5023 plhlsrgb(arg1,arg2,arg3,arg4,arg5,arg6);
5024
5025 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
5026 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
5027 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
5028 return SWIG_arg;
5029
5030 if(0) SWIG_fail;
5031
5032 fail:
5033 lua_error(L);
5034 return SWIG_arg;
5035 }
5036
5037
5038 static int _wrap_init(lua_State* L) {
5039 int SWIG_arg = 0;
5040
5041 SWIG_check_num_args("plinit",0,0)
5042 plinit();
5043
5044 return SWIG_arg;
5045
5046 if(0) SWIG_fail;
5047
5048 fail:
5049 lua_error(L);
5050 return SWIG_arg;
5051 }
5052
5053
5054 static int _wrap_join(lua_State* L) {
5055 int SWIG_arg = 0;
5056 PLFLT arg1 ;
5057 PLFLT arg2 ;
5058 PLFLT arg3 ;
5059 PLFLT arg4 ;
5060
5061 SWIG_check_num_args("pljoin",4,4)
5062 if(!lua_isnumber(L,1)) SWIG_fail_arg("pljoin",1,"PLFLT");
5063 if(!lua_isnumber(L,2)) SWIG_fail_arg("pljoin",2,"PLFLT");
5064 if(!lua_isnumber(L,3)) SWIG_fail_arg("pljoin",3,"PLFLT");
5065 if(!lua_isnumber(L,4)) SWIG_fail_arg("pljoin",4,"PLFLT");
5066 arg1 = (PLFLT)lua_tonumber(L, 1);
5067 arg2 = (PLFLT)lua_tonumber(L, 2);
5068 arg3 = (PLFLT)lua_tonumber(L, 3);
5069 arg4 = (PLFLT)lua_tonumber(L, 4);
5070 pljoin(arg1,arg2,arg3,arg4);
5071
5072 return SWIG_arg;
5073
5074 if(0) SWIG_fail;
5075
5076 fail:
5077 lua_error(L);
5078 return SWIG_arg;
5079 }
5080
5081
5082 static int _wrap_lab(lua_State* L) {
5083 int SWIG_arg = 0;
5084 char *arg1 = (char *) 0 ;
5085 char *arg2 = (char *) 0 ;
5086 char *arg3 = (char *) 0 ;
5087
5088 SWIG_check_num_args("pllab",3,3)
5089 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("pllab",1,"char const *");
5090 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("pllab",2,"char const *");
5091 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("pllab",3,"char const *");
5092 arg1 = (char *)lua_tostring(L, 1);
5093 arg2 = (char *)lua_tostring(L, 2);
5094 arg3 = (char *)lua_tostring(L, 3);
5095 pllab((char const *)arg1,(char const *)arg2,(char const *)arg3);
5096
5097 return SWIG_arg;
5098
5099 if(0) SWIG_fail;
5100
5101 fail:
5102 lua_error(L);
5103 return SWIG_arg;
5104 }
5105
5106
5107 static int _wrap_legend(lua_State* L) {
5108 int SWIG_arg = 0;
5109 PLFLT *arg1 = (PLFLT *) 0 ;
5110 PLFLT *arg2 = (PLFLT *) 0 ;
5111 PLINT arg3 ;
5112 PLINT arg4 ;
5113 PLFLT arg5 ;
5114 PLFLT arg6 ;
5115 PLFLT arg7 ;
5116 PLINT arg8 ;
5117 PLINT arg9 ;
5118 PLINT arg10 ;
5119 PLINT arg11 ;
5120 PLINT arg12 ;
5121 PLINT arg13 ;
5122 PLINT *arg14 = (PLINT *) 0 ;
5123 PLFLT arg15 ;
5124 PLFLT arg16 ;
5125 PLFLT arg17 ;
5126 PLFLT arg18 ;
5127 PLINT *arg19 = (PLINT *) 0 ;
5128 char **arg20 = (char **) 0 ;
5129 PLINT *arg21 = (PLINT *) 0 ;
5130 PLINT *arg22 = (PLINT *) 0 ;
5131 PLFLT *arg23 = (PLFLT *) 0 ;
5132 PLFLT *arg24 = (PLFLT *) 0 ;
5133 PLINT *arg25 = (PLINT *) 0 ;
5134 PLINT *arg26 = (PLINT *) 0 ;
5135 PLFLT *arg27 = (PLFLT *) 0 ;
5136 PLINT *arg28 = (PLINT *) 0 ;
5137 PLFLT *arg29 = (PLFLT *) 0 ;
5138 PLINT *arg30 = (PLINT *) 0 ;
5139 char **arg31 = (char **) 0 ;
5140 PLFLT temp1 ;
5141 PLFLT temp2 ;
5142 int temp19 ;
5143 int temp21 ;
5144 int temp22 ;
5145 int temp23 ;
5146 int temp24 ;
5147 int temp25 ;
5148 int temp26 ;
5149 int temp27 ;
5150 int temp28 ;
5151 int temp29 ;
5152 int temp30 ;
5153
5154 {
5155 arg21 = NULL;
5156 }
5157 {
5158 arg22 = NULL;
5159 }
5160 {
5161 arg23 = NULL;
5162 }
5163 {
5164 arg24 = NULL;
5165 }
5166 {
5167 arg25 = NULL;
5168 }
5169 {
5170 arg26 = NULL;
5171 }
5172 {
5173 arg27 = NULL;
5174 }
5175 {
5176 arg28 = NULL;
5177 }
5178 {
5179 arg29 = NULL;
5180 }
5181 {
5182 arg30 = NULL;
5183 }
5184 arg1 = &temp1;
5185 arg2 = &temp2;
5186 SWIG_check_num_args("pllegend",17,28)
5187 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllegend",1,"PLINT");
5188 if(!lua_isnumber(L,2)) SWIG_fail_arg("pllegend",2,"PLINT");
5189 if(!lua_isnumber(L,3)) SWIG_fail_arg("pllegend",3,"PLFLT");
5190 if(!lua_isnumber(L,4)) SWIG_fail_arg("pllegend",4,"PLFLT");
5191 if(!lua_isnumber(L,5)) SWIG_fail_arg("pllegend",5,"PLFLT");
5192 if(!lua_isnumber(L,6)) SWIG_fail_arg("pllegend",6,"PLINT");
5193 if(!lua_isnumber(L,7)) SWIG_fail_arg("pllegend",7,"PLINT");
5194 if(!lua_isnumber(L,8)) SWIG_fail_arg("pllegend",8,"PLINT");
5195 if(!lua_isnumber(L,9)) SWIG_fail_arg("pllegend",9,"PLINT");
5196 if(!lua_isnumber(L,10)) SWIG_fail_arg("pllegend",10,"PLINT");
5197 if(!lua_isnumber(L,12)) SWIG_fail_arg("pllegend",12,"PLFLT");
5198 if(!lua_isnumber(L,13)) SWIG_fail_arg("pllegend",13,"PLFLT");
5199 if(!lua_isnumber(L,14)) SWIG_fail_arg("pllegend",14,"PLFLT");
5200 if(!lua_isnumber(L,15)) SWIG_fail_arg("pllegend",15,"PLFLT");
5201 if(!lua_istable(L,17)) SWIG_fail_arg("pllegend",17,"char const **");
5202 if(lua_gettop(L)>=28 && !lua_istable(L,28)) SWIG_fail_arg("pllegend",28,"char const **");
5203 arg3 = (PLINT)lua_tonumber(L, 1);
5204 arg4 = (PLINT)lua_tonumber(L, 2);
5205 arg5 = (PLFLT)lua_tonumber(L, 3);
5206 arg6 = (PLFLT)lua_tonumber(L, 4);
5207 arg7 = (PLFLT)lua_tonumber(L, 5);
5208 arg8 = (PLINT)lua_tonumber(L, 6);
5209 arg9 = (PLINT)lua_tonumber(L, 7);
5210 arg10 = (PLINT)lua_tonumber(L, 8);
5211 arg11 = (PLINT)lua_tonumber(L, 9);
5212 arg12 = (PLINT)lua_tonumber(L, 10);
5213 {
5214 arg14 = (PLINT *) LUA_get_int_num_array_var( L, 11, &arg13 );
5215 if ( !arg14 )
5216 SWIG_fail;
5217 Alen = arg13;
5218 }
5219 arg15 = (PLFLT)lua_tonumber(L, 12);
5220 arg16 = (PLFLT)lua_tonumber(L, 13);
5221 arg17 = (PLFLT)lua_tonumber(L, 14);
5222 arg18 = (PLFLT)lua_tonumber(L, 15);
5223 {
5224 arg19 = (PLINT *) LUA_get_int_num_array_var( L, 16, &temp19 );
5225 if ( !arg19 )
5226 SWIG_fail;
5227 if ( temp19 != Alen )
5228 {
5229 lua_pushfstring( L, "Tables must be of same length." );
5230 SWIG_fail;
5231 }
5232 }
5233 {
5234 int i;
5235 arg20 = NULL;
5236
5237 if ( SWIG_table_size( L, 17 ) != Alen )
5238 {
5239 lua_pushfstring( L, "Tables must be of same length." );
5240 SWIG_fail;
5241 }
5242 arg20 = malloc( sizeof ( char* ) * Alen );
5243 for ( i = 1; i <= Alen; i++ )
5244 {
5245 lua_rawgeti( L, 17, i );
5246 if ( lua_isstring( L, -1 ) )
5247 {
5248 arg20[i - 1] = (char *) lua_tostring( L, -1 );
5249 }
5250 else
5251 {
5252 lua_pop( L, 1 );
5253 lua_pushfstring( L, "Requires a sequence of strings." );
5254 SWIG_fail;
5255 // arg20 array is freed after 'fail:'
5256 }
5257 lua_pop( L, 1 );
5258 }
5259 }
5260 if(lua_gettop(L)>=18){
5261 {
5262 if ( lua_isnil( L, 18 ) )
5263 {
5264 arg21 = NULL;
5265 }
5266 else
5267 {
5268 arg21 = (PLINT *) LUA_get_int_num_array_var( L, 18, &temp21 );
5269 if ( !arg21 )
5270 SWIG_fail;
5271 if ( temp21 != Alen )
5272 {
5273 lua_pushfstring( L, "Tables must be of same length." );
5274 SWIG_fail;
5275 }
5276 }
5277 }
5278 }
5279 if(lua_gettop(L)>=19){
5280 {
5281 if ( lua_isnil( L, 19 ) )
5282 {
5283 arg22 = NULL;
5284 }
5285 else
5286 {
5287 arg22 = (PLINT *) LUA_get_int_num_array_var( L, 19, &temp22 );
5288 if ( !arg22 )
5289 SWIG_fail;
5290 if ( temp22 != Alen )
5291 {
5292 lua_pushfstring( L, "Tables must be of same length." );
5293 SWIG_fail;
5294 }
5295 }
5296 }
5297 }
5298 if(lua_gettop(L)>=20){
5299 {
5300 if ( lua_isnil( L, 20 ) )
5301 {
5302 arg23 = NULL;
5303 }
5304 else
5305 {
5306 arg23 = (PLFLT *) LUA_get_double_num_array_var( L, 20, &temp23 );
5307 if ( !arg23 )
5308 SWIG_fail;
5309 if ( temp23 != Alen )
5310 {
5311 lua_pushfstring( L, "Tables must be of same length." );
5312 SWIG_fail;
5313 }
5314 }
5315 }
5316 }
5317 if(lua_gettop(L)>=21){
5318 {
5319 if ( lua_isnil( L, 21 ) )
5320 {
5321 arg24 = NULL;
5322 }
5323 else
5324 {
5325 arg24 = (PLFLT *) LUA_get_double_num_array_var( L, 21, &temp24 );
5326 if ( !arg24 )
5327 SWIG_fail;
5328 if ( temp24 != Alen )
5329 {
5330 lua_pushfstring( L, "Tables must be of same length." );
5331 SWIG_fail;
5332 }
5333 }
5334 }
5335 }
5336 if(lua_gettop(L)>=22){
5337 {
5338 if ( lua_isnil( L, 22 ) )
5339 {
5340 arg25 = NULL;
5341 }
5342 else
5343 {
5344 arg25 = (PLINT *) LUA_get_int_num_array_var( L, 22, &temp25 );
5345 if ( !arg25 )
5346 SWIG_fail;
5347 if ( temp25 != Alen )
5348 {
5349 lua_pushfstring( L, "Tables must be of same length." );
5350 SWIG_fail;
5351 }
5352 }
5353 }
5354 }
5355 if(lua_gettop(L)>=23){
5356 {
5357 if ( lua_isnil( L, 23 ) )
5358 {
5359 arg26 = NULL;
5360 }
5361 else
5362 {
5363 arg26 = (PLINT *) LUA_get_int_num_array_var( L, 23, &temp26 );
5364 if ( !arg26 )
5365 SWIG_fail;
5366 if ( temp26 != Alen )
5367 {
5368 lua_pushfstring( L, "Tables must be of same length." );
5369 SWIG_fail;
5370 }
5371 }
5372 }
5373 }
5374 if(lua_gettop(L)>=24){
5375 {
5376 if ( lua_isnil( L, 24 ) )
5377 {
5378 arg27 = NULL;
5379 }
5380 else
5381 {
5382 arg27 = (PLFLT *) LUA_get_double_num_array_var( L, 24, &temp27 );
5383 if ( !arg27 )
5384 SWIG_fail;
5385 if ( temp27 != Alen )
5386 {
5387 lua_pushfstring( L, "Tables must be of same length." );
5388 SWIG_fail;
5389 }
5390 }
5391 }
5392 }
5393 if(lua_gettop(L)>=25){
5394 {
5395 if ( lua_isnil( L, 25 ) )
5396 {
5397 arg28 = NULL;
5398 }
5399 else
5400 {
5401 arg28 = (PLINT *) LUA_get_int_num_array_var( L, 25, &temp28 );
5402 if ( !arg28 )
5403 SWIG_fail;
5404 if ( temp28 != Alen )
5405 {
5406 lua_pushfstring( L, "Tables must be of same length." );
5407 SWIG_fail;
5408 }
5409 }
5410 }
5411 }
5412 if(lua_gettop(L)>=26){
5413 {
5414 if ( lua_isnil( L, 26 ) )
5415 {
5416 arg29 = NULL;
5417 }
5418 else
5419 {
5420 arg29 = (PLFLT *) LUA_get_double_num_array_var( L, 26, &temp29 );
5421 if ( !arg29 )
5422 SWIG_fail;
5423 if ( temp29 != Alen )
5424 {
5425 lua_pushfstring( L, "Tables must be of same length." );
5426 SWIG_fail;
5427 }
5428 }
5429 }
5430 }
5431 if(lua_gettop(L)>=27){
5432 {
5433 if ( lua_isnil( L, 27 ) )
5434 {
5435 arg30 = NULL;
5436 }
5437 else
5438 {
5439 arg30 = (PLINT *) LUA_get_int_num_array_var( L, 27, &temp30 );
5440 if ( !arg30 )
5441 SWIG_fail;
5442 if ( temp30 != Alen )
5443 {
5444 lua_pushfstring( L, "Tables must be of same length." );
5445 SWIG_fail;
5446 }
5447 }
5448 }
5449 }
5450 if(lua_gettop(L)>=28){
5451 {
5452 int i;
5453 arg31 = NULL;
5454
5455 if ( SWIG_table_size( L, 28 ) != Alen )
5456 {
5457 lua_pushfstring( L, "Tables must be of same length." );
5458 SWIG_fail;
5459 }
5460 arg31 = malloc( sizeof ( char* ) * Alen );
5461 for ( i = 1; i <= Alen; i++ )
5462 {
5463 lua_rawgeti( L, 28, i );
5464 if ( lua_isstring( L, -1 ) )
5465 {
5466 arg31[i - 1] = (char *) lua_tostring( L, -1 );
5467 }
5468 else
5469 {
5470 lua_pop( L, 1 );
5471 lua_pushfstring( L, "Requires a sequence of strings." );
5472 SWIG_fail;
5473 // arg31 array is freed after 'fail:'
5474 }
5475 lua_pop( L, 1 );
5476 }
5477 }
5478 }
5479 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);
5480
5481 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5482 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5483 {
5484 LUA_FREE_ARRAY( arg14 );
5485 }
5486 {
5487 LUA_FREE_ARRAY( arg19 );
5488 }
5489 {
5490 if ( arg20 )
5491 {
5492 free( arg20 ); arg20 = NULL;
5493 }
5494 }
5495 {
5496 LUA_FREE_ARRAY( arg21 );
5497 }
5498 {
5499 LUA_FREE_ARRAY( arg22 );
5500 }
5501 {
5502 LUA_FREE_ARRAY( arg23 );
5503 }
5504 {
5505 LUA_FREE_ARRAY( arg24 );
5506 }
5507 {
5508 LUA_FREE_ARRAY( arg25 );
5509 }
5510 {
5511 LUA_FREE_ARRAY( arg26 );
5512 }
5513 {
5514 LUA_FREE_ARRAY( arg27 );
5515 }
5516 {
5517 LUA_FREE_ARRAY( arg28 );
5518 }
5519 {
5520 LUA_FREE_ARRAY( arg29 );
5521 }
5522 {
5523 LUA_FREE_ARRAY( arg30 );
5524 }
5525 {
5526 if ( arg31 )
5527 {
5528 free( arg31 ); arg31 = NULL;
5529 }
5530 }
5531 return SWIG_arg;
5532
5533 if(0) SWIG_fail;
5534
5535 fail:
5536 {
5537 LUA_FREE_ARRAY( arg14 );
5538 }
5539 {
5540 LUA_FREE_ARRAY( arg19 );
5541 }
5542 {
5543 if ( arg20 )
5544 {
5545 free( arg20 ); arg20 = NULL;
5546 }
5547 }
5548 {
5549 LUA_FREE_ARRAY( arg21 );
5550 }
5551 {
5552 LUA_FREE_ARRAY( arg22 );
5553 }
5554 {
5555 LUA_FREE_ARRAY( arg23 );
5556 }
5557 {
5558 LUA_FREE_ARRAY( arg24 );
5559 }
5560 {
5561 LUA_FREE_ARRAY( arg25 );
5562 }
5563 {
5564 LUA_FREE_ARRAY( arg26 );
5565 }
5566 {
5567 LUA_FREE_ARRAY( arg27 );
5568 }
5569 {
5570 LUA_FREE_ARRAY( arg28 );
5571 }
5572 {
5573 LUA_FREE_ARRAY( arg29 );
5574 }
5575 {
5576 LUA_FREE_ARRAY( arg30 );
5577 }
5578 {
5579 if ( arg31 )
5580 {
5581 free( arg31 ); arg31 = NULL;
5582 }
5583 }
5584 lua_error(L);
5585 return SWIG_arg;
5586 }
5587
5588
5589 static int _wrap_colorbar(lua_State* L) {
5590 int SWIG_arg = 0;
5591 PLFLT *arg1 = (PLFLT *) 0 ;
5592 PLFLT *arg2 = (PLFLT *) 0 ;
5593 PLINT arg3 ;
5594 PLINT arg4 ;
5595 PLFLT arg5 ;
5596 PLFLT arg6 ;
5597 PLFLT arg7 ;
5598 PLFLT arg8 ;
5599 PLINT arg9 ;
5600 PLINT arg10 ;
5601 PLINT arg11 ;
5602 PLFLT arg12 ;
5603 PLFLT arg13 ;
5604 PLINT arg14 ;
5605 PLFLT arg15 ;
5606 PLINT arg16 ;
5607 PLINT *arg17 = (PLINT *) 0 ;
5608 char **arg18 = (char **) 0 ;
5609 PLINT arg19 ;
5610 char **arg20 = (char **) 0 ;
5611 PLFLT *arg21 = (PLFLT *) 0 ;
5612 PLINT *arg22 = (PLINT *) 0 ;
5613 PLINT *arg23 = (PLINT *) 0 ;
5614 PLFLT **arg24 = (PLFLT **) 0 ;
5615 PLFLT temp1 ;
5616 PLFLT temp2 ;
5617 int temp21 ;
5618 int temp22 ;
5619 int temp23 ;
5620 int ii24 ;
5621
5622 arg1 = &temp1;
5623 arg2 = &temp2;
5624 SWIG_check_num_args("plcolorbar",20,20)
5625 if(!lua_isnumber(L,1)) SWIG_fail_arg("plcolorbar",1,"PLINT");
5626 if(!lua_isnumber(L,2)) SWIG_fail_arg("plcolorbar",2,"PLINT");
5627 if(!lua_isnumber(L,3)) SWIG_fail_arg("plcolorbar",3,"PLFLT");
5628 if(!lua_isnumber(L,4)) SWIG_fail_arg("plcolorbar",4,"PLFLT");
5629 if(!lua_isnumber(L,5)) SWIG_fail_arg("plcolorbar",5,"PLFLT");
5630 if(!lua_isnumber(L,6)) SWIG_fail_arg("plcolorbar",6,"PLFLT");
5631 if(!lua_isnumber(L,7)) SWIG_fail_arg("plcolorbar",7,"PLINT");
5632 if(!lua_isnumber(L,8)) SWIG_fail_arg("plcolorbar",8,"PLINT");
5633 if(!lua_isnumber(L,9)) SWIG_fail_arg("plcolorbar",9,"PLINT");
5634 if(!lua_isnumber(L,10)) SWIG_fail_arg("plcolorbar",10,"PLFLT");
5635 if(!lua_isnumber(L,11)) SWIG_fail_arg("plcolorbar",11,"PLFLT");
5636 if(!lua_isnumber(L,12)) SWIG_fail_arg("plcolorbar",12,"PLINT");
5637 if(!lua_isnumber(L,13)) SWIG_fail_arg("plcolorbar",13,"PLFLT");
5638 if(!lua_istable(L,15)) SWIG_fail_arg("plcolorbar",15,"char const **");
5639 arg3 = (PLINT)lua_tonumber(L, 1);
5640 arg4 = (PLINT)lua_tonumber(L, 2);
5641 arg5 = (PLFLT)lua_tonumber(L, 3);
5642 arg6 = (PLFLT)lua_tonumber(L, 4);
5643 arg7 = (PLFLT)lua_tonumber(L, 5);
5644 arg8 = (PLFLT)lua_tonumber(L, 6);
5645 arg9 = (PLINT)lua_tonumber(L, 7);
5646 arg10 = (PLINT)lua_tonumber(L, 8);
5647 arg11 = (PLINT)lua_tonumber(L, 9);
5648 arg12 = (PLFLT)lua_tonumber(L, 10);
5649 arg13 = (PLFLT)lua_tonumber(L, 11);
5650 arg14 = (PLINT)lua_tonumber(L, 12);
5651 arg15 = (PLFLT)lua_tonumber(L, 13);
5652 {
5653 arg17 = (PLINT *) LUA_get_int_num_array_var( L, 14, &arg16 );
5654 if ( !arg17 )
5655 SWIG_fail;
5656 Alen = arg16;
5657 }
5658 {
5659 int i;
5660 arg18 = NULL;
5661
5662 if ( SWIG_table_size( L, 15 ) != Alen )
5663 {
5664 lua_pushfstring( L, "Tables must be of same length." );
5665 SWIG_fail;
5666 }
5667 arg18 = malloc( sizeof ( char* ) * Alen );
5668 for ( i = 1; i <= Alen; i++ )
5669 {
5670 lua_rawgeti( L, 15, i );
5671 if ( lua_isstring( L, -1 ) )
5672 {
5673 arg18[i - 1] = (char *) lua_tostring( L, -1 );
5674 }
5675 else
5676 {
5677 lua_pop( L, 1 );
5678 lua_pushfstring( L, "Requires a sequence of strings." );
5679 SWIG_fail;
5680 // arg18 array is freed after 'fail:'
5681 }
5682 lua_pop( L, 1 );
5683 }
5684 }
5685 {
5686 int i;
5687 arg19 = SWIG_table_size( L, 16 );
5688 Alen = arg19;
5689
5690 arg20 = malloc( sizeof ( char* ) * Alen );
5691 for ( i = 1; i <= Alen; i++ )
5692 {
5693 lua_rawgeti( L, 16, i );
5694 if ( lua_isstring( L, -1 ) )
5695 {
5696 arg20[i - 1] = (char *) lua_tostring( L, -1 );
5697 }
5698 else
5699 {
5700 lua_pop( L, 1 );
5701 lua_pushfstring( L, "Requires a sequence of strings." );
5702 SWIG_fail;
5703 }
5704 lua_pop( L, 1 );
5705 }
5706 }
5707 {
5708 arg21 = (PLFLT *) LUA_get_double_num_array_var( L, 17, &temp21 );
5709 if ( !arg21 )
5710 SWIG_fail;
5711 if ( temp21 != Alen )
5712 {
5713 lua_pushfstring( L, "Tables must be of same length." );
5714 SWIG_fail;
5715 }
5716 }
5717 {
5718 arg22 = (PLINT *) LUA_get_int_num_array_var( L, 18, &temp22 );
5719 if ( !arg22 )
5720 SWIG_fail;
5721 if ( temp22 != Alen )
5722 {
5723 lua_pushfstring( L, "Tables must be of same length." );
5724 SWIG_fail;
5725 }
5726 }
5727 {
5728 int i;
5729
5730 arg23 = (PLINT *) LUA_get_int_num_array_var( L, 19, &temp23 );
5731 if ( !arg23 )
5732 SWIG_fail;
5733 if ( temp23 != Alen )
5734 {
5735 lua_pushfstring( L, "Tables must be of same length." );
5736 SWIG_fail;
5737 }
5738
5739 Xlen = temp23;
5740 Ylen = -1;
5741 for ( i = 0; i < Xlen; i++ )
5742 if ( arg23[i] > Ylen )
5743 Ylen = arg23[i];
5744 }
5745 {
5746 int jj;
5747
5748 arg24 = read_double_Matrix( L, 20, &ii24, &jj );
5749 if ( !arg24 )
5750 SWIG_fail;
5751 if ( ( ii24 != Xlen ) || ( jj != Ylen ) )
5752 {
5753 lua_pushfstring( L, "Vectors must match matrix." );
5754 SWIG_fail;
5755 }
5756 }
5757 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);
5758
5759 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
5760 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
5761 {
5762 LUA_FREE_ARRAY( arg17 );
5763 }
5764 {
5765 if ( arg18 )
5766 {
5767 free( arg18 ); arg18 = NULL;
5768 }
5769 }
5770 {
5771 if ( arg20 )
5772 {
5773 free( arg20 ); arg20 = NULL;
5774 }
5775 }
5776 {
5777 LUA_FREE_ARRAY( arg21 );
5778 }
5779 {
5780 LUA_FREE_ARRAY( arg22 );
5781 }
5782 {
5783 LUA_FREE_ARRAY( arg23 );
5784 }
5785 {
5786 int i;
5787
5788 if ( arg24 )
5789 {
5790 for ( i = 0; i < ii24; i++ )
5791 LUA_FREE_ARRAY( arg24[i] );
5792 LUA_FREE_ARRAY( arg24 );
5793 }
5794 }
5795 return SWIG_arg;
5796
5797 if(0) SWIG_fail;
5798
5799 fail:
5800 {
5801 LUA_FREE_ARRAY( arg17 );
5802 }
5803 {
5804 if ( arg18 )
5805 {
5806 free( arg18 ); arg18 = NULL;
5807 }
5808 }
5809 {
5810 if ( arg20 )
5811 {
5812 free( arg20 ); arg20 = NULL;
5813 }
5814 }
5815 {
5816 LUA_FREE_ARRAY( arg21 );
5817 }
5818 {
5819 LUA_FREE_ARRAY( arg22 );
5820 }
5821 {
5822 LUA_FREE_ARRAY( arg23 );
5823 }
5824 {
5825 int i;
5826
5827 if ( arg24 )
5828 {
5829 for ( i = 0; i < ii24; i++ )
5830 LUA_FREE_ARRAY( arg24[i] );
5831 LUA_FREE_ARRAY( arg24 );
5832 }
5833 }
5834 lua_error(L);
5835 return SWIG_arg;
5836 }
5837
5838
5839 static int _wrap_lightsource(lua_State* L) {
5840 int SWIG_arg = 0;
5841 PLFLT arg1 ;
5842 PLFLT arg2 ;
5843 PLFLT arg3 ;
5844
5845 SWIG_check_num_args("pllightsource",3,3)
5846 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllightsource",1,"PLFLT");
5847 if(!lua_isnumber(L,2)) SWIG_fail_arg("pllightsource",2,"PLFLT");
5848 if(!lua_isnumber(L,3)) SWIG_fail_arg("pllightsource",3,"PLFLT");
5849 arg1 = (PLFLT)lua_tonumber(L, 1);
5850 arg2 = (PLFLT)lua_tonumber(L, 2);
5851 arg3 = (PLFLT)lua_tonumber(L, 3);
5852 pllightsource(arg1,arg2,arg3);
5853
5854 return SWIG_arg;
5855
5856 if(0) SWIG_fail;
5857
5858 fail:
5859 lua_error(L);
5860 return SWIG_arg;
5861 }
5862
5863
5864 static int _wrap_line(lua_State* L) {
5865 int SWIG_arg = 0;
5866 PLINT arg1 ;
5867 PLFLT *arg2 = (PLFLT *) 0 ;
5868 PLFLT *arg3 = (PLFLT *) 0 ;
5869 int temp3 ;
5870
5871 SWIG_check_num_args("plline",2,2)
5872 {
5873 int temp;
5874 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5875 if ( !arg2 )
5876 SWIG_fail;
5877 arg1 = Alen = temp;
5878 }
5879 {
5880 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
5881 if ( !arg3 )
5882 SWIG_fail;
5883 if ( temp3 != Alen )
5884 {
5885 lua_pushfstring( L, "Tables must be of same length." );
5886 SWIG_fail;
5887 }
5888 }
5889 plline(arg1,(double const *)arg2,(double const *)arg3);
5890
5891 {
5892 LUA_FREE_ARRAY( arg2 );
5893 }
5894 {
5895 LUA_FREE_ARRAY( arg3 );
5896 }
5897 return SWIG_arg;
5898
5899 if(0) SWIG_fail;
5900
5901 fail:
5902 {
5903 LUA_FREE_ARRAY( arg2 );
5904 }
5905 {
5906 LUA_FREE_ARRAY( arg3 );
5907 }
5908 lua_error(L);
5909 return SWIG_arg;
5910 }
5911
5912
5913 static int _wrap_line3(lua_State* L) {
5914 int SWIG_arg = 0;
5915 PLINT arg1 ;
5916 PLFLT *arg2 = (PLFLT *) 0 ;
5917 PLFLT *arg3 = (PLFLT *) 0 ;
5918 PLFLT *arg4 = (PLFLT *) 0 ;
5919 int temp3 ;
5920 int temp4 ;
5921
5922 SWIG_check_num_args("plline3",3,3)
5923 {
5924 int temp;
5925 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
5926 if ( !arg2 )
5927 SWIG_fail;
5928 arg1 = Alen = temp;
5929 }
5930 {
5931 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
5932 if ( !arg3 )
5933 SWIG_fail;
5934 if ( temp3 != Alen )
5935 {
5936 lua_pushfstring( L, "Tables must be of same length." );
5937 SWIG_fail;
5938 }
5939 }
5940 {
5941 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
5942 if ( !arg4 )
5943 SWIG_fail;
5944 if ( temp4 != Alen )
5945 {
5946 lua_pushfstring( L, "Tables must be of same length." );
5947 SWIG_fail;
5948 }
5949 }
5950 plline3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4);
5951
5952 {
5953 LUA_FREE_ARRAY( arg2 );
5954 }
5955 {
5956 LUA_FREE_ARRAY( arg3 );
5957 }
5958 {
5959 LUA_FREE_ARRAY( arg4 );
5960 }
5961 return SWIG_arg;
5962
5963 if(0) SWIG_fail;
5964
5965 fail:
5966 {
5967 LUA_FREE_ARRAY( arg2 );
5968 }
5969 {
5970 LUA_FREE_ARRAY( arg3 );
5971 }
5972 {
5973 LUA_FREE_ARRAY( arg4 );
5974 }
5975 lua_error(L);
5976 return SWIG_arg;
5977 }
5978
5979
5980 static int _wrap_lsty(lua_State* L) {
5981 int SWIG_arg = 0;
5982 PLINT arg1 ;
5983
5984 SWIG_check_num_args("pllsty",1,1)
5985 if(!lua_isnumber(L,1)) SWIG_fail_arg("pllsty",1,"PLINT");
5986 arg1 = (PLINT)lua_tonumber(L, 1);
5987 pllsty(arg1);
5988
5989 return SWIG_arg;
5990
5991 if(0) SWIG_fail;
5992
5993 fail:
5994 lua_error(L);
5995 return SWIG_arg;
5996 }
5997
5998
5999 static int _wrap_mesh(lua_State* L) {
6000 int SWIG_arg = 0;
6001 PLFLT *arg1 = (PLFLT *) 0 ;
6002 PLFLT *arg2 = (PLFLT *) 0 ;
6003 PLFLT **arg3 = (PLFLT **) 0 ;
6004 PLINT arg4 ;
6005 PLINT arg5 ;
6006 PLINT arg6 ;
6007 int ii3 ;
6008
6009 SWIG_check_num_args("plmesh",4,4)
6010 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmesh",4,"PLINT");
6011 {
6012 int temp;
6013 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6014 if ( !arg1 )
6015 SWIG_fail;
6016 Xlen = temp;
6017 }
6018 {
6019 int temp;
6020 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6021 if ( !arg2 )
6022 SWIG_fail;
6023 Ylen = temp;
6024 }
6025 {
6026 int jj;
6027
6028 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6029 if ( !arg3 )
6030 SWIG_fail;
6031 arg4 = ii3;
6032 arg5 = jj;
6033 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6034 {
6035 lua_pushfstring( L, "Vectors must match matrix." );
6036 SWIG_fail;
6037 }
6038 }
6039 arg6 = (PLINT)lua_tonumber(L, 4);
6040 plmesh((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6);
6041
6042 {
6043 LUA_FREE_ARRAY( arg1 );
6044 }
6045 {
6046 LUA_FREE_ARRAY( arg2 );
6047 }
6048 {
6049 int i;
6050
6051 if ( arg3 )
6052 {
6053 for ( i = 0; i < ii3; i++ )
6054 LUA_FREE_ARRAY( arg3[i] );
6055 LUA_FREE_ARRAY( arg3 );
6056 }
6057 }
6058 return SWIG_arg;
6059
6060 if(0) SWIG_fail;
6061
6062 fail:
6063 {
6064 LUA_FREE_ARRAY( arg1 );
6065 }
6066 {
6067 LUA_FREE_ARRAY( arg2 );
6068 }
6069 {
6070 int i;
6071
6072 if ( arg3 )
6073 {
6074 for ( i = 0; i < ii3; i++ )
6075 LUA_FREE_ARRAY( arg3[i] );
6076 LUA_FREE_ARRAY( arg3 );
6077 }
6078 }
6079 lua_error(L);
6080 return SWIG_arg;
6081 }
6082
6083
6084 static int _wrap_meshc(lua_State* L) {
6085 int SWIG_arg = 0;
6086 PLFLT *arg1 = (PLFLT *) 0 ;
6087 PLFLT *arg2 = (PLFLT *) 0 ;
6088 PLFLT **arg3 = (PLFLT **) 0 ;
6089 PLINT arg4 ;
6090 PLINT arg5 ;
6091 PLINT arg6 ;
6092 PLFLT *arg7 = (PLFLT *) 0 ;
6093 PLINT arg8 ;
6094 int ii3 ;
6095
6096 SWIG_check_num_args("plmeshc",5,5)
6097 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmeshc",4,"PLINT");
6098 {
6099 int temp;
6100 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6101 if ( !arg1 )
6102 SWIG_fail;
6103 Xlen = temp;
6104 }
6105 {
6106 int temp;
6107 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6108 if ( !arg2 )
6109 SWIG_fail;
6110 Ylen = temp;
6111 }
6112 {
6113 int jj;
6114
6115 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6116 if ( !arg3 )
6117 SWIG_fail;
6118 arg4 = ii3;
6119 arg5 = jj;
6120 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6121 {
6122 lua_pushfstring( L, "Vectors must match matrix." );
6123 SWIG_fail;
6124 }
6125 }
6126 arg6 = (PLINT)lua_tonumber(L, 4);
6127 {
6128 int temp;
6129 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
6130 if ( !arg7 )
6131 SWIG_fail;
6132 arg8 = Alen = temp;
6133 }
6134 plmeshc((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
6135
6136 {
6137 LUA_FREE_ARRAY( arg1 );
6138 }
6139 {
6140 LUA_FREE_ARRAY( arg2 );
6141 }
6142 {
6143 int i;
6144
6145 if ( arg3 )
6146 {
6147 for ( i = 0; i < ii3; i++ )
6148 LUA_FREE_ARRAY( arg3[i] );
6149 LUA_FREE_ARRAY( arg3 );
6150 }
6151 }
6152 {
6153 LUA_FREE_ARRAY( arg7 );
6154 }
6155 return SWIG_arg;
6156
6157 if(0) SWIG_fail;
6158
6159 fail:
6160 {
6161 LUA_FREE_ARRAY( arg1 );
6162 }
6163 {
6164 LUA_FREE_ARRAY( arg2 );
6165 }
6166 {
6167 int i;
6168
6169 if ( arg3 )
6170 {
6171 for ( i = 0; i < ii3; i++ )
6172 LUA_FREE_ARRAY( arg3[i] );
6173 LUA_FREE_ARRAY( arg3 );
6174 }
6175 }
6176 {
6177 LUA_FREE_ARRAY( arg7 );
6178 }
6179 lua_error(L);
6180 return SWIG_arg;
6181 }
6182
6183
6184 static int _wrap_mkstrm(lua_State* L) {
6185 int SWIG_arg = 0;
6186 PLINT *arg1 = (PLINT *) 0 ;
6187 PLINT temp1 ;
6188
6189 arg1 = &temp1;
6190 SWIG_check_num_args("plmkstrm",0,0)
6191 plmkstrm(arg1);
6192
6193 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
6194 return SWIG_arg;
6195
6196 if(0) SWIG_fail;
6197
6198 fail:
6199 lua_error(L);
6200 return SWIG_arg;
6201 }
6202
6203
6204 static int _wrap_mtex(lua_State* L) {
6205 int SWIG_arg = 0;
6206 char *arg1 = (char *) 0 ;
6207 PLFLT arg2 ;
6208 PLFLT arg3 ;
6209 PLFLT arg4 ;
6210 char *arg5 = (char *) 0 ;
6211
6212 SWIG_check_num_args("plmtex",5,5)
6213 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plmtex",1,"char const *");
6214 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmtex",2,"PLFLT");
6215 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmtex",3,"PLFLT");
6216 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmtex",4,"PLFLT");
6217 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plmtex",5,"char const *");
6218 arg1 = (char *)lua_tostring(L, 1);
6219 arg2 = (PLFLT)lua_tonumber(L, 2);
6220 arg3 = (PLFLT)lua_tonumber(L, 3);
6221 arg4 = (PLFLT)lua_tonumber(L, 4);
6222 arg5 = (char *)lua_tostring(L, 5);
6223 plmtex((char const *)arg1,arg2,arg3,arg4,(char const *)arg5);
6224
6225 return SWIG_arg;
6226
6227 if(0) SWIG_fail;
6228
6229 fail:
6230 lua_error(L);
6231 return SWIG_arg;
6232 }
6233
6234
6235 static int _wrap_mtex3(lua_State* L) {
6236 int SWIG_arg = 0;
6237 char *arg1 = (char *) 0 ;
6238 PLFLT arg2 ;
6239 PLFLT arg3 ;
6240 PLFLT arg4 ;
6241 char *arg5 = (char *) 0 ;
6242
6243 SWIG_check_num_args("plmtex3",5,5)
6244 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plmtex3",1,"char const *");
6245 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmtex3",2,"PLFLT");
6246 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmtex3",3,"PLFLT");
6247 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmtex3",4,"PLFLT");
6248 if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("plmtex3",5,"char const *");
6249 arg1 = (char *)lua_tostring(L, 1);
6250 arg2 = (PLFLT)lua_tonumber(L, 2);
6251 arg3 = (PLFLT)lua_tonumber(L, 3);
6252 arg4 = (PLFLT)lua_tonumber(L, 4);
6253 arg5 = (char *)lua_tostring(L, 5);
6254 plmtex3((char const *)arg1,arg2,arg3,arg4,(char const *)arg5);
6255
6256 return SWIG_arg;
6257
6258 if(0) SWIG_fail;
6259
6260 fail:
6261 lua_error(L);
6262 return SWIG_arg;
6263 }
6264
6265
6266 static int _wrap_plot3d(lua_State* L) {
6267 int SWIG_arg = 0;
6268 PLFLT *arg1 = (PLFLT *) 0 ;
6269 PLFLT *arg2 = (PLFLT *) 0 ;
6270 PLFLT **arg3 = (PLFLT **) 0 ;
6271 PLINT arg4 ;
6272 PLINT arg5 ;
6273 PLINT arg6 ;
6274 PLBOOL arg7 ;
6275 int ii3 ;
6276
6277 SWIG_check_num_args("plot3d",5,5)
6278 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3d",4,"PLINT");
6279 if(!lua_isnumber(L,5)) SWIG_fail_arg("plot3d",5,"PLBOOL");
6280 {
6281 int temp;
6282 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6283 if ( !arg1 )
6284 SWIG_fail;
6285 Xlen = temp;
6286 }
6287 {
6288 int temp;
6289 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6290 if ( !arg2 )
6291 SWIG_fail;
6292 Ylen = temp;
6293 }
6294 {
6295 int jj;
6296
6297 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6298 if ( !arg3 )
6299 SWIG_fail;
6300 arg4 = ii3;
6301 arg5 = jj;
6302 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6303 {
6304 lua_pushfstring( L, "Vectors must match matrix." );
6305 SWIG_fail;
6306 }
6307 }
6308 arg6 = (PLINT)lua_tonumber(L, 4);
6309 arg7 = (PLBOOL)lua_tonumber(L, 5);
6310 plot3d((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,arg7);
6311
6312 {
6313 LUA_FREE_ARRAY( arg1 );
6314 }
6315 {
6316 LUA_FREE_ARRAY( arg2 );
6317 }
6318 {
6319 int i;
6320
6321 if ( arg3 )
6322 {
6323 for ( i = 0; i < ii3; i++ )
6324 LUA_FREE_ARRAY( arg3[i] );
6325 LUA_FREE_ARRAY( arg3 );
6326 }
6327 }
6328 return SWIG_arg;
6329
6330 if(0) SWIG_fail;
6331
6332 fail:
6333 {
6334 LUA_FREE_ARRAY( arg1 );
6335 }
6336 {
6337 LUA_FREE_ARRAY( arg2 );
6338 }
6339 {
6340 int i;
6341
6342 if ( arg3 )
6343 {
6344 for ( i = 0; i < ii3; i++ )
6345 LUA_FREE_ARRAY( arg3[i] );
6346 LUA_FREE_ARRAY( arg3 );
6347 }
6348 }
6349 lua_error(L);
6350 return SWIG_arg;
6351 }
6352
6353
6354 static int _wrap_plot3dc(lua_State* L) {
6355 int SWIG_arg = 0;
6356 PLFLT *arg1 = (PLFLT *) 0 ;
6357 PLFLT *arg2 = (PLFLT *) 0 ;
6358 PLFLT **arg3 = (PLFLT **) 0 ;
6359 PLINT arg4 ;
6360 PLINT arg5 ;
6361 PLINT arg6 ;
6362 PLFLT *arg7 = (PLFLT *) 0 ;
6363 PLINT arg8 ;
6364 int ii3 ;
6365
6366 SWIG_check_num_args("plot3dc",5,5)
6367 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3dc",4,"PLINT");
6368 {
6369 int temp;
6370 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6371 if ( !arg1 )
6372 SWIG_fail;
6373 Xlen = temp;
6374 }
6375 {
6376 int temp;
6377 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6378 if ( !arg2 )
6379 SWIG_fail;
6380 Ylen = temp;
6381 }
6382 {
6383 int jj;
6384
6385 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6386 if ( !arg3 )
6387 SWIG_fail;
6388 arg4 = ii3;
6389 arg5 = jj;
6390 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6391 {
6392 lua_pushfstring( L, "Vectors must match matrix." );
6393 SWIG_fail;
6394 }
6395 }
6396 arg6 = (PLINT)lua_tonumber(L, 4);
6397 {
6398 int temp;
6399 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
6400 if ( !arg7 )
6401 SWIG_fail;
6402 arg8 = Alen = temp;
6403 }
6404 plot3dc((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
6405
6406 {
6407 LUA_FREE_ARRAY( arg1 );
6408 }
6409 {
6410 LUA_FREE_ARRAY( arg2 );
6411 }
6412 {
6413 int i;
6414
6415 if ( arg3 )
6416 {
6417 for ( i = 0; i < ii3; i++ )
6418 LUA_FREE_ARRAY( arg3[i] );
6419 LUA_FREE_ARRAY( arg3 );
6420 }
6421 }
6422 {
6423 LUA_FREE_ARRAY( arg7 );
6424 }
6425 return SWIG_arg;
6426
6427 if(0) SWIG_fail;
6428
6429 fail:
6430 {
6431 LUA_FREE_ARRAY( arg1 );
6432 }
6433 {
6434 LUA_FREE_ARRAY( arg2 );
6435 }
6436 {
6437 int i;
6438
6439 if ( arg3 )
6440 {
6441 for ( i = 0; i < ii3; i++ )
6442 LUA_FREE_ARRAY( arg3[i] );
6443 LUA_FREE_ARRAY( arg3 );
6444 }
6445 }
6446 {
6447 LUA_FREE_ARRAY( arg7 );
6448 }
6449 lua_error(L);
6450 return SWIG_arg;
6451 }
6452
6453
6454 static int _wrap_plot3dcl(lua_State* L) {
6455 int SWIG_arg = 0;
6456 PLFLT *arg1 = (PLFLT *) 0 ;
6457 PLFLT *arg2 = (PLFLT *) 0 ;
6458 PLFLT **arg3 = (PLFLT **) 0 ;
6459 PLINT arg4 ;
6460 PLINT arg5 ;
6461 PLINT arg6 ;
6462 PLFLT *arg7 = (PLFLT *) 0 ;
6463 PLINT arg8 ;
6464 PLINT arg9 ;
6465 PLINT arg10 ;
6466 PLINT *arg11 = (PLINT *) 0 ;
6467 PLINT *arg12 = (PLINT *) 0 ;
6468 int ii3 ;
6469 int temp12 ;
6470
6471 SWIG_check_num_args("plot3dcl",8,8)
6472 if(!lua_isnumber(L,4)) SWIG_fail_arg("plot3dcl",4,"PLINT");
6473 if(!lua_isnumber(L,6)) SWIG_fail_arg("plot3dcl",6,"PLINT");
6474 {
6475 int temp;
6476 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6477 if ( !arg1 )
6478 SWIG_fail;
6479 Xlen = temp;
6480 }
6481 {
6482 int temp;
6483 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6484 if ( !arg2 )
6485 SWIG_fail;
6486 Ylen = temp;
6487 }
6488 {
6489 int jj;
6490
6491 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6492 if ( !arg3 )
6493 SWIG_fail;
6494 arg4 = ii3;
6495 arg5 = jj;
6496 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6497 {
6498 lua_pushfstring( L, "Vectors must match matrix." );
6499 SWIG_fail;
6500 }
6501 }
6502 arg6 = (PLINT)lua_tonumber(L, 4);
6503 {
6504 int temp;
6505 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
6506 if ( !arg7 )
6507 SWIG_fail;
6508 arg8 = Alen = temp;
6509 }
6510 arg9 = (PLINT)lua_tonumber(L, 6);
6511 {
6512 arg11 = (PLINT *) LUA_get_int_num_array_var( L, 7, &arg10 );
6513 if ( !arg11 )
6514 SWIG_fail;
6515 Alen = arg10;
6516 }
6517 {
6518 arg12 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp12 );
6519 if ( !arg12 )
6520 SWIG_fail;
6521 if ( temp12 != Alen )
6522 {
6523 lua_pushfstring( L, "Tables must be of same length." );
6524 SWIG_fail;
6525 }
6526 }
6527 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);
6528
6529 {
6530 LUA_FREE_ARRAY( arg1 );
6531 }
6532 {
6533 LUA_FREE_ARRAY( arg2 );
6534 }
6535 {
6536 int i;
6537
6538 if ( arg3 )
6539 {
6540 for ( i = 0; i < ii3; i++ )
6541 LUA_FREE_ARRAY( arg3[i] );
6542 LUA_FREE_ARRAY( arg3 );
6543 }
6544 }
6545 {
6546 LUA_FREE_ARRAY( arg7 );
6547 }
6548 {
6549 LUA_FREE_ARRAY( arg11 );
6550 }
6551 {
6552 LUA_FREE_ARRAY( arg12 );
6553 }
6554 return SWIG_arg;
6555
6556 if(0) SWIG_fail;
6557
6558 fail:
6559 {
6560 LUA_FREE_ARRAY( arg1 );
6561 }
6562 {
6563 LUA_FREE_ARRAY( arg2 );
6564 }
6565 {
6566 int i;
6567
6568 if ( arg3 )
6569 {
6570 for ( i = 0; i < ii3; i++ )
6571 LUA_FREE_ARRAY( arg3[i] );
6572 LUA_FREE_ARRAY( arg3 );
6573 }
6574 }
6575 {
6576 LUA_FREE_ARRAY( arg7 );
6577 }
6578 {
6579 LUA_FREE_ARRAY( arg11 );
6580 }
6581 {
6582 LUA_FREE_ARRAY( arg12 );
6583 }
6584 lua_error(L);
6585 return SWIG_arg;
6586 }
6587
6588
6589 static int _wrap_surf3d(lua_State* L) {
6590 int SWIG_arg = 0;
6591 PLFLT *arg1 = (PLFLT *) 0 ;
6592 PLFLT *arg2 = (PLFLT *) 0 ;
6593 PLFLT **arg3 = (PLFLT **) 0 ;
6594 PLINT arg4 ;
6595 PLINT arg5 ;
6596 PLINT arg6 ;
6597 PLFLT *arg7 = (PLFLT *) 0 ;
6598 PLINT arg8 ;
6599 int ii3 ;
6600
6601 SWIG_check_num_args("plsurf3d",5,5)
6602 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsurf3d",4,"PLINT");
6603 {
6604 int temp;
6605 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6606 if ( !arg1 )
6607 SWIG_fail;
6608 Xlen = temp;
6609 }
6610 {
6611 int temp;
6612 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6613 if ( !arg2 )
6614 SWIG_fail;
6615 Ylen = temp;
6616 }
6617 {
6618 int jj;
6619
6620 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6621 if ( !arg3 )
6622 SWIG_fail;
6623 arg4 = ii3;
6624 arg5 = jj;
6625 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6626 {
6627 lua_pushfstring( L, "Vectors must match matrix." );
6628 SWIG_fail;
6629 }
6630 }
6631 arg6 = (PLINT)lua_tonumber(L, 4);
6632 {
6633 int temp;
6634 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
6635 if ( !arg7 )
6636 SWIG_fail;
6637 arg8 = Alen = temp;
6638 }
6639 plsurf3d((double const *)arg1,(double const *)arg2,(double const **)arg3,arg4,arg5,arg6,(double const *)arg7,arg8);
6640
6641 {
6642 LUA_FREE_ARRAY( arg1 );
6643 }
6644 {
6645 LUA_FREE_ARRAY( arg2 );
6646 }
6647 {
6648 int i;
6649
6650 if ( arg3 )
6651 {
6652 for ( i = 0; i < ii3; i++ )
6653 LUA_FREE_ARRAY( arg3[i] );
6654 LUA_FREE_ARRAY( arg3 );
6655 }
6656 }
6657 {
6658 LUA_FREE_ARRAY( arg7 );
6659 }
6660 return SWIG_arg;
6661
6662 if(0) SWIG_fail;
6663
6664 fail:
6665 {
6666 LUA_FREE_ARRAY( arg1 );
6667 }
6668 {
6669 LUA_FREE_ARRAY( arg2 );
6670 }
6671 {
6672 int i;
6673
6674 if ( arg3 )
6675 {
6676 for ( i = 0; i < ii3; i++ )
6677 LUA_FREE_ARRAY( arg3[i] );
6678 LUA_FREE_ARRAY( arg3 );
6679 }
6680 }
6681 {
6682 LUA_FREE_ARRAY( arg7 );
6683 }
6684 lua_error(L);
6685 return SWIG_arg;
6686 }
6687
6688
6689 static int _wrap_surf3dl(lua_State* L) {
6690 int SWIG_arg = 0;
6691 PLFLT *arg1 = (PLFLT *) 0 ;
6692 PLFLT *arg2 = (PLFLT *) 0 ;
6693 PLFLT **arg3 = (PLFLT **) 0 ;
6694 PLINT arg4 ;
6695 PLINT arg5 ;
6696 PLINT arg6 ;
6697 PLFLT *arg7 = (PLFLT *) 0 ;
6698 PLINT arg8 ;
6699 PLINT arg9 ;
6700 PLINT arg10 ;
6701 PLINT *arg11 = (PLINT *) 0 ;
6702 PLINT *arg12 = (PLINT *) 0 ;
6703 int ii3 ;
6704 int temp12 ;
6705
6706 SWIG_check_num_args("plsurf3dl",8,8)
6707 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsurf3dl",4,"PLINT");
6708 if(!lua_isnumber(L,6)) SWIG_fail_arg("plsurf3dl",6,"PLINT");
6709 {
6710 int temp;
6711 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6712 if ( !arg1 )
6713 SWIG_fail;
6714 Xlen = temp;
6715 }
6716 {
6717 int temp;
6718 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
6719 if ( !arg2 )
6720 SWIG_fail;
6721 Ylen = temp;
6722 }
6723 {
6724 int jj;
6725
6726 arg3 = read_double_Matrix( L, 3, &ii3, &jj );
6727 if ( !arg3 )
6728 SWIG_fail;
6729 arg4 = ii3;
6730 arg5 = jj;
6731 if ( ( arg4 != Xlen ) || ( arg5 != Ylen ) )
6732 {
6733 lua_pushfstring( L, "Vectors must match matrix." );
6734 SWIG_fail;
6735 }
6736 }
6737 arg6 = (PLINT)lua_tonumber(L, 4);
6738 {
6739 int temp;
6740 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp );
6741 if ( !arg7 )
6742 SWIG_fail;
6743 arg8 = Alen = temp;
6744 }
6745 arg9 = (PLINT)lua_tonumber(L, 6);
6746 {
6747 arg11 = (PLINT *) LUA_get_int_num_array_var( L, 7, &arg10 );
6748 if ( !arg11 )
6749 SWIG_fail;
6750 Alen = arg10;
6751 }
6752 {
6753 arg12 = (PLINT *) LUA_get_int_num_array_var( L, 8, &temp12 );
6754 if ( !arg12 )
6755 SWIG_fail;
6756 if ( temp12 != Alen )
6757 {
6758 lua_pushfstring( L, "Tables must be of same length." );
6759 SWIG_fail;
6760 }
6761 }
6762 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);
6763
6764 {
6765 LUA_FREE_ARRAY( arg1 );
6766 }
6767 {
6768 LUA_FREE_ARRAY( arg2 );
6769 }
6770 {
6771 int i;
6772
6773 if ( arg3 )
6774 {
6775 for ( i = 0; i < ii3; i++ )
6776 LUA_FREE_ARRAY( arg3[i] );
6777 LUA_FREE_ARRAY( arg3 );
6778 }
6779 }
6780 {
6781 LUA_FREE_ARRAY( arg7 );
6782 }
6783 {
6784 LUA_FREE_ARRAY( arg11 );
6785 }
6786 {
6787 LUA_FREE_ARRAY( arg12 );
6788 }
6789 return SWIG_arg;
6790
6791 if(0) SWIG_fail;
6792
6793 fail:
6794 {
6795 LUA_FREE_ARRAY( arg1 );
6796 }
6797 {
6798 LUA_FREE_ARRAY( arg2 );
6799 }
6800 {
6801 int i;
6802
6803 if ( arg3 )
6804 {
6805 for ( i = 0; i < ii3; i++ )
6806 LUA_FREE_ARRAY( arg3[i] );
6807 LUA_FREE_ARRAY( arg3 );
6808 }
6809 }
6810 {
6811 LUA_FREE_ARRAY( arg7 );
6812 }
6813 {
6814 LUA_FREE_ARRAY( arg11 );
6815 }
6816 {
6817 LUA_FREE_ARRAY( arg12 );
6818 }
6819 lua_error(L);
6820 return SWIG_arg;
6821 }
6822
6823
6824 static int _wrap_parseopts(lua_State* L) {
6825 int SWIG_arg = 0;
6826 int *arg1 = (int *) 0 ;
6827 char **arg2 = (char **) 0 ;
6828 PLINT arg3 ;
6829 PLINT result;
6830
6831 SWIG_check_num_args("plparseopts",2,2)
6832 if(!lua_istable(L,1)) SWIG_fail_arg("plparseopts",1,"int *");
6833 if(!lua_isnumber(L,2)) SWIG_fail_arg("plparseopts",2,"PLINT");
6834 {
6835 int i, n;
6836
6837 // from lua 5.1 on there is no element "n" anymore,
6838 // so we need to find out the number of command line
6839 // options manually
6840 for ( i = 1;; i++ )
6841 {
6842 lua_rawgeti( L, 1, i );
6843 if ( lua_isnil( L, -1 ) )
6844 {
6845 // ok, this index doesn't exist anymore, we have i-1
6846 // command line options
6847 lua_pop( L, 1 );
6848 break;
6849 }
6850 }
6851 n = i;
6852 arg1 = &n;
6853
6854 arg2 = LUA_ALLOC_ARRAY( char*, ( n + 1 ) );
6855
6856 for ( i = 0; i < n; i++ )
6857 {
6858 lua_rawgeti( L, 1, i );
6859 if ( lua_isstring( L, -1 ) )
6860 {
6861 arg2[i] = (char *) lua_tostring( L, -1 );
6862 }
6863 else
6864 {
6865 lua_pop( L, 1 );
6866 lua_pushfstring( L, "List items must be strings" );
6867 SWIG_fail;
6868 // arg2 array is freed after 'fail:'
6869 }
6870 lua_pop( L, 1 );
6871 }
6872 arg2[n] = NULL;
6873 }
6874 arg3 = (PLINT)lua_tonumber(L, 2);
6875 result = (PLINT)plparseopts(arg1,(char const **)arg2,arg3);
6876 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
6877 {
6878 LUA_FREE_ARRAY( arg2 );
6879 }
6880 return SWIG_arg;
6881
6882 if(0) SWIG_fail;
6883
6884 fail:
6885 {
6886 LUA_FREE_ARRAY( arg2 );
6887 }
6888 lua_error(L);
6889 return SWIG_arg;
6890 }
6891
6892
6893 static int _wrap_pat(lua_State* L) {
6894 int SWIG_arg = 0;
6895 PLINT arg1 ;
6896 PLINT *arg2 = (PLINT *) 0 ;
6897 PLINT *arg3 = (PLINT *) 0 ;
6898 int temp3 ;
6899
6900 SWIG_check_num_args("plpat",2,2)
6901 {
6902 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 1, &arg1 );
6903 if ( !arg2 )
6904 SWIG_fail;
6905 Alen = arg1;
6906 }
6907 {
6908 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp3 );
6909 if ( !arg3 )
6910 SWIG_fail;
6911 if ( temp3 != Alen )
6912 {
6913 lua_pushfstring( L, "Tables must be of same length." );
6914 SWIG_fail;
6915 }
6916 }
6917 plpat(arg1,(int const *)arg2,(int const *)arg3);
6918
6919 {
6920 LUA_FREE_ARRAY( arg2 );
6921 }
6922 {
6923 LUA_FREE_ARRAY( arg3 );
6924 }
6925 return SWIG_arg;
6926
6927 if(0) SWIG_fail;
6928
6929 fail:
6930 {
6931 LUA_FREE_ARRAY( arg2 );
6932 }
6933 {
6934 LUA_FREE_ARRAY( arg3 );
6935 }
6936 lua_error(L);
6937 return SWIG_arg;
6938 }
6939
6940
6941 static int _wrap_path(lua_State* L) {
6942 int SWIG_arg = 0;
6943 PLINT arg1 ;
6944 PLFLT arg2 ;
6945 PLFLT arg3 ;
6946 PLFLT arg4 ;
6947 PLFLT arg5 ;
6948
6949 SWIG_check_num_args("plpath",5,5)
6950 if(!lua_isnumber(L,1)) SWIG_fail_arg("plpath",1,"PLINT");
6951 if(!lua_isnumber(L,2)) SWIG_fail_arg("plpath",2,"PLFLT");
6952 if(!lua_isnumber(L,3)) SWIG_fail_arg("plpath",3,"PLFLT");
6953 if(!lua_isnumber(L,4)) SWIG_fail_arg("plpath",4,"PLFLT");
6954 if(!lua_isnumber(L,5)) SWIG_fail_arg("plpath",5,"PLFLT");
6955 arg1 = (PLINT)lua_tonumber(L, 1);
6956 arg2 = (PLFLT)lua_tonumber(L, 2);
6957 arg3 = (PLFLT)lua_tonumber(L, 3);
6958 arg4 = (PLFLT)lua_tonumber(L, 4);
6959 arg5 = (PLFLT)lua_tonumber(L, 5);
6960 plpath(arg1,arg2,arg3,arg4,arg5);
6961
6962 return SWIG_arg;
6963
6964 if(0) SWIG_fail;
6965
6966 fail:
6967 lua_error(L);
6968 return SWIG_arg;
6969 }
6970
6971
6972 static int _wrap_poin(lua_State* L) {
6973 int SWIG_arg = 0;
6974 PLINT arg1 ;
6975 PLFLT *arg2 = (PLFLT *) 0 ;
6976 PLFLT *arg3 = (PLFLT *) 0 ;
6977 PLINT arg4 ;
6978 int temp3 ;
6979
6980 SWIG_check_num_args("plpoin",3,3)
6981 if(!lua_isnumber(L,3)) SWIG_fail_arg("plpoin",3,"PLINT");
6982 {
6983 int temp;
6984 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
6985 if ( !arg2 )
6986 SWIG_fail;
6987 arg1 = Alen = temp;
6988 }
6989 {
6990 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
6991 if ( !arg3 )
6992 SWIG_fail;
6993 if ( temp3 != Alen )
6994 {
6995 lua_pushfstring( L, "Tables must be of same length." );
6996 SWIG_fail;
6997 }
6998 }
6999 arg4 = (PLINT)lua_tonumber(L, 3);
7000 plpoin(arg1,(double const *)arg2,(double const *)arg3,arg4);
7001
7002 {
7003 LUA_FREE_ARRAY( arg2 );
7004 }
7005 {
7006 LUA_FREE_ARRAY( arg3 );
7007 }
7008 return SWIG_arg;
7009
7010 if(0) SWIG_fail;
7011
7012 fail:
7013 {
7014 LUA_FREE_ARRAY( arg2 );
7015 }
7016 {
7017 LUA_FREE_ARRAY( arg3 );
7018 }
7019 lua_error(L);
7020 return SWIG_arg;
7021 }
7022
7023
7024 static int _wrap_poin3(lua_State* L) {
7025 int SWIG_arg = 0;
7026 PLINT arg1 ;
7027 PLFLT *arg2 = (PLFLT *) 0 ;
7028 PLFLT *arg3 = (PLFLT *) 0 ;
7029 PLFLT *arg4 = (PLFLT *) 0 ;
7030 PLINT arg5 ;
7031 int temp3 ;
7032 int temp4 ;
7033
7034 SWIG_check_num_args("plpoin3",4,4)
7035 if(!lua_isnumber(L,4)) SWIG_fail_arg("plpoin3",4,"PLINT");
7036 {
7037 int temp;
7038 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7039 if ( !arg2 )
7040 SWIG_fail;
7041 arg1 = Alen = temp;
7042 }
7043 {
7044 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
7045 if ( !arg3 )
7046 SWIG_fail;
7047 if ( temp3 != Alen )
7048 {
7049 lua_pushfstring( L, "Tables must be of same length." );
7050 SWIG_fail;
7051 }
7052 }
7053 {
7054 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
7055 if ( !arg4 )
7056 SWIG_fail;
7057 if ( temp4 != Alen )
7058 {
7059 lua_pushfstring( L, "Tables must be of same length." );
7060 SWIG_fail;
7061 }
7062 }
7063 arg5 = (PLINT)lua_tonumber(L, 4);
7064 plpoin3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,arg5);
7065
7066 {
7067 LUA_FREE_ARRAY( arg2 );
7068 }
7069 {
7070 LUA_FREE_ARRAY( arg3 );
7071 }
7072 {
7073 LUA_FREE_ARRAY( arg4 );
7074 }
7075 return SWIG_arg;
7076
7077 if(0) SWIG_fail;
7078
7079 fail:
7080 {
7081 LUA_FREE_ARRAY( arg2 );
7082 }
7083 {
7084 LUA_FREE_ARRAY( arg3 );
7085 }
7086 {
7087 LUA_FREE_ARRAY( arg4 );
7088 }
7089 lua_error(L);
7090 return SWIG_arg;
7091 }
7092
7093
7094 static int _wrap_poly3(lua_State* L) {
7095 int SWIG_arg = 0;
7096 PLINT arg1 ;
7097 PLFLT *arg2 = (PLFLT *) 0 ;
7098 PLFLT *arg3 = (PLFLT *) 0 ;
7099 PLFLT *arg4 = (PLFLT *) 0 ;
7100 PLBOOL *arg5 = (PLBOOL *) 0 ;
7101 PLBOOL arg6 ;
7102 int temp3 ;
7103 int temp4 ;
7104 int temp5 ;
7105
7106 SWIG_check_num_args("plpoly3",5,5)
7107 if(!lua_isnumber(L,5)) SWIG_fail_arg("plpoly3",5,"PLBOOL");
7108 {
7109 int temp;
7110 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
7111 if ( !arg2 )
7112 SWIG_fail;
7113 arg1 = Alen = temp;
7114 }
7115 {
7116 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
7117 if ( !arg3 )
7118 SWIG_fail;
7119 if ( temp3 != Alen )
7120 {
7121 lua_pushfstring( L, "Tables must be of same length." );
7122 SWIG_fail;
7123 }
7124 }
7125 {
7126 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
7127 if ( !arg4 )
7128 SWIG_fail;
7129 if ( temp4 != Alen )
7130 {
7131 lua_pushfstring( L, "Tables must be of same length." );
7132 SWIG_fail;
7133 }
7134 }
7135 {
7136 arg5 = (PLINT *) LUA_get_int_num_array_var( L, 4, &temp5 );
7137 if ( !arg5 )
7138 SWIG_fail;
7139 if ( temp5 < Alen - 1 )
7140 {
7141 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
7142 SWIG_fail;
7143 }
7144 }
7145 arg6 = (PLBOOL)lua_tonumber(L, 5);
7146 plpoly3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,(int const *)arg5,arg6);
7147
7148 {
7149 LUA_FREE_ARRAY( arg2 );
7150 }
7151 {
7152 LUA_FREE_ARRAY( arg3 );
7153 }
7154 {
7155 LUA_FREE_ARRAY( arg4 );
7156 }
7157 {
7158 LUA_FREE_ARRAY( arg5 );
7159 }
7160 return SWIG_arg;
7161
7162 if(0) SWIG_fail;
7163
7164 fail:
7165 {
7166 LUA_FREE_ARRAY( arg2 );
7167 }
7168 {
7169 LUA_FREE_ARRAY( arg3 );
7170 }
7171 {
7172 LUA_FREE_ARRAY( arg4 );
7173 }
7174 {
7175 LUA_FREE_ARRAY( arg5 );
7176 }
7177 lua_error(L);
7178 return SWIG_arg;
7179 }
7180
7181
7182 static int _wrap_prec(lua_State* L) {
7183 int SWIG_arg = 0;
7184 PLINT arg1 ;
7185 PLINT arg2 ;
7186
7187 SWIG_check_num_args("plprec",2,2)
7188 if(!lua_isnumber(L,1)) SWIG_fail_arg("plprec",1,"PLINT");
7189 if(!lua_isnumber(L,2)) SWIG_fail_arg("plprec",2,"PLINT");
7190 arg1 = (PLINT)lua_tonumber(L, 1);
7191 arg2 = (PLINT)lua_tonumber(L, 2);
7192 plprec(arg1,arg2);
7193
7194 return SWIG_arg;
7195
7196 if(0) SWIG_fail;
7197
7198 fail:
7199 lua_error(L);
7200 return SWIG_arg;
7201 }
7202
7203
7204 static int _wrap_psty(lua_State* L) {
7205 int SWIG_arg = 0;
7206 PLINT arg1 ;
7207
7208 SWIG_check_num_args("plpsty",1,1)
7209 if(!lua_isnumber(L,1)) SWIG_fail_arg("plpsty",1,"PLINT");
7210 arg1 = (PLINT)lua_tonumber(L, 1);
7211 plpsty(arg1);
7212
7213 return SWIG_arg;
7214
7215 if(0) SWIG_fail;
7216
7217 fail:
7218 lua_error(L);
7219 return SWIG_arg;
7220 }
7221
7222
7223 static int _wrap_ptex(lua_State* L) {
7224 int SWIG_arg = 0;
7225 PLFLT arg1 ;
7226 PLFLT arg2 ;
7227 PLFLT arg3 ;
7228 PLFLT arg4 ;
7229 PLFLT arg5 ;
7230 char *arg6 = (char *) 0 ;
7231
7232 SWIG_check_num_args("plptex",6,6)
7233 if(!lua_isnumber(L,1)) SWIG_fail_arg("plptex",1,"PLFLT");
7234 if(!lua_isnumber(L,2)) SWIG_fail_arg("plptex",2,"PLFLT");
7235 if(!lua_isnumber(L,3)) SWIG_fail_arg("plptex",3,"PLFLT");
7236 if(!lua_isnumber(L,4)) SWIG_fail_arg("plptex",4,"PLFLT");
7237 if(!lua_isnumber(L,5)) SWIG_fail_arg("plptex",5,"PLFLT");
7238 if(!SWIG_lua_isnilstring(L,6)) SWIG_fail_arg("plptex",6,"char const *");
7239 arg1 = (PLFLT)lua_tonumber(L, 1);
7240 arg2 = (PLFLT)lua_tonumber(L, 2);
7241 arg3 = (PLFLT)lua_tonumber(L, 3);
7242 arg4 = (PLFLT)lua_tonumber(L, 4);
7243 arg5 = (PLFLT)lua_tonumber(L, 5);
7244 arg6 = (char *)lua_tostring(L, 6);
7245 plptex(arg1,arg2,arg3,arg4,arg5,(char const *)arg6);
7246
7247 return SWIG_arg;
7248
7249 if(0) SWIG_fail;
7250
7251 fail:
7252 lua_error(L);
7253 return SWIG_arg;
7254 }
7255
7256
7257 static int _wrap_ptex3(lua_State* L) {
7258 int SWIG_arg = 0;
7259 PLFLT arg1 ;
7260 PLFLT arg2 ;
7261 PLFLT arg3 ;
7262 PLFLT arg4 ;
7263 PLFLT arg5 ;
7264 PLFLT arg6 ;
7265 PLFLT arg7 ;
7266 PLFLT arg8 ;
7267 PLFLT arg9 ;
7268 PLFLT arg10 ;
7269 char *arg11 = (char *) 0 ;
7270
7271 SWIG_check_num_args("plptex3",11,11)
7272 if(!lua_isnumber(L,1)) SWIG_fail_arg("plptex3",1,"PLFLT");
7273 if(!lua_isnumber(L,2)) SWIG_fail_arg("plptex3",2,"PLFLT");
7274 if(!lua_isnumber(L,3)) SWIG_fail_arg("plptex3",3,"PLFLT");
7275 if(!lua_isnumber(L,4)) SWIG_fail_arg("plptex3",4,"PLFLT");
7276 if(!lua_isnumber(L,5)) SWIG_fail_arg("plptex3",5,"PLFLT");
7277 if(!lua_isnumber(L,6)) SWIG_fail_arg("plptex3",6,"PLFLT");
7278 if(!lua_isnumber(L,7)) SWIG_fail_arg("plptex3",7,"PLFLT");
7279 if(!lua_isnumber(L,8)) SWIG_fail_arg("plptex3",8,"PLFLT");
7280 if(!lua_isnumber(L,9)) SWIG_fail_arg("plptex3",9,"PLFLT");
7281 if(!lua_isnumber(L,10)) SWIG_fail_arg("plptex3",10,"PLFLT");
7282 if(!SWIG_lua_isnilstring(L,11)) SWIG_fail_arg("plptex3",11,"char const *");
7283 arg1 = (PLFLT)lua_tonumber(L, 1);
7284 arg2 = (PLFLT)lua_tonumber(L, 2);
7285 arg3 = (PLFLT)lua_tonumber(L, 3);
7286 arg4 = (PLFLT)lua_tonumber(L, 4);
7287 arg5 = (PLFLT)lua_tonumber(L, 5);
7288 arg6 = (PLFLT)lua_tonumber(L, 6);
7289 arg7 = (PLFLT)lua_tonumber(L, 7);
7290 arg8 = (PLFLT)lua_tonumber(L, 8);
7291 arg9 = (PLFLT)lua_tonumber(L, 9);
7292 arg10 = (PLFLT)lua_tonumber(L, 10);
7293 arg11 = (char *)lua_tostring(L, 11);
7294 plptex3(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,(char const *)arg11);
7295
7296 return SWIG_arg;
7297
7298 if(0) SWIG_fail;
7299
7300 fail:
7301 lua_error(L);
7302 return SWIG_arg;
7303 }
7304
7305
7306 static int _wrap_randd(lua_State* L) {
7307 int SWIG_arg = 0;
7308 PLFLT result;
7309
7310 SWIG_check_num_args("plrandd",0,0)
7311 result = (PLFLT)plrandd();
7312 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
7313 return SWIG_arg;
7314
7315 if(0) SWIG_fail;
7316
7317 fail:
7318 lua_error(L);
7319 return SWIG_arg;
7320 }
7321
7322
7323 static int _wrap_replot(lua_State* L) {
7324 int SWIG_arg = 0;
7325
7326 SWIG_check_num_args("plreplot",0,0)
7327 plreplot();
7328
7329 return SWIG_arg;
7330
7331 if(0) SWIG_fail;
7332
7333 fail:
7334 lua_error(L);
7335 return SWIG_arg;
7336 }
7337
7338
7339 static int _wrap_rgbhls(lua_State* L) {
7340 int SWIG_arg = 0;
7341 PLFLT arg1 ;
7342 PLFLT arg2 ;
7343 PLFLT arg3 ;
7344 PLFLT *arg4 = (PLFLT *) 0 ;
7345 PLFLT *arg5 = (PLFLT *) 0 ;
7346 PLFLT *arg6 = (PLFLT *) 0 ;
7347 PLFLT temp4 ;
7348 PLFLT temp5 ;
7349 PLFLT temp6 ;
7350
7351 arg4 = &temp4;
7352 arg5 = &temp5;
7353 arg6 = &temp6;
7354 SWIG_check_num_args("plrgbhls",3,3)
7355 if(!lua_isnumber(L,1)) SWIG_fail_arg("plrgbhls",1,"PLFLT");
7356 if(!lua_isnumber(L,2)) SWIG_fail_arg("plrgbhls",2,"PLFLT");
7357 if(!lua_isnumber(L,3)) SWIG_fail_arg("plrgbhls",3,"PLFLT");
7358 arg1 = (PLFLT)lua_tonumber(L, 1);
7359 arg2 = (PLFLT)lua_tonumber(L, 2);
7360 arg3 = (PLFLT)lua_tonumber(L, 3);
7361 plrgbhls(arg1,arg2,arg3,arg4,arg5,arg6);
7362
7363 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
7364 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
7365 lua_pushnumber(L, (lua_Number) *arg6); SWIG_arg++;
7366 return SWIG_arg;
7367
7368 if(0) SWIG_fail;
7369
7370 fail:
7371 lua_error(L);
7372 return SWIG_arg;
7373 }
7374
7375
7376 static int _wrap_schr(lua_State* L) {
7377 int SWIG_arg = 0;
7378 PLFLT arg1 ;
7379 PLFLT arg2 ;
7380
7381 SWIG_check_num_args("plschr",2,2)
7382 if(!lua_isnumber(L,1)) SWIG_fail_arg("plschr",1,"PLFLT");
7383 if(!lua_isnumber(L,2)) SWIG_fail_arg("plschr",2,"PLFLT");
7384 arg1 = (PLFLT)lua_tonumber(L, 1);
7385 arg2 = (PLFLT)lua_tonumber(L, 2);
7386 plschr(arg1,arg2);
7387
7388 return SWIG_arg;
7389
7390 if(0) SWIG_fail;
7391
7392 fail:
7393 lua_error(L);
7394 return SWIG_arg;
7395 }
7396
7397
7398 static int _wrap_scmap0(lua_State* L) {
7399 int SWIG_arg = 0;
7400 PLINT *arg1 = (PLINT *) 0 ;
7401 PLINT *arg2 = (PLINT *) 0 ;
7402 PLINT *arg3 = (PLINT *) 0 ;
7403 PLINT arg4 ;
7404 int temp1 ;
7405 int temp2 ;
7406 int temp3 ;
7407
7408 SWIG_check_num_args("plscmap0",3,3)
7409 {
7410 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
7411 if ( !arg1 )
7412 SWIG_fail;
7413 Alen = temp1;
7414 }
7415 {
7416 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
7417 if ( !arg2 )
7418 SWIG_fail;
7419 if ( temp2 != Alen )
7420 {
7421 lua_pushfstring( L, "Tables must be of same length." );
7422 SWIG_fail;
7423 }
7424 }
7425 {
7426 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
7427 if ( !arg3 )
7428 SWIG_fail;
7429 if ( temp3 != Alen )
7430 {
7431 lua_pushfstring( L, "Tables must be of same length." );
7432 SWIG_fail;
7433 }
7434 arg4 = temp3;
7435 }
7436 plscmap0((int const *)arg1,(int const *)arg2,(int const *)arg3,arg4);
7437
7438 {
7439 LUA_FREE_ARRAY( arg1 );
7440 }
7441 {
7442 LUA_FREE_ARRAY( arg2 );
7443 }
7444 {
7445 LUA_FREE_ARRAY( arg3 );
7446 }
7447 return SWIG_arg;
7448
7449 if(0) SWIG_fail;
7450
7451 fail:
7452 {
7453 LUA_FREE_ARRAY( arg1 );
7454 }
7455 {
7456 LUA_FREE_ARRAY( arg2 );
7457 }
7458 {
7459 LUA_FREE_ARRAY( arg3 );
7460 }
7461 lua_error(L);
7462 return SWIG_arg;
7463 }
7464
7465
7466 static int _wrap_scmap0a(lua_State* L) {
7467 int SWIG_arg = 0;
7468 PLINT *arg1 = (PLINT *) 0 ;
7469 PLINT *arg2 = (PLINT *) 0 ;
7470 PLINT *arg3 = (PLINT *) 0 ;
7471 PLFLT *arg4 = (PLFLT *) 0 ;
7472 PLINT arg5 ;
7473 int temp1 ;
7474 int temp2 ;
7475 int temp3 ;
7476
7477 SWIG_check_num_args("plscmap0a",4,4)
7478 {
7479 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
7480 if ( !arg1 )
7481 SWIG_fail;
7482 Alen = temp1;
7483 }
7484 {
7485 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
7486 if ( !arg2 )
7487 SWIG_fail;
7488 if ( temp2 != Alen )
7489 {
7490 lua_pushfstring( L, "Tables must be of same length." );
7491 SWIG_fail;
7492 }
7493 }
7494 {
7495 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
7496 if ( !arg3 )
7497 SWIG_fail;
7498 if ( temp3 != Alen )
7499 {
7500 lua_pushfstring( L, "Tables must be of same length." );
7501 SWIG_fail;
7502 }
7503 }
7504 {
7505 int temp;
7506 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
7507 if ( !arg4 )
7508 SWIG_fail;
7509 if ( temp != Alen )
7510 {
7511 lua_pushfstring( L, "Tables must be of same length." );
7512 SWIG_fail;
7513 }
7514 arg5 = temp;
7515 }
7516 plscmap0a((int const *)arg1,(int const *)arg2,(int const *)arg3,(double const *)arg4,arg5);
7517
7518 {
7519 LUA_FREE_ARRAY( arg1 );
7520 }
7521 {
7522 LUA_FREE_ARRAY( arg2 );
7523 }
7524 {
7525 LUA_FREE_ARRAY( arg3 );
7526 }
7527 {
7528 LUA_FREE_ARRAY( arg4 );
7529 }
7530 return SWIG_arg;
7531
7532 if(0) SWIG_fail;
7533
7534 fail:
7535 {
7536 LUA_FREE_ARRAY( arg1 );
7537 }
7538 {
7539 LUA_FREE_ARRAY( arg2 );
7540 }
7541 {
7542 LUA_FREE_ARRAY( arg3 );
7543 }
7544 {
7545 LUA_FREE_ARRAY( arg4 );
7546 }
7547 lua_error(L);
7548 return SWIG_arg;
7549 }
7550
7551
7552 static int _wrap_scmap0n(lua_State* L) {
7553 int SWIG_arg = 0;
7554 PLINT arg1 ;
7555
7556 SWIG_check_num_args("plscmap0n",1,1)
7557 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap0n",1,"PLINT");
7558 arg1 = (PLINT)lua_tonumber(L, 1);
7559 plscmap0n(arg1);
7560
7561 return SWIG_arg;
7562
7563 if(0) SWIG_fail;
7564
7565 fail:
7566 lua_error(L);
7567 return SWIG_arg;
7568 }
7569
7570
7571 static int _wrap_scmap1(lua_State* L) {
7572 int SWIG_arg = 0;
7573 PLINT *arg1 = (PLINT *) 0 ;
7574 PLINT *arg2 = (PLINT *) 0 ;
7575 PLINT *arg3 = (PLINT *) 0 ;
7576 PLINT arg4 ;
7577 int temp1 ;
7578 int temp2 ;
7579 int temp3 ;
7580
7581 SWIG_check_num_args("plscmap1",3,3)
7582 {
7583 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
7584 if ( !arg1 )
7585 SWIG_fail;
7586 Alen = temp1;
7587 }
7588 {
7589 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
7590 if ( !arg2 )
7591 SWIG_fail;
7592 if ( temp2 != Alen )
7593 {
7594 lua_pushfstring( L, "Tables must be of same length." );
7595 SWIG_fail;
7596 }
7597 }
7598 {
7599 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
7600 if ( !arg3 )
7601 SWIG_fail;
7602 if ( temp3 != Alen )
7603 {
7604 lua_pushfstring( L, "Tables must be of same length." );
7605 SWIG_fail;
7606 }
7607 arg4 = temp3;
7608 }
7609 plscmap1((int const *)arg1,(int const *)arg2,(int const *)arg3,arg4);
7610
7611 {
7612 LUA_FREE_ARRAY( arg1 );
7613 }
7614 {
7615 LUA_FREE_ARRAY( arg2 );
7616 }
7617 {
7618 LUA_FREE_ARRAY( arg3 );
7619 }
7620 return SWIG_arg;
7621
7622 if(0) SWIG_fail;
7623
7624 fail:
7625 {
7626 LUA_FREE_ARRAY( arg1 );
7627 }
7628 {
7629 LUA_FREE_ARRAY( arg2 );
7630 }
7631 {
7632 LUA_FREE_ARRAY( arg3 );
7633 }
7634 lua_error(L);
7635 return SWIG_arg;
7636 }
7637
7638
7639 static int _wrap_scmap1a(lua_State* L) {
7640 int SWIG_arg = 0;
7641 PLINT *arg1 = (PLINT *) 0 ;
7642 PLINT *arg2 = (PLINT *) 0 ;
7643 PLINT *arg3 = (PLINT *) 0 ;
7644 PLFLT *arg4 = (PLFLT *) 0 ;
7645 PLINT arg5 ;
7646 int temp1 ;
7647 int temp2 ;
7648 int temp3 ;
7649
7650 SWIG_check_num_args("plscmap1a",4,4)
7651 {
7652 arg1 = (PLINT *) LUA_get_int_num_array_var( L, 1, &temp1 );
7653 if ( !arg1 )
7654 SWIG_fail;
7655 Alen = temp1;
7656 }
7657 {
7658 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp2 );
7659 if ( !arg2 )
7660 SWIG_fail;
7661 if ( temp2 != Alen )
7662 {
7663 lua_pushfstring( L, "Tables must be of same length." );
7664 SWIG_fail;
7665 }
7666 }
7667 {
7668 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 3, &temp3 );
7669 if ( !arg3 )
7670 SWIG_fail;
7671 if ( temp3 != Alen )
7672 {
7673 lua_pushfstring( L, "Tables must be of same length." );
7674 SWIG_fail;
7675 }
7676 }
7677 {
7678 int temp;
7679 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp );
7680 if ( !arg4 )
7681 SWIG_fail;
7682 if ( temp != Alen )
7683 {
7684 lua_pushfstring( L, "Tables must be of same length." );
7685 SWIG_fail;
7686 }
7687 arg5 = temp;
7688 }
7689 plscmap1a((int const *)arg1,(int const *)arg2,(int const *)arg3,(double const *)arg4,arg5);
7690
7691 {
7692 LUA_FREE_ARRAY( arg1 );
7693 }
7694 {
7695 LUA_FREE_ARRAY( arg2 );
7696 }
7697 {
7698 LUA_FREE_ARRAY( arg3 );
7699 }
7700 {
7701 LUA_FREE_ARRAY( arg4 );
7702 }
7703 return SWIG_arg;
7704
7705 if(0) SWIG_fail;
7706
7707 fail:
7708 {
7709 LUA_FREE_ARRAY( arg1 );
7710 }
7711 {
7712 LUA_FREE_ARRAY( arg2 );
7713 }
7714 {
7715 LUA_FREE_ARRAY( arg3 );
7716 }
7717 {
7718 LUA_FREE_ARRAY( arg4 );
7719 }
7720 lua_error(L);
7721 return SWIG_arg;
7722 }
7723
7724
7725 static int _wrap_scmap1l(lua_State* L) {
7726 int SWIG_arg = 0;
7727 PLBOOL arg1 ;
7728 PLINT arg2 ;
7729 PLFLT *arg3 = (PLFLT *) 0 ;
7730 PLFLT *arg4 = (PLFLT *) 0 ;
7731 PLFLT *arg5 = (PLFLT *) 0 ;
7732 PLFLT *arg6 = (PLFLT *) 0 ;
7733 PLBOOL *arg7 = (PLBOOL *) 0 ;
7734 int temp4 ;
7735 int temp5 ;
7736 int temp6 ;
7737 int temp7 ;
7738
7739 {
7740 arg7 = NULL;
7741 }
7742 SWIG_check_num_args("plscmap1l",5,6)
7743 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1l",1,"PLBOOL");
7744 arg1 = (PLBOOL)lua_tonumber(L, 1);
7745 {
7746 int temp;
7747 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7748 if ( !arg3 )
7749 SWIG_fail;
7750 arg2 = Alen = temp;
7751 }
7752 {
7753 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
7754 if ( !arg4 )
7755 SWIG_fail;
7756 if ( temp4 != Alen )
7757 {
7758 lua_pushfstring( L, "Tables must be of same length." );
7759 SWIG_fail;
7760 }
7761 }
7762 {
7763 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp5 );
7764 if ( !arg5 )
7765 SWIG_fail;
7766 if ( temp5 != Alen )
7767 {
7768 lua_pushfstring( L, "Tables must be of same length." );
7769 SWIG_fail;
7770 }
7771 }
7772 {
7773 arg6 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp6 );
7774 if ( !arg6 )
7775 SWIG_fail;
7776 if ( temp6 != Alen )
7777 {
7778 lua_pushfstring( L, "Tables must be of same length." );
7779 SWIG_fail;
7780 }
7781 }
7782 if(lua_gettop(L)>=6){
7783 {
7784 if ( lua_isnil( L, 6 ) )
7785 {
7786 arg7 = NULL;
7787 }
7788 else
7789 {
7790 arg7 = (PLINT *) LUA_get_int_num_array_var( L, 6, &temp7 );
7791 if ( !arg7 )
7792 SWIG_fail;
7793 if ( temp7 < Alen - 1 )
7794 {
7795 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
7796 SWIG_fail;
7797 }
7798 }
7799 }
7800 }
7801 plscmap1l(arg1,arg2,(double const *)arg3,(double const *)arg4,(double const *)arg5,(double const *)arg6,(int const *)arg7);
7802
7803 {
7804 LUA_FREE_ARRAY( arg3 );
7805 }
7806 {
7807 LUA_FREE_ARRAY( arg4 );
7808 }
7809 {
7810 LUA_FREE_ARRAY( arg5 );
7811 }
7812 {
7813 LUA_FREE_ARRAY( arg6 );
7814 }
7815 {
7816 LUA_FREE_ARRAY( arg7 );
7817 }
7818 return SWIG_arg;
7819
7820 if(0) SWIG_fail;
7821
7822 fail:
7823 {
7824 LUA_FREE_ARRAY( arg3 );
7825 }
7826 {
7827 LUA_FREE_ARRAY( arg4 );
7828 }
7829 {
7830 LUA_FREE_ARRAY( arg5 );
7831 }
7832 {
7833 LUA_FREE_ARRAY( arg6 );
7834 }
7835 {
7836 LUA_FREE_ARRAY( arg7 );
7837 }
7838 lua_error(L);
7839 return SWIG_arg;
7840 }
7841
7842
7843 static int _wrap_scmap1la(lua_State* L) {
7844 int SWIG_arg = 0;
7845 PLBOOL arg1 ;
7846 PLINT arg2 ;
7847 PLFLT *arg3 = (PLFLT *) 0 ;
7848 PLFLT *arg4 = (PLFLT *) 0 ;
7849 PLFLT *arg5 = (PLFLT *) 0 ;
7850 PLFLT *arg6 = (PLFLT *) 0 ;
7851 PLFLT *arg7 = (PLFLT *) 0 ;
7852 PLBOOL *arg8 = (PLBOOL *) 0 ;
7853 int temp4 ;
7854 int temp5 ;
7855 int temp6 ;
7856 int temp7 ;
7857 int temp8 ;
7858
7859 {
7860 arg8 = NULL;
7861 }
7862 SWIG_check_num_args("plscmap1la",6,7)
7863 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1la",1,"PLBOOL");
7864 arg1 = (PLBOOL)lua_tonumber(L, 1);
7865 {
7866 int temp;
7867 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
7868 if ( !arg3 )
7869 SWIG_fail;
7870 arg2 = Alen = temp;
7871 }
7872 {
7873 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
7874 if ( !arg4 )
7875 SWIG_fail;
7876 if ( temp4 != Alen )
7877 {
7878 lua_pushfstring( L, "Tables must be of same length." );
7879 SWIG_fail;
7880 }
7881 }
7882 {
7883 arg5 = (PLFLT *) LUA_get_double_num_array_var( L, 4, &temp5 );
7884 if ( !arg5 )
7885 SWIG_fail;
7886 if ( temp5 != Alen )
7887 {
7888 lua_pushfstring( L, "Tables must be of same length." );
7889 SWIG_fail;
7890 }
7891 }
7892 {
7893 arg6 = (PLFLT *) LUA_get_double_num_array_var( L, 5, &temp6 );
7894 if ( !arg6 )
7895 SWIG_fail;
7896 if ( temp6 != Alen )
7897 {
7898 lua_pushfstring( L, "Tables must be of same length." );
7899 SWIG_fail;
7900 }
7901 }
7902 {
7903 arg7 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp7 );
7904 if ( !arg7 )
7905 SWIG_fail;
7906 if ( temp7 != Alen )
7907 {
7908 lua_pushfstring( L, "Tables must be of same length." );
7909 SWIG_fail;
7910 }
7911 }
7912 if(lua_gettop(L)>=7){
7913 {
7914 if ( lua_isnil( L, 7 ) )
7915 {
7916 arg8 = NULL;
7917 }
7918 else
7919 {
7920 arg8 = (PLINT *) LUA_get_int_num_array_var( L, 7, &temp8 );
7921 if ( !arg8 )
7922 SWIG_fail;
7923 if ( temp8 < Alen - 1 )
7924 {
7925 lua_pushfstring( L, "Tables must be at least length of others minus 1." );
7926 SWIG_fail;
7927 }
7928 }
7929 }
7930 }
7931 plscmap1la(arg1,arg2,(double const *)arg3,(double const *)arg4,(double const *)arg5,(double const *)arg6,(double const *)arg7,(int const *)arg8);
7932
7933 {
7934 LUA_FREE_ARRAY( arg3 );
7935 }
7936 {
7937 LUA_FREE_ARRAY( arg4 );
7938 }
7939 {
7940 LUA_FREE_ARRAY( arg5 );
7941 }
7942 {
7943 LUA_FREE_ARRAY( arg6 );
7944 }
7945 {
7946 LUA_FREE_ARRAY( arg7 );
7947 }
7948 {
7949 LUA_FREE_ARRAY( arg8 );
7950 }
7951 return SWIG_arg;
7952
7953 if(0) SWIG_fail;
7954
7955 fail:
7956 {
7957 LUA_FREE_ARRAY( arg3 );
7958 }
7959 {
7960 LUA_FREE_ARRAY( arg4 );
7961 }
7962 {
7963 LUA_FREE_ARRAY( arg5 );
7964 }
7965 {
7966 LUA_FREE_ARRAY( arg6 );
7967 }
7968 {
7969 LUA_FREE_ARRAY( arg7 );
7970 }
7971 {
7972 LUA_FREE_ARRAY( arg8 );
7973 }
7974 lua_error(L);
7975 return SWIG_arg;
7976 }
7977
7978
7979 static int _wrap_scmap1n(lua_State* L) {
7980 int SWIG_arg = 0;
7981 PLINT arg1 ;
7982
7983 SWIG_check_num_args("plscmap1n",1,1)
7984 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1n",1,"PLINT");
7985 arg1 = (PLINT)lua_tonumber(L, 1);
7986 plscmap1n(arg1);
7987
7988 return SWIG_arg;
7989
7990 if(0) SWIG_fail;
7991
7992 fail:
7993 lua_error(L);
7994 return SWIG_arg;
7995 }
7996
7997
7998 static int _wrap_scmap1_range(lua_State* L) {
7999 int SWIG_arg = 0;
8000 PLFLT arg1 ;
8001 PLFLT arg2 ;
8002
8003 SWIG_check_num_args("plscmap1_range",2,2)
8004 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscmap1_range",1,"PLFLT");
8005 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscmap1_range",2,"PLFLT");
8006 arg1 = (PLFLT)lua_tonumber(L, 1);
8007 arg2 = (PLFLT)lua_tonumber(L, 2);
8008 plscmap1_range(arg1,arg2);
8009
8010 return SWIG_arg;
8011
8012 if(0) SWIG_fail;
8013
8014 fail:
8015 lua_error(L);
8016 return SWIG_arg;
8017 }
8018
8019
8020 static int _wrap_gcmap1_range(lua_State* L) {
8021 int SWIG_arg = 0;
8022 PLFLT *arg1 = (PLFLT *) 0 ;
8023 PLFLT *arg2 = (PLFLT *) 0 ;
8024 PLFLT temp1 ;
8025 PLFLT temp2 ;
8026
8027 arg1 = &temp1;
8028 arg2 = &temp2;
8029 SWIG_check_num_args("plgcmap1_range",0,0)
8030 plgcmap1_range(arg1,arg2);
8031
8032 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
8033 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
8034 return SWIG_arg;
8035
8036 if(0) SWIG_fail;
8037
8038 fail:
8039 lua_error(L);
8040 return SWIG_arg;
8041 }
8042
8043
8044 static int _wrap_scol0(lua_State* L) {
8045 int SWIG_arg = 0;
8046 PLINT arg1 ;
8047 PLINT arg2 ;
8048 PLINT arg3 ;
8049 PLINT arg4 ;
8050
8051 SWIG_check_num_args("plscol0",4,4)
8052 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscol0",1,"PLINT");
8053 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscol0",2,"PLINT");
8054 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscol0",3,"PLINT");
8055 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscol0",4,"PLINT");
8056 arg1 = (PLINT)lua_tonumber(L, 1);
8057 arg2 = (PLINT)lua_tonumber(L, 2);
8058 arg3 = (PLINT)lua_tonumber(L, 3);
8059 arg4 = (PLINT)lua_tonumber(L, 4);
8060 plscol0(arg1,arg2,arg3,arg4);
8061
8062 return SWIG_arg;
8063
8064 if(0) SWIG_fail;
8065
8066 fail:
8067 lua_error(L);
8068 return SWIG_arg;
8069 }
8070
8071
8072 static int _wrap_scol0a(lua_State* L) {
8073 int SWIG_arg = 0;
8074 PLINT arg1 ;
8075 PLINT arg2 ;
8076 PLINT arg3 ;
8077 PLINT arg4 ;
8078 PLFLT arg5 ;
8079
8080 SWIG_check_num_args("plscol0a",5,5)
8081 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscol0a",1,"PLINT");
8082 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscol0a",2,"PLINT");
8083 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscol0a",3,"PLINT");
8084 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscol0a",4,"PLINT");
8085 if(!lua_isnumber(L,5)) SWIG_fail_arg("plscol0a",5,"PLFLT");
8086 arg1 = (PLINT)lua_tonumber(L, 1);
8087 arg2 = (PLINT)lua_tonumber(L, 2);
8088 arg3 = (PLINT)lua_tonumber(L, 3);
8089 arg4 = (PLINT)lua_tonumber(L, 4);
8090 arg5 = (PLFLT)lua_tonumber(L, 5);
8091 plscol0a(arg1,arg2,arg3,arg4,arg5);
8092
8093 return SWIG_arg;
8094
8095 if(0) SWIG_fail;
8096
8097 fail:
8098 lua_error(L);
8099 return SWIG_arg;
8100 }
8101
8102
8103 static int _wrap_scolbg(lua_State* L) {
8104 int SWIG_arg = 0;
8105 PLINT arg1 ;
8106 PLINT arg2 ;
8107 PLINT arg3 ;
8108
8109 SWIG_check_num_args("plscolbg",3,3)
8110 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolbg",1,"PLINT");
8111 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscolbg",2,"PLINT");
8112 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscolbg",3,"PLINT");
8113 arg1 = (PLINT)lua_tonumber(L, 1);
8114 arg2 = (PLINT)lua_tonumber(L, 2);
8115 arg3 = (PLINT)lua_tonumber(L, 3);
8116 plscolbg(arg1,arg2,arg3);
8117
8118 return SWIG_arg;
8119
8120 if(0) SWIG_fail;
8121
8122 fail:
8123 lua_error(L);
8124 return SWIG_arg;
8125 }
8126
8127
8128 static int _wrap_scolbga(lua_State* L) {
8129 int SWIG_arg = 0;
8130 PLINT arg1 ;
8131 PLINT arg2 ;
8132 PLINT arg3 ;
8133 PLFLT arg4 ;
8134
8135 SWIG_check_num_args("plscolbga",4,4)
8136 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolbga",1,"PLINT");
8137 if(!lua_isnumber(L,2)) SWIG_fail_arg("plscolbga",2,"PLINT");
8138 if(!lua_isnumber(L,3)) SWIG_fail_arg("plscolbga",3,"PLINT");
8139 if(!lua_isnumber(L,4)) SWIG_fail_arg("plscolbga",4,"PLFLT");
8140 arg1 = (PLINT)lua_tonumber(L, 1);
8141 arg2 = (PLINT)lua_tonumber(L, 2);
8142 arg3 = (PLINT)lua_tonumber(L, 3);
8143 arg4 = (PLFLT)lua_tonumber(L, 4);
8144 plscolbga(arg1,arg2,arg3,arg4);
8145
8146 return SWIG_arg;
8147
8148 if(0) SWIG_fail;
8149
8150 fail:
8151 lua_error(L);
8152 return SWIG_arg;
8153 }
8154
8155
8156 static int _wrap_scolor(lua_State* L) {
8157 int SWIG_arg = 0;
8158 PLINT arg1 ;
8159
8160 SWIG_check_num_args("plscolor",1,1)
8161 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscolor",1,"PLINT");
8162 arg1 = (PLINT)lua_tonumber(L, 1);
8163 plscolor(arg1);
8164
8165 return SWIG_arg;
8166
8167 if(0) SWIG_fail;
8168
8169 fail:
8170 lua_error(L);
8171 return SWIG_arg;
8172 }
8173
8174
8175 static int _wrap_scompression(lua_State* L) {
8176 int SWIG_arg = 0;
8177 PLINT arg1 ;
8178
8179 SWIG_check_num_args("plscompression",1,1)
8180 if(!lua_isnumber(L,1)) SWIG_fail_arg("plscompression",1,"PLINT");
8181 arg1 = (PLINT)lua_tonumber(L, 1);
8182 plscompression(arg1);
8183
8184 return SWIG_arg;
8185
8186 if(0) SWIG_fail;
8187
8188 fail:
8189 lua_error(L);
8190 return SWIG_arg;
8191 }
8192
8193
8194 static int _wrap_sdev(lua_State* L) {
8195 int SWIG_arg = 0;
8196 char *arg1 = (char *) 0 ;
8197
8198 SWIG_check_num_args("plsdev",1,1)
8199 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsdev",1,"char const *");
8200 arg1 = (char *)lua_tostring(L, 1);
8201 plsdev((char const *)arg1);
8202
8203 return SWIG_arg;
8204
8205 if(0) SWIG_fail;
8206
8207 fail:
8208 lua_error(L);
8209 return SWIG_arg;
8210 }
8211
8212
8213 static int _wrap_sdidev(lua_State* L) {
8214 int SWIG_arg = 0;
8215 PLFLT arg1 ;
8216 PLFLT arg2 ;
8217 PLFLT arg3 ;
8218 PLFLT arg4 ;
8219
8220 SWIG_check_num_args("plsdidev",4,4)
8221 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdidev",1,"PLFLT");
8222 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdidev",2,"PLFLT");
8223 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdidev",3,"PLFLT");
8224 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdidev",4,"PLFLT");
8225 arg1 = (PLFLT)lua_tonumber(L, 1);
8226 arg2 = (PLFLT)lua_tonumber(L, 2);
8227 arg3 = (PLFLT)lua_tonumber(L, 3);
8228 arg4 = (PLFLT)lua_tonumber(L, 4);
8229 plsdidev(arg1,arg2,arg3,arg4);
8230
8231 return SWIG_arg;
8232
8233 if(0) SWIG_fail;
8234
8235 fail:
8236 lua_error(L);
8237 return SWIG_arg;
8238 }
8239
8240
8241 static int _wrap_sdimap(lua_State* L) {
8242 int SWIG_arg = 0;
8243 PLINT arg1 ;
8244 PLINT arg2 ;
8245 PLINT arg3 ;
8246 PLINT arg4 ;
8247 PLFLT arg5 ;
8248 PLFLT arg6 ;
8249
8250 SWIG_check_num_args("plsdimap",6,6)
8251 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdimap",1,"PLINT");
8252 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdimap",2,"PLINT");
8253 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdimap",3,"PLINT");
8254 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdimap",4,"PLINT");
8255 if(!lua_isnumber(L,5)) SWIG_fail_arg("plsdimap",5,"PLFLT");
8256 if(!lua_isnumber(L,6)) SWIG_fail_arg("plsdimap",6,"PLFLT");
8257 arg1 = (PLINT)lua_tonumber(L, 1);
8258 arg2 = (PLINT)lua_tonumber(L, 2);
8259 arg3 = (PLINT)lua_tonumber(L, 3);
8260 arg4 = (PLINT)lua_tonumber(L, 4);
8261 arg5 = (PLFLT)lua_tonumber(L, 5);
8262 arg6 = (PLFLT)lua_tonumber(L, 6);
8263 plsdimap(arg1,arg2,arg3,arg4,arg5,arg6);
8264
8265 return SWIG_arg;
8266
8267 if(0) SWIG_fail;
8268
8269 fail:
8270 lua_error(L);
8271 return SWIG_arg;
8272 }
8273
8274
8275 static int _wrap_sdiori(lua_State* L) {
8276 int SWIG_arg = 0;
8277 PLFLT arg1 ;
8278
8279 SWIG_check_num_args("plsdiori",1,1)
8280 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiori",1,"PLFLT");
8281 arg1 = (PLFLT)lua_tonumber(L, 1);
8282 plsdiori(arg1);
8283
8284 return SWIG_arg;
8285
8286 if(0) SWIG_fail;
8287
8288 fail:
8289 lua_error(L);
8290 return SWIG_arg;
8291 }
8292
8293
8294 static int _wrap_sdiplt(lua_State* L) {
8295 int SWIG_arg = 0;
8296 PLFLT arg1 ;
8297 PLFLT arg2 ;
8298 PLFLT arg3 ;
8299 PLFLT arg4 ;
8300
8301 SWIG_check_num_args("plsdiplt",4,4)
8302 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiplt",1,"PLFLT");
8303 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdiplt",2,"PLFLT");
8304 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdiplt",3,"PLFLT");
8305 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdiplt",4,"PLFLT");
8306 arg1 = (PLFLT)lua_tonumber(L, 1);
8307 arg2 = (PLFLT)lua_tonumber(L, 2);
8308 arg3 = (PLFLT)lua_tonumber(L, 3);
8309 arg4 = (PLFLT)lua_tonumber(L, 4);
8310 plsdiplt(arg1,arg2,arg3,arg4);
8311
8312 return SWIG_arg;
8313
8314 if(0) SWIG_fail;
8315
8316 fail:
8317 lua_error(L);
8318 return SWIG_arg;
8319 }
8320
8321
8322 static int _wrap_sdiplz(lua_State* L) {
8323 int SWIG_arg = 0;
8324 PLFLT arg1 ;
8325 PLFLT arg2 ;
8326 PLFLT arg3 ;
8327 PLFLT arg4 ;
8328
8329 SWIG_check_num_args("plsdiplz",4,4)
8330 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsdiplz",1,"PLFLT");
8331 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsdiplz",2,"PLFLT");
8332 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsdiplz",3,"PLFLT");
8333 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsdiplz",4,"PLFLT");
8334 arg1 = (PLFLT)lua_tonumber(L, 1);
8335 arg2 = (PLFLT)lua_tonumber(L, 2);
8336 arg3 = (PLFLT)lua_tonumber(L, 3);
8337 arg4 = (PLFLT)lua_tonumber(L, 4);
8338 plsdiplz(arg1,arg2,arg3,arg4);
8339
8340 return SWIG_arg;
8341
8342 if(0) SWIG_fail;
8343
8344 fail:
8345 lua_error(L);
8346 return SWIG_arg;
8347 }
8348
8349
8350 static int _wrap_seed(lua_State* L) {
8351 int SWIG_arg = 0;
8352 unsigned int arg1 ;
8353
8354 SWIG_check_num_args("plseed",1,1)
8355 if(!lua_isnumber(L,1)) SWIG_fail_arg("plseed",1,"unsigned int");
8356 SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
8357 arg1 = (unsigned int)lua_tonumber(L, 1);
8358 plseed(arg1);
8359
8360 return SWIG_arg;
8361
8362 if(0) SWIG_fail;
8363
8364 fail:
8365 lua_error(L);
8366 return SWIG_arg;
8367 }
8368
8369
8370 static int _wrap_sesc(lua_State* L) {
8371 int SWIG_arg = 0;
8372 char arg1 ;
8373
8374 SWIG_check_num_args("plsesc",1,1)
8375 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsesc",1,"char");
8376 arg1 = (lua_tostring(L, 1))[0];
8377 plsesc(arg1);
8378
8379 return SWIG_arg;
8380
8381 if(0) SWIG_fail;
8382
8383 fail:
8384 lua_error(L);
8385 return SWIG_arg;
8386 }
8387
8388
8389 static int _wrap_setopt(lua_State* L) {
8390 int SWIG_arg = 0;
8391 char *arg1 = (char *) 0 ;
8392 char *arg2 = (char *) 0 ;
8393 PLINT result;
8394
8395 SWIG_check_num_args("plsetopt",2,2)
8396 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsetopt",1,"char const *");
8397 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plsetopt",2,"char const *");
8398 arg1 = (char *)lua_tostring(L, 1);
8399 arg2 = (char *)lua_tostring(L, 2);
8400 result = (PLINT)plsetopt((char const *)arg1,(char const *)arg2);
8401 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
8402 return SWIG_arg;
8403
8404 if(0) SWIG_fail;
8405
8406 fail:
8407 lua_error(L);
8408 return SWIG_arg;
8409 }
8410
8411
8412 static int _wrap_sfam(lua_State* L) {
8413 int SWIG_arg = 0;
8414 PLINT arg1 ;
8415 PLINT arg2 ;
8416 PLINT arg3 ;
8417
8418 SWIG_check_num_args("plsfam",3,3)
8419 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfam",1,"PLINT");
8420 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsfam",2,"PLINT");
8421 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsfam",3,"PLINT");
8422 arg1 = (PLINT)lua_tonumber(L, 1);
8423 arg2 = (PLINT)lua_tonumber(L, 2);
8424 arg3 = (PLINT)lua_tonumber(L, 3);
8425 plsfam(arg1,arg2,arg3);
8426
8427 return SWIG_arg;
8428
8429 if(0) SWIG_fail;
8430
8431 fail:
8432 lua_error(L);
8433 return SWIG_arg;
8434 }
8435
8436
8437 static int _wrap_sfci(lua_State* L) {
8438 int SWIG_arg = 0;
8439 PLUNICODE arg1 ;
8440
8441 SWIG_check_num_args("plsfci",1,1)
8442 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfci",1,"PLUNICODE");
8443 SWIG_contract_assert((lua_tonumber(L,1)>=0),"number must not be negative")
8444 arg1 = (PLUNICODE)lua_tonumber(L, 1);
8445 plsfci(arg1);
8446
8447 return SWIG_arg;
8448
8449 if(0) SWIG_fail;
8450
8451 fail:
8452 lua_error(L);
8453 return SWIG_arg;
8454 }
8455
8456
8457 static int _wrap_sfnam(lua_State* L) {
8458 int SWIG_arg = 0;
8459 char *arg1 = (char *) 0 ;
8460
8461 SWIG_check_num_args("plsfnam",1,1)
8462 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plsfnam",1,"char const *");
8463 arg1 = (char *)lua_tostring(L, 1);
8464 plsfnam((char const *)arg1);
8465
8466 return SWIG_arg;
8467
8468 if(0) SWIG_fail;
8469
8470 fail:
8471 lua_error(L);
8472 return SWIG_arg;
8473 }
8474
8475
8476 static int _wrap_sfont(lua_State* L) {
8477 int SWIG_arg = 0;
8478 PLINT arg1 ;
8479 PLINT arg2 ;
8480 PLINT arg3 ;
8481
8482 SWIG_check_num_args("plsfont",3,3)
8483 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsfont",1,"PLINT");
8484 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsfont",2,"PLINT");
8485 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsfont",3,"PLINT");
8486 arg1 = (PLINT)lua_tonumber(L, 1);
8487 arg2 = (PLINT)lua_tonumber(L, 2);
8488 arg3 = (PLINT)lua_tonumber(L, 3);
8489 plsfont(arg1,arg2,arg3);
8490
8491 return SWIG_arg;
8492
8493 if(0) SWIG_fail;
8494
8495 fail:
8496 lua_error(L);
8497 return SWIG_arg;
8498 }
8499
8500
8501 static int _wrap_shades(lua_State* L) {
8502 int SWIG_arg = 0;
8503 PLFLT **arg1 = (PLFLT **) 0 ;
8504 PLINT arg2 ;
8505 PLINT arg3 ;
8506 defined_func arg4 = (defined_func) 0 ;
8507 PLFLT arg5 ;
8508 PLFLT arg6 ;
8509 PLFLT arg7 ;
8510 PLFLT arg8 ;
8511 PLFLT *arg9 = (PLFLT *) 0 ;
8512 PLINT arg10 ;
8513 PLFLT arg11 ;
8514 PLINT arg12 ;
8515 PLFLT arg13 ;
8516 fill_func arg14 = (fill_func) 0 ;
8517 PLBOOL arg15 ;
8518 pltr_func arg16 = (pltr_func) 0 ;
8519 PLPointer arg17 = (PLPointer) 0 ;
8520 int ii1 ;
8521 PLcGrid cgrid117 ;
8522 PLcGrid2 cgrid217 ;
8523
8524 {
8525 cgrid117.xg = cgrid117.yg = cgrid117.zg = NULL;
8526 cgrid117.nx = cgrid117.ny = cgrid117.nz = 0;
8527 cgrid217.xg = cgrid217.yg = cgrid217.zg = NULL;
8528 cgrid217.nx = cgrid217.ny = 0;
8529 }
8530 {
8531 arg16 = NULL;
8532 }
8533 {
8534 arg17 = NULL;
8535 }
8536 {
8537 arg4 = NULL;
8538 }
8539 {
8540 arg14 = plfill;
8541 }
8542 SWIG_check_num_args("plshades",10,12)
8543 if(!lua_isnumber(L,2)) SWIG_fail_arg("plshades",2,"PLFLT");
8544 if(!lua_isnumber(L,3)) SWIG_fail_arg("plshades",3,"PLFLT");
8545 if(!lua_isnumber(L,4)) SWIG_fail_arg("plshades",4,"PLFLT");
8546 if(!lua_isnumber(L,5)) SWIG_fail_arg("plshades",5,"PLFLT");
8547 if(!lua_isnumber(L,7)) SWIG_fail_arg("plshades",7,"PLFLT");
8548 if(!lua_isnumber(L,8)) SWIG_fail_arg("plshades",8,"PLINT");
8549 if(!lua_isnumber(L,9)) SWIG_fail_arg("plshades",9,"PLFLT");
8550 if(!lua_isnumber(L,10)) SWIG_fail_arg("plshades",10,"PLBOOL");
8551 {
8552 int jj;
8553
8554 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
8555 if ( !arg1 )
8556 SWIG_fail;
8557 Xlen = arg2 = ii1;
8558 Ylen = arg3 = jj;
8559 }
8560 arg5 = (PLFLT)lua_tonumber(L, 2);
8561 arg6 = (PLFLT)lua_tonumber(L, 3);
8562 arg7 = (PLFLT)lua_tonumber(L, 4);
8563 arg8 = (PLFLT)lua_tonumber(L, 5);
8564 {
8565 int temp;
8566 arg9 = (PLFLT *) LUA_get_double_num_array_var( L, 6, &temp );
8567 if ( !arg9 )
8568 SWIG_fail;
8569 arg10 = Alen = temp;
8570 }
8571 arg11 = (PLFLT)lua_tonumber(L, 7);
8572 arg12 = (PLINT)lua_tonumber(L, 8);
8573 arg13 = (PLFLT)lua_tonumber(L, 9);
8574 arg15 = (PLBOOL)lua_tonumber(L, 10);
8575 if(lua_gettop(L)>=11){
8576 {
8577 arg16 = NULL;
8578 mypltr_funcstr[0] = '\0';
8579
8580 if ( lua_isstring( L, 11 ) )
8581 {
8582 const char* funcstr = lua_tostring( L, 11 );
8583 if ( strcmp( "pltr0", funcstr ) == 0 )
8584 {
8585 arg16 = pltr0;
8586 }
8587 else if ( strcmp( "pltr1", funcstr ) == 0 )
8588 {
8589 arg16 = pltr1;
8590 }
8591 else if ( strcmp( "pltr2", funcstr ) == 0 )
8592 {
8593 arg16 = pltr2;
8594 }
8595 else
8596 {
8597 arg16 = mypltr;
8598 strncpy( mypltr_funcstr, funcstr, 255 );
8599 myL = L;
8600 }
8601 }
8602 else
8603 SWIG_fail_arg( "shades", 16, "pltr_func" );
8604 }
8605 }
8606 if(lua_gettop(L)>=12){
8607 {
8608 int nx, ny;
8609 int gridmode = 0;
8610
8611 lua_pushstring( L, "xg" );
8612 lua_gettable( L, 12 );
8613 if ( !lua_istable( L, -1 ) )
8614 {
8615 lua_pop( L, 1 ); // pop "xg"
8616 lua_pushstring( L, "expected a table xg" );
8617 SWIG_fail;
8618 }
8619 lua_rawgeti( L, -1, 1 );
8620 if ( lua_istable( L, -1 ) )
8621 gridmode = 2; // two dimensional array
8622 else if ( lua_isnumber( L, -1 ) )
8623 gridmode = 1; // one dimensional array
8624 else
8625 {
8626 lua_pop( L, 1 ); // pop "1"
8627 lua_pop( L, 1 ); // pop "xg"
8628 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
8629 SWIG_fail;
8630 }
8631 lua_pop( L, 1 ); // pop test element
8632 if ( gridmode == 1 )
8633 {
8634 cgrid117.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
8635 if ( !cgrid117.xg )
8636 {
8637 lua_pop( L, 1 ); // pop "xg"
8638 SWIG_fail;
8639 }
8640 if ( nx != Xlen )
8641 {
8642 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
8643 SWIG_fail;
8644 }
8645 cgrid117.nx = nx;
8646 }
8647 else
8648 {
8649 cgrid217.xg = read_double_Matrix( L, -1, &nx, &ny );
8650 if ( !cgrid217.xg )
8651 {
8652 lua_pop( L, 1 ); // pop "xg"
8653 SWIG_fail;
8654 }
8655 if ( ( nx != Xlen ) || ( ny != Ylen ) )
8656 {
8657 lua_pop( L, 1 ); // pop "xg"
8658 lua_pushfstring( L, "Vectors must match matrix." );
8659 SWIG_fail;
8660 }
8661 cgrid217.nx = nx;
8662 cgrid217.ny = ny;
8663 }
8664 lua_pop( L, 1 ); // pop "xg"
8665
8666 lua_pushstring( L, "yg" );
8667 lua_gettable( L, 12 );
8668 if ( !lua_istable( L, -1 ) )
8669 {
8670 lua_pop( L, 1 );
8671 lua_pushstring( L, "expected a table yg" );
8672 SWIG_fail;
8673 }
8674 lua_rawgeti( L, -1, 1 );
8675 if ( gridmode == 2 )
8676 {
8677 if ( !lua_istable( L, -1 ) )
8678 {
8679 lua_pop( L, 1 ); // pop "1"
8680 lua_pop( L, 1 ); // pop "yg"
8681 lua_pushstring( L, "expected a two dimensional array/table in yg" );
8682 SWIG_fail;
8683 }
8684 }
8685 else
8686 {
8687 if ( !lua_isnumber( L, -1 ) )
8688 {
8689 lua_pop( L, 1 ); // pop "1"
8690 lua_pop( L, 1 ); // pop "yg"
8691 lua_pushstring( L, "expected a one dimensional array/table in yg" );
8692 SWIG_fail;
8693 }
8694 }
8695 lua_pop( L, 1 ); // pop "1"
8696 if ( gridmode == 1 )
8697 {
8698 cgrid117.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
8699 if ( !cgrid117.yg )
8700 {
8701 lua_pop( L, 1 ); // pop "yg"
8702 SWIG_fail;
8703 }
8704 if ( ny != Ylen )
8705 {
8706 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
8707 SWIG_fail;
8708 }
8709 cgrid117.ny = ny;
8710 }
8711 else
8712 {
8713 cgrid217.yg = read_double_Matrix( L, -1, &nx, &ny );
8714 if ( !cgrid217.yg )
8715 {
8716 lua_pop( L, 1 ); // pop "xg"
8717 SWIG_fail;
8718 }
8719 if ( ( nx != Xlen ) || ( ny != Ylen ) )
8720 {
8721 lua_pop( L, 1 ); // pop "xg"
8722 lua_pushfstring( L, "Vectors must match matrix." );
8723 SWIG_fail;
8724 }
8725 // cgrid217.nx/ny already set
8726 }
8727 lua_pop( L, 1 ); // pop "yg"
8728
8729 if ( gridmode == 1 )
8730 arg17 = &cgrid117;
8731 else if ( gridmode == 2 )
8732 arg17 = &cgrid217;
8733 }
8734 }
8735 plshades((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,(double const *)arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17);
8736
8737 {
8738 int i;
8739
8740 if ( arg1 )
8741 {
8742 for ( i = 0; i < ii1; i++ )
8743 LUA_FREE_ARRAY( arg1[i] );
8744 LUA_FREE_ARRAY( arg1 );
8745 }
8746 }
8747 {
8748 LUA_FREE_ARRAY( arg9 );
8749 }
8750 {
8751 mypltr_funcstr[0] = '\0';
8752 }
8753 {
8754 int i;
8755
8756 LUA_FREE_ARRAY( cgrid117.xg );
8757 LUA_FREE_ARRAY( cgrid117.yg );
8758
8759 if ( cgrid217.xg )
8760 {
8761 for ( i = 0; i < Xlen; i++ )
8762 LUA_FREE_ARRAY( cgrid217.xg[i] );
8763 LUA_FREE_ARRAY( cgrid217.xg );
8764 }
8765 if ( cgrid217.yg )
8766 {
8767 for ( i = 0; i < Xlen; i++ )
8768 LUA_FREE_ARRAY( cgrid217.yg[i] );
8769 LUA_FREE_ARRAY( cgrid217.yg );
8770 }
8771 }
8772 return SWIG_arg;
8773
8774 if(0) SWIG_fail;
8775
8776 fail:
8777 {
8778 int i;
8779
8780 if ( arg1 )
8781 {
8782 for ( i = 0; i < ii1; i++ )
8783 LUA_FREE_ARRAY( arg1[i] );
8784 LUA_FREE_ARRAY( arg1 );
8785 }
8786 }
8787 {
8788 LUA_FREE_ARRAY( arg9 );
8789 }
8790 {
8791 mypltr_funcstr[0] = '\0';
8792 }
8793 {
8794 int i;
8795
8796 LUA_FREE_ARRAY( cgrid117.xg );
8797 LUA_FREE_ARRAY( cgrid117.yg );
8798
8799 if ( cgrid217.xg )
8800 {
8801 for ( i = 0; i < Xlen; i++ )
8802 LUA_FREE_ARRAY( cgrid217.xg[i] );
8803 LUA_FREE_ARRAY( cgrid217.xg );
8804 }
8805 if ( cgrid217.yg )
8806 {
8807 for ( i = 0; i < Xlen; i++ )
8808 LUA_FREE_ARRAY( cgrid217.yg[i] );
8809 LUA_FREE_ARRAY( cgrid217.yg );
8810 }
8811 }
8812 lua_error(L);
8813 return SWIG_arg;
8814 }
8815
8816
8817 static int _wrap_shade(lua_State* L) {
8818 int SWIG_arg = 0;
8819 PLFLT **arg1 = (PLFLT **) 0 ;
8820 PLINT arg2 ;
8821 PLINT arg3 ;
8822 defined_func arg4 = (defined_func) 0 ;
8823 PLFLT arg5 ;
8824 PLFLT arg6 ;
8825 PLFLT arg7 ;
8826 PLFLT arg8 ;
8827 PLFLT arg9 ;
8828 PLFLT arg10 ;
8829 PLINT arg11 ;
8830 PLFLT arg12 ;
8831 PLFLT arg13 ;
8832 PLINT arg14 ;
8833 PLFLT arg15 ;
8834 PLINT arg16 ;
8835 PLFLT arg17 ;
8836 fill_func arg18 = (fill_func) 0 ;
8837 PLBOOL arg19 ;
8838 pltr_func arg20 = (pltr_func) 0 ;
8839 PLPointer arg21 = (PLPointer) 0 ;
8840 int ii1 ;
8841 PLcGrid cgrid121 ;
8842 PLcGrid2 cgrid221 ;
8843
8844 {
8845 cgrid121.xg = cgrid121.yg = cgrid121.zg = NULL;
8846 cgrid121.nx = cgrid121.ny = cgrid121.nz = 0;
8847 cgrid221.xg = cgrid221.yg = cgrid221.zg = NULL;
8848 cgrid221.nx = cgrid221.ny = 0;
8849 }
8850 {
8851 arg20 = NULL;
8852 }
8853 {
8854 arg21 = NULL;
8855 }
8856 {
8857 arg4 = NULL;
8858 }
8859 {
8860 arg18 = plfill;
8861 }
8862 SWIG_check_num_args("plshade",15,17)
8863 if(!lua_isnumber(L,2)) SWIG_fail_arg("plshade",2,"PLFLT");
8864 if(!lua_isnumber(L,3)) SWIG_fail_arg("plshade",3,"PLFLT");
8865 if(!lua_isnumber(L,4)) SWIG_fail_arg("plshade",4,"PLFLT");
8866 if(!lua_isnumber(L,5)) SWIG_fail_arg("plshade",5,"PLFLT");
8867 if(!lua_isnumber(L,6)) SWIG_fail_arg("plshade",6,"PLFLT");
8868 if(!lua_isnumber(L,7)) SWIG_fail_arg("plshade",7,"PLFLT");
8869 if(!lua_isnumber(L,8)) SWIG_fail_arg("plshade",8,"PLINT");
8870 if(!lua_isnumber(L,9)) SWIG_fail_arg("plshade",9,"PLFLT");
8871 if(!lua_isnumber(L,10)) SWIG_fail_arg("plshade",10,"PLFLT");
8872 if(!lua_isnumber(L,11)) SWIG_fail_arg("plshade",11,"PLINT");
8873 if(!lua_isnumber(L,12)) SWIG_fail_arg("plshade",12,"PLFLT");
8874 if(!lua_isnumber(L,13)) SWIG_fail_arg("plshade",13,"PLINT");
8875 if(!lua_isnumber(L,14)) SWIG_fail_arg("plshade",14,"PLFLT");
8876 if(!lua_isnumber(L,15)) SWIG_fail_arg("plshade",15,"PLBOOL");
8877 {
8878 int jj;
8879
8880 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
8881 if ( !arg1 )
8882 SWIG_fail;
8883 Xlen = arg2 = ii1;
8884 Ylen = arg3 = jj;
8885 }
8886 arg5 = (PLFLT)lua_tonumber(L, 2);
8887 arg6 = (PLFLT)lua_tonumber(L, 3);
8888 arg7 = (PLFLT)lua_tonumber(L, 4);
8889 arg8 = (PLFLT)lua_tonumber(L, 5);
8890 arg9 = (PLFLT)lua_tonumber(L, 6);
8891 arg10 = (PLFLT)lua_tonumber(L, 7);
8892 arg11 = (PLINT)lua_tonumber(L, 8);
8893 arg12 = (PLFLT)lua_tonumber(L, 9);
8894 arg13 = (PLFLT)lua_tonumber(L, 10);
8895 arg14 = (PLINT)lua_tonumber(L, 11);
8896 arg15 = (PLFLT)lua_tonumber(L, 12);
8897 arg16 = (PLINT)lua_tonumber(L, 13);
8898 arg17 = (PLFLT)lua_tonumber(L, 14);
8899 arg19 = (PLBOOL)lua_tonumber(L, 15);
8900 if(lua_gettop(L)>=16){
8901 {
8902 arg20 = NULL;
8903 mypltr_funcstr[0] = '\0';
8904
8905 if ( lua_isstring( L, 16 ) )
8906 {
8907 const char* funcstr = lua_tostring( L, 16 );
8908 if ( strcmp( "pltr0", funcstr ) == 0 )
8909 {
8910 arg20 = pltr0;
8911 }
8912 else if ( strcmp( "pltr1", funcstr ) == 0 )
8913 {
8914 arg20 = pltr1;
8915 }
8916 else if ( strcmp( "pltr2", funcstr ) == 0 )
8917 {
8918 arg20 = pltr2;
8919 }
8920 else
8921 {
8922 arg20 = mypltr;
8923 strncpy( mypltr_funcstr, funcstr, 255 );
8924 myL = L;
8925 }
8926 }
8927 else
8928 SWIG_fail_arg( "shade", 20, "pltr_func" );
8929 }
8930 }
8931 if(lua_gettop(L)>=17){
8932 {
8933 int nx, ny;
8934 int gridmode = 0;
8935
8936 lua_pushstring( L, "xg" );
8937 lua_gettable( L, 17 );
8938 if ( !lua_istable( L, -1 ) )
8939 {
8940 lua_pop( L, 1 ); // pop "xg"
8941 lua_pushstring( L, "expected a table xg" );
8942 SWIG_fail;
8943 }
8944 lua_rawgeti( L, -1, 1 );
8945 if ( lua_istable( L, -1 ) )
8946 gridmode = 2; // two dimensional array
8947 else if ( lua_isnumber( L, -1 ) )
8948 gridmode = 1; // one dimensional array
8949 else
8950 {
8951 lua_pop( L, 1 ); // pop "1"
8952 lua_pop( L, 1 ); // pop "xg"
8953 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
8954 SWIG_fail;
8955 }
8956 lua_pop( L, 1 ); // pop test element
8957 if ( gridmode == 1 )
8958 {
8959 cgrid121.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
8960 if ( !cgrid121.xg )
8961 {
8962 lua_pop( L, 1 ); // pop "xg"
8963 SWIG_fail;
8964 }
8965 if ( nx != Xlen )
8966 {
8967 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
8968 SWIG_fail;
8969 }
8970 cgrid121.nx = nx;
8971 }
8972 else
8973 {
8974 cgrid221.xg = read_double_Matrix( L, -1, &nx, &ny );
8975 if ( !cgrid221.xg )
8976 {
8977 lua_pop( L, 1 ); // pop "xg"
8978 SWIG_fail;
8979 }
8980 if ( ( nx != Xlen ) || ( ny != Ylen ) )
8981 {
8982 lua_pop( L, 1 ); // pop "xg"
8983 lua_pushfstring( L, "Vectors must match matrix." );
8984 SWIG_fail;
8985 }
8986 cgrid221.nx = nx;
8987 cgrid221.ny = ny;
8988 }
8989 lua_pop( L, 1 ); // pop "xg"
8990
8991 lua_pushstring( L, "yg" );
8992 lua_gettable( L, 17 );
8993 if ( !lua_istable( L, -1 ) )
8994 {
8995 lua_pop( L, 1 );
8996 lua_pushstring( L, "expected a table yg" );
8997 SWIG_fail;
8998 }
8999 lua_rawgeti( L, -1, 1 );
9000 if ( gridmode == 2 )
9001 {
9002 if ( !lua_istable( L, -1 ) )
9003 {
9004 lua_pop( L, 1 ); // pop "1"
9005 lua_pop( L, 1 ); // pop "yg"
9006 lua_pushstring( L, "expected a two dimensional array/table in yg" );
9007 SWIG_fail;
9008 }
9009 }
9010 else
9011 {
9012 if ( !lua_isnumber( L, -1 ) )
9013 {
9014 lua_pop( L, 1 ); // pop "1"
9015 lua_pop( L, 1 ); // pop "yg"
9016 lua_pushstring( L, "expected a one dimensional array/table in yg" );
9017 SWIG_fail;
9018 }
9019 }
9020 lua_pop( L, 1 ); // pop "1"
9021 if ( gridmode == 1 )
9022 {
9023 cgrid121.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
9024 if ( !cgrid121.yg )
9025 {
9026 lua_pop( L, 1 ); // pop "yg"
9027 SWIG_fail;
9028 }
9029 if ( ny != Ylen )
9030 {
9031 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
9032 SWIG_fail;
9033 }
9034 cgrid121.ny = ny;
9035 }
9036 else
9037 {
9038 cgrid221.yg = read_double_Matrix( L, -1, &nx, &ny );
9039 if ( !cgrid221.yg )
9040 {
9041 lua_pop( L, 1 ); // pop "xg"
9042 SWIG_fail;
9043 }
9044 if ( ( nx != Xlen ) || ( ny != Ylen ) )
9045 {
9046 lua_pop( L, 1 ); // pop "xg"
9047 lua_pushfstring( L, "Vectors must match matrix." );
9048 SWIG_fail;
9049 }
9050 // cgrid221.nx/ny already set
9051 }
9052 lua_pop( L, 1 ); // pop "yg"
9053
9054 if ( gridmode == 1 )
9055 arg21 = &cgrid121;
9056 else if ( gridmode == 2 )
9057 arg21 = &cgrid221;
9058 }
9059 }
9060 plshade((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21);
9061
9062 {
9063 int i;
9064
9065 if ( arg1 )
9066 {
9067 for ( i = 0; i < ii1; i++ )
9068 LUA_FREE_ARRAY( arg1[i] );
9069 LUA_FREE_ARRAY( arg1 );
9070 }
9071 }
9072 {
9073 mypltr_funcstr[0] = '\0';
9074 }
9075 {
9076 int i;
9077
9078 LUA_FREE_ARRAY( cgrid121.xg );
9079 LUA_FREE_ARRAY( cgrid121.yg );
9080
9081 if ( cgrid221.xg )
9082 {
9083 for ( i = 0; i < Xlen; i++ )
9084 LUA_FREE_ARRAY( cgrid221.xg[i] );
9085 LUA_FREE_ARRAY( cgrid221.xg );
9086 }
9087 if ( cgrid221.yg )
9088 {
9089 for ( i = 0; i < Xlen; i++ )
9090 LUA_FREE_ARRAY( cgrid221.yg[i] );
9091 LUA_FREE_ARRAY( cgrid221.yg );
9092 }
9093 }
9094 return SWIG_arg;
9095
9096 if(0) SWIG_fail;
9097
9098 fail:
9099 {
9100 int i;
9101
9102 if ( arg1 )
9103 {
9104 for ( i = 0; i < ii1; i++ )
9105 LUA_FREE_ARRAY( arg1[i] );
9106 LUA_FREE_ARRAY( arg1 );
9107 }
9108 }
9109 {
9110 mypltr_funcstr[0] = '\0';
9111 }
9112 {
9113 int i;
9114
9115 LUA_FREE_ARRAY( cgrid121.xg );
9116 LUA_FREE_ARRAY( cgrid121.yg );
9117
9118 if ( cgrid221.xg )
9119 {
9120 for ( i = 0; i < Xlen; i++ )
9121 LUA_FREE_ARRAY( cgrid221.xg[i] );
9122 LUA_FREE_ARRAY( cgrid221.xg );
9123 }
9124 if ( cgrid221.yg )
9125 {
9126 for ( i = 0; i < Xlen; i++ )
9127 LUA_FREE_ARRAY( cgrid221.yg[i] );
9128 LUA_FREE_ARRAY( cgrid221.yg );
9129 }
9130 }
9131 lua_error(L);
9132 return SWIG_arg;
9133 }
9134
9135
9136 static int _wrap_slabelfunc(lua_State* L) {
9137 int SWIG_arg = 0;
9138 label_func arg1 = (label_func) 0 ;
9139 PLPointer arg2 = (PLPointer) 0 ;
9140
9141 {
9142 arg2 = NULL;
9143 }
9144 SWIG_check_num_args("plslabelfunc",1,1)
9145 {
9146 arg1 = NULL;
9147 mylabel_funcstr[0] = '\0';
9148
9149 if ( lua_isnil( L, 1 ) )
9150 {
9151 arg1 = NULL;
9152 }
9153 else if ( lua_isstring( L, 1 ) )
9154 {
9155 arg1 = mylabel;
9156 strncpy( mylabel_funcstr, lua_tostring( L, 1 ), 255 );
9157 myL = L;
9158 }
9159 else
9160 SWIG_fail_arg( "slabelfunc", 1, "label_func" );
9161 }
9162 plslabelfunc(arg1,arg2);
9163
9164 {
9165
9166 }
9167 return SWIG_arg;
9168
9169 if(0) SWIG_fail;
9170
9171 fail:
9172 {
9173
9174 }
9175 lua_error(L);
9176 return SWIG_arg;
9177 }
9178
9179
9180 static int _wrap_smaj(lua_State* L) {
9181 int SWIG_arg = 0;
9182 PLFLT arg1 ;
9183 PLFLT arg2 ;
9184
9185 SWIG_check_num_args("plsmaj",2,2)
9186 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsmaj",1,"PLFLT");
9187 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsmaj",2,"PLFLT");
9188 arg1 = (PLFLT)lua_tonumber(L, 1);
9189 arg2 = (PLFLT)lua_tonumber(L, 2);
9190 plsmaj(arg1,arg2);
9191
9192 return SWIG_arg;
9193
9194 if(0) SWIG_fail;
9195
9196 fail:
9197 lua_error(L);
9198 return SWIG_arg;
9199 }
9200
9201
9202 static int _wrap_smin(lua_State* L) {
9203 int SWIG_arg = 0;
9204 PLFLT arg1 ;
9205 PLFLT arg2 ;
9206
9207 SWIG_check_num_args("plsmin",2,2)
9208 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsmin",1,"PLFLT");
9209 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsmin",2,"PLFLT");
9210 arg1 = (PLFLT)lua_tonumber(L, 1);
9211 arg2 = (PLFLT)lua_tonumber(L, 2);
9212 plsmin(arg1,arg2);
9213
9214 return SWIG_arg;
9215
9216 if(0) SWIG_fail;
9217
9218 fail:
9219 lua_error(L);
9220 return SWIG_arg;
9221 }
9222
9223
9224 static int _wrap_sori(lua_State* L) {
9225 int SWIG_arg = 0;
9226 PLINT arg1 ;
9227
9228 SWIG_check_num_args("plsori",1,1)
9229 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsori",1,"PLINT");
9230 arg1 = (PLINT)lua_tonumber(L, 1);
9231 plsori(arg1);
9232
9233 return SWIG_arg;
9234
9235 if(0) SWIG_fail;
9236
9237 fail:
9238 lua_error(L);
9239 return SWIG_arg;
9240 }
9241
9242
9243 static int _wrap_spage(lua_State* L) {
9244 int SWIG_arg = 0;
9245 PLFLT arg1 ;
9246 PLFLT arg2 ;
9247 PLINT arg3 ;
9248 PLINT arg4 ;
9249 PLINT arg5 ;
9250 PLINT arg6 ;
9251
9252 SWIG_check_num_args("plspage",6,6)
9253 if(!lua_isnumber(L,1)) SWIG_fail_arg("plspage",1,"PLFLT");
9254 if(!lua_isnumber(L,2)) SWIG_fail_arg("plspage",2,"PLFLT");
9255 if(!lua_isnumber(L,3)) SWIG_fail_arg("plspage",3,"PLINT");
9256 if(!lua_isnumber(L,4)) SWIG_fail_arg("plspage",4,"PLINT");
9257 if(!lua_isnumber(L,5)) SWIG_fail_arg("plspage",5,"PLINT");
9258 if(!lua_isnumber(L,6)) SWIG_fail_arg("plspage",6,"PLINT");
9259 arg1 = (PLFLT)lua_tonumber(L, 1);
9260 arg2 = (PLFLT)lua_tonumber(L, 2);
9261 arg3 = (PLINT)lua_tonumber(L, 3);
9262 arg4 = (PLINT)lua_tonumber(L, 4);
9263 arg5 = (PLINT)lua_tonumber(L, 5);
9264 arg6 = (PLINT)lua_tonumber(L, 6);
9265 plspage(arg1,arg2,arg3,arg4,arg5,arg6);
9266
9267 return SWIG_arg;
9268
9269 if(0) SWIG_fail;
9270
9271 fail:
9272 lua_error(L);
9273 return SWIG_arg;
9274 }
9275
9276
9277 static int _wrap_spal0(lua_State* L) {
9278 int SWIG_arg = 0;
9279 char *arg1 = (char *) 0 ;
9280
9281 SWIG_check_num_args("plspal0",1,1)
9282 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plspal0",1,"char const *");
9283 arg1 = (char *)lua_tostring(L, 1);
9284 plspal0((char const *)arg1);
9285
9286 return SWIG_arg;
9287
9288 if(0) SWIG_fail;
9289
9290 fail:
9291 lua_error(L);
9292 return SWIG_arg;
9293 }
9294
9295
9296 static int _wrap_spal1(lua_State* L) {
9297 int SWIG_arg = 0;
9298 char *arg1 = (char *) 0 ;
9299 PLBOOL arg2 ;
9300
9301 SWIG_check_num_args("plspal1",2,2)
9302 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plspal1",1,"char const *");
9303 if(!lua_isnumber(L,2)) SWIG_fail_arg("plspal1",2,"PLBOOL");
9304 arg1 = (char *)lua_tostring(L, 1);
9305 arg2 = (PLBOOL)lua_tonumber(L, 2);
9306 plspal1((char const *)arg1,arg2);
9307
9308 return SWIG_arg;
9309
9310 if(0) SWIG_fail;
9311
9312 fail:
9313 lua_error(L);
9314 return SWIG_arg;
9315 }
9316
9317
9318 static int _wrap_spause(lua_State* L) {
9319 int SWIG_arg = 0;
9320 PLBOOL arg1 ;
9321
9322 SWIG_check_num_args("plspause",1,1)
9323 if(!lua_isnumber(L,1)) SWIG_fail_arg("plspause",1,"PLBOOL");
9324 arg1 = (PLBOOL)lua_tonumber(L, 1);
9325 plspause(arg1);
9326
9327 return SWIG_arg;
9328
9329 if(0) SWIG_fail;
9330
9331 fail:
9332 lua_error(L);
9333 return SWIG_arg;
9334 }
9335
9336
9337 static int _wrap_sstrm(lua_State* L) {
9338 int SWIG_arg = 0;
9339 PLINT arg1 ;
9340
9341 SWIG_check_num_args("plsstrm",1,1)
9342 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsstrm",1,"PLINT");
9343 arg1 = (PLINT)lua_tonumber(L, 1);
9344 plsstrm(arg1);
9345
9346 return SWIG_arg;
9347
9348 if(0) SWIG_fail;
9349
9350 fail:
9351 lua_error(L);
9352 return SWIG_arg;
9353 }
9354
9355
9356 static int _wrap_ssub(lua_State* L) {
9357 int SWIG_arg = 0;
9358 PLINT arg1 ;
9359 PLINT arg2 ;
9360
9361 SWIG_check_num_args("plssub",2,2)
9362 if(!lua_isnumber(L,1)) SWIG_fail_arg("plssub",1,"PLINT");
9363 if(!lua_isnumber(L,2)) SWIG_fail_arg("plssub",2,"PLINT");
9364 arg1 = (PLINT)lua_tonumber(L, 1);
9365 arg2 = (PLINT)lua_tonumber(L, 2);
9366 plssub(arg1,arg2);
9367
9368 return SWIG_arg;
9369
9370 if(0) SWIG_fail;
9371
9372 fail:
9373 lua_error(L);
9374 return SWIG_arg;
9375 }
9376
9377
9378 static int _wrap_ssym(lua_State* L) {
9379 int SWIG_arg = 0;
9380 PLFLT arg1 ;
9381 PLFLT arg2 ;
9382
9383 SWIG_check_num_args("plssym",2,2)
9384 if(!lua_isnumber(L,1)) SWIG_fail_arg("plssym",1,"PLFLT");
9385 if(!lua_isnumber(L,2)) SWIG_fail_arg("plssym",2,"PLFLT");
9386 arg1 = (PLFLT)lua_tonumber(L, 1);
9387 arg2 = (PLFLT)lua_tonumber(L, 2);
9388 plssym(arg1,arg2);
9389
9390 return SWIG_arg;
9391
9392 if(0) SWIG_fail;
9393
9394 fail:
9395 lua_error(L);
9396 return SWIG_arg;
9397 }
9398
9399
9400 static int _wrap_star(lua_State* L) {
9401 int SWIG_arg = 0;
9402 PLINT arg1 ;
9403 PLINT arg2 ;
9404
9405 SWIG_check_num_args("plstar",2,2)
9406 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstar",1,"PLINT");
9407 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstar",2,"PLINT");
9408 arg1 = (PLINT)lua_tonumber(L, 1);
9409 arg2 = (PLINT)lua_tonumber(L, 2);
9410 plstar(arg1,arg2);
9411
9412 return SWIG_arg;
9413
9414 if(0) SWIG_fail;
9415
9416 fail:
9417 lua_error(L);
9418 return SWIG_arg;
9419 }
9420
9421
9422 static int _wrap_start(lua_State* L) {
9423 int SWIG_arg = 0;
9424 char *arg1 = (char *) 0 ;
9425 PLINT arg2 ;
9426 PLINT arg3 ;
9427
9428 SWIG_check_num_args("plstart",3,3)
9429 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plstart",1,"char const *");
9430 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstart",2,"PLINT");
9431 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstart",3,"PLINT");
9432 arg1 = (char *)lua_tostring(L, 1);
9433 arg2 = (PLINT)lua_tonumber(L, 2);
9434 arg3 = (PLINT)lua_tonumber(L, 3);
9435 plstart((char const *)arg1,arg2,arg3);
9436
9437 return SWIG_arg;
9438
9439 if(0) SWIG_fail;
9440
9441 fail:
9442 lua_error(L);
9443 return SWIG_arg;
9444 }
9445
9446
9447 static int _wrap_stransform(lua_State* L) {
9448 int SWIG_arg = 0;
9449 ct_func arg1 = (ct_func) 0 ;
9450 PLPointer arg2 = (PLPointer) 0 ;
9451
9452 {
9453 arg1 = NULL;
9454 myct_funcstr[0] = '\0';
9455 }
9456 {
9457 arg2 = NULL;
9458 }
9459 SWIG_check_num_args("plstransform",0,1)
9460 if(lua_gettop(L)>=1){
9461 {
9462 arg1 = NULL;
9463 myct_funcstr[0] = '\0';
9464
9465 if ( lua_isstring( L, 1 ) )
9466 {
9467 const char* funcstr = lua_tostring( L, 1 );
9468 arg1 = myct;
9469 strncpy( myct_funcstr, funcstr, 255 );
9470 myL = L;
9471 }
9472 else
9473 SWIG_fail_arg( "stransform", 1, "ct_func" );
9474 }
9475 }
9476 plstransform(arg1,arg2);
9477
9478 return SWIG_arg;
9479
9480 if(0) SWIG_fail;
9481
9482 fail:
9483 lua_error(L);
9484 return SWIG_arg;
9485 }
9486
9487
9488 static int _wrap_string(lua_State* L) {
9489 int SWIG_arg = 0;
9490 PLINT arg1 ;
9491 PLFLT *arg2 = (PLFLT *) 0 ;
9492 PLFLT *arg3 = (PLFLT *) 0 ;
9493 char *arg4 = (char *) 0 ;
9494 int temp3 ;
9495
9496 SWIG_check_num_args("plstring",3,3)
9497 if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("plstring",3,"char const *");
9498 {
9499 int temp;
9500 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
9501 if ( !arg2 )
9502 SWIG_fail;
9503 arg1 = Alen = temp;
9504 }
9505 {
9506 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
9507 if ( !arg3 )
9508 SWIG_fail;
9509 if ( temp3 != Alen )
9510 {
9511 lua_pushfstring( L, "Tables must be of same length." );
9512 SWIG_fail;
9513 }
9514 }
9515 arg4 = (char *)lua_tostring(L, 3);
9516 plstring(arg1,(double const *)arg2,(double const *)arg3,(char const *)arg4);
9517
9518 {
9519 LUA_FREE_ARRAY( arg2 );
9520 }
9521 {
9522 LUA_FREE_ARRAY( arg3 );
9523 }
9524 return SWIG_arg;
9525
9526 if(0) SWIG_fail;
9527
9528 fail:
9529 {
9530 LUA_FREE_ARRAY( arg2 );
9531 }
9532 {
9533 LUA_FREE_ARRAY( arg3 );
9534 }
9535 lua_error(L);
9536 return SWIG_arg;
9537 }
9538
9539
9540 static int _wrap_string3(lua_State* L) {
9541 int SWIG_arg = 0;
9542 PLINT arg1 ;
9543 PLFLT *arg2 = (PLFLT *) 0 ;
9544 PLFLT *arg3 = (PLFLT *) 0 ;
9545 PLFLT *arg4 = (PLFLT *) 0 ;
9546 char *arg5 = (char *) 0 ;
9547 int temp3 ;
9548 int temp4 ;
9549
9550 SWIG_check_num_args("plstring3",4,4)
9551 if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("plstring3",4,"char const *");
9552 {
9553 int temp;
9554 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
9555 if ( !arg2 )
9556 SWIG_fail;
9557 arg1 = Alen = temp;
9558 }
9559 {
9560 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
9561 if ( !arg3 )
9562 SWIG_fail;
9563 if ( temp3 != Alen )
9564 {
9565 lua_pushfstring( L, "Tables must be of same length." );
9566 SWIG_fail;
9567 }
9568 }
9569 {
9570 arg4 = (PLFLT *) LUA_get_double_num_array_var( L, 3, &temp4 );
9571 if ( !arg4 )
9572 SWIG_fail;
9573 if ( temp4 != Alen )
9574 {
9575 lua_pushfstring( L, "Tables must be of same length." );
9576 SWIG_fail;
9577 }
9578 }
9579 arg5 = (char *)lua_tostring(L, 4);
9580 plstring3(arg1,(double const *)arg2,(double const *)arg3,(double const *)arg4,(char const *)arg5);
9581
9582 {
9583 LUA_FREE_ARRAY( arg2 );
9584 }
9585 {
9586 LUA_FREE_ARRAY( arg3 );
9587 }
9588 {
9589 LUA_FREE_ARRAY( arg4 );
9590 }
9591 return SWIG_arg;
9592
9593 if(0) SWIG_fail;
9594
9595 fail:
9596 {
9597 LUA_FREE_ARRAY( arg2 );
9598 }
9599 {
9600 LUA_FREE_ARRAY( arg3 );
9601 }
9602 {
9603 LUA_FREE_ARRAY( arg4 );
9604 }
9605 lua_error(L);
9606 return SWIG_arg;
9607 }
9608
9609
9610 static int _wrap_stripa(lua_State* L) {
9611 int SWIG_arg = 0;
9612 PLINT arg1 ;
9613 PLINT arg2 ;
9614 PLFLT arg3 ;
9615 PLFLT arg4 ;
9616
9617 SWIG_check_num_args("plstripa",4,4)
9618 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstripa",1,"PLINT");
9619 if(!lua_isnumber(L,2)) SWIG_fail_arg("plstripa",2,"PLINT");
9620 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstripa",3,"PLFLT");
9621 if(!lua_isnumber(L,4)) SWIG_fail_arg("plstripa",4,"PLFLT");
9622 arg1 = (PLINT)lua_tonumber(L, 1);
9623 arg2 = (PLINT)lua_tonumber(L, 2);
9624 arg3 = (PLFLT)lua_tonumber(L, 3);
9625 arg4 = (PLFLT)lua_tonumber(L, 4);
9626 plstripa(arg1,arg2,arg3,arg4);
9627
9628 return SWIG_arg;
9629
9630 if(0) SWIG_fail;
9631
9632 fail:
9633 lua_error(L);
9634 return SWIG_arg;
9635 }
9636
9637
9638 static int _wrap_stripc(lua_State* L) {
9639 int SWIG_arg = 0;
9640 PLINT *arg1 = (PLINT *) 0 ;
9641 char *arg2 = (char *) 0 ;
9642 char *arg3 = (char *) 0 ;
9643 PLFLT arg4 ;
9644 PLFLT arg5 ;
9645 PLFLT arg6 ;
9646 PLFLT arg7 ;
9647 PLFLT arg8 ;
9648 PLFLT arg9 ;
9649 PLFLT arg10 ;
9650 PLBOOL arg11 ;
9651 PLBOOL arg12 ;
9652 PLINT arg13 ;
9653 PLINT arg14 ;
9654 PLINT *arg15 = (PLINT *) 0 ;
9655 PLINT *arg16 = (PLINT *) 0 ;
9656 char **arg17 ;
9657 char *arg18 = (char *) 0 ;
9658 char *arg19 = (char *) 0 ;
9659 char *arg20 = (char *) 0 ;
9660 PLINT temp1 ;
9661 int temp15 ;
9662 int temp16 ;
9663
9664 {
9665 arg17 = NULL;
9666 }
9667 arg1 = &temp1;
9668 SWIG_check_num_args("plstripc",15,19)
9669 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plstripc",1,"char const *");
9670 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plstripc",2,"char const *");
9671 if(!lua_isnumber(L,3)) SWIG_fail_arg("plstripc",3,"PLFLT");
9672 if(!lua_isnumber(L,4)) SWIG_fail_arg("plstripc",4,"PLFLT");
9673 if(!lua_isnumber(L,5)) SWIG_fail_arg("plstripc",5,"PLFLT");
9674 if(!lua_isnumber(L,6)) SWIG_fail_arg("plstripc",6,"PLFLT");
9675 if(!lua_isnumber(L,7)) SWIG_fail_arg("plstripc",7,"PLFLT");
9676 if(!lua_isnumber(L,8)) SWIG_fail_arg("plstripc",8,"PLFLT");
9677 if(!lua_isnumber(L,9)) SWIG_fail_arg("plstripc",9,"PLFLT");
9678 if(!lua_isnumber(L,10)) SWIG_fail_arg("plstripc",10,"PLBOOL");
9679 if(!lua_isnumber(L,11)) SWIG_fail_arg("plstripc",11,"PLBOOL");
9680 if(!lua_isnumber(L,12)) SWIG_fail_arg("plstripc",12,"PLINT");
9681 if(!lua_isnumber(L,13)) SWIG_fail_arg("plstripc",13,"PLINT");
9682 if(lua_gettop(L)>=16 && !lua_istable(L,16)) SWIG_fail_arg("plstripc",16,"char const *[4]");
9683 if(lua_gettop(L)>=17 && !SWIG_lua_isnilstring(L,17)) SWIG_fail_arg("plstripc",17,"char const *");
9684 if(lua_gettop(L)>=18 && !SWIG_lua_isnilstring(L,18)) SWIG_fail_arg("plstripc",18,"char const *");
9685 if(lua_gettop(L)>=19 && !SWIG_lua_isnilstring(L,19)) SWIG_fail_arg("plstripc",19,"char const *");
9686 arg2 = (char *)lua_tostring(L, 1);
9687 arg3 = (char *)lua_tostring(L, 2);
9688 arg4 = (PLFLT)lua_tonumber(L, 3);
9689 arg5 = (PLFLT)lua_tonumber(L, 4);
9690 arg6 = (PLFLT)lua_tonumber(L, 5);
9691 arg7 = (PLFLT)lua_tonumber(L, 6);
9692 arg8 = (PLFLT)lua_tonumber(L, 7);
9693 arg9 = (PLFLT)lua_tonumber(L, 8);
9694 arg10 = (PLFLT)lua_tonumber(L, 9);
9695 arg11 = (PLBOOL)lua_tonumber(L, 10);
9696 arg12 = (PLBOOL)lua_tonumber(L, 11);
9697 arg13 = (PLINT)lua_tonumber(L, 12);
9698 arg14 = (PLINT)lua_tonumber(L, 13);
9699 {
9700 arg15 = (PLINT *) LUA_get_int_num_array_var( L, 14, &temp15 );
9701 if ( !arg15 )
9702 SWIG_fail;
9703 Alen = temp15;
9704 }
9705 {
9706 arg16 = (PLINT *) LUA_get_int_num_array_var( L, 15, &temp16 );
9707 if ( !arg16 )
9708 SWIG_fail;
9709 if ( temp16 != Alen )
9710 {
9711 lua_pushfstring( L, "Tables must be of same length." );
9712 SWIG_fail;
9713 }
9714 }
9715 if(lua_gettop(L)>=16){
9716 {
9717 int i;
9718 arg17 = NULL;
9719
9720 if ( SWIG_table_size( L, 16 ) != 4 )
9721 {
9722 lua_pushfstring( L, "Requires a sequence of 4 strings." );
9723 SWIG_fail;
9724 }
9725 if ( Alen != 4 )
9726 {
9727 lua_pushfstring( L, "colline and styline args must be length 4." );
9728 SWIG_fail;
9729 }
9730
9731 arg17 = malloc( sizeof ( char* ) * 4 );
9732 for ( i = 1; i <= 4; i++ )
9733 {
9734 lua_rawgeti( L, 16, i );
9735 if ( lua_isstring( L, -1 ) )
9736 {
9737 arg17[i - 1] = (char *) lua_tostring( L, -1 );
9738 }
9739 else
9740 {
9741 lua_pop( L, 1 );
9742 lua_pushfstring( L, "Requires a sequence of 4 strings." );
9743 SWIG_fail;
9744 // arg17 array is freed after 'fail:'
9745 }
9746 lua_pop( L, 1 );
9747 }
9748 }
9749 }
9750 if(lua_gettop(L)>=17){
9751 arg18 = (char *)lua_tostring(L, 17);
9752 }
9753 if(lua_gettop(L)>=18){
9754 arg19 = (char *)lua_tostring(L, 18);
9755 }
9756 if(lua_gettop(L)>=19){
9757 arg20 = (char *)lua_tostring(L, 19);
9758 }
9759 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);
9760
9761 lua_pushnumber(L, (lua_Number) *arg1); SWIG_arg++;
9762 {
9763 LUA_FREE_ARRAY( arg15 );
9764 }
9765 {
9766 LUA_FREE_ARRAY( arg16 );
9767 }
9768 {
9769 if ( arg17 )
9770 {
9771 free( arg17 ); arg17 = NULL;
9772 }
9773 }
9774 return SWIG_arg;
9775
9776 if(0) SWIG_fail;
9777
9778 fail:
9779 {
9780 LUA_FREE_ARRAY( arg15 );
9781 }
9782 {
9783 LUA_FREE_ARRAY( arg16 );
9784 }
9785 {
9786 if ( arg17 )
9787 {
9788 free( arg17 ); arg17 = NULL;
9789 }
9790 }
9791 lua_error(L);
9792 return SWIG_arg;
9793 }
9794
9795
9796 static int _wrap_stripd(lua_State* L) {
9797 int SWIG_arg = 0;
9798 PLINT arg1 ;
9799
9800 SWIG_check_num_args("plstripd",1,1)
9801 if(!lua_isnumber(L,1)) SWIG_fail_arg("plstripd",1,"PLINT");
9802 arg1 = (PLINT)lua_tonumber(L, 1);
9803 plstripd(arg1);
9804
9805 return SWIG_arg;
9806
9807 if(0) SWIG_fail;
9808
9809 fail:
9810 lua_error(L);
9811 return SWIG_arg;
9812 }
9813
9814
9815 static int _wrap_styl(lua_State* L) {
9816 int SWIG_arg = 0;
9817 PLINT arg1 ;
9818 PLINT *arg2 = (PLINT *) 0 ;
9819 PLINT *arg3 = (PLINT *) 0 ;
9820 int temp3 ;
9821
9822 SWIG_check_num_args("plstyl",2,2)
9823 {
9824 arg2 = (PLINT *) LUA_get_int_num_array_var( L, 1, &arg1 );
9825 if ( !arg2 )
9826 SWIG_fail;
9827 Alen = arg1;
9828 }
9829 {
9830 arg3 = (PLINT *) LUA_get_int_num_array_var( L, 2, &temp3 );
9831 if ( !arg3 )
9832 SWIG_fail;
9833 if ( temp3 != Alen )
9834 {
9835 lua_pushfstring( L, "Tables must be of same length." );
9836 SWIG_fail;
9837 }
9838 }
9839 plstyl(arg1,(int const *)arg2,(int const *)arg3);
9840
9841 {
9842 LUA_FREE_ARRAY( arg2 );
9843 }
9844 {
9845 LUA_FREE_ARRAY( arg3 );
9846 }
9847 return SWIG_arg;
9848
9849 if(0) SWIG_fail;
9850
9851 fail:
9852 {
9853 LUA_FREE_ARRAY( arg2 );
9854 }
9855 {
9856 LUA_FREE_ARRAY( arg3 );
9857 }
9858 lua_error(L);
9859 return SWIG_arg;
9860 }
9861
9862
9863 static int _wrap_svect(lua_State* L) {
9864 int SWIG_arg = 0;
9865 PLFLT *arg1 = (PLFLT *) 0 ;
9866 PLFLT *arg2 = (PLFLT *) 0 ;
9867 PLINT arg3 ;
9868 PLBOOL arg4 ;
9869
9870 {
9871 arg2 = NULL; arg3 = 0;
9872 }
9873 {
9874 arg4 = 0;
9875 }
9876 SWIG_check_num_args("plsvect",1,3)
9877 if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg("plsvect",3,"PLBOOL");
9878 {
9879 int temp;
9880 if ( lua_isnil( L, 1 ) )
9881 {
9882 arg1 = NULL;
9883 Alen = 0;
9884 }
9885 else
9886 {
9887 arg1 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
9888 if ( !arg1 )
9889 SWIG_fail;
9890 Alen = temp;
9891 }
9892 }
9893 if(lua_gettop(L)>=2){
9894 {
9895 int temp = 0;
9896 if ( lua_isnil( L, 2 ) )
9897 {
9898 arg2 = NULL;
9899 }
9900 else
9901 {
9902 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp );
9903 if ( !arg2 )
9904 SWIG_fail;
9905 if ( temp != Alen )
9906 {
9907 lua_pushfstring( L, "Tables must be of same length." );
9908 SWIG_fail;
9909 }
9910 }
9911 arg3 = temp;
9912 }
9913 }
9914 if(lua_gettop(L)>=3){
9915 arg4 = (PLBOOL)lua_tonumber(L, 3);
9916 }
9917 plsvect((double const *)arg1,(double const *)arg2,arg3,arg4);
9918
9919 {
9920 LUA_FREE_ARRAY( arg2 );
9921 }
9922 return SWIG_arg;
9923
9924 if(0) SWIG_fail;
9925
9926 fail:
9927 {
9928 LUA_FREE_ARRAY( arg2 );
9929 }
9930 lua_error(L);
9931 return SWIG_arg;
9932 }
9933
9934
9935 static int _wrap_svpa(lua_State* L) {
9936 int SWIG_arg = 0;
9937 PLFLT arg1 ;
9938 PLFLT arg2 ;
9939 PLFLT arg3 ;
9940 PLFLT arg4 ;
9941
9942 SWIG_check_num_args("plsvpa",4,4)
9943 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsvpa",1,"PLFLT");
9944 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsvpa",2,"PLFLT");
9945 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsvpa",3,"PLFLT");
9946 if(!lua_isnumber(L,4)) SWIG_fail_arg("plsvpa",4,"PLFLT");
9947 arg1 = (PLFLT)lua_tonumber(L, 1);
9948 arg2 = (PLFLT)lua_tonumber(L, 2);
9949 arg3 = (PLFLT)lua_tonumber(L, 3);
9950 arg4 = (PLFLT)lua_tonumber(L, 4);
9951 plsvpa(arg1,arg2,arg3,arg4);
9952
9953 return SWIG_arg;
9954
9955 if(0) SWIG_fail;
9956
9957 fail:
9958 lua_error(L);
9959 return SWIG_arg;
9960 }
9961
9962
9963 static int _wrap_sxax(lua_State* L) {
9964 int SWIG_arg = 0;
9965 PLINT arg1 ;
9966 PLINT arg2 ;
9967
9968 SWIG_check_num_args("plsxax",2,2)
9969 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsxax",1,"PLINT");
9970 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsxax",2,"PLINT");
9971 arg1 = (PLINT)lua_tonumber(L, 1);
9972 arg2 = (PLINT)lua_tonumber(L, 2);
9973 plsxax(arg1,arg2);
9974
9975 return SWIG_arg;
9976
9977 if(0) SWIG_fail;
9978
9979 fail:
9980 lua_error(L);
9981 return SWIG_arg;
9982 }
9983
9984
9985 static int _wrap_syax(lua_State* L) {
9986 int SWIG_arg = 0;
9987 PLINT arg1 ;
9988 PLINT arg2 ;
9989
9990 SWIG_check_num_args("plsyax",2,2)
9991 if(!lua_isnumber(L,1)) SWIG_fail_arg("plsyax",1,"PLINT");
9992 if(!lua_isnumber(L,2)) SWIG_fail_arg("plsyax",2,"PLINT");
9993 arg1 = (PLINT)lua_tonumber(L, 1);
9994 arg2 = (PLINT)lua_tonumber(L, 2);
9995 plsyax(arg1,arg2);
9996
9997 return SWIG_arg;
9998
9999 if(0) SWIG_fail;
10000
10001 fail:
10002 lua_error(L);
10003 return SWIG_arg;
10004 }
10005
10006
10007 static int _wrap_sym(lua_State* L) {
10008 int SWIG_arg = 0;
10009 PLINT arg1 ;
10010 PLFLT *arg2 = (PLFLT *) 0 ;
10011 PLFLT *arg3 = (PLFLT *) 0 ;
10012 PLINT arg4 ;
10013 int temp3 ;
10014
10015 SWIG_check_num_args("plsym",3,3)
10016 if(!lua_isnumber(L,3)) SWIG_fail_arg("plsym",3,"PLINT");
10017 {
10018 int temp;
10019 arg2 = (PLFLT *) LUA_get_double_num_array_var( L, 1, &temp );
10020 if ( !arg2 )
10021 SWIG_fail;
10022 arg1 = Alen = temp;
10023 }
10024 {
10025 arg3 = (PLFLT *) LUA_get_double_num_array_var( L, 2, &temp3 );
10026 if ( !arg3 )
10027 SWIG_fail;
10028 if ( temp3 != Alen )
10029 {
10030 lua_pushfstring( L, "Tables must be of same length." );
10031 SWIG_fail;
10032 }
10033 }
10034 arg4 = (PLINT)lua_tonumber(L, 3);
10035 plsym(arg1,(double const *)arg2,(double const *)arg3,arg4);
10036
10037 {
10038 LUA_FREE_ARRAY( arg2 );
10039 }
10040 {
10041 LUA_FREE_ARRAY( arg3 );
10042 }
10043 return SWIG_arg;
10044
10045 if(0) SWIG_fail;
10046
10047 fail:
10048 {
10049 LUA_FREE_ARRAY( arg2 );
10050 }
10051 {
10052 LUA_FREE_ARRAY( arg3 );
10053 }
10054 lua_error(L);
10055 return SWIG_arg;
10056 }
10057
10058
10059 static int _wrap_szax(lua_State* L) {
10060 int SWIG_arg = 0;
10061 PLINT arg1 ;
10062 PLINT arg2 ;
10063
10064 SWIG_check_num_args("plszax",2,2)
10065 if(!lua_isnumber(L,1)) SWIG_fail_arg("plszax",1,"PLINT");
10066 if(!lua_isnumber(L,2)) SWIG_fail_arg("plszax",2,"PLINT");
10067 arg1 = (PLINT)lua_tonumber(L, 1);
10068 arg2 = (PLINT)lua_tonumber(L, 2);
10069 plszax(arg1,arg2);
10070
10071 return SWIG_arg;
10072
10073 if(0) SWIG_fail;
10074
10075 fail:
10076 lua_error(L);
10077 return SWIG_arg;
10078 }
10079
10080
10081 static int _wrap_text(lua_State* L) {
10082 int SWIG_arg = 0;
10083
10084 SWIG_check_num_args("pltext",0,0)
10085 pltext();
10086
10087 return SWIG_arg;
10088
10089 if(0) SWIG_fail;
10090
10091 fail:
10092 lua_error(L);
10093 return SWIG_arg;
10094 }
10095
10096
10097 static int _wrap_timefmt(lua_State* L) {
10098 int SWIG_arg = 0;
10099 char *arg1 = (char *) 0 ;
10100
10101 SWIG_check_num_args("pltimefmt",1,1)
10102 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("pltimefmt",1,"char const *");
10103 arg1 = (char *)lua_tostring(L, 1);
10104 pltimefmt((char const *)arg1);
10105
10106 return SWIG_arg;
10107
10108 if(0) SWIG_fail;
10109
10110 fail:
10111 lua_error(L);
10112 return SWIG_arg;
10113 }
10114
10115
10116 static int _wrap_vasp(lua_State* L) {
10117 int SWIG_arg = 0;
10118 PLFLT arg1 ;
10119
10120 SWIG_check_num_args("plvasp",1,1)
10121 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvasp",1,"PLFLT");
10122 arg1 = (PLFLT)lua_tonumber(L, 1);
10123 plvasp(arg1);
10124
10125 return SWIG_arg;
10126
10127 if(0) SWIG_fail;
10128
10129 fail:
10130 lua_error(L);
10131 return SWIG_arg;
10132 }
10133
10134
10135 static int _wrap_vect(lua_State* L) {
10136 int SWIG_arg = 0;
10137 PLFLT **arg1 = (PLFLT **) 0 ;
10138 PLFLT **arg2 = (PLFLT **) 0 ;
10139 PLINT arg3 ;
10140 PLINT arg4 ;
10141 PLFLT arg5 ;
10142 pltr_func arg6 = (pltr_func) 0 ;
10143 PLPointer arg7 = (PLPointer) 0 ;
10144 int ii1 ;
10145 int ii2 ;
10146 PLcGrid cgrid17 ;
10147 PLcGrid2 cgrid27 ;
10148
10149 {
10150 cgrid17.xg = cgrid17.yg = cgrid17.zg = NULL;
10151 cgrid17.nx = cgrid17.ny = cgrid17.nz = 0;
10152 cgrid27.xg = cgrid27.yg = cgrid27.zg = NULL;
10153 cgrid27.nx = cgrid27.ny = 0;
10154 }
10155 {
10156 arg6 = NULL;
10157 }
10158 {
10159 arg7 = NULL;
10160 }
10161 SWIG_check_num_args("plvect",3,5)
10162 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvect",3,"PLFLT");
10163 {
10164 int jj;
10165
10166 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
10167 if ( !arg1 )
10168 SWIG_fail;
10169 Xlen = ii1;
10170 Ylen = jj;
10171 }
10172 {
10173 int jj;
10174
10175 arg2 = read_double_Matrix( L, 2, &ii2, &jj );
10176 if ( !arg2 )
10177 SWIG_fail;
10178 arg3 = ii2;
10179 arg4 = jj;
10180 if ( ( arg3 != Xlen ) || ( arg4 != Ylen ) )
10181 {
10182 lua_pushfstring( L, "Vectors must match matrix." );
10183 SWIG_fail;
10184 }
10185 }
10186 arg5 = (PLFLT)lua_tonumber(L, 3);
10187 if(lua_gettop(L)>=4){
10188 {
10189 arg6 = NULL;
10190 mypltr_funcstr[0] = '\0';
10191
10192 if ( lua_isstring( L, 4 ) )
10193 {
10194 const char* funcstr = lua_tostring( L, 4 );
10195 if ( strcmp( "pltr0", funcstr ) == 0 )
10196 {
10197 arg6 = pltr0;
10198 }
10199 else if ( strcmp( "pltr1", funcstr ) == 0 )
10200 {
10201 arg6 = pltr1;
10202 }
10203 else if ( strcmp( "pltr2", funcstr ) == 0 )
10204 {
10205 arg6 = pltr2;
10206 }
10207 else
10208 {
10209 arg6 = mypltr;
10210 strncpy( mypltr_funcstr, funcstr, 255 );
10211 myL = L;
10212 }
10213 }
10214 else
10215 SWIG_fail_arg( "vect", 6, "pltr_func" );
10216 }
10217 }
10218 if(lua_gettop(L)>=5){
10219 {
10220 int nx, ny;
10221 int gridmode = 0;
10222
10223 lua_pushstring( L, "xg" );
10224 lua_gettable( L, 5 );
10225 if ( !lua_istable( L, -1 ) )
10226 {
10227 lua_pop( L, 1 ); // pop "xg"
10228 lua_pushstring( L, "expected a table xg" );
10229 SWIG_fail;
10230 }
10231 lua_rawgeti( L, -1, 1 );
10232 if ( lua_istable( L, -1 ) )
10233 gridmode = 2; // two dimensional array
10234 else if ( lua_isnumber( L, -1 ) )
10235 gridmode = 1; // one dimensional array
10236 else
10237 {
10238 lua_pop( L, 1 ); // pop "1"
10239 lua_pop( L, 1 ); // pop "xg"
10240 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
10241 SWIG_fail;
10242 }
10243 lua_pop( L, 1 ); // pop test element
10244 if ( gridmode == 1 )
10245 {
10246 cgrid17.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
10247 if ( !cgrid17.xg )
10248 {
10249 lua_pop( L, 1 ); // pop "xg"
10250 SWIG_fail;
10251 }
10252 if ( nx != Xlen )
10253 {
10254 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
10255 SWIG_fail;
10256 }
10257 cgrid17.nx = nx;
10258 }
10259 else
10260 {
10261 cgrid27.xg = read_double_Matrix( L, -1, &nx, &ny );
10262 if ( !cgrid27.xg )
10263 {
10264 lua_pop( L, 1 ); // pop "xg"
10265 SWIG_fail;
10266 }
10267 if ( ( nx != Xlen ) || ( ny != Ylen ) )
10268 {
10269 lua_pop( L, 1 ); // pop "xg"
10270 lua_pushfstring( L, "Vectors must match matrix." );
10271 SWIG_fail;
10272 }
10273 cgrid27.nx = nx;
10274 cgrid27.ny = ny;
10275 }
10276 lua_pop( L, 1 ); // pop "xg"
10277
10278 lua_pushstring( L, "yg" );
10279 lua_gettable( L, 5 );
10280 if ( !lua_istable( L, -1 ) )
10281 {
10282 lua_pop( L, 1 );
10283 lua_pushstring( L, "expected a table yg" );
10284 SWIG_fail;
10285 }
10286 lua_rawgeti( L, -1, 1 );
10287 if ( gridmode == 2 )
10288 {
10289 if ( !lua_istable( L, -1 ) )
10290 {
10291 lua_pop( L, 1 ); // pop "1"
10292 lua_pop( L, 1 ); // pop "yg"
10293 lua_pushstring( L, "expected a two dimensional array/table in yg" );
10294 SWIG_fail;
10295 }
10296 }
10297 else
10298 {
10299 if ( !lua_isnumber( L, -1 ) )
10300 {
10301 lua_pop( L, 1 ); // pop "1"
10302 lua_pop( L, 1 ); // pop "yg"
10303 lua_pushstring( L, "expected a one dimensional array/table in yg" );
10304 SWIG_fail;
10305 }
10306 }
10307 lua_pop( L, 1 ); // pop "1"
10308 if ( gridmode == 1 )
10309 {
10310 cgrid17.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
10311 if ( !cgrid17.yg )
10312 {
10313 lua_pop( L, 1 ); // pop "yg"
10314 SWIG_fail;
10315 }
10316 if ( ny != Ylen )
10317 {
10318 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
10319 SWIG_fail;
10320 }
10321 cgrid17.ny = ny;
10322 }
10323 else
10324 {
10325 cgrid27.yg = read_double_Matrix( L, -1, &nx, &ny );
10326 if ( !cgrid27.yg )
10327 {
10328 lua_pop( L, 1 ); // pop "xg"
10329 SWIG_fail;
10330 }
10331 if ( ( nx != Xlen ) || ( ny != Ylen ) )
10332 {
10333 lua_pop( L, 1 ); // pop "xg"
10334 lua_pushfstring( L, "Vectors must match matrix." );
10335 SWIG_fail;
10336 }
10337 // cgrid27.nx/ny already set
10338 }
10339 lua_pop( L, 1 ); // pop "yg"
10340
10341 if ( gridmode == 1 )
10342 arg7 = &cgrid17;
10343 else if ( gridmode == 2 )
10344 arg7 = &cgrid27;
10345 }
10346 }
10347 plvect((double const **)arg1,(double const **)arg2,arg3,arg4,arg5,arg6,arg7);
10348
10349 {
10350 int i;
10351
10352 if ( arg1 )
10353 {
10354 for ( i = 0; i < ii1; i++ )
10355 LUA_FREE_ARRAY( arg1[i] );
10356 LUA_FREE_ARRAY( arg1 );
10357 }
10358 }
10359 {
10360 int i;
10361
10362 if ( arg2 )
10363 {
10364 for ( i = 0; i < ii2; i++ )
10365 LUA_FREE_ARRAY( arg2[i] );
10366 LUA_FREE_ARRAY( arg2 );
10367 }
10368 }
10369 {
10370 mypltr_funcstr[0] = '\0';
10371 }
10372 {
10373 int i;
10374
10375 LUA_FREE_ARRAY( cgrid17.xg );
10376 LUA_FREE_ARRAY( cgrid17.yg );
10377
10378 if ( cgrid27.xg )
10379 {
10380 for ( i = 0; i < Xlen; i++ )
10381 LUA_FREE_ARRAY( cgrid27.xg[i] );
10382 LUA_FREE_ARRAY( cgrid27.xg );
10383 }
10384 if ( cgrid27.yg )
10385 {
10386 for ( i = 0; i < Xlen; i++ )
10387 LUA_FREE_ARRAY( cgrid27.yg[i] );
10388 LUA_FREE_ARRAY( cgrid27.yg );
10389 }
10390 }
10391 return SWIG_arg;
10392
10393 if(0) SWIG_fail;
10394
10395 fail:
10396 {
10397 int i;
10398
10399 if ( arg1 )
10400 {
10401 for ( i = 0; i < ii1; i++ )
10402 LUA_FREE_ARRAY( arg1[i] );
10403 LUA_FREE_ARRAY( arg1 );
10404 }
10405 }
10406 {
10407 int i;
10408
10409 if ( arg2 )
10410 {
10411 for ( i = 0; i < ii2; i++ )
10412 LUA_FREE_ARRAY( arg2[i] );
10413 LUA_FREE_ARRAY( arg2 );
10414 }
10415 }
10416 {
10417 mypltr_funcstr[0] = '\0';
10418 }
10419 {
10420 int i;
10421
10422 LUA_FREE_ARRAY( cgrid17.xg );
10423 LUA_FREE_ARRAY( cgrid17.yg );
10424
10425 if ( cgrid27.xg )
10426 {
10427 for ( i = 0; i < Xlen; i++ )
10428 LUA_FREE_ARRAY( cgrid27.xg[i] );
10429 LUA_FREE_ARRAY( cgrid27.xg );
10430 }
10431 if ( cgrid27.yg )
10432 {
10433 for ( i = 0; i < Xlen; i++ )
10434 LUA_FREE_ARRAY( cgrid27.yg[i] );
10435 LUA_FREE_ARRAY( cgrid27.yg );
10436 }
10437 }
10438 lua_error(L);
10439 return SWIG_arg;
10440 }
10441
10442
10443 static int _wrap_vpas(lua_State* L) {
10444 int SWIG_arg = 0;
10445 PLFLT arg1 ;
10446 PLFLT arg2 ;
10447 PLFLT arg3 ;
10448 PLFLT arg4 ;
10449 PLFLT arg5 ;
10450
10451 SWIG_check_num_args("plvpas",5,5)
10452 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvpas",1,"PLFLT");
10453 if(!lua_isnumber(L,2)) SWIG_fail_arg("plvpas",2,"PLFLT");
10454 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvpas",3,"PLFLT");
10455 if(!lua_isnumber(L,4)) SWIG_fail_arg("plvpas",4,"PLFLT");
10456 if(!lua_isnumber(L,5)) SWIG_fail_arg("plvpas",5,"PLFLT");
10457 arg1 = (PLFLT)lua_tonumber(L, 1);
10458 arg2 = (PLFLT)lua_tonumber(L, 2);
10459 arg3 = (PLFLT)lua_tonumber(L, 3);
10460 arg4 = (PLFLT)lua_tonumber(L, 4);
10461 arg5 = (PLFLT)lua_tonumber(L, 5);
10462 plvpas(arg1,arg2,arg3,arg4,arg5);
10463
10464 return SWIG_arg;
10465
10466 if(0) SWIG_fail;
10467
10468 fail:
10469 lua_error(L);
10470 return SWIG_arg;
10471 }
10472
10473
10474 static int _wrap_vpor(lua_State* L) {
10475 int SWIG_arg = 0;
10476 PLFLT arg1 ;
10477 PLFLT arg2 ;
10478 PLFLT arg3 ;
10479 PLFLT arg4 ;
10480
10481 SWIG_check_num_args("plvpor",4,4)
10482 if(!lua_isnumber(L,1)) SWIG_fail_arg("plvpor",1,"PLFLT");
10483 if(!lua_isnumber(L,2)) SWIG_fail_arg("plvpor",2,"PLFLT");
10484 if(!lua_isnumber(L,3)) SWIG_fail_arg("plvpor",3,"PLFLT");
10485 if(!lua_isnumber(L,4)) SWIG_fail_arg("plvpor",4,"PLFLT");
10486 arg1 = (PLFLT)lua_tonumber(L, 1);
10487 arg2 = (PLFLT)lua_tonumber(L, 2);
10488 arg3 = (PLFLT)lua_tonumber(L, 3);
10489 arg4 = (PLFLT)lua_tonumber(L, 4);
10490 plvpor(arg1,arg2,arg3,arg4);
10491
10492 return SWIG_arg;
10493
10494 if(0) SWIG_fail;
10495
10496 fail:
10497 lua_error(L);
10498 return SWIG_arg;
10499 }
10500
10501
10502 static int _wrap_vsta(lua_State* L) {
10503 int SWIG_arg = 0;
10504
10505 SWIG_check_num_args("plvsta",0,0)
10506 plvsta();
10507
10508 return SWIG_arg;
10509
10510 if(0) SWIG_fail;
10511
10512 fail:
10513 lua_error(L);
10514 return SWIG_arg;
10515 }
10516
10517
10518 static int _wrap_w3d(lua_State* L) {
10519 int SWIG_arg = 0;
10520 PLFLT arg1 ;
10521 PLFLT arg2 ;
10522 PLFLT arg3 ;
10523 PLFLT arg4 ;
10524 PLFLT arg5 ;
10525 PLFLT arg6 ;
10526 PLFLT arg7 ;
10527 PLFLT arg8 ;
10528 PLFLT arg9 ;
10529 PLFLT arg10 ;
10530 PLFLT arg11 ;
10531
10532 SWIG_check_num_args("plw3d",11,11)
10533 if(!lua_isnumber(L,1)) SWIG_fail_arg("plw3d",1,"PLFLT");
10534 if(!lua_isnumber(L,2)) SWIG_fail_arg("plw3d",2,"PLFLT");
10535 if(!lua_isnumber(L,3)) SWIG_fail_arg("plw3d",3,"PLFLT");
10536 if(!lua_isnumber(L,4)) SWIG_fail_arg("plw3d",4,"PLFLT");
10537 if(!lua_isnumber(L,5)) SWIG_fail_arg("plw3d",5,"PLFLT");
10538 if(!lua_isnumber(L,6)) SWIG_fail_arg("plw3d",6,"PLFLT");
10539 if(!lua_isnumber(L,7)) SWIG_fail_arg("plw3d",7,"PLFLT");
10540 if(!lua_isnumber(L,8)) SWIG_fail_arg("plw3d",8,"PLFLT");
10541 if(!lua_isnumber(L,9)) SWIG_fail_arg("plw3d",9,"PLFLT");
10542 if(!lua_isnumber(L,10)) SWIG_fail_arg("plw3d",10,"PLFLT");
10543 if(!lua_isnumber(L,11)) SWIG_fail_arg("plw3d",11,"PLFLT");
10544 arg1 = (PLFLT)lua_tonumber(L, 1);
10545 arg2 = (PLFLT)lua_tonumber(L, 2);
10546 arg3 = (PLFLT)lua_tonumber(L, 3);
10547 arg4 = (PLFLT)lua_tonumber(L, 4);
10548 arg5 = (PLFLT)lua_tonumber(L, 5);
10549 arg6 = (PLFLT)lua_tonumber(L, 6);
10550 arg7 = (PLFLT)lua_tonumber(L, 7);
10551 arg8 = (PLFLT)lua_tonumber(L, 8);
10552 arg9 = (PLFLT)lua_tonumber(L, 9);
10553 arg10 = (PLFLT)lua_tonumber(L, 10);
10554 arg11 = (PLFLT)lua_tonumber(L, 11);
10555 plw3d(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
10556
10557 return SWIG_arg;
10558
10559 if(0) SWIG_fail;
10560
10561 fail:
10562 lua_error(L);
10563 return SWIG_arg;
10564 }
10565
10566
10567 static int _wrap_width(lua_State* L) {
10568 int SWIG_arg = 0;
10569 PLINT arg1 ;
10570
10571 SWIG_check_num_args("plwidth",1,1)
10572 if(!lua_isnumber(L,1)) SWIG_fail_arg("plwidth",1,"PLINT");
10573 arg1 = (PLINT)lua_tonumber(L, 1);
10574 plwidth(arg1);
10575
10576 return SWIG_arg;
10577
10578 if(0) SWIG_fail;
10579
10580 fail:
10581 lua_error(L);
10582 return SWIG_arg;
10583 }
10584
10585
10586 static int _wrap_wind(lua_State* L) {
10587 int SWIG_arg = 0;
10588 PLFLT arg1 ;
10589 PLFLT arg2 ;
10590 PLFLT arg3 ;
10591 PLFLT arg4 ;
10592
10593 SWIG_check_num_args("plwind",4,4)
10594 if(!lua_isnumber(L,1)) SWIG_fail_arg("plwind",1,"PLFLT");
10595 if(!lua_isnumber(L,2)) SWIG_fail_arg("plwind",2,"PLFLT");
10596 if(!lua_isnumber(L,3)) SWIG_fail_arg("plwind",3,"PLFLT");
10597 if(!lua_isnumber(L,4)) SWIG_fail_arg("plwind",4,"PLFLT");
10598 arg1 = (PLFLT)lua_tonumber(L, 1);
10599 arg2 = (PLFLT)lua_tonumber(L, 2);
10600 arg3 = (PLFLT)lua_tonumber(L, 3);
10601 arg4 = (PLFLT)lua_tonumber(L, 4);
10602 plwind(arg1,arg2,arg3,arg4);
10603
10604 return SWIG_arg;
10605
10606 if(0) SWIG_fail;
10607
10608 fail:
10609 lua_error(L);
10610 return SWIG_arg;
10611 }
10612
10613
10614 static int _wrap_xormod(lua_State* L) {
10615 int SWIG_arg = 0;
10616 PLBOOL arg1 ;
10617 PLBOOL *arg2 = (PLBOOL *) 0 ;
10618 PLBOOL temp2 ;
10619
10620 arg2 = &temp2;
10621 SWIG_check_num_args("plxormod",1,1)
10622 if(!lua_isnumber(L,1)) SWIG_fail_arg("plxormod",1,"PLBOOL");
10623 arg1 = (PLBOOL)lua_tonumber(L, 1);
10624 plxormod(arg1,arg2);
10625
10626 lua_pushnumber(L, (lua_Number) *arg2); SWIG_arg++;
10627 return SWIG_arg;
10628
10629 if(0) SWIG_fail;
10630
10631 fail:
10632 lua_error(L);
10633 return SWIG_arg;
10634 }
10635
10636
10637 static int _wrap_map(lua_State* L) {
10638 int SWIG_arg = 0;
10639 mapform_func arg1 = (mapform_func) 0 ;
10640 char *arg2 = (char *) 0 ;
10641 PLFLT arg3 ;
10642 PLFLT arg4 ;
10643 PLFLT arg5 ;
10644 PLFLT arg6 ;
10645
10646 SWIG_check_num_args("plmap",6,6)
10647 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plmap",2,"char const *");
10648 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmap",3,"PLFLT");
10649 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmap",4,"PLFLT");
10650 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmap",5,"PLFLT");
10651 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmap",6,"PLFLT");
10652 {
10653 arg1 = NULL;
10654 mapform_funcstr[0] = '\0';
10655
10656 if ( lua_isnil( L, 1 ) )
10657 {
10658 arg1 = NULL;
10659 }
10660 else if ( lua_isstring( L, 1 ) )
10661 {
10662 arg1 = mapform;
10663 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
10664 myL = L;
10665 }
10666 else
10667 SWIG_fail_arg( "map", 1, "mapform_func" );
10668 }
10669 arg2 = (char *)lua_tostring(L, 2);
10670 arg3 = (PLFLT)lua_tonumber(L, 3);
10671 arg4 = (PLFLT)lua_tonumber(L, 4);
10672 arg5 = (PLFLT)lua_tonumber(L, 5);
10673 arg6 = (PLFLT)lua_tonumber(L, 6);
10674 plmap(arg1,(char const *)arg2,arg3,arg4,arg5,arg6);
10675
10676 {
10677 mapform_funcstr[0] = '\0';
10678 }
10679 return SWIG_arg;
10680
10681 if(0) SWIG_fail;
10682
10683 fail:
10684 {
10685 mapform_funcstr[0] = '\0';
10686 }
10687 lua_error(L);
10688 return SWIG_arg;
10689 }
10690
10691
10692 static int _wrap_meridians(lua_State* L) {
10693 int SWIG_arg = 0;
10694 mapform_func arg1 = (mapform_func) 0 ;
10695 PLFLT arg2 ;
10696 PLFLT arg3 ;
10697 PLFLT arg4 ;
10698 PLFLT arg5 ;
10699 PLFLT arg6 ;
10700 PLFLT arg7 ;
10701
10702 SWIG_check_num_args("plmeridians",7,7)
10703 if(!lua_isnumber(L,2)) SWIG_fail_arg("plmeridians",2,"PLFLT");
10704 if(!lua_isnumber(L,3)) SWIG_fail_arg("plmeridians",3,"PLFLT");
10705 if(!lua_isnumber(L,4)) SWIG_fail_arg("plmeridians",4,"PLFLT");
10706 if(!lua_isnumber(L,5)) SWIG_fail_arg("plmeridians",5,"PLFLT");
10707 if(!lua_isnumber(L,6)) SWIG_fail_arg("plmeridians",6,"PLFLT");
10708 if(!lua_isnumber(L,7)) SWIG_fail_arg("plmeridians",7,"PLFLT");
10709 {
10710 arg1 = NULL;
10711 mapform_funcstr[0] = '\0';
10712
10713 if ( lua_isnil( L, 1 ) )
10714 {
10715 arg1 = NULL;
10716 }
10717 else if ( lua_isstring( L, 1 ) )
10718 {
10719 arg1 = mapform;
10720 strncpy( mapform_funcstr, lua_tostring( L, 1 ), 255 );
10721 myL = L;
10722 }
10723 else
10724 SWIG_fail_arg( "meridians", 1, "mapform_func" );
10725 }
10726 arg2 = (PLFLT)lua_tonumber(L, 2);
10727 arg3 = (PLFLT)lua_tonumber(L, 3);
10728 arg4 = (PLFLT)lua_tonumber(L, 4);
10729 arg5 = (PLFLT)lua_tonumber(L, 5);
10730 arg6 = (PLFLT)lua_tonumber(L, 6);
10731 arg7 = (PLFLT)lua_tonumber(L, 7);
10732 plmeridians(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
10733
10734 {
10735 mapform_funcstr[0] = '\0';
10736 }
10737 return SWIG_arg;
10738
10739 if(0) SWIG_fail;
10740
10741 fail:
10742 {
10743 mapform_funcstr[0] = '\0';
10744 }
10745 lua_error(L);
10746 return SWIG_arg;
10747 }
10748
10749
10750 static int _wrap_image(lua_State* L) {
10751 int SWIG_arg = 0;
10752 PLFLT **arg1 = (PLFLT **) 0 ;
10753 PLINT arg2 ;
10754 PLINT arg3 ;
10755 PLFLT arg4 ;
10756 PLFLT arg5 ;
10757 PLFLT arg6 ;
10758 PLFLT arg7 ;
10759 PLFLT arg8 ;
10760 PLFLT arg9 ;
10761 PLFLT arg10 ;
10762 PLFLT arg11 ;
10763 PLFLT arg12 ;
10764 PLFLT arg13 ;
10765 int ii1 ;
10766
10767 SWIG_check_num_args("plimage",11,11)
10768 if(!lua_isnumber(L,2)) SWIG_fail_arg("plimage",2,"PLFLT");
10769 if(!lua_isnumber(L,3)) SWIG_fail_arg("plimage",3,"PLFLT");
10770 if(!lua_isnumber(L,4)) SWIG_fail_arg("plimage",4,"PLFLT");
10771 if(!lua_isnumber(L,5)) SWIG_fail_arg("plimage",5,"PLFLT");
10772 if(!lua_isnumber(L,6)) SWIG_fail_arg("plimage",6,"PLFLT");
10773 if(!lua_isnumber(L,7)) SWIG_fail_arg("plimage",7,"PLFLT");
10774 if(!lua_isnumber(L,8)) SWIG_fail_arg("plimage",8,"PLFLT");
10775 if(!lua_isnumber(L,9)) SWIG_fail_arg("plimage",9,"PLFLT");
10776 if(!lua_isnumber(L,10)) SWIG_fail_arg("plimage",10,"PLFLT");
10777 if(!lua_isnumber(L,11)) SWIG_fail_arg("plimage",11,"PLFLT");
10778 {
10779 int jj;
10780
10781 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
10782 if ( !arg1 )
10783 SWIG_fail;
10784 Xlen = arg2 = ii1;
10785 Ylen = arg3 = jj;
10786 }
10787 arg4 = (PLFLT)lua_tonumber(L, 2);
10788 arg5 = (PLFLT)lua_tonumber(L, 3);
10789 arg6 = (PLFLT)lua_tonumber(L, 4);
10790 arg7 = (PLFLT)lua_tonumber(L, 5);
10791 arg8 = (PLFLT)lua_tonumber(L, 6);
10792 arg9 = (PLFLT)lua_tonumber(L, 7);
10793 arg10 = (PLFLT)lua_tonumber(L, 8);
10794 arg11 = (PLFLT)lua_tonumber(L, 9);
10795 arg12 = (PLFLT)lua_tonumber(L, 10);
10796 arg13 = (PLFLT)lua_tonumber(L, 11);
10797 plimage((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
10798
10799 {
10800 int i;
10801
10802 if ( arg1 )
10803 {
10804 for ( i = 0; i < ii1; i++ )
10805 LUA_FREE_ARRAY( arg1[i] );
10806 LUA_FREE_ARRAY( arg1 );
10807 }
10808 }
10809 return SWIG_arg;
10810
10811 if(0) SWIG_fail;
10812
10813 fail:
10814 {
10815 int i;
10816
10817 if ( arg1 )
10818 {
10819 for ( i = 0; i < ii1; i++ )
10820 LUA_FREE_ARRAY( arg1[i] );
10821 LUA_FREE_ARRAY( arg1 );
10822 }
10823 }
10824 lua_error(L);
10825 return SWIG_arg;
10826 }
10827
10828
10829 static int _wrap_imagefr(lua_State* L) {
10830 int SWIG_arg = 0;
10831 PLFLT **arg1 = (PLFLT **) 0 ;
10832 PLINT arg2 ;
10833 PLINT arg3 ;
10834 PLFLT arg4 ;
10835 PLFLT arg5 ;
10836 PLFLT arg6 ;
10837 PLFLT arg7 ;
10838 PLFLT arg8 ;
10839 PLFLT arg9 ;
10840 PLFLT arg10 ;
10841 PLFLT arg11 ;
10842 pltr_func arg12 = (pltr_func) 0 ;
10843 PLPointer arg13 = (PLPointer) 0 ;
10844 int ii1 ;
10845 PLcGrid cgrid113 ;
10846 PLcGrid2 cgrid213 ;
10847
10848 {
10849 cgrid113.xg = cgrid113.yg = cgrid113.zg = NULL;
10850 cgrid113.nx = cgrid113.ny = cgrid113.nz = 0;
10851 cgrid213.xg = cgrid213.yg = cgrid213.zg = NULL;
10852 cgrid213.nx = cgrid213.ny = 0;
10853 }
10854 {
10855 arg12 = NULL;
10856 }
10857 {
10858 arg13 = NULL;
10859 }
10860 SWIG_check_num_args("plimagefr",9,11)
10861 if(!lua_isnumber(L,2)) SWIG_fail_arg("plimagefr",2,"PLFLT");
10862 if(!lua_isnumber(L,3)) SWIG_fail_arg("plimagefr",3,"PLFLT");
10863 if(!lua_isnumber(L,4)) SWIG_fail_arg("plimagefr",4,"PLFLT");
10864 if(!lua_isnumber(L,5)) SWIG_fail_arg("plimagefr",5,"PLFLT");
10865 if(!lua_isnumber(L,6)) SWIG_fail_arg("plimagefr",6,"PLFLT");
10866 if(!lua_isnumber(L,7)) SWIG_fail_arg("plimagefr",7,"PLFLT");
10867 if(!lua_isnumber(L,8)) SWIG_fail_arg("plimagefr",8,"PLFLT");
10868 if(!lua_isnumber(L,9)) SWIG_fail_arg("plimagefr",9,"PLFLT");
10869 {
10870 int jj;
10871
10872 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
10873 if ( !arg1 )
10874 SWIG_fail;
10875 Xlen = arg2 = ii1;
10876 Ylen = arg3 = jj;
10877 }
10878 arg4 = (PLFLT)lua_tonumber(L, 2);
10879 arg5 = (PLFLT)lua_tonumber(L, 3);
10880 arg6 = (PLFLT)lua_tonumber(L, 4);
10881 arg7 = (PLFLT)lua_tonumber(L, 5);
10882 arg8 = (PLFLT)lua_tonumber(L, 6);
10883 arg9 = (PLFLT)lua_tonumber(L, 7);
10884 arg10 = (PLFLT)lua_tonumber(L, 8);
10885 arg11 = (PLFLT)lua_tonumber(L, 9);
10886 if(lua_gettop(L)>=10){
10887 {
10888 arg12 = NULL;
10889 mypltr_funcstr[0] = '\0';
10890
10891 if ( lua_isstring( L, 10 ) )
10892 {
10893 const char* funcstr = lua_tostring( L, 10 );
10894 if ( strcmp( "pltr0", funcstr ) == 0 )
10895 {
10896 arg12 = pltr0;
10897 }
10898 else if ( strcmp( "pltr1", funcstr ) == 0 )
10899 {
10900 arg12 = pltr1;
10901 }
10902 else if ( strcmp( "pltr2", funcstr ) == 0 )
10903 {
10904 arg12 = pltr2;
10905 }
10906 else
10907 {
10908 arg12 = mypltr;
10909 strncpy( mypltr_funcstr, funcstr, 255 );
10910 myL = L;
10911 }
10912 }
10913 else
10914 SWIG_fail_arg( "imagefr", 12, "pltr_func" );
10915 }
10916 }
10917 if(lua_gettop(L)>=11){
10918 {
10919 int nx, ny;
10920 int gridmode = 0;
10921
10922 lua_pushstring( L, "xg" );
10923 lua_gettable( L, 11 );
10924 if ( !lua_istable( L, -1 ) )
10925 {
10926 lua_pop( L, 1 ); // pop "xg"
10927 lua_pushstring( L, "expected a table xg" );
10928 SWIG_fail;
10929 }
10930 lua_rawgeti( L, -1, 1 );
10931 if ( lua_istable( L, -1 ) )
10932 gridmode = 2; // two dimensional array
10933 else if ( lua_isnumber( L, -1 ) )
10934 gridmode = 1; // one dimensional array
10935 else
10936 {
10937 lua_pop( L, 1 ); // pop "1"
10938 lua_pop( L, 1 ); // pop "xg"
10939 lua_pushstring( L, "expected a one or two dimensional array/table in xg" );
10940 SWIG_fail;
10941 }
10942 lua_pop( L, 1 ); // pop test element
10943 if ( gridmode == 1 )
10944 {
10945 cgrid113.xg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &nx );
10946 if ( !cgrid113.xg )
10947 {
10948 lua_pop( L, 1 ); // pop "xg"
10949 SWIG_fail;
10950 }
10951 if ( nx != Xlen )
10952 {
10953 lua_pushfstring( L, "Table xg must be of length%d.", Xlen );
10954 SWIG_fail;
10955 }
10956 cgrid113.nx = nx;
10957 }
10958 else
10959 {
10960 cgrid213.xg = read_double_Matrix( L, -1, &nx, &ny );
10961 if ( !cgrid213.xg )
10962 {
10963 lua_pop( L, 1 ); // pop "xg"
10964 SWIG_fail;
10965 }
10966 if ( ( nx != Xlen ) || ( ny != Ylen ) )
10967 {
10968 lua_pop( L, 1 ); // pop "xg"
10969 lua_pushfstring( L, "Vectors must match matrix." );
10970 SWIG_fail;
10971 }
10972 cgrid213.nx = nx;
10973 cgrid213.ny = ny;
10974 }
10975 lua_pop( L, 1 ); // pop "xg"
10976
10977 lua_pushstring( L, "yg" );
10978 lua_gettable( L, 11 );
10979 if ( !lua_istable( L, -1 ) )
10980 {
10981 lua_pop( L, 1 );
10982 lua_pushstring( L, "expected a table yg" );
10983 SWIG_fail;
10984 }
10985 lua_rawgeti( L, -1, 1 );
10986 if ( gridmode == 2 )
10987 {
10988 if ( !lua_istable( L, -1 ) )
10989 {
10990 lua_pop( L, 1 ); // pop "1"
10991 lua_pop( L, 1 ); // pop "yg"
10992 lua_pushstring( L, "expected a two dimensional array/table in yg" );
10993 SWIG_fail;
10994 }
10995 }
10996 else
10997 {
10998 if ( !lua_isnumber( L, -1 ) )
10999 {
11000 lua_pop( L, 1 ); // pop "1"
11001 lua_pop( L, 1 ); // pop "yg"
11002 lua_pushstring( L, "expected a one dimensional array/table in yg" );
11003 SWIG_fail;
11004 }
11005 }
11006 lua_pop( L, 1 ); // pop "1"
11007 if ( gridmode == 1 )
11008 {
11009 cgrid113.yg = (PLFLT *) LUA_get_double_num_array_var( L, -1, &ny );
11010 if ( !cgrid113.yg )
11011 {
11012 lua_pop( L, 1 ); // pop "yg"
11013 SWIG_fail;
11014 }
11015 if ( ny != Ylen )
11016 {
11017 lua_pushfstring( L, "Table yg must be of length%d.", Ylen );
11018 SWIG_fail;
11019 }
11020 cgrid113.ny = ny;
11021 }
11022 else
11023 {
11024 cgrid213.yg = read_double_Matrix( L, -1, &nx, &ny );
11025 if ( !cgrid213.yg )
11026 {
11027 lua_pop( L, 1 ); // pop "xg"
11028 SWIG_fail;
11029 }
11030 if ( ( nx != Xlen ) || ( ny != Ylen ) )
11031 {
11032 lua_pop( L, 1 ); // pop "xg"
11033 lua_pushfstring( L, "Vectors must match matrix." );
11034 SWIG_fail;
11035 }
11036 // cgrid213.nx/ny already set
11037 }
11038 lua_pop( L, 1 ); // pop "yg"
11039
11040 if ( gridmode == 1 )
11041 arg13 = &cgrid113;
11042 else if ( gridmode == 2 )
11043 arg13 = &cgrid213;
11044 }
11045 }
11046 plimagefr((double const **)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
11047
11048 {
11049 int i;
11050
11051 if ( arg1 )
11052 {
11053 for ( i = 0; i < ii1; i++ )
11054 LUA_FREE_ARRAY( arg1[i] );
11055 LUA_FREE_ARRAY( arg1 );
11056 }
11057 }
11058 {
11059 mypltr_funcstr[0] = '\0';
11060 }
11061 {
11062 int i;
11063
11064 LUA_FREE_ARRAY( cgrid113.xg );
11065 LUA_FREE_ARRAY( cgrid113.yg );
11066
11067 if ( cgrid213.xg )
11068 {
11069 for ( i = 0; i < Xlen; i++ )
11070 LUA_FREE_ARRAY( cgrid213.xg[i] );
11071 LUA_FREE_ARRAY( cgrid213.xg );
11072 }
11073 if ( cgrid213.yg )
11074 {
11075 for ( i = 0; i < Xlen; i++ )
11076 LUA_FREE_ARRAY( cgrid213.yg[i] );
11077 LUA_FREE_ARRAY( cgrid213.yg );
11078 }
11079 }
11080 return SWIG_arg;
11081
11082 if(0) SWIG_fail;
11083
11084 fail:
11085 {
11086 int i;
11087
11088 if ( arg1 )
11089 {
11090 for ( i = 0; i < ii1; i++ )
11091 LUA_FREE_ARRAY( arg1[i] );
11092 LUA_FREE_ARRAY( arg1 );
11093 }
11094 }
11095 {
11096 mypltr_funcstr[0] = '\0';
11097 }
11098 {
11099 int i;
11100
11101 LUA_FREE_ARRAY( cgrid113.xg );
11102 LUA_FREE_ARRAY( cgrid113.yg );
11103
11104 if ( cgrid213.xg )
11105 {
11106 for ( i = 0; i < Xlen; i++ )
11107 LUA_FREE_ARRAY( cgrid213.xg[i] );
11108 LUA_FREE_ARRAY( cgrid213.xg );
11109 }
11110 if ( cgrid213.yg )
11111 {
11112 for ( i = 0; i < Xlen; i++ )
11113 LUA_FREE_ARRAY( cgrid213.yg[i] );
11114 LUA_FREE_ARRAY( cgrid213.yg );
11115 }
11116 }
11117 lua_error(L);
11118 return SWIG_arg;
11119 }
11120
11121
11122 static int _wrap_plClearOpts(lua_State* L) {
11123 int SWIG_arg = 0;
11124
11125 SWIG_check_num_args("plClearOpts",0,0)
11126 plClearOpts();
11127
11128 return SWIG_arg;
11129
11130 if(0) SWIG_fail;
11131
11132 fail:
11133 lua_error(L);
11134 return SWIG_arg;
11135 }
11136
11137
11138 static int _wrap_plResetOpts(lua_State* L) {
11139 int SWIG_arg = 0;
11140
11141 SWIG_check_num_args("plResetOpts",0,0)
11142 plResetOpts();
11143
11144 return SWIG_arg;
11145
11146 if(0) SWIG_fail;
11147
11148 fail:
11149 lua_error(L);
11150 return SWIG_arg;
11151 }
11152
11153
11154 static int _wrap_plSetUsage(lua_State* L) {
11155 int SWIG_arg = 0;
11156 char *arg1 = (char *) 0 ;
11157 char *arg2 = (char *) 0 ;
11158
11159 SWIG_check_num_args("plSetUsage",2,2)
11160 if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("plSetUsage",1,"char const *");
11161 if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("plSetUsage",2,"char const *");
11162 arg1 = (char *)lua_tostring(L, 1);
11163 arg2 = (char *)lua_tostring(L, 2);
11164 plSetUsage((char const *)arg1,(char const *)arg2);
11165
11166 return SWIG_arg;
11167
11168 if(0) SWIG_fail;
11169
11170 fail:
11171 lua_error(L);
11172 return SWIG_arg;
11173 }
11174
11175
11176 static int _wrap_plOptUsage(lua_State* L) {
11177 int SWIG_arg = 0;
11178
11179 SWIG_check_num_args("plOptUsage",0,0)
11180 plOptUsage();
11181
11182 return SWIG_arg;
11183
11184 if(0) SWIG_fail;
11185
11186 fail:
11187 lua_error(L);
11188 return SWIG_arg;
11189 }
11190
11191
11192 static int _wrap_MinMax2dGrid(lua_State* L) {
11193 int SWIG_arg = 0;
11194 PLFLT **arg1 = (PLFLT **) 0 ;
11195 PLINT arg2 ;
11196 PLINT arg3 ;
11197 PLFLT *arg4 = (PLFLT *) 0 ;
11198 PLFLT *arg5 = (PLFLT *) 0 ;
11199 int ii1 ;
11200 PLFLT temp4 ;
11201 PLFLT temp5 ;
11202
11203 arg4 = &temp4;
11204 arg5 = &temp5;
11205 SWIG_check_num_args("plMinMax2dGrid",1,1)
11206 {
11207 int jj;
11208
11209 arg1 = read_double_Matrix( L, 1, &ii1, &jj );
11210 if ( !arg1 )
11211 SWIG_fail;
11212 Xlen = arg2 = ii1;
11213 Ylen = arg3 = jj;
11214 }
11215 plMinMax2dGrid((double const **)arg1,arg2,arg3,arg4,arg5);
11216
11217 lua_pushnumber(L, (lua_Number) *arg4); SWIG_arg++;
11218 lua_pushnumber(L, (lua_Number) *arg5); SWIG_arg++;
11219 {
11220 int i;
11221
11222 if ( arg1 )
11223 {
11224 for ( i = 0; i < ii1; i++ )
11225 LUA_FREE_ARRAY( arg1[i] );
11226 LUA_FREE_ARRAY( arg1 );
11227 }
11228 }
11229 return SWIG_arg;
11230
11231 if(0) SWIG_fail;
11232
11233 fail:
11234 {
11235 int i;
11236
11237 if ( arg1 )
11238 {
11239 for ( i = 0; i < ii1; i++ )
11240 LUA_FREE_ARRAY( arg1[i] );
11241 LUA_FREE_ARRAY( arg1 );
11242 }
11243 }
11244 lua_error(L);
11245 return SWIG_arg;
11246 }
11247
11248
11249 static int _wrap_plGetCursor(lua_State* L) {
11250 int SWIG_arg = 0;
11251 PLGraphicsIn *arg1 = (PLGraphicsIn *) 0 ;
11252 PLINT result;
11253
11254 SWIG_check_num_args("plGetCursor",1,1)
11255 if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("plGetCursor",1,"PLGraphicsIn *");
11256
11257 if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_PLGraphicsIn,0))){
11258 SWIG_fail_ptr("plGetCursor",1,SWIGTYPE_p_PLGraphicsIn);
11259 }
11260
11261 result = (PLINT)plGetCursor(arg1);
11262 lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
11263 return SWIG_arg;
11264
11265 if(0) SWIG_fail;
11266
11267 fail:
11268 lua_error(L);
11269 return SWIG_arg;
11270 }
11271
11272
11273 static int _wrap_warn(lua_State* L) {
11274 int SWIG_arg = 0;
11275 char *arg1 = (char *) 0 ;
11276
11277 SWIG_check_num_args("plwarn",1,1)
11278 if(!lua_isstring(L,1)) SWIG_fail_arg("plwarn",1,"char const *");
11279 {
11280 arg1 = (char *) lua_tostring( L, 1 );
11281 }
11282 plwarn((char const *)arg1);
11283
11284 return SWIG_arg;
11285
11286 if(0) SWIG_fail;
11287
11288 fail:
11289 lua_error(L);
11290 return SWIG_arg;
11291 }
11292
11293
11294 static int _wrap_abort(lua_State* L) {
11295 int SWIG_arg = 0;
11296 char *arg1 = (char *) 0 ;
11297
11298 SWIG_check_num_args("plabort",1,1)
11299 if(!lua_isstring(L,1)) SWIG_fail_arg("plabort",1,"char const *");
11300 {
11301 arg1 = (char *) lua_tostring( L, 1 );
11302 }
11303 plabort((char const *)arg1);
11304
11305 return SWIG_arg;
11306
11307 if(0) SWIG_fail;
11308
11309 fail:
11310 lua_error(L);
11311 return SWIG_arg;
11312 }
11313
11314
11315 #ifdef __cplusplus
11316 }
11317 #endif
11318
11319 static const struct luaL_Reg swig_commands[] = {
11320 { "setcontlabelformat", _wrap_setcontlabelformat},
11321 { "setcontlabelparam", _wrap_setcontlabelparam},
11322 { "adv", _wrap_adv},
11323 { "arc", _wrap_arc},
11324 { "axes", _wrap_axes},
11325 { "bin", _wrap_bin},
11326 { "btime", _wrap_btime},
11327 { "bop", _wrap_bop},
11328 { "box", _wrap_box},
11329 { "box3", _wrap_box3},
11330 { "calc_world", _wrap_calc_world},
11331 { "clear", _wrap_clear},
11332 { "col0", _wrap_col0},
11333 { "col1", _wrap_col1},
11334 { "configtime", _wrap_configtime},
11335 { "cont", _wrap_cont},
11336 { "ctime", _wrap_ctime},
11337 { "cpstrm", _wrap_cpstrm},
11338 { "plend", _wrap_plend},
11339 { "plend1", _wrap_plend1},
11340 { "env", _wrap_env},
11341 { "env0", _wrap_env0},
11342 { "eop", _wrap_eop},
11343 { "errx", _wrap_errx},
11344 { "erry", _wrap_erry},
11345 { "famadv", _wrap_famadv},
11346 { "fill", _wrap_fill},
11347 { "fill3", _wrap_fill3},
11348 { "gradient", _wrap_gradient},
11349 { "flush", _wrap_flush},
11350 { "font", _wrap_font},
11351 { "fontld", _wrap_fontld},
11352 { "gchr", _wrap_gchr},
11353 { "gcol0", _wrap_gcol0},
11354 { "gcol0a", _wrap_gcol0a},
11355 { "gcolbg", _wrap_gcolbg},
11356 { "gcolbga", _wrap_gcolbga},
11357 { "gcompression", _wrap_gcompression},
11358 { "gdev", _wrap_gdev},
11359 { "gdidev", _wrap_gdidev},
11360 { "gdiori", _wrap_gdiori},
11361 { "gdiplt", _wrap_gdiplt},
11362 { "gfam", _wrap_gfam},
11363 { "gfci", _wrap_gfci},
11364 { "gfnam", _wrap_gfnam},
11365 { "gfont", _wrap_gfont},
11366 { "glevel", _wrap_glevel},
11367 { "gpage", _wrap_gpage},
11368 { "gra", _wrap_gra},
11369 { "griddata", _wrap_griddata},
11370 { "gspa", _wrap_gspa},
11371 { "gstrm", _wrap_gstrm},
11372 { "gver", _wrap_gver},
11373 { "gvpd", _wrap_gvpd},
11374 { "gvpw", _wrap_gvpw},
11375 { "gxax", _wrap_gxax},
11376 { "gyax", _wrap_gyax},
11377 { "gzax", _wrap_gzax},
11378 { "hist", _wrap_hist},
11379 { "hlsrgb", _wrap_hlsrgb},
11380 { "init", _wrap_init},
11381 { "join", _wrap_join},
11382 { "lab", _wrap_lab},
11383 { "legend", _wrap_legend},
11384 { "colorbar", _wrap_colorbar},
11385 { "lightsource", _wrap_lightsource},
11386 { "line", _wrap_line},
11387 { "line3", _wrap_line3},
11388 { "lsty", _wrap_lsty},
11389 { "mesh", _wrap_mesh},
11390 { "meshc", _wrap_meshc},
11391 { "mkstrm", _wrap_mkstrm},
11392 { "mtex", _wrap_mtex},
11393 { "mtex3", _wrap_mtex3},
11394 { "plot3d", _wrap_plot3d},
11395 { "plot3dc", _wrap_plot3dc},
11396 { "plot3dcl", _wrap_plot3dcl},
11397 { "surf3d", _wrap_surf3d},
11398 { "surf3dl", _wrap_surf3dl},
11399 { "parseopts", _wrap_parseopts},
11400 { "pat", _wrap_pat},
11401 { "path", _wrap_path},
11402 { "poin", _wrap_poin},
11403 { "poin3", _wrap_poin3},
11404 { "poly3", _wrap_poly3},
11405 { "prec", _wrap_prec},
11406 { "psty", _wrap_psty},
11407 { "ptex", _wrap_ptex},
11408 { "ptex3", _wrap_ptex3},
11409 { "randd", _wrap_randd},
11410 { "replot", _wrap_replot},
11411 { "rgbhls", _wrap_rgbhls},
11412 { "schr", _wrap_schr},
11413 { "scmap0", _wrap_scmap0},
11414 { "scmap0a", _wrap_scmap0a},
11415 { "scmap0n", _wrap_scmap0n},
11416 { "scmap1", _wrap_scmap1},
11417 { "scmap1a", _wrap_scmap1a},
11418 { "scmap1l", _wrap_scmap1l},
11419 { "scmap1la", _wrap_scmap1la},
11420 { "scmap1n", _wrap_scmap1n},
11421 { "scmap1_range", _wrap_scmap1_range},
11422 { "gcmap1_range", _wrap_gcmap1_range},
11423 { "scol0", _wrap_scol0},
11424 { "scol0a", _wrap_scol0a},
11425 { "scolbg", _wrap_scolbg},
11426 { "scolbga", _wrap_scolbga},
11427 { "scolor", _wrap_scolor},
11428 { "scompression", _wrap_scompression},
11429 { "sdev", _wrap_sdev},
11430 { "sdidev", _wrap_sdidev},
11431 { "sdimap", _wrap_sdimap},
11432 { "sdiori", _wrap_sdiori},
11433 { "sdiplt", _wrap_sdiplt},
11434 { "sdiplz", _wrap_sdiplz},
11435 { "seed", _wrap_seed},
11436 { "sesc", _wrap_sesc},
11437 { "setopt", _wrap_setopt},
11438 { "sfam", _wrap_sfam},
11439 { "sfci", _wrap_sfci},
11440 { "sfnam", _wrap_sfnam},
11441 { "sfont", _wrap_sfont},
11442 { "shades", _wrap_shades},
11443 { "shade", _wrap_shade},
11444 { "slabelfunc", _wrap_slabelfunc},
11445 { "smaj", _wrap_smaj},
11446 { "smin", _wrap_smin},
11447 { "sori", _wrap_sori},
11448 { "spage", _wrap_spage},
11449 { "spal0", _wrap_spal0},
11450 { "spal1", _wrap_spal1},
11451 { "spause", _wrap_spause},
11452 { "sstrm", _wrap_sstrm},
11453 { "ssub", _wrap_ssub},
11454 { "ssym", _wrap_ssym},
11455 { "star", _wrap_star},
11456 { "start", _wrap_start},
11457 { "stransform", _wrap_stransform},
11458 { "string", _wrap_string},
11459 { "string3", _wrap_string3},
11460 { "stripa", _wrap_stripa},
11461 { "stripc", _wrap_stripc},
11462 { "stripd", _wrap_stripd},
11463 { "styl", _wrap_styl},
11464 { "svect", _wrap_svect},
11465 { "svpa", _wrap_svpa},
11466 { "sxax", _wrap_sxax},
11467 { "syax", _wrap_syax},
11468 { "sym", _wrap_sym},
11469 { "szax", _wrap_szax},
11470 { "text", _wrap_text},
11471 { "timefmt", _wrap_timefmt},
11472 { "vasp", _wrap_vasp},
11473 { "vect", _wrap_vect},
11474 { "vpas", _wrap_vpas},
11475 { "vpor", _wrap_vpor},
11476 { "vsta", _wrap_vsta},
11477 { "w3d", _wrap_w3d},
11478 { "width", _wrap_width},
11479 { "wind", _wrap_wind},
11480 { "xormod", _wrap_xormod},
11481 { "map", _wrap_map},
11482 { "meridians", _wrap_meridians},
11483 { "image", _wrap_image},
11484 { "imagefr", _wrap_imagefr},
11485 { "plClearOpts", _wrap_plClearOpts},
11486 { "plResetOpts", _wrap_plResetOpts},
11487 { "plSetUsage", _wrap_plSetUsage},
11488 { "plOptUsage", _wrap_plOptUsage},
11489 { "MinMax2dGrid", _wrap_MinMax2dGrid},
11490 { "plGetCursor", _wrap_plGetCursor},
11491 { "warn", _wrap_warn},
11492 { "abort", _wrap_abort},
11493 {0,0}
11494 };
11495
11496 static swig_lua_var_info swig_variables[] = {
11497 {0,0,0}
11498 };
11499
11500 static swig_lua_const_info swig_constants[] = {
11501 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_RGB", 1)},
11502 {SWIG_LUA_CONSTTAB_INT("PLESC_ALLOC_NCOL", 2)},
11503 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_LPB", 3)},
11504 {SWIG_LUA_CONSTTAB_INT("PLESC_EXPOSE", 4)},
11505 {SWIG_LUA_CONSTTAB_INT("PLESC_RESIZE", 5)},
11506 {SWIG_LUA_CONSTTAB_INT("PLESC_REDRAW", 6)},
11507 {SWIG_LUA_CONSTTAB_INT("PLESC_TEXT", 7)},
11508 {SWIG_LUA_CONSTTAB_INT("PLESC_GRAPH", 8)},
11509 {SWIG_LUA_CONSTTAB_INT("PLESC_FILL", 9)},
11510 {SWIG_LUA_CONSTTAB_INT("PLESC_DI", 10)},
11511 {SWIG_LUA_CONSTTAB_INT("PLESC_FLUSH", 11)},
11512 {SWIG_LUA_CONSTTAB_INT("PLESC_EH", 12)},
11513 {SWIG_LUA_CONSTTAB_INT("PLESC_GETC", 13)},
11514 {SWIG_LUA_CONSTTAB_INT("PLESC_SWIN", 14)},
11515 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING", 15)},
11516 {SWIG_LUA_CONSTTAB_INT("PLESC_XORMOD", 16)},
11517 {SWIG_LUA_CONSTTAB_INT("PLESC_SET_COMPRESSION", 17)},
11518 {SWIG_LUA_CONSTTAB_INT("PLESC_CLEAR", 18)},
11519 {SWIG_LUA_CONSTTAB_INT("PLESC_DASH", 19)},
11520 {SWIG_LUA_CONSTTAB_INT("PLESC_HAS_TEXT", 20)},
11521 {SWIG_LUA_CONSTTAB_INT("PLESC_IMAGE", 21)},
11522 {SWIG_LUA_CONSTTAB_INT("PLESC_IMAGEOPS", 22)},
11523 {SWIG_LUA_CONSTTAB_INT("PLESC_PL2DEVCOL", 23)},
11524 {SWIG_LUA_CONSTTAB_INT("PLESC_DEV2PLCOL", 24)},
11525 {SWIG_LUA_CONSTTAB_INT("PLESC_SETBGFG", 25)},
11526 {SWIG_LUA_CONSTTAB_INT("PLESC_DEVINIT", 26)},
11527 {SWIG_LUA_CONSTTAB_INT("PLESC_GETBACKEND", 27)},
11528 {SWIG_LUA_CONSTTAB_INT("PLESC_BEGIN_TEXT", 28)},
11529 {SWIG_LUA_CONSTTAB_INT("PLESC_TEXT_CHAR", 29)},
11530 {SWIG_LUA_CONSTTAB_INT("PLESC_CONTROL_CHAR", 30)},
11531 {SWIG_LUA_CONSTTAB_INT("PLESC_END_TEXT", 31)},
11532 {SWIG_LUA_CONSTTAB_INT("PLESC_START_RASTERIZE", 32)},
11533 {SWIG_LUA_CONSTTAB_INT("PLESC_END_RASTERIZE", 33)},
11534 {SWIG_LUA_CONSTTAB_INT("PLESC_ARC", 34)},
11535 {SWIG_LUA_CONSTTAB_INT("PLESC_GRADIENT", 35)},
11536 {SWIG_LUA_CONSTTAB_INT("PLESC_MODESET", 36)},
11537 {SWIG_LUA_CONSTTAB_INT("PLESC_MODEGET", 37)},
11538 {SWIG_LUA_CONSTTAB_INT("PLTEXT_FONTCHANGE", 0)},
11539 {SWIG_LUA_CONSTTAB_INT("PLTEXT_SUPERSCRIPT", 1)},
11540 {SWIG_LUA_CONSTTAB_INT("PLTEXT_SUBSCRIPT", 2)},
11541 {SWIG_LUA_CONSTTAB_INT("PLTEXT_BACKCHAR", 3)},
11542 {SWIG_LUA_CONSTTAB_INT("PLTEXT_OVERLINE", 4)},
11543 {SWIG_LUA_CONSTTAB_INT("PLTEXT_UNDERLINE", 5)},
11544 {SWIG_LUA_CONSTTAB_INT("ZEROW2B", 1)},
11545 {SWIG_LUA_CONSTTAB_INT("ZEROW2D", 2)},
11546 {SWIG_LUA_CONSTTAB_INT("ONEW2B", 3)},
11547 {SWIG_LUA_CONSTTAB_INT("ONEW2D", 4)},
11548 {SWIG_LUA_CONSTTAB_INT("PLSWIN_DEVICE", 1)},
11549 {SWIG_LUA_CONSTTAB_INT("PLSWIN_WORLD", 2)},
11550 {SWIG_LUA_CONSTTAB_INT("PL_X_AXIS", 1)},
11551 {SWIG_LUA_CONSTTAB_INT("PL_Y_AXIS", 2)},
11552 {SWIG_LUA_CONSTTAB_INT("PL_Z_AXIS", 3)},
11553 {SWIG_LUA_CONSTTAB_INT("PL_OPT_ENABLED", 0x0001)},
11554 {SWIG_LUA_CONSTTAB_INT("PL_OPT_ARG", 0x0002)},
11555 {SWIG_LUA_CONSTTAB_INT("PL_OPT_NODELETE", 0x0004)},
11556 {SWIG_LUA_CONSTTAB_INT("PL_OPT_INVISIBLE", 0x0008)},
11557 {SWIG_LUA_CONSTTAB_INT("PL_OPT_DISABLED", 0x0010)},
11558 {SWIG_LUA_CONSTTAB_INT("PL_OPT_FUNC", 0x0100)},
11559 {SWIG_LUA_CONSTTAB_INT("PL_OPT_BOOL", 0x0200)},
11560 {SWIG_LUA_CONSTTAB_INT("PL_OPT_INT", 0x0400)},
11561 {SWIG_LUA_CONSTTAB_INT("PL_OPT_FLOAT", 0x0800)},
11562 {SWIG_LUA_CONSTTAB_INT("PL_OPT_STRING", 0x1000)},
11563 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_PARTIAL", 0x0000)},
11564 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_FULL", 0x0001)},
11565 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_QUIET", 0x0002)},
11566 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NODELETE", 0x0004)},
11567 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_SHOWALL", 0x0008)},
11568 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_OVERRIDE", 0x0010)},
11569 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NOPROGRAM", 0x0020)},
11570 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_NODASH", 0x0040)},
11571 {SWIG_LUA_CONSTTAB_INT("PL_PARSE_SKIP", 0x0080)},
11572 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MARK", 0x80000000)},
11573 {SWIG_LUA_CONSTTAB_INT("PL_FCI_IMPOSSIBLE", 0x00000000)},
11574 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXDIGIT_MASK", 0xf)},
11575 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXPOWER_MASK", 0x7)},
11576 {SWIG_LUA_CONSTTAB_INT("PL_FCI_HEXPOWER_IMPOSSIBLE", 0xf)},
11577 {SWIG_LUA_CONSTTAB_INT("PL_FCI_FAMILY", 0x0)},
11578 {SWIG_LUA_CONSTTAB_INT("PL_FCI_STYLE", 0x1)},
11579 {SWIG_LUA_CONSTTAB_INT("PL_FCI_WEIGHT", 0x2)},
11580 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SANS", 0x0)},
11581 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SERIF", 0x1)},
11582 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MONO", 0x2)},
11583 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SCRIPT", 0x3)},
11584 {SWIG_LUA_CONSTTAB_INT("PL_FCI_SYMBOL", 0x4)},
11585 {SWIG_LUA_CONSTTAB_INT("PL_FCI_UPRIGHT", 0x0)},
11586 {SWIG_LUA_CONSTTAB_INT("PL_FCI_ITALIC", 0x1)},
11587 {SWIG_LUA_CONSTTAB_INT("PL_FCI_OBLIQUE", 0x2)},
11588 {SWIG_LUA_CONSTTAB_INT("PL_FCI_MEDIUM", 0x0)},
11589 {SWIG_LUA_CONSTTAB_INT("PL_FCI_BOLD", 0x1)},
11590 {SWIG_LUA_CONSTTAB_INT("PL_MAXKEY", 16)},
11591 {SWIG_LUA_CONSTTAB_INT("PL_MAXWINDOWS", 64)},
11592 {SWIG_LUA_CONSTTAB_INT("PL_NOTSET", (-42))},
11593 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_ENABLE", 1)},
11594 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_DISABLE", 2)},
11595 {SWIG_LUA_CONSTTAB_INT("PLESC_DOUBLEBUFFERING_QUERY", 3)},
11596 {SWIG_LUA_CONSTTAB_INT("PL_BIN_DEFAULT", 0x0)},
11597 {SWIG_LUA_CONSTTAB_INT("PL_BIN_CENTRED", 0x1)},
11598 {SWIG_LUA_CONSTTAB_INT("PL_BIN_NOEXPAND", 0x2)},
11599 {SWIG_LUA_CONSTTAB_INT("PL_BIN_NOEMPTY", 0x4)},
11600 {SWIG_LUA_CONSTTAB_INT("GRID_CSA", 1)},
11601 {SWIG_LUA_CONSTTAB_INT("GRID_DTLI", 2)},
11602 {SWIG_LUA_CONSTTAB_INT("GRID_NNI", 3)},
11603 {SWIG_LUA_CONSTTAB_INT("GRID_NNIDW", 4)},
11604 {SWIG_LUA_CONSTTAB_INT("GRID_NNLI", 5)},
11605 {SWIG_LUA_CONSTTAB_INT("GRID_NNAIDW", 6)},
11606 {SWIG_LUA_CONSTTAB_INT("PL_HIST_DEFAULT", 0x00)},
11607 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOSCALING", 0x01)},
11608 {SWIG_LUA_CONSTTAB_INT("PL_HIST_IGNORE_OUTLIERS", 0x02)},
11609 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOEXPAND", 0x08)},
11610 {SWIG_LUA_CONSTTAB_INT("PL_HIST_NOEMPTY", 0x10)},
11611 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_LEFT", 0x1)},
11612 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_RIGHT", 0x2)},
11613 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_TOP", 0x4)},
11614 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_BOTTOM", 0x8)},
11615 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_INSIDE", 0x10)},
11616 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_OUTSIDE", 0x20)},
11617 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_VIEWPORT", 0x40)},
11618 {SWIG_LUA_CONSTTAB_INT("PL_POSITION_SUBPAGE", 0x80)},
11619 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_NONE", 0x1)},
11620 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_COLOR_BOX", 0x2)},
11621 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_LINE", 0x4)},
11622 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_SYMBOL", 0x8)},
11623 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_TEXT_LEFT", 0x10)},
11624 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_BACKGROUND", 0x20)},
11625 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_BOUNDING_BOX", 0x40)},
11626 {SWIG_LUA_CONSTTAB_INT("PL_LEGEND_ROW_MAJOR", 0x80)},
11627 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_LEFT", 0x1)},
11628 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_RIGHT", 0x2)},
11629 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_TOP", 0x4)},
11630 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_LABEL_BOTTOM", 0x8)},
11631 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_IMAGE", 0x10)},
11632 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_SHADE", 0x20)},
11633 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_GRADIENT", 0x40)},
11634 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_NONE", 0x80)},
11635 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_LOW", 0x100)},
11636 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_CAP_HIGH", 0x200)},
11637 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_SHADE_LABEL", 0x400)},
11638 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_RIGHT", 0x800)},
11639 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_TOP", 0x1000)},
11640 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_LEFT", 0x2000)},
11641 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_ORIENT_BOTTOM", 0x4000)},
11642 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_BACKGROUND", 0x8000)},
11643 {SWIG_LUA_CONSTTAB_INT("PL_COLORBAR_BOUNDING_BOX", 0x10000)},
11644 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_UNKNOWN", 0x0)},
11645 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_DEFAULT", 0x1)},
11646 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_REPLACE", 0x2)},
11647 {SWIG_LUA_CONSTTAB_INT("PL_DRAWMODE_XOR", 0x4)},
11648 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEX", 0x001)},
11649 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEY", 0x002)},
11650 {SWIG_LUA_CONSTTAB_INT("DRAW_LINEXY", 0x003)},
11651 {SWIG_LUA_CONSTTAB_INT("MAG_COLOR", 0x004)},
11652 {SWIG_LUA_CONSTTAB_INT("BASE_CONT", 0x008)},
11653 {SWIG_LUA_CONSTTAB_INT("TOP_CONT", 0x010)},
11654 {SWIG_LUA_CONSTTAB_INT("SURF_CONT", 0x020)},
11655 {SWIG_LUA_CONSTTAB_INT("DRAW_SIDES", 0x040)},
11656 {SWIG_LUA_CONSTTAB_INT("FACETED", 0x080)},
11657 {SWIG_LUA_CONSTTAB_INT("MESH", 0x100)},
11658 {0,0,0,0,0,0}
11659 };
11660
11661 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
11662
11663 static swig_type_info _swigt__p_PLGraphicsIn = {"_p_PLGraphicsIn", "PLGraphicsIn *", 0, 0, (void*)&_wrap_class_PLGraphicsIn, 0};
11664 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
11665 static swig_type_info _swigt__p_double = {"_p_double", "double *|PLFLT *", 0, 0, (void*)0, 0};
11666 static swig_type_info _swigt__p_f_double_double__int = {"_p_f_double_double__int", "defined_func|int (*)(double,double)", 0, 0, (void*)0, 0};
11667 static 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};
11668 static 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};
11669 static 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};
11670 static 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};
11671 static swig_type_info _swigt__p_int = {"_p_int", "PLBOOL *|int *|PLINT *", 0, 0, (void*)0, 0};
11672 static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
11673 static swig_type_info _swigt__p_p_double = {"_p_p_double", "PLFLT **|double **", 0, 0, (void*)0, 0};
11674 static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|PLUNICODE *", 0, 0, (void*)0, 0};
11675
11676 static swig_type_info *swig_type_initial[] = {
11677 &_swigt__p_PLGraphicsIn,
11678 &_swigt__p_char,
11679 &_swigt__p_double,
11680 &_swigt__p_f_double_double__int,
11681 &_swigt__p_f_double_double_p_double_p_double_p_void__void,
11682 &_swigt__p_f_int_double_p_char_int_p_void__void,
11683 &_swigt__p_f_int_p_double_p_double__void,
11684 &_swigt__p_f_int_p_q_const__double_p_q_const__double__void,
11685 &_swigt__p_int,
11686 &_swigt__p_p_char,
11687 &_swigt__p_p_double,
11688 &_swigt__p_unsigned_int,
11689 };
11690
11691 static swig_cast_info _swigc__p_PLGraphicsIn[] = { {&_swigt__p_PLGraphicsIn, 0, 0, 0},{0, 0, 0, 0}};
11692 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
11693 static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
11694 static swig_cast_info _swigc__p_f_double_double__int[] = { {&_swigt__p_f_double_double__int, 0, 0, 0},{0, 0, 0, 0}};
11695 static swig_cast_info _swigc__p_f_double_double_p_double_p_double_p_void__void[] = { {&_swigt__p_f_double_double_p_double_p_double_p_void__void, 0, 0, 0},{0, 0, 0, 0}};
11696 static swig_cast_info _swigc__p_f_int_double_p_char_int_p_void__void[] = { {&_swigt__p_f_int_double_p_char_int_p_void__void, 0, 0, 0},{0, 0, 0, 0}};
11697 static swig_cast_info _swigc__p_f_int_p_double_p_double__void[] = { {&_swigt__p_f_int_p_double_p_double__void, 0, 0, 0},{0, 0, 0, 0}};
11698 static swig_cast_info _swigc__p_f_int_p_q_const__double_p_q_const__double__void[] = { {&_swigt__p_f_int_p_q_const__double_p_q_const__double__void, 0, 0, 0},{0, 0, 0, 0}};
11699 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
11700 static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
11701 static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
11702 static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
11703
11704 static swig_cast_info *swig_cast_initial[] = {
11705 _swigc__p_PLGraphicsIn,
11706 _swigc__p_char,
11707 _swigc__p_double,
11708 _swigc__p_f_double_double__int,
11709 _swigc__p_f_double_double_p_double_p_double_p_void__void,
11710 _swigc__p_f_int_double_p_char_int_p_void__void,
11711 _swigc__p_f_int_p_double_p_double__void,
11712 _swigc__p_f_int_p_q_const__double_p_q_const__double__void,
11713 _swigc__p_int,
11714 _swigc__p_p_char,
11715 _swigc__p_p_double,
11716 _swigc__p_unsigned_int,
11717 };
11718
11719
11720 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
11721
11722 /* -----------------------------------------------------------------------------
11723 * Type initialization:
11724 * This problem is tough by the requirement that no dynamic
11725 * memory is used. Also, since swig_type_info structures store pointers to
11726 * swig_cast_info structures and swig_cast_info structures store pointers back
11727 * to swig_type_info structures, we need some lookup code at initialization.
11728 * The idea is that swig generates all the structures that are needed.
11729 * The runtime then collects these partially filled structures.
11730 * The SWIG_InitializeModule function takes these initial arrays out of
11731 * swig_module, and does all the lookup, filling in the swig_module.types
11732 * array with the correct data and linking the correct swig_cast_info
11733 * structures together.
11734 *
11735 * The generated swig_type_info structures are assigned staticly to an initial
11736 * array. We just loop through that array, and handle each type individually.
11737 * First we lookup if this type has been already loaded, and if so, use the
11738 * loaded structure instead of the generated one. Then we have to fill in the
11739 * cast linked list. The cast data is initially stored in something like a
11740 * two-dimensional array. Each row corresponds to a type (there are the same
11741 * number of rows as there are in the swig_type_initial array). Each entry in
11742 * a column is one of the swig_cast_info structures for that type.
11743 * The cast_initial array is actually an array of arrays, because each row has
11744 * a variable number of columns. So to actually build the cast linked list,
11745 * we find the array of casts associated with the type, and loop through it
11746 * adding the casts to the list. The one last trick we need to do is making
11747 * sure the type pointer in the swig_cast_info struct is correct.
11748 *
11749 * First off, we lookup the cast->type name to see if it is already loaded.
11750 * There are three cases to handle:
11751 * 1) If the cast->type has already been loaded AND the type we are adding
11752 * casting info to has not been loaded (it is in this module), THEN we
11753 * replace the cast->type pointer with the type pointer that has already
11754 * been loaded.
11755 * 2) If BOTH types (the one we are adding casting info to, and the
11756 * cast->type) are loaded, THEN the cast info has already been loaded by
11757 * the previous module so we just ignore it.
11758 * 3) Finally, if cast->type has not already been loaded, then we add that
11759 * swig_cast_info to the linked list (because the cast->type) pointer will
11760 * be correct.
11761 * ----------------------------------------------------------------------------- */
11762
11763 #ifdef __cplusplus
11764 extern "C" {
11765 #if 0
11766 } /* c-mode */
11767 #endif
11768 #endif
11769
11770 #if 0
11771 #define SWIGRUNTIME_DEBUG
11772 #endif
11773
11774
11775 SWIGRUNTIME void
11776 SWIG_InitializeModule(void *clientdata) {
11777 size_t i;
11778 swig_module_info *module_head, *iter;
11779 int found, init;
11780
11781 clientdata = clientdata;
11782
11783 /* check to see if the circular list has been setup, if not, set it up */
11784 if (swig_module.next==0) {
11785 /* Initialize the swig_module */
11786 swig_module.type_initial = swig_type_initial;
11787 swig_module.cast_initial = swig_cast_initial;
11788 swig_module.next = &swig_module;
11789 init = 1;
11790 } else {
11791 init = 0;
11792 }
11793
11794 /* Try and load any already created modules */
11795 module_head = SWIG_GetModule(clientdata);
11796 if (!module_head) {
11797 /* This is the first module loaded for this interpreter */
11798 /* so set the swig module into the interpreter */
11799 SWIG_SetModule(clientdata, &swig_module);
11800 module_head = &swig_module;
11801 } else {
11802 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
11803 found=0;
11804 iter=module_head;
11805 do {
11806 if (iter==&swig_module) {
11807 found=1;
11808 break;
11809 }
11810 iter=iter->next;
11811 } while (iter!= module_head);
11812
11813 /* if the is found in the list, then all is done and we may leave */
11814 if (found) return;
11815 /* otherwise we must add out module into the list */
11816 swig_module.next = module_head->next;
11817 module_head->next = &swig_module;
11818 }
11819
11820 /* When multiple interpeters are used, a module could have already been initialized in
11821 a different interpreter, but not yet have a pointer in this interpreter.
11822 In this case, we do not want to continue adding types... everything should be
11823 set up already */
11824 if (init == 0) return;
11825
11826 /* Now work on filling in swig_module.types */
11827 #ifdef SWIGRUNTIME_DEBUG
11828 printf("SWIG_InitializeModule: size %d\n", swig_module.size);
11829 #endif
11830 for (i = 0; i < swig_module.size; ++i) {
11831 swig_type_info *type = 0;
11832 swig_type_info *ret;
11833 swig_cast_info *cast;
11834
11835 #ifdef SWIGRUNTIME_DEBUG
11836 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
11837 #endif
11838
11839 /* if there is another module already loaded */
11840 if (swig_module.next != &swig_module) {
11841 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
11842 }
11843 if (type) {
11844 /* Overwrite clientdata field */
11845 #ifdef SWIGRUNTIME_DEBUG
11846 printf("SWIG_InitializeModule: found type %s\n", type->name);
11847 #endif
11848 if (swig_module.type_initial[i]->clientdata) {
11849 type->clientdata = swig_module.type_initial[i]->clientdata;
11850 #ifdef SWIGRUNTIME_DEBUG
11851 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
11852 #endif
11853 }
11854 } else {
11855 type = swig_module.type_initial[i];
11856 }
11857
11858 /* Insert casting types */
11859 cast = swig_module.cast_initial[i];
11860 while (cast->type) {
11861
11862 /* Don't need to add information already in the list */
11863 ret = 0;
11864 #ifdef SWIGRUNTIME_DEBUG
11865 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
11866 #endif
11867 if (swig_module.next != &swig_module) {
11868 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
11869 #ifdef SWIGRUNTIME_DEBUG
11870 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
11871 #endif
11872 }
11873 if (ret) {
11874 if (type == swig_module.type_initial[i]) {
11875 #ifdef SWIGRUNTIME_DEBUG
11876 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
11877 #endif
11878 cast->type = ret;
11879 ret = 0;
11880 } else {
11881 /* Check for casting already in the list */
11882 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
11883 #ifdef SWIGRUNTIME_DEBUG
11884 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
11885 #endif
11886 if (!ocast) ret = 0;
11887 }
11888 }
11889
11890 if (!ret) {
11891 #ifdef SWIGRUNTIME_DEBUG
11892 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
11893 #endif
11894 if (type->cast) {
11895 type->cast->prev = cast;
11896 cast->next = type->cast;
11897 }
11898 type->cast = cast;
11899 }
11900 cast++;
11901 }
11902 /* Set entry in modules->types array equal to the type */
11903 swig_module.types[i] = type;
11904 }
11905 swig_module.types[i] = 0;
11906
11907 #ifdef SWIGRUNTIME_DEBUG
11908 printf("**** SWIG_InitializeModule: Cast List ******\n");
11909 for (i = 0; i < swig_module.size; ++i) {
11910 int j = 0;
11911 swig_cast_info *cast = swig_module.cast_initial[i];
11912 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
11913 while (cast->type) {
11914 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
11915 cast++;
11916 ++j;
11917 }
11918 printf("---- Total casts: %d\n",j);
11919 }
11920 printf("**** SWIG_InitializeModule: Cast List ******\n");
11921 #endif
11922 }
11923
11924 /* This function will propagate the clientdata field of type to
11925 * any new swig_type_info structures that have been added into the list
11926 * of equivalent types. It is like calling
11927 * SWIG_TypeClientData(type, clientdata) a second time.
11928 */
11929 SWIGRUNTIME void
11930 SWIG_PropagateClientData(void) {
11931 size_t i;
11932 swig_cast_info *equiv;
11933 static int init_run = 0;
11934
11935 if (init_run) return;
11936 init_run = 1;
11937
11938 for (i = 0; i < swig_module.size; i++) {
11939 if (swig_module.types[i]->clientdata) {
11940 equiv = swig_module.types[i]->cast;
11941 while (equiv) {
11942 if (!equiv->converter) {
11943 if (equiv->type && !equiv->type->clientdata)
11944 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
11945 }
11946 equiv = equiv->next;
11947 }
11948 }
11949 }
11950 }
11951
11952 #ifdef __cplusplus
11953 #if 0
11954 { /* c-mode */
11955 #endif
11956 }
11957 #endif
11958
11959
11960
11961 /* Forward declaration of where the user's %init{} gets inserted */
11962 void SWIG_init_user(lua_State* L );
11963
11964 #ifdef __cplusplus
11965 extern "C" {
11966 #endif
11967 /* this is the initialization function
11968 added at the very end of the code
11969 the function is always called SWIG_init, but an earlier #define will rename it
11970 */
11971 #if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
11972 LUALIB_API int SWIG_init(lua_State* L)
11973 #else
11974 SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
11975 #endif
11976 {
11977 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
11978 int i;
11979 /* start with global table */
11980 lua_pushglobaltable (L);
11981 /* SWIG's internal initalisation */
11982 SWIG_InitializeModule((void*)L);
11983 SWIG_PropagateClientData();
11984 #endif
11985
11986 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
11987 /* add a global fn */
11988 SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
11989 SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_equal);
11990 /* begin the module (its a table with the same name as the module) */
11991 SWIG_Lua_module_begin(L,SWIG_name);
11992 /* add commands/functions */
11993 for (i = 0; swig_commands[i].name; i++){
11994 SWIG_Lua_module_add_function(L,swig_commands[i].name,swig_commands[i].func);
11995 }
11996 /* add variables */
11997 for (i = 0; swig_variables[i].name; i++){
11998 SWIG_Lua_module_add_variable(L,swig_variables[i].name,swig_variables[i].get,swig_variables[i].set);
11999 }
12000 #endif
12001
12002 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
12003 /* set up base class pointers (the hierarchy) */
12004 for (i = 0; swig_types[i]; i++){
12005 if (swig_types[i]->clientdata){
12006 SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata));
12007 }
12008 }
12009 /* additional registration structs & classes in lua */
12010 for (i = 0; swig_types[i]; i++){
12011 if (swig_types[i]->clientdata){
12012 SWIG_Lua_class_register(L,(swig_lua_class*)(swig_types[i]->clientdata));
12013 }
12014 }
12015 #endif
12016
12017 #if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
12018 /* constants */
12019 SWIG_Lua_InstallConstants(L,swig_constants);
12020 #endif
12021
12022 #if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
12023 /* invoke user-specific initialization */
12024 SWIG_init_user(L);
12025 /* end module */
12026 /* Note: We do not clean up the stack here (Lua will do this for us). At this
12027 point, we have the globals table and out module table on the stack. Returning
12028 one value makes the module table the result of the require command. */
12029 return 1;
12030 #else
12031 return 0;
12032 #endif
12033 }
12034
12035 #ifdef __cplusplus
12036 }
12037 #endif
12038
12039
12040 const char* SWIG_LUACODE=
12041 "\n"
12042 " pl = plplotluac";
12043
12044 void SWIG_init_user(lua_State* L)
12045 {
12046 /* exec Lua code if applicable */
12047 SWIG_Lua_dostring(L,SWIG_LUACODE);
12048 }
12049