| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
#line 453 "lib/PDL/PP.pm" |
|
3
|
|
|
|
|
|
|
/* |
|
4
|
|
|
|
|
|
|
* THIS FILE WAS GENERATED BY PDL::PP from plplot.pd! Do not modify! |
|
5
|
|
|
|
|
|
|
*/ |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
#define PDL_FREE_CODE(trans, destroy, comp_free_code, ntpriv_free_code) \ |
|
8
|
|
|
|
|
|
|
if (destroy) { \ |
|
9
|
|
|
|
|
|
|
comp_free_code \ |
|
10
|
|
|
|
|
|
|
} \ |
|
11
|
|
|
|
|
|
|
if ((trans)->dims_redone) { \ |
|
12
|
|
|
|
|
|
|
ntpriv_free_code \ |
|
13
|
|
|
|
|
|
|
} |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
#include "EXTERN.h" |
|
16
|
|
|
|
|
|
|
#include "perl.h" |
|
17
|
|
|
|
|
|
|
#include "XSUB.h" |
|
18
|
|
|
|
|
|
|
#include "pdl.h" |
|
19
|
|
|
|
|
|
|
#include "pdlcore.h" |
|
20
|
|
|
|
|
|
|
#define PDL PDL_Graphics_PLplot |
|
21
|
|
|
|
|
|
|
extern Core* PDL; /* Structure hold core C functions */ |
|
22
|
|
|
|
|
|
|
#line 23 "pp-plscmap1la.c" |
|
23
|
|
|
|
|
|
|
#include |
|
24
|
|
|
|
|
|
|
#include |
|
25
|
|
|
|
|
|
|
#include |
|
26
|
|
|
|
|
|
|
#include |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
#ifndef PDL /* this is needed for PDL pre-2.058 */ |
|
29
|
|
|
|
|
|
|
#define PDL PDL_Graphics_PLplot |
|
30
|
|
|
|
|
|
|
Core* PDL = NULL; PDL_COMMENT("Structure hold core C functions") |
|
31
|
|
|
|
|
|
|
#endif |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
#define PLPTR_DEFINE(t) typedef t *t ## Ptr; typedef t *t ## Ptr__OUT; |
|
34
|
|
|
|
|
|
|
PLPTR_DEFINE(PLcGrid) |
|
35
|
|
|
|
|
|
|
PLPTR_DEFINE(PLcGrid2) |
|
36
|
|
|
|
|
|
|
#define PLPTR_RECEIVE_IN(t, v, v_in) t *v = (t *)v_in; |
|
37
|
|
|
|
|
|
|
#define PLPTR_RECEIVE_SV(v) ((PLPointer) (SvROK(v) ? SvIV((SV*)SvRV(v)) : (IV)NULL)) |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
void pltr_iv_set(IV iv0, IV iv1, IV iv2); |
|
40
|
|
|
|
|
|
|
void pltr_callback_set(SV *sv, char *msg); |
|
41
|
|
|
|
|
|
|
void pltr_callback(PLFLT x, PLFLT y, PLFLT* tx, PLFLT* ty, PLPointer pltr_data); |
|
42
|
|
|
|
|
|
|
void* get_standard_pltrcb(SV* cb); |
|
43
|
|
|
|
|
|
|
void defined_callback_set(SV *sv, char *msg); |
|
44
|
|
|
|
|
|
|
PLINT defined_callback(PLFLT x, PLFLT y); |
|
45
|
|
|
|
|
|
|
void default_magic(pdl *p, size_t pa); |
|
46
|
|
|
|
|
|
|
void mapform_callback_set(SV *sv, char *msg); |
|
47
|
|
|
|
|
|
|
void mapform_callback(PLINT n, PLFLT* x, PLFLT* y); |
|
48
|
|
|
|
|
|
|
void xform_callback_set(SV *sv, char *msg); |
|
49
|
|
|
|
|
|
|
void xform_callback(PLFLT x, PLFLT y, PLFLT *xt, PLFLT *yt, PLPointer data); |
|
50
|
|
|
|
|
|
|
void labelfunc_callback_set(SV *sv, char *msg); |
|
51
|
|
|
|
|
|
|
void labelfunc_callback(PLINT axis, PLFLT value, char *label_text, PLINT length, void *data); |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
#line 1857 "lib/PDL/PP.pm" |
|
54
|
|
|
|
|
|
|
pdl_error pdl_plscmap1la_readdata(pdl_trans *__privtrans) { |
|
55
|
|
|
|
|
|
|
pdl_error PDL_err = {0, NULL, 0}; |
|
56
|
|
|
|
|
|
|
#line 57 "pp-plscmap1la.c" |
|
57
|
1
|
50
|
|
|
|
|
if (!__privtrans->broadcast.incs) return PDL->make_error(PDL_EUSERERROR, "Error in plscmap1la:" "broadcast.incs NULL"); |
|
58
|
|
|
|
|
|
|
/* broadcastloop declarations */ |
|
59
|
|
|
|
|
|
|
int __brcloopval; |
|
60
|
|
|
|
|
|
|
register PDL_Indx __tind0,__tind1; /* counters along dim */ |
|
61
|
1
|
|
|
|
|
|
register PDL_Indx __tnpdls = __privtrans->broadcast.npdls; |
|
62
|
|
|
|
|
|
|
/* dims here are how many steps along those dims */ |
|
63
|
1
|
|
|
|
|
|
register PDL_Indx __tinc0_itype = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,0); |
|
64
|
1
|
|
|
|
|
|
register PDL_Indx __tinc0_isty = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,0); |
|
65
|
1
|
|
|
|
|
|
register PDL_Indx __tinc0_coord1 = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,2,0); |
|
66
|
1
|
|
|
|
|
|
register PDL_Indx __tinc0_coord2 = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,3,0); |
|
67
|
1
|
|
|
|
|
|
register PDL_Indx __tinc0_coord3 = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,4,0); |
|
68
|
1
|
|
|
|
|
|
register PDL_Indx __tinc0_coord4 = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,5,0); |
|
69
|
1
|
|
|
|
|
|
register PDL_Indx __tinc0_rev = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,6,0); |
|
70
|
1
|
|
|
|
|
|
register PDL_Indx __tinc1_itype = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,1); |
|
71
|
1
|
|
|
|
|
|
register PDL_Indx __tinc1_isty = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,1); |
|
72
|
1
|
|
|
|
|
|
register PDL_Indx __tinc1_coord1 = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,2,1); |
|
73
|
1
|
|
|
|
|
|
register PDL_Indx __tinc1_coord2 = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,3,1); |
|
74
|
1
|
|
|
|
|
|
register PDL_Indx __tinc1_coord3 = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,4,1); |
|
75
|
1
|
|
|
|
|
|
register PDL_Indx __tinc1_coord4 = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,5,1); |
|
76
|
1
|
|
|
|
|
|
register PDL_Indx __tinc1_rev = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,6,1); |
|
77
|
|
|
|
|
|
|
#define PDL_BROADCASTLOOP_START_plscmap1la_readdata PDL_BROADCASTLOOP_START( \ |
|
78
|
|
|
|
|
|
|
readdata, \ |
|
79
|
|
|
|
|
|
|
__privtrans->broadcast, \ |
|
80
|
|
|
|
|
|
|
__privtrans->vtable, \ |
|
81
|
|
|
|
|
|
|
itype_datap += __offsp[0]; \ |
|
82
|
|
|
|
|
|
|
isty_datap += __offsp[1]; \ |
|
83
|
|
|
|
|
|
|
coord1_datap += __offsp[2]; \ |
|
84
|
|
|
|
|
|
|
coord2_datap += __offsp[3]; \ |
|
85
|
|
|
|
|
|
|
coord3_datap += __offsp[4]; \ |
|
86
|
|
|
|
|
|
|
coord4_datap += __offsp[5]; \ |
|
87
|
|
|
|
|
|
|
rev_datap += __offsp[6]; \ |
|
88
|
|
|
|
|
|
|
, \ |
|
89
|
|
|
|
|
|
|
( ,itype_datap += __tinc1_itype - __tinc0_itype * __tdims0 \ |
|
90
|
|
|
|
|
|
|
,isty_datap += __tinc1_isty - __tinc0_isty * __tdims0 \ |
|
91
|
|
|
|
|
|
|
,coord1_datap += __tinc1_coord1 - __tinc0_coord1 * __tdims0 \ |
|
92
|
|
|
|
|
|
|
,coord2_datap += __tinc1_coord2 - __tinc0_coord2 * __tdims0 \ |
|
93
|
|
|
|
|
|
|
,coord3_datap += __tinc1_coord3 - __tinc0_coord3 * __tdims0 \ |
|
94
|
|
|
|
|
|
|
,coord4_datap += __tinc1_coord4 - __tinc0_coord4 * __tdims0 \ |
|
95
|
|
|
|
|
|
|
,rev_datap += __tinc1_rev - __tinc0_rev * __tdims0 \ |
|
96
|
|
|
|
|
|
|
), \ |
|
97
|
|
|
|
|
|
|
( ,itype_datap += __tinc0_itype \ |
|
98
|
|
|
|
|
|
|
,isty_datap += __tinc0_isty \ |
|
99
|
|
|
|
|
|
|
,coord1_datap += __tinc0_coord1 \ |
|
100
|
|
|
|
|
|
|
,coord2_datap += __tinc0_coord2 \ |
|
101
|
|
|
|
|
|
|
,coord3_datap += __tinc0_coord3 \ |
|
102
|
|
|
|
|
|
|
,coord4_datap += __tinc0_coord4 \ |
|
103
|
|
|
|
|
|
|
,rev_datap += __tinc0_rev \ |
|
104
|
|
|
|
|
|
|
) \ |
|
105
|
|
|
|
|
|
|
) |
|
106
|
|
|
|
|
|
|
#define PDL_BROADCASTLOOP_END_plscmap1la_readdata PDL_BROADCASTLOOP_END( \ |
|
107
|
|
|
|
|
|
|
__privtrans->broadcast, \ |
|
108
|
|
|
|
|
|
|
itype_datap -= __tinc1_itype * __tdims1 + __offsp[0]; \ |
|
109
|
|
|
|
|
|
|
isty_datap -= __tinc1_isty * __tdims1 + __offsp[1]; \ |
|
110
|
|
|
|
|
|
|
coord1_datap -= __tinc1_coord1 * __tdims1 + __offsp[2]; \ |
|
111
|
|
|
|
|
|
|
coord2_datap -= __tinc1_coord2 * __tdims1 + __offsp[3]; \ |
|
112
|
|
|
|
|
|
|
coord3_datap -= __tinc1_coord3 * __tdims1 + __offsp[4]; \ |
|
113
|
|
|
|
|
|
|
coord4_datap -= __tinc1_coord4 * __tdims1 + __offsp[5]; \ |
|
114
|
|
|
|
|
|
|
rev_datap -= __tinc1_rev * __tdims1 + __offsp[6]; \ |
|
115
|
|
|
|
|
|
|
) |
|
116
|
1
|
|
|
|
|
|
register PDL_Indx __inc_coord1_n = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,2,0)]; (void)__inc_coord1_n; |
|
117
|
1
|
|
|
|
|
|
register PDL_Indx __inc_coord2_n = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,3,0)]; (void)__inc_coord2_n; |
|
118
|
1
|
|
|
|
|
|
register PDL_Indx __inc_coord3_n = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,4,0)]; (void)__inc_coord3_n; |
|
119
|
1
|
|
|
|
|
|
register PDL_Indx __inc_coord4_n = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,5,0)]; (void)__inc_coord4_n; |
|
120
|
1
|
|
|
|
|
|
register PDL_Indx __inc_isty_n = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,1,0)]; (void)__inc_isty_n; |
|
121
|
1
|
|
|
|
|
|
register PDL_Indx __inc_rev_nrev = __privtrans->inc_sizes[PDL_INC_ID(__privtrans->vtable,6,0)]; (void)__inc_rev_nrev; |
|
122
|
|
|
|
|
|
|
#ifndef PDL_DECLARE_PARAMS_plscmap1la_1 |
|
123
|
|
|
|
|
|
|
#define PDL_DECLARE_PARAMS_plscmap1la_1(PDL_TYPE_OP,PDL_PPSYM_OP,PDL_TYPE_PARAM_itype,PDL_PPSYM_PARAM_itype,PDL_TYPE_PARAM_rev,PDL_PPSYM_PARAM_rev) \ |
|
124
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_itype, itype, (__privtrans->pdls[0]), 1, PDL_PPSYM_PARAM_itype) \ |
|
125
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_OP, isty, (__privtrans->pdls[1]), 1, PDL_PPSYM_OP) \ |
|
126
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_OP, coord1, (__privtrans->pdls[2]), 1, PDL_PPSYM_OP) \ |
|
127
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_OP, coord2, (__privtrans->pdls[3]), 1, PDL_PPSYM_OP) \ |
|
128
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_OP, coord3, (__privtrans->pdls[4]), 1, PDL_PPSYM_OP) \ |
|
129
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_OP, coord4, (__privtrans->pdls[5]), 1, PDL_PPSYM_OP) \ |
|
130
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_rev, rev, (__privtrans->pdls[6]), 1, PDL_PPSYM_PARAM_rev) |
|
131
|
|
|
|
|
|
|
#endif |
|
132
|
|
|
|
|
|
|
#define PDL_IF_BAD(t,f) f |
|
133
|
1
|
50
|
|
|
|
|
switch (__privtrans->__datatype) { /* Start generic switch */ |
|
134
|
1
|
|
|
|
|
|
case PDL_D: { |
|
135
|
1
|
50
|
|
|
|
|
PDL_DECLARE_PARAMS_plscmap1la_1(PDL_Double,D,PDL_Long,L,PDL_Long,L) |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
136
|
4
|
50
|
|
|
|
|
PDL_BROADCASTLOOP_START_plscmap1la_readdata { |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
PLINT* rev; |
|
138
|
|
|
|
|
|
|
|
|
139
|
1
|
50
|
|
|
|
|
if (__privtrans->ind_sizes[1] == 0) |
|
140
|
0
|
|
|
|
|
|
rev = NULL; |
|
141
|
1
|
50
|
|
|
|
|
else if (__privtrans->ind_sizes[1] == __privtrans->ind_sizes[0]) |
|
142
|
1
|
|
|
|
|
|
rev = rev_datap; |
|
143
|
|
|
|
|
|
|
else |
|
144
|
0
|
|
|
|
|
|
return PDL->make_error(PDL_EUSERERROR, "Error in plscmap1la:" "plscmap1la: rev must have either length == 0 or have the same length of the other input arguments"); |
|
145
|
|
|
|
|
|
|
|
|
146
|
1
|
|
|
|
|
|
c_plscmap1la ((itype_datap)[0], __privtrans->ind_sizes[0], isty_datap, coord1_datap, |
|
147
|
1
|
50
|
|
|
|
|
coord2_datap, coord3_datap, coord4_datap, rev);}PDL_BROADCASTLOOP_END_plscmap1la_readdata |
|
|
|
50
|
|
|
|
|
|
|
148
|
1
|
|
|
|
|
|
} break; |
|
149
|
0
|
|
|
|
|
|
default: return PDL->make_error(PDL_EUSERERROR, "PP INTERNAL ERROR in plscmap1la: unhandled datatype(%d), only handles (D)! PLEASE MAKE A BUG REPORT\n", __privtrans->__datatype); |
|
150
|
|
|
|
|
|
|
} |
|
151
|
|
|
|
|
|
|
#undef PDL_IF_BAD |
|
152
|
1
|
|
|
|
|
|
return PDL_err; |
|
153
|
|
|
|
|
|
|
} |
|
154
|
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
static pdl_datatypes pdl_plscmap1la_vtable_gentypes[] = { PDL_D, -1 }; |
|
156
|
|
|
|
|
|
|
static PDL_Indx pdl_plscmap1la_vtable_realdims[] = { 0, 1, 1, 1, 1, 1, 1 }; |
|
157
|
|
|
|
|
|
|
static char *pdl_plscmap1la_vtable_parnames[] = { "itype","isty","coord1","coord2","coord3","coord4","rev" }; |
|
158
|
|
|
|
|
|
|
static short pdl_plscmap1la_vtable_parflags[] = { |
|
159
|
|
|
|
|
|
|
PDL_PARAM_ISTYPED, |
|
160
|
|
|
|
|
|
|
PDL_PARAM_ISPHYS, |
|
161
|
|
|
|
|
|
|
PDL_PARAM_ISPHYS, |
|
162
|
|
|
|
|
|
|
PDL_PARAM_ISPHYS, |
|
163
|
|
|
|
|
|
|
PDL_PARAM_ISPHYS, |
|
164
|
|
|
|
|
|
|
PDL_PARAM_ISPHYS, |
|
165
|
|
|
|
|
|
|
PDL_PARAM_ISPHYS|PDL_PARAM_ISTYPED |
|
166
|
|
|
|
|
|
|
}; |
|
167
|
|
|
|
|
|
|
static pdl_datatypes pdl_plscmap1la_vtable_partypes[] = { PDL_L, -1, -1, -1, -1, -1, PDL_L }; |
|
168
|
|
|
|
|
|
|
static PDL_Indx pdl_plscmap1la_vtable_realdims_starts[] = { 0, 0, 1, 2, 3, 4, 5 }; |
|
169
|
|
|
|
|
|
|
static PDL_Indx pdl_plscmap1la_vtable_realdims_ind_ids[] = { 0, 0, 0, 0, 0, 1 }; |
|
170
|
|
|
|
|
|
|
static char *pdl_plscmap1la_vtable_indnames[] = { "n","nrev" }; |
|
171
|
|
|
|
|
|
|
pdl_transvtable pdl_plscmap1la_vtable = { |
|
172
|
|
|
|
|
|
|
PDL_TRANS_DO_BROADCAST|PDL_TRANS_NO_PARALLEL, 0, pdl_plscmap1la_vtable_gentypes, 7, 7, NULL /*CORE21*/, |
|
173
|
|
|
|
|
|
|
pdl_plscmap1la_vtable_realdims, pdl_plscmap1la_vtable_parnames, |
|
174
|
|
|
|
|
|
|
pdl_plscmap1la_vtable_parflags, pdl_plscmap1la_vtable_partypes, |
|
175
|
|
|
|
|
|
|
pdl_plscmap1la_vtable_realdims_starts, pdl_plscmap1la_vtable_realdims_ind_ids, 6, |
|
176
|
|
|
|
|
|
|
2, pdl_plscmap1la_vtable_indnames, |
|
177
|
|
|
|
|
|
|
NULL, pdl_plscmap1la_readdata, NULL, |
|
178
|
|
|
|
|
|
|
NULL, |
|
179
|
|
|
|
|
|
|
0,"PDL::Graphics::PLplot::plscmap1la" |
|
180
|
|
|
|
|
|
|
}; |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
|
|
183
|
1
|
|
|
|
|
|
pdl_error pdl_run_plscmap1la(pdl *itype,pdl *isty,pdl *coord1,pdl *coord2,pdl *coord3,pdl *coord4,pdl *rev) { |
|
184
|
1
|
|
|
|
|
|
pdl_error PDL_err = {0, NULL, 0}; |
|
185
|
1
|
50
|
|
|
|
|
if (!PDL) return (pdl_error){PDL_EFATAL, "PDL core struct is NULL, can't continue",0}; |
|
186
|
1
|
|
|
|
|
|
pdl_trans *__privtrans = PDL->create_trans(&pdl_plscmap1la_vtable); |
|
187
|
1
|
50
|
|
|
|
|
if (!__privtrans) return PDL->make_error_simple(PDL_EFATAL, "Couldn't create trans"); |
|
188
|
1
|
|
|
|
|
|
__privtrans->pdls[0] = itype; |
|
189
|
1
|
|
|
|
|
|
__privtrans->pdls[1] = isty; |
|
190
|
1
|
|
|
|
|
|
__privtrans->pdls[2] = coord1; |
|
191
|
1
|
|
|
|
|
|
__privtrans->pdls[3] = coord2; |
|
192
|
1
|
|
|
|
|
|
__privtrans->pdls[4] = coord3; |
|
193
|
1
|
|
|
|
|
|
__privtrans->pdls[5] = coord4; |
|
194
|
1
|
|
|
|
|
|
__privtrans->pdls[6] = rev; |
|
195
|
1
|
50
|
|
|
|
|
PDL_RETERROR(PDL_err, PDL->type_coerce(__privtrans)); |
|
196
|
1
|
50
|
|
|
|
|
PDL_RETERROR(PDL_err, PDL->make_trans_mutual(__privtrans)); |
|
197
|
1
|
|
|
|
|
|
return PDL_err; |
|
198
|
|
|
|
|
|
|
} |