--- Svc_Conf_y.cpp	Sun Nov 18 23:59:11 2001
+++ Svc_Conf_y.cpp.new	Mon Nov 19 00:07:29 2001
@@ -61,7 +61,7 @@
 
 #define ACE_YYTRANSLATE(x) ((unsigned)(x) <= 270 ? ace_yytranslate[x] : 43)
 
-static const char ace_yytranslate[] = {     0,
+static const ACE_TCHAR ace_yytranslate[] = {     0,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
@@ -130,13 +130,51 @@
 
 #if ACE_YYDEBUG != 0 || defined (ACE_YYERROR_VERBOSE)
 
-static const char * const ace_yytname[] = {   "$","error","$undefined.","ACE_DYNAMIC",
-"ACE_STATIC","ACE_SUSPEND","ACE_RESUME","ACE_REMOVE","ACE_USTREAM","ACE_MODULE_T",
-"ACE_STREAM_T","ACE_SVC_OBJ_T","ACE_ACTIVE","ACE_INACTIVE","ACE_PATHNAME","ACE_IDENT",
-"ACE_STRING","'{'","'}'","':'","'('","')'","'*'","svc_config_entries","svc_config_entry",
-"dynamic","static","suspend","resume","remove","stream","@1","stream_ops","stream_modules",
-"@2","module_list","module","svc_location","status","svc_initializer","type",
-"parameters_opt","pathname", NULL
+static const ACE_TCHAR * const ace_yytname[] = { ACE_LIB_TEXT("$"),
+                                                 ACE_LIB_TEXT("error"),
+                                                 ACE_LIB_TEXT("$undefined."),
+                                                 ACE_LIB_TEXT("ACE_DYNAMIC"),
+                                                 ACE_LIB_TEXT("ACE_STATIC"),
+                                                 ACE_LIB_TEXT("ACE_SUSPEND"),
+                                                 ACE_LIB_TEXT("ACE_RESUME"),
+                                                 ACE_LIB_TEXT("ACE_REMOVE"),
+                                                 ACE_LIB_TEXT("ACE_USTREAM"),
+                                                 ACE_LIB_TEXT("ACE_MODULE_T"),
+                                                 ACE_LIB_TEXT("ACE_STREAM_T"),
+                                                 ACE_LIB_TEXT("ACE_SVC_OBJ_T"),
+                                                 ACE_LIB_TEXT("ACE_ACTIVE"),
+                                                 ACE_LIB_TEXT("ACE_INACTIVE"),
+                                                 ACE_LIB_TEXT("ACE_PATHNAME"),
+                                                 ACE_LIB_TEXT("ACE_IDENT"),
+                                                 ACE_LIB_TEXT("ACE_STRING"),
+                                                 ACE_LIB_TEXT("'{'"),
+                                                 ACE_LIB_TEXT("'}'"),
+                                                 ACE_LIB_TEXT("':'"),
+                                                 ACE_LIB_TEXT("'('"),
+                                                 ACE_LIB_TEXT("')'"),
+                                                 ACE_LIB_TEXT("'*'"),
+                                                 ACE_LIB_TEXT("svc_config_entries"),
+                                                 ACE_LIB_TEXT("svc_config_entry"),
+                                                 ACE_LIB_TEXT("dynamic"),
+                                                 ACE_LIB_TEXT("static"),
+                                                 ACE_LIB_TEXT("suspend"),
+                                                 ACE_LIB_TEXT("resume"),
+                                                 ACE_LIB_TEXT("remove"),
+                                                 ACE_LIB_TEXT("stream"),
+                                                 ACE_LIB_TEXT("@1"),
+                                                 ACE_LIB_TEXT("stream_ops"),
+                                                 ACE_LIB_TEXT("stream_modules"),
+
+                                                 ACE_LIB_TEXT("@2"),
+                                                 ACE_LIB_TEXT("module_list"),
+                                                 ACE_LIB_TEXT("module"),
+                                                 ACE_LIB_TEXT("svc_location"),
+                                                 ACE_LIB_TEXT("status"),
+                                                 ACE_LIB_TEXT("svc_initializer"),
+                                                 ACE_LIB_TEXT("type"),
+                                                 ACE_LIB_TEXT("parameters_opt"),
+                                                 ACE_LIB_TEXT("pathname"),
+                                                 NULL
 };
 #endif
 
@@ -317,7 +355,7 @@
       goto ace_yybackup;						\
     }								\
   else								\
-    { ace_yyerror ("syntax error: cannot back up"); ACE_YYERROR; }	\
+    { ace_yyerror (ACE_LIB_TEXT("syntax error: cannot back up")); ACE_YYERROR; }	\
 while (0)
 
 #define ACE_YYTERROR	1
@@ -396,12 +434,12 @@
    in available built-in functions on various systems.  */
 static void
 __ace_yy_memcpy (to, from, count)
-     char *to;
-     char *from;
+     ACE_TCHAR *to;
+     ACE_TCHAR *from;
      unsigned int count;
 {
-  register char *f = from;
-  register char *t = to;
+  register ACE_TCHAR *f = from;
+  register ACE_TCHAR *t = to;
   register int i = count;
 
   while (i-- > 0)
@@ -413,10 +451,10 @@
 /* This is the most reliable way to avoid incompatibilities
    in available built-in functions on various systems.  */
 static void
-__ace_yy_memcpy (char *to, char *from, unsigned int count)
+__ace_yy_memcpy (ACE_TCHAR *to, ACE_TCHAR *from, unsigned int count)
 {
-  register char *t = to;
-  register char *f = from;
+  register ACE_TCHAR *t = to;
+  register ACE_TCHAR *f = from;
   register int i = count;
 
   while (i-- > 0)
@@ -503,7 +541,7 @@
 
 #if ACE_YYDEBUG != 0
   if (ace_yydebug)
-    ACE_OS::fprintf(stderr, "Starting parse\n");
+    ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Starting parse\n"));
 #endif
 
   ace_yystate = 0;
@@ -548,13 +586,13 @@
 #ifdef ACE_YYLSP_NEEDED
       /* This used to be a conditional around just the two extra args,
 	 but that might be undefined if ace_yyoverflow is a macro.  */
-      ace_yyoverflow("parser stack overflow",
+      ace_yyoverflow(ACE_LIB_TEXT("parser stack overflow"),
 		 &ace_yyss1, size * sizeof (*ace_yyssp),
 		 &ace_yyvs1, size * sizeof (*ace_yyvsp),
 		 &ace_yyls1, size * sizeof (*ace_yylsp),
 		 &ace_yystacksize);
 #else
-      ace_yyoverflow("parser stack overflow",
+      ace_yyoverflow(ACE_LIB_TEXT("parser stack overflow"),
 		 &ace_yyss1, size * sizeof (*ace_yyssp),
 		 &ace_yyvs1, size * sizeof (*ace_yyvsp),
 		 &ace_yystacksize);
@@ -568,7 +606,7 @@
       /* Extend the stack our own way.  */
       if (ace_yystacksize >= ACE_YYMAXDEPTH)
 	{
-	  ace_yyerror("parser stack overflow");
+	  ace_yyerror(ACE_LIB_TEXT("parser stack overflow"));
 	  if (ace_yyfree_stacks)
 	    {
 	      free (ace_yyss);
@@ -586,14 +624,14 @@
       ace_yyfree_stacks = 1;
 #endif
       ace_yyss = (short *) ACE_YYSTACK_ALLOC (ace_yystacksize * sizeof (*ace_yyssp));
-      __ace_yy_memcpy ((char *)ace_yyss, (char *)ace_yyss1,
+      __ace_yy_memcpy ((ACE_TCHAR *)ace_yyss, (ACE_TCHAR *)ace_yyss1,
 		   size * (unsigned int) sizeof (*ace_yyssp));
       ace_yyvs = (ACE_YYSTYPE *) ACE_YYSTACK_ALLOC (ace_yystacksize * sizeof (*ace_yyvsp));
-      __ace_yy_memcpy ((char *)ace_yyvs, (char *)ace_yyvs1,
+      __ace_yy_memcpy ((ACE_TCHAR *)ace_yyvs, (ACE_TCHAR *)ace_yyvs1,
 		   size * (unsigned int) sizeof (*ace_yyvsp));
 #ifdef ACE_YYLSP_NEEDED
       ace_yyls = (ACE_YYLTYPE *) ACE_YYSTACK_ALLOC (ace_yystacksize * sizeof (*ace_yylsp));
-      __ace_yy_memcpy ((char *)ace_yyls, (char *)ace_yyls1,
+      __ace_yy_memcpy ((ACE_TCHAR *)ace_yyls, (ACE_TCHAR *)ace_yyls1,
 		   size * (unsigned int) sizeof (*ace_yylsp));
 #endif
 #endif /* no ace_yyoverflow */
@@ -606,7 +644,7 @@
 
 #if ACE_YYDEBUG != 0
       if (ace_yydebug)
-	ACE_OS::fprintf(stderr, "Stack size increased to %d\n", ace_yystacksize);
+	ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Stack size increased to %d\n"), ace_yystacksize);
 #endif
 
       if (ace_yyssp >= ace_yyss + ace_yystacksize - 1)
@@ -615,7 +653,7 @@
 
 #if ACE_YYDEBUG != 0
   if (ace_yydebug)
-    ACE_OS::fprintf(stderr, "Entering state %d\n", ace_yystate);
+    ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Entering state %d\n"), ace_yystate);
 #endif
 
   goto ace_yybackup;
@@ -640,7 +678,7 @@
     {
 #if ACE_YYDEBUG != 0
       if (ace_yydebug)
-	ACE_OS::fprintf(stderr, "Reading a token: ");
+	ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Reading a token: "));
 #endif
       ace_yychar = ACE_YYLEX;
     }
@@ -654,7 +692,7 @@
 
 #if ACE_YYDEBUG != 0
       if (ace_yydebug)
-	ACE_OS::fprintf(stderr, "Now at end of input.\n");
+	ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Now at end of input.\n"));
 #endif
     }
   else
@@ -664,13 +702,13 @@
 #if ACE_YYDEBUG != 0
       if (ace_yydebug)
 	{
-	  ACE_OS::fprintf (stderr, "Next token is %d (%s", ace_yychar, ace_yytname[ace_yychar1]);
+	  ACE_OS::fprintf (stderr, ACE_LIB_TEXT("Next token is %d (%s"), ace_yychar, ace_yytname[ace_yychar1]);
 	  /* Give the individual parser a way to print the precise meaning
 	     of a token, for further debugging info.  */
 #ifdef ACE_YYPRINT
 	  ACE_YYPRINT (stderr, ace_yychar, ace_yylval);
 #endif
-	  ACE_OS::fprintf (stderr, ")\n");
+	  ACE_OS::fprintf (stderr, ACE_LIB_TEXT(")\n"));
 	}
 #endif
     }
@@ -705,7 +743,7 @@
 
 #if ACE_YYDEBUG != 0
   if (ace_yydebug)
-    ACE_OS::fprintf(stderr, "Shifting token %d (%s), ", ace_yychar, ace_yytname[ace_yychar1]);
+    ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Shifting token %d (%s), "), ace_yychar, ace_yytname[ace_yychar1]);
 #endif
 
   /* Discard the token being shifted unless it is eof.  */
@@ -741,13 +779,13 @@
     {
       int i;
 
-      ACE_OS::fprintf (stderr, "Reducing via rule %d (line %d), ",
+      ACE_OS::fprintf (stderr, ACE_LIB_TEXT("Reducing via rule %d (line %d), "),
 	       ace_yyn, ace_yyrline[ace_yyn]);
 
       /* Print the symbols being reduced, and their result.  */
       for (i = ace_yyprhs[ace_yyn]; ace_yyrhs[i] > 0; i++)
-	ACE_OS::fprintf (stderr, "%s ", ace_yytname[ace_yyrhs[i]]);
-      ACE_OS::fprintf (stderr, " -> %s\n", ace_yytname[ace_yyr1[ace_yyn]]);
+	ACE_OS::fprintf (stderr, ACE_LIB_TEXT("%s "), ace_yytname[ace_yyrhs[i]]);
+      ACE_OS::fprintf (stderr, ACE_LIB_TEXT(" -> %s\n"), ace_yytname[ace_yyr1[ace_yyn]]);
     }
 #endif
 
@@ -1013,10 +1051,10 @@
   if (ace_yydebug)
     {
       short *ssp1 = ace_yyss - 1;
-      ACE_OS::fprintf (stderr, "state stack now");
+      ACE_OS::fprintf (stderr, ACE_LIB_TEXT("state stack now"));
       while (ssp1 != ace_yyssp)
-	ACE_OS::fprintf (stderr, " %d", *++ssp1);
-      ACE_OS::fprintf (stderr, "\n");
+	ACE_OS::fprintf (stderr, ACE_LIB_TEXT(" %d"), *++ssp1);
+      ACE_OS::fprintf (stderr, ACE_LIB_TEXT("\n"));
     }
 #endif
 
@@ -1067,42 +1105,42 @@
       if (ace_yyn > ACE_YYFLAG && ace_yyn < ACE_YYLAST)
 	{
 	  int size = 0;
-	  char *msg;
+	  ACE_TCHAR *msg;
 	  int x, count;
 
 	  count = 0;
 	  /* Start X at -ace_yyn if nec to avoid negative indexes in ace_yycheck.  */
 	  for (x = (ace_yyn < 0 ? -ace_yyn : 0);
-	       x < (sizeof(ace_yytname) / sizeof(char *)); x++)
+	       x < (sizeof(ace_yytname) / sizeof(ACE_TCHAR *)); x++)
 	    if (ace_yycheck[x + ace_yyn] == x)
-	      size += strlen(ace_yytname[x]) + 15, count++;
-	  msg = (char *) malloc(size + 15);
+	      size += ACE_OS::strlen(ace_yytname[x]) + 15, count++;
+	  msg = new ACE_TCHAR[size + 15];
 	  if (msg != 0)
 	    {
-	      strcpy(msg, "parse error");
+	      ACE_OS::strcpy(msg, ACE_LIB_TEXT("parse error"));
 
 	      if (count < 5)
 		{
 		  count = 0;
 		  for (x = (ace_yyn < 0 ? -ace_yyn : 0);
-		       x < (sizeof(ace_yytname) / sizeof(char *)); x++)
+		       x < (sizeof(ace_yytname) / sizeof(ACE_TCHAR *)); x++)
 		    if (ace_yycheck[x + ace_yyn] == x)
 		      {
-			strcat(msg, count == 0 ? ", expecting `" : " or `");
-			strcat(msg, ace_yytname[x]);
-			strcat(msg, "'");
+			ACE_OS::strcat(msg, count == 0 ? ACE_LIB_TEXT(", expecting `") : ACE_LIB_TEXT(" or `"));
+			ACE_OS::strcat(msg, ACE_TEXT_CHAR_TO_TCHAR (ace_yytname[x]));
+			ACE_OS::strcat(msg, ACE_LIB_TEXT("'"));
 			count++;
 		      }
 		}
 	      ace_yyerror(msg);
-	      free(msg);
+	      delete [] msg;
 	    }
 	  else
-	    ace_yyerror ("parse error; also virtual memory exceeded");
+	    ace_yyerror (ACE_LIB_TEXT("parse error; also virtual memory exceeded"));
 	}
       else
 #endif /* ACE_YYERROR_VERBOSE */
-	ace_yyerror("parse error");
+	ace_yyerror(ACE_LIB_TEXT("parse error"));
     }
 
   goto ace_yyerrlab1;
@@ -1118,7 +1156,7 @@
 
 #if ACE_YYDEBUG != 0
       if (ace_yydebug)
-	ACE_OS::fprintf(stderr, "Discarding token %d (%s).\n", ace_yychar, ace_yytname[ace_yychar1]);
+	ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Discarding token %d (%s).\n"), ace_yychar, ace_yytname[ace_yychar1]);
 #endif
 
       ace_yychar = ACE_YYEMPTY;
@@ -1153,10 +1191,10 @@
   if (ace_yydebug)
     {
       short *ssp1 = ace_yyss - 1;
-      ACE_OS::fprintf (stderr, "Error: state stack now");
+      ACE_OS::fprintf (stderr, ACE_LIB_TEXT("Error: state stack now"));
       while (ssp1 != ace_yyssp)
-	ACE_OS::fprintf (stderr, " %d", *++ssp1);
-      ACE_OS::fprintf (stderr, "\n");
+	ACE_OS::fprintf (stderr, ACE_LIB_TEXT(" %d"), *++ssp1);
+      ACE_OS::fprintf (stderr, ACE_LIB_TEXT("\n"));
     }
 #endif
 
@@ -1186,7 +1224,7 @@
 
 #if ACE_YYDEBUG != 0
   if (ace_yydebug)
-    ACE_OS::fprintf(stderr, "Shifting error token, ");
+    ACE_OS::fprintf(stderr, ACE_LIB_TEXT("Shifting error token, "));
 #endif
 
   *++ace_yyvsp = ace_yylval;
@@ -1355,13 +1393,13 @@
 // Main driver program.
 
 int
-main (int argc, char *argv[])
+main (int argc, ACE_TCHAR *argv[])
 {
   ACE_Svc_Conf_Param param (stdin);
 
   // Try to reopen any filename argument to use ACE_YYIN.
-  if (argc > 1 && (ace_yyin = freopen (argv[1], "r", stdin)) == 0)
-    (void) ::ACE_OS::fprintf (stderr, "usage: %s [file]\n", argv[0]), ACE_OS::exit (1);
+  if (argc > 1 && (ace_yyin = freopen (argv[1], ACE_LIB_TEXT("r"), stdin)) == 0)
+    ACE_OS::fprintf (stderr, ACE_LIB_TEXT("usage: %s [file]\n"), argv[0]), ACE_OS::exit (1);
 
   return ace_yyparse (&param);
 }
