1
0
Fork 0
Commit graph

4513 commits

Author SHA1 Message Date
Patryk Obara
15c694af21 Update allowed warnings limits 2019-12-19 00:09:44 +01:00
Patryk Obara
c81269eebe Remove extern global variable from bios_disk.h
This way interface of swapInDisks function is cleaner and we avoid a
warning when comparing (previously) signed swap position with an
unsigned array size or index.

Also, add some documentation to swapInDisks function.
2019-12-18 23:56:28 +01:00
Patryk Obara
8f81eb199a Simplify swapInDisks function
After introducing shared_ptr, previous implementation of this function
confused Clang static analyzer into reporting a false-positive "use
after free".

Also, do small cleanup in lines touching diskSwap array.
2019-12-18 23:56:28 +01:00
Patryk Obara
5f282f6015 Use shared_ptr to prevent double free on imageDisk
Also, replacing unique_ptr with shared_ptr makes it unnecessary to move
a pointer when swapping boot disks; moving shared_ptr would lead to
inconsistent internal state.

Fixes: #94
2019-12-18 23:56:28 +01:00
Patryk Obara
70a1f9f0d1 Remove PHYSICAL_CD from MountType enum 2019-12-18 22:31:19 +01:00
Patryk Obara
94b987b5b5 Update MSF conversion functions
All usecases, that required these functions to pass 3 values separately
are now gone, we can simply pass/return a struct now.
2019-12-18 22:31:19 +01:00
Patryk Obara
f66a4f5416 Fix a number of effc++ warnings 2019-12-18 22:31:19 +01:00
Patryk Obara
8b86910c33 Add user-visible warnings about removed options 2019-12-18 22:31:19 +01:00
Patryk Obara
d035c2cbd9 Move GetMountType to dos_mscdex file
This was the only user of this function.
2019-12-18 22:31:19 +01:00
Patryk Obara
3e6e97bf47 Create dos_mscdex header 2019-12-18 22:31:19 +01:00
Patryk Obara
28dd59e03e Introduce MountType enum for CDROM_GetMountType 2019-12-18 22:31:19 +01:00
Patryk Obara
f82a0a46da Remove dead code for force selecting CD drive 2019-12-18 22:31:19 +01:00
Patryk Obara
ac4411389b Remove CDROM_USE_SDL enum value 2019-12-18 22:31:19 +01:00
Patryk Obara
3e3c2c02b4 Update INTRO CDROM text 2019-12-18 22:31:19 +01:00
Patryk Obara
82dcb47b3c Remove all physical CD-ROM references from manual 2019-12-18 22:31:19 +01:00
Patryk Obara
e1286efca9 Remove SDL_cdrom 1.2 based CD-ROM interfaces
This removes a feature of mounting physical CD-ROMs in DOSBox.

SDL 2.0 removed SDL_cdrom from supported libraries, so to bring this
code back, either the functionality will need to be reimplemented or
SDL_cdrom code modernized for SDL 2.0, and bundled with the repo (the
same way SDL_sound is already bundled).
2019-12-18 22:31:19 +01:00
krcroft
12ee84cfd4 Fixed --enabled-debug on Windows MSYS2
This fixes the prior logic that relies on the (*)curses library
and header existing in compiler-derived default locations
such as /usr/include, and /usr/lib. However, if the package manager
happens to not install them there, then they will not be found
and the check will fail.

Four scenarios:
1. `./configure` or `./configure --enable-debug=no` produce:
    (no mention of debugger; configure continues)

2. `./configure --enable-debug=wrong` produces:
    configure: error: --enable-debug=wrong was requested but the value "wrong" is invalid
    (terminates with exit code 1)

3. `./configure --enable-debug` produces:

    config.h:
    defines C_DEBUG 1

    With only ncurses library installed:

    configure: debugger was requested, finding curses library ...
    checking for NCURSES... yes
    configure: debugger enabled using the ncurses library

    Makefile:
    CPPFLAGS = ... -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/usr/local/ncurses ...
    LIBS = ...  -L/usr/local/ncurses -lncurses -ltinfo ...

    With only ncursesw installed:

    configure: debugger was requested, finding curses library ...
    checking for NCURSES... no
    checking for NCURSESW... yes
    configure: debugger enabled using the ncursesw library

    Makefile:
    CPPFLAGS = ... -I/opt/ncursesw ...
    LIBS = ... -L/opt/ncursesw -lncursesw ...

    With only pdcurses isntalled:

    configure: debugger was requested, finding curses library ...
    checking for NCURSES... no
    checking for NCURSESW... no
    checking for PDCURSES... yes
    configure: debugger enabled using the pdcurses library

    Makefile:
    CPPFLAGS = ... -I/usr/local/pdcurses ...
    LIBS = ...  -L/usr/local/pdcurses -lpdcurses -ltinfo ...

    Without any curses library installed:

    configure: debugger was requested, finding curses library ...
    checking for NCURSES... no
    checking for NCURSESW... no
    checking for PDCURSES... no
    configure: error: Package requirements were not met:
    <pkg-info prints info about missing package>
    (terminates with exit code 1)

4. `./configure --enable-debug=heavy` produces same as above, but:

    config.h:
    defines C_DEBUG 1
    defines C_HEAVY_DEBUG 1

    The configure message mentions heavy, for example:

    configure: debugger was requested, finding curses library ...
    checking for NCURSES... yes
    configure: debugger with heavy debugging enabled using the ncurses library
2019-12-14 17:51:11 +01:00
Patryk Obara
5cc7e300e5 Remove inaccurate information from INTRO 2019-12-14 03:35:27 +01:00
Patryk Obara
b8fdf961ae Display a warning when user requests -ioctl 2019-12-14 03:35:27 +01:00
Patryk Obara
ddda555854 Remove MCI, DX, and DIO CD-ROM interfaces
Also, remove all traces of these interfaces from user manual (README
file) and man page (docs/dosbox.1).

MCI (Media Control Interface) was a primary Windows interface. Code
comments and documentation claimed, that it's only for "NT, 2000, XP"
but the code was enabled for Windows 2000 or later (version > 4.0).

DX (Digital audio eXtraction (?)) could be forced on any Windows with
autodetection working only on Vista and Windows 7 (code was disabled for
Windows 8 or later - probably unintentionally).

DIO used DeviceIoControl interface and Windows-specific ioctl calls.

All 3 interfaces depend on SDL and SDL_cdrom functionality to work.
SDL_cdrom 1.2 implementation uses MCI on Windows to provide the same
functionality.
2019-12-14 03:35:27 +01:00
Patryk Obara
ba88bd97d7 Avoid libpng 1.2 dependency for Ubuntu releases
This is a temporary fix for Ubuntu-based distributions. When SDL1 will
be replaced by SDL2, we'll be able to revert this change.

Fixes: #84
2019-12-12 22:52:19 +01:00
Patryk Obara
55b716f8ce Reverse sort by count and item name in the summary
When two files have the same number of warnings, they will appear
in the same order in the summary, making the diff between different
build logs smaller.
2019-12-12 21:24:40 +01:00
Patryk Obara
3b5c3beacf Add an option to list all warnings
Sorted list makes it easier to make a diff of two build logs.
2019-12-12 21:24:40 +01:00
Patryk Obara
c422854482 Add an option to group warnings by files
This change makes it easier to track code areas, that require attention.
2019-12-12 21:24:40 +01:00
Patryk Obara
1f67a5ee7a Set the default max limit of warnings to 0
Most linters behave this way, so it will fit the users' expectations.

Make -m optional, this makes the script a little bit easier to use.
Behaviour of MAX_WARNINGS and using -1 to disable the check is
preserved.
2019-12-12 21:24:40 +01:00
krcroft
3a930b639e Pull the entire repo for release bulds 2019-12-12 21:17:34 +01:00
krcroft
c11ef240b3 Back-out change for the release build (?) 2019-12-12 21:17:34 +01:00
krcroft
d698586779 Only checkout the target branch 2019-12-12 21:17:34 +01:00
krcroft
d22d48b527 Add all OSes to the workflow 2019-12-11 20:30:19 +01:00
krcroft
343c85fa17 Add empty file to hide automator warning 2019-12-11 20:30:19 +01:00
krcroft
be4d063415 Allow extra arguments to become ./configure flags 2019-12-11 20:30:19 +01:00
krcroft
4a2eacc014 Add ability to exclude packages by pattern 2019-12-11 20:30:19 +01:00
krcroft
d12172b8a4 Add ncurses to installer packages 2019-12-11 20:30:19 +01:00
krcroft
eb9c0a8ec3 Ensure make uses ASCII-only characters 2019-12-11 20:30:19 +01:00
krcroft
92266db4f6 Add "warnmore" build-type to the build script 2019-12-11 20:30:19 +01:00
krcroft
5beac8e310 Remove unecessary string quotes 2019-12-11 20:30:19 +01:00
krcroft
7fe6f7f04c Add -DNDEBUG to common release flags 2019-12-11 20:30:19 +01:00
krcroft
39509f7378 Configure and build all allowable configurations 2019-12-11 20:30:19 +01:00
krcroft
77a95af478 Stop submitting builds to Coverity for now 2019-12-10 23:27:07 +01:00
Patryk Obara
4bf4997251 Update allowed warnings limits 2019-12-10 15:41:38 +01:00
Patryk Obara
61511a4bdf Merge branch 'svn/trunk' r4301 2019-12-10 15:27:14 +01:00
Peter Veenstra
77a46559a6 Additional refinements and speed ups. Thanks jmarsh!
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4301
2019-12-10 14:07:20 +00:00
Peter Veenstra
b6c8583763 Merge 0.74-3 Changelog and NEWS into trunk. Fixes bug #522
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4300
2019-12-10 14:03:40 +00:00
Peter Veenstra
d37d74791e Simplify and correct flags handling so that childpsp works correctly and some misc fixes.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4299
2019-12-10 13:29:10 +00:00
Patryk Obara
d340a6b8f2 Add URLs for branches to README.md 2019-12-10 14:17:27 +01:00
Patryk Obara
fc321a7fa2 Merge branch 'svn/trunk' r4298 2019-12-10 12:42:57 +01:00
Patryk Obara
c4e68070a6 Update allowed warnings limits 2019-12-10 12:40:07 +01:00
Patryk Obara
07fc74cff4 Silence 12 switch warnings
Author's intention was sufficiently explained in the comment
in this case.
2019-12-10 12:40:07 +01:00
Patryk Obara
6dde4e78bf Fix usage of uninitialized value in dos_mscdex
These issues were detected by Clang static analyzer.

Calling GetCurrentPos might leave pos uninitialized, and it will result
in passing uninitialized value pos.min to msf_to_frames function.

Same situation might happen for GetAudioStatus and all variables it
misses to initialize.
2019-12-10 12:40:07 +01:00
Patryk Obara
496611b2ce Fix out-of-bounds access error
Also, fix formatting in adjacent lines.

Coverity error CID 277445 says:

Out-of-bounds access (ARRAY_VS_SINGLETON).
Passing &ch to function upcase which uses it as an array. This might
corrupt or misinterpret adjacent memory locations.
2019-12-10 12:40:07 +01:00