Commit Graph

76 Commits (f120d2beb8cbbc34ac4d1e7312a656182cf3f006)

Author SHA1 Message Date
Rubidium 53f83c31b0 Codechange: use std::string to return the debug level information 1 year ago
Rubidium a19a43a4f7 Codechange: use fmt::format and time conversions over "custom" implementation 1 year ago
Rubidium 411379f587 Codechange: replace puts with fmt::print 1 year ago
Rubidium 275ebf4509 Codechange: replace fprintf(<FILE*> with fmt::print(<FILE*> 1 year ago
Rubidium 07860e67e2 Codechange: use fmt::format_to to format the help message 1 year ago
Peter Nelson 83f2ad500e Codechange: stdarg.h include not needed as cstdarg is included. 1 year ago
Charles Pigott 80bd5ad727
Codechange: Use std::strto* variants everywhere (#10720) 1 year ago
Rubidium f5f6306af3 Codechange: use string/fmt instead of printf for ShowInfo(F) 1 year ago
Peter Nelson f6ad8e1c9c Change: Rename some freetype things to fontcache.
The font cache supports more than just FreeType as a font provider, but still used freetype in some naming.

This now uses more suitable terms.
2 years ago
Niels Martin Hansen aaab0610eb Fix: Only apply debuglevel changes after successful parse 2 years ago
Niels Martin Hansen c6953f13e4 Fix #9940: Print debuglevel parse errors to console when changed from console 2 years ago
Rubidium 92559e6f3a Fix #9388: thread unsafe use of NetworkAdminConsole/IConsolePrint 3 years ago
glx22 16abdd5254 Change: [Win32] Set the console codepage to UTF-8 3 years ago
rubidium42 121b037054 Codechange: remove single use IConsoleDebug 3 years ago
rubidium42 7d79180040 Codechange: use fmt in DebugPrint where applicable 3 years ago
rubidium42 352dbdd570 Cleanup: remove old DEBUG macro and debug function 3 years ago
rubidium42 a99ac62c1a Codechange: use the fmt library for simpler debug formats 3 years ago
rubidium42 aa5a8fe28a Codechange: use thread safe time functions
Functions like localtime, gmtime and asctime are not thread safe as they (might) reuse the same buffer. So use the safer _s/_r variant for localtime and gmtime, and use strftime in favour of asctime.
3 years ago
Niels Martin Hansen 746f1ca11a Codechange: Remove the now meaningless console_cp parameter from OTTD2FS 4 years ago
Niels Martin Hansen e0561dbded Fix #8713: Change OTTD2FS and FS2OTTD to return string objects instead of static buffers 4 years ago
Patric Stout fe451b8dc7 Codechange: remove _realtime_tick variable 4 years ago
Niels Martin Hansen b427ddce88 Codechange: Switch to explicit wide strings 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 6 years ago
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
6 years ago
glx c540d72445 Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32 6 years ago
Michael Lutz 3fc9c9522d Codechange: [Win32] Use a local buffer to store the output text of DEBUG() to make the call thread-safe. 6 years ago
Patric Stout aef69443e7 Remove: WinCE support 6 years ago
Patric Stout 17bd580630
Remove: NO_DEBUG_MESSAGES was only read and setting it broke compilation (#6703)
Given any speed issue cannot be attributed to checking for _debug_NNN_level, removing this is a safe action

This fixes #6652.
7 years ago
rubidium e61fe21237 (svn r26506) -Codechange: replace most of vsnprintf with vseprintf 11 years ago
rubidium 5b82822c12 (svn r26486) -Codechange: replace a number of snprintfs with seprintf 11 years ago
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 11 years ago
rubidium 0e9c992104 (svn r26058) -Fix: handle the return value of a number of functions better 11 years ago
michi_cc e3648455aa (svn r25674) -Fix: [Win32] The console code page for non-Unicode builds is not the normal ANSI code page and definitely not UTF-8 either. 11 years ago
michi_cc afdaddd392 (svn r24109) -Fix (r24099): Warning from not using size_t to store the return value of strlen(). 13 years ago
alberth b57bef91a1 (svn r24099) -Add: Output list of -d option facilities with in the help text. 13 years ago
rubidium a48e3cb891 (svn r23854) -Codechange: make it easier to put random debug stuff into the random log 13 years ago
rubidium d8d2f74559 (svn r23741) -Revert (r23740): the few parts that the Windows / non-network compiles stumble on 13 years ago
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 13 years ago
truebrain a8b22e5292 (svn r23386) -Fix: debug script related events to 'script' (removes 'ai') 13 years ago
rubidium cca0ca3d70 (svn r20977) -Fix (r20975): compilation didn't get to the link stage if you, or config.lib, decided you don't need network support 14 years ago
rubidium a5d414a734 (svn r20975) -Add: logging of console output for remote admins (dihedral) 14 years ago
alberth dfeac6ba2e (svn r20784) -Doc: Doxyment a few debug line printing functions. 14 years ago
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 14 years ago
alberth be6c058424 (svn r20211) -Codechange: Indented code should have curly braces around it. 14 years ago
rubidium 34764feac2 (svn r20186) -Codechange: remove VARDEF from _realtime_tick and _rightclick_emulate 14 years ago
rubidium d8baa1342c (svn r19589) -Change: add some more useful information to the desync log and unify the formatting 15 years ago
smatz 78ce2858fc (svn r19080) -Cleanup: remove unused _debug_ntp_level and _debug_ms_level 15 years ago
smatz ac6ff0de9b (svn r19079) -Codechange: use _debug_console_level instead of _stdlib_con_developer 15 years ago
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago