Commit Graph

101 Commits

Author SHA1 Message Date
rubidium42
75afd25e16 Change: do not print the '-' in front of help messages and make help messages more uniform 2021-06-13 15:25:31 +02:00
rubidium42
eb6cdadc4d Codechange: replace IConsolePrintF with IConsolePrint and fmt formatting
Also make some strings more consistent with the rest of the console strings.
2021-06-13 15:25:31 +02:00
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.
2021-06-13 15:25:31 +02:00
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.
2021-06-13 15:25:31 +02:00
rubidium42
121b037054 Codechange: remove single use IConsoleDebug 2021-06-13 15:25:31 +02:00
rubidium42
6b757c716a Codechange: add an IConsolePrint overload that does formatting with fmt 2021-06-13 15:25:31 +02:00
rubidium42
55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
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.
2021-05-29 11:21:38 +02:00
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
2021-04-24 15:19:57 +02:00
glx
b5d56559d2 Fix #7969: limit recursion during alias execution 2020-02-04 18:41:38 +01: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
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.
2019-03-20 19:24:55 +01:00
Charles Pigott
f5b1115039 Doc: Lots and lots of doxymentation fixes 2018-10-31 12:35:54 +01:00
frosch
b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 2017-08-13 18:38:42 +00:00
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. 2017-06-22 16:32:50 +00:00
frosch
bb02505fb3 (svn r27883) -Fix [FS#6576]: Console command parser passed invalid strings to the debug output, if command lines had many parameters. 2017-06-22 16:31:04 +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
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
frosch
9041473814 (svn r26284) -Fix: Comparison of NULL and char 0. (lbalbalba) 2014-01-28 20:03:12 +00:00
rubidium
573f6dcd34 (svn r26100) -Fix: possible buffer overflow in console handling of aliases 2013-11-25 10:13:59 +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
rubidium
d8d2f74559 (svn r23741) -Revert (r23740): the few parts that the Windows / non-network compiles stumble on 2012-01-03 21:47: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
b25cf57542 (svn r21701) -Codechange: ConsoleColour = TextColour, so make it that way and remove some unneeded casts 2011-01-03 12:01:41 +00:00
smatz
cae28bf8eb (svn r21688) -Codechange: verify the colour code passed to IConsolePrint()/IConsolePrintF() is valid 2011-01-01 17:06:59 +00:00
smatz
62bc55cf7b (svn r21686) -Cleanup: remove unused constants and comment used ones 2011-01-01 16:35:32 +00:00
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 2010-10-17 17:50:40 +00:00
rubidium
a5d414a734 (svn r20975) -Add: logging of console output for remote admins (dihedral) 2010-10-17 17:43:01 +00:00
rubidium
ad12a91cda (svn r20974) -Add: remote console (rcon) for remote admins (dihedral) 2010-10-17 17:41:52 +00:00
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 2010-08-16 15:18:21 +00:00
rubidium
605f6d0ed3 (svn r20280) -Fix: indentation of some switch cases 2010-08-01 18:48:00 +00:00
terkhen
88ca183191 (svn r20239) -Doc: Give a common name to all fall throughs (FALL THROUGH). 2010-07-29 14:26:28 +00:00
alberth
ef17c6042f (svn r20021) -Codechange: Move variable declarations. 2010-06-26 15:12:51 +00:00
rubidium
9440f9f4c4 (svn r19862) -Change: allow "" and " " as arguments meaning nothing and space for the in-game console 2010-05-20 15:10:33 +00:00
frosch
9a00f6961f (svn r19514) -Codechange: Allow console hooks to deny existance of commands. 2010-03-24 20:43:31 +00:00
yexo
37a37c191d (svn r19512) -Fix (r19511): using the 'alias' console command it's possible to create a duplicate alias name 2010-03-24 11:20:30 +00:00
yexo
f4a107dae5 (svn r19511) -Codechange: use a template for IConsoleAddSorted 2010-03-24 11:11:38 +00:00
rubidium
88f9ab5b9c (svn r19252) -Fix [FS#3639]: writing (console) output to a file failed on Windows if the date would not be logged. 2010-02-25 18:26:55 +00:00
smatz
07409e6741 (svn r19093) -Codechange: do not prefix console debug output with 'condbg', [console] is enough 2010-02-10 23:38:43 +00:00
smatz
8cd83f87df (svn r19085) -Codechange: simplify hooking of console commands 2010-02-10 18:18:08 +00:00
smatz
023fc16894 (svn r19083) -Cleanup: remove support for modifying variables from console 2010-02-10 17:32:39 +00:00
smatz
d8a0278cf2 (svn r19082) -Codechange: make 'developer' a regular setting 2010-02-10 17:01:03 +00:00
smatz
ac6ff0de9b (svn r19079) -Codechange: use _debug_console_level instead of _stdlib_con_developer 2010-02-10 16:10:05 +00:00
rubidium
82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
rubidium
860b9b1cea (svn r18028) -Codechange: unglobalise some functions 2009-11-09 10:40:33 +00:00
smatz
6c7f8fc8b4 (svn r17701) -Codechange: don't start line with a space if it's not inside comment 2009-10-04 20:51:50 +00:00
rubidium
d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
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'. 2009-09-09 15:11:46 +00:00