Commit Graph

65 Commits (ed1457dca335a68b74603b619584eff9f7231ef4)

Author SHA1 Message Date
Michael Lutz a05fd7aa50 Change: [Network] Transfer command data as serialized byte stream without fixed structure.
The data will be transmitted as the length followed by the serialized data. This allows the command
data to be different for every command type in the future.
2 years ago
rubidium42 fed3e3305f Codechange: add function to determine whether are string starts or ends with a given other string 3 years ago
rubidium42 b4aedef848 Codechange: add std::string variant of Utf8StringLength 3 years ago
Patric Stout 7713c3e3cc Codechange: move casting a "const char *" to "char *" to the caller
It is not nice to have your definition say you won't change a value
while in fact the whole reason for your existance is to change it.
3 years ago
Patric Stout ca9a7df752
Codechange: rename str_validate to StrMakeValid(InPlace) (#9304)
This to be more explicit the function changes the value, and not
returns yes/no.
3 years ago
rubidium42 16437b7c0d Codechange: move client name in settings to std::string 3 years ago
rubidium42 dc05917287 Add: [[nodiscard]] to std::string str_validate 3 years ago
Milek7 8e9eca6ddd
Codechange: Use __attribute__ access none to silence GCC 11 -Wmaybe-uninitialized warnings (#9124) 3 years ago
rubidium42 5202869f0f Add: String functionality to trim spaces from C-style strings 3 years ago
Patric Stout fda1fbf61c
Revert c1fddb9, 639cfa4: "Codechange: Check if access __attribute__ is supported before trying to use it." (#8526)
This reverts commit c1fddb9a6a and 639cfa43d2.

access_mode "none" is only supported by GCC11, but introduced
after it branched. So there are GCC11.0s out there that do not
support it. We will have to wait for GCC11.1 to hit before we
can re-add this.
3 years ago
milek7 639cfa43d2 Codechange: Use access __attribute__ to silence warnings in GCC 3 years ago
Michael Lutz 0c6e8a8123 Codechange: Store file search paths as std::string. 3 years ago
Charles Pigott 64b1c70fdd Codechange: Add WARN_FORMAT to vseprintf and fix the cascade of warnings that followed 4 years ago
Michael Lutz 715aa67a9c Codechange: Use std::string in INI file parsing. 4 years ago
Michael Lutz c082f570ce Codechange: Use std::string when translating TTDP NewGRF string codes. 4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
frosch 08eeec15be (svn r26513) -Fix: 9x compilation, maybe 10 years ago
rubidium db8d208bfc (svn r26507) -Cleanup: remove now unused custom strndup implementation 10 years ago
rubidium e61fe21237 (svn r26506) -Codechange: replace most of vsnprintf with vseprintf 10 years ago
rubidium 382ca0941f (svn r26498) -Add: method for duplicating strings with similar behaviours as strecpy and strecat; give end pointer instead of a size 10 years ago
frosch ef4c2ce031 (svn r26485) -Codechange: Replace ttd_strlcpy and ttd_strlcat with strecpy and strecat. 10 years ago
michi_cc 76367f6bf1 (svn r25653) -Add: Caret movement by words for CJK languages. 11 years ago
michi_cc e7dc14b25a (svn r25652) -Fix: Improve text caret movement for complex scripts. 11 years ago
rubidium 4c443bce5c (svn r25555) -Fix [FS#5632]: [Script] Texts from scripts were not validated before they were shown, causing an assertion to trigger 11 years ago
frosch 3e02890b73 (svn r24983) -Change: Apply the same name sorting rules to content and NewGRF list as for the server list. 11 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
yexo 2c99805117 (svn r23816) -Fix (r23635, r23805): make SCC_ENCODED the first entry in the StringControlCode enum since it's value is not allowed to change 13 years ago
rubidium fefe22b4aa (svn r23590) -Codechange: make the string validation settings better expandable 13 years ago
planetmaker 5188587a04 (svn r22889) -Fix [FS#4751]: [OSX] MacOSX 10.7 knows already about strndup (leecbaker) 13 years ago
alberth d55b380b69 (svn r22669) -Codechange: For non-windows, only test for file existence again if strtolower actually changed the name. 13 years ago
rubidium 46c242b1dc (svn r22385) -Fix [FS#4603]: strnatcmp is in string.cpp, so it ought to be declared in string_func.h. 13 years ago
rubidium 9ca4b629cd (svn r21846) -Codechange: move documentation towards the code to make it more likely to be updated [o-s]. 14 years ago
rubidium 440a529701 (svn r21404) -Add: method for getting the length of an Utf8 string in characters 14 years ago
rubidium 3330dee7e0 (svn r21310) -Fix [FS#4259]: apparantly even earlier FreeBSDs had strndup 14 years ago
rubidium 3cf9f175d8 (svn r21295) -Fix [FS#4259]: FreeBSD introduced strndup as well (MicRO) 14 years ago
alberth ab50f74d7f (svn r21273) -Codechange: Return values should start at the same line. 14 years ago
rubidium 17b514ccd1 (svn r21133) -Add: function to check the validity of a string (without modifying it) 14 years ago
rubidium b933819b0b (svn r21006) -Fix (r21004): don't print the text direction character when ICU isn't linked and thus doesn't remove them 14 years ago
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 14 years ago
rubidium e3df7caf18 (svn r19874) -Fix [FS#3845]: NetBSD compilation was still broken in some cases (Krille) 14 years ago
glx 45cb7fe55c (svn r19859) -Fix (r19853): preprocessor warning 14 years ago
rubidium 2de9e2d16b (svn r19853) -Fix [FS#3840]: revert r19781 and apply a more sensible version with the same effect 14 years ago
glx 918b3aff5e (svn r18919) -Fix (r15371): strcasestr() return should not be const 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium 0d99b6c71c (svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it. 15 years ago
smatz f5316c5cbd (svn r16269) -Codechange: use gcc's ability to check parameters sent to printf-like functions
-Fix: wrong number of parameters or wrong parameter types sent to printf-like functions at several places
15 years ago
rubidium 86ca408d46 (svn r15626) -Fix [FS#2698]: UTF8 string handling could cause buffer overruns. 15 years ago
rubidium cecc3863cd (svn r15376) -Fix [FS#2608] (r15371): OSX/BSD also seems to define strcasecmp under some circumstances. 16 years ago
rubidium 35c5da08c5 (svn r15371) -Codechange: add an implementation of strcasestr for when _GNU_SOURCE isn't defined. 16 years ago