Commit graph

16 commits

Author SHA1 Message Date
Kp 0ffbc764af Store Windows HMP MIDIHDR inline in hmp_file
This avoids the need to make separate allocations for the individual
buffers, and to free them later.
2022-08-22 01:24:49 +00:00
Kp 3b5b69cb97 Improve error reporting for hmp_open / hmp2mid
Rework the error paths to return path-specific status codes so that the
caller can report exactly which step caused an HMP file to be rejected.
On error, print this reason numerically and, if the reason was a PhysFS
error, also print the PhysFS error code numerically and symbolically.
2022-03-19 22:55:58 +00:00
Kp 53761500f1 Qualify uses of std::array 2020-05-02 21:18:42 +00:00
Kp 12b57e84e6 Switch most in-tree http:// links to https://
For each link given as http://, verify that the site is accessible over
https:// and, if so, switch to it.  These domains were converted:

* llvm.org
* clang.llvm.org
* en.cppreference.com
* www.dxx-rebirth.com
* www.libsdl.org
* www.scons.org
2018-09-02 00:57:29 +00:00
Kp dc8c0323d8 Uninline namespace dcx 2015-12-13 18:00:49 +00:00
Kp 5b9e50a815 Use inline namespace dcx for common/misc 2015-12-05 22:57:24 +00:00
Kp 90fbebf8fd Convert most global arrays to array<> 2015-04-02 02:36:52 +00:00
Kp 2c8a07cfa7 Use vector<uint8_t> to manage current_music_hndlbuf 2014-09-20 23:14:03 +00:00
Kp efb8c495f6 Use unique_ptr for hmp_track data 2014-08-05 02:31:03 +00:00
Kp 81cb86f2e3 Use unique_ptr for hmp_file 2014-08-05 02:29:43 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp 073f00974a Eliminate uses of the typedef struct X { ... } X; pattern
C++ does not require this pattern.

import re, fileinput
to = re.compile(r'^typedef struct ([a-z_A-Z]+)\s*{')
tc = re.compile(r'^}(.*?)\s*([a-z_A-Z]+);$')
osn = None
for line in fileinput.input(inplace=True):
	m = to.match(line)
	if m:
		osn = m.group(1)
		print 'struct %s\n{' % osn
		continue
	if osn:
		m = tc.match(line)
		if m:
			csn = m.group(2)
			if osn == csn:
				print '}%s;' % m.group(1)
				osn = None
				continue
			else:
				osn = None
	print line,
2013-12-28 22:48:07 +00:00
Kp 9de54cfa74 Switch to C++ linkage
import fileinput
guard = 0
cxxguard = '#ifdef __cplusplus\n'
for line in fileinput.input(inplace=True):
	if line == cxxguard:
		guard = 1
		continue
	if guard:
		if line == 'extern "C" {\n':
			guard = 2
			continue
		if line == '}\n':
			guard = 0
			continue
		if guard == 2:
			assert(line == '#endif\n')
			guard = 0
			print cxxguard,
			continue
	print line,
2013-12-06 03:35:32 +00:00
Kp f8cb11d714 Move common/misc/hmp.c -> common/misc/hmp.cpp 2013-08-04 17:55:00 +00:00
Kp a1ba420031 Mark various parameters and variables as const 2013-07-20 23:12:24 +00:00
Kp 6555abf09e Move */include/hmp.h -> common/include/hmp.h 2013-03-03 01:03:33 +00:00
Renamed from d1x-rebirth/include/hmp.h (Browse further)