Rubidium
f333372dd1
Codechange: let IConsoleCmdExec accept std::string
1 year ago
Rubidium
3f35787458
Codechange: replace stredup + StrMakeValidInPlace with std::string + StrMakeValid
1 year ago
Rubidium
e762855201
Cleanup: remove str_strip_colours; StrMakeValid also removes the colours
...
Essentially str_strip_colours followed by StrMakeValid makes the calling of
str_strip_colours useless, as StrMakeValid would have removed them too.
1 year ago
Rubidium
35f7f7e8dc
Codechange: use std::string for executing the console aliases
1 year ago
Rubidium
275ebf4509
Codechange: replace fprintf(<FILE*> with fmt::print(<FILE*>
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
Jonathan G Rennison
0a7ffae0d9
Fix #10010 : Memory leak in IConsolePrint in non-dedicated case
2 years ago
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
5 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
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)
11 years ago
rubidium
e61fe21237
(svn r26506) -Codechange: replace most of vsnprintf with vseprintf
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
frosch
9041473814
(svn r26284) -Fix: Comparison of NULL and char 0. (lbalbalba)
11 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
15 years ago
frosch
9a00f6961f
(svn r19514) -Codechange: Allow console hooks to deny existance of commands.
15 years ago
yexo
37a37c191d
(svn r19512) -Fix (r19511): using the 'alias' console command it's possible to create a duplicate alias name
15 years ago
yexo
f4a107dae5
(svn r19511) -Codechange: use a template for IConsoleAddSorted
15 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.
15 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