diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2000-01-15 19:04:11 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2000-01-15 19:04:11 +0000 |
commit | b11d520cd67c9e0c3f2169796592252307c45bd8 (patch) | |
tree | b482a7f0f1514a1a508c548778ffdcc64b35bc3b | |
parent | c0c905d14e4fbff28434b49ffce49c5a8ec88b4d (diff) | |
download | ATCD-b11d520cd67c9e0c3f2169796592252307c45bd8.tar.gz |
ChangeLogTag:Sat Jan 15 00:41:12 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
-rw-r--r-- | ChangeLog | 31 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 31 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 31 | ||||
-rw-r--r-- | THANKS | 2 | ||||
-rw-r--r-- | ace/Makefile | 6 | ||||
-rw-r--r-- | ace/Svc_Conf.l | 22 | ||||
-rw-r--r-- | ace/Svc_Conf_l.cpp | 1028 | ||||
-rw-r--r-- | ace/Task.h | 6 | ||||
-rw-r--r-- | ace/config-win32-common.h | 2 | ||||
-rw-r--r-- | ace/config-win32-msvc.h | 209 | ||||
-rw-r--r-- | etc/Svc_Conf_l.cpp.diff | 464 | ||||
-rw-r--r-- | examples/Service_Configurator/Misc/main.cpp | 41 | ||||
-rw-r--r-- | netsvcs/clients/Naming/Client/main.cpp | 21 | ||||
-rw-r--r-- | tests/ARGV_Test.cpp | 57 | ||||
-rw-r--r-- | tests/Makefile | 1 | ||||
-rw-r--r-- | tests/run_tests.lst | 1 |
16 files changed, 1287 insertions, 666 deletions
diff --git a/ChangeLog b/ChangeLog index a5dc8b490c6..d11ed84966d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,36 @@ Sat Jan 15 00:41:12 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + * netsvcs/clients/Naming/Client/main.cpp (main): Replaced + the ad hoc use of argc/argv processing with the ACE_ARGV + approach. + + * examples/Service_Configurator/Misc/main.cpp (main): Replaced + the ad hoc use of argc/argv processing with the ACE_ARGV + approach. Note that this required the enhancement shown in the + following bullet. + + * ace/Svc_Conf.l: Updated the Service Configurator lexer so that + it will also accept strings that are delimited by single quotes, + as well as double quotes. This helps to simplify the use of + ACE_ARGV to create svc.conf entries "on-the-fly". + + * tests: Added a new test ARGV_Test.cpp that illustrates how to + use advanced features of <ACE_ARGV>. Thanks to Suresh Kannan + <kannan@uav.ae.gatech.edu> for contributing this. + + * ace/config-win32-common.h: Added + + #define ACE_LACKS_SETREGID + #define ACE_LACKS_SETREUID + + Thanks to Christopher Kohlhoff <chris@kohlhoff.com> for + reporting this. + + * ace/Task.h: Added a comment to the suspend() and resume() methods + encouraging developers not to use these methods unless + absolutely necessary. Thanks to Mark C. Barnes <marcus@muse3d.com> + for motivating this. + * ace: Reorganized the config-win32*.h files to insulate the different compiler configurations from each other. The changes are as follows: diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index a5dc8b490c6..d11ed84966d 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,5 +1,36 @@ Sat Jan 15 00:41:12 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + * netsvcs/clients/Naming/Client/main.cpp (main): Replaced + the ad hoc use of argc/argv processing with the ACE_ARGV + approach. + + * examples/Service_Configurator/Misc/main.cpp (main): Replaced + the ad hoc use of argc/argv processing with the ACE_ARGV + approach. Note that this required the enhancement shown in the + following bullet. + + * ace/Svc_Conf.l: Updated the Service Configurator lexer so that + it will also accept strings that are delimited by single quotes, + as well as double quotes. This helps to simplify the use of + ACE_ARGV to create svc.conf entries "on-the-fly". + + * tests: Added a new test ARGV_Test.cpp that illustrates how to + use advanced features of <ACE_ARGV>. Thanks to Suresh Kannan + <kannan@uav.ae.gatech.edu> for contributing this. + + * ace/config-win32-common.h: Added + + #define ACE_LACKS_SETREGID + #define ACE_LACKS_SETREUID + + Thanks to Christopher Kohlhoff <chris@kohlhoff.com> for + reporting this. + + * ace/Task.h: Added a comment to the suspend() and resume() methods + encouraging developers not to use these methods unless + absolutely necessary. Thanks to Mark C. Barnes <marcus@muse3d.com> + for motivating this. + * ace: Reorganized the config-win32*.h files to insulate the different compiler configurations from each other. The changes are as follows: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index a5dc8b490c6..d11ed84966d 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,5 +1,36 @@ Sat Jan 15 00:41:12 2000 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + * netsvcs/clients/Naming/Client/main.cpp (main): Replaced + the ad hoc use of argc/argv processing with the ACE_ARGV + approach. + + * examples/Service_Configurator/Misc/main.cpp (main): Replaced + the ad hoc use of argc/argv processing with the ACE_ARGV + approach. Note that this required the enhancement shown in the + following bullet. + + * ace/Svc_Conf.l: Updated the Service Configurator lexer so that + it will also accept strings that are delimited by single quotes, + as well as double quotes. This helps to simplify the use of + ACE_ARGV to create svc.conf entries "on-the-fly". + + * tests: Added a new test ARGV_Test.cpp that illustrates how to + use advanced features of <ACE_ARGV>. Thanks to Suresh Kannan + <kannan@uav.ae.gatech.edu> for contributing this. + + * ace/config-win32-common.h: Added + + #define ACE_LACKS_SETREGID + #define ACE_LACKS_SETREUID + + Thanks to Christopher Kohlhoff <chris@kohlhoff.com> for + reporting this. + + * ace/Task.h: Added a comment to the suspend() and resume() methods + encouraging developers not to use these methods unless + absolutely necessary. Thanks to Mark C. Barnes <marcus@muse3d.com> + for motivating this. + * ace: Reorganized the config-win32*.h files to insulate the different compiler configurations from each other. The changes are as follows: @@ -867,6 +867,8 @@ Jerry Jiang <javalist@21cn.com> Rob Ruff <rruff@scires.com> Hugh Arnold <harnold@itginc.com> Hessel Idzenga <idzenga@lucent.com> +Mark C. Barnes <marcus@muse3d.com> +Suresh Kannan <kannan@uav.ae.gatech.edu> I would particularly like to thank Paul Stephenson, who worked with me at Ericsson. Paul devised the recursive Makefile scheme that diff --git a/ace/Makefile b/ace/Makefile index 346b1410007..eff4f5e2edc 100644 --- a/ace/Makefile +++ b/ace/Makefile @@ -481,9 +481,9 @@ Svc_Conf_l.cpp: Svc_Conf.l touch $@; \ fi -#Some compilation for the QtReactor stuff. We need to run moc -#ie. (Meta Object compiler) for our QtReactor.h. So, let me do it -#here. +# Some compilation for the QtReactor stuff. We need to run moc +# ie. (Meta Object compiler) for our QtReactor.h. So, let me do it +# here. ifneq ($(qt_reactor),) QtReactor_moc.cpp: QtReactor.h diff --git a/ace/Svc_Conf.l b/ace/Svc_Conf.l index 75594f25db8..5197676144f 100644 --- a/ace/Svc_Conf.l +++ b/ace/Svc_Conf.l @@ -31,7 +31,7 @@ digit [0-9] ident {letter}{letter_or_digit}* pathname ([A-Za-z\%]:)?[a-zA-Z_0-9/\%\.\\-]+ symbol [ -~] -string \"{symbol}*\" +string (\"{symbol}*\"|\'{symbol}*\') white_space [ \t] newline \n other . @@ -56,8 +56,18 @@ inactive { return token (ACE_INACTIVE); } ")" { return token (ACE_RPAREN); } "{" { return token (ACE_LBRACE); } "}" { return token (ACE_RBRACE); } -{string} { // Eliminate the opening and closing double quotes - *strrchr (yytext, '"') = '\0'; +{string} { // Check for first type of string, i.e., + // "double quotes" delimited. + char *s = strrchr (yytext, '"'); + if (s == 0) + // Check for second type of string, i.e., + // 'single quotes' delimited. + s = strrchr (yytext, '\''); + + ACE_ASSERT (s != 0); + // Eliminate the opening and closing double or + // single quotes. + *s = '\0'; yyleng -= 1; yylval.ident_ = ace_obstack->copy (yytext + 1, yyleng); return token (ACE_STRING); } @@ -71,7 +81,11 @@ inactive { return token (ACE_INACTIVE); } } {white_space}+ ; /* EMPTY */ {newline} { yylineno++; } -{other} { ACE_ERROR ((LM_ERROR, "unknown char = %d\n", *yytext)); } +{other} { ACE_ERROR ((LM_ERROR, "unknown character = (%d", *yytext)); + if (isprint (*yytext)) + ACE_ERROR ((LM_ERROR, "|%c", *yytext)); + ACE_ERROR ((LM_ERROR, ")\n")); + } <<EOF>> { YY_NEW_FILE; yyterminate(); } %% int diff --git a/ace/Svc_Conf_l.cpp b/ace/Svc_Conf_l.cpp index b62846978fa..c950bc856ad 100644 --- a/ace/Svc_Conf_l.cpp +++ b/ace/Svc_Conf_l.cpp @@ -1,11 +1,13 @@ -#define ACE_BUILD_DLL /* A lexical scanner generated by flex */ +#define ACE_BUILD_DLL /* Scanner skeleton version: - * Header: /home/daffy/u0/vern/flex/flex-2.4.7/RCS/flex.skl,v 1.2 94/08/03 11:13:24 vern Exp + * $Header$ */ #define FLEX_SCANNER +#define ACE_YY_FLEX_MAJOR_VERSION 2 +#define ACE_YY_FLEX_MINOR_VERSION 5 #include "ace/OS.h" @@ -31,7 +33,7 @@ #else /* ! __cplusplus */ -#ifdef __STDC__ +#if __STDC__ #define ACE_YY_USE_PROTOS #define ACE_YY_USE_CONST @@ -39,16 +41,19 @@ #endif /* __STDC__ */ #endif /* ! __cplusplus */ - #ifdef __TURBOC__ + #pragma warn -rch + #pragma warn -use +#include /**/ <io.h> +#include /**/ <stdlib.h> #define ACE_YY_USE_CONST +#define ACE_YY_USE_PROTOS #endif - -#ifndef ACE_YY_USE_CONST -#ifndef const -#define const -#endif +#ifdef ACE_YY_USE_CONST +#define ace_yyconst const +#else +#define ace_yyconst #endif @@ -75,16 +80,16 @@ #define BEGIN ace_yy_start = 1 + 2 * /* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. + * to BEGIN to return to the state. The ACE_YYSTATE alias is for lex + * compatibility. */ #define ACE_YY_START ((ace_yy_start - 1) / 2) +#define ACE_YYSTATE ACE_YY_START /* Action number for EOF rule of a given start state. */ #define ACE_YY_STATE_EOF(state) (ACE_YY_END_OF_BUFFER + state + 1) -/* Special action meaning "start processing a new file". Now included - * only for backward compatibility with previous versions of flex. - */ +/* Special action meaning "start processing a new file". */ #define ACE_YY_NEW_FILE ace_yyrestart( ace_yyin ) #define ACE_YY_END_OF_BUFFER_CHAR 0 @@ -97,14 +102,6 @@ typedef struct ace_yy_buffer_state *ACE_YY_BUFFER_STATE; extern int ace_yyleng; extern FILE *ace_yyin, *ace_yyout; -#ifdef __cplusplus -extern "C" { -#endif - extern int ace_yywrap ACE_YY_PROTO(( void )); -#ifdef __cplusplus - } -#endif - #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 @@ -130,6 +127,7 @@ extern "C" { { \ /* Undo effects of setting up ace_yytext. */ \ *ace_yy_cp = ace_yy_hold_char; \ + ACE_YY_RESTORE_ACE_YY_MORE_OFFSET \ ace_yy_c_buf_p = ace_yy_cp = ace_yy_bp + n - ACE_YY_MORE_ADJ; \ ACE_YY_DO_BEFORE_ACTION; /* set up ace_yytext again */ \ } \ @@ -139,6 +137,12 @@ extern "C" { #define unput(c) ace_yyunput( c, ace_yytext_ptr ) #endif /* 0 */ +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int ace_yy_size_t; + struct ace_yy_buffer_state { @@ -150,13 +154,19 @@ struct ace_yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - int ace_yy_buf_size; + ace_yy_size_t ace_yy_buf_size; /* Number of characters read into ace_yy_ch_buf, not including EOB * characters. */ int ace_yy_n_chars; + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int ace_yy_is_our_buffer; + /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after @@ -164,6 +174,12 @@ struct ace_yy_buffer_state */ int ace_yy_is_interactive; + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int ace_yy_at_bol; + /* Whether to try to fill the input buffer when we reach the * end of it. */ @@ -212,98 +228,97 @@ static int ace_yy_start = 0; /* start state number */ */ static int ace_yy_did_buffer_switch_on_eof; -#if 0 -static void ace_yyunput ACE_YY_PROTO(( int c, char *buf_ptr )); -#endif /* 0 */ void ace_yyrestart ACE_YY_PROTO(( FILE *input_file )); + void ace_yy_switch_to_buffer ACE_YY_PROTO(( ACE_YY_BUFFER_STATE new_buffer )); void ace_yy_load_buffer_state ACE_YY_PROTO(( void )); ACE_YY_BUFFER_STATE ace_yy_create_buffer ACE_YY_PROTO(( FILE *file, int size )); void ace_yy_delete_buffer ACE_YY_PROTO(( ACE_YY_BUFFER_STATE b )); void ace_yy_init_buffer ACE_YY_PROTO(( ACE_YY_BUFFER_STATE b, FILE *file )); +void ace_yy_flush_buffer ACE_YY_PROTO(( ACE_YY_BUFFER_STATE b )); +#define ACE_YY_FLUSH_BUFFER ace_yy_flush_buffer( ace_yy_current_buffer ) -#if 0 -static int ace_yy_start_stack_ptr = 0; -static int ace_yy_start_stack_depth = 0; -static int *ace_yy_start_stack = 0; -static void ace_yy_push_state ACE_YY_PROTO(( int new_state )); -static void ace_yy_pop_state ACE_YY_PROTO(( void )); -static int ace_yy_top_state ACE_YY_PROTO(( void )); -#endif /* 0 */ +ACE_YY_BUFFER_STATE ace_yy_scan_buffer ACE_YY_PROTO(( char *base, ace_yy_size_t size )); +ACE_YY_BUFFER_STATE ace_yy_scan_string ACE_YY_PROTO(( ace_yyconst char *ace_yy_str )); +ACE_YY_BUFFER_STATE ace_yy_scan_bytes ACE_YY_PROTO(( ace_yyconst char *bytes, int len )); -static void *ace_yy_flex_alloc ACE_YY_PROTO(( unsigned int )); -static void *ace_yy_flex_realloc ACE_YY_PROTO(( void *, unsigned int )); +static void *ace_yy_flex_alloc ACE_YY_PROTO(( ace_yy_size_t )); +static void *ace_yy_flex_realloc ACE_YY_PROTO(( void *, ace_yy_size_t )); static void ace_yy_flex_free ACE_YY_PROTO(( void * )); #define ace_yy_new_buffer ace_yy_create_buffer -#define INITIAL 0 -#define PARAMETERS 1 -#define NORMAL 2 +#define ace_yy_set_interactive(is_interactive) \ + { \ + if ( ! ace_yy_current_buffer ) \ + ace_yy_current_buffer = ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE ); \ + ace_yy_current_buffer->ace_yy_is_interactive = is_interactive; \ + } + +#define ace_yy_set_bol(at_bol) \ + { \ + if ( ! ace_yy_current_buffer ) \ + ace_yy_current_buffer = ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE ); \ + ace_yy_current_buffer->ace_yy_at_bol = at_bol; \ + } + +#define ACE_YY_AT_BOL() (ace_yy_current_buffer->ace_yy_at_bol) + typedef unsigned char ACE_YY_CHAR; -typedef int ace_yy_state_type; FILE *ace_yyin = (FILE *) 0, *ace_yyout = (FILE *) 0; +typedef int ace_yy_state_type; extern char *ace_yytext; #define ace_yytext_ptr ace_yytext -#ifndef ace_yytext_ptr -static void ace_yy_flex_strncpy ACE_YY_PROTO(( char *, const char *, int )); -#endif - -#ifdef __cplusplus -static int ace_yyinput ACE_YY_PROTO(( void )); -#else -static int input ACE_YY_PROTO(( void )); -#endif - static ace_yy_state_type ace_yy_get_previous_state ACE_YY_PROTO(( void )); static ace_yy_state_type ace_yy_try_NUL_trans ACE_YY_PROTO(( ace_yy_state_type current_state )); static int ace_yy_get_next_buffer ACE_YY_PROTO(( void )); -static void ace_yy_fatal_error ACE_YY_PROTO(( const char msg[] )); +static void ace_yy_fatal_error ACE_YY_PROTO(( ace_yyconst char msg[] )); /* Done after the current pattern has been matched and before the * corresponding action - sets up ace_yytext. */ #define ACE_YY_DO_BEFORE_ACTION \ ace_yytext_ptr = ace_yy_bp; \ - ace_yyleng = ace_yy_cp - ace_yy_bp; \ + ace_yyleng = (int) (ace_yy_cp - ace_yy_bp); \ ace_yy_hold_char = *ace_yy_cp; \ *ace_yy_cp = '\0'; \ ace_yy_c_buf_p = ace_yy_cp; +#define ACE_YY_NUM_RULES 25 #define ACE_YY_END_OF_BUFFER 26 -static const short int ace_yy_accept[104] = +static ace_yyconst short int ace_yy_accept[107] = { 0, 0, 0, 0, 0, 0, 0, 26, 24, 22, 23, - 24, 21, 15, 16, 14, 21, 13, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 17, 18, 24, 22, - 0, 19, 21, 0, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 0, 1, 20, 20, 20, 20, + 24, 21, 24, 15, 16, 14, 21, 13, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 17, 18, 24, + 22, 0, 19, 21, 0, 0, 19, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 0, 1, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 8, - 10, 20, 11, 20, 20, 6, 5, 3, 7, 20, - 20, 2, 20, 4, 20, 12, 20, 20, 20, 20, + 20, 20, 8, 10, 20, 11, 20, 20, 6, 5, + 3, 7, 20, 20, 2, 20, 4, 20, 12, 20, - 20, 9, 0 + 20, 20, 20, 20, 9, 0 } ; -static const int ace_yy_ec[256] = +static ace_yyconst int ace_yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 5, 6, 7, 5, 8, 5, 5, 9, - 10, 11, 5, 5, 12, 12, 12, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 14, 5, 5, - 5, 5, 5, 5, 15, 16, 16, 16, 17, 16, - 16, 16, 16, 16, 16, 16, 18, 16, 19, 16, - 16, 20, 21, 22, 16, 16, 16, 16, 16, 16, - 5, 12, 5, 5, 23, 5, 24, 25, 26, 27, - - 28, 16, 16, 16, 29, 30, 16, 31, 32, 33, - 34, 35, 16, 36, 37, 38, 39, 40, 16, 16, - 41, 16, 42, 5, 43, 5, 1, 1, 1, 1, + 1, 4, 5, 6, 7, 5, 8, 5, 9, 10, + 11, 12, 5, 5, 13, 13, 13, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 15, 5, 5, + 5, 5, 5, 5, 16, 17, 17, 17, 18, 17, + 17, 17, 17, 17, 17, 17, 19, 17, 20, 17, + 17, 21, 22, 23, 17, 17, 17, 17, 17, 17, + 5, 13, 5, 5, 24, 5, 25, 26, 27, 28, + + 29, 17, 17, 17, 30, 31, 17, 32, 33, 34, + 35, 36, 17, 37, 38, 39, 40, 41, 17, 17, + 42, 17, 43, 5, 44, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -320,159 +335,161 @@ static const int ace_yy_ec[256] = 1, 1, 1, 1, 1 } ; -static const int ace_yy_meta[44] = +static ace_yyconst int ace_yy_meta[45] = { 0, 1, 1, 1, 2, 2, 2, 2, 3, 2, 2, - 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 2, 2 + 3, 3, 2, 2 } ; -static const short int ace_yy_base[108] = +static ace_yyconst short int ace_yy_base[112] = { 0, - 0, 112, 0, 107, 0, 99, 104, 439, 42, 439, - 95, 79, 439, 439, 439, 77, 439, 37, 40, 45, - 48, 56, 57, 64, 67, 72, 439, 439, 87, 59, - 79, 71, 52, 44, 75, 80, 88, 91, 101, 104, - 109, 112, 117, 120, 52, 439, 128, 138, 146, 151, - 154, 161, 162, 169, 176, 177, 185, 186, 195, 204, - 207, 214, 215, 222, 223, 230, 237, 240, 252, 255, - 262, 263, 270, 271, 278, 281, 289, 290, 299, 300, - 309, 312, 317, 322, 325, 330, 333, 338, 341, 346, - 349, 354, 362, 363, 370, 371, 379, 380, 387, 388, - - 395, 404, 439, 432, 47, 44, 435 + 0, 132, 0, 127, 0, 123, 129, 437, 43, 437, + 122, 112, 109, 437, 437, 437, 102, 437, 38, 41, + 42, 51, 54, 55, 64, 65, 74, 437, 437, 104, + 56, 93, 86, 70, 69, 66, 65, 75, 78, 87, + 88, 96, 97, 107, 108, 111, 125, 58, 437, 129, + 137, 141, 145, 149, 153, 157, 163, 171, 175, 181, + 187, 193, 199, 203, 207, 213, 217, 223, 233, 234, + 242, 252, 253, 261, 262, 265, 271, 274, 277, 285, + 289, 300, 301, 310, 311, 320, 323, 324, 333, 334, + 343, 344, 347, 353, 356, 359, 365, 371, 368, 374, + + 377, 386, 389, 390, 398, 437, 428, 49, 430, 45, + 433 } ; -static const short int ace_yy_def[108] = +static ace_yyconst short int ace_yy_def[112] = { 0, - 103, 1, 1, 1, 1, 1, 103, 103, 103, 103, - 104, 105, 103, 103, 103, 105, 103, 106, 106, 106, - 106, 106, 106, 106, 106, 106, 103, 103, 107, 103, - 104, 104, 105, 105, 106, 106, 106, 106, 106, 106, - 106, 106, 106, 106, 107, 103, 106, 106, 106, 106, - 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, - 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, - 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, - 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, - 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, - - 106, 106, 0, 103, 103, 103, 103 + 106, 1, 1, 1, 1, 1, 106, 106, 106, 106, + 107, 108, 109, 106, 106, 106, 108, 106, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 106, 106, 111, + 106, 107, 107, 108, 108, 109, 109, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 111, 106, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + + 110, 110, 110, 110, 110, 0, 106, 106, 106, 106, + 106 } ; -static const short int ace_yy_nxt[483] = +static ace_yyconst short int ace_yy_nxt[482] = { 0, 8, 9, 10, 9, 8, 11, 8, 12, 13, 14, - 15, 16, 16, 17, 18, 18, 18, 19, 18, 18, - 20, 18, 21, 22, 18, 18, 23, 18, 24, 18, - 18, 18, 18, 18, 18, 25, 26, 18, 18, 18, - 18, 27, 28, 30, 33, 30, 35, 33, 33, 33, - 34, 33, 33, 34, 46, 33, 33, 103, 34, 33, - 30, 103, 30, 33, 33, 103, 37, 33, 33, 34, - 34, 33, 38, 36, 33, 33, 32, 34, 33, 33, - 34, 39, 33, 33, 32, 34, 33, 33, 103, 46, - 103, 33, 34, 103, 42, 33, 41, 40, 33, 33, - - 32, 103, 33, 103, 103, 29, 47, 48, 33, 43, - 44, 33, 33, 29, 103, 33, 33, 103, 29, 33, - 33, 103, 103, 33, 33, 103, 49, 33, 33, 103, - 103, 33, 52, 103, 103, 33, 51, 103, 50, 33, - 55, 103, 103, 53, 103, 33, 103, 103, 54, 33, - 103, 103, 56, 33, 59, 103, 57, 33, 33, 103, - 103, 33, 33, 103, 103, 33, 58, 103, 33, 33, - 103, 103, 33, 33, 103, 103, 33, 62, 103, 61, - 33, 103, 103, 33, 33, 60, 63, 33, 33, 103, - 103, 103, 33, 33, 103, 64, 33, 33, 103, 103, - - 103, 103, 33, 103, 67, 103, 33, 65, 103, 70, - 103, 33, 103, 66, 33, 33, 69, 103, 33, 68, - 103, 33, 33, 103, 103, 33, 33, 103, 103, 33, - 33, 103, 71, 33, 33, 103, 103, 33, 103, 103, - 103, 33, 103, 103, 33, 73, 72, 33, 33, 103, - 103, 33, 74, 103, 76, 103, 103, 103, 77, 33, - 78, 75, 33, 33, 103, 103, 33, 79, 103, 33, - 33, 103, 81, 33, 33, 103, 103, 33, 33, 80, - 103, 33, 33, 103, 103, 33, 103, 82, 33, 33, - 83, 103, 33, 103, 103, 103, 33, 33, 84, 85, - - 33, 33, 103, 103, 103, 86, 33, 33, 87, 103, - 33, 33, 103, 103, 88, 103, 33, 103, 103, 33, - 33, 89, 103, 33, 33, 103, 103, 103, 33, 33, - 103, 90, 33, 33, 103, 103, 33, 33, 103, 91, - 33, 33, 103, 103, 33, 33, 103, 92, 33, 33, - 103, 103, 33, 33, 103, 103, 33, 33, 103, 103, - 33, 33, 103, 103, 93, 33, 103, 103, 103, 33, - 33, 95, 94, 33, 33, 103, 103, 33, 33, 103, - 103, 33, 33, 103, 103, 103, 33, 33, 97, 96, - 33, 33, 103, 103, 33, 33, 103, 103, 33, 33, - - 103, 103, 33, 98, 103, 103, 33, 103, 103, 99, - 103, 33, 103, 101, 100, 33, 103, 103, 103, 103, - 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103, 102, 31, 31, 45, 45, 45, 7, 103, - 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103 + 15, 16, 17, 17, 18, 19, 19, 19, 20, 19, + 19, 21, 19, 22, 23, 19, 19, 24, 19, 25, + 19, 19, 19, 19, 19, 19, 26, 27, 19, 19, + 19, 19, 28, 29, 31, 34, 31, 38, 34, 34, + 34, 34, 35, 34, 34, 35, 35, 31, 34, 31, + 49, 34, 34, 34, 40, 106, 34, 34, 35, 35, + 41, 34, 34, 37, 37, 39, 34, 34, 35, 35, + 42, 34, 34, 106, 106, 34, 34, 34, 35, 106, + 34, 33, 106, 45, 34, 34, 43, 44, 33, 34, + + 34, 106, 106, 34, 34, 50, 49, 51, 34, 34, + 106, 106, 46, 47, 34, 34, 106, 37, 34, 34, + 34, 106, 106, 34, 52, 106, 35, 33, 106, 30, + 54, 55, 34, 30, 53, 58, 34, 34, 30, 106, + 56, 34, 106, 106, 34, 57, 106, 59, 34, 34, + 106, 106, 34, 34, 62, 106, 34, 34, 106, 106, + 34, 34, 60, 106, 34, 34, 106, 106, 61, 34, + 34, 106, 106, 65, 64, 34, 106, 106, 34, 66, + 106, 63, 34, 34, 106, 106, 106, 34, 34, 106, + 106, 67, 106, 34, 34, 106, 106, 106, 106, 34, + + 34, 106, 68, 70, 106, 34, 34, 106, 73, 69, + 34, 34, 106, 106, 34, 34, 71, 106, 72, 34, + 34, 106, 106, 106, 34, 34, 106, 106, 74, 34, + 34, 106, 106, 106, 106, 34, 106, 106, 106, 76, + 34, 34, 106, 75, 106, 34, 34, 106, 106, 34, + 106, 77, 106, 106, 34, 79, 106, 78, 81, 34, + 34, 106, 80, 106, 34, 34, 106, 106, 34, 34, + 82, 84, 34, 34, 34, 106, 106, 34, 34, 106, + 83, 34, 106, 34, 34, 106, 34, 85, 106, 34, + 86, 106, 34, 106, 87, 106, 34, 34, 106, 106, + + 88, 34, 89, 106, 106, 90, 106, 34, 34, 106, + 106, 91, 34, 34, 106, 106, 106, 34, 34, 106, + 106, 92, 34, 34, 106, 106, 106, 34, 106, 106, + 34, 34, 34, 93, 106, 34, 34, 106, 106, 94, + 34, 34, 106, 106, 106, 34, 34, 106, 106, 95, + 34, 34, 106, 106, 34, 34, 34, 106, 106, 34, + 34, 106, 106, 34, 96, 34, 34, 106, 34, 106, + 106, 34, 34, 106, 97, 34, 98, 34, 34, 106, + 34, 34, 106, 34, 34, 106, 34, 99, 106, 34, + 100, 106, 106, 34, 106, 106, 34, 34, 34, 101, + + 106, 34, 34, 106, 106, 34, 106, 102, 106, 106, + 34, 106, 106, 106, 103, 104, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 105, 32, + 32, 36, 36, 48, 48, 48, 7, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106 } ; -static const short int ace_yy_chk[483] = +static ace_yyconst short int ace_yy_chk[482] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 9, 18, 9, 106, 19, 18, 105, - 18, 19, 20, 19, 45, 21, 20, 34, 20, 21, - 30, 21, 30, 22, 23, 33, 20, 22, 23, 22, - 23, 24, 20, 19, 25, 24, 32, 24, 25, 26, - 25, 22, 35, 26, 31, 26, 35, 36, 35, 29, - 16, 36, 12, 36, 25, 37, 24, 23, 38, 37, - - 11, 37, 38, 7, 38, 6, 36, 37, 39, 26, - 26, 40, 39, 4, 39, 40, 41, 40, 2, 42, - 41, 0, 41, 42, 43, 42, 38, 44, 43, 0, - 43, 44, 41, 44, 0, 47, 40, 0, 39, 47, - 43, 47, 0, 42, 0, 48, 0, 0, 42, 48, - 0, 48, 43, 49, 48, 0, 44, 49, 50, 49, - 0, 51, 50, 0, 50, 51, 47, 51, 52, 53, - 0, 0, 52, 53, 52, 53, 54, 51, 0, 50, - 54, 0, 54, 55, 56, 49, 52, 55, 56, 55, - 56, 0, 57, 58, 0, 53, 57, 58, 57, 58, - - 0, 0, 59, 0, 56, 0, 59, 54, 59, 59, - 0, 60, 0, 55, 61, 60, 58, 60, 61, 57, - 61, 62, 63, 0, 0, 62, 63, 62, 63, 64, - 65, 0, 60, 64, 65, 64, 65, 66, 0, 0, - 0, 66, 0, 66, 67, 62, 61, 68, 67, 0, - 67, 68, 63, 68, 65, 0, 0, 0, 66, 69, - 67, 64, 70, 69, 0, 69, 70, 68, 70, 71, - 72, 0, 70, 71, 72, 71, 72, 73, 74, 69, - 0, 73, 74, 73, 74, 75, 0, 71, 76, 75, - 72, 75, 76, 0, 76, 0, 77, 78, 73, 74, - - 77, 78, 77, 78, 0, 75, 79, 80, 76, 0, - 79, 80, 79, 80, 77, 0, 81, 0, 0, 82, - 81, 78, 81, 82, 83, 82, 0, 0, 83, 84, - 83, 79, 85, 84, 0, 84, 85, 86, 85, 82, - 87, 86, 0, 86, 87, 88, 87, 84, 89, 88, - 0, 88, 89, 90, 89, 0, 91, 90, 0, 90, - 91, 92, 91, 0, 85, 92, 0, 92, 0, 93, - 94, 91, 90, 93, 94, 93, 94, 95, 96, 0, - 0, 95, 96, 95, 96, 0, 97, 98, 95, 93, - 97, 98, 97, 98, 99, 100, 0, 0, 99, 100, - - 99, 100, 101, 97, 0, 0, 101, 0, 101, 98, - 0, 102, 0, 100, 99, 102, 0, 102, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 101, 104, 104, 107, 107, 107, 103, 103, - 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, - 103, 103 + 1, 1, 1, 1, 9, 19, 9, 110, 20, 21, + 19, 108, 19, 20, 21, 20, 21, 31, 22, 31, + 48, 23, 24, 22, 21, 22, 23, 24, 23, 24, + 21, 25, 26, 37, 36, 20, 25, 26, 25, 26, + 23, 27, 38, 35, 34, 39, 27, 38, 27, 38, + 39, 33, 39, 26, 40, 41, 24, 25, 32, 40, + + 41, 40, 41, 42, 43, 39, 30, 40, 42, 43, + 42, 43, 27, 27, 44, 45, 17, 13, 46, 44, + 45, 44, 45, 46, 41, 46, 12, 11, 7, 6, + 43, 44, 47, 4, 42, 46, 50, 47, 2, 47, + 45, 50, 0, 50, 51, 45, 0, 46, 52, 51, + 0, 51, 53, 52, 51, 52, 54, 53, 0, 53, + 55, 54, 47, 54, 56, 55, 0, 55, 50, 56, + 57, 56, 0, 54, 53, 57, 0, 57, 58, 55, + 0, 52, 59, 58, 0, 58, 0, 59, 60, 59, + 0, 56, 0, 60, 61, 60, 0, 0, 0, 61, + + 62, 61, 57, 59, 0, 62, 63, 62, 62, 58, + 64, 63, 0, 63, 65, 64, 60, 64, 61, 65, + 66, 65, 0, 0, 67, 66, 0, 66, 63, 67, + 68, 67, 0, 0, 0, 68, 0, 68, 0, 65, + 69, 70, 0, 64, 0, 69, 70, 69, 70, 71, + 0, 66, 0, 0, 71, 68, 71, 67, 70, 72, + 73, 0, 69, 0, 72, 73, 72, 73, 74, 75, + 71, 73, 76, 74, 75, 74, 75, 76, 77, 76, + 72, 78, 0, 77, 79, 77, 78, 74, 78, 79, + 75, 79, 80, 0, 76, 0, 81, 80, 0, 80, + + 77, 81, 78, 81, 0, 79, 0, 82, 83, 0, + 0, 80, 82, 83, 82, 83, 0, 84, 85, 0, + 0, 81, 84, 85, 84, 85, 0, 86, 0, 0, + 87, 88, 86, 82, 86, 87, 88, 87, 88, 85, + 89, 90, 0, 0, 0, 89, 90, 89, 90, 87, + 91, 92, 0, 0, 93, 91, 92, 91, 92, 93, + 94, 93, 0, 95, 88, 94, 96, 94, 95, 0, + 95, 96, 97, 96, 93, 99, 94, 97, 98, 97, + 99, 100, 99, 98, 101, 98, 100, 96, 100, 101, + 98, 101, 0, 102, 0, 0, 103, 104, 102, 100, + + 102, 103, 104, 103, 104, 105, 0, 101, 0, 0, + 105, 0, 105, 0, 102, 103, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 104, 107, + 107, 109, 109, 111, 111, 111, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, + 106 } ; static ace_yy_state_type ace_yy_last_accepting_state; @@ -484,9 +501,11 @@ static char *ace_yy_last_accepting_cpos; #define REJECT reject_used_but_not_detected #define ace_yymore() ace_yymore_used_but_not_detected #define ACE_YY_MORE_ADJ 0 +#define ACE_YY_RESTORE_ACE_YY_MORE_OFFSET char *ace_yytext; -# line 1 "Svc_Conf.l" -# line 2 "Svc_Conf.l" +#line 1 "Svc_Conf.l" +#define INITIAL 0 +#line 2 "Svc_Conf.l" // $Id$ // Sample lexical analysis for regular expression subset. Must be // compiled with FLEX and an ANSI C++ compiler. @@ -508,11 +527,63 @@ int ace_yyerrno = 0; const ASYS_TCHAR *ace_yydirective = 0; #define token(x) x +#define PARAMETERS 1 + +#define NORMAL 2 + /* Macros after this point can all be overridden by user definitions in * section 1. */ +#ifndef ACE_YY_SKIP_ACE_YYWRAP +#ifdef __cplusplus +extern "C" int ace_yywrap ACE_YY_PROTO(( void )); +#else +extern int ace_yywrap ACE_YY_PROTO(( void )); +#endif +#endif + +#ifndef ACE_YY_NO_UNPUT +static void ace_yyunput ACE_YY_PROTO(( int c, char *buf_ptr )); +#endif + +#ifndef ace_yytext_ptr +static void ace_yy_flex_strncpy ACE_YY_PROTO(( char *, ace_yyconst char *, int )); +#endif + +#ifdef ACE_YY_NEED_STRLEN +static int ace_yy_flex_strlen ACE_YY_PROTO(( ace_yyconst char * )); +#endif + +#ifndef ACE_YY_NO_INPUT +#ifdef __cplusplus +static int ace_yyinput ACE_YY_PROTO(( void )); +#else +static int input ACE_YY_PROTO(( void )); +#endif +#endif + +#if ACE_YY_STACK_USED +static int ace_yy_start_stack_ptr = 0; +static int ace_yy_start_stack_depth = 0; +static int *ace_yy_start_stack = 0; +#ifndef ACE_YY_NO_PUSH_STATE +static void ace_yy_push_state ACE_YY_PROTO(( int new_state )); +#endif +#ifndef ACE_YY_NO_POP_STATE +static void ace_yy_pop_state ACE_YY_PROTO(( void )); +#endif +#ifndef ACE_YY_NO_TOP_STATE +static int ace_yy_top_state ACE_YY_PROTO(( void )); +#endif + +#else +#define ACE_YY_NO_PUSH_STATE 1 +#define ACE_YY_NO_POP_STATE 1 +#define ACE_YY_NO_TOP_STATE 1 +#endif + #ifdef ACE_YY_MALLOC_DECL ACE_YY_MALLOC_DECL #else @@ -549,9 +620,15 @@ ACE_YY_MALLOC_DECL #define ACE_YY_INPUT(buf,result,max_size) \ if ( ace_yy_current_buffer->ace_yy_is_interactive ) \ { \ - int c = getc( ace_yyin ); \ - result = c == EOF ? 0 : 1; \ - buf[0] = (char) c; \ + int c = '*', n; \ + for ( n = 0; n < max_size && \ + (c = getc( ace_yyin )) != EOF && c != '\n'; ++n ) \ + buf[n] = (char) c; \ + if ( c == '\n' ) \ + buf[n++] = (char) c; \ + if ( c == EOF && ferror( ace_yyin ) ) \ + ACE_YY_FATAL_ERROR( "input in flex scanner failed" ); \ + result = n; \ } \ else if ( ((result = fread( buf, 1, max_size, ace_yyin )) == 0) \ && ferror( ace_yyin ) ) \ @@ -595,18 +672,26 @@ ACE_YY_MALLOC_DECL #define ACE_YY_BREAK break; #endif +#define ACE_YY_RULE_SETUP \ + if ( ace_yyleng > 0 ) \ + ace_yy_current_buffer->ace_yy_at_bol = \ + (ace_yytext[ace_yyleng - 1] == '\n'); \ + ACE_YY_USER_ACTION + ACE_YY_DECL { register ace_yy_state_type ace_yy_current_state; register char *ace_yy_cp = 0, *ace_yy_bp = 0; register int ace_yy_act; -# line 39 "Svc_Conf.l" +#line 39 "Svc_Conf.l" if ( ace_yy_init ) { + ace_yy_init = 0; + #ifdef ACE_YY_USER_INIT ACE_YY_USER_INIT; #endif @@ -620,15 +705,11 @@ ACE_YY_DECL if ( ! ace_yyout ) ace_yyout = stdout; - if ( ace_yy_current_buffer ) - ace_yy_init_buffer( ace_yy_current_buffer, ace_yyin ); - else + if ( ! ace_yy_current_buffer ) ace_yy_current_buffer = ace_yy_create_buffer( ace_yyin, ACE_YY_BUF_SIZE ); ace_yy_load_buffer_state(); - - ace_yy_init = 0; } while ( 1 ) /* loops until end-of-file is reached */ @@ -644,8 +725,7 @@ ACE_YY_DECL ace_yy_bp = ace_yy_cp; ace_yy_current_state = ace_yy_start; - if ( ace_yy_bp[-1] == '\n' ) - ++ace_yy_current_state; + ace_yy_current_state += ACE_YY_AT_BOL(); ace_yy_match: do { @@ -658,16 +738,22 @@ ace_yy_match: while ( ace_yy_chk[ace_yy_base[ace_yy_current_state] + ace_yy_c] != ace_yy_current_state ) { ace_yy_current_state = (int) ace_yy_def[ace_yy_current_state]; - if ( ace_yy_current_state >= 104 ) + if ( ace_yy_current_state >= 107 ) ace_yy_c = ace_yy_meta[(unsigned int) ace_yy_c]; } ace_yy_current_state = ace_yy_nxt[ace_yy_base[ace_yy_current_state] + (unsigned int) ace_yy_c]; ++ace_yy_cp; } - while ( ace_yy_base[ace_yy_current_state] != 439 ); + while ( ace_yy_base[ace_yy_current_state] != 437 ); ace_yy_find_action: ace_yy_act = ace_yy_accept[ace_yy_current_state]; + if ( ace_yy_act == 0 ) + { /* have to back up */ + ace_yy_cp = ace_yy_last_accepting_cpos; + ace_yy_current_state = ace_yy_last_accepting_state; + ace_yy_act = ace_yy_accept[ace_yy_current_state]; + } ACE_YY_DO_BEFORE_ACTION; @@ -688,155 +774,169 @@ case 1: *ace_yy_cp = ace_yy_hold_char; /* undo effects of setting up ace_yytext */ ace_yy_c_buf_p = ace_yy_cp -= 1; ACE_YY_DO_BEFORE_ACTION; /* set up ace_yytext again */ -ACE_YY_USER_ACTION -# line 41 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 41 "Svc_Conf.l" ; /* EMPTY */ ACE_YY_BREAK case 2: -ACE_YY_USER_ACTION -# line 42 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 42 "Svc_Conf.l" { return token (ACE_DYNAMIC); } - /* ACE_YY_BREAK */ + // ACE_YY_BREAK case 3: -ACE_YY_USER_ACTION -# line 43 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 43 "Svc_Conf.l" { return token (ACE_STATIC); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 4: -ACE_YY_USER_ACTION -# line 44 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 44 "Svc_Conf.l" { return token (ACE_SUSPEND); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 5: -ACE_YY_USER_ACTION -# line 45 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 45 "Svc_Conf.l" { return token (ACE_RESUME); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 6: -ACE_YY_USER_ACTION -# line 46 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 46 "Svc_Conf.l" { return token (ACE_REMOVE); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 7: -ACE_YY_USER_ACTION -# line 47 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 47 "Svc_Conf.l" { return token (ACE_USTREAM); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 8: -ACE_YY_USER_ACTION -# line 48 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 48 "Svc_Conf.l" { return token (ACE_MODULE_T); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 9: -ACE_YY_USER_ACTION -# line 49 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 49 "Svc_Conf.l" { return token (ACE_SVC_OBJ_T); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 10: -ACE_YY_USER_ACTION -# line 50 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 50 "Svc_Conf.l" { return token (ACE_STREAM_T); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 11: -ACE_YY_USER_ACTION -# line 51 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 51 "Svc_Conf.l" { return token (ACE_ACTIVE); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 12: -ACE_YY_USER_ACTION -# line 52 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 52 "Svc_Conf.l" { return token (ACE_INACTIVE); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 13: -ACE_YY_USER_ACTION -# line 53 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 53 "Svc_Conf.l" { return token (ACE_COLON); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 14: -ACE_YY_USER_ACTION -# line 54 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 54 "Svc_Conf.l" { return token (ACE_STAR); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 15: -ACE_YY_USER_ACTION -# line 55 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 55 "Svc_Conf.l" { return token (ACE_LPAREN); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 16: -ACE_YY_USER_ACTION -# line 56 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 56 "Svc_Conf.l" { return token (ACE_RPAREN); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 17: -ACE_YY_USER_ACTION -# line 57 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 57 "Svc_Conf.l" { return token (ACE_LBRACE); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 18: -ACE_YY_USER_ACTION -# line 58 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 58 "Svc_Conf.l" { return token (ACE_RBRACE); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 19: -ACE_YY_USER_ACTION -# line 59 "Svc_Conf.l" -{ // Eliminate the opening and closing double quotes - *ACE_OS::strrchr (ace_yytext, '"') = '\0'; +ACE_YY_RULE_SETUP +#line 59 "Svc_Conf.l" +{ // Check for first type of string, i.e., + // "double quotes" delimited. + char *s = strrchr (ace_yytext, '"'); + if (s == 0) + // Check for second type of string, i.e., + // 'single quotes' delimited. + s = strrchr (ace_yytext, '\''); + + ACE_ASSERT (s != 0); + // Eliminate the opening and closing double or + // single quotes. + *s = '\0'; ace_yyleng -= 1; ace_yylval.ident_ = ace_obstack->copy (ace_yytext + 1, ace_yyleng); return token (ACE_STRING); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 20: -ACE_YY_USER_ACTION -# line 64 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 74 "Svc_Conf.l" { ace_yylval.ident_ = ace_obstack->copy (ace_yytext, ace_yyleng); return token (ACE_IDENT); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 21: -ACE_YY_USER_ACTION -# line 68 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 78 "Svc_Conf.l" { ace_yylval.ident_ = ace_obstack->copy (ace_yytext, ace_yyleng); return token (ACE_PATHNAME); } - /* ACE_YY_BREAK */ +// ACE_YY_BREAK case 22: -ACE_YY_USER_ACTION -# line 72 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 82 "Svc_Conf.l" ; /* EMPTY */ ACE_YY_BREAK case 23: -ACE_YY_USER_ACTION -# line 73 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 83 "Svc_Conf.l" { ace_yylineno++; } ACE_YY_BREAK case 24: -ACE_YY_USER_ACTION -# line 74 "Svc_Conf.l" -{ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("unknown char = %d\n"), - *ace_yytext)); } +ACE_YY_RULE_SETUP +#line 84 "Svc_Conf.l" +{ ACE_ERROR ((LM_ERROR, "unknown character = (%d", *ace_yytext)); + if (isprint (*ace_yytext)) + ACE_ERROR ((LM_ERROR, "|%c", *ace_yytext)); + ACE_ERROR ((LM_ERROR, ")\n")); + } ACE_YY_BREAK case ACE_YY_STATE_EOF(INITIAL): case ACE_YY_STATE_EOF(PARAMETERS): case ACE_YY_STATE_EOF(NORMAL): -# line 75 "Svc_Conf.l" +#line 89 "Svc_Conf.l" { ACE_YY_NEW_FILE; ace_yyterminate(); } - /* ACE_YY_BREAK */ + ACE_YY_BREAK case 25: -ACE_YY_USER_ACTION -# line 76 "Svc_Conf.l" +ACE_YY_RULE_SETUP +#line 90 "Svc_Conf.l" ACE_SVC_CONF_ECHO; ACE_YY_BREAK case ACE_YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ - int ace_yy_amount_of_matched_text = ace_yy_cp - ace_yytext_ptr - 1; + int ace_yy_amount_of_matched_text = (int) (ace_yy_cp - ace_yytext_ptr) - 1; /* Undo the effects of ACE_YY_DO_BEFORE_ACTION. */ *ace_yy_cp = ace_yy_hold_char; + ACE_YY_RESTORE_ACE_YY_MORE_OFFSET if ( ace_yy_current_buffer->ace_yy_buffer_status == ACE_YY_BUFFER_NEW ) { @@ -892,7 +992,7 @@ ACE_SVC_CONF_ECHO; else { - ace_yy_cp = ace_yy_c_buf_p; + ace_yy_cp = ace_yy_c_buf_p; goto ace_yy_find_action; } } @@ -970,7 +1070,7 @@ ACE_SVC_CONF_ECHO; static int ace_yy_get_next_buffer() { register char *dest = ace_yy_current_buffer->ace_yy_ch_buf; - register char *source = ace_yytext_ptr - 1; /* copy prev. char, too */ + register char *source = ace_yytext_ptr; register int number_to_move, i; int ret_val; @@ -982,7 +1082,7 @@ static int ace_yy_get_next_buffer() { /* Don't try to fill the buffer, so this is an EOF. */ if ( ace_yy_c_buf_p - ace_yytext_ptr - ACE_YY_MORE_ADJ == 1 ) { - /* We matched a singled characater, the EOB, so + /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; @@ -1000,7 +1100,7 @@ static int ace_yy_get_next_buffer() /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = ace_yy_c_buf_p - ace_yytext_ptr; + number_to_move = (int) (ace_yy_c_buf_p - ace_yytext_ptr) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -1009,7 +1109,7 @@ static int ace_yy_get_next_buffer() /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ - ace_yy_n_chars = 0; + ace_yy_current_buffer->ace_yy_n_chars = ace_yy_n_chars = 0; else { @@ -1026,12 +1126,26 @@ static int ace_yy_get_next_buffer() /* just a shorter name for the current buffer */ ACE_YY_BUFFER_STATE b = ace_yy_current_buffer; - int ace_yy_c_buf_p_offset = ace_yy_c_buf_p - b->ace_yy_ch_buf; + int ace_yy_c_buf_p_offset = + (int) (ace_yy_c_buf_p - b->ace_yy_ch_buf); + + if ( b->ace_yy_is_our_buffer ) + { + int new_size = b->ace_yy_buf_size * 2; - b->ace_yy_buf_size *= 2; - b->ace_yy_ch_buf = (char *) - ace_yy_flex_realloc( (void *) b->ace_yy_ch_buf, - b->ace_yy_buf_size ); + if ( new_size <= 0 ) + b->ace_yy_buf_size += b->ace_yy_buf_size / 8; + else + b->ace_yy_buf_size *= 2; + + b->ace_yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + ace_yy_flex_realloc( (void *) b->ace_yy_ch_buf, + b->ace_yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->ace_yy_ch_buf = 0; if ( ! b->ace_yy_ch_buf ) ACE_YY_FATAL_ERROR( @@ -1050,11 +1164,13 @@ static int ace_yy_get_next_buffer() /* Read in more data. */ ACE_YY_INPUT( (&ace_yy_current_buffer->ace_yy_ch_buf[number_to_move]), ace_yy_n_chars, num_to_read ); + + ace_yy_current_buffer->ace_yy_n_chars = ace_yy_n_chars; } if ( ace_yy_n_chars == 0 ) { - if ( number_to_move - ACE_YY_MORE_ADJ == 1 ) + if ( number_to_move == ACE_YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; ace_yyrestart( ace_yyin ); @@ -1075,13 +1191,7 @@ static int ace_yy_get_next_buffer() ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars] = ACE_YY_END_OF_BUFFER_CHAR; ace_yy_current_buffer->ace_yy_ch_buf[ace_yy_n_chars + 1] = ACE_YY_END_OF_BUFFER_CHAR; - /* ace_yytext begins at the second character in ace_yy_ch_buf; the first - * character is the one which preceded it before reading in the latest - * buffer; it needs to be kept around in case it's a newline, so - * ace_yy_get_previous_state() will have with '^' rules active. - */ - - ace_yytext_ptr = &ace_yy_current_buffer->ace_yy_ch_buf[1]; + ace_yytext_ptr = &ace_yy_current_buffer->ace_yy_ch_buf[0]; return ret_val; } @@ -1094,11 +1204,8 @@ static ace_yy_state_type ace_yy_get_previous_state() register ace_yy_state_type ace_yy_current_state; register char *ace_yy_cp; - register char *ace_yy_bp = ace_yytext_ptr; - ace_yy_current_state = ace_yy_start; - if ( ace_yy_bp[-1] == '\n' ) - ++ace_yy_current_state; + ace_yy_current_state += ACE_YY_AT_BOL(); for ( ace_yy_cp = ace_yytext_ptr + ACE_YY_MORE_ADJ; ace_yy_cp < ace_yy_c_buf_p; ++ace_yy_cp ) { @@ -1111,7 +1218,7 @@ static ace_yy_state_type ace_yy_get_previous_state() while ( ace_yy_chk[ace_yy_base[ace_yy_current_state] + ace_yy_c] != ace_yy_current_state ) { ace_yy_current_state = (int) ace_yy_def[ace_yy_current_state]; - if ( ace_yy_current_state >= 104 ) + if ( ace_yy_current_state >= 107 ) ace_yy_c = ace_yy_meta[(unsigned int) ace_yy_c]; } ace_yy_current_state = ace_yy_nxt[ace_yy_base[ace_yy_current_state] + (unsigned int) ace_yy_c]; @@ -1146,17 +1253,17 @@ ace_yy_state_type ace_yy_current_state; while ( ace_yy_chk[ace_yy_base[ace_yy_current_state] + ace_yy_c] != ace_yy_current_state ) { ace_yy_current_state = (int) ace_yy_def[ace_yy_current_state]; - if ( ace_yy_current_state >= 104 ) + if ( ace_yy_current_state >= 107 ) ace_yy_c = ace_yy_meta[(unsigned int) ace_yy_c]; } ace_yy_current_state = ace_yy_nxt[ace_yy_base[ace_yy_current_state] + (unsigned int) ace_yy_c]; - ace_yy_is_jam = (ace_yy_current_state == 103); + ace_yy_is_jam = (ace_yy_current_state == 106); return ace_yy_is_jam ? 0 : ace_yy_current_state; } -#if 0 +#ifndef ACE_YY_NO_UNPUT #ifdef ACE_YY_USE_PROTOS static void ace_yyunput( int c, register char *ace_yy_bp ) #else @@ -1182,26 +1289,24 @@ register char *ace_yy_bp; while ( source > ace_yy_current_buffer->ace_yy_ch_buf ) *--dest = *--source; - ace_yy_cp += dest - source; - ace_yy_bp += dest - source; - ace_yy_n_chars = ace_yy_current_buffer->ace_yy_buf_size; + ace_yy_cp += (int) (dest - source); + ace_yy_bp += (int) (dest - source); + ace_yy_current_buffer->ace_yy_n_chars = + ace_yy_n_chars = ace_yy_current_buffer->ace_yy_buf_size; if ( ace_yy_cp < ace_yy_current_buffer->ace_yy_ch_buf + 2 ) ACE_YY_FATAL_ERROR( "flex scanner push-back overflow" ); } - if ( ace_yy_cp > ace_yy_bp && ace_yy_cp[-1] == '\n' ) - ace_yy_cp[-2] = '\n'; - *--ace_yy_cp = (char) c; - /* Note: the formal parameter *must* be called "ace_yy_bp" for this - * macro to now work correctly. - */ - ACE_YY_DO_BEFORE_ACTION; /* set up ace_yytext again */ + ace_yytext_ptr = ace_yy_bp; + ace_yy_hold_char = *ace_yy_cp; + ace_yy_c_buf_p = ace_yy_cp; } -#endif /* 0 */ +#endif /* ifndef ACE_YY_NO_UNPUT */ + #ifdef __cplusplus static int ace_yyinput() @@ -1225,21 +1330,34 @@ static int input() else { /* need more input */ - ace_yytext_ptr = ace_yy_c_buf_p; + int offset = ace_yy_c_buf_p - ace_yytext_ptr; ++ace_yy_c_buf_p; switch ( ace_yy_get_next_buffer() ) { + case EOB_ACT_LAST_MATCH: + /* This happens because ace_yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + ace_yyrestart( ace_yyin ); + + /* fall through */ + case EOB_ACT_END_OF_FILE: { if ( ace_yywrap() ) - { - ace_yy_c_buf_p = - ace_yytext_ptr + ACE_YY_MORE_ADJ; return EOF; - } - ACE_YY_NEW_FILE; + if ( ! ace_yy_did_buffer_switch_on_eof ) + ACE_YY_NEW_FILE; #ifdef __cplusplus return ace_yyinput(); #else @@ -1248,17 +1366,8 @@ static int input() } case EOB_ACT_CONTINUE_SCAN: - ace_yy_c_buf_p = ace_yytext_ptr + ACE_YY_MORE_ADJ; + ace_yy_c_buf_p = ace_yytext_ptr + offset; break; - - case EOB_ACT_LAST_MATCH: -#ifdef __cplusplus - ACE_YY_FATAL_ERROR( - "unexpected last match in ace_yyinput()" ); -#else - ACE_YY_FATAL_ERROR( - "unexpected last match in input()" ); -#endif } } } @@ -1267,6 +1376,8 @@ static int input() *ace_yy_c_buf_p = '\0'; /* preserve ace_yytext */ ace_yy_hold_char = *++ace_yy_c_buf_p; + ace_yy_current_buffer->ace_yy_at_bol = (c == '\n'); + return c; } @@ -1340,7 +1451,6 @@ int size; ACE_YY_BUFFER_STATE b; b = (ACE_YY_BUFFER_STATE) ace_yy_flex_alloc( sizeof( struct ace_yy_buffer_state ) ); - if ( ! b ) ACE_YY_FATAL_ERROR( "out of dynamic memory in ace_yy_create_buffer()" ); @@ -1350,10 +1460,11 @@ int size; * we need to put in 2 end-of-buffer characters. */ b->ace_yy_ch_buf = (char *) ace_yy_flex_alloc( b->ace_yy_buf_size + 2 ); - if ( ! b->ace_yy_ch_buf ) ACE_YY_FATAL_ERROR( "out of dynamic memory in ace_yy_create_buffer()" ); + b->ace_yy_is_our_buffer = 1; + ace_yy_init_buffer( b, file ); return b; @@ -1367,14 +1478,25 @@ void ace_yy_delete_buffer( b ) ACE_YY_BUFFER_STATE b; #endif { + if ( ! b ) + return; + if ( b == ace_yy_current_buffer ) ace_yy_current_buffer = (ACE_YY_BUFFER_STATE) 0; - ace_yy_flex_free( (void *) b->ace_yy_ch_buf ); + if ( b->ace_yy_is_our_buffer ) + ace_yy_flex_free( (void *) b->ace_yy_ch_buf ); + ace_yy_flex_free( (void *) b ); } +#ifndef ACE_YY_ALWAYS_INTERACTIVE +#ifndef ACE_YY_NEVER_INTERACTIVE +extern int isatty ACE_YY_PROTO(( int )); +#endif +#endif + #ifdef ACE_YY_USE_PROTOS void ace_yy_init_buffer( ACE_YY_BUFFER_STATE b, FILE *file ) #else @@ -1382,34 +1504,151 @@ void ace_yy_init_buffer( b, file ) ACE_YY_BUFFER_STATE b; FILE *file; #endif + + { + ace_yy_flush_buffer( b ); + b->ace_yy_input_file = file; + b->ace_yy_fill_buffer = 1; - /* We put in the '\n' and start reading from [1] so that an - * initial match-at-newline will be true. - */ +#if ACE_YY_ALWAYS_INTERACTIVE + b->ace_yy_is_interactive = 1; +#else +#if ACE_YY_NEVER_INTERACTIVE + b->ace_yy_is_interactive = 0; +#else + b->ace_yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; +#endif +#endif + } - b->ace_yy_ch_buf[0] = '\n'; - b->ace_yy_n_chars = 1; + +#ifdef ACE_YY_USE_PROTOS +void ace_yy_flush_buffer( ACE_YY_BUFFER_STATE b ) +#else +void ace_yy_flush_buffer( b ) +ACE_YY_BUFFER_STATE b; +#endif + + { + if ( ! b ) + return; + + b->ace_yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ + b->ace_yy_ch_buf[0] = ACE_YY_END_OF_BUFFER_CHAR; b->ace_yy_ch_buf[1] = ACE_YY_END_OF_BUFFER_CHAR; - b->ace_yy_ch_buf[2] = ACE_YY_END_OF_BUFFER_CHAR; - b->ace_yy_buf_pos = &b->ace_yy_ch_buf[1]; + b->ace_yy_buf_pos = &b->ace_yy_ch_buf[0]; - b->ace_yy_is_interactive = file ? isatty( fileno(file) ) : 0; + b->ace_yy_at_bol = 1; + b->ace_yy_buffer_status = ACE_YY_BUFFER_NEW; - b->ace_yy_fill_buffer = 1; + if ( b == ace_yy_current_buffer ) + ace_yy_load_buffer_state(); + } + +#ifndef ACE_YY_NO_SCAN_BUFFER +#ifdef ACE_YY_USE_PROTOS +ACE_YY_BUFFER_STATE ace_yy_scan_buffer( char *base, ace_yy_size_t size ) +#else +ACE_YY_BUFFER_STATE ace_yy_scan_buffer( base, size ) +char *base; +ace_yy_size_t size; +#endif + { + ACE_YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != ACE_YY_END_OF_BUFFER_CHAR || + base[size-1] != ACE_YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (ACE_YY_BUFFER_STATE) ace_yy_flex_alloc( sizeof( struct ace_yy_buffer_state ) ); + if ( ! b ) + ACE_YY_FATAL_ERROR( "out of dynamic memory in ace_yy_scan_buffer()" ); + + b->ace_yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->ace_yy_buf_pos = b->ace_yy_ch_buf = base; + b->ace_yy_is_our_buffer = 0; + b->ace_yy_input_file = 0; + b->ace_yy_n_chars = b->ace_yy_buf_size; + b->ace_yy_is_interactive = 0; + b->ace_yy_at_bol = 1; + b->ace_yy_fill_buffer = 0; b->ace_yy_buffer_status = ACE_YY_BUFFER_NEW; + + ace_yy_switch_to_buffer( b ); + + return b; } +#endif -#if 0 +#ifndef ACE_YY_NO_SCAN_STRING +#ifdef ACE_YY_USE_PROTOS +ACE_YY_BUFFER_STATE ace_yy_scan_string( ace_yyconst char *ace_yy_str ) +#else +ACE_YY_BUFFER_STATE ace_yy_scan_string( ace_yy_str ) +ace_yyconst char *ace_yy_str; +#endif + { + int len; + for ( len = 0; ace_yy_str[len]; ++len ) + ; + + return ace_yy_scan_bytes( ace_yy_str, len ); + } +#endif + + +#ifndef ACE_YY_NO_SCAN_BYTES +#ifdef ACE_YY_USE_PROTOS +ACE_YY_BUFFER_STATE ace_yy_scan_bytes( ace_yyconst char *bytes, int len ) +#else +ACE_YY_BUFFER_STATE ace_yy_scan_bytes( bytes, len ) +ace_yyconst char *bytes; +int len; +#endif + { + ACE_YY_BUFFER_STATE b; + char *buf; + ace_yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *) ace_yy_flex_alloc( n ); + if ( ! buf ) + ACE_YY_FATAL_ERROR( "out of dynamic memory in ace_yy_scan_bytes()" ); + + for ( i = 0; i < len; ++i ) + buf[i] = bytes[i]; + + buf[len] = buf[len+1] = ACE_YY_END_OF_BUFFER_CHAR; + + b = ace_yy_scan_buffer( buf, n ); + if ( ! b ) + ACE_YY_FATAL_ERROR( "bad buffer in ace_yy_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->ace_yy_is_our_buffer = 1; + + return b; + } +#endif + + +#ifndef ACE_YY_NO_PUSH_STATE #ifdef ACE_YY_USE_PROTOS static void ace_yy_push_state( int new_state ) #else @@ -1419,7 +1658,7 @@ int new_state; { if ( ace_yy_start_stack_ptr >= ace_yy_start_stack_depth ) { - int new_size; + ace_yy_size_t new_size; ace_yy_start_stack_depth += ACE_YY_START_STACK_INCR; new_size = ace_yy_start_stack_depth * sizeof( int ); @@ -1440,8 +1679,10 @@ int new_state; BEGIN(new_state); } +#endif +#ifndef ACE_YY_NO_POP_STATE static void ace_yy_pop_state() { if ( --ace_yy_start_stack_ptr < 0 ) @@ -1449,23 +1690,29 @@ static void ace_yy_pop_state() BEGIN(ace_yy_start_stack[ace_yy_start_stack_ptr]); } +#endif +#ifndef ACE_YY_NO_TOP_STATE static int ace_yy_top_state() { return ace_yy_start_stack[ace_yy_start_stack_ptr - 1]; } -#endif /* 0 */ +#endif + +#ifndef ACE_YY_EXIT_FAILURE +#define ACE_YY_EXIT_FAILURE 2 +#endif #ifdef ACE_YY_USE_PROTOS -static void ace_yy_fatal_error( const char msg[] ) +static void ace_yy_fatal_error( ace_yyconst char msg[] ) #else static void ace_yy_fatal_error( msg ) char msg[]; #endif { (void) fprintf( stderr, "%s\n", msg ); - ACE_OS::exit( 1 ); + exit( ACE_YY_EXIT_FAILURE ); } @@ -1478,7 +1725,7 @@ char msg[]; { \ /* Undo effects of setting up ace_yytext. */ \ ace_yytext[ace_yyleng] = ace_yy_hold_char; \ - ace_yy_c_buf_p = ace_yytext + n - ACE_YY_MORE_ADJ; \ + ace_yy_c_buf_p = ace_yytext + n; \ ace_yy_hold_char = *ace_yy_c_buf_p; \ *ace_yy_c_buf_p = '\0'; \ ace_yyleng = n; \ @@ -1490,11 +1737,11 @@ char msg[]; #ifndef ace_yytext_ptr #ifdef ACE_YY_USE_PROTOS -static void ace_yy_flex_strncpy( char *s1, const char *s2, int n ) +static void ace_yy_flex_strncpy( char *s1, ace_yyconst char *s2, int n ) #else static void ace_yy_flex_strncpy( s1, s2, n ) char *s1; -const char *s2; +ace_yyconst char *s2; int n; #endif { @@ -1504,26 +1751,49 @@ int n; } #endif +#ifdef ACE_YY_NEED_STRLEN +#ifdef ACE_YY_USE_PROTOS +static int ace_yy_flex_strlen( ace_yyconst char *s ) +#else +static int ace_yy_flex_strlen( s ) +ace_yyconst char *s; +#endif + { + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; + } +#endif + #ifdef ACE_YY_USE_PROTOS -static void *ace_yy_flex_alloc( unsigned int size ) +static void *ace_yy_flex_alloc( ace_yy_size_t size ) #else static void *ace_yy_flex_alloc( size ) -unsigned int size; +ace_yy_size_t size; #endif { return (void *) malloc( size ); } #ifdef ACE_YY_USE_PROTOS -static void *ace_yy_flex_realloc( void *ptr, unsigned int size ) +static void *ace_yy_flex_realloc( void *ptr, ace_yy_size_t size ) #else static void *ace_yy_flex_realloc( ptr, size ) void *ptr; -unsigned int size; +ace_yy_size_t size; #endif { - return (void *) realloc( ACE_MALLOC_T (ptr), size ); + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); } #ifdef ACE_YY_USE_PROTOS @@ -1535,7 +1805,15 @@ void *ptr; { free( ACE_MALLOC_T (ptr) ); } -# line 76 "Svc_Conf.l" + +#if ACE_YY_MAIN +int main() + { + ace_yylex(); + return 0; + } +#endif +#line 90 "Svc_Conf.l" int ace_yywrap (void) diff --git a/ace/Task.h b/ace/Task.h index de0a4fe4be2..d5a739df0c4 100644 --- a/ace/Task.h +++ b/ace/Task.h @@ -159,7 +159,11 @@ public: virtual int wait (void); // Wait for all threads running in this task to exit. - // = Suspend/resume a Task + // = Suspend/resume a Task. + + // Note that these methods are not portable and should be avoided + // since they are inherently error-prone to use. They are only here + // for (the rare) applications that know how to use them correctly. virtual int suspend (void); // Suspend a task. virtual int resume (void); diff --git a/ace/config-win32-common.h b/ace/config-win32-common.h index de3931d8959..4c715eaa310 100644 --- a/ace/config-win32-common.h +++ b/ace/config-win32-common.h @@ -171,6 +171,8 @@ #define ACE_LACKS_GETPGID #define ACE_LACKS_GETPPID #define ACE_LACKS_SETPGID +#define ACE_LACKS_SETREGID +#define ACE_LACKS_SETREUID #define ACE_HAS_THREAD_SAFE_ACCEPT #define ACE_LACKS_GETHOSTENT #define ACE_LACKS_SIGACTION diff --git a/ace/config-win32-msvc.h b/ace/config-win32-msvc.h new file mode 100644 index 00000000000..e98f2fd5147 --- /dev/null +++ b/ace/config-win32-msvc.h @@ -0,0 +1,209 @@ +// -*- C++ -*- +// $Id$ + +// The following configuration file contains the defines +// common to all Win32/MSVC/MFC combinations. + +#ifndef ACE_WIN32_MSVC_H +#define ACE_WIN32_MSVC_H + +#if defined (_MSC_VER) + +# include "ace/config-win32-common.h" + +# define ACE_CC_NAME "Visual C++" +# define ACE_CC_PREPROCESSOR "CL.EXE" +# define ACE_CC_PREPROCESSOR_ARGS "-nologo -E" + +# if (_MSC_VER >= 1200) +# define ACE_CC_MAJOR_VERSION 6 +# elif (_MSC_VER >= 1100) +# define ACE_CC_MAJOR_VERSION 5 +# elif (_MSC_VER >= 1000) +# define ACE_CC_MAJOR_VERSION 4 +# endif /* _MSC_VER >= 1200 */ + +# define ACE_CC_MINOR_VERSION (_MSC_VER % 100) +# define ACE_CC_BETA_VERSION (0) + +// Define this if you want to use the standard C++ library +//#define ACE_HAS_STANDARD_CPP_LIBRARY 1 + +// MSVC enforces the One Definition Rule +# define ACE_HAS_ONE_DEFINITION_RULE + +# if defined (_MSC_VER) && (_MSC_VER >= 1020) +# if !defined (ACE_HAS_STANDARD_CPP_LIBRARY) +# define ACE_HAS_STANDARD_CPP_LIBRARY 0 +# endif +# else +# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) +# undef ACE_HAS_STANDARD_CPP_LIBRARY +# endif +# define ACE_HAS_STANDARD_CPP_LIBRARY 0 +# endif + +// The STL that comes with ACE uses the std namespace. Note however, it is not +// part of the standard C++ library +# if !defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) +# define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1 +# endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */ + +# if !defined (ACE_HAS_BROKEN_NESTED_TEMPLATES) +# define ACE_HAS_BROKEN_NESTED_TEMPLATES +# endif /* ACE_HAS_BROKEN_NESTED_TEMPLATES */ + +// By default, we disable the C++ casting because +// it requires the RTTI support to be turned on which +// is not something we usually do. +# if !defined (ACE_HAS_ANSI_CASTS) +# define ACE_HAS_ANSI_CASTS 0 +# endif + +// MSVC already defined __TEXT +# define ACE_HAS_TEXT_MACRO_CONFLICT + +# define ACE_HAS_EXPLICIT_KEYWORD +# define ACE_HAS_MUTABLE_KEYWORD + +// VC5 doesn't support operator placement delete +# if defined (_MSC_VER) && (_MSC_VER < 1200) +# define ACE_LACKS_PLACEMENT_OPERATOR_DELETE +# endif /* _MSC_VER && _MSC_VER < 1200 */ + +# define ACE_HAS_WCHAR_TYPEDEFS_USHORT +# if !defined (ACE_HAS_WINCE) +# define ACE_HAS_EXCEPTIONS +# endif /* ACE_HAS_WINCE */ +# define ACE_HAS_BROKEN_NAMESPACES +# define ACE_HAS_BROKEN_IMPLICIT_CONST_CAST +# define ACE_HAS_WORKING_EXPLICIT_TEMPLATE_DESTRUCTOR + +# if defined (ACE_HAS_ANSI_CASTS) && (ACE_HAS_ANSI_CASTS == 0) +# undef ACE_HAS_ANSI_CASTS +# endif /* ACE_HAS_ANSI_CASTS && ACE_HAS_ANSI_CASTS == 0 */ + +# if _MSC_VER < 1000 +# define ACE_LACKS_PRAGMA_ONCE +# endif /* _MSC_VER < 1000 */ + +// Only >= MSVC 5.0 definitions +# if (_MSC_VER >= 1100) +# if !defined (ACE_HAS_WINCE) +# define ACE_HAS_SIG_ATOMIC_T +# endif /* ACE_HAS_WINCE */ +# endif /* _MSC_VER >= 1100 */ + +// Only >= MSVC 6.0 definitions +# if (_MSC_VER >= 1200) +# define ACE_HAS_TYPENAME_KEYWORD +# define ACE_HAS_STD_TEMPLATE_SPECIALIZATION +# endif /* _MSC_VER >= 1200 */ + +// Compiler doesn't support static data member templates. +# define ACE_LACKS_STATIC_DATA_MEMBER_TEMPLATES + +# define ACE_LACKS_MODE_MASKS +# define ACE_LACKS_STRRECVFD + +// Compiler/platform has correctly prototyped header files. +# define ACE_HAS_CPLUSPLUS_HEADERS + +// Platform supports POSIX timers via timestruc_t. +//define ACE_HAS_POSIX_TIME +# define ACE_HAS_STRPTIME +# define ACE_LACKS_NATIVE_STRPTIME + +// Compiler/platform supports strerror (). +# define ACE_HAS_STRERROR + +# define ACE_TEMPLATES_REQUIRE_SOURCE + +// Platform provides ACE_TLI function prototypes. +// For Win32, this is not really true, but saves a lot of hassle! +# define ACE_HAS_TLI_PROTOTYPES +# define ACE_HAS_GNU_CSTRING_H + +// Platform support linebuffered streaming is broken +# define ACE_LACKS_LINEBUFFERED_STREAMBUF + +// Template specialization is supported. +# define ACE_HAS_TEMPLATE_SPECIALIZATION + +// ----------------- "derived" defines and includes ----------- + +# if defined (ACE_HAS_STANDARD_CPP_LIBRARY) && (ACE_HAS_STANDARD_CPP_LIBRARY != 0) + +# if (_MSC_VER > 1020) +// Platform has its Standard C++ library in the namespace std +# if !defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) +# define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1 +# endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */ +# else /* (_MSC_VER > 1020) */ +# if defined (ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB) +# undef ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB +# endif /* ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB */ +# define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 0 +# endif /* (_MSC_VER > 1020) */ + +// Microsoft's auto_ptr in standard cpp library doesn't have reset (). +# define ACE_AUTO_PTR_LACKS_RESET + +// ace/iostream.h does not work with the standard cpp library (yet). +# if !defined (ACE_USES_OLD_IOSTREAMS) +# define ACE_LACKS_ACE_IOSTREAM +# endif /* ! ACE_USES_OLD_IOSTREAMS */ +# else +// iostream header lacks ipfx (), isfx (), etc., declarations +# define ACE_LACKS_IOSTREAM_FX +# endif + +// While digging the MSVC 4.0 include files, I found how to disable +// MSVC warnings: --Amos Shapira + +// "C4355: 'this' : used in base member initializer list" +# pragma warning(disable:4355) /* disable C4514 warning */ +// #pragma warning(default:4355) // use this to reenable, if desired + +# pragma warning(disable:4201) /* winnt.h uses nameless structs */ + +# pragma warning(disable:4231) +// Disable warning of using Microsoft Extension. + +// MSVC 4.0 or greater +# if (_MSC_VER >= 1000) +// Compiler/Platform supports the "using" keyword. +# define ACE_HAS_USING_KEYWORD +# endif + +// MSVC 2.2 or lower +# if (_MSC_VER < 1000) +// This needs to be here since MSVC++ 2.0 seems to have forgotten to +// include it. Does anybody know which MSC_VER MSVC 2.0 has ? +inline void *operator new (unsigned int, void *p) { return p; } +# endif + +# if !defined(ACE_HAS_WINCE) +# if defined(ACE_HAS_DLL) && (ACE_HAS_DLL != 0) +# if !defined(_DLL) +// *** DO NOT *** DO NOT *** defeat this error message +// by defining _DLL yourself. RTFM and see who set _DLL. +# error You must link against (Debug) Multithreaded DLL run-time libraries. +# endif /* !_DLL */ +# endif /* ACE_HAS_DLL && ACE_HAS_DLL != 0 */ +# endif /* !ACE_HAS_WINCE */ + +# ifdef _DEBUG +# if !defined (ACE_HAS_WINCE) +# include /**/ <crtdbg.h> +# endif /* ACE_HAS_WINCE */ +# endif + +# pragma warning(default: 4201) /* winnt.h uses nameless structs */ + +// At least for Win32 - MSVC compiler (ver. 5) +# define ACE_UINT64_FORMAT_SPECIFIER "%I64u" + +#endif /* _MSC_VER */ + +#endif /* ACE_WIN32_COMMON_H */ diff --git a/etc/Svc_Conf_l.cpp.diff b/etc/Svc_Conf_l.cpp.diff index 0d9d4a2ea5c..10413ece157 100644 --- a/etc/Svc_Conf_l.cpp.diff +++ b/etc/Svc_Conf_l.cpp.diff @@ -1,260 +1,204 @@ ---- Svc_Conf_l.cpp.orig Thu Oct 8 15:14:45 1998 -+++ Svc_Conf_l.cpp Thu Oct 8 15:16:27 1998 -@@ -1,7 +1,8 @@ -+#define ACE_BUILD_DLL - /* A lexical scanner generated by flex */ - - /* Scanner skeleton version: -- * $Header: /home/daffy/u0/vern/flex/flex-2.4.7/RCS/flex.skl,v 1.2 94/08/03 11:13:24 vern Exp $ -+ * Header: /home/daffy/u0/vern/flex/flex-2.4.7/RCS/flex.skl,v 1.2 94/08/03 11:13:24 vern Exp - */ - - #define FLEX_SCANNER -@@ -134,7 +135,9 @@ - } \ - while ( 0 ) - -+#if 0 - #define unput(c) ace_yyunput( c, ace_yytext_ptr ) -+#endif /* 0 */ - - - struct ace_yy_buffer_state -@@ -209,7 +212,9 @@ - */ - static int ace_yy_did_buffer_switch_on_eof; - -+#if 0 - static void ace_yyunput ACE_YY_PROTO(( int c, char *buf_ptr )); -+#endif /* 0 */ - void ace_yyrestart ACE_YY_PROTO(( FILE *input_file )); - void ace_yy_switch_to_buffer ACE_YY_PROTO(( ACE_YY_BUFFER_STATE new_buffer )); - void ace_yy_load_buffer_state ACE_YY_PROTO(( void )); -@@ -217,12 +222,14 @@ - void ace_yy_delete_buffer ACE_YY_PROTO(( ACE_YY_BUFFER_STATE b )); - void ace_yy_init_buffer ACE_YY_PROTO(( ACE_YY_BUFFER_STATE b, FILE *file )); - -+#if 0 - static int ace_yy_start_stack_ptr = 0; - static int ace_yy_start_stack_depth = 0; - static int *ace_yy_start_stack = 0; - static void ace_yy_push_state ACE_YY_PROTO(( int new_state )); - static void ace_yy_pop_state ACE_YY_PROTO(( void )); - static int ace_yy_top_state ACE_YY_PROTO(( void )); -+#endif /* 0 */ - - static void *ace_yy_flex_alloc ACE_YY_PROTO(( unsigned int )); - static void *ace_yy_flex_realloc ACE_YY_PROTO(( void *, unsigned int )); -@@ -480,7 +487,7 @@ - char *ace_yytext; - # line 1 "Svc_Conf.l" - # line 2 "Svc_Conf.l" --// $Id: Svc_Conf.l,v 4.5 1998/07/18 16:42:01 gonzo Exp $ -+// $Id$ - // Sample lexical analysis for regular expression subset. Must be - // compiled with FLEX and an ANSI C++ compiler. - -@@ -488,7 +495,7 @@ - #include "ace/Svc_Conf.h" - #include "ace/Svc_Conf_Tokens.h" - --ACE_RCSID(ace, Svc_Conf_l, "$Id: Svc_Conf.l,v 4.5 1998/07/18 16:42:01 gonzo Exp $") -+ACE_RCSID(ace, Svc_Conf_l, "$Id$") - - // Keeps track of the current line for debugging output. - int ace_yylineno = 1; -@@ -591,7 +598,7 @@ - ACE_YY_DECL - { - register ace_yy_state_type ace_yy_current_state; -- register char *ace_yy_cp, *ace_yy_bp; -+ register char *ace_yy_cp = 0, *ace_yy_bp = 0; - register int ace_yy_act; - - # line 39 "Svc_Conf.l" -@@ -689,96 +696,96 @@ - ACE_YY_USER_ACTION - # line 42 "Svc_Conf.l" - { return token (ACE_DYNAMIC); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 3: - ACE_YY_USER_ACTION - # line 43 "Svc_Conf.l" - { return token (ACE_STATIC); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 4: - ACE_YY_USER_ACTION - # line 44 "Svc_Conf.l" - { return token (ACE_SUSPEND); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 5: - ACE_YY_USER_ACTION - # line 45 "Svc_Conf.l" - { return token (ACE_RESUME); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 6: - ACE_YY_USER_ACTION - # line 46 "Svc_Conf.l" - { return token (ACE_REMOVE); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 7: - ACE_YY_USER_ACTION - # line 47 "Svc_Conf.l" - { return token (ACE_USTREAM); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 8: - ACE_YY_USER_ACTION - # line 48 "Svc_Conf.l" - { return token (ACE_MODULE_T); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 9: - ACE_YY_USER_ACTION - # line 49 "Svc_Conf.l" - { return token (ACE_SVC_OBJ_T); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 10: - ACE_YY_USER_ACTION - # line 50 "Svc_Conf.l" - { return token (ACE_STREAM_T); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 11: - ACE_YY_USER_ACTION - # line 51 "Svc_Conf.l" - { return token (ACE_ACTIVE); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 12: - ACE_YY_USER_ACTION - # line 52 "Svc_Conf.l" - { return token (ACE_INACTIVE); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 13: - ACE_YY_USER_ACTION - # line 53 "Svc_Conf.l" - { return token (ACE_COLON); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 14: - ACE_YY_USER_ACTION - # line 54 "Svc_Conf.l" - { return token (ACE_STAR); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 15: - ACE_YY_USER_ACTION - # line 55 "Svc_Conf.l" - { return token (ACE_LPAREN); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 16: - ACE_YY_USER_ACTION - # line 56 "Svc_Conf.l" - { return token (ACE_RPAREN); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 17: - ACE_YY_USER_ACTION - # line 57 "Svc_Conf.l" - { return token (ACE_LBRACE); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 18: - ACE_YY_USER_ACTION - # line 58 "Svc_Conf.l" - { return token (ACE_RBRACE); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 19: - ACE_YY_USER_ACTION - # line 59 "Svc_Conf.l" - { // Eliminate the opening and closing double quotes -- *strrchr (ace_yytext, '"') = '\0'; -+ *ACE_OS::strrchr (ace_yytext, '"') = '\0'; - ace_yyleng -= 1; - ace_yylval.ident_ = ace_obstack->copy (ace_yytext + 1, ace_yyleng); - return token (ACE_STRING); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 20: - ACE_YY_USER_ACTION - # line 64 "Svc_Conf.l" -@@ -786,7 +793,7 @@ - ace_yylval.ident_ = ace_obstack->copy (ace_yytext, ace_yyleng); - return token (ACE_IDENT); - } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 21: - ACE_YY_USER_ACTION - # line 68 "Svc_Conf.l" -@@ -794,7 +801,7 @@ - ace_yylval.ident_ = ace_obstack->copy (ace_yytext, ace_yyleng); - return token (ACE_PATHNAME); - } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 22: - ACE_YY_USER_ACTION - # line 72 "Svc_Conf.l" -@@ -808,14 +815,15 @@ - case 24: - ACE_YY_USER_ACTION - # line 74 "Svc_Conf.l" --{ ACE_ERROR ((LM_ERROR, "unknown char = %d\n", *ace_yytext)); } -+{ ACE_ERROR ((LM_ERROR, ASYS_TEXT ("unknown char = %d\n"), -+ *ace_yytext)); } - ACE_YY_BREAK - case ACE_YY_STATE_EOF(INITIAL): - case ACE_YY_STATE_EOF(PARAMETERS): - case ACE_YY_STATE_EOF(NORMAL): - # line 75 "Svc_Conf.l" - { ACE_YY_NEW_FILE; ace_yyterminate(); } -- ACE_YY_BREAK -+ /* ACE_YY_BREAK */ - case 25: - ACE_YY_USER_ACTION - # line 76 "Svc_Conf.l" -@@ -1148,6 +1156,7 @@ - } - - -+#if 0 - #ifdef ACE_YY_USE_PROTOS - static void ace_yyunput( int c, register char *ace_yy_bp ) - #else -@@ -1192,7 +1201,7 @@ - */ - ACE_YY_DO_BEFORE_ACTION; /* set up ace_yytext again */ - } -- -+#endif /* 0 */ - - #ifdef __cplusplus - static int ace_yyinput() -@@ -1400,6 +1409,7 @@ - } - - -+#if 0 - #ifdef ACE_YY_USE_PROTOS - static void ace_yy_push_state( int new_state ) - #else -@@ -1445,7 +1455,7 @@ - { - return ace_yy_start_stack[ace_yy_start_stack_ptr - 1]; - } -- -+#endif /* 0 */ - - #ifdef ACE_YY_USE_PROTOS - static void ace_yy_fatal_error( const char msg[] ) +*** Svc_Conf_l.cpp.orig Sat Jan 15 12:47:17 2000 +--- Svc_Conf_l.cpp Sat Jan 15 12:49:44 2000 +*************** +*** 1 **** +--- 1,2 ---- ++ #define ACE_BUILD_DLL + /* A lexical scanner generated by flex */ +*************** +*** 134,136 **** +--- 135,139 ---- + ++ #if 0 + #define unput(c) ace_yyunput( c, ace_yytext_ptr ) ++ #endif /* 0 */ + +*************** +*** 680,682 **** + register ace_yy_state_type ace_yy_current_state; +! register char *ace_yy_cp, *ace_yy_bp; + register int ace_yy_act; +--- 683,685 ---- + register ace_yy_state_type ace_yy_current_state; +! register char *ace_yy_cp = 0, *ace_yy_bp = 0; + register int ace_yy_act; +*************** +*** 781,783 **** + { return token (ACE_DYNAMIC); } +! ACE_YY_BREAK + case 3: +--- 784,786 ---- + { return token (ACE_DYNAMIC); } +! // ACE_YY_BREAK + case 3: +*************** +*** 786,788 **** + { return token (ACE_STATIC); } +! ACE_YY_BREAK + case 4: +--- 789,791 ---- + { return token (ACE_STATIC); } +! // ACE_YY_BREAK + case 4: +*************** +*** 791,793 **** + { return token (ACE_SUSPEND); } +! ACE_YY_BREAK + case 5: +--- 794,796 ---- + { return token (ACE_SUSPEND); } +! // ACE_YY_BREAK + case 5: +*************** +*** 796,798 **** + { return token (ACE_RESUME); } +! ACE_YY_BREAK + case 6: +--- 799,801 ---- + { return token (ACE_RESUME); } +! // ACE_YY_BREAK + case 6: +*************** +*** 801,803 **** + { return token (ACE_REMOVE); } +! ACE_YY_BREAK + case 7: +--- 804,806 ---- + { return token (ACE_REMOVE); } +! // ACE_YY_BREAK + case 7: +*************** +*** 806,808 **** + { return token (ACE_USTREAM); } +! ACE_YY_BREAK + case 8: +--- 809,811 ---- + { return token (ACE_USTREAM); } +! // ACE_YY_BREAK + case 8: +*************** +*** 811,813 **** + { return token (ACE_MODULE_T); } +! ACE_YY_BREAK + case 9: +--- 814,816 ---- + { return token (ACE_MODULE_T); } +! // ACE_YY_BREAK + case 9: +*************** +*** 816,818 **** + { return token (ACE_SVC_OBJ_T); } +! ACE_YY_BREAK + case 10: +--- 819,821 ---- + { return token (ACE_SVC_OBJ_T); } +! // ACE_YY_BREAK + case 10: +*************** +*** 821,823 **** + { return token (ACE_STREAM_T); } +! ACE_YY_BREAK + case 11: +--- 824,826 ---- + { return token (ACE_STREAM_T); } +! // ACE_YY_BREAK + case 11: +*************** +*** 826,828 **** + { return token (ACE_ACTIVE); } +! ACE_YY_BREAK + case 12: +--- 829,831 ---- + { return token (ACE_ACTIVE); } +! // ACE_YY_BREAK + case 12: +*************** +*** 831,833 **** + { return token (ACE_INACTIVE); } +! ACE_YY_BREAK + case 13: +--- 834,836 ---- + { return token (ACE_INACTIVE); } +! // ACE_YY_BREAK + case 13: +*************** +*** 836,838 **** + { return token (ACE_COLON); } +! ACE_YY_BREAK + case 14: +--- 839,841 ---- + { return token (ACE_COLON); } +! // ACE_YY_BREAK + case 14: +*************** +*** 841,843 **** + { return token (ACE_STAR); } +! ACE_YY_BREAK + case 15: +--- 844,846 ---- + { return token (ACE_STAR); } +! // ACE_YY_BREAK + case 15: +*************** +*** 846,848 **** + { return token (ACE_LPAREN); } +! ACE_YY_BREAK + case 16: +--- 849,851 ---- + { return token (ACE_LPAREN); } +! // ACE_YY_BREAK + case 16: +*************** +*** 851,853 **** + { return token (ACE_RPAREN); } +! ACE_YY_BREAK + case 17: +--- 854,856 ---- + { return token (ACE_RPAREN); } +! // ACE_YY_BREAK + case 17: +*************** +*** 856,858 **** + { return token (ACE_LBRACE); } +! ACE_YY_BREAK + case 18: +--- 859,861 ---- + { return token (ACE_LBRACE); } +! // ACE_YY_BREAK + case 18: +*************** +*** 861,863 **** + { return token (ACE_RBRACE); } +! ACE_YY_BREAK + case 19: +--- 864,866 ---- + { return token (ACE_RBRACE); } +! // ACE_YY_BREAK + case 19: +*************** +*** 880,882 **** + return token (ACE_STRING); } +! ACE_YY_BREAK + case 20: +--- 883,885 ---- + return token (ACE_STRING); } +! // ACE_YY_BREAK + case 20: +*************** +*** 888,890 **** + } +! ACE_YY_BREAK + case 21: +--- 891,893 ---- + } +! // ACE_YY_BREAK + case 21: +*************** +*** 896,898 **** + } +! ACE_YY_BREAK + case 22: +--- 899,901 ---- + } +! // ACE_YY_BREAK + case 22: diff --git a/examples/Service_Configurator/Misc/main.cpp b/examples/Service_Configurator/Misc/main.cpp index aec4893bc04..3751cbd3a8b 100644 --- a/examples/Service_Configurator/Misc/main.cpp +++ b/examples/Service_Configurator/Misc/main.cpp @@ -19,6 +19,7 @@ // ============================================================================ #include "ace/Service_Config.h" +#include "ace/ARGV.h" #include "Timer_Service.h" ACE_RCSID(Misc, main, "$Id$") @@ -31,26 +32,38 @@ ACE_STATIC_SVC_REQUIRE (Timer_Service_1) int main (int, ASYS_TCHAR *argv[]) { - LPCTSTR l_argv[10]; + // Set up an argument vector that we can add entries to! + ACE_ARGV args; // Manufacture a "fake" svc.conf entry to demonstrate the -S option // that allows us to pass these entries via the "command-line" // rather than the svc.conf file. - l_argv[0] = argv[0]; - l_argv[1] = ASYS_TEXT ("-y"); - l_argv[2] = ASYS_TEXT ("-d"); - l_argv[3] = ASYS_TEXT ("-S"); - l_argv[4] = ASYS_TEXT ("static Timer_Service_1 \"timer 1 10 $TRACE\""); - l_argv[5] = ASYS_TEXT ("-S"); - l_argv[6] = ASYS_TEXT ("dynamic Timer_Service_2 Service_Object * ./Timer:_make_Timer_Service_2() \"timer 2 10 $TRACE\""); + args.add (argv[0]); + args.add (ASYS_TEXT ("-y")); + args.add (ASYS_TEXT ("-d")); + args.add (ASYS_TEXT ("-S")); + args.add (ASYS_TEXT ("\"static Timer_Service_1 'timer 1 10 $TRACE'\"")); + args.add (ASYS_TEXT ("-S")); + args.add (ASYS_TEXT ("\"dynamic Timer_Service_2 Service_Object * ./Timer:_make_Timer_Service_2() 'timer 2 10 $TRACE'\"")); // Test the -f option! - l_argv[7] = ASYS_TEXT ("-fsvc.conf1"); - l_argv[8] = ASYS_TEXT ("-fsvc.conf2"); - l_argv[9] = 0; + args.add (ASYS_TEXT ("-fsvc.conf1")); + args.add (ASYS_TEXT ("-fsvc.conf2")); - if (ACE_Service_Config::open (9, - (ASYS_TCHAR **) l_argv, - ACE_DEFAULT_LOGGER_KEY, 0) == -1 + ACE_DEBUG ((LM_DEBUG, + ASYS_TEXT ("argc = %d\n"), + ASYS_TEXT (args.argc ()))); + + // Print the contents of the combined <ACE_ARGV>. + for (int i = 0; i < args.argc (); i++) + ACE_DEBUG ((LM_DEBUG, + ASYS_TEXT ("(%d) %s\n"), + i, + args.argv ()[i])); + + if (ACE_Service_Config::open (args.argc (), + args.argv (), + ACE_DEFAULT_LOGGER_KEY, + 0) == -1 && errno != ENOENT) ACE_ERROR_RETURN ((LM_ERROR, ASYS_TEXT ("%p\n"), diff --git a/netsvcs/clients/Naming/Client/main.cpp b/netsvcs/clients/Naming/Client/main.cpp index 75918c46378..7ad3bf869b8 100644 --- a/netsvcs/clients/Naming/Client/main.cpp +++ b/netsvcs/clients/Naming/Client/main.cpp @@ -4,6 +4,7 @@ #include "ace/Service_Config.h" #include "ace/Naming_Context.h" +#include "ace/ARGV.h" #include "Client_Test.h" ACE_RCSID(Client, main, "$Id$") @@ -22,14 +23,15 @@ main (int argc, char *argv[]) 1)); else // Use static binding. { - char *l_argv[3]; - char port[] = "-p 10011"; - l_argv[0] = argv[0]; - l_argv[1] = port; - l_argv[2] = 0; - ACE_Service_Object *so = ACE_SVC_INVOKE (ACE_Naming_Context); - - if (so->init (2, l_argv) == -1) + ACE_ARGV args; + + args.add (argv[0]); + args.add ("-p10011"); // Port number. + ACE_Service_Object *so = + ACE_SVC_INVOKE (ACE_Naming_Context); + + if (so->init (args.argc (), + args.argv ()) == -1) ACE_ERROR ((LM_ERROR, "%p\n%a", "ACE_Naming_Context", @@ -37,7 +39,8 @@ main (int argc, char *argv[]) so = ACE_SVC_INVOKE (Client_Test); - if (so->init (0, l_argv) == -1) + if (so->init (0, + args.argv ()) == -1) ACE_ERROR ((LM_ERROR, "%p\n%a", "Client_Test", diff --git a/tests/ARGV_Test.cpp b/tests/ARGV_Test.cpp new file mode 100644 index 00000000000..152ec0233a5 --- /dev/null +++ b/tests/ARGV_Test.cpp @@ -0,0 +1,57 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// tests +// +// = DESCRIPTION +// This simple test illustrates how to use advanced features of +// <ACE_ARGV>. +// +// = AUTHOR +// Suresh Kannan <kannan@uav.ae.gatech.edu> +// +// ============================================================================ + +#include "ace/ARGV.h" +#include "test_config.h" + +ACE_RCSID(tests, ARGV_Test, "$Id$") + +#if defined(__BORLANDC__) && __BORLANDC__ >= 0x0530 +USELIB("..\ace\aced.lib"); +//--------------------------------------------------------------------------- +#endif /* defined(__BORLANDC__) && __BORLANDC__ >= 0x0530 */ + +int main(int argc, char *argv[]) +{ + ACE_START_TEST (ASYS_TEXT ("ARGV_Test")); + + // From command line. + ACE_ARGV cl (argv); + + // My own stuff. + ACE_ARGV my; + + // Add to my stuff. + my.add ("-ORBEndpoint iiop://localhost:12345"); + + // Combine the two (see the ace/ARGV.h constructors documentation). + ACE_ARGV a (cl.argv (), + my.argv ()); + + ACE_DEBUG ((LM_DEBUG, + ASYS_TEXT ("argc = %d\n"), + ASYS_TEXT (a.argc ()))); + + // Print the contents of the combined <ACE_ARGV>. + for (int i = 0; i < a.argc (); i++) + ACE_DEBUG ((LM_DEBUG, + ASYS_TEXT ("(%d) %s\n"), + i, + a.argv ()[i])); + + ACE_END_TEST; + return 0; +} diff --git a/tests/Makefile b/tests/Makefile index 94d8cbd6d13..4601951148f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -10,6 +10,7 @@ #---------------------------------------------------------------------------- BIN = Aio_Platform_Test \ + ARGV_Test \ Atomic_Op_Test \ Auto_IncDec_Test \ Barrier_Test \ diff --git a/tests/run_tests.lst b/tests/run_tests.lst index b9b6ac66866..5db64650009 100644 --- a/tests/run_tests.lst +++ b/tests/run_tests.lst @@ -1,3 +1,4 @@ +ARGV_Test Basic_Types_Test chorus/Env_Value_Test Capabilities_Test |