diff options
author | elliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-02-13 15:52:19 +0000 |
---|---|---|
committer | elliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2006-02-13 15:52:19 +0000 |
commit | aa74825ddaa5ccccca7c10c178185b04be6ea437 (patch) | |
tree | 16796a553218c5e6db9dc0c81598d1458cc83c15 /TAO/TAO_IDL | |
parent | 35933d1b99df0c7a0a530a886739888b9aafb458 (diff) | |
download | ATCD-aa74825ddaa5ccccca7c10c178185b04be6ea437.tar.gz |
ChangeLogTag: Mon Feb 13 15:51:38 UTC 2006 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r-- | TAO/TAO_IDL/fe/idl.ll | 14 | ||||
-rw-r--r-- | TAO/TAO_IDL/fe/lex.yy.cpp | 14 |
2 files changed, 22 insertions, 6 deletions
diff --git a/TAO/TAO_IDL/fe/idl.ll b/TAO/TAO_IDL/fe/idl.ll index abbac6dd29f..060223d558f 100644 --- a/TAO/TAO_IDL/fe/idl.ll +++ b/TAO/TAO_IDL/fe/idl.ll @@ -254,7 +254,7 @@ oneway return IDL_ONEWAY; (\"([^\\\"]*|\\[ntvbrfax\\\?\'\"]|\\[0-7]{1,3})*\"[ \t]*)+ { /* Skip the quotes */ char *tmp = ace_yytext; - for(int i = strlen(tmp) - 1; i >= 0; --i) { + for(int i = ACE_OS::strlen(tmp) - 1; i >= 0; --i) { if (isspace(tmp[i])) { tmp[i] = '\0'; } @@ -262,7 +262,7 @@ oneway return IDL_ONEWAY; break; } } - tmp[strlen (tmp) - 1] = '\0'; + tmp[ACE_OS::strlen (tmp) - 1] = '\0'; ACE_NEW_RETURN (yylval.sval, UTL_String (tmp + 1), IDL_STRING_LITERAL); @@ -271,7 +271,15 @@ oneway return IDL_ONEWAY; (L\"([^\\\"]*|\\[ntvbrfax\\\?\'\"]|\\[0-7]{1,3}|\\u([0-9a-fA-F]{1,4}))*\"[ \t]*)+ { /* Skip the bookends */ char *tmp = ACE_OS::strdup (ace_yytext); - tmp[strlen (tmp) - 1] = '\0'; + for(int i = ACE_OS::strlen(tmp) - 1; i >= 0; --i) { + if (isspace(tmp[i])) { + tmp[i] = '\0'; + } + else { + break; + } + } + tmp[ACE_OS::strlen (tmp) - 1] = '\0'; yylval.wsval = idl_wstring_escape_reader(tmp + 2); return IDL_WSTRING_LITERAL; } diff --git a/TAO/TAO_IDL/fe/lex.yy.cpp b/TAO/TAO_IDL/fe/lex.yy.cpp index 921497bca71..09ff7d3add0 100644 --- a/TAO/TAO_IDL/fe/lex.yy.cpp +++ b/TAO/TAO_IDL/fe/lex.yy.cpp @@ -1513,7 +1513,7 @@ TAO_YY_RULE_SETUP { /* Skip the quotes */ char *tmp = ace_tao_yytext; - for(int i = strlen(tmp) - 1; i >= 0; --i) { + for(int i = ACE_OS::strlen(tmp) - 1; i >= 0; --i) { if (isspace(tmp[i])) { tmp[i] = '\0'; } @@ -1521,7 +1521,7 @@ TAO_YY_RULE_SETUP break; } } - tmp[strlen (tmp) - 1] = '\0'; + tmp[ACE_OS::strlen (tmp) - 1] = '\0'; ACE_NEW_RETURN (tao_yylval.sval, UTL_String (tmp + 1), IDL_STRING_LITERAL); @@ -1533,7 +1533,15 @@ TAO_YY_RULE_SETUP { /* Skip the bookends */ char *tmp = ACE_OS::strdup (ace_tao_yytext); - tmp[strlen (tmp) - 1] = '\0'; + for(int i = ACE_OS::strlen(tmp) - 1; i >= 0; --i) { + if (isspace(tmp[i])) { + tmp[i] = '\0'; + } + else { + break; + } + } + tmp[ACE_OS::strlen (tmp) - 1] = '\0'; tao_yylval.wsval = idl_wstring_escape_reader(tmp + 2); return IDL_WSTRING_LITERAL; } |