source: trunk/dports/cad/gerbv/files/patch-draw_amacro.c @ 21473

Last change on this file since 21473 was 21473, checked in by eridius@…, 13 years ago

Massive update to svn properties on files:
All patchfiles have svn:eol-style removed.
All files that are not in fact able to be executed have svn:executable removed
All binary files have svn:eol-style removed (and are probably corrupt)
All binary files have svn:mime-type set to application/octet-stream
All files which are not patchfiles or binary files have svn:eol-style set to native
All Portfiles have svn:eol-style set to native and svn:executable removed

File size: 3.5 KB
Line 
1--- src/draw_amacro.c.orig      2005-11-09 13:37:09.000000000 +0100
2+++ src/draw_amacro.c   2005-11-09 13:37:27.000000000 +0100
3@@ -48,21 +48,21 @@
4 typedef struct {
5     double *stack;
6     int sp;
7-} stack_t;
8+} macro_stack_t;
9 
10 
11-static stack_t *
12+static macro_stack_t *
13 new_stack(unsigned int nuf_push)
14 {
15     const int extra_stack_size = 10;
16-    stack_t *s;
17+    macro_stack_t *s;
18 
19-    s = (stack_t *)malloc(sizeof(stack_t));
20+    s = (macro_stack_t *)malloc(sizeof(macro_stack_t));
21     if (!s) {
22        free(s);
23        return NULL;
24     }
25-    memset(s, 0, sizeof(stack_t));
26+    memset(s, 0, sizeof(macro_stack_t));
27 
28     s->stack = (double *)malloc(sizeof(double) * (nuf_push + extra_stack_size));
29     if (!s->stack) {
30@@ -78,7 +78,7 @@
31 
32 
33 static void
34-free_stack(stack_t *s)
35+free_stack(macro_stack_t *s)
36 {
37     if (s && s->stack)
38        free(s->stack);
39@@ -91,7 +91,7 @@
40 
41 
42 static void
43-push(stack_t *s, double val)
44+push(macro_stack_t *s, double val)
45 {
46     s->stack[s->sp++] = val;
47     return;
48@@ -99,7 +99,7 @@
49 
50 
51 static double
52-pop(stack_t *s)
53+pop(macro_stack_t *s)
54 {
55     return s->stack[--s->sp];
56 } /* pop */
57@@ -140,7 +140,7 @@
58  * Doesn't handle explicit x,y yet
59  */
60 static void
61-gerbv_draw_prim1(GdkPixmap *pixmap, GdkGC *gc, stack_t *s, int scale,
62+gerbv_draw_prim1(GdkPixmap *pixmap, GdkGC *gc, macro_stack_t *s, int scale,
63                 gint x, gint y)
64 {
65     const int exposure_idx = 0;
66@@ -185,7 +185,7 @@
67  *  - how thick is the outline?
68  */
69 static void
70-gerbv_draw_prim4(GdkPixmap *pixmap, GdkGC *gc, stack_t *s, int scale,
71+gerbv_draw_prim4(GdkPixmap *pixmap, GdkGC *gc, macro_stack_t *s, int scale,
72                 gint x, gint y)
73 {
74     const int exposure_idx = 0;
75@@ -252,7 +252,7 @@
76  * Doesn't handle explicit x,y yet
77  */
78 static void
79-gerbv_draw_prim5(GdkPixmap *pixmap, GdkGC *gc, stack_t *s, int scale,
80+gerbv_draw_prim5(GdkPixmap *pixmap, GdkGC *gc, macro_stack_t *s, int scale,
81                 gint x, gint y)
82 {
83     const int exposure_idx = 0;
84@@ -308,7 +308,7 @@
85  *    center of line of circle?
86  */
87 static void
88-gerbv_draw_prim6(GdkPixmap *pixmap, GdkGC *gc, stack_t *s, int scale,
89+gerbv_draw_prim6(GdkPixmap *pixmap, GdkGC *gc, macro_stack_t *s, int scale,
90                 gint x, gint y)
91 {
92     const int outside_dia_idx = 2;
93@@ -385,7 +385,7 @@
94 
95 
96 static void
97-gerbv_draw_prim7(GdkPixmap *pixmap, GdkGC *gc, stack_t *s, int scale,
98+gerbv_draw_prim7(GdkPixmap *pixmap, GdkGC *gc, macro_stack_t *s, int scale,
99                 gint x, gint y)
100 {
101     const int outside_dia_idx = 2;
102@@ -459,7 +459,7 @@
103  * Doesn't handle and explicit x,y yet
104  */
105 static void
106-gerbv_draw_prim20(GdkPixmap *pixmap, GdkGC *gc, stack_t *s, int scale,
107+gerbv_draw_prim20(GdkPixmap *pixmap, GdkGC *gc, macro_stack_t *s, int scale,
108                  gint x, gint y)
109 {
110     const int exposure_idx = 0;
111@@ -514,7 +514,7 @@
112  * Doesn't handle explicit x,y yet
113  */
114 static void
115-gerbv_draw_prim21(GdkPixmap *pixmap, GdkGC *gc, stack_t *s, int scale,
116+gerbv_draw_prim21(GdkPixmap *pixmap, GdkGC *gc, macro_stack_t *s, int scale,
117                  gint x, gint y)
118 {
119     const int exposure_idx = 0;
120@@ -569,7 +569,7 @@
121  * Doesn't handle explicit x,y yet
122  */
123 static void
124-gerbv_draw_prim22(GdkPixmap *pixmap, GdkGC *gc, stack_t *s, int scale,
125+gerbv_draw_prim22(GdkPixmap *pixmap, GdkGC *gc, macro_stack_t *s, int scale,
126                  gint x, gint y)
127 {
128     const int exposure_idx = 0;
129@@ -627,7 +627,7 @@
130                  instruction_t *program, unsigned int nuf_push,
131                  double *parameters, int scale, gint x, gint y)
132 {
133-    stack_t *s = new_stack(nuf_push);
134+    macro_stack_t *s = new_stack(nuf_push);
135     instruction_t *ip;
136     int handled = 1;
137     
Note: See TracBrowser for help on using the repository browser.