comparison host/libcdl/interface.cxx @ 343:fbfd52cf7976

Try to resolve problems caused by API changes in Tcl 8.4, related to the use of const
author bartv
date Sat, 21 Sep 2002 22:05:08 +0000
parents 6ed91473a1cd
children
comparison
equal deleted inserted replaced
342:cac491d76066 343:fbfd52cf7976
8 // 8 //
9 //============================================================================ 9 //============================================================================
10 //####COPYRIGHTBEGIN#### 10 //####COPYRIGHTBEGIN####
11 // 11 //
12 // ---------------------------------------------------------------------------- 12 // ----------------------------------------------------------------------------
13 // Copyright (C) 2002 Bart Veer
13 // Copyright (C) 1999, 2000 Red Hat, Inc. 14 // Copyright (C) 1999, 2000 Red Hat, Inc.
14 // 15 //
15 // This file is part of the eCos host tools. 16 // This file is part of the eCos host tools.
16 // 17 //
17 // This program is free software; you can redistribute it and/or modify it 18 // This program is free software; you can redistribute it and/or modify it
110 // ---------------------------------------------------------------------------- 111 // ----------------------------------------------------------------------------
111 // Parsing an interface definition. This is basically the same as parsing 112 // Parsing an interface definition. This is basically the same as parsing
112 // an option, component, or package. 113 // an option, component, or package.
113 114
114 int 115 int
115 CdlInterfaceBody::parse_interface(CdlInterpreter interp, int argc, char** argv) 116 CdlInterfaceBody::parse_interface(CdlInterpreter interp, int argc, const char* argv[])
116 { 117 {
117 CYG_REPORT_FUNCNAMETYPE("CdlInterface::parse_interface", "result %d"); 118 CYG_REPORT_FUNCNAMETYPE("CdlInterface::parse_interface", "result %d");
118 CYG_REPORT_FUNCARG1("argc %d", argc); 119 CYG_REPORT_FUNCARG1("argc %d", argc);
119 CYG_PRECONDITION_CLASSC(interp); 120 CYG_PRECONDITION_CLASSC(interp);
120 121
141 // Currently there are no command-line options. This may change in future. 142 // Currently there are no command-line options. This may change in future.
142 if (3 != argc) { 143 if (3 != argc) {
143 CdlParse::report_error(interp, "", std::string("Incorrect number of arguments to `") + diag_argv0 + 144 CdlParse::report_error(interp, "", std::string("Incorrect number of arguments to `") + diag_argv0 +
144 "'\nExpecting name and properties list."); 145 "'\nExpecting name and properties list.");
145 ok = false; 146 ok = false;
146 } else if (!Tcl_CommandComplete(argv[2])) { 147 } else if (!Tcl_CommandComplete(CDL_TCL_CONST_CAST(char*, argv[2]))) {
147 CdlParse::report_error(interp, "", std::string("Invalid property list for cdl_interface `") + argv[1] + "'."); 148 CdlParse::report_error(interp, "", std::string("Invalid property list for cdl_interface `") + argv[1] + "'.");
148 ok = false; 149 ok = false;
149 } else if (0 != toplevel->lookup(argv[1])) { 150 } else if (0 != toplevel->lookup(argv[1])) {
150 // FIXME: interfaces can be generated implicitly because of an 151 // FIXME: interfaces can be generated implicitly because of an
151 // unresolved implements property. This code should look for 152 // unresolved implements property. This code should look for
375 376
376 CYG_REPORT_RETURN(); 377 CYG_REPORT_RETURN();
377 } 378 }
378 379
379 int 380 int
380 CdlInterfaceBody::savefile_interface_command(CdlInterpreter interp, int argc, char** argv) 381 CdlInterfaceBody::savefile_interface_command(CdlInterpreter interp, int argc, const char* argv[])
381 { 382 {
382 CYG_REPORT_FUNCNAMETYPE("CdlInterface::savefile_interface_command", "result %d"); 383 CYG_REPORT_FUNCNAMETYPE("CdlInterface::savefile_interface_command", "result %d");
383 CYG_PRECONDITION_CLASSC(interp); 384 CYG_PRECONDITION_CLASSC(interp);
384 385
385 int result = TCL_OK; 386 int result = TCL_OK;