@@ -667,9 +667,9 @@ typedef struct {
667667 void (* line )(Imaging im , int x0 , int y0 , int x1 , int y1 , int ink );
668668} DRAW ;
669669
670- DRAW draw8 = {point8 , hline8 , line8 };
671- DRAW draw32 = {point32 , hline32 , line32 };
672- DRAW draw32rgba = {point32rgba , hline32rgba , line32rgba };
670+ static DRAW draw8 = {point8 , hline8 , line8 };
671+ static DRAW draw32 = {point32 , hline32 , line32 };
672+ static DRAW draw32rgba = {point32rgba , hline32rgba , line32rgba };
673673
674674/* -------------------------------------------------------------------- */
675675/* Interface */
@@ -933,7 +933,7 @@ typedef struct {
933933 int8_t finished ;
934934} quarter_state ;
935935
936- void
936+ static void
937937quarter_init (quarter_state * s , int32_t a , int32_t b ) {
938938 if (a < 0 || b < 0 ) {
939939 s -> finished = 1 ;
@@ -953,12 +953,12 @@ quarter_init(quarter_state *s, int32_t a, int32_t b) {
953953
954954// deviation of the point from ellipse curve, basically a substitution
955955// of the point into the ellipse equation
956- int64_t
956+ static int64_t
957957quarter_delta (quarter_state * s , int64_t x , int64_t y ) {
958958 return llabs (s -> a2 * y * y + s -> b2 * x * x - s -> a2b2 );
959959}
960960
961- int8_t
961+ static int8_t
962962quarter_next (quarter_state * s , int32_t * ret_x , int32_t * ret_y ) {
963963 if (s -> finished ) {
964964 return -1 ;
@@ -1009,7 +1009,7 @@ typedef struct {
10091009 int8_t leftmost ;
10101010} ellipse_state ;
10111011
1012- void
1012+ static void
10131013ellipse_init (ellipse_state * s , int32_t a , int32_t b , int32_t w ) {
10141014 s -> bufcnt = 0 ;
10151015 s -> leftmost = a % 2 ;
@@ -1023,7 +1023,7 @@ ellipse_init(ellipse_state *s, int32_t a, int32_t b, int32_t w) {
10231023 }
10241024}
10251025
1026- int8_t
1026+ static int8_t
10271027ellipse_next (ellipse_state * s , int32_t * ret_x0 , int32_t * ret_y , int32_t * ret_x1 ) {
10281028 if (s -> bufcnt == 0 ) {
10291029 if (s -> finished ) {
@@ -1106,7 +1106,7 @@ typedef struct event_list {
11061106} event_list ;
11071107
11081108// Mirrors all the clipping nodes of the tree relative to the y = x line.
1109- void
1109+ static void
11101110clip_tree_transpose (clip_node * root ) {
11111111 if (root != NULL ) {
11121112 if (root -> type == CT_CLIP ) {
@@ -1123,7 +1123,7 @@ clip_tree_transpose(clip_node *root) {
11231123// non-intersecting segments sorted by X coordinate.
11241124// Combining nodes (AND, OR) may also accept sequences for intersecting
11251125// segments, i.e. something like correct bracket sequences.
1126- int
1126+ static int
11271127clip_tree_do_clip (
11281128 clip_node * root , int32_t x0 , int32_t y , int32_t x1 , event_list * * ret
11291129) {
@@ -1267,7 +1267,7 @@ typedef void (*clip_ellipse_init)(
12671267);
12681268
12691269// Resulting angles will satisfy 0 <= al < 360, al <= ar <= al + 360
1270- void
1270+ static void
12711271normalize_angles (float * al , float * ar ) {
12721272 if (* ar - * al >= 360 ) {
12731273 * al = 0 ;
@@ -1279,7 +1279,7 @@ normalize_angles(float *al, float *ar) {
12791279}
12801280
12811281// An arc with caps orthogonal to the ellipse curve.
1282- void
1282+ static void
12831283arc_init (clip_ellipse_state * s , int32_t a , int32_t b , int32_t w , float al , float ar ) {
12841284 if (a < b ) {
12851285 // transpose the coordinate system
@@ -1349,7 +1349,7 @@ arc_init(clip_ellipse_state *s, int32_t a, int32_t b, int32_t w, float al, float
13491349}
13501350
13511351// A chord line.
1352- void
1352+ static void
13531353chord_line_init (
13541354 clip_ellipse_state * s , int32_t a , int32_t b , int32_t w , float al , float ar
13551355) {
@@ -1377,7 +1377,7 @@ chord_line_init(
13771377}
13781378
13791379// Pie side.
1380- void
1380+ static void
13811381pie_side_init (
13821382 clip_ellipse_state * s , int32_t a , int32_t b , int32_t w , float al , float _
13831383) {
@@ -1422,7 +1422,7 @@ pie_side_init(
14221422}
14231423
14241424// A chord.
1425- void
1425+ static void
14261426chord_init (clip_ellipse_state * s , int32_t a , int32_t b , int32_t w , float al , float ar ) {
14271427 ellipse_init (& s -> st , a , b , w );
14281428
@@ -1441,7 +1441,7 @@ chord_init(clip_ellipse_state *s, int32_t a, int32_t b, int32_t w, float al, flo
14411441}
14421442
14431443// A pie. Can also be used to draw an arc with ugly sharp caps.
1444- void
1444+ static void
14451445pie_init (clip_ellipse_state * s , int32_t a , int32_t b , int32_t w , float al , float ar ) {
14461446 ellipse_init (& s -> st , a , b , w );
14471447
@@ -1485,7 +1485,7 @@ pie_init(clip_ellipse_state *s, int32_t a, int32_t b, int32_t w, float al, float
14851485 }
14861486}
14871487
1488- void
1488+ static void
14891489clip_ellipse_free (clip_ellipse_state * s ) {
14901490 while (s -> head != NULL ) {
14911491 event_list * t = s -> head ;
@@ -1494,7 +1494,7 @@ clip_ellipse_free(clip_ellipse_state *s) {
14941494 }
14951495}
14961496
1497- int8_t
1497+ static int8_t
14981498clip_ellipse_next (
14991499 clip_ellipse_state * s , int32_t * ret_x0 , int32_t * ret_y , int32_t * ret_x1
15001500) {
0 commit comments