summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-11-17 17:57:04 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-11-17 17:57:04 +0000
commitd11591213f55577c40d732b8917e78295fa510b6 (patch)
treeb01e1df3fbd8f38ff94cd1be8266c6c600e7ab4e /TAO/TAO_IDL
parentcbe8d13bfd912722b62bc3b0ec9ed0771d423a79 (diff)
downloadATCD-d11591213f55577c40d732b8917e78295fa510b6.tar.gz
*** empty log message ***
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r--TAO/TAO_IDL/be/be_codegen.cpp15
-rw-r--r--TAO/TAO_IDL/util/utl_global.cpp2
2 files changed, 6 insertions, 11 deletions
diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp
index 5ca1923ca01..e13c56ee774 100644
--- a/TAO/TAO_IDL/be/be_codegen.cpp
+++ b/TAO/TAO_IDL/be/be_codegen.cpp
@@ -148,10 +148,9 @@ TAO_CodeGen::client_header (const char *fname)
{
// now generate the #if !defined clause
static char macro_name [NAMEBUFSIZE];
- char *suffix;
ACE_OS::memset (macro_name, '\0', NAMEBUFSIZE);
- suffix = ACE_OS::strstr (fname, ".h");
+ const char *suffix = ACE_OS::strstr (fname, ".h");
if (suffix == 0)
return -1; // bad file name
else
@@ -159,12 +158,9 @@ TAO_CodeGen::client_header (const char *fname)
ACE_OS::sprintf (macro_name, "_TAO_IDL_");
// convert letters in fname to upcase
for (int i=0; i < (suffix - fname); i++)
- {
- if (isalpha (fname [i]))
- {
- macro_name[i+9] = toupper (fname [i]);
- }
- }
+ if (isalpha (fname [i]))
+ macro_name[i+9] = toupper (fname [i]);
+
ACE_OS::strcat (macro_name, "_H_");
this->client_header_->print ("#if !defined (%s)\n", macro_name);
@@ -281,10 +277,9 @@ TAO_CodeGen::server_header (const char *fname)
{
// now generate the #if !defined clause
static char macro_name [NAMEBUFSIZE];
- char *suffix;
ACE_OS::memset (macro_name, '\0', NAMEBUFSIZE);
- suffix = ACE_OS::strstr (fname, ".h");
+ const char *suffix = ACE_OS::strstr (fname, ".h");
if (suffix == 0)
return -1; // bad file name
else
diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp
index 4d31b1b3cda..6f222261322 100644
--- a/TAO/TAO_IDL/util/utl_global.cpp
+++ b/TAO/TAO_IDL/util/utl_global.cpp
@@ -493,7 +493,7 @@ be_change_idl_file_extension (String* idl_file,
const char* string = idl_file->get_string ();
// get the base part of the filename
- char* base = ACE_OS::strstr (string, ".idl");
+ const char *base = ACE_OS::strstr (string, ".idl");
if (base == 0)
return 0;