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.
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
- Move imageDiskList from pointer to vector of unique_ptr
- Replace string operations with size-limited versions
- Initialize members
- Eliminate unecessary casts
- Eliminate memory-leak on pointer assignment
- Fix Bit8u instead of char weirdness for imageDisk (dreamer_)
- Give device_t a virtual empty destructor so some warning program
doesn't go crazy.
- Give the code that moves the Z drive its own function for readability.
- Give sizes arrays default values again for warning program.
- Rewrite IMGMOUNT in order to exit early for clarity and attempt
to group things together.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4267
Return a fake success result for INT 13/05. Helps older games (Sierra On-Line booters, Mickey's Space Adventure, Zyll, et al.) that insist on low-level formatting a floppy disk to be used for saving games.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3980