MWS_SRX644: migrate branch mws_srx644 -> HEAD

This commit is contained in:
Jens-Heiner Rechtien
2003-03-26 11:11:12 +00:00
parent c082fe0562
commit f8183bfe73
13 changed files with 73 additions and 70 deletions

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: errorhandler.cxx,v $ * $RCSfile: errorhandler.cxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: jbu $ $Date: 2001-05-09 07:57:56 $ * last change: $Author: hr $ $Date: 2003-03-26 12:11:08 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -548,7 +548,7 @@ void ErrorHandler::warning2(WarningCode w, AstDeclaration* d1, AstDeclaration* d
void ErrorHandler::syntaxError(ParseState ps, sal_Int32 lineNumber, sal_Char* errmsg) void ErrorHandler::syntaxError(ParseState ps, sal_Int32 lineNumber, sal_Char* errmsg)
{ {
errorHeader(EIDL_SYNTAX_ERROR, lineNumber); errorHeader(EIDL_SYNTAX_ERROR, lineNumber);
fprintf(stderr, "%s%s\n", parseStateToMessage(ps), errmsg + 11); fprintf(stderr, "%s: %s\n", parseStateToMessage(ps), errmsg);
idlc()->incErrorCount(); idlc()->incErrorCount();
} }

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: idlccompile.cxx,v $ * $RCSfile: idlccompile.cxx,v $
* *
* $Revision: 1.11 $ * $Revision: 1.12 $
* *
* last change: $Author: hr $ $Date: 2002-02-21 11:31:12 $ * last change: $Author: hr $ $Date: 2003-03-26 12:11:08 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -85,7 +85,6 @@
#include <io.h> #include <io.h>
#endif #endif
#include <string.h>
#ifdef SAL_UNX #ifdef SAL_UNX
#include <unistd.h> #include <unistd.h>
#if defined(MACOSX) || defined(FREEBSD) || defined(NETBSD) #if defined(MACOSX) || defined(FREEBSD) || defined(NETBSD)
@@ -173,10 +172,19 @@ OString makeTempName(const OString& prefix, const OString& postfix)
tmpPath = OUStringToOString(uTmpPath, RTL_TEXTENCODING_UTF8); tmpPath = OUStringToOString(uTmpPath, RTL_TEXTENCODING_UTF8);
#if defined(SAL_W32) || defined(SAL_UNX) #if defined(SAL_W32) || defined(SAL_UNX)
strcpy(tmpFilePattern, tmpPath);
strcat(tmpFilePattern, PATH_SEPARATOR); OSL_ASSERT( sizeof(tmpFilePattern) > ( strlen(tmpPath)
strcat(tmpFilePattern, prefix.getStr()); + RTL_CONSTASCII_LENGTH(
strcat(tmpFilePattern, "XXXXXX"); PATH_SEPARATOR )
+ prefix.getLength()
+ RTL_CONSTASCII_LENGTH(
"XXXXXX") ) );
tmpFilePattern[ sizeof(tmpFilePattern)-1 ] = '\0';
strncpy(tmpFilePattern, tmpPath, sizeof(tmpFilePattern)-1);
strncat(tmpFilePattern, PATH_SEPARATOR, sizeof(tmpFilePattern)-1-strlen(tmpFilePattern));
strncat(tmpFilePattern, prefix.getStr(), sizeof(tmpFilePattern)-1-strlen(tmpFilePattern));
strncat(tmpFilePattern, "XXXXXX", sizeof(tmpFilePattern)-1-strlen(tmpFilePattern));
#ifdef SAL_UNX #ifdef SAL_UNX
int nDescriptor = mkstemp(tmpFilePattern); int nDescriptor = mkstemp(tmpFilePattern);
@@ -195,11 +203,11 @@ OString makeTempName(const OString& prefix, const OString& postfix)
Is the postfix necessarry? Is the postfix necessarry?
*/ */
// if ( postfix.getLength() ) // if ( postfix.getLength() )
// strcat(tmpFilePattern, postfix.getStr()); // strncat(tmpFilePattern, postfix.getStr(), sizeof(tmpFilePattern)-1-strlen(tmpFilePattern));
#endif #endif
#ifdef __OS2__ #ifdef __OS2__
strcpy(tmpFilePattern, tempnam(NULL, prefix.getStr()); strncpy(tmpFilePattern, tempnam(NULL, prefix.getStr()), sizeof(tmpFilePattern)-1);
#endif #endif
return OString(tmpFilePattern); return OString(tmpFilePattern);

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: idlcproduce.cxx,v $ * $RCSfile: idlcproduce.cxx,v $
* *
* $Revision: 1.7 $ * $Revision: 1.8 $
* *
* last change: $Author: hr $ $Date: 2002-02-21 11:31:12 $ * last change: $Author: hr $ $Date: 2003-03-26 12:11:08 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -83,7 +83,6 @@
#include <errno.h> #include <errno.h>
#endif #endif
#include <string.h>
#ifdef SAL_UNX #ifdef SAL_UNX
#include <unistd.h> #include <unistd.h>
#include <sys/stat.h> #include <sys/stat.h>

View File

@@ -2,9 +2,9 @@
# #
# $RCSfile: makefile.mk,v $ # $RCSfile: makefile.mk,v $
# #
# $Revision: 1.6 $ # $Revision: 1.7 $
# #
# last change: $Author: hjs $ $Date: 2002-07-17 10:52:00 $ # last change: $Author: hr $ $Date: 2003-03-26 12:11:09 $
# #
# The Contents of this file are made available subject to the terms of # The Contents of this file are made available subject to the terms of
# either of the following licenses # either of the following licenses
@@ -147,3 +147,7 @@ $(MISC)$/stripped_scanner.ll : scanner.ll
$(MISC)$/scanner.cxx: $(MISC)$/stripped_scanner.ll $(MISC)$/scanner.cxx: $(MISC)$/stripped_scanner.ll
+flex -o$(MISC)$/scanner.cxx $(MISC)$/stripped_scanner.ll +flex -o$(MISC)$/scanner.cxx $(MISC)$/stripped_scanner.ll
# JSC: Please do not remove this lines !!
#$(MISC)$/parser.cxx: parser.y
# +bison -v -d -o$(MISC)$/parser.cxx parser.y
# +$(COPY) $(MISC)$/parser.cxx.h $(OUT)$/inc$/parser.hxx

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: options.cxx,v $ * $RCSfile: options.cxx,v $
* *
* $Revision: 1.6 $ * $Revision: 1.7 $
* *
* last change: $Author: hr $ $Date: 2002-02-21 11:31:12 $ * last change: $Author: hr $ $Date: 2003-03-26 12:11:09 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -59,7 +59,6 @@
* *
************************************************************************/ ************************************************************************/
#include <stdio.h> #include <stdio.h>
#include <string.h>
#ifndef _IDLC_OPTIONS_HXX_ #ifndef _IDLC_OPTIONS_HXX_
#include <idlc/options.hxx> #include <idlc/options.hxx>

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: parser.y,v $ * $RCSfile: parser.y,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: obo $ $Date: 2002-10-29 12:54:35 $ * last change: $Author: hr $ $Date: 2003-03-26 12:11:09 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -144,10 +144,6 @@ int fprintf(FILE* stream, const char* format, ...)
return res; return res;
} }
/*
Following code not for msvc7.net compiler
*/
#ifndef M1300
void* malloc( size_t size ) void* malloc( size_t size )
{ {
return ::malloc(size); return ::malloc(size);
@@ -157,7 +153,6 @@ void free( void *memblock )
{ {
::free(memblock); ::free(memblock);
} }
#endif
}; };
#endif #endif
@@ -527,7 +522,8 @@ interface_dcl :
*/ */
else else
{ {
pForward->setInheritedInterfaces(*$1->getInherits()); if ( $1->getInherits() )
pForward->setInheritedInterfaces(*$1->getInherits());
pForward->setImported(pInterface->isImported()); pForward->setImported(pInterface->isImported());
pForward->setInMainfile(pInterface->isInMainfile()); pForward->setInMainfile(pInterface->isInMainfile());
@@ -790,6 +786,11 @@ opt_attrflag :
idlc()->setParseState(PS_RemoveableSeen); idlc()->setParseState(PS_RemoveableSeen);
$$ = AF_REMOVEABLE; $$ = AF_REMOVEABLE;
} }
| error ']'
{
yyerror("unknown property|attribute flag");
yyerrok;
}
; ;
operation : operation :
@@ -1000,7 +1001,8 @@ constants_export :
{ {
idlc()->setParseState(PS_ConstantDeclSeen); idlc()->setParseState(PS_ConstantDeclSeen);
} }
';' ';' {};
const_dcl : const_dcl :
IDL_CONST IDL_CONST
@@ -1321,7 +1323,7 @@ exception_dcl :
* Push the scope of the exception on the scopes stack * Push the scope of the exception on the scopes stack
*/ */
idlc()->scopes()->push(pExcept); idlc()->scopes()->push(pExcept);
delete $1 delete $1;
} }
'{' '{'
{ {
@@ -1710,10 +1712,10 @@ type_dcl :
{ {
idlc()->setParseState(PS_TypedefSeen); idlc()->setParseState(PS_TypedefSeen);
} }
type_declarator type_declarator {}
| struct_type | struct_type {}
| union_type | union_type {}
| enum_type | enum_type {}
; ;
type_declarator : type_declarator :

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: cpp.c,v $ * $RCSfile: cpp.c,v $
* *
* $Revision: 1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: jsc $ $Date: 2001-03-15 12:48:45 $ * last change: $Author: hr $ $Date: 2003-03-26 12:11:11 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -77,7 +77,7 @@ int ifdepth;
int ifsatisfied[NIF]; int ifsatisfied[NIF];
int skipping; int skipping;
char rcsid[] = "$Version 1.2 $ $Revision: 1.1 $ $Date: 2001-03-15 12:48:45 $"; char rcsid[] = "$Version 1.2 $ $Revision: 1.2 $ $Date: 2003-03-26 12:11:11 $";
int realargc; int realargc;
char* realargv[512]; char* realargv[512];
@@ -170,7 +170,7 @@ int main(int argc, char **argv)
void void
process(Tokenrow * trp) process(Tokenrow * trp)
{ {
int anymacros = 0; /* S390: XDBX st<73>rzt ab! */ int anymacros = 0;
for (;;) for (;;)
{ {

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: include.c,v $ * $RCSfile: include.c,v $
* *
* $Revision: 1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: jsc $ $Date: 2001-03-15 12:48:45 $ * last change: $Author: hr $ $Date: 2003-03-26 12:11:11 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -63,7 +63,7 @@
#include <string.h> #include <string.h>
#include <fcntl.h> #include <fcntl.h>
#if (defined(_WIN32) || defined(_MSDOS) || defined(__IBMC__)) && !(defined S390) #if (defined(_WIN32) || defined(_MSDOS) || defined(__IBMC__))
# include <io.h> # include <io.h>
#else #else
# include <unistd.h> # include <unistd.h>

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: lex.c,v $ * $RCSfile: lex.c,v $
* *
* $Revision: 1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: jsc $ $Date: 2001-03-15 12:48:45 $ * last change: $Author: hr $ $Date: 2003-03-26 12:11:11 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -61,7 +61,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#if (defined(_WIN32) || defined(_MSDOS) || defined(__IBMC__)) && !(defined S390) #if (defined(_WIN32) || defined(_MSDOS) || defined(__IBMC__))
#include <io.h> #include <io.h>
#else #else
#include <unistd.h> #include <unistd.h>
@@ -97,11 +97,7 @@
#define C_ALPH 2 #define C_ALPH 2
#define C_NUM 3 #define C_NUM 3
#define C_EOF 4 #define C_EOF 4
#ifdef S390
#define C_XX 6
#else
#define C_XX 5 #define C_XX 5
#endif
enum state enum state
{ {
@@ -328,12 +324,8 @@ void
continue; continue;
case C_ALPH: case C_ALPH:
for (j = 0; j <= 256; j++) for (j = 0; j <= 256; j++)
#ifdef S390
if( isalpha( j ) || (j == '_') )
#else
if ('a' <= j && j <= 'z' || 'A' <= j && j <= 'Z' if ('a' <= j && j <= 'z' || 'A' <= j && j <= 'Z'
|| j == '_') || j == '_')
#endif
bigfsm[j][fp->state] = nstate; bigfsm[j][fp->state] = nstate;
continue; continue;
case C_NUM: case C_NUM:
@@ -411,7 +403,7 @@ int
} }
} }
maxp = &trp->bp[trp->max]; maxp = &trp->bp[trp->max];
runelen = 1; /* S390: XDBX st<73>rzt ab! */ runelen = 1;
for (;;) for (;;)
{ {
continue2: continue2:
@@ -430,7 +422,7 @@ continue2:
{ {
oldstate = state; oldstate = state;
c = *ip; /* S390: XDBX st<73>rzt (gelegentlich) ab! */ c = *ip;
if ((state = bigfsm[c][state]) >= 0) if ((state = bigfsm[c][state]) >= 0)
{ {
@@ -476,7 +468,7 @@ continue2:
if (c == '\n') if (c == '\n')
{ {
while (s->inp + 1 >= s->inl && fillbuf(s) != EOF); /* S390: XDBX st<73>rzt (manchmal) ab! */ while (s->inp + 1 >= s->inl && fillbuf(s) != EOF);
if (s->inp[1] == '\r') if (s->inp[1] == '\r')
{ {

View File

@@ -2,9 +2,9 @@
# #
# $RCSfile: makefile.mk,v $ # $RCSfile: makefile.mk,v $
# #
# $Revision: 1.2 $ # $Revision: 1.3 $
# #
# last change: $Author: hr $ $Date: 2001-09-26 14:42:47 $ # last change: $Author: hr $ $Date: 2003-03-26 12:11:11 $
# #
# The Contents of this file are made available subject to the terms of # The Contents of this file are made available subject to the terms of
# either of the following licenses # either of the following licenses
@@ -70,10 +70,9 @@ TARGETTHREAD=ST
# --- Settings ----------------------------------------------------- # --- Settings -----------------------------------------------------
NO_DEFAULT_STL=TRUE NO_DEFAULT_STL=TRUE
LIBSALCPPRT=$(0)
.INCLUDE : svpre.mk
.INCLUDE : settings.mk .INCLUDE : settings.mk
.INCLUDE : sv.mk
# --- Files -------------------------------------------------------- # --- Files --------------------------------------------------------

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: tokens.c,v $ * $RCSfile: tokens.c,v $
* *
* $Revision: 1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: jsc $ $Date: 2001-03-15 12:48:46 $ * last change: $Author: hr $ $Date: 2003-03-26 12:11:12 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -62,7 +62,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#if (defined(_WIN32) || defined(_MSDOS) || defined(__IBMC__)) && !(defined S390) #if (defined(_WIN32) || defined(_MSDOS) || defined(__IBMC__))
#include <io.h> #include <io.h>
#else #else
#include <unistd.h> #include <unistd.h>

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: unix.c,v $ * $RCSfile: unix.c,v $
* *
* $Revision: 1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: jsc $ $Date: 2001-03-15 12:48:46 $ * last change: $Author: hr $ $Date: 2003-03-26 12:11:12 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -64,7 +64,7 @@
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include <fcntl.h> #include <fcntl.h>
#if (defined(_WIN32) || defined(_MSDOS) || defined(__IBMC__)) && !(defined S390) #if (defined(_WIN32) || defined(_MSDOS) || defined(__IBMC__))
#include <io.h> #include <io.h>
#else #else
#include <unistd.h> #include <unistd.h>

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: scanner.ll,v $ * $RCSfile: scanner.ll,v $
* *
* $Revision: 1.6 $ * $Revision: 1.7 $
* *
* last change: $Author: hjs $ $Date: 2002-03-06 13:25:45 $ * last change: $Author: hr $ $Date: 2003-03-26 12:11:09 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -329,9 +329,9 @@ oneway return IDL_ONEWAY;
return IDL_STRING_LITERAL; return IDL_STRING_LITERAL;
} }
("-")?{DIGIT}*(e|E){1}(("+"|"-")?{DIGIT}+)+(f|F)? | ("-")?{DIGIT}+(e|E){1}(("+"|"-")?{DIGIT}+)+(f|F)? |
("-")?"."{DIGIT}*((e|E)("+"|"-")?{DIGIT}+)?(f|F)? | ("-")?"."{DIGIT}+((e|E)("+"|"-")?{DIGIT}+)?(f|F)? |
("-")?{DIGIT}*"."{DIGIT}*((e|E)("+"|"-")?{DIGIT}+)?(f|F)? { ("-")?{DIGIT}*"."{DIGIT}+((e|E)("+"|"-")?{DIGIT}+)?(f|F)? {
yylval.dval = asciiToFloat( yytext ); yylval.dval = asciiToFloat( yytext );
return IDL_FLOATING_PT_LITERAL; return IDL_FLOATING_PT_LITERAL;
} }