From: <fr...@us...> - 2008-10-22 12:36:21
|
Revision: 3784 http://fuse-emulator.svn.sourceforge.net/fuse-emulator/?rev=3784&view=rev Author: fredm Date: 2008-10-22 12:36:07 +0000 (Wed, 22 Oct 2008) Log Message: ----------- Remove deprecated functions libspectrum_sna_read(), libspectrum_z80_read(), libspectrum_z80_write(), libspectrum_tap_read(), libspectrum_tap_write(), libspectrum_tzx_read(), libspectrum_tzx_write() and libspectrum_warajevo_read(). Modified Paths: -------------- trunk/libspectrum/doc/libspectrum.txt trunk/libspectrum/hacking/ChangeLog trunk/libspectrum/libspectrum.h.in trunk/libspectrum/sna.c trunk/libspectrum/tap.c trunk/libspectrum/tzx_read.c trunk/libspectrum/tzx_write.c trunk/libspectrum/warajevo_read.c trunk/libspectrum/z80.c Modified: trunk/libspectrum/doc/libspectrum.txt =================================================================== --- trunk/libspectrum/doc/libspectrum.txt 2008-10-21 13:33:25 UTC (rev 3783) +++ trunk/libspectrum/doc/libspectrum.txt 2008-10-22 12:36:07 UTC (rev 3784) @@ -695,34 +695,6 @@ The only formats for which serialisation is supported are .sna, .szx and .z80. -Deprecated snapshot routines ----------------------------- - -There are also three format-specific functions. However, *these -functions are deprecated and should not be used in new code*: - -libspectrum_error libspectrum_sna_read( libspectrum_snap *snap, - const libspectrum_byte *buffer, - size_t buffer_length ) - -Take the .sna snapshot of length `buffer_length' bytes at `buffer' and -convert it to a `libspectrum_snap' structure. - -libspectrum_error libspectrum_z80_read( libspectrum_snap *snap, - const libspectrum_byte *buffer, - size_t buffer_length ) - -Similarly for a .z80 snapshot. - -libspectrum_error libspectrum_z80_write( libspectrum_byte **buffer, - size_t *length, - libspectrum_snap *snap ) - -Take the snapshot in `snap' and serialise it into a .z80 file at -'*buffer'. On entry, '*buffer' is assumed to be allocated '*length' -bytes, and will grow if necessary; if '*length' is zero, '*buffer' can -be uninitialised on entry. - Tape functions ============== @@ -832,50 +804,6 @@ Move the tape along so it points to the next block, initialise that block and return it. -Deprecated tape routines ------------------------- - -*These functions are deprecated and should not be used in new code*: - -libspectrum_error -libspectrum_tap_read( libspectrum_tape *tape, const libspectrum_byte *buffer, - const size_t length ) - -Form a tape object in `tape' from the .tap file of `length' bytes -starting at `buffer'. This routine deals with the `normal' (Z80-style) -.tap files, not with Warajevo .tap files. - -libspectrum_error -libspectrum_tap_write( libspectrum_byte **buffer, size_t *length, - libspectrum_tape *tape ) - -Attempt to convert the tape in `tape' to a .tap file in `*buffer', which -has previously been allocated `*length' bytes by user code. The .tap -format can handle only standard speed loading blocks; a best guess -attempt will be made to convert other blocks, but the resultant .tap -file probably won't work. - -libspectrum_error -libspectrum_tzx_read( libspectrum_tape *tape, const libspectrum_byte *buffer, - const size_t length ) - -Just as `libspectrum_tap_read', but for .tzx format files. - -libspectrum_error -libspectrum_tzx_write( libspectrum_byte **buffer, size_t *length, - libspectrum_tape *tape ) - -Just as `libspectrum_tap_write', but for .tzx files. The conversion to -.tzx format is not lossy as it is with converting to .tap. - -libspectrum_error -libspectrum_warajevo_read( libspectrum_tape *tape, - const libspectrum_byte *buffer, - const size_t length ) - -Just as `libspectrum_tap_read', but for Warajevo-style .tap files. -There is no currently no function to write a Warajevo-style .tap file. - Tape iterators -------------- Modified: trunk/libspectrum/hacking/ChangeLog =================================================================== --- trunk/libspectrum/hacking/ChangeLog 2008-10-21 13:33:25 UTC (rev 3783) +++ trunk/libspectrum/hacking/ChangeLog 2008-10-22 12:36:07 UTC (rev 3784) @@ -680,3 +680,8 @@ 20081020 tape_block.c: remove warning. 20081021 sna.c,test/{empty.z80,test.c}: SP wasn't being decremented and could have been written to freed memory. +20081022 libspectrum.h.in,sna.c,tap.c,tzx_read.c,tzx_write.c,warajevo_read.c, + z80.c: remove deprecated functions libspectrum_sna_read(), + libspectrum_z80_read(),libspectrum_z80_write(),libspectrum_tap_read(), + libspectrum_tap_write(),libspectrum_tzx_read(), + libspectrum_tzx_write() and libspectrum_warajevo_read() (Fred). Modified: trunk/libspectrum/libspectrum.h.in =================================================================== --- trunk/libspectrum/libspectrum.h.in 2008-10-21 13:33:25 UTC (rev 3783) +++ trunk/libspectrum/libspectrum.h.in 2008-10-22 12:36:07 UTC (rev 3784) @@ -449,24 +449,6 @@ /* Accessor functions */ LIBSPECTRUM_SNAP_ACCESSORS -/* DEPRECATED: use libspectrum_snap_read() instead */ -DEPRECATED -libspectrum_error WIN32_DLL -libspectrum_sna_read( libspectrum_snap *snap, - const libspectrum_byte *buffer, size_t buffer_length ); - -/* DEPRECATED: use libspectrum_snap_read() instead */ -DEPRECATED -libspectrum_error WIN32_DLL -libspectrum_z80_read( libspectrum_snap *snap, - const libspectrum_byte *buffer, size_t buffer_length ); - -/* DEPRECATED: use libspectrum_snap_write() instead */ -DEPRECATED -libspectrum_error WIN32_DLL -libspectrum_z80_write( libspectrum_byte **buffer, size_t *length, - libspectrum_snap *snap ); - /* * Tape handling routines */ @@ -639,42 +621,6 @@ libspectrum_tape_block *block, size_t position ); -/*** Routines for .tap format files ***/ - -/* DEPRECATED: use libspectrum_tape_read() instead */ -DEPRECATED -libspectrum_error WIN32_DLL -libspectrum_tap_read( libspectrum_tape *tape, const libspectrum_byte *buffer, - const size_t length ); - -/* DEPRECATED: use libspectrum_tape_write() instead */ -DEPRECATED -libspectrum_error WIN32_DLL -libspectrum_tap_write( libspectrum_byte **buffer, size_t *length, - libspectrum_tape *tape ); - -/*** Routines for .tzx format files ***/ - -/* DEPRECATED: use libspectrum_tape_read() instead */ -DEPRECATED -libspectrum_error WIN32_DLL -libspectrum_tzx_read( libspectrum_tape *tape, const libspectrum_byte *buffer, - const size_t length ); - -/* DEPRECATED: use libspectrum_tape_write() instead */ -DEPRECATED -libspectrum_error WIN32_DLL -libspectrum_tzx_write( libspectrum_byte **buffer, size_t *length, - libspectrum_tape *tape ); - -/*** Routines for Warajevo .tap format files ***/ - -/* DEPRECATED: use libspectrum_tape_read() instead */ -DEPRECATED -libspectrum_error WIN32_DLL -libspectrum_warajevo_read( libspectrum_tape *tape, - const libspectrum_byte *buffer, size_t length ); - /*** Routines for iterating through a tape ***/ libspectrum_tape_block WIN32_DLL * Modified: trunk/libspectrum/sna.c =================================================================== --- trunk/libspectrum/sna.c 2008-10-21 13:33:25 UTC (rev 3783) +++ trunk/libspectrum/sna.c 2008-10-22 12:36:07 UTC (rev 3784) @@ -61,13 +61,6 @@ write_page( libspectrum_byte *buffer, libspectrum_snap *snap, int page ); libspectrum_error -libspectrum_sna_read( libspectrum_snap *snap, - const libspectrum_byte *buffer, size_t buffer_length ) -{ - return internal_sna_read( snap, buffer, buffer_length ); -} - -libspectrum_error internal_sna_read( libspectrum_snap *snap, const libspectrum_byte *buffer, size_t buffer_length ) { Modified: trunk/libspectrum/tap.c =================================================================== --- trunk/libspectrum/tap.c 2008-10-21 13:33:25 UTC (rev 3783) +++ trunk/libspectrum/tap.c 2008-10-22 12:36:07 UTC (rev 3784) @@ -135,13 +135,6 @@ } libspectrum_error -libspectrum_tap_read( libspectrum_tape *tape, const libspectrum_byte *buffer, - const size_t length ) -{ - return internal_tap_read( tape, buffer, length, LIBSPECTRUM_ID_TAPE_TAP ); -} - -libspectrum_error internal_tap_write( libspectrum_byte **buffer, size_t *length, libspectrum_tape *tape, libspectrum_id_t type ) { @@ -230,13 +223,6 @@ return LIBSPECTRUM_ERROR_NONE; } -libspectrum_error -libspectrum_tap_write( libspectrum_byte **buffer, size_t *length, - libspectrum_tape *tape ) -{ - return internal_tap_write( buffer, length, tape, LIBSPECTRUM_ID_TAPE_TAP ); -} - static libspectrum_error write_rom( libspectrum_tape_block *block, libspectrum_byte **buffer, libspectrum_byte **ptr, size_t *length, libspectrum_id_t type ) Modified: trunk/libspectrum/tzx_read.c =================================================================== --- trunk/libspectrum/tzx_read.c 2008-10-21 13:33:25 UTC (rev 3783) +++ trunk/libspectrum/tzx_read.c 2008-10-22 12:36:07 UTC (rev 3784) @@ -251,13 +251,6 @@ return LIBSPECTRUM_ERROR_NONE; } -libspectrum_error -libspectrum_tzx_read( libspectrum_tape *tape, const libspectrum_byte *buffer, - const size_t length ) -{ - return internal_tzx_read( tape, buffer, length ); -} - static libspectrum_error tzx_read_rom_block( libspectrum_tape *tape, const libspectrum_byte **ptr, const libspectrum_byte *end ) Modified: trunk/libspectrum/tzx_write.c =================================================================== --- trunk/libspectrum/tzx_write.c 2008-10-21 13:33:25 UTC (rev 3783) +++ trunk/libspectrum/tzx_write.c 2008-10-22 12:36:07 UTC (rev 3784) @@ -233,13 +233,6 @@ return LIBSPECTRUM_ERROR_NONE; } -libspectrum_error -libspectrum_tzx_write( libspectrum_byte **buffer, size_t *length, - libspectrum_tape *tape ) -{ - return internal_tzx_write( buffer, length, tape ); -} - static void tzx_write_rom( libspectrum_tape_block *block, libspectrum_byte **buffer, libspectrum_byte **ptr, size_t *length ) Modified: trunk/libspectrum/warajevo_read.c =================================================================== --- trunk/libspectrum/warajevo_read.c 2008-10-21 13:33:25 UTC (rev 3783) +++ trunk/libspectrum/warajevo_read.c 2008-10-22 12:36:07 UTC (rev 3784) @@ -205,13 +205,6 @@ return LIBSPECTRUM_ERROR_NONE; } -libspectrum_error -libspectrum_warajevo_read( libspectrum_tape *tape, - const libspectrum_byte *buffer, size_t length ) -{ - return internal_warajevo_read( tape, buffer, length ); -} - static libspectrum_error get_next_block( size_t *offset, const libspectrum_byte *buffer, const libspectrum_byte *end, libspectrum_tape *tape ) Modified: trunk/libspectrum/z80.c =================================================================== --- trunk/libspectrum/z80.c 2008-10-21 13:33:25 UTC (rev 3783) +++ trunk/libspectrum/z80.c 2008-10-22 12:36:07 UTC (rev 3784) @@ -197,13 +197,6 @@ }; libspectrum_error -libspectrum_z80_read( libspectrum_snap *snap, - const libspectrum_byte *buffer, size_t buffer_length ) -{ - return internal_z80_read( snap, buffer, buffer_length ); -} - -libspectrum_error internal_z80_read( libspectrum_snap *snap, const libspectrum_byte *buffer, size_t buffer_length ) { @@ -1109,17 +1102,7 @@ } -/* DEPRECATED: use libspectrum_snap_write() instead */ libspectrum_error -libspectrum_z80_write( libspectrum_byte **buffer, size_t *length, - libspectrum_snap *snap ) -{ - int out_flags; - - return libspectrum_z80_write2( buffer, length, &out_flags, snap, 0 ); -} - -libspectrum_error libspectrum_z80_write2( libspectrum_byte **buffer, size_t *length, int *out_flags, libspectrum_snap *snap, int in_flags ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |