Age | Commit message (Collapse) | Author | |
---|---|---|---|
2013-06-20 | COMMON: Add erase method to String class | richiesams | |
2013-03-20 | COMMON: Fix assert condition in String::setChar() | Thierry Crozat | |
2013-01-26 | JANITORIAL: Enforce "} // End of namespace" with a single space after }. | Johannes Schickel | |
2012-12-13 | COMMON: Add wrapper for isprint. | Johannes Schickel | |
This is done in the spirit of 658080deeda79d20ea40643569fbcb072573e7cf. | |||
2012-02-21 | Merge pull request #182 from fingolfin/forbid-ctype | Willem Jan Palenstijn | |
ALL: Avoid using is* macros from ctype.h | |||
2012-02-16 | COMMON: Fix typo | Max Horn | |
2012-02-15 | ALL: Avoid using is* macros from ctype.h | Max Horn | |
On some systems, passing signed chars to macros like isspace() etc. lead to a runtime error. Hence, mark these macros as forbidden by default, and introduce otherwise equivalent alternatives for them. | |||
2011-06-23 | ANALYSIS: Add static casts to is* functions | Littleboy | |
This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results. See http://msdn.microsoft.com/en-us/library/ms245348.aspx | |||
2011-06-18 | COMMON: Add vformat() function (Common::String analog to vsprintf) | Max Horn | |
2011-06-03 | COMMON: Let Common::normalizePath normalize '..' in paths | Max Horn | |
There are some unit tests to verify that this works correctly. There is a small chance that this causes regressions in weird setups. | |||
2011-05-23 | COMMON: Provide our own implementations for scumm_str(n)icmp | Max Horn | |
This takes up a tiny little bit of extra binary size, but gets rid of some awful #ifdef hackery. | |||
2011-05-12 | GIT: Clean up: Suppress SVN tags, now useless | strangerke | |
2010-11-01 | COMMON: Rename String::printf() to String::format() | Max Horn | |
This is a first step towards getting rid of all uses of regular printf, fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase. The name format() reflects the purpose of the function, and parallels String.format() in Java, boost::format, and others. svn-id: r54004 | |||
2010-10-18 | Revert "COMMON: Implement Common::vprintf(). Patch by littleboy" | Eugene Sandulenko | |
svn-id: r53586 | |||
2010-10-18 | COMMON: Implement Common::vprintf(). Patch by littleboy | Eugene Sandulenko | |
svn-id: r53576 | |||
2010-10-10 | COMMON: work around different vsnprintf behaviour on IRIX | Joost Peters | |
The return value of vsnprintf when the provided buffer is not large enough to hold the formatted string is implementation-dependent: C99: The size the formatted string would take up. MSVC: -1, with no indication of how large the buffer should be. IRIX: The number of characters actually written, which is at most the size of the buffer minus one, as the string is truncated to fit. This means the only way to be sure the entire string is written is if the return value is less than the capacity - 1. This change means that whenever we try to format a string where the size is 1 below the built-in capacity, that the capacity will be needlessly increased. If this turns out to be problematic we could make this behaviour __sgi conditional. svn-id: r53143 | |||
2010-09-07 | COMMON: Fix edge case for wildcard in matchString | Willem Jan Palenstijn | |
svn-id: r52618 | |||
2010-08-17 | COMMON: fix MSVC assert when using umlauts (or other characters > 127) in ↵ | Florian Kagerer | |
the global save/load menu svn-id: r52173 | |||
2010-08-17 | COMMON: Remove redundant include from str.cpp | Eugene Sandulenko | |
If it is needed for your specific platform, then readd it, but for that platform. Although to me it looks all redundant. svn-id: r52155 | |||
2010-08-16 | Common: Fix bug in lastPathComponent. | Johannes Schickel | |
Prior to this change lastPathComponent would not create a correct result, when the input of lastPathComponent did not contain a single separator. I also added a test case for this in our unit tests. svn-id: r52123 | |||
2010-07-05 | Note Common::String's behaviour may be undefined with \0 characters. | Willem Jan Palenstijn | |
Also make operator=(char) and String(char) behave the same. svn-id: r50712 | |||
2010-06-19 | Fix an issue in String::ensureCapacity() when the string is shared. It could ↵ | Thierry Crozat | |
allocate two much memory as it was at least doubling the current capacity even when this one was sufficient. It fixes a crash in GUI::Widget::cleanupHotkey() as the capacity of the string was doubled at each iteration once it was too long for the internal storage (only to add one character to the string). This ended up in a bad_alloc exception after a few iterations. svn-id: r50050 | |||
2010-05-05 | Add a custom implementation of OpenBSD's strlcat and strlcpy. | Johannes Schickel | |
This includes both an implementation and some basic unit tests for the above mentioned functions. svn-id: r48953 | |||
2010-03-18 | COMMON: Move tag2str from util.h to str.h | Max Horn | |
svn-id: r48281 | |||
2010-01-31 | Slight formatting fixes to comply to our coding guidelines. | Johannes Schickel | |
svn-id: r47744 | |||
2009-12-30 | Get rid of Common::String::emptyString, and also of some port specific ↵ | Max Horn | |
hackery (getting rid of certain global C++ objs) svn-id: r46781 | |||
2009-10-12 | Fix broken size in Common::String::printf output in MSVC | Willem Jan Palenstijn | |
svn-id: r44979 | |||
2009-10-03 | Use buffer in Common::String::printf slightly more efficiently | Willem Jan Palenstijn | |
svn-id: r44562 | |||
2009-10-01 | Fix Common::String::printf in MSVC | Willem Jan Palenstijn | |
svn-id: r44520 | |||
2009-09-23 | COMMON: Add "ignoreCase" parameter to matchString. | Johannes Schickel | |
svn-id: r44265 | |||
2009-07-25 | Formatting | Eugene Sandulenko | |
svn-id: r42746 | |||
2009-07-25 | Add Common::String::printf to format a string | Willem Jan Palenstijn | |
svn-id: r42743 | |||
2009-06-07 | Fixed appending a (substring of a) string to itself | Max Horn | |
svn-id: r41337 | |||
2009-06-07 | Added some new method variants to Common::String | Max Horn | |
svn-id: r41333 | |||
2009-05-04 | Fixed new[] / delete mismatch in Common::String | Max Horn | |
svn-id: r40302 | |||
2009-05-03 | COMMON: Check for failed memory allocations; changed Common::String to use ↵ | Max Horn | |
new/delete instead of malloc/free svn-id: r40291 | |||
2009-02-15 | Merged internal 'matchPath' method of class Archive into global matchString ↵ | Max Horn | |
function (via an optional 'path mode' in the latter). Also changed Archive::listMatchingMembers to use path mode when matching, just like FSDirectory::listMatchingMembers svn-id: r38277 | |||
2008-12-22 | Fixed indentation and removed whitespaces at the end of line | Jordi Vilalta Prat | |
svn-id: r35481 | |||
2008-10-12 | COMMON: Added a new ObjectPool class, with matching operator new/delete ↵ | Max Horn | |
overloads svn-id: r34785 | |||
2008-10-02 | Ignore String::deleteLastChar when called on an empty string | Max Horn | |
svn-id: r34718 | |||
2008-09-24 | Changed Common::String to use a MemoryPool for its refcounts | Max Horn | |
svn-id: r34642 | |||
2008-09-20 | Little readability tweak | Max Horn | |
svn-id: r34615 | |||
2008-09-05 | Optimized matchString for the common case where there is a trailing * (if ↵ | Max Horn | |
that is the case, abort immediately instead of scanning the rest of the string) svn-id: r34367 | |||
2008-09-05 | Moved matchString from util.* to str.*; added new String::matchString ↵ | Max Horn | |
method; fixed matchString doxygen comment (it confused pattern & string); added unit tests for matchString svn-id: r34364 | |||
2008-09-03 | Fix nasty off-by-one errors | Max Horn | |
svn-id: r34317 | |||
2008-09-03 | Modified Common::Str to use exponential growth for its storage; also changed ↵ | Max Horn | |
the meaning of 'capacity' from 'max length of string' to 'size of storage' (i.e. added one) svn-id: r34313 | |||
2008-09-02 | Added two new global funcs which ease proper handling of 'path' strings: ↵ | Max Horn | |
Common::lastPathComponent() and Common::normalizePath() svn-id: r34272 | |||
2008-08-20 | Unified member names in container/storage classes Array, HashMap and String: ↵ | Max Horn | |
_storage, _size, _capacity svn-id: r34052 | |||
2008-07-23 | Reorder stuff a little bit, moving private String methods together: cleanup | Max Horn | |
svn-id: r33248 | |||
2008-07-23 | Added convenience method String::makeUnique(); simplified ↵ | Max Horn | |
String::operator=(char c); extended String unit tests svn-id: r33246 |