@@ -129,8 +129,8 @@ sbox_circle_pos(const SCIRCLE *sc, const SBOX *sb)
129
129
else if (FPzero (sb -> sw .lng ) && FPeq (sb -> ne .lng , PID ))
130
130
{
131
131
/* full latitude range */
132
- static const SPoint tmpn = {0.0 , PIH };
133
- static const SPoint tmps = {0.0 , - PIH };
132
+ const SPoint tmpn = {0.0 , PIH };
133
+ const SPoint tmps = {0.0 , - PIH };
134
134
135
135
if (spoint_eq (& sb -> ne , & tmpn )
136
136
&& FPge (sc -> center .lat - sc -> radius , sb -> sw .lat ))
@@ -172,18 +172,18 @@ sbox_circle_pos(const SCIRCLE *sc, const SBOX *sb)
172
172
else
173
173
{
174
174
bool lat_b_cont_c =
175
- ((sc -> center .lat + sc -> radius ) <= sb -> ne .lat ) &&
176
- ((sc -> center .lat - sc -> radius ) >= sb -> sw .lat );
175
+ ((sc -> center .lat + sc -> radius ) <= sb -> ne .lat ) &&
176
+ ((sc -> center .lat - sc -> radius ) >= sb -> sw .lat );
177
177
bool bcc = sbox_cont_point (sb , & sc -> center );
178
178
bool ccb = FALSE;
179
- static int8 pw ,
179
+ int8 pw ,
180
180
pe ;
181
- static SLine bw ,
181
+ SLine bw ,
182
182
be ;
183
183
184
184
/* west and east boundary */
185
- static SPoint bc ;
186
- static SPoint p1 ,
185
+ SPoint bc ;
186
+ SPoint p1 ,
187
187
p2 ;
188
188
189
189
/* center */
@@ -258,11 +258,11 @@ sbox_circle_pos(const SCIRCLE *sc, const SBOX *sb)
258
258
static int8
259
259
sbox_line_pos (const SLine * sl , const SBOX * sb )
260
260
{
261
- static SPoint p1 , p2 , pbg , ped ;
262
- static SPoint lc [4 ];
263
- static int8 pw , pe , lcn ,lcs ;
264
- static SLine bw , be ;
265
- static float8 minlat , maxlat ;
261
+ SPoint p1 , p2 , pbg , ped ;
262
+ SPoint lc [4 ];
263
+ int8 pw , pe , lcn ,lcs ;
264
+ SLine bw , be ;
265
+ float8 minlat , maxlat ;
266
266
267
267
sline_begin (& pbg , sl );
268
268
sline_end (& ped , sl );
@@ -380,8 +380,8 @@ sbox_line_pos(const SLine *sl, const SBOX *sb)
380
380
381
381
if (pw && pe )
382
382
{
383
- static SPoint sp ;
384
- static int i ;
383
+ SPoint sp ;
384
+ int i ;
385
385
386
386
for (i = 0 ; i < lcn ; i ++ )
387
387
{
@@ -427,13 +427,13 @@ sbox_line_pos(const SLine *sl, const SBOX *sb)
427
427
static int8
428
428
sbox_path_pos (const SPATH * path , const SBOX * box )
429
429
{
430
- static int8 pos ;
431
- static int32 i ;
432
- static SLine sl ;
433
- static int32 n ;
434
- static const int8 sb_in = (1 << PGS_BOX_CONT_LINE );
435
- static const int8 sb_ov = (1 << PGS_BOX_LINE_OVER );
436
- static const int8 sb_os = (1 << PGS_BOX_LINE_AVOID );
430
+ int8 pos ;
431
+ int32 i ;
432
+ SLine sl ;
433
+ int32 n ;
434
+ const int8 sb_in = (1 << PGS_BOX_CONT_LINE );
435
+ const int8 sb_ov = (1 << PGS_BOX_LINE_OVER );
436
+ const int8 sb_os = (1 << PGS_BOX_LINE_AVOID );
437
437
438
438
n = path -> npts - 1 ;
439
439
pos = 0 ;
@@ -549,14 +549,14 @@ sbox_poly_pos(const SPOLY *poly, const SBOX *box)
549
549
static int8
550
550
sbox_ellipse_pos (const SELLIPSE * ell , const SBOX * box )
551
551
{
552
- static SCIRCLE sco ,
552
+ SCIRCLE sco ,
553
553
sci ;
554
- static SPoint ec ;
555
- static int8 pw ,
554
+ SPoint ec ;
555
+ int8 pw ,
556
556
pe ,
557
557
po ,
558
558
pi ;
559
- static SLine bw ,
559
+ SLine bw ,
560
560
be ;
561
561
562
562
if (spoint_eq (& box -> sw , & box -> ne ))
@@ -672,11 +672,8 @@ sbox_ellipse_pos(const SELLIPSE *ell, const SBOX *box)
672
672
pe = sellipse_line_pos (ell , & be );
673
673
674
674
/* check meridians */
675
-
676
- if (
677
- pw == PGS_ELLIPSE_LINE_AVOID &&
678
- pe == PGS_ELLIPSE_LINE_AVOID
679
- )
675
+ if (pw == PGS_ELLIPSE_LINE_AVOID &&
676
+ pe == PGS_ELLIPSE_LINE_AVOID )
680
677
{
681
678
/* center is between west and east meridians */
682
679
if ((FPgt (box -> sw .lng , box -> ne .lng )
@@ -716,7 +713,7 @@ sbox_ellipse_pos(const SELLIPSE *ell, const SBOX *box)
716
713
}
717
714
else
718
715
{
719
- static SPoint p1 , p2 ;
716
+ SPoint p1 , p2 ;
720
717
721
718
/* create east/west boundaries */
722
719
p1 .lat = box -> sw .lat ;
@@ -749,10 +746,10 @@ sbox_ellipse_pos(const SELLIPSE *ell, const SBOX *box)
749
746
static int8
750
747
sbox_box_pos (const SBOX * b1 , const SBOX * b2 , bool recheck )
751
748
{
752
- static SPoint p1 , p2 , bc ;
753
- static int8 pw , pe ;
754
- static SLine bw , be ;
755
- static bool scp ;
749
+ SPoint p1 , p2 , bc ;
750
+ int8 pw , pe ;
751
+ SLine bw , be ;
752
+ bool scp ;
756
753
757
754
if (spoint_eq (& b2 -> sw , & b2 -> ne ))
758
755
{
@@ -784,9 +781,11 @@ sbox_box_pos(const SBOX *b1, const SBOX *b2, bool recheck)
784
781
/* create east/west boundaries from b2 */
785
782
p1 .lat = b2 -> sw .lat ;
786
783
p2 .lat = b2 -> ne .lat ;
784
+
787
785
/* west */
788
786
p1 .lng = p2 .lng = b2 -> sw .lng ;
789
787
sline_from_points (& bw , & p1 , & p2 );
788
+
790
789
/* east */
791
790
p1 .lng = p2 .lng = b2 -> ne .lng ;
792
791
sline_from_points (& be , & p1 , & p2 );
0 commit comments