Commit Graph

47 Commits

Author SHA1 Message Date
Peter Nelson 9915c1f032
Fix #12477: Use std::filesystem::rename instead of Windows Shell API call. (#12478) 2024-04-11 21:35:40 +01:00
Peter Nelson 233aac567b Codechange: Use std::list instead of C-linked list for ini files.
This removes self-management of memory with new/delete and allows simpler iteration.
2023-10-20 18:37:27 +01:00
Peter Nelson 8bd06807e4 Codechange: Pass initializer list instead of null-terminated list of group types. 2023-10-20 18:37:27 +01:00
Rubidium f5f6306af3 Codechange: use string/fmt instead of printf for ShowInfo(F) 2023-04-24 17:51:54 +02:00
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
Loïc Guilloux c64b0946e8
Fix e0561dbde: [MinGW] use ofstring(wchar_t*) as ofstring(wstring) doesn't exist (#8985) 2021-04-10 10:15:47 +01:00
Niels Martin Hansen e0561dbded Fix #8713: Change OTTD2FS and FS2OTTD to return string objects instead of static buffers 2021-04-07 09:31:47 +02:00
Niels Martin Hansen b427ddce88 Codechange: Switch to explicit wide strings 2021-02-23 11:25:39 +01:00
Michael Lutz 358056ec42 Codechange: Keep filenames of loaded Fio files in std::strings. 2020-12-27 13:19:25 +01:00
Michael Lutz dd138fc460 Codechange: Stringify config file paths. 2020-12-27 13:19:25 +01:00
Patric Stout d15dc9f40f Add: support for emscripten (play-OpenTTD-in-the-browser)
Emscripten compiles to WASM, which can be loaded via
HTML / JavaScript. This allows you to play OpenTTD inside a
browser.

Co-authored-by: milek7 <me@milek7.pl>
2020-12-15 15:46:39 +01:00
TechGeekNZ 716c883737 Fix: Globally apply preprocessor directive coding style
Global; except for the 32-bit SSE blitter, which has some #DEFINEs
in not-very-nice places.
2020-07-03 09:08:46 +02:00
Michael Lutz 715aa67a9c Codechange: Use std::string in INI file parsing. 2020-05-21 20:02:34 +02:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02: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
frosch 6114788508 (svn r27389) -Fix: There are two different availability conditions for fdatasync in the manpage. Use them both, since at least on some MinGW versions one is not enough. 2015-08-20 20:47:45 +00:00
rubidium 5ebf72d126 (svn r26517) -Fix: Windows 9x (or rather non-unicode) compile failures 2014-04-26 07:30:15 +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
michi_cc 36181b3fb2 (svn r24417) -Codechange: [Win32] Don't needlessly include windows.h in a commonly used header. 2012-07-19 19:21:47 +00:00
rubidium 05300a00b1 (svn r22824) -Codechange: pass sub directory to ini loading 2011-08-24 13:38:26 +00:00
rubidium 0061b5f184 (svn r22822) -Codechange: make a distinction between base sets and newgrfs for their directory 2011-08-24 13:33:49 +00:00
rubidium fb5ecb9499 (svn r22411) -Document: another bunch of bits 2011-05-02 17:42:12 +00:00
glx ec56036dc7 (svn r22179) -Fix (r22167): compilation on win32 2011-03-03 23:34:14 +00:00
alberth 722296e797 (svn r22168) -Codechange: Move ini file IO and file error reporting to virtual functions. 2011-03-03 20:53:09 +00:00
alberth d19a9f5df5 (svn r22167) -Codechange: Extract IniLoadFile base class for loading ini files out of IniFile. 2011-03-03 20:50:24 +00:00
alberth 31386c42a7 (svn r22145) -Codechange: Do explicit test for non-bool values. 2011-02-25 22:04:38 +00:00
rubidium 7efd7e19ed (svn r21845) -Codechange: move documentation towards the code to make it more likely to be updates [d-m]. 2011-01-18 22:31:06 +00:00
yexo e91e2498c7 (svn r20693) -Fix: use strncmp instead of memcmp for comparing strings 2010-08-30 10:49:02 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
smatz 114d48e492 (svn r17596) -Codechange: constify some tables 2009-09-20 23:11:01 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium 208234a7a0 (svn r16128) -Change: allow loading (and storing) NULL values for STRQ in openttd.cfg. 2009-04-23 19:13:41 +00:00
rubidium 930bc73e7a (svn r16018) -Fix (r16014): properly escape IPv6 style ([::]) addresses so they aren't seen as new groups. 2009-04-10 17:16:46 +00:00
michi_cc 0ca92a47a2 (svn r15707) -Fix (r15686): The config file was not updated on Windows because rename() can't replace existing files. 2009-03-14 00:26:03 +00:00
rubidium bd2e1ac903 (svn r15686) -Codechange: make it a bit harder for crashes to trash your config file. 2009-03-12 14:22:17 +00:00
rubidium 84e5e44ca9 (svn r15682) -Codechange: some coding style 2009-03-12 11:28:03 +00:00
peter1138 7d70f0cd14 (svn r15085) -Fix (r14164): Clearing a settings group did not delete old items nor reset the last_item pointer, causing lists to not be saved unless they started blank. 2009-01-14 20:23:45 +00:00
rubidium f4ee4fd5ae (svn r14257) -Fix (r14153): incorrect update of ini-file group tail pointer causing memory corruption. 2008-09-07 08:51:26 +00:00
rubidium a482f0053d (svn r14231) -Fix: Windows binaries not able to read non-windows newlines ini files. For more detail read the 'attached' diff. 2008-09-02 20:24:55 +00:00
rubidium ea1f180a55 (svn r14199) -Codechange: split fileio.h into fileio_type.h and fileio_func.h so not everything that includes saveload.h needs to include everything else too. 2008-08-31 10:50:05 +00:00
rubidium 621a9b647a (svn r14167) -Fix: items in some ini-groups got duplicated on save. 2008-08-25 15:15:41 +00:00
rubidium 411c65e755 (svn r14164) -Codechange: simplify and unify the addition of ini items with value when not loading an ini file.
-Fix: wrong insertion management causing leaks.
2008-08-25 06:35:28 +00:00
rubidium b2d6254b44 (svn r14161) -Codechange: allow inis to be loaded from tars. 2008-08-24 23:12:10 +00:00
smatz 0d4e7f9537 (svn r14156) -Fix (r14153): missing/wrong comments 2008-08-24 17:29:57 +00:00
rubidium ae32d158cb (svn r14153) -Codechange: split ini file reading/saving from settings.cpp. 2008-08-24 13:50:31 +00:00