summaryrefslogtreecommitdiff
path: root/graphics/magicpoint/patches/patch-ao
blob: bef6945f57ccf530e198ec911482fd3423e21cec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
$NetBSD: patch-ao,v 1.1 2008/09/10 13:32:47 taca Exp $

--- grammar.y.orig	2008-01-19 02:43:20.000000000 +0900
+++ grammar.y
@@ -130,6 +130,7 @@ gen_void(op)
 		yyerror("cannot allocate void node");
 		return ct;
 	}
+	ct->ct_type = CTRL_VOID;
 	return ct;
 }
 
@@ -145,6 +146,7 @@ gen_double_int(op, v)
 		return ct;
 	}
 	ct->ctf_value = (double)v;
+	ct->ct_type = CTRL_DOUBLE;
 	return ct;
 }
 
@@ -160,6 +162,7 @@ gen_double(op, v)
 		return ct;
 	}
 	ct->ctf_value = v;
+	ct->ct_type = CTRL_DOUBLE;
 	return ct;
 }
 
@@ -175,6 +178,7 @@ gen_int(op, v)
 		return ct;
 	}
 	ct->cti_value = v;
+	ct->ct_type = CTRL_INT;
 	return ct;
 }
 
@@ -192,6 +196,7 @@ gen_int2(op, v1, v2)
        }
        ct->cti2_value1 = v1;
        ct->cti2_value2 = v2;
+       ct->ct_type = CTRL_INT2;
        return ct;
 }
 
@@ -210,7 +215,8 @@ gen_int3(op, v1, v2, v3)
        }
        ct->cti3_value1 = v1;
        ct->cti3_value2 = v2;
-       ct->cti3_value3 = v3;   
+       ct->cti3_value3 = v3;
+       ct->ct_type = CTRL_INT3;
        return ct;
 }
 
@@ -226,6 +232,7 @@ gen_str(op, str)
 		return ct;
 	}
 	ct->ctc_value = strdup(str);
+	ct->ct_type = CTRL_CHAR;
 	return ct;
 }
 
@@ -243,6 +250,7 @@ gen_str2(op, str1, str2)
 	}
 	ct->ctc2_value1 = strdup(str1);
 	ct->ctc2_value2 = strdup(str2);
+	ct->ct_type = CTRL_CHAR2;
 	return ct;
 }
 
@@ -259,6 +267,7 @@ gen_color(op, color)
 	}
 	if (get_color(color, &ct->ctl_value) < 0)
 		yyerror("cannot allocate color \"%s\"", color);
+	ct->ct_type = CTRL_LONG;
 	return ct;
 }
 
@@ -284,6 +293,7 @@ gen_bgrad(w, h, colors, dir, zoomflg, ex
 	ct->ctd_numcolor = colors;
 	ct->ctd_dir = dir;
 	ct->ctd_zoomflag = zoomflg;
+	ct->ct_type = CTRL_GRAD;
 
 	/* process color list. */
 	siz = ct->ctd_g_colors = 0;
@@ -353,6 +363,7 @@ gen_newimage(arg)
 	}
 
 	/* default setting */
+	ct->ct_type = CTRL_IMAGE;
 	ct->ctm_ximagesize = 100;
 	ct->ctm_yimagesize = 100;
 	ct->ctm_zoomflag = Z_NORMAL | (Z_NORMAL << Z_YSHIFT);
@@ -463,6 +474,7 @@ gen_image(op, fname, colors, xsiz, ysiz,
 		yyerror("cannot allocate node (op=IMAGE)");
 		return ct;
 	}
+	ct->ct_type = CTRL_IMAGE;
 	ct->ctm_fname = embed_fname(fname);
 	ct->ctm_numcolor = colors;
 	ct->ctm_ximagesize = xsiz;
@@ -511,6 +523,7 @@ gen_bar(color, thick, start, len)
 	}
 	if (get_color(color, &ct->ctb_color) < 0)
 		yyerror("cannot allocate color %s", color);
+	ct->ct_type = CTRL_BAR;
 	ct->ctb_width = thick;
 	ct->ctb_start = start;
 	ct->ctb_length = len;
@@ -542,6 +555,7 @@ gen_icon(n, color, siz)
 		yyerror("cannot allocate node (op=ICON)");
 		return ct;
 	}
+	ct->ct_type = CTRL_ICON;
 	ct->ctic_value = n;
 	if (get_color(color, &ct->ctic_color) < 0)
 		yyerror("cannot allocate color %s", color);
@@ -562,6 +576,7 @@ gen_pcache(flag, mode, effect, value)
 		yyerror("cannot allocate node (op=PCACHE)");
 		return ct;
 	}
+	ct->ct_type = CTRL_PCACHE;
 	ct->ctch_flag = flag;
 	ct->ctch_mode = mode;
 	ct->ctch_effect = effect;
@@ -580,6 +595,7 @@ gen_valign(align)
 		yyerror("cannot allocate node (op=VALIGN)");
 		return ct;
 	}
+	ct->ct_type = CTRL_INT;
 	if (!strcmp(align, "center")) 
 		ct->cti_value = VL_CENTER;
 	else { 
@@ -629,6 +645,7 @@ gen_area(width, height, xoff, yoff)
 	ct->ctar_height = height;
 	ct->ctar_xoff = xoff;
 	ct->ctar_yoff = yoff;
+	ct->ct_type = CTRL_AREA;
 	return ct;
 }
 
@@ -663,6 +680,7 @@ gen_argsfromnid(op, nid)
 		siz++;
 	}
 	ct->cta_argv[siz] = NULL;
+	ct->ct_type = CTRL_ARGS;
 
 	if (nid)
 		ctlfree(nid);
@@ -712,6 +730,7 @@ gen_argsfromstr(op, str, flag)
 		}
 	}
 	ct->cta_argv[ct->cta_argc] = NULL;
+	ct->ct_type = CTRL_ARGS;
 
 	return ct;
 }