]>
Commit | Line | Data |
---|---|---|
99f852b5 JB |
1 | --- IRRToolSet-4.7.3/src/aoe/TclApp.cc.orig Tue Apr 9 13:48:46 2002 |
2 | +++ IRRToolSet-4.7.3/src/aoe/TclApp.cc Tue Jul 8 17:28:05 2003 | |
3 | @@ -71,8 +71,8 @@ | |
4 | ||
5 | // Constructor | |
6 | TclApplication::TclApplication(char *pzcAppName, char *pzcDisplay, | |
7 | - char *pzcDefaultResource = NULL, | |
8 | - char *pzcResourceFile = NULL) | |
9 | + char *pzcDefaultResource /* = NULL */, | |
10 | + char *pzcResourceFile /* = NULL */) | |
11 | : ptMainWindow(NULL), | |
12 | pzcDisplay(pzcDisplay), | |
13 | pzcDefaultResource(pzcDefaultResource), | |
14 | @@ -176,16 +176,16 @@ | |
15 | return 1; | |
16 | } | |
17 | ||
18 | -char *TclApplication::setVar(char *pzcName, char *pzcValue, | |
19 | - int iFlags = TCL_GLOBAL_ONLY) | |
20 | +const char *TclApplication::setVar(char *pzcName, char *pzcValue, | |
21 | + int iFlags /* = TCL_GLOBAL_ONLY */) | |
22 | { | |
23 | SplitName cName(pzcName); | |
24 | return Tcl_SetVar2(ptInterp, cName.name1(), cName.name2(), | |
25 | pzcValue, iFlags); | |
26 | } | |
27 | ||
28 | -char *TclApplication::setVar(char *pzcName, int iValue, | |
29 | - int iFlags = TCL_GLOBAL_ONLY) | |
30 | +const char *TclApplication::setVar(char *pzcName, int iValue, | |
31 | + int iFlags /* = TCL_GLOBAL_ONLY */) | |
32 | { | |
33 | SplitName cName(pzcName); | |
34 | char pzcBuffer[64]; | |
35 | @@ -194,7 +194,7 @@ | |
36 | pzcBuffer, iFlags); | |
37 | } | |
38 | ||
39 | -char *TclApplication::getVar(char *pzcName, int iFlags = TCL_GLOBAL_ONLY) | |
40 | +const char *TclApplication::getVar(char *pzcName, int iFlags /* = TCL_GLOBAL_ONLY */) | |
41 | { | |
42 | SplitName cName(pzcName); | |
43 | return Tcl_GetVar2(ptInterp, cName.name1(), cName.name2(), iFlags); | |
44 | --- IRRToolSet-4.7.3/src/aoe/TclEntry.hh.orig Tue Apr 9 13:48:46 2002 | |
45 | +++ IRRToolSet-4.7.3/src/aoe/TclEntry.hh Tue Jul 8 17:32:28 2003 | |
46 | @@ -74,7 +74,7 @@ | |
47 | return setValue(pzcValue); | |
48 | } | |
49 | int setValue(char *pzcValue); | |
50 | - char *getValue(void); | |
51 | + const char *getValue(void); | |
52 | }; | |
53 | ||
54 | #endif // TCLENTRY_HH | |
55 | --- IRRToolSet-4.7.3/src/aoe/TclToggleButton.cc.orig Tue Apr 9 13:48:46 2002 | |
56 | +++ IRRToolSet-4.7.3/src/aoe/TclToggleButton.cc Tue Jul 8 17:34:55 2003 | |
57 | @@ -67,7 +67,7 @@ | |
58 | ||
59 | TclToggleButton::TclToggleButton(char *pzcName, char *pzcUnCheckString, | |
60 | char *pzcCheckString, | |
61 | - tdCheckButtonOption eOption = cbUnCheck) : | |
62 | + tdCheckButtonOption eOption /* = cbUnCheck */) : | |
63 | TclCheckButton(pzcName, eOption) | |
64 | { | |
65 | this->pzcUnCheckString = strdup(pzcUnCheckString); | |
66 | @@ -104,7 +104,7 @@ | |
67 | ||
68 | // Static member function | |
69 | char *TclToggleButton::traceProc(ClientData pvData, Tcl_Interp *pcInterp, | |
70 | - char *pzcName1, char *pzcName2, int iFlags) | |
71 | + const char *pzcName1, const char *pzcName2, int iFlags) | |
72 | { | |
73 | TclToggleButton *pcToggleButton = (TclToggleButton *)pvData; | |
74 | return pcToggleButton->traceProc(); | |
75 | --- IRRToolSet-4.7.3/src/aoe/TclToggleButton.hh.orig Tue Apr 9 13:48:46 2002 | |
76 | +++ IRRToolSet-4.7.3/src/aoe/TclToggleButton.hh Tue Jul 8 17:34:24 2003 | |
77 | @@ -67,7 +67,7 @@ | |
78 | private: | |
79 | int label(char *pzcLabel); | |
80 | static char *traceProc(ClientData pvData, Tcl_Interp *pcInterp, | |
81 | - char *pzcName1, char *pzcName2, int iFlags); | |
82 | + const char *pzcName1, const char *pzcName2, int iFlags); | |
83 | ||
84 | protected: | |
85 | char *traceProc(void); | |
86 | --- IRRToolSet-4.7.3/src/aoe/TclVar.cc.orig Tue Apr 9 13:48:46 2002 | |
87 | +++ IRRToolSet-4.7.3/src/aoe/TclVar.cc Tue Jul 8 17:35:46 2003 | |
88 | @@ -129,7 +129,7 @@ | |
89 | Tcl_SetVar2(pcApp->getInterp(), pzcName1, pzcName2, pzcValue, 0); | |
90 | } | |
91 | ||
92 | -char *TclVariable::getValue(char *pzcDummy = NULL) | |
93 | +const char *TclVariable::getValue(char *pzcDummy /* = NULL */) | |
94 | { | |
95 | TclApplication *pcApp = (TclApplication *)getExtraArgument(); | |
96 | return Tcl_GetVar2(pcApp->getInterp(), pzcName1, pzcName2, 0); | |
97 | @@ -146,6 +146,6 @@ | |
98 | ||
99 | int TclInt::getValue(void) | |
100 | { | |
101 | - char *pzcBuffer = TclVariable::getValue(); | |
102 | + const char *pzcBuffer = TclVariable::getValue(); | |
103 | return atoi(pzcBuffer); | |
104 | } | |
105 | --- IRRToolSet-4.7.3/src/aoe/TclApp.hh.orig Tue Apr 9 13:48:46 2002 | |
106 | +++ IRRToolSet-4.7.3/src/aoe/TclApp.hh Tue Jul 8 17:27:56 2003 | |
107 | @@ -91,10 +91,10 @@ | |
108 | char *getResourceFile(void) { return pzcResourceFile; } | |
109 | void setResult(char *pzcResult) { ptInterp->result = pzcResult; } | |
110 | const char *getResult(void) { return ptInterp->result; } | |
111 | - char *setVar(char *pzcName, char *pzcValue, | |
112 | + const char *setVar(char *pzcName, char *pzcValue, | |
113 | int iFlags = TCL_GLOBAL_ONLY); | |
114 | - char *setVar(char *pzcName, int iValue, int iFlags = TCL_GLOBAL_ONLY); | |
115 | - char *getVar(char *pzcName, int iFlags = TCL_GLOBAL_ONLY); | |
116 | + const char *setVar(char *pzcName, int iValue, int iFlags = TCL_GLOBAL_ONLY); | |
117 | + const char *getVar(char *pzcName, int iFlags = TCL_GLOBAL_ONLY); | |
118 | int createCommand(TclCommand *pcCommand); | |
119 | int insert(TclObject *pcObject); | |
120 | }; | |
121 | --- IRRToolSet-4.7.3/src/aoe/TclCmd.hh.orig Tue Apr 9 13:48:46 2002 | |
122 | +++ IRRToolSet-4.7.3/src/aoe/TclCmd.hh Tue Jul 8 17:31:47 2003 | |
123 | @@ -62,11 +62,11 @@ | |
124 | { | |
125 | private: | |
126 | static int command(ClientData ptData, Tcl_Interp *ptInterp, | |
127 | - int argc, char *argv[]); | |
128 | + int argc, const char *argv[]); | |
129 | static void cleanUp(ClientData ptData); | |
130 | ||
131 | protected: | |
132 | - virtual int command(int argc, char *argv[]) = 0; | |
133 | + virtual int command(int argc, const char *argv[]) = 0; | |
134 | virtual void cleanUp(void) { delete this; } | |
135 | ||
136 | public: | |
137 | --- IRRToolSet-4.7.3/src/aoe/TclCheckButton.cc.orig Tue Apr 9 13:48:46 2002 | |
138 | +++ IRRToolSet-4.7.3/src/aoe/TclCheckButton.cc Tue Jul 8 17:30:14 2003 | |
139 | @@ -103,7 +103,7 @@ | |
140 | { | |
141 | TclApplication *pcApp = (TclApplication *)getExtraArgument(); | |
142 | if (!pcApp) return -1; | |
143 | - char *pzcBuffer; | |
144 | + const char *pzcBuffer; | |
145 | if ((pzcBuffer = pcApp->getVar(pzcVariableName)) == NULL) return -1; | |
146 | return atoi(pzcBuffer); | |
147 | } | |
148 | --- IRRToolSet-4.7.3/src/aoe/TclCmd.cc.orig Tue Apr 9 13:48:46 2002 | |
149 | +++ IRRToolSet-4.7.3/src/aoe/TclCmd.cc Tue Jul 8 17:31:35 2003 | |
150 | @@ -63,7 +63,7 @@ | |
151 | ||
152 | ||
153 | int TclCommand::command(ClientData ptData, Tcl_Interp *ptInterp, | |
154 | - int argc, char *argv[]) | |
155 | + int argc, const char *argv[]) | |
156 | { | |
157 | TclCommand *pcTclCommand = (TclCommand *)ptData; | |
158 | return(pcTclCommand->command(argc, argv)); | |
159 | --- IRRToolSet-4.7.3/src/aoe/TclEntry.cc.orig Tue Apr 9 13:48:46 2002 | |
160 | +++ IRRToolSet-4.7.3/src/aoe/TclEntry.cc Tue Jul 8 17:32:20 2003 | |
161 | @@ -91,7 +91,7 @@ | |
162 | return 1; | |
163 | } | |
164 | ||
165 | -char *TclEntry::getValue(void) | |
166 | +const char *TclEntry::getValue(void) | |
167 | { | |
168 | TclApplication *pcApp = (TclApplication *)getExtraArgument(); | |
169 | if (!pcApp) return NULL; | |
170 | --- IRRToolSet-4.7.3/src/aoe/TclRadioButton.cc.orig Tue Apr 9 13:48:46 2002 | |
171 | +++ IRRToolSet-4.7.3/src/aoe/TclRadioButton.cc Tue Jul 8 17:32:47 2003 | |
172 | @@ -96,7 +96,7 @@ | |
173 | { | |
174 | TclApplication *pcApp = (TclApplication *)getExtraArgument(); | |
175 | if (!pcApp) return -1; | |
176 | - char *pzcBuffer; | |
177 | + const char *pzcBuffer; | |
178 | if ((pzcBuffer = pcApp->getVar(pzcVariableName)) == NULL) return -1; | |
179 | return atoi(pzcBuffer); | |
180 | } | |
181 | --- IRRToolSet-4.7.3/src/aoe/TclVar.hh.orig Tue Apr 9 13:48:46 2002 | |
182 | +++ IRRToolSet-4.7.3/src/aoe/TclVar.hh Tue Jul 8 17:35:35 2003 | |
183 | @@ -84,7 +84,7 @@ | |
184 | ~TclVariable(void); | |
185 | virtual int setExtraArgument(void *pvExtraArgument); | |
186 | void setValue(char *pzcValue); | |
187 | - char *getValue(char *pzcDummy = NULL); | |
188 | + const char *getValue(char *pzcDummy = NULL); | |
189 | }; | |
190 | ||
191 | ||
99f852b5 JB |
192 | --- IRRToolSet-4.7.3/src/roe/roe_tcl.cc.orig Tue Apr 9 13:48:48 2002 |
193 | +++ IRRToolSet-4.7.3/src/roe/roe_tcl.cc Tue Jul 8 17:05:13 2003 | |
194 | @@ -148,7 +148,7 @@ | |
195 | extern int irr_pending_replies; | |
196 | ||
197 | int roe_statusbar_hint(ClientData clientData, Tcl_Interp *interp, | |
198 | - int argc, char **argv) { | |
199 | + int argc, const char **argv) { | |
200 | if (argc != 1) { | |
201 | Tcl_SetResult(interp, "wrong # of args", TCL_STATIC); | |
202 | return TCL_ERROR; | |
203 | @@ -165,13 +165,13 @@ | |
204 | static int roe_routes_hint_index = -1; | |
205 | ||
206 | int roe_routes_hint_reset(ClientData clientData, Tcl_Interp *interp, | |
207 | - int argc, char **argv) { | |
208 | + int argc, const char **argv) { | |
209 | roe_routes_hint_index = -1; | |
210 | return TCL_OK; | |
211 | } | |
212 | ||
213 | int roe_routes_hint(ClientData clientData, Tcl_Interp *interp, | |
214 | - int argc, char **argv) { | |
215 | + int argc, const char **argv) { | |
216 | if (argc != 4) { | |
217 | Tcl_SetResult(interp, "wrong # of args", TCL_STATIC); | |
218 | return TCL_ERROR; | |
219 | @@ -198,7 +198,7 @@ | |
220 | } | |
221 | ||
222 | int roe_file_new_as(ClientData clientData, Tcl_Interp *interp, | |
223 | - int argc, char **argv) { | |
224 | + int argc, const char **argv) { | |
225 | switch (argc) | |
226 | { | |
227 | case 1: | |
228 | @@ -221,7 +221,7 @@ | |
229 | } | |
230 | ||
231 | int roe_show_routes(ClientData clientData, Tcl_Interp *interp, | |
232 | - int argc, char **argv) { | |
233 | + int argc, const char **argv) { | |
234 | if (argc != 1) { | |
235 | Tcl_SetResult(interp, "wrong # of args", TCL_STATIC); | |
236 | return TCL_ERROR; | |
237 | @@ -233,7 +233,7 @@ | |
238 | } | |
239 | ||
240 | int roe_select_route(ClientData clientData, Tcl_Interp *interp, | |
241 | - int argc, char **argv) { | |
242 | + int argc, const char **argv) { | |
243 | if (argc != 2) { | |
244 | Tcl_SetResult(interp, "wrong # of args", TCL_STATIC); | |
245 | return TCL_ERROR; | |
246 | @@ -245,7 +245,7 @@ | |
247 | } | |
248 | ||
249 | int roe_show_object(ClientData clientData, Tcl_Interp *interp, | |
250 | - int argc, char **argv) { | |
251 | + int argc, const char **argv) { | |
252 | ||
253 | if (argc != 4) { | |
254 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
255 | @@ -260,7 +260,7 @@ | |
256 | } | |
257 | ||
258 | int roe_read_bgp_dump(ClientData clientData, Tcl_Interp *interp, | |
259 | - int argc, char **argv) { | |
260 | + int argc, const char **argv) { | |
261 | ||
262 | if (argc != 2) { | |
263 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
264 | @@ -273,7 +273,7 @@ | |
265 | } | |
266 | ||
267 | int roe_object_delete(ClientData clientData, Tcl_Interp *interp, | |
268 | - int argc, char **argv) { | |
269 | + int argc, const char **argv) { | |
270 | ||
271 | if (argc != 2) { | |
272 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
273 | @@ -286,7 +286,7 @@ | |
274 | } | |
275 | ||
276 | int roe_object_add(ClientData clientData, Tcl_Interp *interp, | |
277 | - int argc, char **argv) { | |
278 | + int argc, const char **argv) { | |
279 | ||
280 | if (argc != 2) { | |
281 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
282 | @@ -299,7 +299,7 @@ | |
283 | } | |
284 | ||
285 | int roe_object_update(ClientData clientData, Tcl_Interp *interp, | |
286 | - int argc, char **argv) { | |
287 | + int argc, const char **argv) { | |
288 | ||
289 | if (argc != 2) { | |
290 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
291 | @@ -312,7 +312,7 @@ | |
292 | } | |
293 | ||
294 | int roe_object_schedule(ClientData clientData, Tcl_Interp *interp, | |
295 | - int argc, char **argv) { | |
296 | + int argc, const char **argv) { | |
297 | ||
298 | if (argc != 1) { | |
299 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
300 | @@ -325,7 +325,7 @@ | |
301 | } | |
302 | ||
303 | int roe_select_transaction(ClientData clientData, Tcl_Interp *interp, | |
304 | - int argc, char **argv) { | |
305 | + int argc, const char **argv) { | |
306 | ||
307 | if (argc != 2) { | |
308 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
309 | @@ -338,7 +338,7 @@ | |
310 | } | |
311 | ||
312 | int roe_cancel_transaction(ClientData clientData, Tcl_Interp *interp, | |
313 | - int argc, char **argv) { | |
314 | + int argc, const char **argv) { | |
315 | ||
316 | if (argc != 2) { | |
317 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
318 | @@ -352,7 +352,7 @@ | |
319 | } | |
320 | ||
321 | int roe_add_selected(ClientData clientData, Tcl_Interp *interp, | |
322 | - int argc, char **argv) { | |
323 | + int argc, const char **argv) { | |
324 | ||
325 | if (argc != 2) { | |
326 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
327 | @@ -365,7 +365,7 @@ | |
328 | } | |
329 | ||
330 | int roe_del_selected(ClientData clientData, Tcl_Interp *interp, | |
331 | - int argc, char **argv) { | |
332 | + int argc, const char **argv) { | |
333 | ||
334 | if (argc != 2) { | |
335 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
336 | @@ -378,7 +378,7 @@ | |
337 | } | |
338 | ||
339 | int roe_del_selected_matching_source(ClientData clientData, Tcl_Interp *interp, | |
340 | - int argc, char **argv) { | |
341 | + int argc, const char **argv) { | |
342 | ||
343 | if (argc != 3) { | |
344 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
345 | @@ -391,7 +391,7 @@ | |
346 | } | |
347 | ||
348 | int roe_config_tmpl(ClientData clientData, Tcl_Interp *interp, | |
349 | - int argc, char **argv) { | |
350 | + int argc, const char **argv) { | |
351 | ||
352 | if (argc != 1) { | |
353 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
354 | @@ -404,7 +404,7 @@ | |
355 | } | |
356 | ||
357 | int roe_config_tmpl_apply(ClientData clientData, Tcl_Interp *interp, | |
358 | - int argc, char **argv) { | |
359 | + int argc, const char **argv) { | |
360 | ||
361 | if (argc != 1) { | |
362 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
363 | @@ -417,7 +417,7 @@ | |
364 | } | |
365 | ||
366 | int roe_config_irr(ClientData clientData, Tcl_Interp *interp, | |
367 | - int argc, char **argv) { | |
368 | + int argc, const char **argv) { | |
369 | ||
370 | if (argc != 1) { | |
371 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
372 | @@ -430,7 +430,7 @@ | |
373 | } | |
374 | ||
375 | int roe_config_irr_apply(ClientData clientData, Tcl_Interp *interp, | |
376 | - int argc, char **argv) { | |
377 | + int argc, const char **argv) { | |
378 | ||
379 | if (argc != 1) { | |
380 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
381 | @@ -443,7 +443,7 @@ | |
382 | } | |
383 | ||
384 | int roe_config_revert(ClientData clientData, Tcl_Interp *interp, | |
385 | - int argc, char **argv) { | |
386 | + int argc, const char **argv) { | |
387 | ||
388 | if (argc != 1) { | |
389 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
390 | @@ -456,7 +456,7 @@ | |
391 | } | |
392 | ||
393 | int roe_config_load(ClientData clientData, Tcl_Interp *interp, | |
394 | - int argc, char **argv) { | |
395 | + int argc, const char **argv) { | |
396 | ||
397 | if (argc != 1) { | |
398 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
399 | @@ -469,7 +469,7 @@ | |
400 | } | |
401 | ||
402 | int roe_config_save(ClientData clientData, Tcl_Interp *interp, | |
403 | - int argc, char **argv) { | |
404 | + int argc, const char **argv) { | |
405 | ||
406 | if (argc != 1) { | |
407 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
408 | @@ -482,7 +482,7 @@ | |
409 | } | |
410 | ||
411 | int roe_get_more_specifics(ClientData clientData, Tcl_Interp *interp, | |
412 | - int argc, char **argv) { | |
413 | + int argc, const char **argv) { | |
414 | ||
415 | if (argc != 2) { | |
416 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
417 | @@ -495,7 +495,7 @@ | |
418 | } | |
419 | ||
420 | int roe_get_less_specifics(ClientData clientData, Tcl_Interp *interp, | |
421 | - int argc, char **argv) { | |
422 | + int argc, const char **argv) { | |
423 | ||
424 | if (argc != 2) { | |
425 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
426 | @@ -508,7 +508,7 @@ | |
427 | } | |
428 | ||
429 | int roe_update_irr(ClientData clientData, Tcl_Interp *interp, | |
430 | - int argc, char **argv) { | |
431 | + int argc, const char **argv) { | |
432 | ||
433 | if (argc != 1) { | |
434 | Tcl_SetResult (interp, "wrong # of args", TCL_STATIC); | |
435 | --- IRRToolSet-4.7.3/src/roe/object.hh.orig Tue Apr 9 13:48:48 2002 | |
436 | +++ IRRToolSet-4.7.3/src/roe/object.hh Tue Jul 8 17:07:33 2003 | |
437 | @@ -59,7 +59,7 @@ | |
438 | ||
439 | class RoeObject { | |
440 | public: | |
441 | - void display(char *dbase, ASt as, char *rt); | |
442 | + void display(const char *dbase, ASt as, const char *rt); | |
443 | void del(int index); | |
444 | void add(int index); | |
445 | void upd(int index); | |
446 | --- IRRToolSet-4.7.3/src/roe/route-list.hh.orig Tue Apr 9 13:48:48 2002 | |
447 | +++ IRRToolSet-4.7.3/src/roe/route-list.hh Tue Jul 8 17:11:06 2003 | |
448 | @@ -172,9 +172,9 @@ | |
449 | ||
450 | void init(void); | |
451 | void load(ASt _as); | |
452 | - void read_bgp_dump(char *fname); | |
453 | - void get_more_specifics(char *selection); | |
454 | - void get_less_specifics(char *selection); | |
455 | + void read_bgp_dump(const char *fname); | |
456 | + void get_more_specifics(const char *selection); | |
457 | + void get_less_specifics(const char *selection); | |
458 | ||
459 | Route *operator() (int index) { | |
460 | return vrdisplayed[index]; | |
461 | --- IRRToolSet-4.7.3/src/roe/schedule.hh.orig Tue Apr 9 13:48:48 2002 | |
462 | +++ IRRToolSet-4.7.3/src/roe/schedule.hh Tue Jul 8 17:10:33 2003 | |
463 | @@ -90,9 +90,9 @@ | |
464 | void add(); | |
465 | void select(int index); | |
466 | void cancel(int index); | |
467 | - void add_selected(char *selection); | |
468 | - void del_selected(char *selection); | |
469 | - void del_selected_matching_source(char *selection, char *dbase); | |
470 | + void add_selected(const char *selection); | |
471 | + void del_selected(const char *selection); | |
472 | + void del_selected_matching_source(const char *selection, const char *dbase); | |
473 | void update_irr(); | |
474 | private: | |
475 | void add_internal(char *text); | |
476 | --- IRRToolSet-4.7.3/src/roe/object.cc.orig Tue Apr 9 13:48:48 2002 | |
477 | +++ IRRToolSet-4.7.3/src/roe/object.cc Tue Jul 8 17:13:24 2003 | |
478 | @@ -69,7 +69,7 @@ | |
479 | tcl_Eval(".object.text configure -state disabled"); | |
480 | } | |
481 | ||
482 | -void RoeObject::display(char *dbase, ASt as, char *rt) { | |
483 | +void RoeObject::display(const char *dbase, ASt as, const char *rt) { | |
484 | Route *route = NULL; | |
485 | ||
486 | tcl_Eval(".object.text configure -state normal"); | |
487 | @@ -88,7 +88,7 @@ | |
488 | whois->SetSources(dbase); | |
489 | // Modified by wlee@isi.edu | |
490 | // int code = whois->QueryResponse(buffer, "!mrt,%s-AS%d", rt, as); | |
491 | - whois->getRoute(route, rt, as); | |
492 | + whois->getRoute(route, (char*)rt, as); | |
493 | ||
494 | whois->SetSources(); | |
495 | ||
496 | --- IRRToolSet-4.7.3/src/roe/route-list.cc.orig Tue Jun 18 13:00:11 2002 | |
497 | +++ IRRToolSet-4.7.3/src/roe/route-list.cc Tue Jul 8 17:14:50 2003 | |
498 | @@ -523,7 +523,7 @@ | |
499 | get_registrations_init(rlist.head()); | |
500 | } | |
501 | ||
502 | -void RouteList::read_bgp_dump(char *fname) { | |
503 | +void RouteList::read_bgp_dump(const char *fname) { | |
504 | char r[1024]; | |
505 | char *status; | |
506 | Pix rpix; | |
507 | @@ -605,7 +605,7 @@ | |
508 | return true; | |
509 | } | |
510 | ||
511 | -void RouteList::get_more_specifics(char *selection) { | |
512 | +void RouteList::get_more_specifics(const char *selection) { | |
513 | RouteList::Route *vr; | |
514 | Route *tail; | |
515 | ||
516 | @@ -613,7 +613,7 @@ | |
517 | ||
518 | tail = rlist.tail(); | |
519 | ||
520 | - for (char *s = strtok(selection, " \t"); s; s = strtok(NULL, " \t")) { | |
521 | + for (char *s = strtok((char*)selection, " \t"); s; s = strtok(NULL, " \t")) { | |
522 | vr = vrdisplayed[atoi(s)]; | |
523 | RadixNode *rdnode = irr_radix->find(&vr->route); | |
524 | if (rdnode) { | |
525 | @@ -661,7 +661,7 @@ | |
526 | get_more_specifics_add(rdnode->rght); | |
527 | } | |
528 | ||
529 | -void RouteList::get_less_specifics(char *selection) { | |
530 | +void RouteList::get_less_specifics(const char *selection) { | |
531 | RouteList::Route *vr; | |
532 | Route *tail; | |
533 | RadixNode *irr_node; | |
534 | @@ -671,7 +671,7 @@ | |
535 | ||
536 | tail = rlist.tail(); | |
537 | ||
538 | - for (char *s = strtok(selection, " \t"); s; s = strtok(NULL, " \t")) { | |
539 | + for (char *s = strtok((char*)selection, " \t"); s; s = strtok(NULL, " \t")) { | |
540 | vr = vrdisplayed[atoi(s)]; | |
541 | irr_node = irr_radix->find(&vr->route); | |
542 | node = radix.find(&vr->route); | |
543 | --- IRRToolSet-4.7.3/src/roe/schedule.cc.orig Tue Apr 9 13:48:48 2002 | |
544 | +++ IRRToolSet-4.7.3/src/roe/schedule.cc Tue Jul 8 17:15:43 2003 | |
545 | @@ -170,11 +170,11 @@ | |
546 | tcl_Eval(".object.text configure -state disabled"); | |
547 | } | |
548 | ||
549 | -void Schedule::add_selected(char *selection) { | |
550 | +void Schedule::add_selected(const char *selection) { | |
551 | RouteList::Route *r; | |
552 | char buffer[64]; | |
553 | ||
554 | - for (char *s = strtok(selection, " \t"); s; s = strtok(NULL, " \t")) { | |
555 | + for (char *s = strtok((char*)selection, " \t"); s; s = strtok(NULL, " \t")) { | |
556 | r = routelist(atoi(s)); | |
557 | ||
558 | tcl_Eval("set AS AS%d", routelist.as); | |
559 | @@ -186,12 +186,12 @@ | |
560 | } | |
561 | } | |
562 | ||
563 | -void Schedule::del_selected(char *selection) { | |
564 | +void Schedule::del_selected(const char *selection) { | |
565 | RouteList::Route *r; | |
566 | RouteList::Route::db_as *p; | |
567 | Route *route = NULL; | |
568 | ||
569 | - for (char *s = strtok(selection, " \t"); s; s = strtok(NULL, " \t")) { | |
570 | + for (char *s = strtok((char*)selection, " \t"); s; s = strtok(NULL, " \t")) { | |
571 | r = routelist(atoi(s)); | |
572 | for (p = r->db_as_l.head(); p; p = r->db_as_l.next(p)) { | |
573 | // Modified by wlee@isi.edu | |
574 | @@ -227,12 +227,12 @@ | |
575 | } | |
576 | } | |
577 | ||
578 | -void Schedule::del_selected_matching_source(char *selection, char *dbase) { | |
579 | +void Schedule::del_selected_matching_source(const char *selection, const char *dbase) { | |
580 | RouteList::Route *r; | |
581 | RouteList::Route::db_as *p; | |
582 | Route *route = NULL; | |
583 | ||
584 | - for (char *s = strtok(selection, " \t"); s; s = strtok(NULL, " \t")) { | |
585 | + for (char *s = strtok((char*)selection, " \t"); s; s = strtok(NULL, " \t")) { | |
586 | r = routelist(atoi(s)); | |
587 | for (p = r->db_as_l.head(); p; p = r->db_as_l.next(p)) { | |
588 | if (!strcmp(dbase, p->db)) { | |
589 | --- IRRToolSet-4.7.3/src/roe/roe_config.cc.orig Tue Apr 9 13:48:48 2002 | |
590 | +++ IRRToolSet-4.7.3/src/roe/roe_config.cc Tue Jul 8 17:17:16 2003 | |
591 | @@ -182,12 +182,11 @@ | |
592 | } | |
593 | ||
594 | void Configure::config_tmpl() { | |
595 | - tcl_Eval(" | |
596 | -if {[winfo exists .config_tmpl]} { | |
597 | - wm deiconify .config_tmpl | |
598 | - set a 1 | |
599 | -} else {set a 0} | |
600 | -"); | |
601 | + tcl_Eval("\n" | |
602 | +"if {[winfo exists .config_tmpl]} {\n" | |
603 | +" wm deiconify .config_tmpl\n" | |
604 | +" set a 1\n" | |
605 | +"} else {set a 0} \n"); | |
606 | ||
607 | if (*(interp->result) != '0') // already displaying a config window | |
608 | return; | |
609 | @@ -218,12 +217,11 @@ | |
610 | } | |
611 | ||
612 | void Configure::config_irr() { | |
613 | - tcl_Eval(" | |
614 | -if {[winfo exists .config_irr]} { | |
615 | - wm deiconify .config_irr | |
616 | - set a 1 | |
617 | -} else {set a 0} | |
618 | -"); | |
619 | + tcl_Eval("\n" | |
620 | +"if {[winfo exists .config_irr]} {\n" | |
621 | +" wm deiconify .config_irr\n" | |
622 | +" set a 1\n" | |
623 | +"} else {set a 0} \n"); | |
624 | ||
625 | if (*(interp->result) != '0') // already displaying a config window | |
626 | return; | |
627 | @@ -236,11 +234,11 @@ | |
628 | #endif // LOAD_FILE | |
629 | ||
630 | for (int i = 0; *dbupdate[i].source; ++i) | |
631 | - tcl_Eval("label .config_irr.source.label.x%s -text %s: | |
632 | -entry .config_irr.source.entry.x%s -relief sunken -bd 2 -width 30 | |
633 | -pack .config_irr.source.label.x%s -side top -anchor e -ipady 3 -expand true | |
634 | -pack .config_irr.source.entry.x%s -side top -fill both -expand 1 -pady 1 -padx 1 | |
635 | -.config_irr.source.entry.x%s insert 0 {%s}", | |
636 | + tcl_Eval("label .config_irr.source.label.x%s -text %s:\n" | |
637 | +"entry .config_irr.source.entry.x%s -relief sunken -bd 2 -width 30\n" | |
638 | +"pack .config_irr.source.label.x%s -side top -anchor e -ipady 3 -expand true\n" | |
639 | +"pack .config_irr.source.entry.x%s -side top -fill both -expand 1 -pady 1 -padx 1\n" | |
640 | +".config_irr.source.entry.x%s insert 0 {%s}", | |
641 | dbupdate[i].source, dbupdate[i].source, dbupdate[i].source, | |
642 | dbupdate[i].source, dbupdate[i].source, dbupdate[i].source, | |
643 | dbupdate[i].update); | |
87c5a552 JB |
644 | --- IRRToolSet-4.7.3/src/aoe/aoe.hh.orig Tue Apr 9 13:48:46 2002 |
645 | +++ IRRToolSet-4.7.3/src/aoe/aoe.hh Wed Jul 9 09:54:31 2003 | |
646 | @@ -77,7 +77,7 @@ | |
647 | class ListPeer : public TclCommand | |
648 | { | |
649 | protected: | |
650 | - virtual int command(int argc, char *argv[]); | |
651 | + virtual int command(int argc, const char *argv[]); | |
652 | ||
653 | private: | |
654 | int updateWindowTitle(TclApplication *pcApp, int iCategory, | |
655 | @@ -105,7 +105,7 @@ | |
656 | class LoadBgpDump : public TclCommand | |
657 | { | |
658 | protected: | |
659 | - virtual int command(int argc, char *argv[]); | |
660 | + virtual int command(int argc, const char *argv[]); | |
661 | ||
662 | public: | |
663 | LoadBgpDump(char *pzcName) : TclCommand(pzcName) {} | |
664 | @@ -115,7 +115,7 @@ | |
665 | class UpdatePolicy : public TclCommand | |
666 | { | |
667 | protected: | |
668 | - virtual int command(int argc, char *argv[]); | |
669 | + virtual int command(int argc, const char *argv[]); | |
670 | ||
671 | private: | |
672 | int append(void); | |
673 | @@ -139,7 +139,7 @@ | |
674 | class EditPolicyText : public TclCommand | |
675 | { | |
676 | protected: | |
677 | - virtual int command(int argc, char *argv[]); | |
678 | + virtual int command(int argc, const char *argv[]); | |
679 | ||
680 | public: | |
681 | EditPolicyText(char *pzcName) : TclCommand(pzcName) {} | |
682 | @@ -148,7 +148,7 @@ | |
683 | class ShowPolicyText : public TclCommand | |
684 | { | |
685 | protected: | |
686 | - virtual int command(int argc, char *argv[]); | |
687 | + virtual int command(int argc, const char *argv[]); | |
688 | ||
689 | public: | |
690 | ShowPolicyText(char *pzcName) : TclCommand(pzcName) {} | |
691 | @@ -157,7 +157,7 @@ | |
692 | class FileOpen : public TclCommand | |
693 | { | |
694 | protected: | |
695 | - virtual int command(int argc, char *argv[]); | |
696 | + virtual int command(int argc, const char *argv[]); | |
697 | ||
698 | public: | |
699 | FileOpen(char *pzcName) : TclCommand(pzcName) {} | |
700 | @@ -166,7 +166,7 @@ | |
701 | class FileSave : public TclCommand | |
702 | { | |
703 | protected: | |
704 | - virtual int command(int argc, char *argv[]); | |
705 | + virtual int command(int argc, const char *argv[]); | |
706 | ||
707 | public: | |
708 | FileSave(char *pzcName) : TclCommand(pzcName) {} | |
709 | @@ -175,7 +175,7 @@ | |
710 | class ListSave : public TclCommand // katie@ripe.net for peers save | |
711 | { | |
712 | protected: | |
713 | - virtual int command(int argc, char *argv[]); | |
714 | + virtual int command(int argc, const char *argv[]); | |
715 | ||
716 | public: | |
717 | ListSave(char *pzcName) : TclCommand(pzcName) {} | |
718 | @@ -184,7 +184,7 @@ | |
719 | class FileRevert : public TclCommand | |
720 | { | |
721 | protected: | |
722 | - virtual int command(int argc, char *argv[]); | |
723 | + virtual int command(int argc, const char *argv[]); | |
724 | ||
725 | public: | |
726 | FileRevert(char *pzcName) : TclCommand(pzcName) {} | |
727 | @@ -193,7 +193,7 @@ | |
728 | class FilePrint : public TclCommand | |
729 | { | |
730 | protected: | |
731 | - virtual int command(int argc, char *argv[]); | |
732 | + virtual int command(int argc, const char *argv[]); | |
733 | ||
734 | public: | |
735 | FilePrint(char *pzcName) : TclCommand(pzcName) {} | |
736 | @@ -203,7 +203,7 @@ | |
737 | class AddPeer : public TclCommand | |
738 | { | |
739 | protected: | |
740 | - virtual int command(int argc, char *argv[]); | |
741 | + virtual int command(int argc, const char *argv[]); | |
742 | ||
743 | public: | |
744 | AddPeer(char *pzcName) : TclCommand(pzcName) {} | |
745 | @@ -213,7 +213,7 @@ | |
746 | class DeletePeer: public TclCommand | |
747 | { | |
748 | protected: | |
749 | - virtual int command(int argc, char *argv[]); | |
750 | + virtual int command(int argc, const char *argv[]); | |
751 | ||
752 | public: | |
753 | DeletePeer(char *pzcName) : TclCommand(pzcName) {} | |
754 | @@ -223,7 +223,7 @@ | |
755 | class CreatePolicyTemplateMenu : public TclCommand | |
756 | { | |
757 | protected: | |
758 | - virtual int command(int argc, char *argv[]); | |
759 | + virtual int command(int argc, const char *argv[]); | |
760 | ||
761 | public: | |
762 | CreatePolicyTemplateMenu(char *pzcName) : TclCommand(pzcName) {} | |
763 | --- IRRToolSet-4.7.3/src/aoe/aoe.cc.orig Tue Apr 9 13:48:46 2002 | |
764 | +++ IRRToolSet-4.7.3/src/aoe/aoe.cc Wed Jul 9 09:56:04 2003 | |
765 | @@ -365,7 +365,7 @@ | |
766 | int ListPeer::updateWindowTitle(TclApplication *pcTcl, int iCategory, | |
767 | char *pzcASNo) | |
768 | { | |
769 | - char *title, *dummy = "Shouldn't happen!"; | |
770 | + const char *title, *dummy = "Shouldn't happen!"; | |
771 | char pzcBuffer[128]; | |
772 | AoeApplication *pcApp = (AoeApplication *)pcTcl; | |
773 | switch (iCategory) | |
774 | @@ -566,7 +566,7 @@ | |
775 | // import | |
776 | sprintf(pzcBuffer, "PolicyTemplate(%d,import)", iCategory - 4); | |
777 | ss << "import: " | |
778 | - << substitute(pcApp->getVar(pzcBuffer), pzcMyAS, pzcPeerAS) | |
779 | + << substitute((char*)pcApp->getVar(pzcBuffer), pzcMyAS, pzcPeerAS) | |
780 | << endl; | |
781 | } | |
782 | if (iExport) | |
783 | @@ -574,7 +574,7 @@ | |
784 | // export | |
785 | sprintf(pzcBuffer, "PolicyTemplate(%d,export)", iCategory - 4); | |
786 | ss << "export: " | |
787 | - << substitute(pcApp->getVar(pzcBuffer), pzcMyAS, pzcPeerAS) | |
788 | + << substitute((char*)pcApp->getVar(pzcBuffer), pzcMyAS, pzcPeerAS) | |
789 | << endl; | |
790 | } | |
791 | // Fill the text widget | |
792 | @@ -626,7 +626,7 @@ | |
793 | return pzcBuffer; | |
794 | } | |
795 | ||
796 | -int ListPeer::command(int argc, char *argv[]) | |
797 | +int ListPeer::command(int argc, const char *argv[]) | |
798 | { | |
799 | if (argc != 2) return TCL_ERROR; | |
800 | AoeApplication *pcApp = (AoeApplication *)getExtraArgument(); | |
801 | @@ -723,7 +723,7 @@ | |
802 | } | |
803 | ||
804 | ||
805 | -int LoadBgpDump::command(int argc, char *argv[]) | |
806 | +int LoadBgpDump::command(int argc, const char *argv[]) | |
807 | { | |
808 | if (argc != 2) return TCL_ERROR; | |
809 | AoeApplication *pcApp = (AoeApplication *)getExtraArgument(); | |
810 | @@ -748,10 +748,10 @@ | |
811 | return TCL_OK; | |
812 | } | |
813 | ||
814 | -int UpdatePolicy::command(int argc, char *argv[]) | |
815 | +int UpdatePolicy::command(int argc, const char *argv[]) | |
816 | { | |
817 | if (argc != 3) return TCL_ERROR; | |
818 | - char *pzcOption = argv[1]; | |
819 | + const char *pzcOption = argv[1]; | |
820 | int iTarget = atoi(argv[2]); | |
821 | int iResult = TCL_ERROR; | |
822 | if (strcmp(pzcOption, "append") == 0) | |
823 | @@ -801,7 +801,7 @@ | |
824 | } | |
825 | */ | |
826 | ||
827 | -int EditPolicyText::command(int argc, char *argv[]) | |
828 | +int EditPolicyText::command(int argc, const char *argv[]) | |
829 | { | |
830 | if (argc != 1) return TCL_ERROR; | |
831 | AoeApplication *pcApp = (AoeApplication *)getExtraArgument(); | |
832 | @@ -819,7 +819,7 @@ | |
833 | return TCL_OK; | |
834 | } | |
835 | ||
836 | -int ShowPolicyText::command(int argc, char *argv[]) | |
837 | +int ShowPolicyText::command(int argc, const char *argv[]) | |
838 | { | |
839 | if (argc != 1) return TCL_ERROR; | |
840 | AoeApplication *pcApp = (AoeApplication *)getExtraArgument(); | |
841 | @@ -867,7 +867,7 @@ | |
842 | return TCL_OK; | |
843 | } | |
844 | ||
845 | -int FileOpen::command(int argc, char *argv[]) | |
846 | +int FileOpen::command(int argc, const char *argv[]) | |
847 | { | |
848 | if (argc != 2) return TCL_ERROR; | |
849 | AoeApplication *pcApp = (AoeApplication *)getExtraArgument(); | |
850 | @@ -898,7 +898,7 @@ | |
851 | return iResult; | |
852 | } | |
853 | ||
854 | -int FileSave::command(int argc, char *argv[]) | |
855 | +int FileSave::command(int argc, const char *argv[]) | |
856 | { | |
857 | if (argc != 2) return TCL_ERROR; | |
858 | AoeApplication *pcApp = (AoeApplication *)getExtraArgument(); | |
859 | @@ -910,7 +910,7 @@ | |
860 | } | |
861 | ||
862 | // by katie@ripe.net for saving the peer list with status | |
863 | -int ListSave::command(int argc, char *argv[]) | |
864 | +int ListSave::command(int argc, const char *argv[]) | |
865 | { | |
866 | if (argc != 2) return TCL_ERROR; | |
867 | AoeApplication *pcApp = (AoeApplication *)getExtraArgument(); | |
868 | @@ -930,7 +930,7 @@ | |
869 | } | |
870 | ||
871 | ||
872 | -int FileRevert::command(int argc, char *argv[]) | |
873 | +int FileRevert::command(int argc, const char *argv[]) | |
874 | { | |
875 | if (argc != 1) return TCL_ERROR; | |
876 | AoeApplication *pcApp = (AoeApplication *)getExtraArgument(); | |
877 | @@ -945,10 +945,10 @@ | |
878 | return TCL_OK; | |
879 | } | |
880 | ||
881 | -int FilePrint::command(int argc, char *argv[]) | |
882 | +int FilePrint::command(int argc, const char *argv[]) | |
883 | { | |
884 | if (argc != 2) return TCL_ERROR; | |
885 | - char *pzcCommand = argv[1]; | |
886 | + const char *pzcCommand = argv[1]; | |
887 | AoeApplication *pcApp = (AoeApplication *)getExtraArgument(); | |
888 | const char *pzcText; | |
889 | int iLen; | |
890 | @@ -972,7 +972,7 @@ | |
891 | } | |
892 | ||
893 | ||
894 | -int AddPeer::command(int argc, char *argv[]) | |
895 | +int AddPeer::command(int argc, const char *argv[]) | |
896 | { | |
897 | if (argc != 2) return TCL_ERROR; | |
898 | AoeApplication *pcApp = (AoeApplication *)getExtraArgument(); | |
899 | @@ -987,7 +987,7 @@ | |
900 | return TCL_OK; | |
901 | } | |
902 | ||
903 | -int DeletePeer::command(int argc, char *argv[]) | |
904 | +int DeletePeer::command(int argc, const char *argv[]) | |
905 | { | |
906 | if (argc != 2) return TCL_ERROR; | |
907 | AoeApplication *pcApp = (AoeApplication *)getExtraArgument(); | |
908 | @@ -1041,7 +1041,7 @@ | |
909 | } | |
910 | ||
911 | ||
912 | -int CreatePolicyTemplateMenu::command(int argc, char *argv[]) | |
913 | +int CreatePolicyTemplateMenu::command(int argc, const char *argv[]) | |
914 | { | |
915 | if (argc != 1) return TCL_ERROR; | |
916 | AoeApplication *pcApp = (AoeApplication *)getExtraArgument(); | |
917 | @@ -1049,14 +1049,14 @@ | |
918 | for (int i = pcApp->pcCategoryButton->getSize(); i > 4; i--) | |
919 | pcApp->pcCategoryButton->del(i); | |
920 | // Create menu | |
921 | - char *pzcTotal = pcApp->getVar("PolicyTemplate(Total)"); | |
922 | + const char *pzcTotal = pcApp->getVar("PolicyTemplate(Total)"); | |
923 | if (pzcTotal) | |
924 | { | |
925 | for (int i = 0; i < atoi(pzcTotal); i++) | |
926 | { | |
927 | char pzcBuffer[256]; | |
928 | sprintf(pzcBuffer, "PolicyTemplate(%d,Description)", i); | |
929 | - if (!pcApp->pcCategoryButton->add(pcApp->getVar(pzcBuffer), | |
930 | + if (!pcApp->pcCategoryButton->add((char*)pcApp->getVar(pzcBuffer), | |
931 | "listPeer [.body.aspeer.listbox.list curselection]")) | |
932 | return TCL_ERROR; | |
933 | } |