Commit Graph

175 Commits

Author SHA1 Message Date
Alberth 5981ed248a Codechange: Remove unused FioTarFirstDir and FioTarAddLink functions 2019-07-21 19:11:31 +01: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
Patric Stout 72c5f2b3ee Remove: DOS support
In 10 years there was no active development on DOS. Although it
turned out to still work, the FPS was very bad. There is little
interest in the current community to look into this.

Further more, we like to switch to c++11 functions for threads,
which are not implemented by DJGPP, the only current compiler
for DOS.

Additionally, DOS is the only platform which does not support
networking. It is the reason we have tons of #ifdefs to support
disabling networking.

By removing DOS support, we can both use c++11 functions for threads,
and remove all the code related to disabling network. Sadly, this
means we have to see DOS go.

Of course, if you feel up for the task, simply revert this commit,
and implement stub c++11 functions for threads and stub functions
for networking. We are more than happy to accept such Pull Request.
2019-03-19 23:22:51 +01:00
Patric Stout 45fbaa64c2 Codechange: check if a define is set directly, instead of indirectly
config.lib happens to set GLOBAL_DATA_DIR in case it is not DOS
and not OS2, but this kind of deduction is annoying to maintain.
It is better to just check if the define you want to use is set,
and leave it to config.lib to set it or not depending on the OS.
2019-03-11 10:16:00 +01:00
Patric Stout 1f57150d80 Codechange: "basedir.h" is a system include, not a local 2019-03-11 10:16:00 +01:00
Patric Stout 7784d77713 Remove: MorphOS / AmigaOS support
In 10 years there is no commit to change how MorphOS works, and we
have no active maintainer for it. It is unlikely it works in its
current state (but not impossible).

With the arrival of SDL2 (and removal of SDL), MorphOS is no longer
support. There is an SDL2 port for MorphOS, but it is not maintained
by upstream SDL2, and nobody can currently test it out.

If anyone wants to re-add MorphOS, please do (revert this patch,
fix the problems, and create a Pull Request). If you need any help
doing so, let us know! It is not that we don't like MorphOS, it is
that we don't have anyone fixing the problems :(
2019-03-05 22:03:00 +01:00
glx c540d72445 Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32 2018-12-27 18:09:16 +01:00
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 2018-10-31 12:35:54 +01:00
Niels Martin Hansen 458e441a4c Codechange: Make FioCreateDirectory public 2018-06-05 22:58:35 +02:00
Patric Stout aef69443e7 Remove: WinCE support 2018-04-29 15:32:16 +02:00
frosch 2e20751c5f (svn r27954) -Cleanup [FS#6644]: Remove unused function (M3Henry) 2017-12-27 22:07:59 +00:00
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 2017-08-13 18:38:42 +00:00
frosch 4c50ecd958 (svn r27886) -Fix [FS#6575-ish]: Do not modify argv[0]. 2017-06-22 17:29:53 +00:00
rubidium 5ef2042819 (svn r26514) -Fix: rewrite link-in-tar handling so it doesn't use strncpy and it doesn't overrun its buffers anymore 2014-04-25 21:29:54 +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 8960939b22 (svn r26499) -Codechange: replace strndup with stredup 2014-04-24 18:37:39 +00:00
rubidium 21f991e235 (svn r26489) -Codechange: properly account for the end of buffers in the file io code instead of assuming MAX_PATH is okay 2014-04-23 21:23:21 +00:00
frosch ef4c2ce031 (svn r26485) -Codechange: Replace ttd_strlcpy and ttd_strlcat with strecpy and strecat. 2014-04-23 20:44:42 +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
rubidium d2ffba07bb (svn r26114) -Fix-ish: do our best to not get bit by getenv being unsafe as hell 2013-11-25 21:50:54 +00:00
rubidium 0ac9ed0b6b (svn r26089) -Fix: a number of minor memory leaks 2013-11-24 15:21:38 +00:00
rubidium 3eecd246eb (svn r26087) -Fix: file descriptor leak when finding a corrupt tar 2013-11-24 15:02:05 +00:00
rubidium b75e60124d (svn r26082) -Fix [FS#5816] (r26077): tar files with more than one file in the root directory would not be read properly (zydeco) 2013-11-24 13:00:06 +00:00
rubidium 5e2d22da79 (svn r26077) -Codechange: handle strings like strings when scanning a tar instead of merely blobs of memory 2013-11-23 21:42:45 +00:00
rubidium 5049e938f5 (svn r26076) -Codechange: upgrade some C-style named structs to C++-style named structs 2013-11-23 21:31:00 +00:00
rubidium 78a316d349 (svn r26061) -Fix: negative result of ftell wasn't handled correctly in some cases 2013-11-23 13:17:45 +00:00
rubidium 0e9c992104 (svn r26058) -Fix: handle the return value of a number of functions better 2013-11-23 13:15:07 +00:00
rubidium b934e528d9 (svn r26008) -Fix (r25975): uninitialised warning 2013-11-16 10:04:10 +00:00
rubidium ee137a5ced (svn r25975) -Feature [FS#5385]: XDG base directory support 2013-11-13 19:32:37 +00:00
rubidium def597fe31 (svn r25974) -Codechange: make the _personal_dir global const, since once it's set it shouldn't be changed anyhow 2013-11-13 18:57:25 +00:00
frosch 23ba42b66c (svn r25291) -Add: WindowDesc ability to load and store information in a config file. 2013-05-26 19:27:22 +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 d5d96ba683 (svn r24877) -Fix: some whitespace "errors" 2013-01-01 10:52:32 +00:00
frosch edd9c0553a (svn r24804) -Add: Separate subdirectory for screenshots. 2012-12-09 16:52:43 +00:00
rubidium 27cf8de733 (svn r23983) -Fix [FS#5083]: tarred heightmaps wouldn't be found 2012-02-25 08:42:39 +00:00
truebrain 963802e9a7 (svn r23612) -Add: allow importing libraries in the same way as AI does, only with GS prefix (and in game/library) 2011-12-19 20:56:59 +00:00
truebrain b4f832f29f (svn r23605) -Add: GAME_DIR and CONTENT_TYPE_GAME, and read gamescript from that directory 2011-12-19 20:54:37 +00:00
rubidium a3a2fdcfc2 (svn r23234) -Fix [FS#4840]: crash when after downloading content 2011-11-16 16:54:37 +00:00
frosch 1f6c9c6457 (svn r23228) -Fix (r23227): FileScanner::Scan() still did not scan all required directories for basesets. 2011-11-15 12:14:08 +00:00
frosch 7b86e3e109 (svn r23227) -Fix (r23219): The FileScanner should also consider the old directories. 2011-11-15 00:26:06 +00:00
frosch 52d3be2e05 (svn r23226) -Fix (r23219): If you find a file, also use it. 2011-11-15 00:25:17 +00:00
rubidium 86a168b2e9 (svn r23225) -Fix: create the newgrf/baseset/ai directories in the personal directory so the user has some clue where to place the different files 2011-11-14 21:58:19 +00:00
rubidium 2b897b4fa0 (svn r23219) -Change: different directories for basesets and newgrfs. So data to baseset or newgrf, and gm to baseset 2011-11-14 21:34:27 +00:00
rubidium 9e7174e540 (svn r23218) -Codechange: prepare code for a separate base set directory 2011-11-14 21:32:10 +00:00
rubidium 6d991b3b10 (svn r23217) -Codechange: introduce the concept of scanning only in a limited set of sub directories 2011-11-14 21:30:37 +00:00
rubidium 160294ff22 (svn r23216) -Codechange: introduce the concept of having different tar lists 2011-11-14 21:28:43 +00:00
rubidium 7fd1e1df81 (svn r23198) -Codechange: introduce a free that takes const pointers so we don't need to cast to void/non-const before being able to free 2011-11-12 13:00:29 +00:00
rubidium 414c397000 (svn r22904) -Codechange: add tar filename to file scanning 2011-09-08 09:48:52 +00:00
rubidium 672df52e0c (svn r22835) -Codechange: keep track of the subdirectory we are looking through in the file scanner 2011-08-25 10:31:35 +00:00