Commit Graph

52 Commits (3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc)

Author SHA1 Message Date
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.
5 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.
6 years ago
rubidium e61fe21237 (svn r26506) -Codechange: replace most of vsnprintf with vseprintf 10 years ago
rubidium 5b82822c12 (svn r26486) -Codechange: replace a number of snprintfs with seprintf 10 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 10 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(). 12 years ago
alberth b57bef91a1 (svn r24099) -Add: Output list of -d option facilities with in the help text. 12 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 14 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
rubidium 324389cf0b (svn r17488) -Feature [FS#2339]: add the date to all logging in the (real, not in-game) console if show_date_in_console is set. For dedicated server binaries the default is 'on', for the rest it is 'off'. 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium 7fb95e2c2b (svn r17228) -Codechange: some coding style fixes 15 years ago
smatz 64455d14ea (svn r16637) -Cleanup: remove unused _debug_station_level 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
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 16 years ago
rubidium 3c6add5293 (svn r14772) -Codechange: make the "dump log of game to reproduce" desync debug stuff a runtime configurable debug option instead of a compile time option. 16 years ago
skidd13 706dd0f86c (svn r14555) -Codechange: replace ttd_strlcat and ttd_strlcpy with strecat and strecpy where direct conversion is possible 16 years ago
rubidium 6b86de13d6 (svn r14200) -Fix (r14199): some OSes failed to compile. Furthermore I hate wrong comments! 16 years ago
smatz 927507818f (svn r13727) -Fix (r13375): compilation with NO_DEBUG_MESSAGES was broken 16 years ago
smatz c7a9637834 (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details 16 years ago
rubidium 5c5ee7eb57 (svn r13301) -Fix [FS#1997]: resolve more MSVC 9 x64 warnings. 16 years ago
rubidium 6c20f77330 (svn r13228) -Codechange: split console.h. 16 years ago
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
rubidium bbdc5a9314 (svn r11979) -Codechange: drop MSVC 2003 support because MSVC 2003 is broken in such a manner that it triggers an internal compiler error without any clue what of the code is wrong. Even trying to bisect the problem does not give a single line of code that causes the trouble. 17 years ago
rubidium 04f936c2c6 (svn r11811) -Fix: make compilation without networking work again (and thus move the debugdumpcommand stuff out of the network 'area'). 17 years ago
rubidium a3ccdcea36 (svn r11777) -Codechange: split the string header and make do not include it when it's not necessary. 17 years ago
peter1138 3182cbb332 (svn r11755) -Fix: Debug level string buffer was not long enough to contain all debug levels. 17 years ago
rubidium 429521a7d1 (svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h' 17 years ago
truelight b3bed1eda1 (svn r10778) -Fix: one-liners to allow MSVC and WINCE to work together (or anyway, a step towards that goal)
-Fix: put DEBUG lines under WINCE via a function designed for just that under WINCE
17 years ago
rubidium 24c4d5b06d (svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {}; 18 years ago
rubidium 36bb92ae24 (svn r9050) -Codechange: Foo(void) -> Foo() 18 years ago
belugas 6dbf9f2f41 (svn r8862) -Cleanup: doxygen changes, again. Mostly @files missing tags and a few comments style.
Some documentation addition, when i can easily supply them
18 years ago
truelight c46a1cc2f6 (svn r8631) -Add: added parameter -l ip[:port] to ./openttd, which redirects DEBUG() to a remote connection over TCP
For example, launch on 192.168.0.1 with, say, netcat a listener: netcat -l -p 3982
  Launch OpenTTD on a remote host (say, PSP): ./openttd -l 192.168.0.1 -d9
  And you get all debug information on 192.168.0.1. Very useful for debugging Portable systems.
18 years ago