| 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-plgpage.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
|
|
|
|
|
|
|
#line 1857 "lib/PDL/PP.pm" |
|
40
|
|
|
|
|
|
|
pdl_error pdl_plgpage_readdata(pdl_trans *__privtrans) { |
|
41
|
|
|
|
|
|
|
pdl_error PDL_err = {0, NULL, 0}; |
|
42
|
|
|
|
|
|
|
#line 43 "pp-plgpage.c" |
|
43
|
3
|
50
|
|
|
|
|
if (!__privtrans->broadcast.incs) return PDL->make_error(PDL_EUSERERROR, "Error in plgpage:" "broadcast.incs NULL"); |
|
44
|
|
|
|
|
|
|
/* broadcastloop declarations */ |
|
45
|
|
|
|
|
|
|
int __brcloopval; |
|
46
|
|
|
|
|
|
|
register PDL_Indx __tind0,__tind1; /* counters along dim */ |
|
47
|
3
|
|
|
|
|
|
register PDL_Indx __tnpdls = __privtrans->broadcast.npdls; |
|
48
|
|
|
|
|
|
|
/* dims here are how many steps along those dims */ |
|
49
|
3
|
|
|
|
|
|
register PDL_Indx __tinc0_p_xp = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,0); |
|
50
|
3
|
|
|
|
|
|
register PDL_Indx __tinc0_p_yp = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,0); |
|
51
|
3
|
|
|
|
|
|
register PDL_Indx __tinc0_p_xleng = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,2,0); |
|
52
|
3
|
|
|
|
|
|
register PDL_Indx __tinc0_p_yleng = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,3,0); |
|
53
|
3
|
|
|
|
|
|
register PDL_Indx __tinc0_p_xoff = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,4,0); |
|
54
|
3
|
|
|
|
|
|
register PDL_Indx __tinc0_p_yoff = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,5,0); |
|
55
|
3
|
|
|
|
|
|
register PDL_Indx __tinc1_p_xp = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,0,1); |
|
56
|
3
|
|
|
|
|
|
register PDL_Indx __tinc1_p_yp = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,1,1); |
|
57
|
3
|
|
|
|
|
|
register PDL_Indx __tinc1_p_xleng = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,2,1); |
|
58
|
3
|
|
|
|
|
|
register PDL_Indx __tinc1_p_yleng = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,3,1); |
|
59
|
3
|
|
|
|
|
|
register PDL_Indx __tinc1_p_xoff = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,4,1); |
|
60
|
3
|
|
|
|
|
|
register PDL_Indx __tinc1_p_yoff = PDL_BRC_INC(__privtrans->broadcast.incs,__tnpdls,5,1); |
|
61
|
|
|
|
|
|
|
#define PDL_BROADCASTLOOP_START_plgpage_readdata PDL_BROADCASTLOOP_START( \ |
|
62
|
|
|
|
|
|
|
readdata, \ |
|
63
|
|
|
|
|
|
|
__privtrans->broadcast, \ |
|
64
|
|
|
|
|
|
|
__privtrans->vtable, \ |
|
65
|
|
|
|
|
|
|
p_xp_datap += __offsp[0]; \ |
|
66
|
|
|
|
|
|
|
p_yp_datap += __offsp[1]; \ |
|
67
|
|
|
|
|
|
|
p_xleng_datap += __offsp[2]; \ |
|
68
|
|
|
|
|
|
|
p_yleng_datap += __offsp[3]; \ |
|
69
|
|
|
|
|
|
|
p_xoff_datap += __offsp[4]; \ |
|
70
|
|
|
|
|
|
|
p_yoff_datap += __offsp[5]; \ |
|
71
|
|
|
|
|
|
|
, \ |
|
72
|
|
|
|
|
|
|
( ,p_xp_datap += __tinc1_p_xp - __tinc0_p_xp * __tdims0 \ |
|
73
|
|
|
|
|
|
|
,p_yp_datap += __tinc1_p_yp - __tinc0_p_yp * __tdims0 \ |
|
74
|
|
|
|
|
|
|
,p_xleng_datap += __tinc1_p_xleng - __tinc0_p_xleng * __tdims0 \ |
|
75
|
|
|
|
|
|
|
,p_yleng_datap += __tinc1_p_yleng - __tinc0_p_yleng * __tdims0 \ |
|
76
|
|
|
|
|
|
|
,p_xoff_datap += __tinc1_p_xoff - __tinc0_p_xoff * __tdims0 \ |
|
77
|
|
|
|
|
|
|
,p_yoff_datap += __tinc1_p_yoff - __tinc0_p_yoff * __tdims0 \ |
|
78
|
|
|
|
|
|
|
), \ |
|
79
|
|
|
|
|
|
|
( ,p_xp_datap += __tinc0_p_xp \ |
|
80
|
|
|
|
|
|
|
,p_yp_datap += __tinc0_p_yp \ |
|
81
|
|
|
|
|
|
|
,p_xleng_datap += __tinc0_p_xleng \ |
|
82
|
|
|
|
|
|
|
,p_yleng_datap += __tinc0_p_yleng \ |
|
83
|
|
|
|
|
|
|
,p_xoff_datap += __tinc0_p_xoff \ |
|
84
|
|
|
|
|
|
|
,p_yoff_datap += __tinc0_p_yoff \ |
|
85
|
|
|
|
|
|
|
) \ |
|
86
|
|
|
|
|
|
|
) |
|
87
|
|
|
|
|
|
|
#define PDL_BROADCASTLOOP_END_plgpage_readdata PDL_BROADCASTLOOP_END( \ |
|
88
|
|
|
|
|
|
|
__privtrans->broadcast, \ |
|
89
|
|
|
|
|
|
|
p_xp_datap -= __tinc1_p_xp * __tdims1 + __offsp[0]; \ |
|
90
|
|
|
|
|
|
|
p_yp_datap -= __tinc1_p_yp * __tdims1 + __offsp[1]; \ |
|
91
|
|
|
|
|
|
|
p_xleng_datap -= __tinc1_p_xleng * __tdims1 + __offsp[2]; \ |
|
92
|
|
|
|
|
|
|
p_yleng_datap -= __tinc1_p_yleng * __tdims1 + __offsp[3]; \ |
|
93
|
|
|
|
|
|
|
p_xoff_datap -= __tinc1_p_xoff * __tdims1 + __offsp[4]; \ |
|
94
|
|
|
|
|
|
|
p_yoff_datap -= __tinc1_p_yoff * __tdims1 + __offsp[5]; \ |
|
95
|
|
|
|
|
|
|
) |
|
96
|
|
|
|
|
|
|
#ifndef PDL_DECLARE_PARAMS_plgpage_1 |
|
97
|
|
|
|
|
|
|
#define PDL_DECLARE_PARAMS_plgpage_1(PDL_TYPE_OP,PDL_PPSYM_OP,PDL_TYPE_PARAM_p_xp,PDL_PPSYM_PARAM_p_xp,PDL_TYPE_PARAM_p_yp,PDL_PPSYM_PARAM_p_yp,PDL_TYPE_PARAM_p_xleng,PDL_PPSYM_PARAM_p_xleng,PDL_TYPE_PARAM_p_yleng,PDL_PPSYM_PARAM_p_yleng,PDL_TYPE_PARAM_p_xoff,PDL_PPSYM_PARAM_p_xoff,PDL_TYPE_PARAM_p_yoff,PDL_PPSYM_PARAM_p_yoff) \ |
|
98
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_p_xp, p_xp, (__privtrans->pdls[0]), 1, PDL_PPSYM_PARAM_p_xp) \ |
|
99
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_p_yp, p_yp, (__privtrans->pdls[1]), 1, PDL_PPSYM_PARAM_p_yp) \ |
|
100
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_p_xleng, p_xleng, (__privtrans->pdls[2]), 1, PDL_PPSYM_PARAM_p_xleng) \ |
|
101
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_p_yleng, p_yleng, (__privtrans->pdls[3]), 1, PDL_PPSYM_PARAM_p_yleng) \ |
|
102
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_p_xoff, p_xoff, (__privtrans->pdls[4]), 1, PDL_PPSYM_PARAM_p_xoff) \ |
|
103
|
|
|
|
|
|
|
PDL_DECLARE_PARAMETER(PDL_TYPE_PARAM_p_yoff, p_yoff, (__privtrans->pdls[5]), 1, PDL_PPSYM_PARAM_p_yoff) |
|
104
|
|
|
|
|
|
|
#endif |
|
105
|
|
|
|
|
|
|
#define PDL_IF_BAD(t,f) f |
|
106
|
3
|
50
|
|
|
|
|
switch (__privtrans->__datatype) { /* Start generic switch */ |
|
107
|
3
|
|
|
|
|
|
case PDL_D: { |
|
108
|
3
|
50
|
|
|
|
|
PDL_DECLARE_PARAMS_plgpage_1(PDL_Double,D,PDL_Double,D,PDL_Double,D,PDL_Long,L,PDL_Long,L,PDL_Long,L,PDL_Long,L) |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
109
|
12
|
50
|
|
|
|
|
PDL_BROADCASTLOOP_START_plgpage_readdata {c_plgpage(p_xp_datap,p_yp_datap,p_xleng_datap,p_yleng_datap,p_xoff_datap,p_yoff_datap);}PDL_BROADCASTLOOP_END_plgpage_readdata |
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
110
|
3
|
|
|
|
|
|
} break; |
|
111
|
0
|
|
|
|
|
|
default: return PDL->make_error(PDL_EUSERERROR, "PP INTERNAL ERROR in plgpage: unhandled datatype(%d), only handles (D)! PLEASE MAKE A BUG REPORT\n", __privtrans->__datatype); |
|
112
|
|
|
|
|
|
|
} |
|
113
|
|
|
|
|
|
|
#undef PDL_IF_BAD |
|
114
|
3
|
|
|
|
|
|
return PDL_err; |
|
115
|
|
|
|
|
|
|
} |
|
116
|
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
static pdl_datatypes pdl_plgpage_vtable_gentypes[] = { PDL_D, -1 }; |
|
118
|
|
|
|
|
|
|
static PDL_Indx pdl_plgpage_vtable_realdims[] = { 0, 0, 0, 0, 0, 0 }; |
|
119
|
|
|
|
|
|
|
static char *pdl_plgpage_vtable_parnames[] = { "p_xp","p_yp","p_xleng","p_yleng","p_xoff","p_yoff" }; |
|
120
|
|
|
|
|
|
|
static short pdl_plgpage_vtable_parflags[] = { |
|
121
|
|
|
|
|
|
|
PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISPHYS|PDL_PARAM_ISTYPED|PDL_PARAM_ISWRITE, |
|
122
|
|
|
|
|
|
|
PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISPHYS|PDL_PARAM_ISTYPED|PDL_PARAM_ISWRITE, |
|
123
|
|
|
|
|
|
|
PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISPHYS|PDL_PARAM_ISTYPED|PDL_PARAM_ISWRITE, |
|
124
|
|
|
|
|
|
|
PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISPHYS|PDL_PARAM_ISTYPED|PDL_PARAM_ISWRITE, |
|
125
|
|
|
|
|
|
|
PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISPHYS|PDL_PARAM_ISTYPED|PDL_PARAM_ISWRITE, |
|
126
|
|
|
|
|
|
|
PDL_PARAM_ISCREAT|PDL_PARAM_ISOUT|PDL_PARAM_ISPHYS|PDL_PARAM_ISTYPED|PDL_PARAM_ISWRITE |
|
127
|
|
|
|
|
|
|
}; |
|
128
|
|
|
|
|
|
|
static pdl_datatypes pdl_plgpage_vtable_partypes[] = { PDL_D, PDL_D, PDL_L, PDL_L, PDL_L, PDL_L }; |
|
129
|
|
|
|
|
|
|
static PDL_Indx pdl_plgpage_vtable_realdims_starts[] = { 0, 0, 0, 0, 0, 0 }; |
|
130
|
|
|
|
|
|
|
static PDL_Indx pdl_plgpage_vtable_realdims_ind_ids[] = { 0 }; |
|
131
|
|
|
|
|
|
|
static char *pdl_plgpage_vtable_indnames[] = { "" }; |
|
132
|
|
|
|
|
|
|
pdl_transvtable pdl_plgpage_vtable = { |
|
133
|
|
|
|
|
|
|
PDL_TRANS_DO_BROADCAST|PDL_TRANS_NO_PARALLEL, 0, pdl_plgpage_vtable_gentypes, 0, 6, NULL /*CORE21*/, |
|
134
|
|
|
|
|
|
|
pdl_plgpage_vtable_realdims, pdl_plgpage_vtable_parnames, |
|
135
|
|
|
|
|
|
|
pdl_plgpage_vtable_parflags, pdl_plgpage_vtable_partypes, |
|
136
|
|
|
|
|
|
|
pdl_plgpage_vtable_realdims_starts, pdl_plgpage_vtable_realdims_ind_ids, 0, |
|
137
|
|
|
|
|
|
|
0, pdl_plgpage_vtable_indnames, |
|
138
|
|
|
|
|
|
|
NULL, pdl_plgpage_readdata, NULL, |
|
139
|
|
|
|
|
|
|
NULL, |
|
140
|
|
|
|
|
|
|
0,"PDL::Graphics::PLplot::plgpage" |
|
141
|
|
|
|
|
|
|
}; |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
|
|
144
|
3
|
|
|
|
|
|
pdl_error pdl_run_plgpage(pdl *p_xp,pdl *p_yp,pdl *p_xleng,pdl *p_yleng,pdl *p_xoff,pdl *p_yoff) { |
|
145
|
3
|
|
|
|
|
|
pdl_error PDL_err = {0, NULL, 0}; |
|
146
|
3
|
50
|
|
|
|
|
if (!PDL) return (pdl_error){PDL_EFATAL, "PDL core struct is NULL, can't continue",0}; |
|
147
|
3
|
|
|
|
|
|
pdl_trans *__privtrans = PDL->create_trans(&pdl_plgpage_vtable); |
|
148
|
3
|
50
|
|
|
|
|
if (!__privtrans) return PDL->make_error_simple(PDL_EFATAL, "Couldn't create trans"); |
|
149
|
3
|
|
|
|
|
|
__privtrans->pdls[0] = p_xp; |
|
150
|
3
|
|
|
|
|
|
__privtrans->pdls[1] = p_yp; |
|
151
|
3
|
|
|
|
|
|
__privtrans->pdls[2] = p_xleng; |
|
152
|
3
|
|
|
|
|
|
__privtrans->pdls[3] = p_yleng; |
|
153
|
3
|
|
|
|
|
|
__privtrans->pdls[4] = p_xoff; |
|
154
|
3
|
|
|
|
|
|
__privtrans->pdls[5] = p_yoff; |
|
155
|
3
|
50
|
|
|
|
|
PDL_RETERROR(PDL_err, PDL->type_coerce(__privtrans)); |
|
156
|
3
|
50
|
|
|
|
|
PDL_RETERROR(PDL_err, PDL->make_trans_mutual(__privtrans)); |
|
157
|
3
|
|
|
|
|
|
return PDL_err; |
|
158
|
|
|
|
|
|
|
} |