Commit Graph

101 Commits (ed1457dca335a68b74603b619584eff9f7231ef4)

Author SHA1 Message Date
rubidium42 75afd25e16 Change: do not print the '-' in front of help messages and make help messages more uniform 3 years ago
rubidium42 eb6cdadc4d Codechange: replace IConsolePrintF with IConsolePrint and fmt formatting
Also make some strings more consistent with the rest of the console strings.
3 years ago
rubidium42 b280a3a0ed Cleanup: remove IConsoleWarning/IConsoleError helpers
Both did not support format parameters, so in many places IConsolePrint(CC_ERROR, "message") was used with a style different from what IConsoleError would do.
3 years ago
rubidium42 efd4ba4797 Change: unify the style of console error messages and convert to fmt
Always start with a capital, do not add "ERROR: " in front of it.
3 years ago
rubidium42 121b037054 Codechange: remove single use IConsoleDebug 3 years ago
rubidium42 6b757c716a Codechange: add an IConsolePrint overload that does formatting with fmt 3 years ago
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 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
Loïc Guilloux 888389c28d
Codechange: Use std::string in console commands/aliases registration, and std::map instead our sorted linked list (#9057)
* Codechange: Use std::string in console commands and aliases registration

* Codechange: Use std::map to register console commands

* Codechange: Use std::map to register console aliases

* Cleanup: Remove now unused function
3 years ago
glx b5d56559d2 Fix #7969: limit recursion during alias execution 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
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
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 7 years ago
frosch 80d10598c1 (svn r27884) -Fix: Console command parser failed when the command had many parameters, and also did not print any error messages about it. 7 years ago
frosch bb02505fb3 (svn r27883) -Fix [FS#6576]: Console command parser passed invalid strings to the debug output, if command lines had many parameters. 7 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium e61fe21237 (svn r26506) -Codechange: replace most of vsnprintf with vseprintf 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
frosch 9041473814 (svn r26284) -Fix: Comparison of NULL and char 0. (lbalbalba) 10 years ago
rubidium 573f6dcd34 (svn r26100) -Fix: possible buffer overflow in console handling of aliases 11 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 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
rubidium b25cf57542 (svn r21701) -Codechange: ConsoleColour = TextColour, so make it that way and remove some unneeded casts 14 years ago
smatz cae28bf8eb (svn r21688) -Codechange: verify the colour code passed to IConsolePrint()/IConsolePrintF() is valid 14 years ago
smatz 62bc55cf7b (svn r21686) -Cleanup: remove unused constants and comment used ones 14 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
rubidium ad12a91cda (svn r20974) -Add: remote console (rcon) for remote admins (dihedral) 14 years ago
rubidium d98ff7c4c4 (svn r20515) -Feature: ignore _ in console command names so there is no "inconsistent" behaviour w.r.t. underscores anymore without breaking backwards compatability greatly 14 years ago
rubidium 605f6d0ed3 (svn r20280) -Fix: indentation of some switch cases 14 years ago
terkhen 88ca183191 (svn r20239) -Doc: Give a common name to all fall throughs (FALL THROUGH). 14 years ago
alberth ef17c6042f (svn r20021) -Codechange: Move variable declarations. 14 years ago
rubidium 9440f9f4c4 (svn r19862) -Change: allow "" and " " as arguments meaning nothing and space for the in-game console 14 years ago
frosch 9a00f6961f (svn r19514) -Codechange: Allow console hooks to deny existance of commands. 14 years ago
yexo 37a37c191d (svn r19512) -Fix (r19511): using the 'alias' console command it's possible to create a duplicate alias name 14 years ago
yexo f4a107dae5 (svn r19511) -Codechange: use a template for IConsoleAddSorted 14 years ago
rubidium 88f9ab5b9c (svn r19252) -Fix [FS#3639]: writing (console) output to a file failed on Windows if the date would not be logged. 14 years ago
smatz 07409e6741 (svn r19093) -Codechange: do not prefix console debug output with 'condbg', [console] is enough 15 years ago
smatz 8cd83f87df (svn r19085) -Codechange: simplify hooking of console commands 15 years ago
smatz 023fc16894 (svn r19083) -Cleanup: remove support for modifying variables from console 15 years ago
smatz d8a0278cf2 (svn r19082) -Codechange: make 'developer' a regular setting 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 860b9b1cea (svn r18028) -Codechange: unglobalise some functions 15 years ago
smatz 6c7f8fc8b4 (svn r17701) -Codechange: don't start line with a space if it's not inside comment 15 years ago
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 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