summaryrefslogtreecommitdiff
path: root/sal/rtl
AgeCommit message (Collapse)Author
2012-04-06Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operatorSzabolcs Dezsi
2012-04-06Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operatorSzabolcs Dezsi
Pattern used: find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\)) *) *) *{$/\1\2 ( \3 == \4 ) {/' \{\} \;
2012-04-06string literal O(U)StringBuffer ctors too, after allLuboš Luňák
2012-04-02warn on \0 embedded in string literals, after allLuboš Luňák
Seeing 791f27683311e487947b0464a0cb132b19fd0e12 I've changed my mind, some embedded \0 can be actually well hidden: struct foo { const char txt[3]; }; const foos[] = { { "a" }, { "bb" }}; If somebody wants an embedded \0 in a string literal, they need to say it explicitly by specifying the size.
2012-04-02sal: reduce allocation thrash in URI encode / decodeMichael Meeks
This saves 1% of string allocation / destruction on startup.
2012-04-02sal: expose more stringbuffer related instrumentation pointsMichael Meeks
Avoid ref/unref pair in makeStringAndClear, hook into the stringbuffer-like 'String' class to expose it's conversion to immutable strings, and fixup misc. missing instrumentation.
2012-03-30no bad_alloc throwing in string literal O(U)String functionsLuboš Luňák
String literals should be reasonably short, and if memory is so low that they trigger allocation failure, something else would would trip over very soon anyway.
2012-03-30sal: add a more permanant set of annotations for lifetime tracking.Michael Meeks
Having done this on a temporary basis a couple of times before, it'd be good to avoid having to do the instrumentation again.
2012-03-28these VALGRIND allocator annotations never worked for me, just busted memcheckCaolán McNamara
2012-03-26Hardcode default inifile as /assets/rc on AndroidTor Lillqvist
2012-03-23removed duplicate includes in salTakeshi Abe
2012-03-21More hacking on static linking (iOS) supportTor Lillqvist
2012-03-21Need the weird vnd.sun.star.pathname: prefixTor Lillqvist
2012-03-21Simply hardcode the inifile as "rc" in the app bundle directory on iOSTor Lillqvist
2012-03-21Clean up OSL_TRACE output a little bitTor Lillqvist
2012-03-13make OString work even with old gcc that has SFINAE brokenLuboš Luňák
Since OString already has a ctor accepting const char*, I cannot find out a way to distinguish string literals other than using a template, otherwise const char* somehow takes precedence (all of gcc, clang, msvc). But the template requires the Substitution Is Not A Failure Idiom to actually create only wanted instances. And the compiler can try evaluate the OString ctor as a possibility when comparing an int to an anonymous enum, and anonymous enum as a type without linkage cannot be a template argument before C++11. SFINAE should still work, but not with gcc older than 4.0.2 (which we right now use only on macs). So for that case disable the string literal ctors, which means macs will have one extra strlen call, and also that embedded \0's in string literals will be inconsistent. The tiny performance problem shouldn't matter that much and will eventually go away, the \0 problem should not matter, since before string literal ctors were introduced \0's had not been included anyway unless RTL_CONSTASCII_STRINGPARAM was used. So we should be safe and when removing the CONSTASCII macros \0 cases should be handled by explicitly mentioning the length.
2012-03-12OString ctor for string literals without RTL_CONSTASCII stuffLuboš Luňák
2012-03-12rtl_uString_newFromLiteral() for string literalsLuboš Luňák
Drop the recently introduced rtl_uString_newFromAscii_WithLength() and replace it with this one. The name fits better and it'll be also a distinct function that specifically includes embedded \0's (because that's what OUString supports and if a string literal explicitly includes it, it makes sense to copy it as such).
2012-03-05rtl_uString_newFromAscii_WithLength() and use it in OUStringLuboš Luňák
2012-03-05check that *ascii* string functions are really passed only ASCIILuboš Luňák
2012-02-22OUString ctor for string literals without RTL_CONSTASCII stuffLuboš Luňák
http://lists.freedesktop.org/archives/libreoffice/2012-February/025662.html
2012-02-15Various string function clean upStephan Bergmann
Added: * rtl::OString::matchL * rtl::OString::endsWith * rtl::OString::endsWithL * rtl::OString::indexOfL * rtl::OString::replaceFirst * rtl::OString::replaceAll * rtl::OString::getToken * rtl::OUString::endsWith * rtl::OUString::replaceFirst * rtl::OUString::replaceFirstAsciiL * rtl::OUString::replaceFirstAsciiLAsciiL * rtl::OUString::replaceAll * rtl::OUString::replaceAllAsciiL * rtl::OUString::replaceAllAsciiLAsciiL * rtl::OUString::getToken plus underlying C functions where necessary Deprecated: * comphelper::string::remove * comphelper::string::getToken Removed: * comphelper::string::searchAndReplaceAsciiL * comphelper::string::searchAndReplaceAllAsciiWithAscii * comphelper::string::searchAndReplaceAsciiI * comphelper::string::replace * comphelper::string::matchL * comphelper::string::matchIgnoreAsciiCaseL * comphelper::string::indexOfL Also fixed some apparent misuses of RTL_CONSTASCII_USTRINGPARAM -> RTL_CONSTASCII_STRINGPARAM.
2012-01-21Removed some unused parameters; added SAL_UNUSED_PARAMETER.Stephan Bergmann
SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC) is used to annotate legitimately unused parameters, so that static analysis tools can tell legitimately unused parameters from truly unnecessary ones. To that end, some patches for external modules are also added, that are only applied when compiling with GCC and add necessary __attribute__ ((unused)) in headers.
2012-01-15Clang -Wdangling-else, -Wuninitialized.Stephan Bergmann
2012-01-02Fix for fdo43460 Part XXVII getLength() to isEmpty()Olivier Hallot
Please find attached a partial fix for Easy Hack FDO43460 Part XXVII Modules padmin, pyuno, rdbmaker, regexp, registry, rsc, sal
2011-12-21WaE: add a space to tell SLED-11 gcc that we know what we're doingCaolán McNamara
2011-12-19WaE: GCC 4.5.1 does not allow #pragma GCC diagnostic warningMatúš Kukan
2011-12-19-Werror=shadow and -Werror=sign-promo fixesStephan Bergmann
2011-12-19sal: convert to gbuildMatúš Kukan
2011-12-14fix crash for std::numeric_limits<int>::min() in our math lib implMarkus Mohrhard
2011-12-13warn about massive allocsCaolán McNamara
2011-12-01Remove uses of charAtAugust Sodora
2011-11-30OSL_TRACE in sal/rtl/source/alloc_*.cxx leads to deadlock...Stephan Bergmann
...with SAL_LOG=+INFO due to std::ostringstream in log.cxx using global operator new, which potentially calls rtl_allocateMemory.
2011-11-30Removed unused sal/inc/internal/once.h.Stephan Bergmann
2011-11-27remove include of pch header from salNorbert Thiebaud
2011-11-27remove PCH support in dmake-moduleNorbert Thiebaud
2011-11-24ditch dbg_dumpCaolán McNamara
2011-11-23Changed sal/log.h -> sal/log.hxx, drop _S from C++ streaming log macros.Stephan Bergmann
A compile time check ensures the common case of streaming just a plain C-style string literal still produces reasonably compact call-site code. The format-string variants are still available in sal/detail/log.h, but only to be used in obsolete osl/diagnose.h etc., and going to be removed again eventually.
2011-11-22rtlbootstrap.mk.cxx needs to be a C++ file (including C++ macros.hxx).Stephan Bergmann
2011-11-22New sal/log.h obsoletes osl/diagnose.h and tools/debug.hxx.Stephan Bergmann
* New SAL_INFO..., SAL_WARN... macros. * New SAL_STREAM supersedes OSL_FORMAT. * oustringostreaminserter.hxx moved from unotest to rtl (and always UTF-8 now). * TODO to enable GCC __attribute__((format)) in sal/log.h (requires call-site cleanup). * Further functionality in tools/debug.hxx (DBG_MEMTEST, DBG_CTOR, etc.) not yet addressed. * Some replacements tools String -> rtl::OUString.
2011-11-01Moved sal/rtl/source string files from C to C++, for easier maintenance.Stephan Bergmann
2011-11-01Moved sal/rtl/source/alloc_* files from C to C++, for easier maintenance.Stephan Bergmann
2011-11-01Removed some obsolete register annotations.Stephan Bergmann
2011-11-01Moved various sal/rtl/source files from C to C++, for easier maintenance.Stephan Bergmann
2011-11-01Removed obsolete rtl/tres stuff.Stephan Bergmann
2011-11-01Fixed rtl_getGlobalProcessId implementation (moved from C to C++).Stephan Bergmann
2011-10-25Fix previous commit for non-Valgrind builds.Stephan Bergmann
2011-10-24Avoid Clang -Wunused-value with trunk rev. 12226 Valgrind.Stephan Bergmann
2011-10-18Clang does not understand #pragma GCC diagnostic warning ↵Stephan Bergmann
"-Wunused-but-set-variable". See <https://bugs.kde.org/show_bug.cgi?id=284384> "clang 3.1 -Wunused-value warnings in valgrind.h, memcheck.h" for a way to silence these warnings when building with clang.
2011-10-18sal: workaround warnings in valgrind macrosMichael Stahl