Commit graph

3865 commits

Author SHA1 Message Date
Turo Lamminen
5bd5e1629b hexen/sv_save.c: Error out on incomplete read 2018-01-27 16:46:04 +02:00
Turo Lamminen
e1e4cbd6c3 heretic/p_saveg.c: Error out on incomplete read 2018-01-27 16:46:04 +02:00
Turo Lamminen
ea59eb7140 strife: Don't ignore return value of fread() call when loading savegame mission objective 2018-01-27 16:46:04 +02:00
Turo Lamminen
5941db63ff i_sdlmusic: Don't ignore return value of fgets() call 2018-01-27 16:46:04 +02:00
Turo Lamminen
f39a5d2cd1 strife: Don't ignore return value of fread() call 2018-01-27 16:46:04 +02:00
Turo Lamminen
091fdce059 heretic: Don't ignore return value of fread() call 2018-01-27 16:46:04 +02:00
Turo Lamminen
52bf4884aa doom: Don't ignore return value of fread() call 2018-01-27 16:46:04 +02:00
Turo Lamminen
41b772f1e4 Swap fread parameters so return value makes more sense 2018-01-27 16:46:04 +02:00
Turo Lamminen
5e2df0a52e textscreen: Don't ignore return value of system() call 2018-01-27 16:46:04 +02:00
Turo Lamminen
e326cd331e travis: Treat warnings as errors 2018-01-27 16:46:04 +02:00
Turo Lamminen
edd74056ba configure.ac: Add configure option to treat warnings as errors 2018-01-27 16:46:04 +02:00
Mike Swanson
96e0123cd2 bash-completion: complete list of valid -gameversion parameters 2018-01-27 04:52:05 -08:00
Mike Swanson
da88012088 bash-completion: Build from actual shell script templates.
At some point, the Makefile was inerrantly modified so that it
generated manpage sources instead of shell script, making completions
very screwed up.
2018-01-27 04:49:08 -08:00
Mike Swanson
3582793055 Update AppStream XML files to current (0.11) standards
<id> tag is changed to a Reverse-DNS form, and an accommodating
PACKAGE_RDNS is set in configure.ac to use it.

<name> and <summary> tags have been added, using existing autoconf
variable values.

The `appstream-util validate` command will complain about some
optionally-missing tags and a strict string length limit on some of
the <caption> tags.  `validate-relax` passes, and by the letter of the
AppStream specification, we should be completely valid.
2018-01-22 20:41:16 -08:00
Fabian Greffrath
12d69a4ee6 install AppStream metadata into the proper location
AppStream metadata is to be placed in the /usr/share/metainfo/ directory, /usr/share/appdata is a legacy location.
2018-01-22 17:24:41 +01:00
Simon Howard
60c3beb693 Merge branch 'master' of github.com:chocolate-doom/chocolate-doom 2018-01-21 02:44:07 -05:00
Simon Howard
50f881cdc2 hexen: Remove test code mistakenly added.
This fixes spurious ACS assertion failures which were mistakenly
added in 666e8da5fd.
2018-01-21 02:43:07 -05:00
Jonathan Dowland
497514e39d better choice of substvar for chocolate-server.6 2018-01-15 19:18:52 +00:00
Jonathan Dowland
433230aa40 man: Fix simplecpp -D arguments 2018-01-15 19:10:52 +00:00
Jonathan Dowland
ccfbd4a046 bash-completion: run docgen with -z argument 2018-01-15 19:10:16 +00:00
Jonathan Dowland
69b8043958 fix typo @PACKAGE_SHORTNAME + '@' 2018-01-15 19:01:53 +00:00
Jonathan Dowland
70d910d307 Fix generation of top-level INSTALL file 2018-01-15 18:49:57 +00:00
Simon Howard
91a66a7ecb Replace COPYING with COPYING.md Markdown version.
It's not the '90s any more!
2018-01-14 23:26:54 -05:00
Simon Howard
40811c8eaa INSTALL: Update patch file links.
The ftp.idsoftware.com server died several months back. Some context:
<https://www.doomworld.com/forum/topic/96999-rip-ftpidsoftwarecom/>

Instead, point at the mirrors found in the idgames repository, using
the gamers.org version since this is the canonical copy everything else
mirrors from. Unfortunately it's not possible to point at the Doomworld
idgames interface since the patches don't appear in the database there.
2018-01-14 23:02:52 -05:00
Simon Howard
55a1c1c9e5
hexen: Fix spelling error
Thanks Fabian.
2018-01-10 03:01:46 +00:00
Jonathan Dowland
a42d9a2207
Merge pull request #962 from jmtd/manpage-fixes
Manpage fixes
2018-01-09 17:20:50 +00:00
Jonathan Dowland
45880bd205 Implement suggestions from Fabian. Thanks! 2018-01-09 17:19:49 +00:00
Jonathan Dowland
d0aca32411 don't build chocolate-setup.6 anymore; more subs
Build chocolate-game-setup.6 directly instead of building
chocolate-setup.6 and copying it to for each game. Apply
substitutions to the template text to replace Chocolate,
chocolate etc., as well as substituting the proper default
cfg equivalent (e.g. heretic.cfg) for each game.
2018-01-09 17:19:49 +00:00
Jonathan Dowland
32ccfe015a expand docgen/default.cfg.template substitutions
Move to a "substs" hash in docgen which contains pairs of strings
to substitute. Populate @GAME@, @GAME_UPPER@ and @CFGFILE@ based
on the game supplied via -g.

Make the corresponding substitutions in default.cfg.template. Now
all of {default,heretic,hexen,strife}.cfg.5 are correct for the
respective game.
2018-01-09 17:19:49 +00:00
Jonathan Dowland
f515c88a96 install.template: move definitions to Makefile
Define and pass LONG_EXE_NAME and LONG_GAME_NAME within the
controlling Makefile when generating INSTALL.*, instead of
deriving their values within the template depending on whether
DOOM/HERETIC/HEXEN/STRIFE are defined.

This means we can incorporate the values from @PROGRAM_PREFIX@
and @PACKAGE_SHORTNAME@, instead of hardcoding chocolate- and
Chocolate, respectively.
2018-01-09 17:19:49 +00:00
Jonathan Dowland
c1f553b92a further manpage substitutions and fixes
Convert chocolate-setup.6 into a template file and generate outputs
based on @PROGRAM_PREFIX@.

Add @PACKAGE_SHORTNAME@ to the list of parameters handed to docgen
and make appropriate substitutions in the manpage templates.
2018-01-09 17:19:49 +00:00
Jonathan Dowland
e0b8a7e0a9 overhaul manpages, add parameters
This is in order to better support derivative engines.

Rework the manpages to be parameterized with @PROGRAM_PREFIX@ and
@PACKAGE_NAME@. Alter the `docgen` generator to substitute those
parameters. Supply those parameters via the autofoo Makefile.

Adjust the fixed path chocolate-server.6 to be generated from
server.template, similar to doom.template -> chocolate-doom.6.

Further work is required, not least renaming chocolate-setup.6,
but several further parameterizations.
2018-01-09 17:19:49 +00:00
Simon Howard
16ae1b6ced
Merge pull request #957 from BlooD2oo1/sdl2-branch
Make 0 and 5 keys on the numeric keypad bindable for left handed users
2018-01-06 22:32:19 +00:00
Simon Howard
591422453f Merge remote-tracking branch 'origin/sdl2-branch' 2018-01-06 22:30:47 +00:00
Simon Howard
d2cdb39833
Merge pull request #966 from duganchen/icon-locations
Install icons to PREFIX/share/icons/hicolor/128x128/apps
2018-01-06 21:07:20 +00:00
Mike Swanson
154c1d54dd pkg/win32: use --add-bom when processing files in unix2dos
Windows Notepad won’t display non-ASCII UTF-8 characters properly
without a byte-order-mark at the beginning of the file.
2018-01-06 09:31:51 -08:00
Simon Howard
666e8da5fd hexen: Add extra context for assertion failures.
If bugs are encountered, it may be helpful to get some extra detail
about the context in which the assertation failed, including the
offset inside the BEHAVIOR lump.
2018-01-05 21:07:03 +01:00
Simon Howard
f5446def0c hexen: Change comment to American spelling. 2018-01-05 20:52:04 +01:00
Simon Howard
ffa290d23c hexen: Validate strings during header parsing.
Strings must be terminated with a NUL before the end of the lump is
reached; if not they are invalid. Check that this really is the case.
2018-01-05 20:44:51 +01:00
Simon Howard
55fb41791d hexen: Replace ValidateLumpOffset with ReadOffset().
All offsets to be validated are now read as immediate values anyway.
2018-01-05 20:36:38 +01:00
Simon Howard
29994d4dbd hexen: Validate ACS instructions.
We do an array lookup based on the instruction we read, so it is
important that the instruction is within the bounds of the array. In
particular the instruction may an extension supported by an advanced
source port like ZDoom, that we don't support.
2018-01-05 20:28:53 +01:00
Simon Howard
f4f2242c55 hexen: Use ReadCodeInt() to parse header.
This needs to be validated too, and it's simplest to just reuse the
same mechanism used for executing code.
2018-01-05 20:26:13 +01:00
Simon Howard
53e98bc707 hexen: Remove PCodePtr entirely.
Stop using pointers to represent code location; instead use an offset
from the start of the lump. This can be continually validated for
correctness and we exit with an error if we pass the end of the lump.
2018-01-05 20:19:26 +01:00
Simon Howard
fe9adcbd0b hexen: Add validation of lump offset values.
Offsets like these (used for eg. CmdGoto instructions) should point to
a location inside the lump; otherwise it is an error and we should fail
an assertion.
2018-01-05 20:02:06 +01:00
Simon Howard
4ec7962877 hexen: Eliminate most direct usage of PCodePtr.
ReadCodeImmediate() will be a safer and simpler way to read additional
arguments from the code buffer.
2018-01-05 19:44:38 +01:00
Simon Howard
5e51c20327 hexen: Add bounds checking for CmdPrintCharacter.
If adding another character to the print buffer would cause a buffer
overflow, don't exceed the limits of the buffer. Similar protection
is already in place for CmdPrintString and CmdPrintNumber.
2018-01-05 12:41:32 +01:00
Simon Howard
714b700b1c hexen: Add doc comments for new functions. 2018-01-05 01:47:19 +01:00
Simon Howard
07109cb24f hexen: Add bounds checking for strings table.
ACS lumps provide a strings table but we must enforce that all lookups
into this table are properly bounds checked.
2018-01-05 01:36:31 +01:00
Simon Howard
118d869f5b hexen: Add bounds checking for world variables.
There is a fixed number of world variables and the limit should not
be exceeded.
2018-01-05 01:27:11 +01:00
Simon Howard
005a79c652 hexen: Add bounds checking for map variables.
There is a fixed number of map variables and the limit should not
be exceeded.
2018-01-05 01:24:29 +01:00