diff options
author | 2009-02-28 22:10:06 +0000 | |
---|---|---|
committer | 2009-02-28 22:10:06 +0000 | |
commit | e2757c60d2fa5e74909eff1e7a48ce5841ad47e5 (patch) | |
tree | b30bddf750ef14f54e147b8d214d693af27f5d33 /src/lib/util/jedparse.c | |
parent | 42004cf3baf9c0307775c43096df36c1d5884bf4 (diff) |
Modified the makefile to support experimental optional C++
compilation:
- new option CPP_COMPILE to trigger this (off by default)
- split CFLAGS into common, C-only, and C++-only flags
- when enabled, CPP_COMPILE causes 'pp' to be appended to
the target name
NOTE THAT THE SYSTEM CANNOT ACTUALLY BE COMPILED THIS WAY
YET. IT IS JUST AN EXPERIMENT.
Modified lib.mak to always build zlib/expat as C regardless
of CPP_COMPILE.
Modified windows.mak to fix warnings with MAXOPT=1, and to
leverage the new CFLAGs definitions.
Modified vconv.c to do appropriate conversions for new C++
options.
Updated sources so that libutil, libocore (Windows), and
libosd (Windows) can be cleanly compiled as C or C++. This
was mostly adding some casts against void *.
Fixed a few more general obvious problems at random
locations in the source:
- device->class is now device->devclass
- TYPES_COMPATIBLE uses typeid() when compiled for C++
- some functions with reserved names ('xor' in particular)
were renamed
- nested enums and structs were pulled out into separate
definitions (under C++ these would need to be scoped to
be referenced)
- TOKEN_VALUE cannot use .field=x initialization in C++ :(
Diffstat (limited to 'src/lib/util/jedparse.c')
-rw-r--r-- | src/lib/util/jedparse.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/util/jedparse.c b/src/lib/util/jedparse.c index 8e1c79de48f..1bcf1323a35 100644 --- a/src/lib/util/jedparse.c +++ b/src/lib/util/jedparse.c @@ -191,7 +191,7 @@ static void process_field(jed_data *data, const UINT8 *cursrc, const UINT8 *srce int jed_parse(const void *data, size_t length, jed_data *result) { - const UINT8 *cursrc = data; + const UINT8 *cursrc = (const UINT8 *)data; const UINT8 *srcend = cursrc + length; const UINT8 *scan; parse_info pinfo; @@ -285,7 +285,7 @@ int jed_parse(const void *data, size_t length, jed_data *result) size_t jed_output(const jed_data *data, void *result, size_t length) { - UINT8 *curdst = result; + UINT8 *curdst = (UINT8 *)result; UINT8 *dstend = curdst + length; int i, zeros, ones; char tempbuf[256]; @@ -357,7 +357,7 @@ size_t jed_output(const jed_data *data, void *result, size_t length) /* now compute the transmission checksum */ checksum = 0; - for (temp = result; temp < curdst && temp < dstend; temp++) + for (temp = (UINT8 *)result; temp < curdst && temp < dstend; temp++) checksum += *temp & 0x7f; checksum += 0x03; @@ -381,7 +381,7 @@ size_t jed_output(const jed_data *data, void *result, size_t length) int jedbin_parse(const void *data, size_t length, jed_data *result) { - const UINT8 *cursrc = data; + const UINT8 *cursrc = (const UINT8 *)data; /* initialize the output */ memset(result, 0, sizeof(*result)); @@ -414,7 +414,7 @@ int jedbin_parse(const void *data, size_t length, jed_data *result) size_t jedbin_output(const jed_data *data, void *result, size_t length) { - UINT8 *curdst = result; + UINT8 *curdst = (UINT8 *)result; /* ensure we have enough room */ if (length >= 4 + (data->numfuses + 7) / 8) |