Lines 1-5
Link Here
|
1 |
--- item_tcl.C.orig Sun Nov 28 17:31:26 1999 |
1 |
--- item_tcl.C.orig 2018-03-23 12:22:06.885443000 -0400 |
2 |
+++ item_tcl.C Sun Nov 28 17:32:25 1999 |
2 |
+++ item_tcl.C 2018-03-23 11:55:23.839264000 -0400 |
3 |
@@ -106,52 +106,52 @@ |
3 |
@@ -106,52 +106,52 @@ |
4 |
static int item_mlweekday (ClientData, Tcl_Interp*, int, char*[]); |
4 |
static int item_mlweekday (ClientData, Tcl_Interp*, int, char*[]); |
5 |
|
5 |
|
Lines 14-20
Link Here
|
14 |
- { "alarms", 0, 1, item_alarms }, |
14 |
- { "alarms", 0, 1, item_alarms }, |
15 |
- { "option", 1, 2, item_option }, |
15 |
- { "option", 1, 2, item_option }, |
16 |
- { "delete_option", 1, 1, item_doption }, |
16 |
- { "delete_option", 1, 1, item_doption }, |
17 |
- |
17 |
+ { "length", 0, 1, (Tcl_CmdProc *)item_length }, |
|
|
18 |
+ { "starttime", 0, 1, (Tcl_CmdProc *)item_startt }, |
19 |
+ { "alarms", 0, 1, (Tcl_CmdProc *)item_alarms }, |
20 |
+ { "option", 1, 2, (Tcl_CmdProc *)item_option }, |
21 |
+ { "delete_option", 1, 1, (Tcl_CmdProc *)item_doption }, |
22 |
|
18 |
- { "is", 1, 1, item_is }, |
23 |
- { "is", 1, 1, item_is }, |
19 |
- { "calendar", 0, 0, item_cal }, |
24 |
- { "calendar", 0, 0, item_cal }, |
20 |
- { "text", 0, 1, item_text }, |
25 |
- { "text", 0, 1, item_text }, |
Lines 27-63
Link Here
|
27 |
- { "todo", 0, 1, item_todo }, |
32 |
- { "todo", 0, 1, item_todo }, |
28 |
- { "is_done", 0, 0, item_is_done }, |
33 |
- { "is_done", 0, 0, item_is_done }, |
29 |
- { "done", 1, 1, item_done }, |
34 |
- { "done", 1, 1, item_done }, |
30 |
- |
|
|
31 |
- { "contains", 1, 1, item_cont }, |
32 |
- { "empty", 0, 0, item_empty }, |
33 |
- { "repeats", 0, 0, item_repeat }, |
34 |
- { "first", 0, 0, item_first }, |
35 |
- { "next", 1, 1, item_next }, |
36 |
- { "range", 2, 2, item_range }, |
37 |
- { "type", 0, 0, item_type }, |
38 |
- { "describe_repeat", 0, 0, item_desc }, |
39 |
- |
40 |
- { "date", 1, 1, item_date }, |
41 |
- { "dayrepeat", 2, 2, item_dayr }, |
42 |
- |
43 |
- { "monthrepeat", 2, 2, item_monthr }, |
44 |
- { "month_day", 1, 3, item_mday }, |
45 |
- { "month_last_day", 1, 3, item_mlday }, |
46 |
- { "month_work_day", 1, 3, item_mworkday }, |
47 |
- { "month_last_work_day", 1, 3, item_mlworkday }, |
48 |
- { "month_week_day", 2, 4, item_mweekday }, |
49 |
- { "month_last_week_day", 2, 4, item_mlweekday }, |
50 |
- |
51 |
- { "weekdays", 0, -1, item_wdays }, |
52 |
- { "start", 1, 1, item_start }, |
53 |
- { "finish", 1, 1, item_finish }, |
54 |
- { "deleteon", 1, 1, item_ondel }, |
55 |
+ { "length", 0, 1, (Tcl_CmdProc *)item_length }, |
56 |
+ { "starttime", 0, 1, (Tcl_CmdProc *)item_startt }, |
57 |
+ { "alarms", 0, 1, (Tcl_CmdProc *)item_alarms }, |
58 |
+ { "option", 1, 2, (Tcl_CmdProc *)item_option }, |
59 |
+ { "delete_option", 1, 1, (Tcl_CmdProc *)item_doption }, |
60 |
+ |
61 |
+ { "is", 1, 1, (Tcl_CmdProc *)item_is }, |
35 |
+ { "is", 1, 1, (Tcl_CmdProc *)item_is }, |
62 |
+ { "calendar", 0, 0, (Tcl_CmdProc *)item_cal }, |
36 |
+ { "calendar", 0, 0, (Tcl_CmdProc *)item_cal }, |
63 |
+ { "text", 0, 1, (Tcl_CmdProc *)item_text }, |
37 |
+ { "text", 0, 1, (Tcl_CmdProc *)item_text }, |
Lines 70-76
Link Here
|
70 |
+ { "todo", 0, 1, (Tcl_CmdProc *)item_todo }, |
44 |
+ { "todo", 0, 1, (Tcl_CmdProc *)item_todo }, |
71 |
+ { "is_done", 0, 0, (Tcl_CmdProc *)item_is_done }, |
45 |
+ { "is_done", 0, 0, (Tcl_CmdProc *)item_is_done }, |
72 |
+ { "done", 1, 1, (Tcl_CmdProc *)item_done }, |
46 |
+ { "done", 1, 1, (Tcl_CmdProc *)item_done }, |
73 |
+ |
47 |
|
|
|
48 |
- { "contains", 1, 1, item_cont }, |
49 |
- { "empty", 0, 0, item_empty }, |
50 |
- { "repeats", 0, 0, item_repeat }, |
51 |
- { "first", 0, 0, item_first }, |
52 |
- { "next", 1, 1, item_next }, |
53 |
- { "range", 2, 2, item_range }, |
54 |
- { "type", 0, 0, item_type }, |
55 |
- { "describe_repeat", 0, 0, item_desc }, |
74 |
+ { "contains", 1, 1, (Tcl_CmdProc *)item_cont }, |
56 |
+ { "contains", 1, 1, (Tcl_CmdProc *)item_cont }, |
75 |
+ { "empty", 0, 0, (Tcl_CmdProc *)item_empty }, |
57 |
+ { "empty", 0, 0, (Tcl_CmdProc *)item_empty }, |
76 |
+ { "repeats", 0, 0, (Tcl_CmdProc *)item_repeat }, |
58 |
+ { "repeats", 0, 0, (Tcl_CmdProc *)item_repeat }, |
Lines 79-88
Link Here
|
79 |
+ { "range", 2, 2, (Tcl_CmdProc *)item_range }, |
61 |
+ { "range", 2, 2, (Tcl_CmdProc *)item_range }, |
80 |
+ { "type", 0, 0, (Tcl_CmdProc *)item_type }, |
62 |
+ { "type", 0, 0, (Tcl_CmdProc *)item_type }, |
81 |
+ { "describe_repeat", 0, 0, (Tcl_CmdProc *)item_desc }, |
63 |
+ { "describe_repeat", 0, 0, (Tcl_CmdProc *)item_desc }, |
82 |
+ |
64 |
|
|
|
65 |
- { "date", 1, 1, item_date }, |
66 |
- { "dayrepeat", 2, 2, item_dayr }, |
83 |
+ { "date", 1, 1, (Tcl_CmdProc *)item_date }, |
67 |
+ { "date", 1, 1, (Tcl_CmdProc *)item_date }, |
84 |
+ { "dayrepeat", 2, 2, (Tcl_CmdProc *)item_dayr }, |
68 |
+ { "dayrepeat", 2, 2, (Tcl_CmdProc *)item_dayr }, |
85 |
+ |
69 |
|
|
|
70 |
- { "monthrepeat", 2, 2, item_monthr }, |
71 |
- { "month_day", 1, 3, item_mday }, |
72 |
- { "month_last_day", 1, 3, item_mlday }, |
73 |
- { "month_work_day", 1, 3, item_mworkday }, |
74 |
- { "month_last_work_day", 1, 3, item_mlworkday }, |
75 |
- { "month_week_day", 2, 4, item_mweekday }, |
76 |
- { "month_last_week_day", 2, 4, item_mlweekday }, |
86 |
+ { "monthrepeat", 2, 2, (Tcl_CmdProc *)item_monthr }, |
77 |
+ { "monthrepeat", 2, 2, (Tcl_CmdProc *)item_monthr }, |
87 |
+ { "month_day", 1, 3, (Tcl_CmdProc *)item_mday }, |
78 |
+ { "month_day", 1, 3, (Tcl_CmdProc *)item_mday }, |
88 |
+ { "month_last_day", 1, 3, (Tcl_CmdProc *)item_mlday }, |
79 |
+ { "month_last_day", 1, 3, (Tcl_CmdProc *)item_mlday }, |
Lines 90-96
Link Here
|
90 |
+ { "month_last_work_day", 1, 3, (Tcl_CmdProc *)item_mlworkday }, |
81 |
+ { "month_last_work_day", 1, 3, (Tcl_CmdProc *)item_mlworkday }, |
91 |
+ { "month_week_day", 2, 4, (Tcl_CmdProc *)item_mweekday }, |
82 |
+ { "month_week_day", 2, 4, (Tcl_CmdProc *)item_mweekday }, |
92 |
+ { "month_last_week_day", 2, 4, (Tcl_CmdProc *)item_mlweekday }, |
83 |
+ { "month_last_week_day", 2, 4, (Tcl_CmdProc *)item_mlweekday }, |
93 |
+ |
84 |
|
|
|
85 |
- { "weekdays", 0, -1, item_wdays }, |
86 |
- { "start", 1, 1, item_start }, |
87 |
- { "finish", 1, 1, item_finish }, |
88 |
- { "deleteon", 1, 1, item_ondel }, |
94 |
+ { "weekdays", 0, -1, (Tcl_CmdProc *)item_wdays }, |
89 |
+ { "weekdays", 0, -1, (Tcl_CmdProc *)item_wdays }, |
95 |
+ { "start", 1, 1, (Tcl_CmdProc *)item_start }, |
90 |
+ { "start", 1, 1, (Tcl_CmdProc *)item_start }, |
96 |
+ { "finish", 1, 1, (Tcl_CmdProc *)item_finish }, |
91 |
+ { "finish", 1, 1, (Tcl_CmdProc *)item_finish }, |
Lines 98-104
Link Here
|
98 |
|
93 |
|
99 |
{ 0, 0, 0, 0 } |
94 |
{ 0, 0, 0, 0 } |
100 |
}; |
95 |
}; |
101 |
+++ item_tcl.C Sun Nov 28 17:32:25 1999 |
|
|
102 |
@@ -329,7 +329,7 @@ |
96 |
@@ -329,7 +329,7 @@ |
103 |
|
97 |
|
104 |
static int item_owned(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) { |
98 |
static int item_owned(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) { |
Lines 108-114
Link Here
|
108 |
} |
102 |
} |
109 |
|
103 |
|
110 |
static int item_own(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) { |
104 |
static int item_own(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) { |
111 |
@@ -431,7 +431,7 @@ static int item_alarms(ClientData c, Tcl |
105 |
@@ -431,7 +431,7 @@ |
112 |
} |
106 |
} |
113 |
|
107 |
|
114 |
int count; |
108 |
int count; |
Lines 132-137
Link Here
|
132 |
} |
126 |
} |
133 |
|
127 |
|
134 |
static int item_first(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) { |
128 |
static int item_first(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) { |
|
|
129 |
@@ -508,7 +508,7 @@ |
130 |
} |
131 |
|
132 |
char buffer[100]; |
133 |
- sprintf(buffer, "%d", d.EpochDays()); |
134 |
+ sprintf(buffer, "%ld", d.EpochDays()); |
135 |
Tcl_SetResult(tcl, buffer, TCL_VOLATILE); |
136 |
return TCL_OK; |
137 |
} |
138 |
@@ -518,43 +518,43 @@ |
139 |
char* result; |
140 |
switch (item->value()->repeat_type()) { |
141 |
case DateSet::None: |
142 |
- result = ""; |
143 |
+ result = (char *)""; |
144 |
break; |
145 |
case DateSet::Daily: |
146 |
- result = "Daily"; |
147 |
+ result = (char *)"Daily"; |
148 |
break; |
149 |
case DateSet::Weekly: |
150 |
- result = "Weekly"; |
151 |
+ result = (char *)"Weekly"; |
152 |
break; |
153 |
case DateSet::BiWeekly: |
154 |
- result = "Every Two Weeks"; |
155 |
+ result = (char *)"Every Two Weeks"; |
156 |
break; |
157 |
case DateSet::ThreeWeekly: |
158 |
- result = "Every Three Weeks"; |
159 |
+ result = (char *)"Every Three Weeks"; |
160 |
break; |
161 |
case DateSet::FourWeekly: |
162 |
- result = "Every Four Weeks"; |
163 |
+ result = (char *)"Every Four Weeks"; |
164 |
break; |
165 |
case DateSet::Monthly: |
166 |
- result = "Monthly"; |
167 |
+ result = (char *)"Monthly"; |
168 |
break; |
169 |
case DateSet::TwoMonthly: |
170 |
- result = "Every Two Months"; |
171 |
+ result = (char *)"Every Two Months"; |
172 |
break; |
173 |
case DateSet::ThreeMonthly: |
174 |
- result = "Every Three Months"; |
175 |
+ result = (char *)"Every Three Months"; |
176 |
break; |
177 |
case DateSet::FourMonthly: |
178 |
- result = "Every Four Months"; |
179 |
+ result = (char *)"Every Four Months"; |
180 |
break; |
181 |
case DateSet::SixMonthly: |
182 |
- result = "Every Six Months"; |
183 |
+ result = (char *)"Every Six Months"; |
184 |
break; |
185 |
case DateSet::Annual: |
186 |
- result = "Annual"; |
187 |
+ result = (char *)"Annual"; |
188 |
break; |
189 |
default: |
190 |
- result = "Complex"; |
191 |
+ result = (char *)"Complex"; |
192 |
break; |
193 |
} |
194 |
TCL_Return(tcl, result); |
135 |
@@ -576,7 +576,7 @@ |
195 |
@@ -576,7 +576,7 @@ |
136 |
TCL_Error(tcl, "invalid date"); |
196 |
TCL_Error(tcl, "invalid date"); |
137 |
} |
197 |
} |
Lines 141-143
Link Here
|
141 |
} |
201 |
} |
142 |
|
202 |
|
143 |
static int item_next(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) { |
203 |
static int item_next(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) { |
|
|
204 |
@@ -592,7 +592,7 @@ |
205 |
} |
206 |
|
207 |
char buffer[100]; |
208 |
- sprintf(buffer, "%d", next.EpochDays()); |
209 |
+ sprintf(buffer, "%ld", next.EpochDays()); |
210 |
Tcl_SetResult(tcl, buffer, TCL_VOLATILE); |
211 |
return TCL_OK; |
212 |
} |
213 |
@@ -603,10 +603,10 @@ |
214 |
Date s, f; |
215 |
if (item->value()->range(s, f)) { |
216 |
char buffer[100]; |
217 |
- sprintf(buffer, "%d", s.EpochDays()); |
218 |
+ sprintf(buffer, "%ld", s.EpochDays()); |
219 |
if (Tcl_SetVar(tcl, argv[0], buffer, 0) == NULL) |
220 |
TCL_Error(tcl, "could not set range start variable"); |
221 |
- sprintf(buffer, "%d", f.EpochDays()); |
222 |
+ sprintf(buffer, "%ld", f.EpochDays()); |
223 |
if (Tcl_SetVar(tcl, argv[1], buffer, 0) == NULL) |
224 |
TCL_Error(tcl, "could not set range finish variable"); |
225 |
TCL_Return(tcl, "1"); |
226 |
@@ -886,7 +886,7 @@ |
227 |
if (file == 0) return 1; |
228 |
|
229 |
if (file->GetCalendar()->ReadOnly()) { |
230 |
- Tcl_SetResult(tcl, "item is in readonly calendar", TCL_STATIC); |
231 |
+ Tcl_SetResult(tcl, (char *)"item is in readonly calendar", TCL_STATIC); |
232 |
return 0; |
233 |
} |
234 |
|