diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-06-06 22:04:20 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-06-06 22:04:20 +0000 |
commit | c4eb182de5c3481feecee6c003788962cf4dba17 (patch) | |
tree | 8f5594ac27bd416262522f901aee4e3e06bc82bc | |
parent | 2862ddf29fd9a5b498ec013901c77c570f98c37b (diff) | |
download | ATCD-c4eb182de5c3481feecee6c003788962cf4dba17.tar.gz |
.
-rw-r--r-- | TAO/TAO_IDL/ast/ast_argument.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/ast/ast_constant.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/ast/ast_expression.cpp | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/driver/drv_args.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/driver/drv_preproc.cpp | 28 | ||||
-rw-r--r-- | TAO/TAO_IDL/driver/drv_private.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/fe_init.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/fe_lookup.cpp | 8 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/idl.ll | 6 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/keywords.dat | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/lex.yy.cpp | 8 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/drv_extern.h | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/drv_private.h | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/idl_global.h | 26 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/utl_identifier.h | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/include/utl_string.h | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/tao_idl.cpp | 9 | ||||
-rw-r--r-- | TAO/TAO_IDL/util/utl_global.cpp | 22 | ||||
-rw-r--r-- | TAO/TAO_IDL/util/utl_identifier.cpp | 2 | ||||
-rw-r--r-- | TAO/TAO_IDL/util/utl_string.cpp | 2 |
20 files changed, 68 insertions, 73 deletions
diff --git a/TAO/TAO_IDL/ast/ast_argument.cpp b/TAO/TAO_IDL/ast/ast_argument.cpp index 149e04849f7..2636c9918de 100644 --- a/TAO/TAO_IDL/ast/ast_argument.cpp +++ b/TAO/TAO_IDL/ast/ast_argument.cpp @@ -86,7 +86,7 @@ ACE_RCSID(ast, ast_argument, "$Id$") /* * Convert an enum Direction value to a char * */ -static char * +static const char * direction_to_string(AST_Argument::Direction d) { switch (d) { diff --git a/TAO/TAO_IDL/ast/ast_constant.cpp b/TAO/TAO_IDL/ast/ast_constant.cpp index f8a2bdb19d7..c6ce655a3b6 100644 --- a/TAO/TAO_IDL/ast/ast_constant.cpp +++ b/TAO/TAO_IDL/ast/ast_constant.cpp @@ -87,7 +87,7 @@ ACE_RCSID(ast, ast_constant, "$Id$") /* * Convert a value from the enum AST_Expression::ExprType to a char * */ -static char * +static const char * exprtype_to_string(AST_Expression::ExprType et) { switch (et) { diff --git a/TAO/TAO_IDL/ast/ast_expression.cpp b/TAO/TAO_IDL/ast/ast_expression.cpp index a9e0239f8b1..348645d689a 100644 --- a/TAO/TAO_IDL/ast/ast_expression.cpp +++ b/TAO/TAO_IDL/ast/ast_expression.cpp @@ -1821,7 +1821,7 @@ AST_Expression::compare(AST_Expression *vc) * Dump this binary AST_Expression node to the ostream o */ static void -dump_binary_expr(ostream &o, char *s, AST_Expression *n1, AST_Expression *n2) +dump_binary_expr(ostream &o, const char *s, AST_Expression *n1, AST_Expression *n2) { if (n1 != NULL) n1->dump(o); o << " " << s << " "; @@ -1832,7 +1832,7 @@ dump_binary_expr(ostream &o, char *s, AST_Expression *n1, AST_Expression *n2) * Dump this unary AST_Expression node to the ostream o */ static void -dump_unary_expr(ostream &o, char *s, AST_Expression *e) +dump_unary_expr(ostream &o, const char *s, AST_Expression *e) { o << s; e->dump(o); diff --git a/TAO/TAO_IDL/driver/drv_args.cpp b/TAO/TAO_IDL/driver/drv_args.cpp index 01b15af6cfe..113a89cf5cd 100644 --- a/TAO/TAO_IDL/driver/drv_args.cpp +++ b/TAO/TAO_IDL/driver/drv_args.cpp @@ -81,7 +81,7 @@ ACE_RCSID(driver, drv_args, "$Id$") * Push a file into the list of files to be processed */ static void -DRV_push_file(char *s) +DRV_push_file(const char *s) { DRV_files[DRV_nfiles++] = s; } diff --git a/TAO/TAO_IDL/driver/drv_preproc.cpp b/TAO/TAO_IDL/driver/drv_preproc.cpp index c04c6a7c920..98cb65c632a 100644 --- a/TAO/TAO_IDL/driver/drv_preproc.cpp +++ b/TAO/TAO_IDL/driver/drv_preproc.cpp @@ -82,14 +82,14 @@ ACE_RCSID(driver, drv_preproc, "$Id$") #undef MAX_ARGLIST #define MAX_ARGLIST 128 -static char *arglist[MAX_ARGLIST]; +static const char *arglist[MAX_ARGLIST]; static long argcount = 0; /* * Push the new CPP location if we got a -Yp argument */ void -DRV_cpp_new_location(char *new_loc) +DRV_cpp_new_location(const char *new_loc) { arglist[0] = new_loc; } @@ -98,7 +98,7 @@ DRV_cpp_new_location(char *new_loc) * Push an argument into the arglist */ void -DRV_cpp_putarg(char *str) +DRV_cpp_putarg(const char *str) { if (argcount >= MAX_ARGLIST) { cerr << idl_global->prog_name() @@ -114,11 +114,11 @@ DRV_cpp_putarg(char *str) * Initialize the cpp argument list */ void -DRV_cpp_init() +DRV_cpp_init (void) { // @@ There are two "one time" memory leaks in this function. // They will not blow off the program but should be fixed at some point. - char *cpp_loc; + const char *cpp_loc; // DRV_cpp_putarg("\\cygnus\\H-i386-cygwin32\\bin\\echo"); ACE_Env_Value<char*> cpp_path ("CPP_LOCATION", (char *) 0); @@ -323,10 +323,10 @@ DRV_pre_proc(char *myfile) if (strcmp(myfile, "standard input") == 0) { - idl_global->set_filename((*DRV_FE_new_UTL_String)(tmp_ifile)); - idl_global->set_main_filename((*DRV_FE_new_UTL_String)(tmp_ifile)); - idl_global->set_stripped_filename((*DRV_FE_new_UTL_String)(DRV_stripped_name(tmp_ifile))); - idl_global->set_real_filename((*DRV_FE_new_UTL_String)(tmp_ifile)); + idl_global->set_filename(tmp_ifile); + idl_global->set_main_filename(tmp_ifile); + idl_global->set_stripped_filename(DRV_stripped_name(tmp_ifile)); + idl_global->set_real_filename(tmp_ifile); DRV_copy_input(stdin, tmp_ifile, "standard input"); idl_global->set_read_from_stdin(I_TRUE); } @@ -336,10 +336,10 @@ DRV_pre_proc(char *myfile) DRV_copy_input(fd, tmp_ifile, myfile); fclose(fd); idl_global->set_read_from_stdin(I_FALSE); - idl_global->set_filename((*DRV_FE_new_UTL_String)(myfile)); - idl_global->set_main_filename((*DRV_FE_new_UTL_String)(myfile)); - idl_global->set_stripped_filename((*DRV_FE_new_UTL_String)(DRV_stripped_name(myfile))); - idl_global->set_real_filename((*DRV_FE_new_UTL_String)(tmp_ifile)); + idl_global->set_filename(myfile); + idl_global->set_main_filename(myfile); + idl_global->set_stripped_filename(DRV_stripped_name(myfile)); + idl_global->set_real_filename(tmp_ifile); } // We use ACE instead of the (low level) fork facilities, this also @@ -461,7 +461,7 @@ DRV_check_for_include (const char* buf) return; // Check whether this word is `include` or no. - char* include_str = "include"; + const char* include_str = "include"; for (size_t ii = 0; ii < strlen ("include") && *r != '\0' && *r != ' ' && *r != '\t'; r++, ii++) // Return if it doesn't match. if (include_str [ii] != *r) diff --git a/TAO/TAO_IDL/driver/drv_private.cpp b/TAO/TAO_IDL/driver/drv_private.cpp index 78d0d4f99cc..290979e389f 100644 --- a/TAO/TAO_IDL/driver/drv_private.cpp +++ b/TAO/TAO_IDL/driver/drv_private.cpp @@ -79,7 +79,7 @@ ACE_RCSID(driver, drv_private, "$Id$") # define NFILES 1024 #endif /* ! NFILES */ -char *DRV_files[NFILES]; +const char *DRV_files[NFILES]; long DRV_nfiles = 0; long DRV_file_index = -1; IDL_GlobalData *idl_global = NULL; diff --git a/TAO/TAO_IDL/fe/fe_init.cpp b/TAO/TAO_IDL/fe/fe_init.cpp index e6b0603f151..9e2a4f6b282 100644 --- a/TAO/TAO_IDL/fe/fe_init.cpp +++ b/TAO/TAO_IDL/fe/fe_init.cpp @@ -90,7 +90,7 @@ ACE_RCSID(fe, fe_init, "$Id$") * Create a scoped name */ static UTL_ScopedName * -create_scoped_name(char *s) +create_scoped_name(const char *s) { return new UTL_ScopedName(new Identifier(s, 1, 0, I_FALSE), NULL); } diff --git a/TAO/TAO_IDL/fe/fe_lookup.cpp b/TAO/TAO_IDL/fe/fe_lookup.cpp index 2af34391bd3..f9d46d846db 100644 --- a/TAO/TAO_IDL/fe/fe_lookup.cpp +++ b/TAO/TAO_IDL/fe/fe_lookup.cpp @@ -2,9 +2,9 @@ #include "idl.h" #include "idl_extern.h" #include "fe_private.h" -/* starting time is 17:20:28 */ -/* C++ code produced by gperf version 2.7 (GNU C++ version) */ -/* Command-line: /project/macarena/coryan/head/ACE_wrappers/bin/gperf -M -J -c -C -D -E -T -f 0 -a -o -t -p -K keyword_ -L C++ -Z TAO_IDL_CPP_Keyword_Table -N lookup -k1,2,$ fe/keywords.dat */ +/* starting time is 16:32:33 */ +/* C++ code produced by gperf version 2.8 (ACE version) */ +/* Command-line: /project/adaptive/ACE_wrappers/build/SunOS5.5/bin/gperf -M -J -c -C -D -E -T -f 0 -a -o -t -p -K keyword_ -L C++ -Z TAO_IDL_CPP_Keyword_Table -N lookup -k1,2,$ fe/keywords.dat */ unsigned int TAO_IDL_CPP_Keyword_Table::hash (const char *str, unsigned int len) { @@ -188,4 +188,4 @@ TAO_IDL_CPP_Keyword_Table::lookup (const char *str, unsigned int len) } return 0; } -/* ending time is 17:20:28 */ +/* ending time is 16:32:33 */ diff --git a/TAO/TAO_IDL/fe/idl.ll b/TAO/TAO_IDL/fe/idl.ll index c8d3e4ff3a7..d943665d901 100644 --- a/TAO/TAO_IDL/fe/idl.ll +++ b/TAO/TAO_IDL/fe/idl.ll @@ -166,7 +166,7 @@ oneway return IDL_ONEWAY; \<\< return IDL_LEFT_SHIFT; \>\> return IDL_RIGHT_SHIFT; \:\: { - yylval.strval = "::"; + yylval.strval = (char *) "::"; return IDL_SCOPE_DELIMITOR; } @@ -343,7 +343,7 @@ idl_parse_line_and_file(char *buf) continue; *r = 0; if (*h == '\0') - idl_global->set_filename(new String("standard input")); + idl_global->set_filename((const char *) new String("standard input")); else { long i; @@ -358,7 +358,7 @@ idl_parse_line_and_file(char *buf) h[i] = h[j]; } h[i] = '\0'; - idl_global->set_filename(new String(h)); + idl_global->set_filename((const char *) new String(h)); } int in_main_file = I_FALSE; if (idl_global->filename()->compare(idl_global->real_filename()) diff --git a/TAO/TAO_IDL/fe/keywords.dat b/TAO/TAO_IDL/fe/keywords.dat index 0a3ade2e91a..96940a3f68c 100644 --- a/TAO/TAO_IDL/fe/keywords.dat +++ b/TAO/TAO_IDL/fe/keywords.dat @@ -1,4 +1,4 @@ -struct TAO_IDL_CPP_Keyword_Entry { char *keyword_ ; char *mapping_; }; +struct TAO_IDL_CPP_Keyword_Entry { const char *keyword_ ; char *mapping_; }; %% and, "_cxx_and" and_eq, "_cxx_and_eq" diff --git a/TAO/TAO_IDL/fe/lex.yy.cpp b/TAO/TAO_IDL/fe/lex.yy.cpp index 6fde2156aba..d7c58cabafd 100644 --- a/TAO/TAO_IDL/fe/lex.yy.cpp +++ b/TAO/TAO_IDL/fe/lex.yy.cpp @@ -605,7 +605,7 @@ char *tao_yytext_ptr; #line 1 "fe/idl.ll" #define INITIAL 0 #line 3 "fe/idl.ll" -/* $Id: idl.ll,v 1.28 1999/05/06 18:24:25 coryan Exp $ +/* $Id: idl.ll,v 1.29 1999/05/17 02:15:08 nanbor Exp $ COPYRIGHT @@ -1185,7 +1185,7 @@ case 47: TAO_YY_RULE_SETUP #line 168 "fe/idl.ll" { - tao_yylval.strval = "::"; + tao_yylval.strval = (char *) "::"; return IDL_SCOPE_DELIMITOR; } TAO_YY_BREAK @@ -2339,7 +2339,7 @@ idl_parse_line_and_file(char *buf) continue; *r = 0; if (*h == '\0') - idl_global->set_filename(new String("standard input")); + idl_global->set_filename((const char *) new String("standard input")); else { long i; @@ -2354,7 +2354,7 @@ idl_parse_line_and_file(char *buf) h[i] = h[j]; } h[i] = '\0'; - idl_global->set_filename(new String(h)); + idl_global->set_filename((const char *) new String(h)); } int in_main_file = I_FALSE; if (idl_global->filename()->compare(idl_global->real_filename()) diff --git a/TAO/TAO_IDL/include/drv_extern.h b/TAO/TAO_IDL/include/drv_extern.h index 75e69a69546..797f4a1ac6a 100644 --- a/TAO/TAO_IDL/include/drv_extern.h +++ b/TAO/TAO_IDL/include/drv_extern.h @@ -78,8 +78,8 @@ extern void DRV_usage (); extern void DRV_pre_proc (char *myfile); extern void DRV_cpp_init (); -extern void DRV_cpp_putarg (char *str); -extern void DRV_cpp_new_location (char *new_loc); +extern void DRV_cpp_putarg (const char *str); +extern void DRV_cpp_new_location (const char *new_loc); extern void DRV_fork(); extern int DRV_check_gperf (); diff --git a/TAO/TAO_IDL/include/drv_private.h b/TAO/TAO_IDL/include/drv_private.h index 04ea84024d3..556cfdff5d6 100644 --- a/TAO/TAO_IDL/include/drv_private.h +++ b/TAO/TAO_IDL/include/drv_private.h @@ -72,12 +72,12 @@ trademarks or registered trademarks of Sun Microsystems, Inc. // Data -extern char *DRV_files[]; // All files to be processed +extern const char *DRV_files[]; // All files to be processed extern long DRV_nfiles; // How many are there? extern long DRV_file_index; // What's the file I am responsible // for? // Functions -extern void DRV_drive(char *);// Compiler driver for single file +extern void DRV_drive(const char *);// Compiler driver for single file #endif // _DRV_PRIVATE_DRV_PRIVATE_HH diff --git a/TAO/TAO_IDL/include/idl_global.h b/TAO/TAO_IDL/include/idl_global.h index a779e2f4f48..ab69b40d682 100644 --- a/TAO/TAO_IDL/include/idl_global.h +++ b/TAO/TAO_IDL/include/idl_global.h @@ -226,20 +226,20 @@ public: virtual void set_lineno(long); // Set it virtual String *filename(); // What file? - virtual void set_filename(String *); // Set it + virtual void set_filename(const char *); // Set it virtual String *main_filename(); // What's the main // file name? - virtual void set_main_filename(String *); + virtual void set_main_filename(const char *); // Set it virtual String *real_filename(); // What's the real // file name? - virtual void set_real_filename(String *); + virtual void set_real_filename(const char *); // Set it virtual String *stripped_filename(); // Stripped filename - virtual void set_stripped_filename(String *); // Set it + virtual void set_stripped_filename(const char *); // Set it virtual idl_bool imported(); // Are we imported? virtual idl_bool import(); // Is import on? @@ -248,20 +248,20 @@ public: virtual idl_bool in_main_file(); // Are we? virtual void set_in_main_file(idl_bool); // Set it - virtual char *prog_name(); // Invoked as.. - virtual void set_prog_name(char *); // Set it + virtual const char *prog_name(void); // Invoked as.. + virtual void set_prog_name(const char *); // Set it - virtual char *cpp_location(); // Where's CPP? - virtual void set_cpp_location(char *);// Set it + virtual const char *cpp_location(void); // Where's CPP? + virtual void set_cpp_location(const char *);// Set it - virtual long compile_flags(); // What flags are on? + virtual long compile_flags(void); // What flags are on? virtual void set_compile_flags(long);// Turn some on or off - virtual char *be(); // Get BE to use - virtual void set_be(char *); // Set it + virtual const char *be(void); // Get BE to use + virtual void set_be(const char *); // Set it - virtual char *local_escapes(); // Get local escapes - virtual void set_local_escapes(char *);// Set it + virtual char *local_escapes(void); // Get local escapes + virtual void set_local_escapes(const char *);// Set it virtual UTL_Indenter *indent(); // Get indenter virtual void set_indent(UTL_Indenter *); diff --git a/TAO/TAO_IDL/include/utl_identifier.h b/TAO/TAO_IDL/include/utl_identifier.h index ca5c422ae3e..d889a643f32 100644 --- a/TAO/TAO_IDL/include/utl_identifier.h +++ b/TAO/TAO_IDL/include/utl_identifier.h @@ -86,7 +86,7 @@ public: Identifier (); // Default Constructor(s) - Identifier (char *s, long x=1, long y=0, long z=I_FALSE); + Identifier (const char *s, long x=1, long y=0, long z=I_FALSE); // constructor virtual ~Identifier (); diff --git a/TAO/TAO_IDL/include/utl_string.h b/TAO/TAO_IDL/include/utl_string.h index de6516b7849..ae99d7ff210 100644 --- a/TAO/TAO_IDL/include/utl_string.h +++ b/TAO/TAO_IDL/include/utl_string.h @@ -91,8 +91,8 @@ public: UTL_String (void); // default constructor - UTL_String (char *str); - // construct from a char * + UTL_String (const char *str); + // construct from a const char * UTL_String (unsigned long maxlen); // constructor with an initial string length diff --git a/TAO/TAO_IDL/tao_idl.cpp b/TAO/TAO_IDL/tao_idl.cpp index b23aff4f2f0..02bfc9d460b 100644 --- a/TAO/TAO_IDL/tao_idl.cpp +++ b/TAO/TAO_IDL/tao_idl.cpp @@ -113,13 +113,8 @@ DRV_version() void DRV_drive(char *s) { - char *fn; - - // Macro to avoid "warning: unused parameter" type warning. - ACE_UNUSED_ARG (fn); - - // set the name of the IDL file we are parsing. This is useful to the backend - // when it generates C++ headers and files + // set the name of the IDL file we are parsing. This is useful to + // the backend when it generates C++ headers and files idl_global->idl_src_file(new UTL_String(s)); /* * Pass through CPP diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp index 20ad729c44e..c657e45b4c1 100644 --- a/TAO/TAO_IDL/util/utl_global.cpp +++ b/TAO/TAO_IDL/util/utl_global.cpp @@ -264,7 +264,7 @@ IDL_GlobalData::filename (void) return this->pd_filename; } void -IDL_GlobalData::set_filename (String *f) +IDL_GlobalData::set_filename (const char *f) { this->pd_filename = f; } @@ -276,7 +276,7 @@ IDL_GlobalData::main_filename (void) return this->pd_main_filename; } void -IDL_GlobalData::set_main_filename (String *n) +IDL_GlobalData::set_main_filename (const char *n) { this->pd_main_filename = n; } @@ -288,7 +288,7 @@ IDL_GlobalData::real_filename (void) return this->pd_real_filename; } void -IDL_GlobalData::set_real_filename (String *n) +IDL_GlobalData::set_real_filename (const char *n) { this->pd_real_filename = n; } @@ -329,31 +329,31 @@ IDL_GlobalData::stripped_filename (void) return this->pd_stripped_filename; } void -IDL_GlobalData::set_stripped_filename (String *nm) +IDL_GlobalData::set_stripped_filename (const char *nm) { this->pd_stripped_filename = nm; } // Get or set cache value for argv[0] -char * +const char * IDL_GlobalData::prog_name (void) { return this->pd_prog_name; } void -IDL_GlobalData::set_prog_name (char *pn) +IDL_GlobalData::set_prog_name (const char *pn) { this->pd_prog_name = pn; } // Get or set location to find C preprocessor -char * +const char * IDL_GlobalData::cpp_location (void) { return this->pd_cpp_location; } void -IDL_GlobalData::set_cpp_location (char *l) +IDL_GlobalData::set_cpp_location (const char *l) { this->pd_cpp_location = l; } @@ -371,13 +371,13 @@ IDL_GlobalData::set_compile_flags (long cf) } // Get or set BE to be used -char * +const char * IDL_GlobalData::be (void) { return this->pd_be; } void -IDL_GlobalData::set_be (char *nbe) +IDL_GlobalData::set_be (const char *nbe) { this->pd_be = nbe; } @@ -390,7 +390,7 @@ IDL_GlobalData::local_escapes (void) return this->pd_local_escapes; } void -IDL_GlobalData::set_local_escapes (char *e) +IDL_GlobalData::set_local_escapes (const char *e) { this->pd_local_escapes = e; } diff --git a/TAO/TAO_IDL/util/utl_identifier.cpp b/TAO/TAO_IDL/util/utl_identifier.cpp index 399af4051d0..f5a9172ae06 100644 --- a/TAO/TAO_IDL/util/utl_identifier.cpp +++ b/TAO/TAO_IDL/util/utl_identifier.cpp @@ -80,7 +80,7 @@ Identifier::Identifier () { } -Identifier::Identifier (char *s, long, long, long) +Identifier::Identifier (const char *s, long, long, long) : pv_string (ACE_OS::strdup (s)) { } diff --git a/TAO/TAO_IDL/util/utl_string.cpp b/TAO/TAO_IDL/util/utl_string.cpp index 8514b944c00..063c33b1ba3 100644 --- a/TAO/TAO_IDL/util/utl_string.cpp +++ b/TAO/TAO_IDL/util/utl_string.cpp @@ -83,7 +83,7 @@ UTL_String::UTL_String (void) { } -UTL_String::UTL_String (char *str) +UTL_String::UTL_String (const char *str) { if (str == NULL) { |