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
|
$NetBSD: patch-ah,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
Index: gram.y
===================================================================
RCS file: /home/siren/src/tvtwm/gram.y,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- gram.y 1999/08/08 05:46:53 1.1.1.1
+++ gram.y 1999/08/08 05:56:49 1.2
@@ -80,6 +80,8 @@
extern name_list **do_colorlist_keyword();
extern int do_color_keyword(), do_string_savecolor();
extern int yylineno;
+
+ int yylex(void);
%}
%union
@@ -207,7 +209,8 @@
root = GetRoot(TWM_ROOT,NULLSTR,NULLSTR);
Scr->Mouse[$1][C_ROOT][0].item =
AddToMenu(root,"x",Action,
- NULLSTR,$2,NULLSTR,NULLSTR);
+ (MenuRoot *) NULLSTR,
+ $2,NULLSTR,NULLSTR);
}
Action = "";
pull = NULL;
@@ -274,7 +277,8 @@
root = GetRoot(TWM_ROOT,NULLSTR,NULLSTR);
Scr->DefaultFunction.item =
AddToMenu(root,"x",Action,
- NULLSTR,$2, NULLSTR, NULLSTR);
+ (MenuRoot *) NULLSTR,
+ $2, NULLSTR, NULLSTR);
}
Action = "";
pull = NULL;
@@ -283,7 +287,8 @@
root = GetRoot(TWM_ROOT,NULLSTR,NULLSTR);
Scr->WindowFunction.item =
AddToMenu(root,"x",Action,
- NULLSTR,$2, NULLSTR, NULLSTR);
+ (MenuRoot *) NULLSTR,
+ $2, NULLSTR, NULLSTR);
Action = "";
pull = NULL;
}
@@ -640,8 +645,9 @@
| function_entries function_entry
;
-function_entry : action { AddToMenu(root, "", Action, NULLSTR, $1,
- NULLSTR, NULLSTR);
+function_entry : action { AddToMenu(root, "", Action,
+ (MenuRoot *) NULLSTR, $1,
+ NULLSTR, NULLSTR);
Action = "";
}
;
@@ -829,6 +835,7 @@
;
%%
+void
yyerror(s) char *s;
{
twmrc_error_prefix();
@@ -836,12 +843,13 @@
fprintf (stderr, ": %s", current_input_line());
ParseError = 1;
}
+void
RemoveDQuote(str)
char *str;
{
register char *i, *o;
- register n;
- register count;
+ register int n;
+ register int count;
for (i=str+1, o=str; *i && *i != '\"'; o++)
{
@@ -964,7 +972,7 @@
{
root = GetRoot(TWM_ROOT, NULLSTR, NULLSTR);
Scr->Mouse[butt][i][mods].item = AddToMenu(root,"x",Action,
- NULLSTR, func, NULLSTR, NULLSTR);
+ (MenuRoot *) NULLSTR, func, NULLSTR, NULLSTR);
}
}
Action = "";
@@ -1053,7 +1061,7 @@
}
-twmrc_error_prefix ()
+void twmrc_error_prefix ()
{
fprintf (stderr, "%s: line %d: ", ProgramName, yylineno);
}
|