Commit Graph

14 Commits

Author SHA1 Message Date
Andy McFadden eff69cce86 Fix a few compiler warnings
Mostly uninitialized class members.  Should not cause a change in
behavior.
2021-05-09 18:43:59 -07:00
mlong dcefd2d2b6 Fixed a couple of stupid copy/paste errors 2021-02-27 18:24:28 -06:00
mlong db3ca0a8ca Added file length size option to getRawFileName 2021-02-27 16:51:40 -06:00
Andy McFadden 640959dad5 Fix 64-bit math error
32-bit * 32-bit = 32-bit, so disk images with partitions whose size
exceeded the capacity of a 32-bit int were coming out wrong.

Updated version to 4.0.3-a1.
2017-10-30 10:17:54 -07:00
Andy McFadden b79498da50 Improve filename handling when adding files
Most of this change is a conversion of the old FileDetails struct
into a new LocalFileDetails class.  The new class keeps the
members private, and keeps the Unicode and MOR representations of
the string separate.

The NuFX and DiskImg libraries don't support UTF-16 filenames,
so we stil can't add files with non-CP-1252 filenames, but we're
a step closer.

Also, update NufxLib with a couple of fixes from the main project.

Also, fix handling of "%00" when adding files.

Also, mark most of the A2FileDOS fields private.  Not sure why
they weren't.
2015-01-08 14:16:20 -08:00
Andy McFadden 8e910b23ca gcc/linux updates
Many updates to format strings, largely as a result of changing
various "long" variables to uint32_t.

Fixed the diskimg debug macros for gcc, which requires an extra
"##" to remove the "," when there are no arguments.  (Apparently
Visual Studio just strips this away for you.)

Stripped out a couple of dead variables spotted by gcc.  Return
the actual error in a couple of HFS file functions.
2014-12-11 16:36:40 -08:00
Andy McFadden aa3145856c Use types with explicit sizes
Focusing on the diskimg library this time, which deals with a lot of
filesystem structures that have specific widths.

This is still a bit lax in places, e.g. using "long" for lengths.
Should either specify a bit width or use di_off_t.

Also, added "override" keyword where appropriate.

Also, bumped library version to 5.0.0.
2014-11-24 15:57:25 -08:00
Andy McFadden edb7c13120 Fix diskimg OpenImage
The OpenImage method had an overload that took void*.  This turns out
to be a bad idea, because void* matches any pointer type that didn't
match something else.  So the WCHAR* filenames were going to the "open
from buffer" method rather than the "open from file" variant.

A less important issue is whether open-from-buffer should take a const
or non-const pointer.  If the "readOnly" boolean flag is not set, then
the contents can be altered and const is inappropriate.  The best course
seems to be to drop the boolean flag as an argument, and just have two
different methods.
2014-11-23 10:34:57 -08:00
Andy McFadden d60a6dbcfa Fix some issues identified by static analyzer
Includes "printf format" annotation on debug log function.
2014-11-19 14:54:24 -08:00
Andy McFadden f6647b9978 Convert WSMG to LOG
Mostly a bulk conversion of debug messages, primarily with sed:

 sed -e 's/\(WMSG[0-9]\)\(.*\)\(\\n"\)/LOGI\2"/'

This removes the '\n' from the end of the log messages, and sets
them all to "info" severity.

We want to prefix each line with file/line and/or a timestamp,
so it doesn't make sense to have a partial line, and there's no
value in embedding the '\n' in every string.
2014-11-18 14:16:35 -08:00
Andy McFadden bf5e2bce50 Change "nil" to "NULL" 2014-11-17 21:37:36 -08:00
Andy McFadden 63b9996009 Normalize indentation and EOL
This updates all source files to use spaces instead of tabs for
indentation.  It also normalizes the end-of-line markers to be
Windows-style CRLF, and ensures that all files end with EOL.

No substantive changes were made; "diff -w" is empty.
2014-11-03 16:26:53 -08:00
David Schmidt abd3515424 Adding read capability for Gutenberg word processor formatted disks 2009-01-04 22:23:04 +00:00
Andy McFadden 0d7d1b67e0 initial import 2007-03-27 17:47:10 +00:00