Commit Graph

202 Commits

Author SHA1 Message Date
peter1138 4f052fc2a4 Cleanup: Fix alignment after NULL -> nullptr change. 2019-04-13 20:35:10 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 2019-03-28 00:09:33 +01:00
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 2019-03-26 20:15:57 +00:00
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 2019-03-26 20:15:57 +00:00
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 2019-03-26 20:15:57 +00:00
Henry Wilson a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 2019-03-26 20:15:57 +00:00
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 2019-03-26 20:15:57 +00:00
Henry Wilson af7d9020a1 Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.

Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
2019-03-24 16:10:04 +01:00
Patric Stout aea1726f45 Fix: MingW and MSVC compiled strgen had different path separator behaviour
If it was compiled with MingW, both / and \ were accepted as
path separator. On MSVC, only \ was. This is an unexpected
difference between binaries for the same platform. Remove this
discrepancy by accepting both / and \ on all platforms.
2019-03-11 10:16:00 +01:00
Patric Stout 7784d77713 Remove: MorphOS / AmigaOS support
In 10 years there is no commit to change how MorphOS works, and we
have no active maintainer for it. It is unlikely it works in its
current state (but not impossible).

With the arrival of SDL2 (and removal of SDL), MorphOS is no longer
support. There is an SDL2 port for MorphOS, but it is not maintained
by upstream SDL2, and nobody can currently test it out.

If anyone wants to re-add MorphOS, please do (revert this patch,
fix the problems, and create a Pull Request). If you need any help
doing so, let us know! It is not that we don't like MorphOS, it is
that we don't have anyone fixing the problems :(
2019-03-05 22:03:00 +01:00
glx 2fcd4e61db Fix: make sure strgen fails when english.txt contains invalid commands 2019-01-29 22:25:50 +01:00
glx c540d72445 Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32 2018-12-27 18:09:16 +01:00
Charles Pigott b5028efc1f Fix: Protect against a few out of bounds or uninitialised usage errors 2018-10-31 12:41:49 +01:00
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 2018-10-31 12:35:54 +01:00
frosch a09cc8dda0 (svn r27759) -Fix: strgen compilation 2017-02-26 20:10:41 +00:00
michi_cc 35b77450f8 (svn r27380) -Fix: [Win32] Compilation with MSVC2015. 2015-08-10 20:21:29 +00:00
frosch 50a3f44539 (svn r27295) -Add: [strgen] Default plural subparameter positions for CARGO_xxx string control codes. 2015-05-28 17:26:53 +00:00
rubidium 77889ab8e8 (svn r26521) -Fix-ish: prevent from ever reading huge (or negative) amounts of data in strgen 2014-04-26 20:55:08 +00:00
rubidium 5e90054f20 (svn r26511) -Codechange: use strecpy in game_text 2014-04-25 17:43:09 +00:00
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 2014-04-25 15:40:32 +00:00
rubidium e61fe21237 (svn r26506) -Codechange: replace most of vsnprintf with vseprintf 2014-04-24 19:51:45 +00:00
frosch ef4c2ce031 (svn r26485) -Codechange: Replace ttd_strlcpy and ttd_strlcat with strecpy and strecat. 2014-04-23 20:44:42 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
rubidium 0e9c992104 (svn r26058) -Fix: handle the return value of a number of functions better 2013-11-23 13:15:07 +00:00
rubidium 0eaa8fbfcd (svn r26054) -Fix: minor memory leak in strgen 2013-11-22 21:45:57 +00:00
rubidium 6f21593bf6 (svn r26050) -Fix: possible, but currently untriggered, out of bounds access in strgen 2013-11-22 21:43:47 +00:00
rubidium b35b17beeb (svn r25326) -Fix [FS#5589]: check for zero width space in translations and fail upon finding them 2013-06-07 19:05:04 +00:00
frosch b09bf08044 (svn r25191) -Codechange/Fix: [strgen] Make -export-commands use the actual command classification from strgen_tables.h instead of using something incompletely duplicated. 2013-04-17 18:21:43 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
frosch 16760cff8b (svn r24516) -Add: [GS] Support ##plural pragma in GS lang files. 2012-09-09 15:55:20 +00:00
frosch 17dcc7a899 (svn r24400) -Add: Plural 'names' to the output of strgen -export-plurals. 2012-07-14 14:21:25 +00:00
rubidium d99eb6aac2 (svn r23853) -Fix: several incorrect @files 2012-01-25 22:10:14 +00:00
frosch 0011f9ce45 (svn r23805) -Add: {STRING6} and {STRING7}. 2012-01-15 15:49:01 +00:00
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 2012-01-03 21:32:51 +00:00
rubidium e40eb8177a (svn r23735) -Codechange: remove ~50 includes from headers that weren't needed 2012-01-03 20:26:05 +00:00
rubidium 88f1acd26b (svn r23587) -Fix-ish: MSVC warnings in case strgen would be in the main project file 2011-12-18 11:56:53 +00:00
rubidium 50b63c5870 (svn r23585) -Codechange: replace some magic numbers with less magic constants 2011-12-17 23:16:16 +00:00
rubidium 1f083c3ac8 (svn r23576) -Codechange: split the base of strgen with the strgen code that creates the actual .lng files 2011-12-17 18:34:03 +00:00
rubidium c97b2a5224 (svn r23575) -Codechange: split class definition and implementation of base strgen classes 2011-12-17 17:25:50 +00:00
rubidium 9c34bc52db (svn r23574) -Codechange/Feature-ish: allow converting multiple translations with the same master language instance in a single strgen run 2011-12-17 17:03:38 +00:00
rubidium 17c0756da2 (svn r23573) -Fix (r23571): MSVC doesn't like variable array sizes 2011-12-17 16:59:16 +00:00
rubidium ad7f577931 (svn r23572) -Codechange: split actual file reading from logic for parsing 2011-12-17 16:56:32 +00:00
rubidium 4fbbbdd78f (svn r23571) -Codechange: make the number of 'tabs' the generate configurable 2011-12-17 15:02:09 +00:00
rubidium ab37a923c2 (svn r23570) -Codechange: move version generation code to StringData 2011-12-17 14:50:35 +00:00
rubidium 343d0d8176 (svn r23569) -Codechange: put more logic in some of the strgen structs, e.g. allocating and freeing its memory, and don't use a global variable for the string data 2011-12-17 14:41:10 +00:00
rubidium 6c31b25e22 (svn r23568) -Codechange: only allocate the buffer for writing when it is really needed 2011-12-17 13:33:36 +00:00
rubidium b7b3ac8859 (svn r23567) -Codechange: use SmallVector for the buffer in strgen 2011-12-17 13:23:01 +00:00
rubidium 5d37791157 (svn r23566) -Fix (r23565): hopefully fix MSVC compilation error 2011-12-17 12:19:22 +00:00
rubidium 15906ca874 (svn r23565) -Codechange: create some classes for writing language header and translation files 2011-12-17 12:15:19 +00:00
rubidium 719b4707dc (svn r23563) -Cleanup: remove useless global variable from strgen; it would always be false at the point it would be read 2011-12-16 22:03:59 +00:00
rubidium b8866be093 (svn r23269) -Codechange: rename some control/string codes/IDs to be more consistent 2011-11-19 22:15:44 +00:00
rubidium 525e2c9e73 (svn r22806) -Codechange: store the number of untranslated strings in the language file 2011-08-21 19:21:38 +00:00
alberth 31386c42a7 (svn r22145) -Codechange: Do explicit test for non-bool values. 2011-02-25 22:04:38 +00:00
alberth ff1e0a3ed3 (svn r22102) -Codechange: Also use the getopt function in strgen. 2011-02-18 20:52:42 +00:00
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 2011-01-22 14:52:20 +00:00
rubidium d332c59a4c (svn r21474) -Fix: some MSVC code analysis warnings in strgen 2010-12-12 01:21:02 +00:00
yexo 74d608a67e (svn r21445) -Fix: [NewGRF] fix gender choice lists in newgrf strings.
Change: strgen no longer writes the type of a string for a gender choice list
2010-12-09 21:01:50 +00:00
yexo dfe8b546ec (svn r21348) -Fix (r21346): some compilers complain about int-uint comparisons 2010-11-28 19:48:13 +00:00
yexo d81d42bfc3 (svn r21347) -Cleanup: remove an unused feature from strgen and remove some ifs where we already know the result 2010-11-28 19:40:35 +00:00
yexo 35af463046 (svn r21346) -Fix (r2592): buffer overflow in strgen for strings with very large arguments 2010-11-28 19:39:04 +00:00
rubidium ede2fb8176 (svn r21260) -Codechange: make strgen more stringent w.r.t. the allowed characters in strings 2010-11-19 19:38:02 +00:00
rubidium ebf7b915b0 (svn r21215) -Codechange: store the plural form in the plural (choice) lists 2010-11-16 21:01:56 +00:00
rubidium 4b4db5d86e (svn r21203) -Codechange: make the maximum plural count available to the rest of OpenTTD as well 2010-11-16 11:42:47 +00:00
rubidium d46a2ef122 (svn r21165) -Codechange: move the case/gender meta data into the language metadata struct as well 2010-11-13 14:36:43 +00:00
rubidium f195920695 (svn r21160) -Codechange: reuse the strgen LanguageHeader to store some metadata about a language, and keep the language metadata in memory instead of loading it several times from disk 2010-11-13 11:11:02 +00:00
rubidium 1ddc05e822 (svn r21134) -Change: perform some more stringent validity checking on the language files 2010-11-10 17:49:44 +00:00
rubidium 8cd48767f9 (svn r21132) -Codechange: unify the language file version/validity checking 2010-11-10 17:48:31 +00:00
rubidium 15defb219f (svn r21127) -Codechange: change the max gender constant's name's style to the style used by the max case constant's name 2010-11-10 16:31:46 +00:00
rubidium b9ccf6dccc (svn r21115) -Codechange: make it more clear that genders and cases in the base translation are not supported 2010-11-07 20:57:41 +00:00
rubidium 28ed77c354 (svn r21113) -Codechange: remove the amount of places where the language pack identifier magic value is 2010-11-07 18:35:59 +00:00
rubidium a89fed21c7 (svn r21112) -Codechange: reduce the amount (of copying) variables 2010-11-07 18:20:18 +00:00
frosch 4bd32799f1 (svn r20286) -Codechange: Unify end of doxygen comments. 2010-08-01 19:44:49 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
alberth be6c058424 (svn r20211) -Codechange: Indented code should have curly braces around it. 2010-07-24 10:14:39 +00:00
rubidium 9d29c54b03 (svn r19867) -Change: use non-breaking spaces for currency pre-/postfixes. 2010-05-20 15:36:44 +00:00
rubidium 793b0f0736 (svn r19811) -Codechange: make the last bits from table/strings.h use static consts too instead of an unnamed enum 2010-05-13 09:12:52 +00:00
smatz 0ef33548c2 (svn r19614) -Codechange: "it's" => "its" where appropriate 2010-04-12 14:12:47 +00:00
rubidium eb220617d5 (svn r19264) -Fix (r19179): strgen segfaults when trying to lookup the command for a non-existing command 2010-02-26 10:03:33 +00:00
rubidium 2a65f9e4d0 (svn r19180) -Add/Fix: (partial) support for genders for cargos, industries, vehicles, stations, ...; partial because you can't set a gender for a custom string. 2010-02-20 23:42:11 +00:00
rubidium 44f2ef179d (svn r19179) -Codechange: make strgen do some checking on whether genders are valid for a command (e.g. we don't have genders for numbers) 2010-02-20 23:02:03 +00:00
rubidium f6dfce6d59 (svn r19114) -Change: [strgen] Modify the outputted format for MSVC builds of strgen so it also shows fatal errors in the 'error list' and it also counts them. (Fatal) errors are marked as warnings so a failing language file is not causing the complete compilation to fail. 2010-02-12 23:47:50 +00:00
rubidium b1cce3f70f (svn r19113) -Change: [strgen] Remove the partially generated language file if compilation fails. 2010-02-12 23:45:25 +00:00
rubidium 92c75f9092 (svn r18727) -Fix [FS#3480]: some invalid gender/plural indices in strings, which could eventually cause crashes. 2010-01-04 21:58:47 +00:00
rubidium 4d575c0226 (svn r18444) -Feature: allow G and P to 'select' substrings of STRINGn for getting their gender 2009-12-09 11:41:27 +00:00
frosch bf0b72ae9e (svn r18329) -Remove: [strgen] Support for {SETX} and {SETXY}. Let it rest in peace as NewGRF relict. 2009-11-28 20:27:42 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
smatz c5533ae470 (svn r17168) -Codechange: apply coding style to if and while statements 2009-08-14 17:11:59 +00:00
smatz a29bbb1e1f (svn r17157) -Add: localised decimal separator 2009-08-12 01:28:11 +00:00
rubidium ed9c01e8b0 (svn r17137) -Fix (r17129): strgen complained a lot about english.txt compiled with MSVC. 2009-08-09 19:06:05 +00:00
rubidium 0d1b35a400 (svn r17129) -Codechange: also let strgen warn if the translation uses STRINGn or RAW_STRING instead of STRING. 2009-08-09 10:20:09 +00:00
rubidium ee2b7de8f4 (svn r17095) -Codechange: make ParseStringChoice a bit safer 2009-08-06 20:21:53 +00:00
smatz 4f0e62deb6 (svn r16627) -Fix: warning about comparing signed and unsigned types 2009-06-22 22:04:48 +00:00
rubidium d5ff6c7423 (svn r16625) -Fix: unsigned vs signed warning in strgen 2009-06-22 20:35:14 +00:00
rubidium cdc0c092f1 (svn r16591) -Codechange: some coding style in strgen 2009-06-18 11:17:55 +00:00
rubidium fa1dcd4194 (svn r16577) -Fix: signed/unsigned comparison 2009-06-14 17:02:09 +00:00
rubidium 28e6b46a41 (svn r16576) -Fix: show the line of the translation file that has the fault and not the line of the string in english.txt. 2009-06-14 17:01:12 +00:00
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
2009-05-10 17:27:25 +00:00
rubidium a36ab04d5d (svn r16145) -Add: '-export-pragmas' to strgen so external tools can (hopefully) automatically be updated to support new pragmas 2009-04-25 21:09:42 +00:00