Lines 1-7
Link Here
|
1 |
--- item_tcl.C.orig 1996-08-01 19:25:10 UTC |
1 |
--- item_tcl.C.orig 2004-03-11 11:26:56 UTC |
2 |
+++ item_tcl.C |
2 |
+++ item_tcl.C |
3 |
@@ -106,52 +106,52 @@ static int item_mweekday (ClientData, Tcl_Interp*, int |
3 |
@@ -106,52 +106,52 @@ |
4 |
static int item_mlweekday (ClientData, Tcl_Interp*, int, char*[]); |
4 |
static int item_mlweekday (ClientData, Tcl_Interp*, int, const char*[]); |
5 |
|
5 |
|
6 |
static Dispatch_Entry item_dispatch[] = { |
6 |
static Dispatch_Entry item_dispatch[] = { |
7 |
- { "delete", 0, 0, item_delete }, |
7 |
- { "delete", 0, 0, item_delete }, |
Lines 93-132
Link Here
|
93 |
|
93 |
|
94 |
{ 0, 0, 0, 0 } |
94 |
{ 0, 0, 0, 0 } |
95 |
}; |
95 |
}; |
96 |
@@ -329,7 +329,7 @@ static int item_owner(ClientData c, Tcl_Interp* tcl, i |
96 |
@@ -329,7 +329,7 @@ |
97 |
|
97 |
|
98 |
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, const char* argv[]) { |
99 |
Item_Tcl* item = (Item_Tcl*) c; |
99 |
Item_Tcl* item = (Item_Tcl*) c; |
100 |
- TCL_Return(tcl, (item->value()->IsMine() ? "1" : "0")); |
100 |
- TCL_Return(tcl, (item->value()->IsMine() ? "1" : "0")); |
101 |
+ TCL_Return(tcl, (item->value()->IsMine() ? (char *)"1" : (char *)"0")); |
101 |
+ TCL_Return(tcl, (item->value()->IsMine() ? (char *)"1" : (char *)"0")); |
102 |
} |
102 |
} |
103 |
|
103 |
|
104 |
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, const char* argv[]) { |
105 |
@@ -431,7 +431,7 @@ static int item_alarms(ClientData c, Tcl_Interp* tcl, |
105 |
@@ -492,12 +492,12 @@ |
106 |
} |
|
|
107 |
|
106 |
|
108 |
int count; |
107 |
static int item_empty(ClientData c, Tcl_Interp* tcl, int argc, const char* argv[]) { |
109 |
- char** list; |
|
|
110 |
+ CONST84 char** list; |
111 |
if (Tcl_SplitList(tcl, argv[0], &count, &list) != TCL_OK) { |
112 |
TCL_Error(tcl, "invalid alarm list"); |
113 |
} |
114 |
@@ -492,12 +492,12 @@ static int item_doption(ClientData c, Tcl_Interp* tcl, |
115 |
|
116 |
static int item_empty(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) { |
117 |
Item_Tcl* item = (Item_Tcl*) c; |
108 |
Item_Tcl* item = (Item_Tcl*) c; |
118 |
- TCL_Return(tcl, (item->value()->empty()?"1":"0")); |
109 |
- TCL_Return(tcl, (item->value()->empty()?"1":"0")); |
119 |
+ TCL_Return(tcl, (item->value()->empty() ? (char *)"1" : (char *)"0")); |
110 |
+ TCL_Return(tcl, (item->value()->empty() ? (char *) "1" : (char *) "0")); |
120 |
} |
111 |
} |
121 |
|
112 |
|
122 |
static int item_repeat(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) { |
113 |
static int item_repeat(ClientData c, Tcl_Interp* tcl, int argc, const char* argv[]) { |
123 |
Item_Tcl* item = (Item_Tcl*) c; |
114 |
Item_Tcl* item = (Item_Tcl*) c; |
124 |
- TCL_Return(tcl,(item->value()->repeats()?"1":"0")); |
115 |
- TCL_Return(tcl,(item->value()->repeats()?"1":"0")); |
125 |
+ TCL_Return(tcl,(item->value()->repeats() ? (char *)"1" : (char *)"0")); |
116 |
+ TCL_Return(tcl,(item->value()->repeats() ? (char *) "1" : (char *) "0")); |
126 |
} |
117 |
} |
127 |
|
118 |
|
128 |
static int item_first(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) { |
119 |
static int item_first(ClientData c, Tcl_Interp* tcl, int argc, const char* argv[]) { |
129 |
@@ -508,7 +508,7 @@ static int item_first(ClientData c, Tcl_Interp* tcl, i |
120 |
@@ -508,7 +508,7 @@ |
130 |
} |
121 |
} |
131 |
|
122 |
|
132 |
char buffer[100]; |
123 |
char buffer[100]; |
Lines 135-141
Link Here
|
135 |
Tcl_SetResult(tcl, buffer, TCL_VOLATILE); |
126 |
Tcl_SetResult(tcl, buffer, TCL_VOLATILE); |
136 |
return TCL_OK; |
127 |
return TCL_OK; |
137 |
} |
128 |
} |
138 |
@@ -518,43 +518,43 @@ static int item_type(ClientData c, Tcl_Interp* tcl, in |
129 |
@@ -518,43 +518,43 @@ |
139 |
char* result; |
130 |
char* result; |
140 |
switch (item->value()->repeat_type()) { |
131 |
switch (item->value()->repeat_type()) { |
141 |
case DateSet::None: |
132 |
case DateSet::None: |
Lines 192-198
Link Here
|
192 |
break; |
183 |
break; |
193 |
} |
184 |
} |
194 |
TCL_Return(tcl, result); |
185 |
TCL_Return(tcl, result); |
195 |
@@ -576,7 +576,7 @@ static int item_cont(ClientData c, Tcl_Interp* tcl, in |
186 |
@@ -576,7 +576,7 @@ |
196 |
TCL_Error(tcl, "invalid date"); |
187 |
TCL_Error(tcl, "invalid date"); |
197 |
} |
188 |
} |
198 |
Date date(dateDays); |
189 |
Date date(dateDays); |
Lines 200-207
Link Here
|
200 |
+ TCL_Return(tcl, (item->value()->contains(date) ? (char *)"1" : (char *)"0")); |
191 |
+ TCL_Return(tcl, (item->value()->contains(date) ? (char *)"1" : (char *)"0")); |
201 |
} |
192 |
} |
202 |
|
193 |
|
203 |
static int item_next(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) { |
194 |
static int item_next(ClientData c, Tcl_Interp* tcl, int argc, const char* argv[]) { |
204 |
@@ -592,7 +592,7 @@ static int item_next(ClientData c, Tcl_Interp* tcl, in |
195 |
@@ -592,7 +592,7 @@ |
205 |
} |
196 |
} |
206 |
|
197 |
|
207 |
char buffer[100]; |
198 |
char buffer[100]; |
Lines 210-216
Link Here
|
210 |
Tcl_SetResult(tcl, buffer, TCL_VOLATILE); |
201 |
Tcl_SetResult(tcl, buffer, TCL_VOLATILE); |
211 |
return TCL_OK; |
202 |
return TCL_OK; |
212 |
} |
203 |
} |
213 |
@@ -603,10 +603,10 @@ static int item_range(ClientData c, Tcl_Interp* tcl, i |
204 |
@@ -603,10 +603,10 @@ |
214 |
Date s, f; |
205 |
Date s, f; |
215 |
if (item->value()->range(s, f)) { |
206 |
if (item->value()->range(s, f)) { |
216 |
char buffer[100]; |
207 |
char buffer[100]; |
Lines 223-229
Link Here
|
223 |
if (Tcl_SetVar(tcl, argv[1], buffer, 0) == NULL) |
214 |
if (Tcl_SetVar(tcl, argv[1], buffer, 0) == NULL) |
224 |
TCL_Error(tcl, "could not set range finish variable"); |
215 |
TCL_Error(tcl, "could not set range finish variable"); |
225 |
TCL_Return(tcl, "1"); |
216 |
TCL_Return(tcl, "1"); |
226 |
@@ -886,7 +886,7 @@ static int check_permission(Tcl_Interp* tcl, Item_Tcl* |
217 |
@@ -886,7 +886,7 @@ |
227 |
if (file == 0) return 1; |
218 |
if (file == 0) return 1; |
228 |
|
219 |
|
229 |
if (file->GetCalendar()->ReadOnly()) { |
220 |
if (file->GetCalendar()->ReadOnly()) { |