diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-06-12 09:28:00 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-06-12 09:28:00 +0000 |
commit | 37c7ca47a777dcba81933c326cf1eb6d4fdc6481 (patch) | |
tree | 03f68b5b8dfa6f5f62d35d7976d5d7f6487588d3 /connectivity/source/parse/sqlflex.l | |
parent | adcc17a34aa5052807be68cad265b6258f90db97 (diff) |
INTEGRATION: CWS mh11rc (1.19.12); FILE MERGED
2003/06/06 11:33:05 mh 1.19.12.1: join: from cws_srx644_ooo11beta2
Diffstat (limited to 'connectivity/source/parse/sqlflex.l')
-rw-r--r-- | connectivity/source/parse/sqlflex.l | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/connectivity/source/parse/sqlflex.l b/connectivity/source/parse/sqlflex.l index 297e6b0b3b42..14e6f94c0d73 100644 --- a/connectivity/source/parse/sqlflex.l +++ b/connectivity/source/parse/sqlflex.l @@ -2,7 +2,7 @@ //-------------------------------------------------------------------------- // -// $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/connectivity/source/parse/sqlflex.l,v 1.20 2003-06-06 10:51:03 vg Exp $ +// $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/connectivity/source/parse/sqlflex.l,v 1.21 2003-06-12 10:28:00 vg Exp $ // // Copyright 2000 Sun Microsystems, Inc. All Rights Reserved. // @@ -10,7 +10,7 @@ // OJ // // Last change: -// $Author: vg $ $Date: 2003-06-06 10:51:03 $ $Revision: 1.20 $ +// $Author: vg $ $Date: 2003-06-12 10:28:00 $ $Revision: 1.21 $ // // Description: // @@ -337,19 +337,20 @@ OSQLScanner* xxx_pGLOBAL_SQLSCAN = NULL; . {YY_FATAL_ERROR("Invalid symbol"); return SQL_TOKEN_INVALIDSYMBOL;} %% -// Kludge around a bug (well, Posix incompatibility) in flex 2.5.x
-// http://bugs.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=189332
-#if YY_FLEX_MAJOR_VERSION >= 2 && YY_FLEX_MINOR_VERSION >= 5
-
- #ifndef YY_FLUSH_BUFFER
- #define YY_FLUSH_BUFFER SQLyy_flush_buffer(YY_CURRENT_BUFFER )
- #endif
-
- #ifndef yytext_ptr
- #define yytext_ptr SQLyytext
- #endif
-
-#endif
+ +// Kludge around a bug (well, Posix incompatibility) in flex 2.5.x +// http://bugs.debian.org/cgi-bin/bugreport.cgi?archive=no&bug=189332 +#if YY_FLEX_MAJOR_VERSION >= 2 && YY_FLEX_MINOR_VERSION >= 5 + + #ifndef YY_FLUSH_BUFFER + #define YY_FLUSH_BUFFER SQLyy_flush_buffer(YY_CURRENT_BUFFER ) + #endif + + #ifndef yytext_ptr + #define yytext_ptr SQLyytext + #endif + +#endif /* * Read SQL string literal @@ -386,17 +387,17 @@ sal_Int32 gatherString( sal_Int32 delim, sal_Int32 nTyp) { case 0: SQL_NEW_NODE(::rtl::OUString(Buffer,nPos,RTL_TEXTENCODING_UTF8), SQL_NODE_NAME); - delete [] Buffer; + delete Buffer; Buffer = NULL; return SQL_TOKEN_NAME; case 1: SQL_NEW_NODE(::rtl::OUString(Buffer,nPos,RTL_TEXTENCODING_UTF8), SQL_NODE_STRING); - delete [] Buffer; + delete Buffer; Buffer = NULL; return SQL_TOKEN_STRING; case 2: SQL_NEW_NODE(::rtl::OUString(Buffer,nPos,RTL_TEXTENCODING_UTF8), SQL_NODE_ACCESS_DATE); - delete [] Buffer; + delete Buffer; Buffer = NULL; return SQL_TOKEN_ACCESS_DATE; } @@ -407,7 +408,7 @@ sal_Int32 gatherString( sal_Int32 delim, sal_Int32 nTyp) if (++nPos == BUFFERSIZE) { ::rtl::OString aBuf(Buffer); - delete [] Buffer; + delete Buffer; BUFFERSIZE *=2; Buffer = new sal_Char[BUFFERSIZE]; for(sal_Int32 i=0;i<aBuf.getLength();++i,++Buffer) @@ -425,7 +426,7 @@ sal_Int32 gatherString( sal_Int32 delim, sal_Int32 nTyp) if (++nPos == BUFFERSIZE) { ::rtl::OString aBuf(Buffer); - delete [] Buffer; + delete Buffer; BUFFERSIZE *=2; Buffer = new sal_Char[BUFFERSIZE]; for(sal_Int32 i=0;i<aBuf.getLength();++i,++Buffer) @@ -436,7 +437,7 @@ sal_Int32 gatherString( sal_Int32 delim, sal_Int32 nTyp) } *s = '\0'; YY_FATAL_ERROR("Unterminated name string"); - delete [] Buffer; + delete Buffer; Buffer = NULL; return SQL_TOKEN_INVALIDSYMBOL; } @@ -614,7 +615,7 @@ void OSQLScanner::SQLyyerror(sal_Char *fmt) if (++nPos == BUFFERSIZE) { ::rtl::OString aBuf(Buffer); - delete [] Buffer; + delete Buffer; BUFFERSIZE *=2; Buffer = new sal_Char[BUFFERSIZE]; for(sal_Int32 i=0;i<aBuf.getLength();++i,++Buffer) @@ -624,7 +625,7 @@ void OSQLScanner::SQLyyerror(sal_Char *fmt) } } m_sErrorMessage += aError; - delete [] Buffer; + delete Buffer; Buffer = NULL; } IN_SQLyyerror = false; |