diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-10-14 07:54:31 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-10-14 07:54:31 +0000 |
commit | 8d906910eb339c861d232e3f96491237b4a15627 (patch) | |
tree | 4b04892dc6b2d1cfe45a3b5c9c953938a757f738 | |
parent | 8807fa6fd809ad4f6df924590370f320cc2b7a86 (diff) | |
download | ATCD-8d906910eb339c861d232e3f96491237b4a15627.tar.gz |
*** empty log message ***
-rw-r--r-- | ace/Svc_Conf.y | 43 | ||||
-rw-r--r-- | ace/Svc_Conf_y.cpp | 79 |
2 files changed, 50 insertions, 72 deletions
diff --git a/ace/Svc_Conf.y b/ace/Svc_Conf.y index 2b27b76b130..43c508b1159 100644 --- a/ace/Svc_Conf.y +++ b/ace/Svc_Conf.y @@ -140,19 +140,6 @@ module ACE_ARGV args ($<static_node_>1->parameters ()); ACE_Module_Type *mt = get_module ($<static_node_>-1, $<static_node_>1); - // Make sure that the Module has the same name as the - // Module_Type object from the svc.conf file. - const char *module_type_name = $<static_node_>1->name (); - ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object (); - - if (ACE_OS::strcmp (mp->name (), module_type_name) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "warning: assigning Module_Type name %s to Module %s since names differ\n", - module_type_name, mp->name ())); - mp->name (module_type_name); - } - if (mt->init (args.argc (), args.argv ()) == -1 || ((ACE_Stream_Type *) ($<static_node_>-1)->record ()->type ())->push (mt) == -1) { @@ -165,19 +152,6 @@ module { ACE_Module_Type *mt = get_module ($<static_node_>-1, $<static_node_>1->name ()); - // Make sure that the Module has the same name as the - // Module_Type object from the svc.conf file. - const char *module_type_name = $<static_node_>1->name (); - ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object (); - - if (ACE_OS::strcmp (mp->name (), module_type_name) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "warning: assigning Module_Type name %s to Module %s since names differ\n", - module_type_name, mp->name ())); - mp->name (module_type_name); - } - if (((ACE_Stream_Type *) ($<static_node_>-1)->record ()->type ())->push (mt) == -1) yyerrno++; } @@ -311,6 +285,7 @@ get_module (ACE_Static_Node *str_rec, const char *svc_name) svc_name, str_rec->name ())); yyerrno++; } + return mt; } @@ -327,9 +302,23 @@ get_module (ACE_Static_Node *str_rec, ACE_Static_Node *svc_type) if (sr == 0 || st == 0 || mt == 0) { ACE_ERROR ((LM_ERROR, "cannot locate Module_Type %s or STREAM_Type %s\n", - svc_type->name (), str_rec->name ())); + svc_type->name (), str_rec->name ())); yyerrno++; } + + // Make sure that the Module has the same name as the + // Module_Type object from the svc.conf file. + const char *module_type_name = svc_type->name (); + ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object (); + + if (ACE_OS::strcmp (mp->name (), module_type_name) != 0) + { + ACE_DEBUG ((LM_DEBUG, + "warning: assigning Module_Type name %s to Module %s since names differ\n", + module_type_name, mp->name ())); + mp->name (module_type_name); + } + return mt; } diff --git a/ace/Svc_Conf_y.cpp b/ace/Svc_Conf_y.cpp index 6a2c225dec5..246af45e87c 100644 --- a/ace/Svc_Conf_y.cpp +++ b/ace/Svc_Conf_y.cpp @@ -243,7 +243,7 @@ YYSTYPE ace_yylval; #define ace_yystacksize YYSTACKSIZE short ace_yyss[YYSTACKSIZE]; YYSTYPE ace_yyvs[YYSTACKSIZE]; -#line 287 "Svc_Conf.y" +#line 261 "Svc_Conf.y" // Prints the error string to standard output. Cleans up the error // messages. @@ -271,6 +271,7 @@ get_module (ACE_Static_Node *str_rec, const char *svc_name) svc_name, str_rec->name ())); ace_yyerrno++; } + return mt; } @@ -287,9 +288,23 @@ get_module (ACE_Static_Node *str_rec, ACE_Static_Node *svc_type) if (sr == 0 || st == 0 || mt == 0) { ACE_ERROR ((LM_ERROR, "cannot locate Module_Type %s or STREAM_Type %s\n", - svc_type->name (), str_rec->name ())); + svc_type->name (), str_rec->name ())); ace_yyerrno++; } + + // Make sure that the Module has the same name as the + // Module_Type object from the svc.conf file. + const char *module_type_name = svc_type->name (); + ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object (); + + if (ACE_OS::strcmp (mp->name (), module_type_name) != 0) + { + ACE_DEBUG ((LM_DEBUG, + "warning: assigning Module_Type name %s to Module %s since names differ\n", + module_type_name, mp->name ())); + mp->name (module_type_name); + } + return mt; } @@ -352,7 +367,7 @@ main (int argc, char *argv[]) return ace_yyparse (); } #endif /* DEBUGGING */ -#line 356 "Svc_Conf_y.cpp" +#line 371 "Svc_Conf_y.cpp" #define YYABORT goto ace_yyabort #define YYACCEPT goto ace_yyaccept #define YYERROR goto ace_yyerrlab @@ -764,19 +779,6 @@ case 25: ACE_ARGV args (ace_yyvsp[0].static_node_->parameters ()); ACE_Module_Type *mt = get_module (ace_yyvsp[-2].static_node_, ace_yyvsp[0].static_node_); - /* Make sure that the Module has the same name as the*/ - /* Module_Type object from the svc.conf file.*/ - const char *module_type_name = ace_yyvsp[0].static_node_->name (); - ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object (); - - if (ACE_OS::strcmp (mp->name (), module_type_name) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "warning: assigning Module_Type name %s to Module %s since names differ\n", - module_type_name, mp->name ())); - mp->name (module_type_name); - } - if (mt->init (args.argc (), args.argv ()) == -1 || ((ACE_Stream_Type *) (ace_yyvsp[-2].static_node_)->record ()->type ())->push (mt) == -1) { @@ -787,29 +789,16 @@ case 25: } break; case 26: -#line 165 "Svc_Conf.y" +#line 152 "Svc_Conf.y" { ACE_Module_Type *mt = get_module (ace_yyvsp[-2].static_node_, ace_yyvsp[0].static_node_->name ()); - /* Make sure that the Module has the same name as the*/ - /* Module_Type object from the svc.conf file.*/ - const char *module_type_name = ace_yyvsp[0].static_node_->name (); - ACE_Module<ACE_SYNCH> *mp = (ACE_Module<ACE_SYNCH> *) mt->object (); - - if (ACE_OS::strcmp (mp->name (), module_type_name) != 0) - { - ACE_DEBUG ((LM_DEBUG, - "warning: assigning Module_Type name %s to Module %s since names differ\n", - module_type_name, mp->name ())); - mp->name (module_type_name); - } - if (((ACE_Stream_Type *) (ace_yyvsp[-2].static_node_)->record ()->type ())->push (mt) == -1) ace_yyerrno++; } break; case 27: -#line 185 "Svc_Conf.y" +#line 159 "Svc_Conf.y" { ACE_Module_Type *mt = get_module (ace_yyvsp[-2].static_node_, ace_yyvsp[0].static_node_->name ()); if (mt != 0) @@ -817,7 +806,7 @@ case 27: } break; case 28: -#line 191 "Svc_Conf.y" +#line 165 "Svc_Conf.y" { ACE_Module_Type *mt = get_module (ace_yyvsp[-2].static_node_, ace_yyvsp[0].static_node_->name ()); if (mt != 0) @@ -825,7 +814,7 @@ case 28: } break; case 29: -#line 197 "Svc_Conf.y" +#line 171 "Svc_Conf.y" { ACE_Module_Type *mt = get_module (ace_yyvsp[-2].static_node_, ace_yyvsp[0].static_node_->name ()); if (mt != 0 @@ -838,7 +827,7 @@ case 29: } break; case 30: -#line 211 "Svc_Conf.y" +#line 185 "Svc_Conf.y" { u_int flags = ACE_Service_Type::DELETE_THIS @@ -859,64 +848,64 @@ case 30: } break; case 31: -#line 233 "Svc_Conf.y" +#line 207 "Svc_Conf.y" { ace_yyval.type_ = 1; } break; case 32: -#line 237 "Svc_Conf.y" +#line 211 "Svc_Conf.y" { ace_yyval.type_ = 0; } break; case 33: -#line 241 "Svc_Conf.y" +#line 215 "Svc_Conf.y" { ace_yyval.type_ = 1; } break; case 34: -#line 248 "Svc_Conf.y" +#line 222 "Svc_Conf.y" { ace_yyval.location_node_ = new ACE_Object_Node (ace_yyvsp[-2].ident_, ace_yyvsp[0].ident_); } break; case 35: -#line 252 "Svc_Conf.y" +#line 226 "Svc_Conf.y" { ace_yyval.location_node_ = new ACE_Function_Node (ace_yyvsp[-4].ident_, ace_yyvsp[-2].ident_); } break; case 36: -#line 256 "Svc_Conf.y" +#line 230 "Svc_Conf.y" { ace_yyval.location_node_ = new ACE_Static_Function_Node (ace_yyvsp[-2].ident_); } break; case 37: -#line 263 "Svc_Conf.y" +#line 237 "Svc_Conf.y" { ace_yyval.type_ = ACE_MODULE_T; } break; case 38: -#line 267 "Svc_Conf.y" +#line 241 "Svc_Conf.y" { ace_yyval.type_ = ACE_SVC_OBJ_T; } break; case 39: -#line 271 "Svc_Conf.y" +#line 245 "Svc_Conf.y" { ace_yyval.type_ = ACE_STREAM_T; } break; case 41: -#line 278 "Svc_Conf.y" +#line 252 "Svc_Conf.y" { ace_yyval.ident_ = 0; } break; -#line 919 "Svc_Conf_y.cpp" +#line 908 "Svc_Conf_y.cpp" } ace_yyssp -= ace_yym; ace_yystate = *ace_yyssp; |