[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rsclex.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 33cbc99fea5a3e4b87e883fd60ec97d4503109f3 Author: dilekuzulmezDate: Sat Apr 15 16:05:08 2017 +0300 tdf#99589 tolower / toupper - dangerous to Turks ... Change-Id: I9b3f63ce6517674c42829fb27611425545bc6978 Reviewed-on: https://gerrit.libreoffice.org/36565 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/rsc/source/parser/rsclex.cxx b/rsc/source/parser/rsclex.cxx index f240903c9b05..c85ef55c96cc 100644 --- a/rsc/source/parser/rsclex.cxx +++ b/rsc/source/parser/rsclex.cxx @@ -89,7 +89,7 @@ sal_uInt32 GetNumber() if( rtl::isAsciiDigit( static_cast(c) ) ) l = l * nLog + (c - '0'); else -l = l * nLog + (toupper( c ) - 'A' + 10 ); +l = l * nLog + (rtl::toAsciiUpperCase( static_cast(c) ) - 'A' + 10 ); c = pFI->GetFastChar(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source solenv/gbuild
rsc/source/parser/erscerr.cxx |1 - rsc/source/rsc/rsc.cxx| 10 +- solenv/gbuild/AllLangResTarget.mk | 13 ++--- solenv/gbuild/Helper.mk |1 - solenv/gbuild/TargetLocations.mk |1 - 5 files changed, 3 insertions(+), 23 deletions(-) New commits: commit bfc54ba3d2ac7f7ff40f8b3e95a6bd9b74bcd0c5 Author: Caolán McNamaraDate: Thu Apr 27 14:43:08 2017 +0100 cut top layer of detecting used bitmap resources in .src/.res files Change-Id: I476ff9f55c264983419d5410035c1dfe6e07d5a3 Reviewed-on: https://gerrit.libreoffice.org/37035 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/rsc/source/parser/erscerr.cxx b/rsc/source/parser/erscerr.cxx index ce67dfd9c60b..a6dcb46cf227 100644 --- a/rsc/source/parser/erscerr.cxx +++ b/rsc/source/parser/erscerr.cxx @@ -151,7 +151,6 @@ void RscError::WriteError( const ERRTYPE& rError, const char * pMessage ) StdLstOut( "-fs= Name of the .res file.\n" ); StdLstOut( "-lip=additional search path for system dependent files\n" ); StdLstOut( "-fp= Renaming of the .srs file.\n" ); -StdLstOut( "-oil= Output directory for image list files\n" ); StdLstOut( "-sub= replace by in image list files\n" ); StdLstOut( "-BIGENDIANFormat of number values.\n" ); StdLstOut( "-LITTLEENDIAN Format of number values.\n" ); diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index d1f19b7b103f..e736e618f8af 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -197,10 +197,6 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) aOutputSrs = (*ppStr) + 4; bOutputSrsIsSet = true; } -else if( !rsc_strnicmp( (*ppStr) + 1, "oil=", 4 ) ) -{ -aILDir = (*ppStr) + 5; -} else if( !rsc_stricmp( (*ppStr) + 1, "NoSysResTest" ) ) { // don't check Bitmap, Pointers, Icons nCommands |= CommandFlags::NoSysResTest; @@ -588,11 +584,7 @@ ERRTYPE RscCompiler::Link() aRcTmp = lcl_getTempFile(sTempDirUrl); -OUString sOilDirUrl; -if(!pCL->aILDir.isEmpty()) -sOilDirUrl = lcl_getAbsoluteUrl(sPwdUrl, pCL->aILDir); -else -sOilDirUrl = sTempDirUrl; +OUString sOilDirUrl = sTempDirUrl; aSysListTmp = lcl_getTempFile(sOilDirUrl); diff --git a/solenv/gbuild/AllLangResTarget.mk b/solenv/gbuild/AllLangResTarget.mk index d31b10b23b3a..9da53605297e 100644 --- a/solenv/gbuild/AllLangResTarget.mk +++ b/solenv/gbuild/AllLangResTarget.mk @@ -244,15 +244,13 @@ $(call gb_ResTarget_get_clean_target,%) : $(call gb_Helper_abbreviate_dirs,\ rm -f \ $(call gb_ResTarget_get_target,$*) \ - $(call gb_ResTarget_get_install_target,$*) \ - $(call gb_ResTarget_get_imagelist_target,$*)) + $(call gb_ResTarget_get_install_target,$*) $(call gb_ResTarget_get_target,%) : $(gb_Helper_MISCDUMMY) \ $(gb_ResTarget_RSCDEPS) $(call gb_Output_announce,$*,$(true),RES,2) $(call gb_Helper_abbreviate_dirs,\ - mkdir -p $(dir $@) \ - $(dir $(call gb_ResTarget_get_imagelist_target,$*)) && \ + mkdir -p $(dir $@) && \ RESPONSEFILE=`$(gb_MKTEMP)` && \ echo "-r -p \ -lg$(LANGUAGE) \ @@ -265,7 +263,6 @@ $(call gb_ResTarget_get_target,%) : $(gb_Helper_MISCDUMMY) \ -lip=$(gb_ResTarget_DEFIMAGESLOCATION)res \ -subMODULE=$(gb_ResTarget_DEFIMAGESLOCATION) \ -subGLOBALRES=$(gb_ResTarget_DEFIMAGESLOCATION)res \ - -oil=$(dir $(call gb_ResTarget_get_imagelist_target,$*)) \ $(filter-out $(gb_Helper_MISCDUMMY) $(gb_ResTarget_RSCDEPS),$^)" \ > $${RESPONSEFILE} && \ $(gb_ResTarget_RSCCOMMAND) @$${RESPONSEFILE} && \ @@ -277,7 +274,6 @@ $(call gb_ResTarget_get_target,$(1)) : LIBRARY = $(2) $(call gb_ResTarget_get_target,$(1)) : LANGUAGE = $(3) $(call gb_ResTarget_get_target,$(1)) : RESLOCATION = $(2) $(call gb_AllLangResTarget_get_clean_target,$(2)) : $(call gb_ResTarget_get_clean_target,$(1)) -$(call gb_ResTarget_get_imagelist_target,$(1)) : $(call gb_ResTarget_get_target,$(1)) endef @@ -365,9 +361,4 @@ $(foreach lang,$(gb_AllLangResTarget_LANGS),\ endef -define gb_AllLangResTarget_get_imagelists -$(foreach lang,$(gb_AllLangResTarget_LANGS),\ -$(call gb_ResTarget_get_imagelist_target,$(1)$(lang))) -endef - # vim: set noet sw=4: diff --git a/solenv/gbuild/Helper.mk
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp2.c |2 +- rsc/source/rscpp/cpp3.c |8 2 files changed, 5 insertions(+), 5 deletions(-) New commits: commit cb643b44ca9469b9bbea97c5c0c0c911fc8ba058 Author: Stephan BergmannDate: Wed Mar 22 21:55:48 2017 +0100 Fix passing plain char into ctype.h is* functions Change-Id: Ifa1098a12a9d3d28a4d272ac8f4ab72d9a92282b diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c index 2cbc90d9d439..e55dc384018f 100644 --- a/rsc/source/rscpp/cpp2.c +++ b/rsc/source/rscpp/cpp2.c @@ -166,7 +166,7 @@ int control(int counter) * We subtract 1 as we want the number of the next line. */ line = atoi(work) - 1; /* Reset line number*/ -for (tp = work; isdigit(*tp) || type[(int)*tp] == SPA; tp++) +for (tp = work; isdigit((unsigned char)*tp) || type[(int)*tp] == SPA; tp++) ; /* Skip over digits */ if (*tp != EOS) /* Got a filename, so: */ { diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index bd2e2cc262d2..078be477d815 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -174,7 +174,7 @@ int dooptions(int argc, char** argv) else { c = *ap++; /* Option byte */ -if (islower(c)) /* Normalize case */ +if (islower((unsigned char)c)) /* Normalize case */ c = toupper(c); switch (c) /* Command character*/ { @@ -224,13 +224,13 @@ int dooptions(int argc, char** argv) } while (sizp->bits != endtest && *ap != EOS) { -if (!isdigit(*ap)) /* Skip to next digit */ +if (!isdigit((unsigned char)*ap)) /* Skip to next digit */ { ap++; continue; } size = 0; /* Compile the value*/ -while (isdigit(*ap)) +while (isdigit((unsigned char)*ap)) { size *= 10; size += (*ap++ - '0'); @@ -254,7 +254,7 @@ int dooptions(int argc, char** argv) #if OSL_DEBUG_LEVEL > 1 case 'X': /* Debug*/ -debug = (isdigit(*ap)) ? atoi(ap) : 1; +debug = (isdigit((unsigned char)*ap)) ? atoi(ap) : 1; #if (HOST == SYS_UNIX) signal(SIGINT, (void (*)(int)) abort); /* Trap "interrupt" */ #endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rsclex.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 971be75c58889b03bf69b31d3721081c39d53a35 Author: Stephan BergmannDate: Wed Mar 22 21:53:07 2017 +0100 Use rtl::isAscii* instead of ctype.h is* (and fix passing plain char) (was inadvertently missing from previous commit) Change-Id: Ia047ff8c21a50c5afe6fb2e6ff885be725b55bd3 diff --git a/rsc/source/parser/rsclex.cxx b/rsc/source/parser/rsclex.cxx index cbe2f0eded4d..e03aa09444d5 100644 --- a/rsc/source/parser/rsclex.cxx +++ b/rsc/source/parser/rsclex.cxx @@ -223,7 +223,8 @@ int MakeToken( YYSTYPE * pTokenVal ) AtomnHashId; OStringBuffer aBuf( 256 ); -while( isalnum (c) || (c == '_') || (c == '-') || (c == ':')) +while( rtl::isAsciiAlphanumeric (static_cast(c)) + || (c == '_') || (c == '-') || (c == ':')) { aBuf.append( sal_Char(c) ); c = pFI->GetFastChar(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rsclex.cxx | 13 +++-- rsc/source/tools/rscchar.cxx |4 ++-- rsc/source/tools/rsctools.cxx |9 +++-- 3 files changed, 16 insertions(+), 10 deletions(-) New commits: commit eedb6435f863b9377197a65ffd75ebec98007ebe Author: Stephan BergmannDate: Wed Mar 22 21:38:23 2017 +0100 Use rtl::isAscii* instead of ctype.h is* (and fix passing plain char) Change-Id: Ibb854c389683656f2570ff330ce44c27aef0e70f diff --git a/rsc/source/parser/rsclex.cxx b/rsc/source/parser/rsclex.cxx index b7446db38a26..cbe2f0eded4d 100644 --- a/rsc/source/parser/rsclex.cxx +++ b/rsc/source/parser/rsclex.cxx @@ -34,6 +34,7 @@ #include #include +#include #include #include @@ -82,9 +83,9 @@ sal_uInt32 GetNumber() if( nLog == 16 ) { -while( isxdigit( c ) ) +while( rtl::isAsciiHexDigit( static_cast(c) ) ) { -if( isdigit( c ) ) +if( rtl::isAsciiDigit( static_cast(c) ) ) l = l * nLog + (c - '0'); else l = l * nLog + (toupper( c ) - 'A' + 10 ); @@ -94,7 +95,7 @@ sal_uInt32 GetNumber() } else { -while( isdigit( c ) || 'x' == c ) +while( rtl::isAsciiDigit( static_cast(c) ) || 'x' == c ) { l = l * nLog + (c - '0'); c = pFI->GetFastChar(); @@ -116,7 +117,7 @@ int MakeToken( YYSTYPE * pTokenVal ) while( true ) // ignore comments and space characters { -while( isspace( c ) ) +while( rtl::isAsciiWhiteSpace( static_cast(c) ) ) c = pFI->GetFastChar(); if( '/' == c ) @@ -211,13 +212,13 @@ int MakeToken( YYSTYPE * pTokenVal ) pTokenVal->string = const_cast (pStringContainer->putString( aBuf.getStr() )); return STRING; } -if (isdigit (c)) +if (rtl::isAsciiDigit (static_cast(c))) { pTokenVal->value = GetNumber(); return NUMBER; } -if( isalpha (c) || (c == '_') ) +if( rtl::isAsciiAlpha (static_cast(c)) || (c == '_') ) { AtomnHashId; OStringBuffer aBuf( 256 ); diff --git a/rsc/source/tools/rscchar.cxx b/rsc/source/tools/rscchar.cxx index 463622671766..fb5411407b54 100644 --- a/rsc/source/tools/rscchar.cxx +++ b/rsc/source/tools/rscchar.cxx @@ -106,9 +106,9 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding ) sal_uInt16 nChar = 0; int i = 0; ++pStr; -while( isxdigit( *pStr ) && i != 2 ) +while( rtl::isAsciiHexDigit( static_cast(*pStr) ) && i != 2 ) { -if( isdigit( *pStr ) ) +if( rtl::isAsciiDigit( static_cast(*pStr) ) ) nChar = nChar * 16 + (sal_uInt8)*pStr - (sal_uInt8)'0'; else if( rtl::isAsciiUpperCase( static_cast(*pStr) ) ) nChar = nChar * 16 + (sal_uInt8)*pStr - (sal_uInt8)'A' +10; diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx index e043f451c3c1..c5780c9b0548 100644 --- a/rsc/source/tools/rsctools.cxx +++ b/rsc/source/tools/rsctools.cxx @@ -31,6 +31,7 @@ #include #include +#include #include /* case insensitive compare of two strings up to a given length */ @@ -93,7 +94,8 @@ char * ResponseFile( RscPtrPtr * ppCmd, char ** ppArgv, sal_uInt32 nArgc ) nItems = fread( [ 0 ], 1, sizeof( char ), fFile ); while( nItems ) { -if( !isspace( szBuffer[ 0 ] ) ) +if( !rtl::isAsciiWhiteSpace( +static_cast(szBuffer[ 0 ]) ) ) { /* * #i27914# double ticks '"' now have a duplicate function: @@ -102,7 +104,10 @@ char * ResponseFile( RscPtrPtr * ppCmd, char ** ppArgv, sal_uInt32 nArgc ) * argument no two ! */ unsigned int n = 0; -while( nItems && (!isspace( szBuffer[ n ] ) || bInQuotes) && +while( nItems && + (!rtl::isAsciiWhiteSpace( + static_cast(szBuffer[ n ]) ) || +bInQuotes) && n +1 < sizeof( szBuffer ) ) { n++; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp1.c |3 +++ rsc/source/rscpp/cpp2.c |1 + rsc/source/rscpp/cpp4.c |3 ++- rsc/source/rscpp/cpp5.c |1 + rsc/source/rscpp/cpp6.c |2 +- 5 files changed, 8 insertions(+), 2 deletions(-) New commits: commit b593c9c5b80bff9651cfde8f7c204b5d8e811155 Author: Stephan BergmannDate: Fri Jan 27 11:36:23 2017 +0100 -Werror=implicit-fallthrough= (GCC 7) Change-Id: I9d6c7e5a03aea56d8db84c2ba06c63efb0e007fa diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c index 4724b53..03d75f4 100644 --- a/rsc/source/rscpp/cpp1.c +++ b/rsc/source/rscpp/cpp1.c @@ -278,6 +278,7 @@ int MAIN(int argc, char** argv) } } /* Continue by opening output*/ } +/* fall through */ #endif case 3: /* @@ -293,6 +294,7 @@ int MAIN(int argc, char** argv) exit(IO_ERROR); } } /* Continue by opening input*/ +/* fall through */ case 2: /* One file -> stdin*/ /* * Open input file, "-" means use stdin. @@ -309,6 +311,7 @@ int MAIN(int argc, char** argv) strncpy(work, useargv[1], NWORK); /* Remember input filename */ break; } /* Else, just get stdin */ +/* fall through */ case 0: /* No args? */ case 1: /* No files, stdin -> stdout*/ work[0] = EOS; /* Unix can't find stdin name */ diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c index c181bef..2cbc90d 100644 --- a/rsc/source/rscpp/cpp2.c +++ b/rsc/source/rscpp/cpp2.c @@ -120,6 +120,7 @@ int control(int counter) if (++ifptr >= [BLK_NEST]) goto if_nest_err; *ifptr = 0; /* !WAS_COMPILING */ +/* fall through */ case L_line:/* Many */ /* * Are pragma's always processed? diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c index d8e0345..d8009d2 100644 --- a/rsc/source/rscpp/cpp4.c +++ b/rsc/source/rscpp/cpp4.c @@ -190,7 +190,7 @@ void dodefine() break; /* spaces */ else if (c == '\t') c = ' ';/* Normalize tabs */ -/* Fall through to store character */ +/* fall through *//* to store character */ default:/* Other character */ save(c); break; @@ -461,6 +461,7 @@ void expand(DEFBUF* tokenp) dumpparm("expand"); #endif } /* Collect arguments*/ +/* fall through */ case DEF_NOARGS:/* No parameters just stuffs*/ expstuff(tokenp); /* Do actual parameters */ } /* nargs switch */ diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c index b938fcc..e64a3e0 100644 --- a/rsc/source/rscpp/cpp5.c +++ b/rsc/source/rscpp/cpp5.c @@ -352,6 +352,7 @@ again: opname[(int)opp->op]); return 1; } +/* fall through */ /* * Evaluate op1. */ diff --git a/rsc/source/rscpp/cpp6.c b/rsc/source/rscpp/cpp6.c index 3678caa..1f6bd68 100644 --- a/rsc/source/rscpp/cpp6.c +++ b/rsc/source/rscpp/cpp6.c @@ -902,7 +902,7 @@ int get() #ifdef STRICT_COMMENTS cwarn("Nested comments", NULLST); #endif -/* Fall into * stuff*/ +/* fall through *//* into * stuff */ case '*': if ((c = get()) != '/') /* If comment doesn't */ goto test; /* end, look at next*/ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rscyacc.y |2 -- 1 file changed, 2 deletions(-) New commits: commit a409ec6932c6bfeb5f5a931adb5b480755fe245b Author: Caolán McNamaraDate: Fri Jan 13 09:16:44 2017 + unused variables Change-Id: I77a3fc5478a068530d9de4cc6962fe439169567e diff --git a/rsc/source/parser/rscyacc.y b/rsc/source/parser/rscyacc.y index b3bdf56..25d39c5 100644 --- a/rsc/source/parser/rscyacc.y +++ b/rsc/source/parser/rscyacc.y @@ -39,8 +39,6 @@ #include ObjectStack S; -static RscTop * pCurClass; -static char szErrBuf[ 100 ]; RSCINST GetVarInst( const RSCINST & rInst, const char * pVarName ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp1.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit aecd984ad1c0dc29e15891bca227a96aedbde154 Author: Stephan BergmannDate: Mon Jan 9 21:14:57 2017 +0100 loplugin:externvar Change-Id: Icaa7d1f10aafbb1b143252eca565f332eb040e82 diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c index f277b6b..4724b53 100644 --- a/rsc/source/rscpp/cpp1.c +++ b/rsc/source/rscpp/cpp1.c @@ -25,7 +25,7 @@ #include "cpp.h" FILE* pCppOut = NULL; -FILE* pCppIn = NULL; +static FILE* pCppIn = NULL; #if OSL_DEBUG_LEVEL > 1 FILE* pDefOut = NULL; /* ER evtl. #define's dump */ @@ -187,7 +187,7 @@ char* magic[] = static char* sharpfilename = NULL; -int nRunde = 0; +static int nRunde = 0; void InitCpp1() { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/rsc/rsc.cxx | 88 - 1 file changed, 88 deletions(-) New commits: commit 2cdaab42b9597c5d049dea81300c8b653dab046c Author: Caolán McNamaraDate: Sun Jan 1 20:45:07 2017 + ImageLists don't exist in rsc file anymore Change-Id: I99101a7c979c9d9aa788df7dc5f49872d1089dd8 Reviewed-on: https://gerrit.libreoffice.org/32593 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index f856e2a..0b44a61 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -844,94 +844,6 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile, aOStm.WriteLine(aLine); } -else if (aLine.indexOf("ImageList") != -1) -{ -::std::vector< ::std::pair< OString, sal_Int32 > > aEntryVector; - -aOStm.WriteLine(aLine); - -if (aLine.indexOf(';') == -1) -{ -const sal_uInt64 nImgListStartPos = aIStm.Tell(); - -do -{ -if( !aIStm.ReadLine(aLine) ) -break; -} -while (aLine.indexOf("Prefix") == -1); - -const OString aPrefix( aLine.getToken(1, '"') ); -aIStm.Seek( nImgListStartPos ); - -do -{ -if (!aIStm.ReadLine(aLine) ) -break; -} -while (aLine.indexOf("IdList") == -1); - -// scan all ids and collect images -while (aLine.indexOf('}') == -1) -{ -if( !aIStm.ReadLine(aLine) ) -break; - -aLine = comphelper::string::stripStart(aLine, ' '); -aLine = comphelper::string::stripStart(aLine, '\t'); -aLine = aLine.replaceAll(";", ""); - -if (comphelper::string::isdigitAsciiString(aLine)) -{ -sal_Int32 nNumber = atoi(aLine.getStr()); - -OStringBuffer aBuf(aPrefix); -if( nNumber < 1 ) -aBuf.append('0'); -aBuf.append(aLine); -OString aBaseFileName = aBuf.makeStringAndClear(); - -if( GetImageFilePath( rOutputFile, rContext, aBaseFileName, aFilePath, pSysListFile ) ) -aEntryVector.push_back( ::std::pair< OString, sal_Int32 >( aFilePath, nNumber ) ); -else -aMissingImages.push_back( aBaseFileName ); -} -} - -const sal_uInt64 nImgListEndPos = aIStm.Tell(); -aIStm.Seek( nImgListStartPos ); -while( aIStm.Tell() < nImgListEndPos ) -{ -aIStm.ReadLine( aLine ); - -if (aLine.indexOf("IdList") != -1) -{ -while (aLine.indexOf('}') == -1) -aIStm.ReadLine(aLine); -} -else -aOStm.WriteLine(aLine); -} - -aOStm.WriteLine(OString("FileList = {")); - -for( size_t i = 0; i < aEntryVector.size(); ++i ) -{ -OStringBuffer aEntryString("< \""); - -aEntryString.append(aEntryVector[i].first); -aEntryString.append("\"; "); - aEntryString.append(static_cast(aEntryVector[ i ].second)); -aEntryString.append("; >;"); - -aOStm.WriteLine(aEntryString.makeStringAndClear()); -} - -aOStm.WriteLine(OString("};")); -} -else -aOStm.WriteLine(aLine); -} else aOStm.WriteLine(aLine); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp3.c | 21 - 1 file changed, 21 deletions(-) New commits: commit 78ddea8eafa2196b7a3f537bc81962f5efa008b4 Author: Stephan BergmannDate: Wed Dec 21 14:38:14 2016 +0100 -Werror,-Wunused-function (clang-cl) Change-Id: I351067e7274c13d5364ffa1b168910eb1b82af37 diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index a24812e..bd2e2cc 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -362,27 +362,6 @@ int readoptions(char* filename, char*** pfargv) return (back); } -#if HOST != SYS_UNIX - -/* - * Dec operating systems mangle upper-lower case in command lines. - * This routine forces the -D and -U arguments to uppercase. - * It is called only on cpp startup by dooptions(). - */ -static void zap_uc(char* ap) -{ -while (*ap != EOS) -{ -/* - * Don't use islower() here so it works with Multinational - */ -if (*ap >= 'a' && *ap <= 'z') -*ap = (char)toupper(*ap); -ap++; -} -} -#endif - /* * Initialize the built-in #define's. There are two flavors: * #define decus 1 (static definitions) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rscdb.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit a9297447b139b127723201771b5c225c9bd5efec Author: Caolán McNamaraDate: Thu Oct 27 21:00:47 2016 +0100 coverity#1374318 Uninitialized scalar field Change-Id: I247b9d37b71ebba621b63026d597037450155e18 diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index dca7975..cd43e21 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -43,6 +43,7 @@ RscTypCont::RscTypCont( RscError * pErrHdl, , nByteOrder( nOrder ) , aSearchPath( rSearchPath ) , nUniqueId(256) +, nFilePos( 0 ) , nPMId(RSC_VERSIONCONTROL +1) // at least one more , aBool( pHS->getID( "sal_Bool" ), RSC_NOTYPE ) , aShort( pHS->getID( "short" ), RSC_NOTYPE ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/rsc/rsc.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 793dae3e90692467c0f111cf5b127209f7f522fa Author: e12346Date: Sun Oct 2 09:54:34 2016 +0530 tdf#100726 Improve readability of OUString concatination fixed the bug on rsc/source/rsc/rsc.cxx Change-Id: I0c1c92f63b8c18d3acbdcf74e7284a2dae19da44 Reviewed-on: https://gerrit.libreoffice.org/29451 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 23e7deb..2fedf1a 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -617,8 +617,8 @@ ERRTYPE RscCompiler::Link() } catch (RscIoError&) { -OString sMsg("Error with paths:\n"); -sMsg += "temporary rc file: " + aRcTmp + "\n" +OString sMsg = "Error with paths:\n" +"temporary rc file: " + aRcTmp + "\n" "temporary ilst file: " + aSysListTmp + "\n" "ilst file: " + aSysList + "\n"; pTC->pEH->FatalError(ERR_OPENFILE, RscId(), sMsg.getStr()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rscdb.cxx | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) New commits: commit 2a1431208e4292e8563935f5e8cd0107113f65ea Author: Jochen NitschkeDate: Wed Aug 31 11:39:59 2016 +0200 cppcheck:noConstructor for RscEnumerateObj use initializer lists for ctors Change-Id: I1ac13d4178d070e02223cb70d8dc80d229a5fa7b Reviewed-on: https://gerrit.libreoffice.org/28543 Tested-by: Jenkins Reviewed-by: Jochen Nitschke diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index 53855fc..05638fb 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -42,6 +42,8 @@ RscTypCont::RscTypCont( RscError * pErrHdl, : nSourceCharSet( RTL_TEXTENCODING_UTF8 ) , nByteOrder( nOrder ) , aSearchPath( rSearchPath ) +, nUniqueId(256) +, nPMId(RSC_VERSIONCONTROL +1) // at least one more , aBool( pHS->getID( "sal_Bool" ), RSC_NOTYPE ) , aShort( pHS->getID( "short" ), RSC_NOTYPE ) , aUShort( pHS->getID( "sal_uInt16" ), RSC_NOTYPE ) @@ -57,11 +59,9 @@ RscTypCont::RscTypCont( RscError * pErrHdl, , aLangType() , aLangString( pHS->getID( "Lang_Chars" ), RSC_NOTYPE, , ) , aLangShort( pHS->getID( "Lang_short" ), RSC_NOTYPE, , ) +, pEH(pErrHdl) , nFlags( nFlagsP ) { -nUniqueId = 256; -nPMId = RSC_VERSIONCONTROL +1; // at least one more -pEH = pErrHdl; Init(); } @@ -290,6 +290,14 @@ private: sal_uLong lFileKey; // what source file RscTop *pClass; +RscEnumerateObj(RscTypCont* pTC, FILE* pOutputFile) +:pTypCont(pTC) +,fOutput(pOutputFile) +,lFileKey(0) +,pClass(nullptr) +{ +} + DECL_LINK_TYPED( CallBackWriteRc, const NameNode&, void ); DECL_LINK_TYPED( CallBackWriteSrc, const NameNode&, void ); @@ -388,12 +396,9 @@ private: public: RscEnumerateObj aEnumObj; -RscEnumerateRef( RscTypCont * pTC, RscTop * pR, - FILE * fOutput ) +RscEnumerateRef(RscTypCont* pTC, RscTop* pR, FILE* fOutput) +: pRoot(pR), aEnumObj(pTC, fOutput) { -aEnumObj.pTypCont = pTC; -aEnumObj.fOutput = fOutput; -pRoot = pR; } ERRTYPE const & WriteRc() { @@ -475,8 +480,8 @@ public: inline RscDel::RscDel( RscTop * pRoot, sal_uLong lKey ) +: lFileKey(lKey) { -lFileKey = lKey; pRoot->EnumNodes( LINK( this, RscDel, Delete ) ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rscdb.cxx | 60 +++- 1 file changed, 26 insertions(+), 34 deletions(-) New commits: commit e8b19c216be98aa0dd7f837152fc5bc93cd0f367 Author: Jochen NitschkeDate: Wed Aug 31 12:40:19 2016 +0200 use range based loops clear of standard containers is superfluous in dtors Change-Id: I3dd482573100a67a931122670abdcc60b8521790 Reviewed-on: https://gerrit.libreoffice.org/28544 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index c96b7f1..53855fc 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -88,9 +88,9 @@ OString RscTypCont::ChangeLanguage(const OString& rNewLang) aLangFallbacks.clear(); -for (::std::vector< OUString >::const_iterator it( aFallbacks.begin()); it != aFallbacks.end(); ++it) +for (OUString& rItem : aFallbacks) { -OString aLang( OUStringToOString( *it, RTL_TEXTENCODING_ASCII_US)); +OString aLang(OUStringToOString(rItem, RTL_TEXTENCODING_ASCII_US)); sal_uInt32 nID = GetLangId( aLang ); bool bAdd = (nID == 0); if ( bAdd ) @@ -174,8 +174,8 @@ RscTypCont::~RscTypCont() // all classes are still valid, destroy each instance // of base types -for ( size_t i = 0, n = aBaseLst.size(); i < n; ++i ) -aBaseLst[ i ]->Pre_dtor(); +for (RscTop* pItem : aBaseLst) +pItem->Pre_dtor(); aBool.Pre_dtor(); aShort.Pre_dtor(); @@ -194,21 +194,17 @@ RscTypCont::~RscTypCont() delete aVersion.pClass; DestroyTree( pRoot ); -for ( size_t i = 0, n = aBaseLst.size(); i < n; ++i ) -delete aBaseLst[ i ]; +for (RscTop* pItem : aBaseLst) +delete pItem; -aBaseLst.clear(); - -for ( size_t i = 0, n = aSysLst.size(); i < n; ++i ) -delete aSysLst[ i ]; - -aSysLst.clear(); +for (RscSysEntry* pItem: aSysLst) +delete pItem; } void RscTypCont::ClearSysNames() { -for ( size_t i = 0, n = aSysLst.size(); i < n; ++i ) -delete aSysLst[ i ]; +for (RscSysEntry* pItem: aSysLst) +delete pItem; aSysLst.clear(); } @@ -244,33 +240,30 @@ RscTop * RscTypCont::SearchType( Atom nId ) // al least to not pollute #undef ELSE_IF -for ( size_t i = 0, n = aBaseLst.size(); i < n; ++i ) +for (RscTop* pItem : aBaseLst) { -RscTop* pEle = aBaseLst[ i ]; -if( pEle->GetId() == nId ) -return pEle; +if (pItem->GetId() == nId) +return pItem; } return nullptr; } sal_uInt32 RscTypCont::PutSysName( sal_uInt32 nRscTyp, char * pFileName ) { -RscSysEntry *pSysEntry; RscSysEntry *pFoundEntry = nullptr; -for ( size_t i = 0, n = aSysLst.size(); i < n; ++i ) +for (RscSysEntry* pItem: aSysLst) { -pSysEntry = aSysLst[ i ]; -if( !strcmp( pSysEntry->aFileName.getStr(), pFileName ) ) -if( pSysEntry->nRscTyp == nRscTyp && - pSysEntry->nTyp== 0 && - pSysEntry->nRefId == 0) -{ -pFoundEntry = pSysEntry; -break; -} +if( !strcmp( pItem->aFileName.getStr(), pFileName ) && +pItem->nRscTyp == nRscTyp && +pItem->nTyp== 0 && +pItem->nRefId == 0) +{ +pFoundEntry = pItem; +break; +} } -pSysEntry = pFoundEntry; +RscSysEntry *pSysEntry = pFoundEntry; if ( !pSysEntry ) { @@ -366,13 +359,12 @@ void RscEnumerateObj::WriteRcFile( RscWriteRc & rMem, FILE * fOut ) sal_uInt32 nSize = (nCount * (sizeof(sal_uInt64)+sizeof(sal_Int32))) + sizeof(sal_Int32); rMem.Put( nCount ); // save the count -for( std::map< sal_uInt64, sal_uLong >::const_iterator it = - pTypCont->aIdTranslator.begin(); it != pTypCont->aIdTranslator.end(); ++it ) +for (auto& rItem : pTypCont->aIdTranslator) { // save the key -rMem.Put( it->first ); +rMem.Put( rItem.first ); // save the object id or position -rMem.Put( (sal_Int32)it->second ); +rMem.Put( static_cast(rItem.second) ); } rMem.Put( nSize ); // save the size next } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/res/rscrange.cxx |6 +++--- rsc/source/tools/rscdef.cxx |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 9fcfe485cd23d7e560aa05efbd02401d62d144dd Author: Asela DasanayakaDate: Wed Aug 3 12:15:51 2016 +0530 tdf#96505 get rid of "long" integer literals 'L' Remove L from integer literals in module rsc all OL and 1L Change-Id: I4a47fead01c2e7f1febc5299eb0905ecf14cee2a Reviewed-on: https://gerrit.libreoffice.org/27818 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/rsc/source/res/rscrange.cxx b/rsc/source/res/rscrange.cxx index 9f7a730..6e379ff 100644 --- a/rsc/source/res/rscrange.cxx +++ b/rsc/source/res/rscrange.cxx @@ -100,8 +100,8 @@ RSCINST RscRange::Create( RSCINST * pInst, const RSCINST & rDflt, memmove( aInst.pData, rDflt.pData, sizeof( RscRangeInst ) ); else { -if( 0L >= nMin && 0L <= nMax ) -reinterpret_cast(aInst.pData)->nValue = (sal_uInt16)(0L - nMin); +if( 0 >= nMin && 0 <= nMax ) +reinterpret_cast(aInst.pData)->nValue = (sal_uInt16)(0 - nMin); else reinterpret_cast(aInst.pData)->nValue = 0; @@ -211,7 +211,7 @@ RSCINST RscLongRange::Create( RSCINST * pInst, const RSCINST & rDflt, else { sal_Int32 lDflt; -if( 0L >= nMin && 0L <= nMax ) +if( 0 >= nMin && 0 <= nMax ) lDflt = 0; else lDflt = nMin; diff --git a/rsc/source/tools/rscdef.cxx b/rsc/source/tools/rscdef.cxx index e7f5f44..be4ea3f 100644 --- a/rsc/source/tools/rscdef.cxx +++ b/rsc/source/tools/rscdef.cxx @@ -301,7 +301,7 @@ bool RscExpression::Evaluate( sal_Int32 * plValue ) *plValue = lLeft << lRight; else { -if( 0L == lRight ) +if( 0 == lRight ) return false; *plValue = lLeft / lRight; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rscinit.cxx |1 - rsc/source/parser/rscyacc.y | 13 - 2 files changed, 14 deletions(-) New commits: commit 538a217263230765961f6cabbc8d8e168b3eaac0 Author: Noel GrandinDate: Fri May 27 11:27:12 2016 +0200 Remove more RSC_DOCKWINDOW related stuff Change-Id: I89f929c32a71be4fb2f7a867940de4c008079518 diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index 6edee4c..10b5f31 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -105,7 +105,6 @@ void RscTypCont::Init() aNmTb.Put( "POS",POSITION, (sal_IntPtr)0 ); aNmTb.Put( "SIZE", DIMENSION, (sal_IntPtr)0 ); aNmTb.Put( "ZoomInOutputSize", INZOOMOUTPUTSIZE,(sal_IntPtr)0); -aNmTb.Put( "FloatingPos",FLOATINGPOS,(sal_IntPtr)0 ); } { aShort.SetRange( -32768, 32767 ); diff --git a/rsc/source/parser/rscyacc.y b/rsc/source/parser/rscyacc.y index 43272f2..bf96621 100644 --- a/rsc/source/parser/rscyacc.y +++ b/rsc/source/parser/rscyacc.y @@ -307,7 +307,6 @@ RSCINST GetFirstTupelEle( const RSCINST & rTop ) %token POSITION %token DIMENSION %token INZOOMOUTPUTSIZE -%token FLOATINGPOS %token DEFINE %token INCLUDE %token MACROTARGET @@ -756,18 +755,6 @@ var_definition SetNumber( S.Top(), "_ZOOMINWIDTH", $4 ); SetNumber( S.Top(), "_ZOOMINHEIGHT", $6 ); } - | FLOATINGPOS '=' CONSTNAME '(' long_expression ',' long_expression - ')' ';' - { - SetConst( S.Top(), "_FLOATINGPOSMAPMODE", $3.hashid, $3.nValue ); - SetNumber( S.Top(), "_FLOATINGPOSX", $5 ); - SetNumber( S.Top(), "_FLOATINGPOSY", $7 ); - } - | FLOATINGPOS '=' '(' long_expression ',' long_expression ')' ';' - { - SetNumber( S.Top(), "_FLOATINGPOSX", $4 ); - SetNumber( S.Top(), "_FLOATINGPOSY", $6 ); - } ; var_header_class ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp2.c |8 rsc/source/rscpp/cpp3.c |2 +- rsc/source/rscpp/cpp4.c |4 ++-- rsc/source/rscpp/cpp5.c | 14 +++--- rsc/source/rscpp/cppdef.h |9 - 5 files changed, 14 insertions(+), 23 deletions(-) New commits: commit 7fb97f25d16bd65fe8d32ca12c8b7acc89500991 Author: erdemdemirkapiDate: Sun May 1 12:54:48 2016 +0300 rsc - remove obsolete FILE_LOCAL macros. Change-Id: I92c19459646eaceffe87ef0f002c988595f221c5 Reviewed-on: https://gerrit.libreoffice.org/24549 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c index 2108f09..833e687 100644 --- a/rsc/source/rscpp/cpp2.c +++ b/rsc/source/rscpp/cpp2.c @@ -305,7 +305,7 @@ int control(int counter) * is always suppressed, so we don't need to evaluate anything. This * suppresses unnecessary warnings. */ -FILE_LOCAL void doif(int hash) +void doif(int hash) { int c; int found; @@ -358,7 +358,7 @@ FILE_LOCAL void doif(int hash) * Note: the November 12 draft forbids '>' in the #include format. * This restriction is unnecessary and not implemented. */ -FILE_LOCAL void doinclude() +void doinclude() { int c; int delim; @@ -406,7 +406,7 @@ FILE_LOCAL void doinclude() * active files. Returns TRUE if the file was opened, FALSE * if openinclude() fails. No error message is printed. */ -FILE_LOCAL int openinclude(char* filename, int searchlocal) +int openinclude(char* filename, int searchlocal) { char** incptr; char tmpname[NFWORK]; /* Filename work area */ @@ -500,7 +500,7 @@ FILE_LOCAL int openinclude(char* filename, int searchlocal) * node/device/directory part of the string is copied to result and * hasdirectory returns TRUE. Else, nothing is copied and it returns FALSE. */ -FILE_LOCAL int hasdirectory(char* source, char* result, int max) +int hasdirectory(char* source, char* result, int max) { #if HOST == SYS_UNIX char* tp; diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index e836b3d..71c40fe 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -369,7 +369,7 @@ int readoptions(char* filename, char*** pfargv) * This routine forces the -D and -U arguments to uppercase. * It is called only on cpp startup by dooptions(). */ -FILE_LOCAL void zap_uc(char* ap) +void zap_uc(char* ap) { while (*ap != EOS) { diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c index eab7b15..6071076 100644 --- a/rsc/source/rscpp/cpp4.c +++ b/rsc/source/rscpp/cpp4.c @@ -465,7 +465,7 @@ void expand(DEFBUF* tokenp) /* * Collect the actual parameters for this macro. TRUE if ok. */ -FILE_LOCAL int expcollect() +int expcollect() { int c; int paren; /* For embedded ()'s*/ @@ -533,7 +533,7 @@ FILE_LOCAL int expcollect() /* * Stuff the macro body, replacing formal parameters by actual parameters. */ -FILE_LOCAL void expstuff(DEFBUF* tokenp) +void expstuff(DEFBUF* tokenp) { int c; /* Current character*/ char* inp; /* -> repl string */ diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c index f383ab8..950830f 100644 --- a/rsc/source/rscpp/cpp5.c +++ b/rsc/source/rscpp/cpp5.c @@ -370,7 +370,7 @@ again: * evalchar called to evaluate 'x' * evalnum called to evaluate numbers. */ -FILE_LOCAL int evallex(int skip) +int evallex(int skip) { int c; int c1; @@ -505,7 +505,7 @@ again: * DIG success * OP_FAIL bad parse or something. */ -FILE_LOCAL int dosizeof() +int dosizeof() { int c; TYPES* tp; @@ -621,7 +621,7 @@ FILE_LOCAL int dosizeof() /* * TRUE if value is zero or exactly one bit is set in value. */ -FILE_LOCAL int bittest(int value) +int bittest(int value) { /* whoaa!! really worried about non 2's complement machines... * but not at all about cross-compiling ? @@ -640,7 +640,7 @@ FILE_LOCAL int bittest(int value) * Expand number for #if lexical analysis. Note: evalnum recognizes * the unsigned suffix, but only returns a signed int value. */ -FILE_LOCAL int evalnum(int c) +int evalnum(int c) { int value; int base; @@ -670,7 +670,7 @@ FILE_LOCAL int evalnum(int c) value += c1; c = cget(); } -if (c == 'u' || c == 'U') /* Unsigned nonsense*/ +if (c == 'u' || c == 'U')/* Unsigned nonsense */ cget(); unget(); return value; @@ -679,7 +679,7 @@ FILE_LOCAL int evalnum(int c) /* * Get a character constant */ -FILE_LOCAL int evalchar(int skip) +int evalchar(int skip) { int c; int value; @@ -785,7 +785,7 @@ FILE_LOCAL int evalchar(int skip) * * evaleval() returns the new pointer to the top of the value stack. */ -FILE_LOCAL int * evaleval(int* valp, int op, int skip) +int *
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rscdb.cxx |3 --- 1 file changed, 3 deletions(-) New commits: commit 1e2078d45161c306f4a8dda97b2ddde57e5e7471 Author: Stephan BergmannDate: Wed Mar 23 09:35:36 2016 +0100 -Werror=unused-but-set-variable Change-Id: I7c0f1e37f3a53dfed09c4e13d10826022b3ca777 diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index ff19a3b..b4b31b8 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -258,13 +258,10 @@ sal_uInt32 RscTypCont::PutSysName( sal_uInt32 nRscTyp, char * pFileName ) { RscSysEntry *pSysEntry; RscSysEntry *pFoundEntry = nullptr; -bool bId1 = false; for ( size_t i = 0, n = aSysLst.size(); i < n; ++i ) { pSysEntry = aSysLst[ i ]; -if( pSysEntry->nKey == 1 ) -bId1 = true; if( !strcmp( pSysEntry->aFileName.getStr(), pFileName ) ) if( pSysEntry->nRscTyp == nRscTyp && pSysEntry->nTyp== 0 && ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rscdb.cxx | 11 +-- rsc/source/prj/gui.cxx |4 +++- rsc/source/rsc/rsc.cxx | 12 +--- rsc/source/rscpp/cpp.h | 10 +- rsc/source/rscpp/cpp1.c | 14 +++--- rsc/source/rscpp/cpp2.c |6 +++--- rsc/source/rscpp/cpp3.c | 16 rsc/source/rscpp/cpp4.c | 12 ++-- rsc/source/rscpp/cpp6.c |4 ++-- 9 files changed, 52 insertions(+), 37 deletions(-) New commits: commit 982fcf11b763ac1b4cd2b68291ea7d94fe14752d Author: Norbert ThiebaudDate: Sun Mar 13 11:50:41 2016 -0500 Revert "tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals" This reverts commit 0c3ff8ca07265304f9ea0a7aca8c83703cff01a1. that was breaking debug and dbgutil build on windows (at least) Change-Id: Ide58bd4551029bb4e1ef791bb65ad191fbb25cae diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index 7f135be..2c253e8 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -83,6 +83,9 @@ OString RscTypCont::ChangeLanguage(const OString& rNewLang) if (bAppendEnUsFallback) aFallbacks.push_back( "en-US"); +#if OSL_DEBUG_LEVEL > 1 +fprintf( stderr, "RscTypCont::ChangeLanguage: " ); +#endif aLangFallbacks.clear(); @@ -96,11 +99,15 @@ OString RscTypCont::ChangeLanguage(const OString& rNewLang) AddLanguage( aLang.getStr() ); nID = GetLangId( aLang ); } -SAL_INFO("rsc", "RscTypCont::ChangeLanguage: '" << -aLang << "' (0x" << std::hex << nID << ") (" << (bAdd ? "added" : "exists")); +#if OSL_DEBUG_LEVEL > 1 +fprintf( stderr, " '%s' (0x%hx) (%s)", aLang.getStr(), (int)nID, (bAdd ? "added" : "exists") ); +#endif aLangFallbacks.push_back( nID); } +#if OSL_DEBUG_LEVEL > 1 +fprintf( stderr, "\n" ); +#endif return aRet; } diff --git a/rsc/source/prj/gui.cxx b/rsc/source/prj/gui.cxx index f95f469..3a0f060 100644 --- a/rsc/source/prj/gui.cxx +++ b/rsc/source/prj/gui.cxx @@ -42,7 +42,9 @@ static RscVerbosity lcl_determineVerbosity( int argc, char ** argv ) int rsc2_main( int argc, char **argv ) { -SAL_WARN("rsc", "debugging " << argv[0]); +#if OSL_DEBUG_LEVEL > 1 +fprintf( stderr, "debugging %s\n", argv[0] ); +#endif ERRTYPE aError; diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index e4e9a83..6d663a2 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -96,7 +96,9 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) i = 1; while( ppStr && i < (aCmdLine.GetCount() -1) ) { -SAL_INFO("rsc", "CmdLineArg: \"" << *ppStr << "\""); +#if OSL_DEBUG_LEVEL > 1 +fprintf( stderr, "CmdLineArg: \"%s\"\n", *ppStr ); +#endif if (strcmp(*ppStr, "-isystem") == 0) { // ignore "-isystem" and following arg @@ -773,7 +775,9 @@ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile, bFile = aFS.isRegular(); } -SAL_INFO("rsc", "Searching image: " << aSysPath); +#if OSL_DEBUG_LEVEL > 1 +fprintf( stderr, "Searching image: %s\n", aSysPath.getStr() ); +#endif if( bFile ) { @@ -808,7 +812,9 @@ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile, fprintf( pSysListFile, "%s\n", rContext.pCmdLine->substitutePaths( aSysPath ).getStr() ); } -SAL_INFO("rsc", "ImagePath to add: " << rImagePath); +#if OSL_DEBUG_LEVEL > 1 +fprintf( stderr, "ImagePath to add: %s\n", rImagePath.getStr() ); +#endif } ++aDirIter; diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h index fb7ff4d..0114c29 100644 --- a/rsc/source/rscpp/cpp.h +++ b/rsc/source/rscpp/cpp.h @@ -28,7 +28,7 @@ /* in cpp1.c: file-pointer auf stdout oder file */ extern FILE* pCppOut; /* BP */ #define PUTCHAR( d ) fprintf( pCppOut, "%c", (d) )/* BP */ -#if OSL_DEBUG_LEVEL > 0 +#if OSL_DEBUG_LEVEL > 1 extern FILE* pDefOut; /* ER */ #ifdef EVALDEFS #define NEVALBUF2048 @@ -228,7 +228,7 @@ extern char*magic[];/* Magic predefined symbols */ extern FILEINFO* infile;/* Current input file */ extern char work[NWORK + 1];/* #define scratch */ extern char*workp; /* Free space in work */ -#if OSL_DEBUG_LEVEL > 0 +#if OSL_DEBUG_LEVEL > 1 extern int debug; /* Debug level */ /* ER dump & evaluate #define's */ extern int bDumpDefs; /* TRUE if #define's dump req. */ @@ -269,7 +269,7 @@ void InitCpp6( void ); void output( int c ); void sharp( void ); void cppmain( void ); -#if OSL_DEBUG_LEVEL > 0 +#if
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rscdb.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit bc573d62203d6001fac95d93107cd181882b5cf2 Author: Caolán McNamaraDate: Sat Mar 12 21:10:05 2016 + WaE: loplugin:stringconcat Change-Id: I28a106e978cdfd70847737784f9bff6ae365fda7 diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index dbf0a54..7f135be 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -96,8 +96,8 @@ OString RscTypCont::ChangeLanguage(const OString& rNewLang) AddLanguage( aLang.getStr() ); nID = GetLangId( aLang ); } -SAL_INFO("rsc", "RscTypCont::ChangeLanguage: " << -"'" << aLang << "'" << " (0x" << std::hex << nID << ") (" << (bAdd ? "added" : "exists")); +SAL_INFO("rsc", "RscTypCont::ChangeLanguage: '" << +aLang << "' (0x" << std::hex << nID << ") (" << (bAdd ? "added" : "exists")); aLangFallbacks.push_back( nID); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rscdb.cxx | 11 ++- rsc/source/prj/gui.cxx |4 +--- rsc/source/rsc/rsc.cxx | 12 +++- rsc/source/rscpp/cpp.h | 10 +- rsc/source/rscpp/cpp1.c | 14 +++--- rsc/source/rscpp/cpp2.c |6 +++--- rsc/source/rscpp/cpp3.c | 16 rsc/source/rscpp/cpp4.c | 12 ++-- rsc/source/rscpp/cpp6.c |4 ++-- 9 files changed, 37 insertions(+), 52 deletions(-) New commits: commit 0c3ff8ca07265304f9ea0a7aca8c83703cff01a1 Author: Rohan KumarDate: Mon Mar 7 22:56:00 2016 +0530 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals I replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0 conditionals and in some places i used SAL_INFO(..)s Change-Id: I87e2e4d73be22630dbcce6df2650b924cba9f8ec Reviewed-on: https://gerrit.libreoffice.org/23005 Tested-by: Jenkins Reviewed-by: Björn Michaelsen diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index 2c253e8..dbf0a54 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -83,9 +83,6 @@ OString RscTypCont::ChangeLanguage(const OString& rNewLang) if (bAppendEnUsFallback) aFallbacks.push_back( "en-US"); -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "RscTypCont::ChangeLanguage: " ); -#endif aLangFallbacks.clear(); @@ -99,15 +96,11 @@ OString RscTypCont::ChangeLanguage(const OString& rNewLang) AddLanguage( aLang.getStr() ); nID = GetLangId( aLang ); } -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, " '%s' (0x%hx) (%s)", aLang.getStr(), (int)nID, (bAdd ? "added" : "exists") ); -#endif +SAL_INFO("rsc", "RscTypCont::ChangeLanguage: " << +"'" << aLang << "'" << " (0x" << std::hex << nID << ") (" << (bAdd ? "added" : "exists")); aLangFallbacks.push_back( nID); } -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "\n" ); -#endif return aRet; } diff --git a/rsc/source/prj/gui.cxx b/rsc/source/prj/gui.cxx index 3a0f060..f95f469 100644 --- a/rsc/source/prj/gui.cxx +++ b/rsc/source/prj/gui.cxx @@ -42,9 +42,7 @@ static RscVerbosity lcl_determineVerbosity( int argc, char ** argv ) int rsc2_main( int argc, char **argv ) { -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "debugging %s\n", argv[0] ); -#endif +SAL_WARN("rsc", "debugging " << argv[0]); ERRTYPE aError; diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 6d663a2..e4e9a83 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -96,9 +96,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) i = 1; while( ppStr && i < (aCmdLine.GetCount() -1) ) { -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "CmdLineArg: \"%s\"\n", *ppStr ); -#endif +SAL_INFO("rsc", "CmdLineArg: \"" << *ppStr << "\""); if (strcmp(*ppStr, "-isystem") == 0) { // ignore "-isystem" and following arg @@ -775,9 +773,7 @@ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile, bFile = aFS.isRegular(); } -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "Searching image: %s\n", aSysPath.getStr() ); -#endif +SAL_INFO("rsc", "Searching image: " << aSysPath); if( bFile ) { @@ -812,9 +808,7 @@ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile, fprintf( pSysListFile, "%s\n", rContext.pCmdLine->substitutePaths( aSysPath ).getStr() ); } -#if OSL_DEBUG_LEVEL > 1 -fprintf( stderr, "ImagePath to add: %s\n", rImagePath.getStr() ); -#endif +SAL_INFO("rsc", "ImagePath to add: " << rImagePath); } ++aDirIter; diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h index 0114c29..fb7ff4d 100644 --- a/rsc/source/rscpp/cpp.h +++ b/rsc/source/rscpp/cpp.h @@ -28,7 +28,7 @@ /* in cpp1.c: file-pointer auf stdout oder file */ extern FILE* pCppOut; /* BP */ #define PUTCHAR( d ) fprintf( pCppOut, "%c", (d) )/* BP */ -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 extern FILE* pDefOut; /* ER */ #ifdef EVALDEFS #define NEVALBUF2048 @@ -228,7 +228,7 @@ extern char*magic[];/* Magic predefined symbols */ extern FILEINFO* infile;/* Current input file */ extern char work[NWORK + 1];/* #define scratch */ extern char*workp; /* Free space in work */ -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 extern int debug; /* Debug level */ /* ER dump & evaluate #define's */ extern int bDumpDefs; /* TRUE if #define's
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp4.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 05642b446c39c1551d2d703be18158c7ae0f0c36 Author: Stephan BergmannDate: Tue Feb 2 12:39:26 2016 +0100 -Werror,-Wconstant-conversion (from 255 to -1) Change-Id: I9cce09bf729398a475d9d07fdfa002f325611546 diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c index 5d1cf7d..98ec8a3 100644 --- a/rsc/source/rscpp/cpp4.c +++ b/rsc/source/rscpp/cpp4.c @@ -277,7 +277,7 @@ void stparmscan(int delim) { #ifdef SOLAR *wp++ = DEL; -*wp++ = MAC_PARM + PAR_MAC; /* Stuff a magic marker */ +*wp++ = (char)(MAC_PARM + PAR_MAC); /* Stuff a magic marker */ *wp++ = (char)(i + MAC_PARM); /* Make a formal marker */ *wp = wp[-4]; /* Add on closing quote */ workp = wp + 1; /* Reset string end */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp4.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit 4120449c863c7ec01f5098f04be1af15a326a5b2 Author: Stephan BergmannDate: Tue Feb 2 13:39:40 2016 +0100 Compiler warning battle ...where 05642b446c39c1551d2d703be18158c7ae0f0c36 "-Werror,-Wconstant-conversion (from 255 to -1)" caused MSVC to counter with "warning C4310: cast truncates constant value" Change-Id: I7d80825a01e49817d7989e00774fed1f162dea85 diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c index 98ec8a3..eab7b15 100644 --- a/rsc/source/rscpp/cpp4.c +++ b/rsc/source/rscpp/cpp4.c @@ -277,7 +277,14 @@ void stparmscan(int delim) { #ifdef SOLAR *wp++ = DEL; -*wp++ = (char)(MAC_PARM + PAR_MAC); /* Stuff a magic marker */ +#if defined __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wconstant-conversion" +#endif +*wp++ = MAC_PARM + PAR_MAC; /* Stuff a magic marker */ +#if defined __clang__ +#pragma clang diagnostic pop +#endif *wp++ = (char)(i + MAC_PARM); /* Make a formal marker */ *wp = wp[-4]; /* Add on closing quote */ workp = wp + 1; /* Reset string end */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp5.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit dfff9522bdd892c140a5b76ed7562df983f99246 Author: Stephan BergmannDate: Mon Oct 26 08:53:09 2015 +0100 -Werror,-Wformat Change-Id: I9668268f15fbcd4af7432d4d0d403b74263fbb18 diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c index 1f73ff3..f383ab8 100644 --- a/rsc/source/rscpp/cpp5.c +++ b/rsc/source/rscpp/cpp5.c @@ -241,7 +241,7 @@ again: else { #ifdef DEBUG_EVAL -fprintf( pCppOut, "pushing %d onto value stack[%u]\n", +fprintf( pCppOut, "pushing %d onto value stack[%td]\n", evalue, valp - value); #endif *valp++ = evalue; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source solenv/gbuild
rsc/source/rscpp/cpp.h |2 +- rsc/source/rscpp/cpp6.c|2 +- solenv/gbuild/platform/com_MSC_defs.mk |3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) New commits: commit 7a77d77effdace1b234062dd7bb035026c893a8b Author: Stephan BergmannDate: Fri Sep 18 11:16:54 2015 +0200 Use a C99 flexible array member ...so the following strcpy does not cause a false abort under _FORTIFY_SOURCE=2 Change-Id: I395136f11020064766db76f87ed8f5b01c083c3a Reviewed-on: https://gerrit.libreoffice.org/18681 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h index 1f88f7b..d0432ed 100644 --- a/rsc/source/rscpp/cpp.h +++ b/rsc/source/rscpp/cpp.h @@ -162,7 +162,7 @@ typedef struct defbuf char* repl; /* -> replacement */ int hash; /* Symbol table hash*/ int nargs; /* For define(args) */ -charname[1];/* #define name */ +charname[]; /* #define name */ } DEFBUF; /* diff --git a/rsc/source/rscpp/cpp6.c b/rsc/source/rscpp/cpp6.c index 74340dd..3678caa 100644 --- a/rsc/source/rscpp/cpp6.c +++ b/rsc/source/rscpp/cpp6.c @@ -613,7 +613,7 @@ DEFBUF* defendel(char* name, int delete) } if (!delete) { -dp = (DEFBUF*) getmem(sizeof (DEFBUF) + size); +dp = (DEFBUF*) getmem(sizeof (DEFBUF) + size + 1); dp->link = *prevp; *prevp = dp; dp->hash = nhash; diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk index ab67e64..be9d923 100644 --- a/solenv/gbuild/platform/com_MSC_defs.mk +++ b/solenv/gbuild/platform/com_MSC_defs.mk @@ -81,6 +81,8 @@ gb_AFLAGS := $(AFLAGS) # C4189: 'identifier' : local variable is initialized but not referenced +# C4200: nonstandard extension used : zero-sized array in struct/union + # C4201: nonstandard extension used : nameless struct/union # C4242: 'identifier' : conversion from 'type1' to 'type2', possible @@ -150,6 +152,7 @@ gb_CFLAGS := \ $(if $(filter 0,$(gb_DEBUGLEVEL)),-wd4100) \ -wd4127 \ $(if $(filter 0,$(gb_DEBUGLEVEL)),-wd4189) \ + -wd4200 \ -wd4242 \ -wd4244 \ -wd4251 \ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rscdb.cxx | 56 +++--- rsc/source/parser/rscicpx.cxx | 167 -- rsc/source/parser/rscinit.cxx | 28 +++ rsc/source/parser/rsclex.cxx | 32 rsc/source/parser/rscpar.cxx | 14 +-- rsc/source/res/rscclass.cxx | 56 ++ rsc/source/res/rsccont.cxx| 16 ++-- rsc/source/res/rscmgr.cxx | 27 +++--- rsc/source/res/rscrange.cxx |2 rsc/source/res/rscstr.cxx |8 +- rsc/source/rsc/rsc.cxx| 40 +- rsc/source/tools/rscdef.cxx | 29 +++ rsc/source/tools/rsctree.cxx | 17 ++-- 13 files changed, 242 insertions(+), 250 deletions(-) New commits: commit 894151e80f27c84113b571dda3479ad4b2525686 Author: Lucas Satabin lucas.sata...@gnieh.org Date: Tue Aug 25 22:31:58 2015 +0200 tdf#39468: Translate German comments in core/rsc/source Change-Id: Ia2d94a88d217a3b0ec9c78096b8d74a38216fbc9 Reviewed-on: https://gerrit.libreoffice.org/18066 Tested-by: Jenkins c...@libreoffice.org Reviewed-by: Thorsten Behrens thorsten.behr...@cib.de diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index f58ff3e..42aa6da 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -61,7 +61,7 @@ RscTypCont :: RscTypCont( RscError * pErrHdl, , nFlags( nFlagsP ) { nUniqueId = 256; -nPMId = RSC_VERSIONCONTROL +1; //mindestens einen groesser +nPMId = RSC_VERSIONCONTROL +1; // at least one more pEH = pErrHdl; Init(); } @@ -168,13 +168,13 @@ void Pre_dtorTree( RscTop * pRscTop ) RscTypCont :: ~RscTypCont() { -// Alle Unterbaeume loeschen +// delete all subtrees aVersion.pClass-Destroy( aVersion ); rtl_freeMemory( aVersion.pData ); DestroySubTrees( pRoot ); -// Alle Klassen noch gueltig, jeweilige Instanzen freigeben -// BasisTypen +// all classes are still valid, destroy each instance +// of base types for ( size_t i = 0, n = aBaseLst.size(); i n; ++i ) aBaseLst[ i ]-Pre_dtor(); @@ -188,10 +188,10 @@ RscTypCont :: ~RscTypCont() aString.Pre_dtor(); aWinBits.Pre_dtor(); aVersion.pClass-Pre_dtor(); -// Zusammengesetzte Typen +// sub-types Pre_dtorTree( pRoot ); -// Klassen zerstoeren +// destroy classes delete aVersion.pClass; DestroyTree( pRoot ); @@ -216,9 +216,9 @@ void RscTypCont::ClearSysNames() RscTop * RscTypCont::SearchType( Atom nId ) { -/* [Beschreibung] +/* [Description] -Sucht eine Basistyp nId; +Search for base type nId; */ if( nId == InvalidAtom ) return NULL; @@ -343,10 +343,10 @@ class RscEnumerateObj { friend class RscEnumerateRef; private: -ERRTYPE aError; // Enthaelt den ersten Fehler +ERRTYPE aError; // contains the first field RscTypCont* pTypCont; -FILE * fOutput;// AusgabeDatei -sal_uLong lFileKey; // Welche src-Datei +FILE * fOutput;// output file +sal_uLong lFileKey; // what source file RscTop *pClass; DECL_LINK( CallBackWriteRc, ObjNode * ); @@ -397,45 +397,45 @@ IMPL_LINK( RscEnumerateObj, CallBackWriteSrc, ObjNode *, pObjNode ) void RscEnumerateObj :: WriteRcFile( RscWriteRc rMem, FILE * fOut ) { -// Definition der Struktur, aus denen die Resource aufgebaut ist +// structure definition from which the resource is built /* struct RSHEADER_TYPE{ -sal_uInt32 nId;// Identifier der Resource -sal_uInt32 nRT;// Resource Typ -sal_uInt32 nGlobOff; // Globaler Offset -sal_uInt32 nLocalOff; // Lokaler Offset +sal_uInt32 nId;// resource identifier +sal_uInt32 nRT;// resource type +sal_uInt32 nGlobOff; // global offset +sal_uInt32 nLocalOff; // local offset } aHeader; */ sal_uInt32 nId = rMem.GetLong( 0 ); sal_uInt32 nRT = rMem.GetLong( 4 ); -// Tabelle wird entsprechend gefuellt +// table is filled with with nId and nRT pTypCont-PutTranslatorKey( (sal_uInt64(nRT) 32) + sal_uInt64(nId) ); if( nRT == RSC_VERSIONCONTROL ) -{ // kommt immmer als letztes +{ // always comes last sal_Int32 nCount = pTypCont-aIdTranslator.size(); -// groesse der Tabelle +// table size sal_uInt32 nSize = (nCount * (sizeof(sal_uInt64)+sizeof(sal_Int32))) + sizeof(sal_Int32); -rMem.Put( nCount ); //Anzahl speichern +rMem.Put( nCount ); // save the count for( std::map sal_uInt64, sal_uLong ::const_iterator it = pTypCont-aIdTranslator.begin(); it != pTypCont-aIdTranslator.end(); ++it ) { -// Schluessel schreiben +// save the key rMem.Put( it-first ); -// Objekt Id oder Position schreiben +
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp.h |4 ++-- rsc/source/rscpp/cpp4.c |4 ++-- rsc/source/rscpp/cpp6.c |9 + 3 files changed, 9 insertions(+), 8 deletions(-) New commits: commit 4bcfde41e7b854769f7db7412749d7f0f9ad977e Author: David Ostrovsky da...@ostrovsky.org Date: Sun Feb 8 04:27:11 2015 +0100 Werror: data lost during conversion from size_t to int Change-Id: Iee080b89cf0588c8076ef4c0334d36a7aefce44d Reviewed-on: https://gerrit.libreoffice.org/14374 Tested-by: Michael Stahl mst...@redhat.com Reviewed-by: Michael Stahl mst...@redhat.com diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h old mode 100644 new mode 100755 index af579fe..c942141 --- a/rsc/source/rscpp/cpp.h +++ b/rsc/source/rscpp/cpp.h @@ -336,8 +336,8 @@ int scanstring( int c, void (*outfun)( int c ) ); void scannumber( int c, void (*outfun)( int c ) ); void save( int c ); char* savestring( char* text ); -FILEINFO* getfile( int bufsize, char* name ); -char *getmem( int size ); +FILEINFO* getfile( size_t bufsize, char* name ); +char *getmem( size_t size ); DEFBUF* lookid( int c ); DEFBUF* defendel( char* name, int delete ); void dunpdef( char* why ); diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c old mode 100644 new mode 100755 index 034c012..03f3560 --- a/rsc/source/rscpp/cpp4.c +++ b/rsc/source/rscpp/cpp4.c @@ -320,7 +320,7 @@ void doundef() */ void textput(char* text) { -int size; +size_t size; size = strlen(text) + 1; if ((parmp + size) = parm[NPARMWORK]) @@ -531,7 +531,7 @@ FILE_LOCAL void expstuff(DEFBUF* tokenp) int c; /* Current character*/ char* inp; /* - repl string */ char* defp; /* - macro output buff */ -int size; /* Actual parm. size*/ +size_t size; /* Actual parm. size*/ char* defend; /* - output buff end */ int string_magic; /* String formal hack */ FILEINFO* file; /* Funny #include */ diff --git a/rsc/source/rscpp/cpp6.c b/rsc/source/rscpp/cpp6.c old mode 100644 new mode 100755 index 6905612..9444b72 --- a/rsc/source/rscpp/cpp6.c +++ b/rsc/source/rscpp/cpp6.c @@ -485,7 +485,8 @@ char* savestring(char* text) { char* result; -result = getmem(strlen(text) + 1); +size_t size = strlen(text) + 1; +result = getmem(size); strcpy(result, text); return (result); } @@ -493,10 +494,10 @@ char* savestring(char* text) /* * Common FILEINFO buffer initialization for a new file or macro. */ -FILEINFO* getfile(int bufsize, char* name) +FILEINFO* getfile(size_t bufsize, char* name) { FILEINFO* file; -int size; +size_t size; size = strlen(name);/* File/macro name */ file = (FILEINFO*) getmem(sizeof (FILEINFO) + bufsize + size); @@ -518,7 +519,7 @@ FILEINFO* getfile(int bufsize, char* name) /* * Get a block of free memory. */ -char* getmem(int size) +char* getmem(size_t size) { char* result; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rscdb.cxx |9 +++-- rsc/source/prj/start.cxx|6 ++ rsc/source/rsc/rsc.cxx |6 ++ rsc/source/tools/rscdef.cxx | 11 +++ 4 files changed, 10 insertions(+), 22 deletions(-) New commits: commit 5712983f18e7cdec16ea20a9b3d94a1586de543e Author: Michael Weghorn m.wegh...@posteo.de Date: Fri Dec 19 10:24:04 2014 +0100 fdo#39440 rsc: reduce scope of local variables This addresses some cppcheck warnings. Change-Id: I69454a75c8ce4aecf9e68f5887f38f8bf6fe6dca Reviewed-on: https://gerrit.libreoffice.org/13543 Reviewed-by: Noel Grandin noelgran...@gmail.com Tested-by: Noel Grandin noelgran...@gmail.com diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index 25d78f66..6af2194 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -329,18 +329,15 @@ void RscTypCont :: WriteInc( FILE * fOutput, sal_uLong lFileKey ) } else { -RscDepend * pDep; -RscFile * pFile; - RscFile * pFName = aFileTab.Get( lFileKey ); if( pFName ) { for ( size_t i = 0, n = pFName-aDepLst.size(); i n; ++i ) { -pDep = pFName-aDepLst[ i ]; +RscDepend* pDep = pFName-aDepLst[ i ]; if( pDep-GetFileKey() != lFileKey ) { -pFile = aFileTab.GetFile( pDep-GetFileKey() ); +RscFile* pFile = aFileTab.GetFile( pDep-GetFileKey() ); if( pFile ) { fprintf( fOutput, #include ); @@ -525,7 +522,6 @@ ERRTYPE RscTypCont::WriteRc( WriteRcContext rContext ) void RscTypCont :: WriteSrc( FILE * fOutput, sal_uLong nFileKey, bool bName ) { -RscFile * pFName; RscEnumerateRef aEnumRef( this, pRoot, fOutput ); unsigned char aUTF8BOM[3] = { 0xef, 0xbb, 0xbf }; @@ -534,6 +530,7 @@ void RscTypCont :: WriteSrc( FILE * fOutput, sal_uLong nFileKey, SAL_WARN_IF(!bSuccess, rsc, short write); if( bName ) { +RscFile* pFName; WriteInc( fOutput, nFileKey ); if( NOFILE_INDEX == nFileKey ) diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx index d42f0d8..fd2de94 100644 --- a/rsc/source/prj/start.cxx +++ b/rsc/source/prj/start.cxx @@ -157,7 +157,6 @@ static bool CallRsc2( RscStrList * pInputList, const OString rSrsName, RscPtrPtr * pCmdLine ) { int nRet; -OString* pString; RscVerbosity eVerbosity = RscVerbosityNormal; RscPtrPtr aNewCmdL; @@ -196,7 +195,7 @@ static bool CallRsc2( RscStrList * pInputList, for ( size_t i = 0, n = pInputList-size(); i n; ++i ) { -pString = (*pInputList)[ i ]; +OString* pString = (*pInputList)[ i ]; aNewCmdL.Append( rsc_strdup( pString-getStr() ) ); } @@ -231,7 +230,6 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) char ** ppStr; RscPtrPtr aCmdLine; // Kommandozeile sal_uInt32 i; -OString*pString; pStr = ::ResponseFile( aCmdLine, argv, argc ); if( pStr ) @@ -314,7 +312,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) for ( size_t k = 0, n = aInputList.size(); k n; ++k ) { -pString = aInputList[ k ]; +OString* pString = aInputList[ k ]; aTmpName = ::GetTmpFileName(); if( !CallPrePro( *pString, aTmpName, aCmdLine, bResponse ) ) { diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 4b48405..3a2115b 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -390,7 +390,6 @@ void RscCompiler::EndCompile() if( !(pCL-nCommands NOSYNTAX_FLAG) ) { FILE* foutput; -RscFile * pFN; if( NULL == (foutput = fopen( pCL-aOutputSrs.getStr(), w )) ) pTC-pEH-FatalError( ERR_OPENFILE, RscId(), pCL-aOutputSrs.getStr() ); @@ -400,7 +399,7 @@ void RscCompiler::EndCompile() sal_uIntPtr aIndex = pTC-aFileTab.FirstIndex(); while( aIndex != UNIQUEINDEX_ENTRY_NOTFOUND ) { -pFN = pTC-aFileTab.Get( aIndex ); +RscFile* pFN = pTC-aFileTab.Get( aIndex ); if( !pFN-IsIncFile() ) { pTC-WriteSrc( foutput, NOFILE_INDEX, false ); @@ -476,14 +475,13 @@ ERRTYPE RscCompiler :: ParseOneFile( sal_uLong lFileKey, aError = ERR_ERROR; else if( !pFName-bLoaded ) { -RscDepend * pDep; //Include-Dateien vorher lesen pFName-bLoaded = true; //Endlos Rekursion vermeiden for ( size_t i = 0; i pFName-aDepLst.size() aError.IsOk(); ++i ) { -pDep = pFName-aDepLst[ i ]; +RscDepend* pDep = pFName-aDepLst[ i ]; aError =
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp2.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 59accebda6a29307d8be9bc9be0c9fab141b4148 Author: Stephan Bergmann sberg...@redhat.com Date: Mon Oct 6 18:15:54 2014 +0200 warning C4101: unreferenced local variable Change-Id: I526e68b93f9665db25a824cc44ff231bcef29277 diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c index f082275..a0f3433 100644 --- a/rsc/source/rscpp/cpp2.c +++ b/rsc/source/rscpp/cpp2.c @@ -415,8 +415,6 @@ FILE_LOCAL int openinclude(char* filename, int searchlocal) { char** incptr; char tmpname[NFWORK]; /* Filename work area */ -int len; -int len2; if (searchlocal) { @@ -431,8 +429,8 @@ FILE_LOCAL int openinclude(char* filename, int searchlocal) if (filename[0] != '/' hasdirectory(infile-filename, tmpname, NFWORK)) { -len = strlen(tmpname); -len2 = strlen(filename); +int len = strlen(tmpname); +int len2 = strlen(filename); if(len + len2 NFWORK) { memcpy(tmpname + len, filename, len2); @@ -445,7 +443,7 @@ FILE_LOCAL int openinclude(char* filename, int searchlocal) } else { -len = strlen(filename); +int len = strlen(filename); if(len NFWORK) { memcpy(tmpname, filename, len); @@ -534,6 +532,8 @@ FILE_LOCAL int hasdirectory(char* source, char* result, int max) */ char* tp; +(void)max; + if ((tp = strrchr(source, ']')) == NULL (tp = strrchr(source, ':')) == NULL) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp.h|8 +--- rsc/source/rscpp/cpp5.c | 15 --- rsc/source/rscpp/cpp6.c | 39 --- rsc/source/rscpp/cppdef.h |4 4 files changed, 5 insertions(+), 61 deletions(-) New commits: commit 552adfbbc6b3508eaed284675d1d76480598142c Author: Norbert Thiebaud nthieb...@gmail.com Date: Sat Oct 4 12:37:40 2014 -0500 we really do not care about ebcdic do we ? Change-Id: I1a2d8628fc2b1fe21e77019f12dc2a8adab877ed diff --git a/rsc/source/rscpp/cpp.h b/rsc/source/rscpp/cpp.h index e12ec0b..8cc28f9 100644 --- a/rsc/source/rscpp/cpp.h +++ b/rsc/source/rscpp/cpp.h @@ -50,17 +50,11 @@ extern FILE* pDefOut; /* ER */ #define TOK_SEP 0x1E/* Token concatenation delim. */ #define COM_SEP 0x1F/* Magic comment separator */ -#ifdef EBCDIC -#define HT 0x05/* horizontal tab */ -#define NL 0x15/* new line */ -#define CR 0x0D/* carriage return */ -#define DEL 0x07 -#else #define HT 0x09/* horizontal tab */ #define NL 0x0A/* new line */ #define CR 0x0D/* carriage return */ #define DEL 0x7F -#endif + #ifdef SOLAR diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c index 6ccafe0..d7bd98c 100644 --- a/rsc/source/rscpp/cpp5.c +++ b/rsc/source/rscpp/cpp5.c @@ -666,13 +666,10 @@ FILE_LOCAL int evalnum(int c) c1 = c; if (isascii(c) isupper(c1)) c1 = tolower(c1); -#ifdef EBCDIC -if (c1 = 'f') -#else -if (c1 = 'a') -#endif -c1 -= ('a' - 10); -else c1 -= '0'; +if (c1 = 'a') +c1 -= ('a' - 10); +else +c1 -= '0'; if (c1 0 || c1 = base) break; value *= base; @@ -744,11 +741,7 @@ FILE_LOCAL int evalchar(int skip) (--count = 0)) { value *= 16; -#ifdef EBCDIC -value += (c = '9') ? (c - '0') : ((c 0xF) + 9); -#else value += (c = '0') ? (c - '0') : ((c 0xF) + 9); -#endif } unget(); break; diff --git a/rsc/source/rscpp/cpp6.c b/rsc/source/rscpp/cpp6.c index a024e77..6905612 100644 --- a/rsc/source/rscpp/cpp6.c +++ b/rsc/source/rscpp/cpp6.c @@ -89,44 +89,6 @@ #define DOL LET -#ifdef EBCDIC - -char type[256] = { /* Character type codesHex */ - END, 000, 000, 000, 000, SPA, 000, 000, /* 00 */ - 000, 000, 000, 000, 000, 000, 000, 000, /* 08 */ - 000, 000, 000, 000, 000, 000, 000, 000, /* 10 */ - 000, 000, 000, 000, 000, LET, 000, SPA, /* 18 */ - 000, 000, 000, 000, 000, 000, 000, 000, /* 20 */ - 000, 000, 000, 000, 000, 000, 000, 000, /* 28 */ - 000, 000, 000, 000, 000, 000, 000, 000, /* 30 */ - 000, 000, 000, 000, 000, 000, 000, 000, /* 38 */ - SPA, 000, 000, 000, 000, 000, 000, 000, /* 40 */ - 000, 000, 000, DOT, OP_LT,OP_LPA,OP_ADD, OP_OR, /* 48.(+| */ -OP_AND, 000, 000, 000, 000, 000, 000, 000, /* 50 */ - 000, 000,OP_NOT, DOL,OP_MUL,OP_RPA, 000,OP_XOR, /* 58 !$*);^ */ -OP_SUB,OP_DIV, 000, 000, 000, 000, 000, 000, /* 60 -/ */ - 000, 000, 000, 000,OP_MOD, LET, OP_GT,OP_QUE, /* 68,%_? */ - 000, 000, 000, 000, 000, 000, 000, 000, /* 70 */ - 000, 000,OP_COL, 000, 000, QUO, OP_EQ, QUO, /* 78 `:#@'= */ - 000, LET, LET, LET, LET, LET, LET, LET, /* 80 abcdefg */ - LET, LET, 000, 000, 000, 000, 000, 000, /* 88 hi */ - 000, LET, LET, LET, LET, LET, LET, LET, /* 90 jklmnop */ - LET, LET, 000, 000, 000, 000, 000, 000, /* 98 qr */ - 000,OP_NOT, LET, LET, LET, LET, LET, LET, /* A0 ~stuvwx */ - LET, LET, 000, 000, 000, 000, 000, 000, /* A8 yz [ */ - 000, 000, 000, 000, 000, 000, 000, 000, /* B0 */ - 000, 000, 000, 000, 000, 000, 000, 000, /* B8 ] */ - 000, LET, LET, LET, LET, LET, LET, LET, /* C0 {ABCDEFG */ - LET, LET, 000, 000, 000, 000, 000, 000, /* C8 HI */ - 000, LET, LET, LET, LET, LET, LET, LET, /* D0 }JKLMNOP */ - LET, LET, 000, 000, 000, 000, 000, 000, /* D8 QR */ - BSH, 000, LET, LET, LET, LET, LET, LET, /* E0 \ STUVWX */ - LET, LET, 000, 000, 000, 000, 000, 000, /* E8 YZ */ -
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp1.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b870ecd6c4fdf789322986f9f2cdc567f6401f22 Author: Stephan Bergmann sberg...@redhat.com Date: Fri Sep 19 09:01:30 2014 +0200 warning C4701: potentially uninitialized local variable Change-Id: I163033dc6f1fa17a96cb9da18f73ef8cdd367f00 diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c index 9f18dc4..7f2dce1 100644 --- a/rsc/source/rscpp/cpp1.c +++ b/rsc/source/rscpp/cpp1.c @@ -234,7 +234,7 @@ int MAIN(int argc, char** argv) { inti; char** useargv = 0; -char** pfargv; +char** pfargv = NULL; if( nRunde == 0 ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/prj/start.cxx | 17 + rsc/source/rscpp/cpp3.c | 14 +- 2 files changed, 18 insertions(+), 13 deletions(-) New commits: commit d75049f9785db101d6ecb043a4576652b71da2a7 Author: Stephan Bergmann sberg...@redhat.com Date: Fri Jun 27 14:04:39 2014 +0200 rsc: fix how -isystem args are filtered out for the preproc Change-Id: I7688f3d68be99362e79304bbac041424eee6347a diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx index 7c7cc32..7c926f0 100644 --- a/rsc/source/prj/start.cxx +++ b/rsc/source/prj/start.cxx @@ -75,6 +75,23 @@ static bool CallPrePro( const OString rInput, bVerbose = true; continue; } +if (strcmp(static_castchar *(pCmdLine-GetEntry(i)), -isystem) == 0) +{ +// ignore -isystem and following arg +if (i int(pCmdLine-GetCount()) - 1) +{ +++i; +} +continue; +} +if (strncmp( +static_castchar *(pCmdLine-GetEntry(i)), -isystem, +strlen(-isystem)) +== 0) +{ +// ignore args starting with -isystem +continue; +} if ( !rsc_strnicmp( (char *)pCmdLine-GetEntry( i ), -u, 2 ) || !rsc_strnicmp( (char *)pCmdLine-GetEntry( i ), -i, 2 ) || !rsc_strnicmp( (char *)pCmdLine-GetEntry( i ), -d, 2 )) diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index 02361649..287b2a5 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -217,19 +217,7 @@ dooptions(int argc, char** argv) for (i = j = 1; i argc; i++) { arg = ap = argv[i]; -if (strcmp(arg, -isystem) == 0) -{ -// ignore -isystem and following arg -if (i argc) -{ -++i; -} -} -else if (strncmp(arg, -isystem, strlen(-isystem)) == 0) -{ -// ignore args starting with -isystem -} -else if (*ap++ != '-' || *ap == EOS) +if (*ap++ != '-' || *ap == EOS) { argv[j++] = argv[i]; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/prj/start.cxx | 15 ++- rsc/source/rsc/rsc.cxx | 15 ++- rsc/source/rscpp/cpp3.c | 14 +- 3 files changed, 41 insertions(+), 3 deletions(-) New commits: commit 7c5a21dd4142c414de4e5925533e8cfbb6f329b0 Author: Stephan Bergmann sberg...@redhat.com Date: Thu Jun 26 22:32:13 2014 +0200 rsc: ignore -isystem args Change-Id: Ic46b84d740159826542ead857d15230d54547d88 diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx index 46c62a7..7c7cc32 100644 --- a/rsc/source/prj/start.cxx +++ b/rsc/source/prj/start.cxx @@ -235,7 +235,20 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) bool bSetSrs = false; while( ppStr i (aCmdLine.GetCount() -1) ) { -if( '-' == **ppStr ) +if (strcmp(*ppStr, -isystem) == 0) +{ +// ignore -isystem and following arg +if (i aCmdLine.GetCount() - 1) +{ +++ppStr; +++i; +} +} +else if (strncmp(*ppStr, -isystem, strlen(-isystem)) == 0) +{ +// ignore args starting with -isystem +} +else if( '-' == **ppStr ) { if( !rsc_stricmp( (*ppStr) + 1, p ) || !rsc_stricmp( (*ppStr) + 1, l ) ) diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 0fac410..e5a7228 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -100,7 +100,20 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) #if OSL_DEBUG_LEVEL 1 fprintf( stderr, CmdLineArg: \%s\\n, *ppStr ); #endif -if( '-' == **ppStr ) +if (strcmp(*ppStr, -isystem) == 0) +{ +// ignore -isystem and following arg +if (i aCmdLine.GetCount() - 1) +{ +++ppStr; +++i; +} +} +else if (strncmp(*ppStr, -isystem, strlen(-isystem)) == 0) +{ +// ignore args starting with -isystem +} +else if( '-' == **ppStr ) { if( !rsc_stricmp( (*ppStr) + 1, h ) || !strcmp( (*ppStr) + 1, ? ) ) diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index 287b2a5..02361649 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -217,7 +217,19 @@ dooptions(int argc, char** argv) for (i = j = 1; i argc; i++) { arg = ap = argv[i]; -if (*ap++ != '-' || *ap == EOS) +if (strcmp(arg, -isystem) == 0) +{ +// ignore -isystem and following arg +if (i argc) +{ +++i; +} +} +else if (strncmp(arg, -isystem, strlen(-isystem)) == 0) +{ +// ignore args starting with -isystem +} +else if (*ap++ != '-' || *ap == EOS) { argv[j++] = argv[i]; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source soltools/cpp soltools/mkdepend vcl/source
rsc/source/rscpp/cpp1.c |8 ++-- rsc/source/rscpp/cpp2.c | 24 ++-- rsc/source/rscpp/cpp3.c | 34 - rsc/source/rscpp/cpp4.c | 36 +-- rsc/source/rscpp/cpp5.c | 40 ++--- rsc/source/rscpp/cpp6.c | 72 +++--- soltools/cpp/_getopt.c|4 +- soltools/cpp/_lex.c |6 +-- soltools/mkdepend/cppsetup.c | 16 soltools/mkdepend/def.h | 20 +- soltools/mkdepend/include.c | 26 ++--- soltools/mkdepend/main.c | 34 - soltools/mkdepend/parse.c | 44 +++ soltools/mkdepend/pr.c| 22 +-- vcl/source/filter/jpeg/transupp.c |4 +- 15 files changed, 195 insertions(+), 195 deletions(-) New commits: commit 290b7e0632921ca0c204eb91c8ebfd253813f137 Author: Noel Grandin n...@peralex.com Date: Tue Jun 24 07:44:01 2014 +0200 remove use of register keyword in C files C compilers have been ignoring it for the last decade Change-Id: I42918263121dd189bab9d27077798b779b9e8da1 Reviewed-on: https://gerrit.libreoffice.org/9873 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/rsc/source/rscpp/cpp1.c b/rsc/source/rscpp/cpp1.c index 8c03af5..e0ae7f5 100644 --- a/rsc/source/rscpp/cpp1.c +++ b/rsc/source/rscpp/cpp1.c @@ -230,7 +230,7 @@ void InitCpp1() int MAIN(int argc, char** argv) { -register inti; +inti; char **useargv, **pfargv; @@ -383,8 +383,8 @@ void cppmain() * file. */ { -register intc; /* Current character*/ -register intcounter;/* newlines and spaces */ +intc; /* Current character*/ +intcounter;/* newlines and spaces */ /* * Explicitly output a #line at the start of cpp output so @@ -569,7 +569,7 @@ void sharp() * Output a line number line. */ { -register char *name; +char *name; if (keepcomments) /* Make sure # comes on */ PUTCHAR('\n'); /* a fresh, new line. */ diff --git a/rsc/source/rscpp/cpp2.c b/rsc/source/rscpp/cpp2.c index b7224ac..810d823 100644 --- a/rsc/source/rscpp/cpp2.c +++ b/rsc/source/rscpp/cpp2.c @@ -76,10 +76,10 @@ control(int counter) * the end of the previous line if cpp is invoked with the -C option. */ { -register intc; -register char *tp; -register inthash; -char*ep; +intc; +char *tp; +inthash; +char *ep; c = skipws(); if (c == '\n' || c == EOF_CHAR) @@ -319,8 +319,8 @@ void doif(int hash) * suppresses unnecessary warnings. */ { -register intc; -register intfound; +intc; +intfound; if ((c = skipws()) == '\n' || c == EOF_CHAR) { unget(); @@ -370,8 +370,8 @@ void doinclude() * This restriction is unnecessary and not implemented. */ { -register intc; -register intdelim; +intc; +intdelim; #if HOST == SYS_VMS chardef_filename[NAM$C_MAXRSS + 1]; #endif @@ -434,7 +434,7 @@ openinclude(char* filename, int searchlocal) * if openinclude() fails. No error message is printed. */ { -register char **incptr; +char **incptr; #if HOST == SYS_VMS #if NFWORK (NAM$C_MAXRSS + 1) error, NFWORK is not greater than NAM$C_MAXRSS @@ -508,7 +508,7 @@ hasdirectory(char* source, char* result) */ { #if HOST == SYS_UNIX -register char *tp; +char *tp; if ((tp = strrchr(source, '/')) == NULL) return (FALSE); @@ -529,7 +529,7 @@ hasdirectory(char* source, char* result) /* * Random DEC operating system (RSX, RT11, RSTS/E) */ -register char *tp; +char *tp; if ((tp = strrchr(source, ']')) == NULL (tp = strrchr(source, ':')) == NULL) @@ -569,7 +569,7 @@ char*result;/* Size is at least NAM$C_MAXRSS + 1*/ struct FAB fab = cc$rms_fab; /* File access block*/ struct NAM nam = cc$rms_nam; /* File name block */ charfullname[NAM$C_MAXRSS + 1]; -register char *rp;/* Result pointer */ +char*rp;/* Result pointer */ fab.fab$l_nam = nam;
[Libreoffice-commits] core.git: rsc/source
rsc/source/prj/gui.cxx |2 ++ rsc/source/prj/gui.hxx | 29 + rsc/source/prj/start.cxx |3 ++- 3 files changed, 33 insertions(+), 1 deletion(-) New commits: commit b06a6bba31b15287383853b4d9b52575a92b914b Author: Stephan Bergmann sberg...@redhat.com Date: Tue Apr 8 10:10:43 2014 +0200 Clean up function declaration Change-Id: I3c38149f9c99b45170f44f48725087cbe5dba40e diff --git a/rsc/source/prj/gui.cxx b/rsc/source/prj/gui.cxx index a2d321e..f0801a8 100644 --- a/rsc/source/prj/gui.cxx +++ b/rsc/source/prj/gui.cxx @@ -20,6 +20,8 @@ #include stdlib.h #include stdio.h + +#include gui.hxx #include rscrsc.hxx #include rscdb.hxx diff --git a/rsc/source/prj/gui.hxx b/rsc/source/prj/gui.hxx new file mode 100644 index 000..08a11e6 --- /dev/null +++ b/rsc/source/prj/gui.hxx @@ -0,0 +1,29 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_RSC_SOURCE_PRJ_GUI_HXX +#define INCLUDED_RSC_SOURCE_PRJ_GUI_HXX + +#include sal/config.h + +int rsc2_main(int, char**); + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx index 3ad077f..0613982 100644 --- a/rsc/source/prj/start.cxx +++ b/rsc/source/prj/start.cxx @@ -33,6 +33,8 @@ #include dos.h #endif // UNX + +#include gui.hxx #include rsctools.hxx #include rscerror.h #include sal/main.h @@ -44,7 +46,6 @@ extern C { int rscpp_main(int, char**); } -int rsc2_main(int, char**); static bool CallPrePro( const OString rInput, const OString rOutput, RscPtrPtr * pCmdLine, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rscinit.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit f008fe11b7723b9433d208af2b6d9808e3460844 Author: Caolán McNamara caol...@redhat.com Date: Thu Mar 13 14:24:11 2014 + coverity#708798 Unused pointer value Change-Id: Ib27f174b37577a8572fb853a7040de51e95d665e diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index abcc594..60798ab 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -59,7 +59,6 @@ void RscTypCont::Init() RscTupel * pStringLongTupel; RscCont * pStringTupelList; RscCont * pStringLongTupelList; -RscArray * pLangStringTupelList; RscArray * pLangStringLongTupelList; RscTop * pClassMgr; @@ -320,7 +319,7 @@ void RscTypCont::Init() aBaseLst.push_back( pLangStringList = InitLangStringList( pStringList ) ); aBaseLst.push_back( pStringTupel = InitStringTupel() ); aBaseLst.push_back( pStringTupelList = InitStringTupelList( pStringTupel ) ); -aBaseLst.push_back( pLangStringTupelList = InitLangStringTupelList( pStringTupelList ) ); +aBaseLst.push_back( InitLangStringTupelList( pStringTupelList ) ); aBaseLst.push_back( pStringLongTupel = InitStringLongTupel() ); aBaseLst.push_back( pStringLongTupelList = InitStringLongTupelList( pStringLongTupel ) ); aBaseLst.push_back( pLangStringLongTupelList = InitLangStringLongTupelList( pStringLongTupelList ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/rsc/rsc.cxx | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) New commits: commit d33d1e316c2c5ce56be0e931f0c742d00451dc7f Author: Noel Grandin n...@peralex.com Date: Mon Feb 10 11:30:33 2014 +0200 coverity#708799 unused pointer value Change-Id: I141bb64b5e4e2f8624008f12c9551881e91f4fdb diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 576745e..d3c979c 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -421,8 +421,6 @@ ERRTYPE RscCompiler :: IncludeParser( sal_uLong lFileKey ) } else { -RscFile * pFNTmp; -RscDepend * pDep; RscFileInst aFileInst( pTC, lFileKey, lFileKey, finput ); pFName-bScanned = true; @@ -432,14 +430,14 @@ ERRTYPE RscCompiler :: IncludeParser( sal_uLong lFileKey ) // Include-Pfad durchsuchen for ( size_t i = 0, n = pFName-aDepLst.size(); i n; ++i ) { -pDep = pFName-aDepLst[ i ]; -pFNTmp = pTC-aFileTab.GetFile( pDep-GetFileKey() ); +RscDepend * pDep = pFName-aDepLst[ i ]; +pTC-aFileTab.GetFile( pDep-GetFileKey() ); } for ( size_t i = 0, n = pFName-aDepLst.size(); i n; ++i ) { -pDep = pFName-aDepLst[ i ]; -pFNTmp = pTC-aFileTab.GetFile( pDep-GetFileKey() ); +RscDepend * pDep = pFName-aDepLst[ i ]; +RscFile * pFNTmp = pTC-aFileTab.GetFile( pDep-GetFileKey() ); // Kein Pfad und Include Datei if( pFNTmp !pFNTmp-bLoaded ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/prj/gui.cxx | 15 --- 1 file changed, 15 deletions(-) New commits: commit 0937d07cd5bbdc68fcae8127149ffa6c813d3a97 Author: Tor Lillqvist t...@collabora.com Date: Sat Oct 12 21:03:36 2013 +0300 Simpligy: Bin odd atexit crack Change-Id: Ib7e491ae66525b8ba2555b50fe7c9e1fed150987 diff --git a/rsc/source/prj/gui.cxx b/rsc/source/prj/gui.cxx index 4535b56..a2d321e 100644 --- a/rsc/source/prj/gui.cxx +++ b/rsc/source/prj/gui.cxx @@ -23,16 +23,6 @@ #include rscrsc.hxx #include rscdb.hxx -static RscCompiler * pRscCompiler = NULL; -#if defined( UNX ) || defined ( __GNUC__ ) || defined(__MINGW32__) -void ExitProgram( void ){ -#else -void cdecl ExitProgram( void ){ -#endif -if( pRscCompiler ) -delete pRscCompiler; -} - static RscVerbosity lcl_determineVerbosity( int argc, char ** argv ) { for ( int i = 0; i argc; ++i ) @@ -49,9 +39,6 @@ static RscVerbosity lcl_determineVerbosity( int argc, char ** argv ) int rsc2_main( int argc, char **argv ) { -#ifndef UNX -atexit( ExitProgram ); -#endif #if OSL_DEBUG_LEVEL 1 fprintf( stderr, debugging %s\n, argv[0] ); #endif @@ -71,9 +58,7 @@ int rsc2_main( int argc, char **argv ) else{ RscCompiler* pCompiler = new RscCompiler( pCmdLine, pTypCont ); -pRscCompiler = pCompiler; aError = pCompiler-Start(); -pRscCompiler = NULL; delete pCompiler; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source sdext/source sd/source ucb/source
rsc/source/rsc/rsc.cxx |4 ++-- sd/source/filter/ppt/pptinanimations.cxx |2 +- sdext/source/pdfimport/tree/drawtreevisiting.cxx |6 +++--- sdext/source/pdfimport/tree/writertreevisiting.cxx | 10 +- sdext/source/pdfimport/wrapper/wrapper.cxx |2 +- ucb/source/ucp/ftp/ftpurl.cxx |2 +- 6 files changed, 13 insertions(+), 13 deletions(-) New commits: commit 51daa4de4fbb86903aeb9cdfefbb089e8d00c001 Author: Jelle van der Waa je...@vdwaa.nl Date: Sat Jun 22 12:52:31 2013 +0200 fdo#43460 sd,rsc,ucb,sdext: use isEmpty() Change-Id: I7a7a77c26b74078f7fc160fbaa1c8d4e912b844e Reviewed-on: https://gerrit.libreoffice.org/4442 Reviewed-by: Michael Stahl mst...@redhat.com Tested-by: Michael Stahl mst...@redhat.com diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 0ef48b6..aa7a54a 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -155,7 +155,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) { // define include path nCommands |= INCLUDE_FLAG; OStringBuffer aBuffer(aPath); -if (aBuffer.getLength()) +if (!aBuffer.isEmpty()) aBuffer.append(SAL_PATHSEPARATOR); aBuffer.append((*ppStr) + 2); aPath = aBuffer.makeStringAndClear(); @@ -636,7 +636,7 @@ ERRTYPE RscCompiler::Link() do { OString aToken = aSearchPath.getToken( 0, cSearchDelim, nIndex ); -if (aSysSearchPath.getLength()) +if (!aSysSearchPath.isEmpty()) aSysSearchPath.append(cSearchDelim); aSysSearchPath.append(aToken); aSysSearchPath.append(cAccessDelim); diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx index 75b426d..a59b7cb 100644 --- a/sd/source/filter/ppt/pptinanimations.cxx +++ b/sd/source/filter/ppt/pptinanimations.cxx @@ -2555,7 +2555,7 @@ bool AnimationImporter::importAttributeNamesContainer( const Atom* pAtom, OUStri OUString aName; if( aAny = aName ) { -if( aNames.getLength() ) +if( !aNames.isEmpty() ) aNames.append( (sal_Unicode)';' ); aNames.append( aName ); diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx index 5144015..e4f1d66 100644 --- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx +++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx @@ -91,7 +91,7 @@ void DrawXmlEmitter::visit( HyperlinkElement elem, const std::list Element* : void DrawXmlEmitter::visit( TextElement elem, const std::list Element* ::const_iterator ) { -if( ! elem.Text.getLength() ) +if( elem.Text.isEmpty() ) return; OUString strSpace(32); @@ -229,14 +229,14 @@ void DrawXmlEmitter::fillFrameProps( DrawElement rElem, } if( fRotate != 0.0 ) { -if( aBuf.getLength() 0 ) +if( !aBuf.isEmpty() ) aBuf.append( sal_Unicode(' ') ); aBuf.appendAscii( rotate( ); aBuf.append( -fRotate ); aBuf.appendAscii( ) ); } -if( aBuf.getLength() 0 ) +if( !aBuf.isEmpty() ) aBuf.append( sal_Unicode(' ') ); aBuf.appendAscii( translate( ); aBuf.append( convertPixelToUnitString( rel_x ) ); diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx index dcb863e..b36a39b 100644 --- a/sdext/source/pdfimport/tree/writertreevisiting.cxx +++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx @@ -58,7 +58,7 @@ void WriterXmlEmitter::visit( HyperlinkElement elem, const std::list Element* void WriterXmlEmitter::visit( TextElement elem, const std::list Element* ::const_iterator ) { -if( ! elem.Text.getLength() ) +if( elem.Text.isEmpty() ) return; PropertyMap aProps; @@ -169,7 +169,7 @@ void WriterXmlEmitter::fillFrameProps( DrawElement rElem, } if( fRotate != 0.0 ) { -if( aBuf.getLength() 0 ) +if( !aBuf.isEmpty() ) aBuf.append( sal_Unicode(' ') ); aBuf.appendAscii( rotate( ); aBuf.append( -fRotate ); @@ -178,7 +178,7 @@ void WriterXmlEmitter::fillFrameProps( DrawElement rElem, } if( ! rElem.isCharacter ) { -if( aBuf.getLength() 0 ) +if( !aBuf.isEmpty() ) aBuf.append( sal_Unicode(' ') ); aBuf.appendAscii( translate( ); aBuf.append( convertPixelToUnitString( rel_x ) ); @@ -750,9 +750,9 @@ void
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp5.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 96c2986dd46d963dae1c3b9fa3a8f2ebf05e8f65 Author: Julien Nabet serval2...@yahoo.fr Date: Thu May 16 21:57:26 2013 +0200 Quiet cppcheck Change-Id: Ib860b6dc3b7ace5f737d283778827bfb0783b362 diff --git a/rsc/source/rscpp/cpp5.c b/rsc/source/rscpp/cpp5.c index 37b2c11..92587fe 100644 --- a/rsc/source/rscpp/cpp5.c +++ b/rsc/source/rscpp/cpp5.c @@ -640,7 +640,7 @@ evalnum(int c) c = cget(); } if (c == 'u' || c == 'U') /* Unsigned nonsense*/ -c = cget(); +cget(); unget(); return (value); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp3.c |1 + 1 file changed, 1 insertion(+) New commits: commit 039bfd3e517f75cf99eb8eb105d3b83692f6e484 Author: Julien Nabet serval2...@yahoo.fr Date: Wed May 8 00:22:55 2013 +0200 coverity#983096: Resource leak Change-Id: I91c1d505ef0b0eb442bf76e4da66c95fa0e1bb2d Reviewed-on: https://gerrit.libreoffice.org/3818 Reviewed-by: Noel Power noel.po...@suse.com Tested-by: Noel Power noel.po...@suse.com diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index df5a2c7..7dbdef9 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -194,6 +194,7 @@ int AddInclude( char* pIncStr ) *incend++ = pIncPos; pIncPos = strtok( NULL, ; ); } +free(pIncEnv); return( 1 ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/rscpp/cpp3.c |1 - 1 file changed, 1 deletion(-) New commits: commit 56fa2d1bed5b19af79e31db9065f1a05e6202764 Author: Noel Power noel.po...@suse.com Date: Wed May 8 10:48:10 2013 +0100 Revert coverity#983096: Resource leak This reverts commit 039bfd3e517f75cf99eb8eb105d3b83692f6e484. diff --git a/rsc/source/rscpp/cpp3.c b/rsc/source/rscpp/cpp3.c index 7dbdef9..df5a2c7 100644 --- a/rsc/source/rscpp/cpp3.c +++ b/rsc/source/rscpp/cpp3.c @@ -194,7 +194,6 @@ int AddInclude( char* pIncStr ) *incend++ = pIncPos; pIncPos = strtok( NULL, ; ); } -free(pIncEnv); return( 1 ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/tools/rsctools.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 49a89c84dbf2b74d9e3693f8df8362468d42276b Author: Andras Timar ati...@suse.com Date: Wed Mar 27 02:23:38 2013 -0700 stop uninitialized memory leaking into resource files. Change-Id: I8659426dd4ea0c13c8ed839ef5cfb686e6648042 diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx index 136019e..d760634 100644 --- a/rsc/source/tools/rsctools.cxx +++ b/rsc/source/tools/rsctools.cxx @@ -268,7 +268,10 @@ sal_uInt32 RscWriteRc :: IncSize( sal_uInt32 nSize ) char * RscWriteRc :: GetPointer( sal_uInt32 nSize ) { if( !pMem ) +{ pMem = (char *)rtl_allocateMemory( nLen ); +memset( pMem, 0, nLen ); +} return( pMem + nSize ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/tools/rsctools.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4653d73c577d5bf197e7e6c01876f85cf728e279 Author: Andras Timar ati...@suse.com Date: Wed Mar 27 15:46:38 2013 +0100 fix extension replacer (rsc) Change-Id: I0808aeedf87fd181380077f5cfd7b12dc3b33ef3 diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx index d760634..8131826 100644 --- a/rsc/source/tools/rsctools.cxx +++ b/rsc/source/tools/rsctools.cxx @@ -131,7 +131,7 @@ rtl::OString OutputFile(const rtl::OString rInput, const char * pExt) if( nSepInd != -1 ) { -return rInput.copy(0, rInput.getLength() - nSepInd).concat(OString(pExt)); +return rInput.copy(0, nSepInd + 1).concat(OString(pExt)); } return rInput.concat(OString(.)).concat(OString(pExt)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/rsc/rsc.cxx |9 - 1 file changed, 4 insertions(+), 5 deletions(-) New commits: commit 3b00a7f87b8d428dc8c3d1d0ddb84b74bb2343d4 Author: Miklos Vajna vmik...@suse.cz Date: Thu Mar 21 16:10:06 2013 +0100 RscCmdLine: don't use obsolete DirEntry Change-Id: I49b2ca742da96ced5326b3e31f3cec35bfaabcc2 diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 7489218..3d16351 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -167,11 +167,10 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) ; if( *pEqual ) { -const rtl::OString aSPath( pEqual + 1 ); -DirEntryaSDir(rtl::OStringToOUString(aSPath, RTL_TEXTENCODING_ASCII_US)); - -m_aReplacements.push_back( std::pair OString, OString ( OString( (*ppStr)+4, pEqual - *ppStr - 4 ), -rtl::OUStringToOString(aSDir.GetFull(), RTL_TEXTENCODING_ASCII_US) ) ); +OString aSPath(pEqual + 1); +if (aSPath.endsWith(OString(SAL_PATHDELIMITER))) +aSPath = aSPath.copy(0, aSPath.getLength()-1); +m_aReplacements.push_back( std::pair OString, OString ( OString( (*ppStr)+4, pEqual - *ppStr - 4 ), aSPath) ); } } else if( !rsc_stricmp( (*ppStr) + 1, PreLoad ) ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/tools/rsctools.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 5c4bf7a6029da36853fbae1513c9c5ed993059a3 Author: Michael Meeks michael.me...@suse.com Date: Thu Mar 21 15:21:28 2013 + stop uninitialized memory leaking into resource files. Change-Id: Ifb74ce0c60e0d0796d5d04a67e9d58721b58593c diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx index 7e94c6e..dd378e4 100644 --- a/rsc/source/tools/rsctools.cxx +++ b/rsc/source/tools/rsctools.cxx @@ -359,10 +359,13 @@ RscWriteRc :: ~RscWriteRc() */ sal_uInt32 RscWriteRc :: IncSize( sal_uInt32 nSize ) { +sal_uInt32 nOrigPos = nLen; nLen += nSize; if( pMem ) pMem = (char*)rtl_reallocateMemory( pMem, nLen ); -return( nLen - nSize ); +if( pMem ) +memset( pMem + nOrigPos, 0, nSize ); +return nOrigPos; } /* ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/rsc/rsc.cxx |9 + 1 file changed, 5 insertions(+), 4 deletions(-) New commits: commit 3b5497f258fce37eebfc33536bfabb9016575cb5 Author: Michael Stahl mst...@redhat.com Date: Thu Mar 21 20:35:45 2013 +0100 Revert RscCmdLine: don't use obsolete DirEntry This reverts commit 3b00a7f87b8d428dc8c3d1d0ddb84b74bb2343d4. Breaks the build on windows, requires adapting RscCompiler::GetImageFilePath() to match. diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 3d16351..7489218 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -167,10 +167,11 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH ) ; if( *pEqual ) { -OString aSPath(pEqual + 1); -if (aSPath.endsWith(OString(SAL_PATHDELIMITER))) -aSPath = aSPath.copy(0, aSPath.getLength()-1); -m_aReplacements.push_back( std::pair OString, OString ( OString( (*ppStr)+4, pEqual - *ppStr - 4 ), aSPath) ); +const rtl::OString aSPath( pEqual + 1 ); +DirEntryaSDir(rtl::OStringToOUString(aSPath, RTL_TEXTENCODING_ASCII_US)); + +m_aReplacements.push_back( std::pair OString, OString ( OString( (*ppStr)+4, pEqual - *ppStr - 4 ), +rtl::OUStringToOString(aSDir.GetFull(), RTL_TEXTENCODING_ASCII_US) ) ); } } else if( !rsc_stricmp( (*ppStr) + 1, PreLoad ) ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source
rsc/source/parser/rscdb.cxx |1 - rsc/source/prj/start.cxx|1 - rsc/source/res/rscclass.cxx |1 - 3 files changed, 3 deletions(-) New commits: commit 768dee2c32d4da440f1f05c70beb8f668b1364a1 Author: Krisztian Pinter pin.termina...@gmail.com Date: Tue Mar 19 20:37:37 2013 +0100 fdo#39445 writing out tools/fsys.hxx (rsc) removed unused includes from rscdb.cxx, start.cxx and rscclass.cxx Change-Id: I6f7e54c9f494b7b40a0cf30f13100073b9c37f17 Reviewed-on: https://gerrit.libreoffice.org/2853 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index 47d79b8..21c61e7 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -24,7 +24,6 @@ #include stdio.h #include string.h -#include tools/fsys.hxx #include tools/rc.h #include rtl/strbuf.hxx #include sal/log.hxx diff --git a/rsc/source/prj/start.cxx b/rsc/source/prj/start.cxx index 6ea7bb9..0822637 100644 --- a/rsc/source/prj/start.cxx +++ b/rsc/source/prj/start.cxx @@ -37,7 +37,6 @@ #include rscerror.h #include sal/main.h #include rtl/strbuf.hxx -#include tools/fsys.hxx /*** C O D E / diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx index ec2fb11..0eed5ea 100644 --- a/rsc/source/res/rscclass.cxx +++ b/rsc/source/res/rscclass.cxx @@ -28,7 +28,6 @@ #include rscdb.hxx #include rscclass.hxx -#include tools/fsys.hxx #include tools/rcid.h #include tools/rc.h ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: rsc/source sd/source svx/source
rsc/source/rsc/rsc.cxx |3 +-- rsc/source/tools/rsctools.cxx| 13 ++--- sd/source/filter/html/htmlex.cxx | 19 --- sd/source/filter/html/htmlex.hxx |2 +- svx/source/gengal/gengal.cxx |1 - 5 files changed, 16 insertions(+), 22 deletions(-) New commits: commit de99bcde8a66a410287c7fb9c4ae6d6c9b7f05a6 Author: Krisztian Pinter pin.termina...@gmail.com Date: Wed Mar 6 20:30:30 2013 +0100 fdo#39445 writing out tools/fsys.hxx removed unused tools/fsys.hxx include from gengal.cxx changed file copying to sal version in htmlex.cxx rewrote OutputFile in rsctools.cxx very minor change in rsc.cxx - instead of creating an empty DirEntry and getting its path, just used . Change-Id: Ifd57d73847ff271bcb64b12a26a564acc051fcef Reviewed-on: https://gerrit.libreoffice.org/2680 Reviewed-by: Andras Timar ati...@suse.com Tested-by: Andras Timar ati...@suse.com diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 007f426..393e2e0 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -92,8 +92,7 @@ void RscCmdLine::Init() nCommands = 0; nByteOrder = RSC_BIGENDIAN; -DirEntry aEntry; -aPath = rtl::OUStringToOString(aEntry.GetFull(), RTL_TEXTENCODING_ASCII_US); //Immer im Aktuellen Pfad suchen +aPath = OString(.); m_aOutputFiles.clear(); m_aOutputFiles.push_back( OutputFile() ); } diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx index 857f663..7e94c6e 100644 --- a/rsc/source/tools/rsctools.cxx +++ b/rsc/source/tools/rsctools.cxx @@ -28,8 +28,6 @@ #include string.h #include ctype.h -#include tools/fsys.hxx - // Include #include rscdef.hxx #include rsctools.hxx @@ -174,13 +172,14 @@ sal_Bool Append(const rtl::OString rOutputSrs, const rtl::OString rTmpFile) */ rtl::OString OutputFile(const rtl::OString rInput, const char * pExt) { -rtl::OUString aUniInput(rtl::OStringToOUString(rInput, RTL_TEXTENCODING_ASCII_US)); -DirEntry aFileName(aUniInput); +sal_Int32 nSepInd = rInput.lastIndexOf(.); -OUString aExt = OStringToOUString( pExt, RTL_TEXTENCODING_ASCII_US ); -aFileName.SetExtension( aExt ); +if( nSepInd != -1 ) +{ +return rInput.copy(0, rInput.getLength() - nSepInd).concat(OString(pExt)); +} -return rtl::OUStringToOString(aFileName.GetFull(), RTL_TEXTENCODING_ASCII_US); +return rInput.concat(OString(.)).concat(OString(pExt)); } /* diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 9988797..92690d0 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -27,7 +27,6 @@ #include rtl/uri.hxx #include comphelper/processfactory.hxx #include osl/file.hxx -#include tools/fsys.hxx #include unotools/pathoptions.hxx #include vcl/FilterConfigItem.hxx #include unotools/ucbstreamhelper.hxx @@ -3054,30 +3053,28 @@ String HtmlExport::InsertSound( const String rSoundFile ) String aStr( RTL_CONSTASCII_USTRINGPARAM(embed src=\) ); INetURLObject aURL( rSoundFile ); +String aSoundFileName = String(aURL.getName()); DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, invalid URL ); -aStr += String(aURL.getName()); +aStr += aSoundFileName; aStr.AppendAscii( \ hidden=\true\ autostart=\true\ ); -CopyFile( rSoundFile, maExportPath ); +CopyFile( OUString(rSoundFile), OUString(maExportPath) + OUString(aSoundFileName) ); return aStr; } // = -bool HtmlExport::CopyFile( const String rSourceFile, const String rDestPath ) +bool HtmlExport::CopyFile( const OUString rSourceFile, const OUString rDestFile ) { -DirEntry aSourceEntry( rSourceFile ); -DirEntry aDestEntry( rDestPath ); +meEC.SetContext( STR_HTMLEXP_ERROR_COPY_FILE, rSourceFile, rDestFile ); +osl::FileBase::RC Error = osl::File::copy( rSourceFile, rDestFile ); -meEC.SetContext( STR_HTMLEXP_ERROR_COPY_FILE, aSourceEntry.GetName(), rDestPath ); -FSysError nError = aSourceEntry.CopyTo( aDestEntry, FSYS_ACTION_COPYFILE ); - -if( nError != FSYS_ERR_OK ) +if( Error != osl::FileBase::E_None ) { -ErrorHandler::HandleError(nError); +ErrorHandler::HandleError(Error); return false; } else diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx index 6993cdb..8d4a578 100644 --- a/sd/source/filter/html/htmlex.hxx +++ b/sd/source/filter/html/htmlex.hxx @@ -195,7 +195,7 @@ class HtmlExport String CreatePageURL( sal_uInt16 nPgNum ); String InsertSound( const String rSoundFile ); -bool CopyFile( const String rSourceFile, const String rDestPath ); +bool CopyFile( const
[Libreoffice-commits] core.git: rsc/source
0 files changed New commits: commit 2f00b691c0158ddd05afbc2336fa181dab2ae8b1 Author: Caolán McNamara caol...@redhat.com Date: Tue Feb 26 14:42:11 2013 + this dmake file in rsc was inadvertently added Change-Id: Ie8a8a8a4a82e3ca0175ac5a0275da6ca1474fa5d diff --git a/rsc/source/prj/dmake b/rsc/source/prj/dmake deleted file mode 100644 index e69de29..000 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits