[Fuse-for-macosx-commits] SF.net SVN: fuse-for-macosx:[710] vendor/fuse-emulator/current
Brought to you by:
fredm
From: <fr...@us...> - 2012-11-24 06:50:13
|
Revision: 710 http://sourceforge.net/p/fuse-for-macosx/code/710 Author: fredm Date: 2012-11-24 06:50:08 +0000 (Sat, 24 Nov 2012) Log Message: ----------- Load . into vendor/fuse-emulator/current. Modified Paths: -------------- vendor/fuse-emulator/current/fuse/Makefile.am vendor/fuse-emulator/current/fuse/README vendor/fuse-emulator/current/fuse/compat/unix/Makefile.am vendor/fuse-emulator/current/fuse/compat/unix/file.c vendor/fuse-emulator/current/fuse/compat/win32/Makefile.am vendor/fuse-emulator/current/fuse/compat.h vendor/fuse-emulator/current/fuse/configure.in vendor/fuse-emulator/current/fuse/debugger/breakpoint.c vendor/fuse-emulator/current/fuse/debugger/command.c vendor/fuse-emulator/current/fuse/debugger/debugger.c vendor/fuse-emulator/current/fuse/debugger/debugger.h vendor/fuse-emulator/current/fuse/debugger/debugger_internals.h vendor/fuse-emulator/current/fuse/debugger/event.c vendor/fuse-emulator/current/fuse/debugger/expression.c vendor/fuse-emulator/current/fuse/debugger/variable.c vendor/fuse-emulator/current/fuse/display.c vendor/fuse-emulator/current/fuse/display.h vendor/fuse-emulator/current/fuse/event.c vendor/fuse-emulator/current/fuse/event.h vendor/fuse-emulator/current/fuse/fuse.c vendor/fuse-emulator/current/fuse/hacking/ChangeLog vendor/fuse-emulator/current/fuse/hacking/Makefile.am vendor/fuse-emulator/current/fuse/lib/Makefile.am vendor/fuse-emulator/current/fuse/machine.c vendor/fuse-emulator/current/fuse/machine.h vendor/fuse-emulator/current/fuse/machines/machines_periph.c vendor/fuse-emulator/current/fuse/machines/pentagon.c vendor/fuse-emulator/current/fuse/machines/pentagon1024.c vendor/fuse-emulator/current/fuse/machines/pentagon512.c vendor/fuse-emulator/current/fuse/machines/scorpion.c vendor/fuse-emulator/current/fuse/machines/spec128.c vendor/fuse-emulator/current/fuse/machines/spec16.c vendor/fuse-emulator/current/fuse/machines/spec48.c vendor/fuse-emulator/current/fuse/machines/spec48_ntsc.c vendor/fuse-emulator/current/fuse/machines/spec_se.c vendor/fuse-emulator/current/fuse/machines/specplus2.c vendor/fuse-emulator/current/fuse/machines/specplus2a.c vendor/fuse-emulator/current/fuse/machines/specplus3.c vendor/fuse-emulator/current/fuse/machines/specplus3e.c vendor/fuse-emulator/current/fuse/machines/tc2048.c vendor/fuse-emulator/current/fuse/machines/tc2068.c vendor/fuse-emulator/current/fuse/machines/tc2068.h vendor/fuse-emulator/current/fuse/machines/ts2068.c vendor/fuse-emulator/current/fuse/man/fuse.1 vendor/fuse-emulator/current/fuse/memory.c vendor/fuse-emulator/current/fuse/memory.h vendor/fuse-emulator/current/fuse/mempool.c vendor/fuse-emulator/current/fuse/mempool.h vendor/fuse-emulator/current/fuse/menu.c vendor/fuse-emulator/current/fuse/menu.h vendor/fuse-emulator/current/fuse/menu_data.dat vendor/fuse-emulator/current/fuse/periph.c vendor/fuse-emulator/current/fuse/periph.h vendor/fuse-emulator/current/fuse/peripherals/Makefile.am vendor/fuse-emulator/current/fuse/peripherals/ay.c vendor/fuse-emulator/current/fuse/peripherals/ay.h vendor/fuse-emulator/current/fuse/peripherals/dck.c vendor/fuse-emulator/current/fuse/peripherals/disk/beta.c vendor/fuse-emulator/current/fuse/peripherals/disk/beta.h vendor/fuse-emulator/current/fuse/peripherals/disk/disciple.c vendor/fuse-emulator/current/fuse/peripherals/disk/disciple.h vendor/fuse-emulator/current/fuse/peripherals/disk/disk.c vendor/fuse-emulator/current/fuse/peripherals/disk/fdd.c vendor/fuse-emulator/current/fuse/peripherals/disk/fdd.h vendor/fuse-emulator/current/fuse/peripherals/disk/opus.c vendor/fuse-emulator/current/fuse/peripherals/disk/opus.h vendor/fuse-emulator/current/fuse/peripherals/disk/plusd.c vendor/fuse-emulator/current/fuse/peripherals/disk/plusd.h vendor/fuse-emulator/current/fuse/peripherals/disk/upd_fdc.c vendor/fuse-emulator/current/fuse/peripherals/disk/upd_fdc.h vendor/fuse-emulator/current/fuse/peripherals/disk/wd_fdc.c vendor/fuse-emulator/current/fuse/peripherals/disk/wd_fdc.h vendor/fuse-emulator/current/fuse/peripherals/fuller.c vendor/fuse-emulator/current/fuse/peripherals/fuller.h vendor/fuse-emulator/current/fuse/peripherals/ide/divide.c vendor/fuse-emulator/current/fuse/peripherals/ide/divide.h vendor/fuse-emulator/current/fuse/peripherals/ide/ide.c vendor/fuse-emulator/current/fuse/peripherals/ide/ide.h vendor/fuse-emulator/current/fuse/peripherals/ide/simpleide.c vendor/fuse-emulator/current/fuse/peripherals/ide/simpleide.h vendor/fuse-emulator/current/fuse/peripherals/ide/zxatasp.c vendor/fuse-emulator/current/fuse/peripherals/ide/zxatasp.h vendor/fuse-emulator/current/fuse/peripherals/ide/zxcf.c vendor/fuse-emulator/current/fuse/peripherals/ide/zxcf.h vendor/fuse-emulator/current/fuse/peripherals/if1.c vendor/fuse-emulator/current/fuse/peripherals/if1.h vendor/fuse-emulator/current/fuse/peripherals/if2.c vendor/fuse-emulator/current/fuse/peripherals/if2.h vendor/fuse-emulator/current/fuse/peripherals/kempmouse.c vendor/fuse-emulator/current/fuse/peripherals/kempmouse.h vendor/fuse-emulator/current/fuse/peripherals/melodik.c vendor/fuse-emulator/current/fuse/peripherals/melodik.h vendor/fuse-emulator/current/fuse/peripherals/nic/Makefile.am vendor/fuse-emulator/current/fuse/peripherals/printer.c vendor/fuse-emulator/current/fuse/peripherals/printer.h vendor/fuse-emulator/current/fuse/peripherals/scld.c vendor/fuse-emulator/current/fuse/peripherals/scld.h vendor/fuse-emulator/current/fuse/peripherals/speccyboot.c vendor/fuse-emulator/current/fuse/peripherals/speccyboot.h vendor/fuse-emulator/current/fuse/peripherals/specdrum.c vendor/fuse-emulator/current/fuse/peripherals/specdrum.h vendor/fuse-emulator/current/fuse/peripherals/ula.c vendor/fuse-emulator/current/fuse/peripherals/ula.h vendor/fuse-emulator/current/fuse/pokefinder/pokefinder.c vendor/fuse-emulator/current/fuse/pokefinder/pokefinder.h vendor/fuse-emulator/current/fuse/pokefinder/pokemem.c vendor/fuse-emulator/current/fuse/profile.c vendor/fuse-emulator/current/fuse/profile.h vendor/fuse-emulator/current/fuse/psg.c vendor/fuse-emulator/current/fuse/psg.h vendor/fuse-emulator/current/fuse/rzx.c vendor/fuse-emulator/current/fuse/rzx.h vendor/fuse-emulator/current/fuse/screenshot.c vendor/fuse-emulator/current/fuse/screenshot.h vendor/fuse-emulator/current/fuse/settings-header.pl vendor/fuse-emulator/current/fuse/settings.dat vendor/fuse-emulator/current/fuse/settings.pl vendor/fuse-emulator/current/fuse/slt.c vendor/fuse-emulator/current/fuse/slt.h vendor/fuse-emulator/current/fuse/snapshot.c vendor/fuse-emulator/current/fuse/sound/aosound.c vendor/fuse-emulator/current/fuse/sound/coreaudiosound.c vendor/fuse-emulator/current/fuse/sound/sdlsound.c vendor/fuse-emulator/current/fuse/sound.c vendor/fuse-emulator/current/fuse/sound.h vendor/fuse-emulator/current/fuse/spectrum.c vendor/fuse-emulator/current/fuse/spectrum.h vendor/fuse-emulator/current/fuse/tape.c vendor/fuse-emulator/current/fuse/tape.h vendor/fuse-emulator/current/fuse/timer/timer.c vendor/fuse-emulator/current/fuse/ui/gtk/binary.c vendor/fuse-emulator/current/fuse/ui/gtk/browse.c vendor/fuse-emulator/current/fuse/ui/gtk/confirm.c vendor/fuse-emulator/current/fuse/ui/gtk/debugger.c vendor/fuse-emulator/current/fuse/ui/gtk/gtkdisplay.c vendor/fuse-emulator/current/fuse/ui/gtk/gtkinternals.h vendor/fuse-emulator/current/fuse/ui/gtk/gtkjoystick.c vendor/fuse-emulator/current/fuse/ui/gtk/gtkmouse.c vendor/fuse-emulator/current/fuse/ui/gtk/gtkui.c vendor/fuse-emulator/current/fuse/ui/gtk/memory.c vendor/fuse-emulator/current/fuse/ui/gtk/options.pl vendor/fuse-emulator/current/fuse/ui/gtk/picture.c vendor/fuse-emulator/current/fuse/ui/gtk/pokefinder.c vendor/fuse-emulator/current/fuse/ui/gtk/pokemem.c vendor/fuse-emulator/current/fuse/ui/gtk/rollback.c vendor/fuse-emulator/current/fuse/ui/gtk/roms.c vendor/fuse-emulator/current/fuse/ui/gtk/stock.c vendor/fuse-emulator/current/fuse/ui/options.dat vendor/fuse-emulator/current/fuse/ui/scaler/scaler.c vendor/fuse-emulator/current/fuse/ui/scaler/scalers.c vendor/fuse-emulator/current/fuse/ui/ui.h vendor/fuse-emulator/current/fuse/ui/widget/filesel.c vendor/fuse-emulator/current/fuse/ui/widget/menu.c vendor/fuse-emulator/current/fuse/ui/widget/options.pl vendor/fuse-emulator/current/fuse/ui/widget/pokefinder.c vendor/fuse-emulator/current/fuse/ui/widget/pokemem.c vendor/fuse-emulator/current/fuse/ui/widget/roms.c vendor/fuse-emulator/current/fuse/ui/widget/widget.c vendor/fuse-emulator/current/fuse/ui/widget/widget.h vendor/fuse-emulator/current/fuse/ui/win32/binary.c vendor/fuse-emulator/current/fuse/ui/win32/debugger.c vendor/fuse-emulator/current/fuse/ui/win32/debugger.rc vendor/fuse-emulator/current/fuse/ui/win32/fileselector.c vendor/fuse-emulator/current/fuse/ui/win32/memorybrowser.c vendor/fuse-emulator/current/fuse/ui/win32/memorybrowser.rc vendor/fuse-emulator/current/fuse/ui/win32/options.pl vendor/fuse-emulator/current/fuse/ui/win32/picture.c vendor/fuse-emulator/current/fuse/ui/win32/pokefinder.c vendor/fuse-emulator/current/fuse/ui/win32/roms.c vendor/fuse-emulator/current/fuse/ui/win32/win32internals.h vendor/fuse-emulator/current/fuse/ui/win32/win32ui.c vendor/fuse-emulator/current/fuse/ui/xlib/xdisplay.c vendor/fuse-emulator/current/fuse/ui/xlib/xui.c vendor/fuse-emulator/current/fuse/ui.c vendor/fuse-emulator/current/fuse/unittests/unittests.c vendor/fuse-emulator/current/fuse/unittests/unittests.h vendor/fuse-emulator/current/fuse/utils.c vendor/fuse-emulator/current/fuse/utils.h vendor/fuse-emulator/current/fuse/z80/coretest.c vendor/fuse-emulator/current/fuse/z80/z80.c vendor/fuse-emulator/current/fuse/z80/z80.h vendor/fuse-emulator/current/fuse/z80/z80_checks.h vendor/fuse-emulator/current/fuse/z80/z80_macros.h vendor/fuse-emulator/current/fuse/z80/z80_ops.c vendor/fuse-emulator/current/fuse-utils/Makefile.am vendor/fuse-emulator/current/fuse-utils/configure.in vendor/fuse-emulator/current/fuse-utils/hacking/ChangeLog vendor/fuse-emulator/current/fuse-utils/man/Makefile.am vendor/fuse-emulator/current/fuse-utils/rzxtool.c vendor/fuse-emulator/current/fuse-utils/scl2trd.c vendor/fuse-emulator/current/fuse-utils/snap2tzx.c vendor/fuse-emulator/current/libspectrum/accessor.pl vendor/fuse-emulator/current/libspectrum/csw.c vendor/fuse-emulator/current/libspectrum/hacking/ChangeLog vendor/fuse-emulator/current/libspectrum/make-perl.c vendor/fuse-emulator/current/libspectrum/snap_accessors.txt vendor/fuse-emulator/current/libspectrum/snapshot.c vendor/fuse-emulator/current/libspectrum/szx.c Added Paths: ----------- vendor/fuse-emulator/current/fuse/compat/unix/socket.c vendor/fuse-emulator/current/fuse/compat/win32/socket.c vendor/fuse-emulator/current/fuse/data/ vendor/fuse-emulator/current/fuse/data/Makefile.am vendor/fuse-emulator/current/fuse/data/fuse.desktop.in vendor/fuse-emulator/current/fuse/data/fuse.xml.in vendor/fuse-emulator/current/fuse/data/icons/ vendor/fuse-emulator/current/fuse/data/icons/128x128/ vendor/fuse-emulator/current/fuse/data/icons/128x128/application-x-spectrum.png vendor/fuse-emulator/current/fuse/data/icons/128x128/fuse.png vendor/fuse-emulator/current/fuse/data/icons/16x16/ vendor/fuse-emulator/current/fuse/data/icons/16x16/application-x-spectrum.png vendor/fuse-emulator/current/fuse/data/icons/16x16/fuse.png vendor/fuse-emulator/current/fuse/data/icons/256x256/ vendor/fuse-emulator/current/fuse/data/icons/256x256/application-x-spectrum.png vendor/fuse-emulator/current/fuse/data/icons/256x256/fuse.png vendor/fuse-emulator/current/fuse/data/icons/32x32/ vendor/fuse-emulator/current/fuse/data/icons/32x32/application-x-spectrum.png vendor/fuse-emulator/current/fuse/data/icons/32x32/fuse.png vendor/fuse-emulator/current/fuse/data/icons/48x48/ vendor/fuse-emulator/current/fuse/data/icons/48x48/application-x-spectrum.png vendor/fuse-emulator/current/fuse/data/icons/48x48/fuse.png vendor/fuse-emulator/current/fuse/data/icons/64x64/ vendor/fuse-emulator/current/fuse/data/icons/64x64/application-x-spectrum.png vendor/fuse-emulator/current/fuse/data/icons/64x64/fuse.png vendor/fuse-emulator/current/fuse/hacking/peripheral_tests.txt vendor/fuse-emulator/current/fuse/hacking/spectranet.txt vendor/fuse-emulator/current/fuse/hacking/valgrind.supp vendor/fuse-emulator/current/fuse/lib/tests/ vendor/fuse-emulator/current/fuse/lib/tests/fatware-success.hdf.bz2 vendor/fuse-emulator/current/fuse/lib/tests/idedos-success.hdf.bz2 vendor/fuse-emulator/current/fuse/lib/tests/success.mdr vendor/fuse-emulator/current/fuse/lib/tests/success.mgt.bz2 vendor/fuse-emulator/current/fuse/lib/tests/success.opd vendor/fuse-emulator/current/fuse/lib/tests/success.udi vendor/fuse-emulator/current/fuse/movie.c vendor/fuse-emulator/current/fuse/movie.h vendor/fuse-emulator/current/fuse/movie_tables.h vendor/fuse-emulator/current/fuse/peripherals/flash/ vendor/fuse-emulator/current/fuse/peripherals/flash/Makefile.am vendor/fuse-emulator/current/fuse/peripherals/flash/am29f010.c vendor/fuse-emulator/current/fuse/peripherals/flash/am29f010.h vendor/fuse-emulator/current/fuse/peripherals/nic/w5100.c vendor/fuse-emulator/current/fuse/peripherals/nic/w5100.h vendor/fuse-emulator/current/fuse/peripherals/nic/w5100_internals.h vendor/fuse-emulator/current/fuse/peripherals/nic/w5100_socket.c vendor/fuse-emulator/current/fuse/peripherals/spectranet.c vendor/fuse-emulator/current/fuse/peripherals/spectranet.h vendor/fuse-emulator/current/fuse-utils/compat/getopt.c vendor/fuse-emulator/current/fuse-utils/compat/getopt.h vendor/fuse-emulator/current/fuse-utils/compat/getopt1.c vendor/fuse-emulator/current/fuse-utils/fmfconv.c vendor/fuse-emulator/current/fuse-utils/fmfconv.h vendor/fuse-emulator/current/fuse-utils/fmfconv_aiff.c vendor/fuse-emulator/current/fuse-utils/fmfconv_au.c vendor/fuse-emulator/current/fuse-utils/fmfconv_ff.c vendor/fuse-emulator/current/fuse-utils/fmfconv_ppm.c vendor/fuse-emulator/current/fuse-utils/fmfconv_scr.c vendor/fuse-emulator/current/fuse-utils/fmfconv_wav.c vendor/fuse-emulator/current/fuse-utils/fmfconv_yuv.c vendor/fuse-emulator/current/fuse-utils/man/fmfconv.1 vendor/fuse-emulator/current/fuse-utils/movie_tables.h Modified: vendor/fuse-emulator/current/fuse/Makefile.am =================================================================== --- vendor/fuse-emulator/current/fuse/Makefile.am 2012-11-23 12:25:10 UTC (rev 709) +++ vendor/fuse-emulator/current/fuse/Makefile.am 2012-11-24 06:50:08 UTC (rev 710) @@ -1,7 +1,7 @@ # Process this file with automake to produce Makefile.in ## Copyright (c) 1999-2009 Philip Kendall -## $Id: Makefile.am 4288 2011-02-03 21:06:22Z pak21 $ +## $Id: Makefile.am 4674 2012-02-20 11:03:58Z fredm $ ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -26,6 +26,7 @@ bin_PROGRAMS = fuse SUBDIRS = @COMPAT_SUBDIR@ \ + data \ debugger \ hacking \ lib \ @@ -41,7 +42,8 @@ unittests \ z80 -DIST_SUBDIRS = debugger \ +DIST_SUBDIRS = data \ + debugger \ hacking \ lib \ machines \ @@ -66,6 +68,7 @@ memory.c \ mempool.c \ menu.c \ + movie.c \ module.c \ periph.c \ profile.c \ @@ -104,6 +107,7 @@ machines/libmachines.a \ peripherals/libperipherals.a \ peripherals/disk/libdisk.a \ +peripherals/flash/libflash.a \ peripherals/ide/libide.a \ peripherals/nic/libnic.a \ pokefinder/libpokefinder.a \ @@ -128,6 +132,7 @@ machines/libmachines.a \ peripherals/libperipherals.a \ peripherals/disk/libdisk.a \ +peripherals/flash/libflash.a \ peripherals/ide/libide.a \ peripherals/nic/libnic.a \ pokefinder/libpokefinder.a \ @@ -173,6 +178,8 @@ memory.h \ mempool.h \ menu.h \ + movie.h \ + movie_tables.h \ module.h \ periph.h \ psg.h \ Modified: vendor/fuse-emulator/current/fuse/README =================================================================== --- vendor/fuse-emulator/current/fuse/README 2012-11-23 12:25:10 UTC (rev 709) +++ vendor/fuse-emulator/current/fuse/README 2012-11-24 06:50:08 UTC (rev 710) @@ -64,6 +64,8 @@ * Either the native port by Fredrick Meunier, or the original version will compile on OS X 10.3 (Panther) or later. +* On Mac OS X Lion you will need to use clang as gcc-llvm-4.2.1 fails to + correctly compile z80_ops.c. Windows @@ -216,4 +218,4 @@ Philip Kendall <phi...@sh...> 16 December 2010 -$Id: README 4410 2011-05-01 10:51:21Z zubzero $ +$Id: README 4624 2012-01-09 20:59:35Z pak21 $ Modified: vendor/fuse-emulator/current/fuse/compat/unix/Makefile.am =================================================================== --- vendor/fuse-emulator/current/fuse/compat/unix/Makefile.am 2012-11-23 12:25:10 UTC (rev 709) +++ vendor/fuse-emulator/current/fuse/compat/unix/Makefile.am 2012-11-24 06:50:08 UTC (rev 710) @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in ## Copyright (c) 2007-2008 Philip Kendall -## $Id: Makefile.am 4237 2010-12-31 19:31:26Z pak21 $ +## $Id: Makefile.am 4624 2012-01-09 20:59:35Z pak21 $ ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -31,6 +31,7 @@ file.c \ osname.c \ paths.c \ + socket.c \ timer.c \ tuntap.c Modified: vendor/fuse-emulator/current/fuse/compat/unix/file.c =================================================================== --- vendor/fuse-emulator/current/fuse/compat/unix/file.c 2012-11-23 12:25:10 UTC (rev 709) +++ vendor/fuse-emulator/current/fuse/compat/unix/file.c 2012-11-24 06:50:08 UTC (rev 710) @@ -1,7 +1,7 @@ /* file.c: File-related compatibility routines Copyright (c) 2008 Philip Kendall - $Id: file.c 4534 2011-08-11 12:59:47Z fredm $ + $Id: file.c 4624 2012-01-09 20:59:35Z pak21 $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -64,7 +64,7 @@ if( bytes != file->length ) { ui_error( UI_ERROR_ERROR, "error reading file: expected %lu bytes, but read only %lu", - file->length, bytes ); + (unsigned long)file->length, (unsigned long)bytes ); return 1; } @@ -78,7 +78,7 @@ if( bytes != length ) { ui_error( UI_ERROR_ERROR, "error writing file: expected %lu bytes, but wrote only %lu", - length, bytes ); + (unsigned long)length, (unsigned long)bytes ); return 1; } Added: vendor/fuse-emulator/current/fuse/compat/unix/socket.c =================================================================== --- vendor/fuse-emulator/current/fuse/compat/unix/socket.c (rev 0) +++ vendor/fuse-emulator/current/fuse/compat/unix/socket.c 2012-11-24 06:50:08 UTC (rev 710) @@ -0,0 +1,118 @@ +/* socket.c: Socket-related compatibility routines + Copyright (c) 2011 Philip Kendall + + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + Author contact information: + + E-mail: phi...@sh... + +*/ + +#include <config.h> + +#include <errno.h> +#include <string.h> +#include <unistd.h> + +#include "compat.h" +#include "fuse.h" +#include "ui/ui.h" + +const compat_socket_t compat_socket_invalid = -1; +const int compat_socket_EBADF = EBADF; + +struct compat_socket_selfpipe_t { + int read_fd; + int write_fd; +}; + +void +compat_socket_networking_init( void ) +{ + /* No action necessary */ +} + +void +compat_socket_networking_end( void ) +{ + /* No action necessary */ +} + +int +compat_socket_close( compat_socket_t fd ) +{ + return close( fd ); +} + +int compat_socket_get_error( void ) +{ + return errno; +} + +const char * +compat_socket_get_strerror( void ) +{ + return strerror( errno ); +} + +compat_socket_selfpipe_t* compat_socket_selfpipe_alloc( void ) +{ + int error; + int pipefd[2]; + + compat_socket_selfpipe_t *self = malloc( sizeof( *self ) ); + if( !self ) { + ui_error( UI_ERROR_ERROR, "%s: %d: out of memory", __FILE__, __LINE__ ); + fuse_abort(); + } + + error = pipe( pipefd ); + if( error ) { + ui_error( UI_ERROR_ERROR, "%s: %d: error %d creating pipe", __FILE__, __LINE__, error ); + fuse_abort(); + } + + self->read_fd = pipefd[0]; + self->write_fd = pipefd[1]; + + return self; +} + +void compat_socket_selfpipe_free( compat_socket_selfpipe_t *self ) +{ + close( self->read_fd ); + close( self->write_fd ); + free( self ); +} + +compat_socket_t compat_socket_selfpipe_get_read_fd( compat_socket_selfpipe_t *self ) +{ + return self->read_fd; +} + +void compat_socket_selfpipe_wake( compat_socket_selfpipe_t *self ) +{ + const char dummy = 0; + write( self->write_fd, &dummy, 1 ); +} + +void compat_socket_selfpipe_discard_data( compat_socket_selfpipe_t *self ) +{ + char bitbucket; + read( self->read_fd, &bitbucket, 1 ); +} Modified: vendor/fuse-emulator/current/fuse/compat/win32/Makefile.am =================================================================== --- vendor/fuse-emulator/current/fuse/compat/win32/Makefile.am 2012-11-23 12:25:10 UTC (rev 709) +++ vendor/fuse-emulator/current/fuse/compat/win32/Makefile.am 2012-11-24 06:50:08 UTC (rev 710) @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in ## Copyright (c) 2007-2008 Philip Kendall -## $Id: Makefile.am 4237 2010-12-31 19:31:26Z pak21 $ +## $Id: Makefile.am 4624 2012-01-09 20:59:35Z pak21 $ ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -31,6 +31,7 @@ ../unix/file.c \ osname.c \ paths.c \ + socket.c \ timer.c \ ../unix/tuntap.c Added: vendor/fuse-emulator/current/fuse/compat/win32/socket.c =================================================================== --- vendor/fuse-emulator/current/fuse/compat/win32/socket.c (rev 0) +++ vendor/fuse-emulator/current/fuse/compat/win32/socket.c 2012-11-24 06:50:08 UTC (rev 710) @@ -0,0 +1,241 @@ +/* socket.c: Socket-related compatibility routines + Copyright (c) 2011 Sergio Baldoví, Philip Kendall + + $Id$ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + + Author contact information: + + E-mail: phi...@sh... + +*/ + +#include <config.h> + +#include <winsock2.h> +#include <ws2tcpip.h> + +#include "compat.h" +#include "fuse.h" +#include "ui/ui.h" + +const compat_socket_t compat_socket_invalid = INVALID_SOCKET; +const int compat_socket_EBADF = WSAENOTSOCK; + +struct compat_socket_selfpipe_t { + SOCKET self_socket; + libspectrum_word port; +}; + +int +compat_socket_close( compat_socket_t fd ) +{ + return closesocket( fd ); +} + +int compat_socket_get_error( void ) +{ + return WSAGetLastError(); +} + +const char * +compat_socket_get_strerror( void ) +{ + static TCHAR buffer[256]; + TCHAR *ptr; + DWORD msg_size; + + /* get description of last winsock error */ + msg_size = FormatMessage( + FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, WSAGetLastError(), + MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), + buffer, sizeof( buffer ) / sizeof( TCHAR ), NULL ); + + if( !msg_size ) return NULL; + + /* skip 'new line' like chars */ + for( ptr = buffer; *ptr; ptr++ ) { + if( ( *ptr == '\r' ) || ( *ptr == '\n' ) ) { + *ptr = '\0'; + break; + } + } + + return (const char *)buffer; +} + +static int +selfpipe_test( compat_socket_selfpipe_t *self ) +{ + fd_set readfds; + int active; + struct timeval tv = { 1, 0 }; + + /* Send testing packet */ + compat_socket_selfpipe_wake( self ); + + /* Safe reading from control socket */ + FD_ZERO( &readfds ); + FD_SET( self->self_socket, &readfds ); + active = select( 0, &readfds, NULL, NULL, &tv ); + if( active == 0 || active == compat_socket_invalid ) { + return -1; + } + + /* Discard testing packet */ + if( FD_ISSET( self->self_socket, &readfds ) ) { + compat_socket_selfpipe_discard_data( self ); + } + + return 0; +} + +compat_socket_selfpipe_t * +compat_socket_selfpipe_alloc( void ) +{ + unsigned long mode = 1; + struct sockaddr_in sa; + socklen_t sa_len = sizeof(sa); + + compat_socket_selfpipe_t *self = malloc( sizeof( *self ) ); + if( !self ) { + ui_error( UI_ERROR_ERROR, "%s: %d: out of memory", __FILE__, __LINE__ ); + fuse_abort(); + } + + self->self_socket = socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP ); + if( self->self_socket == compat_socket_invalid ) { + ui_error( UI_ERROR_ERROR, + "%s: %d: failed to open socket; errno %d: %s\n", + __FILE__, __LINE__, compat_socket_get_error(), + compat_socket_get_strerror() ); + fuse_abort(); + } + + /* Set nonblocking mode */ + if( ioctlsocket( self->self_socket, FIONBIO, &mode ) == -1 ) { + ui_error( UI_ERROR_ERROR, + "%s: %d: failed to set socket nonblocking; errno %d: %s\n", + __FILE__, __LINE__, compat_socket_get_error(), + compat_socket_get_strerror() ); + fuse_abort(); + } + + memset( &sa, 0, sizeof(sa) ); + sa.sin_family = AF_INET; + sa.sin_addr.s_addr = htonl( INADDR_LOOPBACK ); + + if( bind( self->self_socket, (struct sockaddr*)&sa, sizeof(sa) ) == -1 ) { + ui_error( UI_ERROR_ERROR, + "%s: %d: failed to bind socket; errno %d: %s\n", + __FILE__, __LINE__, compat_socket_get_error(), + compat_socket_get_strerror() ); + fuse_abort(); + } + + /* Get ephemeral port number */ + if( getsockname( self->self_socket, (struct sockaddr *)&sa, &sa_len ) == -1 ) { + ui_error( UI_ERROR_ERROR, + "%s: %d: failed to get socket name; errno %d: %s\n", + __FILE__, __LINE__, compat_socket_get_error(), + compat_socket_get_strerror() ); + fuse_abort(); + } + + self->port = ntohs( sa.sin_port ); + + /* Test communications in order to detect blocking firewalls */ + if( selfpipe_test( self ) == -1 ) { + ui_error( UI_ERROR_ERROR, + "Networking: failed to test internal communications" ); + fuse_abort(); + } + + return self; +} + +void +compat_socket_selfpipe_free( compat_socket_selfpipe_t *self ) +{ + compat_socket_close( self->self_socket ); + free( self ); +} + +compat_socket_t +compat_socket_selfpipe_get_read_fd( compat_socket_selfpipe_t *self ) +{ + return self->self_socket; +} + +void +compat_socket_selfpipe_wake( compat_socket_selfpipe_t *self ) +{ + struct sockaddr_in sa; + + memset( &sa, 0, sizeof(sa) ); + sa.sin_family = AF_INET; + sa.sin_addr.s_addr = htonl( INADDR_LOOPBACK ); + sa.sin_port = htons( self->port ); + + sendto( self->self_socket, NULL, 0, 0, (struct sockaddr*)&sa, sizeof(sa) ); +} + +void +compat_socket_selfpipe_discard_data( compat_socket_selfpipe_t *self ) +{ + ssize_t bytes_read; + struct sockaddr_in sa; + socklen_t sa_length = sizeof(sa); + static char bitbucket[0x100]; + + do { + /* Socket is non blocking, so we can do this safely */ + bytes_read = recvfrom( self->self_socket, bitbucket, sizeof( bitbucket ), + 0, (struct sockaddr*)&sa, &sa_length ); + } while( bytes_read != -1 ); +} + + +void +compat_socket_networking_init( void ) +{ + WORD wVersionRequested; + WSADATA wsaData; + int error; + + wVersionRequested = MAKEWORD( 2, 2 ); + error = WSAStartup( wVersionRequested, &wsaData ); + if( error ) { + ui_error( UI_ERROR_ERROR, "%s:%d: error %d from WSAStartup()", __FILE__, + __LINE__, error ); + fuse_abort(); + } + + if( LOBYTE( wsaData.wVersion ) != 2 || HIBYTE( wsaData.wVersion ) != 2 ) { + ui_error( UI_ERROR_ERROR, + "%s:%d: unexpected version 0x%02x from WSAStartup()", + __FILE__, __LINE__, wsaData.wVersion ); + fuse_abort(); + } +} + +void +compat_socket_networking_end( void ) +{ + WSACleanup(); +} + Modified: vendor/fuse-emulator/current/fuse/compat.h =================================================================== --- vendor/fuse-emulator/current/fuse/compat.h 2012-11-23 12:25:10 UTC (rev 709) +++ vendor/fuse-emulator/current/fuse/compat.h 2012-11-24 06:50:08 UTC (rev 710) @@ -1,7 +1,7 @@ /* compat.h: various compatibility bits Copyright (c) 2003-2008 Philip Kendall - $Id: compat.h 4534 2011-08-11 12:59:47Z fredm $ + $Id: compat.h 4648 2012-01-22 19:57:35Z pak21 $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,6 +31,10 @@ #include <stdlib.h> #include <sys/types.h> +#ifdef WIN32 +#include <winsock2.h> +#endif + /* Remove the gcc-specific incantations if we're not using gcc */ #ifdef __GNUC__ @@ -120,4 +124,30 @@ int compat_get_tap( const char *interface_name ); +/* Socket handling */ + +#ifndef WIN32 +typedef int compat_socket_t; +#else /* #ifndef WIN32 */ +typedef SOCKET compat_socket_t; +#endif + +extern const compat_socket_t compat_socket_invalid; +extern const int compat_socket_EBADF; + +void compat_socket_networking_init( void ); +void compat_socket_networking_end( void ); + +int compat_socket_close( compat_socket_t fd ); +int compat_socket_get_error( void ); +const char *compat_socket_get_strerror( void ); + +typedef struct compat_socket_selfpipe_t compat_socket_selfpipe_t; + +compat_socket_selfpipe_t* compat_socket_selfpipe_alloc( void ); +void compat_socket_selfpipe_free( compat_socket_selfpipe_t *self ); +compat_socket_t compat_socket_selfpipe_get_read_fd( compat_socket_selfpipe_t *self ); +void compat_socket_selfpipe_wake( compat_socket_selfpipe_t *self ); +void compat_socket_selfpipe_discard_data( compat_socket_selfpipe_t *self ); + #endif /* #ifndef FUSE_COMPAT_H */ Modified: vendor/fuse-emulator/current/fuse/configure.in =================================================================== --- vendor/fuse-emulator/current/fuse/configure.in 2012-11-23 12:25:10 UTC (rev 709) +++ vendor/fuse-emulator/current/fuse/configure.in 2012-11-24 06:50:08 UTC (rev 710) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $Id: configure.in 4617 2012-01-03 11:47:27Z fredm $ +dnl $Id: configure.in 4674 2012-02-20 11:03:58Z fredm $ dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -110,7 +110,7 @@ AC_MSG_RESULT($win32) if test "$win32" = yes; then AC_CHECK_HEADER(windows.h, - LIBS="$LIBS -mwindows -lcomctl32 -lwinmm"; + LIBS="$LIBS -mwindows -lcomctl32 -lwinmm -lpthread -lws2_32"; AC_DEFINE([UI_WIN32], 1, [Defined if Win32 UI in use]) AC_DEFINE([WINVER], 0x0400, [Minimal supported version of Windows is 95 or NT4]) AC_DEFINE([_WIN32_IE], 0x400, [Internet Explorer is 4.0 or higher is required]) @@ -322,10 +322,11 @@ AC_TRY_COMPILE([#include <libspectrum.h>],[ int test = LIBSPECTRUM_SUPPORTS_ZLIB_COMPRESSION; ], - AUTOLOAD_SNAPS=compressed; AC_MSG_RESULT(yes), - AUTOLOAD_SNAPS=uncompressed; AC_MSG_RESULT(no)) + AUTOLOAD_SNAPS=compressed; LIBSPEC_HAVE_ZLIB=yes; AC_MSG_RESULT(yes), + AUTOLOAD_SNAPS=uncompressed; LIBSPEC_HAVE_ZLIB=""; AC_MSG_RESULT(no)) CPPFLAGS="$ac_save_CPPFLAGS" AC_SUBST(AUTOLOAD_SNAPS) +AC_SUBST(LIBSPEC_HAVE_ZLIB) AC_LINK_FILES([ lib/"$AUTOLOAD_SNAPS"/disk_plus3.szx lib/"$AUTOLOAD_SNAPS"/tape_128.szx @@ -356,6 +357,44 @@ lib/tape_se.szx lib/tape_ts2068.szx]) +dnl Check whether to use zlib (the UNIX version is called z, Win32 zdll) +AC_MSG_CHECKING(whether to use zlib) +AC_ARG_WITH(zlib, +[ --without-zlib don't use zlib], +if test "$withval" = no; then zlib=no; else zlib=yes; fi, +zlib=yes) +AC_MSG_RESULT($zlib) +if test "$zlib" = yes; then + AC_CHECK_HEADERS( + zlib.h, + AC_SEARCH_LIBS(compress2, z zdll) + ) +fi + +dnl Check if supplied libspectrum has support for bz2 compressed files +AC_MSG_CHECKING(whether libspectrum supports compressed bz2 files) +ac_save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $LIBSPEC_CFLAGS" +AC_TRY_COMPILE([#include <libspectrum.h>],[ + int test = LIBSPECTRUM_SUPPORTS_BZ2_COMPRESSION; +], + LIBSPEC_HAVE_BZ2=yes; AC_MSG_RESULT(yes), + LIBSPEC_HAVE_BZ2=""; AC_MSG_RESULT(no)) +CPPFLAGS="$ac_save_CPPFLAGS" +AC_SUBST(LIBSPEC_HAVE_BZ2) + +dnl Check if supplied libspectrum has support for wav files +AC_MSG_CHECKING(whether libspectrum supports wav files) +ac_save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $LIBSPEC_CFLAGS" +AC_TRY_COMPILE([#include <libspectrum.h>],[ + int test = LIBSPECTRUM_SUPPORTS_AUDIOFILE; +], + LIBSPEC_HAVE_AUDIOFILE=yes; AC_MSG_RESULT(yes), + LIBSPEC_HAVE_AUDIOFILE=""; AC_MSG_RESULT(no)) +CPPFLAGS="$ac_save_CPPFLAGS" +AC_SUBST(LIBSPEC_HAVE_AUDIOFILE) + dnl Check if a version of libpng which supplies png_write_png is available AC_MSG_CHECKING(whether PNG support requested) AC_ARG_WITH(png, @@ -681,6 +720,29 @@ AC_SUBST(COMPAT_SUBDIR) AC_SUBST(COMPAT_OSNAME) +dnl Decide whether to install desktop and mime files +AC_ARG_ENABLE(desktop-integration, +AS_HELP_STRING([--enable-desktop-integration], [add menu entry and file associations]), +if test "$enableval" = yes; then desktopintegration=yes; else desktopintegration=no; fi, +desktdesktopintegration=no) +AC_MSG_CHECKING(whether to install desktop file) +AC_MSG_RESULT($desktopintegration) +AM_CONDITIONAL(DESKTOP_INTEGRATION, test "$desktopintegration" = yes) +AC_CHECK_PROGS(GTK_UPDATE_ICON_CACHE,gtk-update-icon-cache,true) + +dnl Where to install the desktop and mime files +AC_ARG_WITH(desktop-dir, +AS_HELP_STRING([--with-desktop-dir=DIR], [location of desktop files (default=datadir)]), +if test "$withval" = no; then desktopdir=no; else desktopdir=yes; fi, +desktopdir=no) +if test "$desktopdir" = yes; then + DESKTOP_DATADIR=$with_desktop_dir +else + DESKTOP_DATADIR="$datadir" +fi +AM_CONDITIONAL(DESKTOP_DATADIR, test "$desktopdir" == yes) +AC_SUBST(DESKTOP_DATADIR) + dnl Do we want the low memory compile? AC_MSG_CHECKING(whether low memory compile requested) AC_ARG_ENABLE(smallmem, @@ -723,6 +785,7 @@ compat/unix/Makefile \ compat/wii/Makefile \ compat/win32/Makefile \ +data/Makefile \ debugger/Makefile \ hacking/Makefile \ lib/Makefile \ @@ -732,6 +795,7 @@ peripherals/disk/Makefile \ peripherals/ide/Makefile \ peripherals/nic/Makefile \ +peripherals/flash/Makefile \ perl/Makefile \ perl/Fuse/Makefile \ pokefinder/Makefile \ Added: vendor/fuse-emulator/current/fuse/data/Makefile.am =================================================================== --- vendor/fuse-emulator/current/fuse/data/Makefile.am (rev 0) +++ vendor/fuse-emulator/current/fuse/data/Makefile.am 2012-11-24 06:50:08 UTC (rev 710) @@ -0,0 +1,116 @@ +## Process this file with automake to produce Makefile.in +## Copyright (c) 2011 Philip Kendall + +## $Id: Makefile.am 4674 2012-02-20 11:03:58Z fredm $ + +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License along +## with this program; if not, write to the Free Software Foundation, Inc., +## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +## +## Author contact information: +## +## E-mail: phi...@sh... + +AUTOMAKE_OPTIONS = foreign + +if DESKTOP_INTEGRATION + +fusemimedir = $(DESKTOP_DATADIR)/mime/packages +fusemime_DATA = fuse.xml + +appdatadir = $(DESKTOP_DATADIR)/applications +appdata_DATA = fuse.desktop + +iconsdatadir = $(DESKTOP_DATADIR)/icons/hicolor +icons16dir = $(iconsdatadir)/16x16/apps +icons32dir = $(iconsdatadir)/32x32/apps +icons48dir = $(iconsdatadir)/48x48/apps +icons64dir = $(iconsdatadir)/64x64/apps +icons128dir = $(iconsdatadir)/128x128/apps +icons256dir = $(iconsdatadir)/256x256/apps + +dist_icons16_DATA = icons/16x16/fuse.png +dist_icons32_DATA = icons/32x32/fuse.png +dist_icons48_DATA = icons/48x48/fuse.png +dist_icons64_DATA = icons/64x64/fuse.png +dist_icons128_DATA = icons/128x128/fuse.png +dist_icons256_DATA = icons/256x256/fuse.png + +mimeicons16dir = $(iconsdatadir)/16x16/mimetypes +mimeicons32dir = $(iconsdatadir)/32x32/mimetypes +mimeicons48dir = $(iconsdatadir)/48x48/mimetypes +mimeicons64dir = $(iconsdatadir)/64x64/mimetypes +mimeicons128dir = $(iconsdatadir)/128x128/mimetypes +mimeicons256dir = $(iconsdatadir)/256x256/mimetypes + +dist_mimeicons16_DATA = icons/16x16/application-x-spectrum.png +dist_mimeicons32_DATA = icons/32x32/application-x-spectrum.png +dist_mimeicons48_DATA = icons/48x48/application-x-spectrum.png +dist_mimeicons64_DATA = icons/64x64/application-x-spectrum.png +dist_mimeicons128_DATA = icons/128x128/application-x-spectrum.png +dist_mimeicons256_DATA = icons/256x256/application-x-spectrum.png + +# Generate fuse.xml according to libspectrum capabilities +fuse.xml: fuse.xml.in + if test -z "$(LIBSPEC_HAVE_AUDIOFILE)"; then \ + mime_audiofile='/LIBSPECTRUM_HAVE_AUDIOFILE_BEGIN/,/LIBSPECTRUM_HAVE_AUDIOFILE_END/d'; \ + else \ + mime_audiofile='/LIBSPECTRUM_HAVE_AUDIOFILE/d'; \ + fi; \ + if test -z "$(LIBSPEC_HAVE_ZLIB)"; then \ + mime_zlib='/LIBSPECTRUM_HAVE_ZLIB_BEGIN/,/LIBSPECTRUM_HAVE_ZLIB_END/d'; \ + else \ + mime_zlib='/LIBSPECTRUM_HAVE_ZLIB/d'; \ + fi; \ + if test -z "$(LIBSPEC_HAVE_BZ2)"; then \ + mime_bz2='/LIBSPECTRUM_HAVE_BZ2_BEGIN/,/LIBSPECTRUM_HAVE_BZ2_END/d'; \ + else \ + mime_bz2='/LIBSPECTRUM_HAVE_BZ2/d'; \ + fi; \ + $(SED) -e "$$mime_audiofile" -e "$$mime_zlib" -e "$$mime_bz2" < fuse.xml.in > $@ + +# Generate fuse.desktop from fuse.xml to keep mime types list in sync +fuse.desktop: fuse.desktop.in $(srcdir)/fuse.xml + list=`$(SED) -e '/<mime-type/ s/.*<mime-type type="\(.*\)">.*/\1;/' -e t -e d < $(srcdir)/fuse.xml | tr -d '\n'` && \ + $(SED) -e "s|@MIME_TYPES@|$$list|" < fuse.desktop.in > $@ + +update-database-cache: + if test -z "$(DESTDIR)"; then \ + update-desktop-database $(DESKTOP_DATADIR)/applications; \ + update-mime-database $(DESKTOP_DATADIR)/mime; \ + touch --no-create $(iconsdatadir); \ + $(GTK_UPDATE_ICON_CACHE) -t ${iconsdatadir}; \ + fi + +install-data-hook: update-database-cache + +uninstall-hook: update-database-cache + +validate: fuse.desktop + ( dfvalidate=`which desktop-file-validate`; \ + if test x$$dfvalidate != x && test -x $$dfvalidate; then \ + $$dfvalidate $< || ( echo "* $< INVALID *"; exit 1 ) \ + fi ) + +dist-hook: validate + +endif + +EXTRA_DIST = \ + fuse.desktop.in \ + fuse.xml.in + +CLEANFILES = \ + fuse.desktop \ + fuse.xml + Added: vendor/fuse-emulator/current/fuse/data/fuse.desktop.in =================================================================== --- vendor/fuse-emulator/current/fuse/data/fuse.desktop.in (rev 0) +++ vendor/fuse-emulator/current/fuse/data/fuse.desktop.in 2012-11-24 06:50:08 UTC (rev 710) @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Categories=Game;Emulator;GNOME;GTK; +Name=Fuse Spectrum Emulator +Comment=Emulator of the 1980s ZX Spectrum home computer and its various clones +MimeType=@MIME_TYPES@ +Exec=fuse %f +Icon=fuse + Added: vendor/fuse-emulator/current/fuse/data/fuse.xml.in =================================================================== --- vendor/fuse-emulator/current/fuse/data/fuse.xml.in (rev 0) +++ vendor/fuse-emulator/current/fuse/data/fuse.xml.in 2012-11-24 06:50:08 UTC (rev 710) @@ -0,0 +1,284 @@ +<?xml version="1.0" encoding="UTF-8"?> +<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> + <mime-type type="audio/x-spectrum-csw"> + <comment>ZX Spectrum audio</comment> + <magic> + <match type="string" offset="0" value="Compressed Square Wave\x1a"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.csw"/> + </mime-type> + <mime-type type="application/x-spectrum-dck"> + <comment>ZX Spectrum cartridge</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.dck"/> + </mime-type> + <mime-type type="application/x-spectrum-dsk"> + <comment>ZX Spectrum disk</comment> + <magic> + <match type="string" offset="0" value="MV - CPCEMU Disk-File\x0d\x0aDisk-Info\x0d\x0a"/> + <match type="string" offset="0" value="EXTENDED CPC DSK File\x0d\x0aDisk-Info\x0d\x0a"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.dsk"/> + </mime-type> + <mime-type type="application/x-spectrum-fdi"> + <comment>ZX Spectrum disk</comment> + <magic> + <match type="string" offset="0" value="FDI"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.fdi"/> + </mime-type> + <mime-type type="application/x-spectrum-hdf"> + <comment>ZX Spectrum harddisk</comment> + <magic> + <match type="string" offset="0" value="RS-IDE\x1a"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.hdf"/> + </mime-type> + <mime-type type="application/x-spectrum-img"> + <comment>ZX Spectrum disk</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.img"/> + </mime-type> + <mime-type type="application/x-spectrum-ltp"> + <comment>ZX Spectrum tape</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.ltp"/> + </mime-type> + <mime-type type="application/x-spectrum-mdr"> + <comment>ZX Spectrum microdrive</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.mdr"/> + </mime-type> + <mime-type type="application/x-spectrum-mgt"> + <comment>ZX Spectrum disk</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.mgt"/> + </mime-type> + <mime-type type="application/x-spectrum-mgtsnp"> + <comment>ZX Spectrum snapshot</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.mgtsnp"/> + </mime-type> + <mime-type type="application/x-spectrum-opd"> + <comment>ZX Spectrum disk</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.opd"/> + </mime-type> + <mime-type type="application/x-spectrum-opu"> + <comment>ZX Spectrum disk</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.opu"/> + </mime-type> + <mime-type type="application/x-spectrum-pzx"> + <comment>ZX Spectrum tape</comment> + <magic> + <match type="string" offset="0" value="PZXT"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.pzx"/> + </mime-type> + <mime-type type="application/x-spectrum-raw"> + <comment>ZX Spectrum tape</comment> + <magic> + <match type="string" offset="0" value="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Raw tape sample"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.raw"/> + </mime-type> + <mime-type type="application/x-spectrum-rom"> + <comment>ZX Spectrum cartridge</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.rom"/> + </mime-type> + <mime-type type="application/x-spectrum-rzx"> + <comment>ZX Spectrum action replay</comment> + <magic> + <match type="string" offset="0" value="RZX!"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.rzx"/> + </mime-type> + <mime-type type="application/x-spectrum-sad"> + <comment>ZX Spectrum disk</comment> + <magic> + <match type="string" offset="0" value="Aley's disk backup"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.sad"/> + </mime-type> + <mime-type type="application/x-spectrum-scl"> + <comment>ZX Spectrum disk</comment> + <magic> + <match type="string" offset="0" value="SINCLAIR"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.scl"/> + </mime-type> + <mime-type type="application/x-spectrum-slt"> + <comment>ZX Spectrum snapshot</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.slt"/> + </mime-type> + <mime-type type="application/x-spectrum-sna"> + <comment>ZX Spectrum snapshot</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.sna"/> + <glob pattern="*.snapshot"/> + </mime-type> + <mime-type type="application/x-spectrum-snp"> + <comment>ZX Spectrum snapshot</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.snp"/> + </mime-type> + <mime-type type="application/x-spectrum-sp"> + <comment>ZX Spectrum snapshot</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.sp"/> + </mime-type> + <mime-type type="application/x-spectrum-spc"> + <comment>ZX Spectrum tape</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.spc"/> + </mime-type> + <mime-type type="application/x-spectrum-sta"> + <comment>ZX Spectrum tape</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.sta"/> + </mime-type> + <mime-type type="application/x-spectrum-szx"> + <comment>ZX Spectrum snapshot</comment> + <magic> + <match type="string" offset="0" value="ZXST"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.szx"/> + <glob pattern="*.zx-state"/> + </mime-type> + <mime-type type="application/x-spectrum-td0"> + <comment>ZX Spectrum disk</comment> + <magic> + <match type="string" offset="0" value="TD"/> + <match type="string" offset="0" value="td"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.td0"/> + </mime-type> + <mime-type type="application/x-spectrum-tap"> + <comment>ZX Spectrum tape</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.tap"/> + </mime-type> + <mime-type type="application/x-spectrum-trd"> + <comment>ZX Spectrum disk</comment> + <magic> + <match type="string" offset="0" value="SINCLAIR"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.trd"/> + </mime-type> + <mime-type type="application/x-spectrum-tzx"> + <comment>ZX Spectrum tape</comment> + <magic> + <match type="string" offset="0" value="ZXTape!\x1a"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.tzx"/> + </mime-type> + <mime-type type="application/x-spectrum-udi"> + <comment>ZX Spectrum disk</comment> + <magic> + <match type="string" offset="0" value="UDI!"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.udi"/> + </mime-type> + <mime-type type="application/x-spectrum-z80"> + <comment>ZX Spectrum snapshot</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.z80"/> + </mime-type> + <mime-type type="application/x-spectrum-zxs"> + <comment>ZX Spectrum snapshot</comment> + <magic> + <match type="string" offset="0" value="SNAP"/> + </magic> + <icon name="application-x-spectrum"/> + <glob pattern="*.zxs"/> + </mime-type> + ##LIBSPECTRUM_HAVE_AUDIOFILE_BEGIN## + <mime-type type="audio/x-spectrum-wav"> + <comment>ZX Spectrum audio</comment> + <magic priority="20"> + <match value="WAVE" type="string" offset="8"/> + <match value="WAV " type="string" offset="8"/> + </magic> + <glob pattern="*.wav"/> + </mime-type> + ##LIBSPECTRUM_HAVE_AUDIOFILE_END## + ##LIBSPECTRUM_HAVE_ZLIB_BEGIN## + <mime-type type="application/x-spectrum-compressed"> + <comment>ZX Spectrum compressed</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.csw.gz"/> + <glob pattern="*.dck.gz"/> + <glob pattern="*.hdf.gz"/> + <glob pattern="*.mdr.gz"/> + <glob pattern="*.mgtsnp.gz"/> + <glob pattern="*.ltp.gz"/> + <glob pattern="*.pzx.gz"/> + <glob pattern="*.raw.gz"/> + <glob pattern="*.rom.gz"/> + <glob pattern="*.rzx.gz"/> + <glob pattern="*.slt.gz"/> + <glob pattern="*.sna.gz"/> + <glob pattern="*.snapshot.gz"/> + <glob pattern="*.snp.gz"/> + <glob pattern="*.sp.gz"/> + <glob pattern="*.spc.gz"/> + <glob pattern="*.sta.gz"/> + <glob pattern="*.szx.gz"/> + <glob pattern="*.tap.gz"/> + <glob pattern="*.tzx.gz"/> + ##LIBSPECTRUM_HAVE_AUDIOFILE_BEGIN## + <glob pattern="*.wav.gz"/> + ##LIBSPECTRUM_HAVE_AUDIOFILE_END## + <glob pattern="*.z80.gz"/> + <glob pattern="*.zxs.gz"/> + </mime-type> + ##LIBSPECTRUM_HAVE_ZLIB_END## + ##LIBSPECTRUM_HAVE_BZ2_BEGIN## + <mime-type type="application/x-spectrum-compressed-bz2"> + <comment>ZX Spectrum compressed</comment> + <icon name="application-x-spectrum"/> + <glob pattern="*.csw.bz2"/> + <glob pattern="*.dck.bz2"/> + <glob pattern="*.hdf.bz2"/> + <glob pattern="*.mdr.bz2"/> + <glob pattern="*.mgtsnp.bz2"/> + <glob pattern="*.ltp.bz2"/> + <glob pattern="*.pzx.bz2"/> + <glob pattern="*.raw.bz2"/> + <glob pattern="*.rom.bz2"/> + <glob pattern="*.rzx.bz2"/> + <glob pattern="*.slt.bz2"/> + <glob pattern="*.sna.bz2"/> + <glob pattern="*.snapshot.bz2"/> + <glob pattern="*.snp.bz2"/> + <glob pattern="*.sp.bz2"/> + <glob pattern="*.spc.bz2"/> + <glob pattern="*.sta.bz2"/> + <glob pattern="*.szx.bz2"/> + <glob pattern="*.tap.bz2"/> + <glob pattern="*.tzx.bz2"/> + ##LIBSPECTRUM_HAVE_AUDIOFILE_BEGIN## + <glob pattern="*.wav.bz2"/> + ##LIBSPECTRUM_HAVE_AUDIOFILE_END## + <glob pattern="*.z80.bz2"/> + <glob pattern="*.zxs.bz2"/> + </mime-type> + ##LIBSPECTRUM_HAVE_BZ2_END## +</mime-info> Added: vendor/fuse-emulator/current/fuse/data/icons/128x128/application-x-spectrum.png =================================================================== (Binary files differ) Property changes on: vendor/fuse-emulator/current/fuse/data/icons/128x128/application-x-spectrum.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: vendor/fuse-emulator/current/fuse/data/icons/128x128/fuse.png =================================================================== (Binary files differ) Property changes on: vendor/fuse-emulator/current/fuse/data/icons/128x128/fuse.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: vendor/fuse-emulator/current/fuse/data/icons/16x16/application-x-spectrum.png =================================================================== (Binary files differ) Property changes on: vendor/fuse-emulator/current/fuse/data/icons/16x16/application-x-spectrum.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: vendor/fuse-emulator/current/fuse/data/icons/16x16/fuse.png =================================================================== (Binary files differ) Property changes on: vendor/fuse-emulator/current/fuse/data/icons/16x16/fuse.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: vendor/fuse-emulator/current/fuse/data/icons/256x256/application-x-spectrum.png =================================================================== (Binary files differ) Property changes on: vendor/fuse-emulator/current/fuse/data/icons/256x256/application-x-spectrum.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: vendor/fuse-emulator/current/fuse/data/icons/256x256/fuse.png =================================================================== (Binary files differ) Property changes on: vendor/fuse-emulator/current/fuse/data/icons/256x256/fuse.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: vendor/fuse-emulator/current/fuse/data/icons/32x32/application-x-spectrum.png =================================================================== (Binary files differ) Property changes on: vendor/fuse-emulator/current/fuse/data/icons/32x32/application-x-spectrum.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: vendor/fuse-emulator/current/fuse/data/icons/32x32/fuse.png =================================================================== (Binary files differ) Property changes on: vendor/fuse-emulator/current/fuse/data/icons/32x32/fuse.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: vendor/fuse-emulator/current/fuse/data/icons/48x48/application-x-spectrum.png =================================================================== (Binary files differ) Property changes on: vendor/fuse-emulator/current/fuse/data/icons/48x48/application-x-spectrum.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: vendor/fuse-emulator/current/fuse/data/icons/48x48/fuse.png =================================================================== (Binary files differ) Property changes on: vendor/fuse-emulator/current/fuse/data/icons/48x48/fuse.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: vendor/fuse-emulator/current/fuse/data/icons/64x64/application-x-spectrum.png =================================================================== (Binary files differ) Property changes on: vendor/fuse-emulator/current/fuse/data/icons/64x64/application-x-spectrum.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: vendor/fuse-emulator/current/fuse/data/icons/64x64/fuse.png =================================================================== (Binary files differ) Property changes on: vendor/fuse-emulator/current/fuse/data/icons/64x64/fuse.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: vendor/fuse-emulator/current/fuse/debugger/breakpoint.c =================================================================== --- vendor/fuse-emulator/current/fuse/debugger/breakpoint.c 2012-11-23 12:25:10 UTC (rev 709) +++ vendor/fuse-emulator/current/fuse/debugger/breakpoint.c 2012-11-24 06:50:08 UTC (rev 710) @@ -1,7 +1,7 @@ /* breakpoint.c: a debugger breakpoint Copyright (c) 2002-2011 Philip Kendall - $Id: breakpoint.c 4415 2011-05-01 22:51:43Z pak21 $ + $Id: breakpoint.c 4641 2012-01-21 13:42:51Z pak21 $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -35,6 +35,7 @@ #include "fuse.h" #include "memory.h" #include "ui/ui.h" +#include "utils.h" /* The current breakpoints */ GSList *debugger_breakpoints; @@ -177,13 +178,8 @@ } value.event.detail = NULL; - value.event.type = strdup( type_string ); - value.event.detail = strdup( detail ); - if( !value.event.type || !value.event.detail ) { - free( value.event.type ); - free( value.event.detail ); - return 1; - } + value.event.type = utils_safe_strdup( type_string ); + value.event.detail = utils_safe_strdup( detail ); return breakpoint_add( type, value, ignore, life, condition ); } @@ -197,8 +193,8 @@ bp = malloc( sizeof( *bp ) ); if( !bp ) { - ui_error( UI_ERROR_ERROR, "Out of memory at %s:%d", __FILE__, __LINE__ ); - return 1; + ui_error( UI_ERROR_ERROR, "out of memory at %s:%d", __FILE__, __LINE__ ); + fuse_abort(); } bp->id = next_breakpoint_id++; bp->type = type; @@ -223,13 +219,9 @@ /* If this was a timed breakpoint, set an event to stop emulation at that point */ - if( type == DEBUGGER_BREAKPOINT_TYPE_TIME ) { - int error; + if( type == DEBUGGER_BREAKPOINT_TYPE_TIME ) + event_add( value.time.tstates, debugger_breakpoint_event ); - error = event_add( value.time.tstates, debugger_breakpoint_event ); - if( error ) return error; - } - return 0; } @@ -274,16 +266,16 @@ static memory_page* get_page( debugger_breakpoint_type type, libspectrum_word address ) { - memory_page *page; + memory_page *bank; switch( type ) { case DEBUGGER_BREAKPOINT_TYPE_EXECUTE: case DEBUGGER_BREAKPOINT_TYPE_READ: - page = memory_map_read; + bank = memory_map_read; break; case DEBUGGER_BREAKPOINT_TYPE_WRITE: - page = memory_map_write; + bank = memory_map_write; break; default: @@ -292,7 +284,7 @@ fuse_abort(); } - return page; + return &bank[ address >> MEMORY_PAGE_SIZE_LOGARITHM ]; } int @@ -566,8 +558,7 @@ if( !bp ) return 1; free( bp->commands ); - bp->commands = strdup( commands ); - if( !bp->commands ) return 1; + bp->commands = utils_safe_strdup( commands ); return 0; } Modified: vendor/fuse-emulator/current/fuse/debugger/command.c =================================================================== --- vendor/fuse-emulator/current/fuse/debugger/command.c 2012-11-23 12:25:10 UTC (rev 709) +++ vendor/fuse-emulator/current/fuse/debugger/command.c 2012-11-24 06:50:08 UTC (rev 710) @@ -1,7 +1,7 @@ /* command.c: Parse a debugger command Copyright (c) 2002-2008 Philip Kendall - $Id: command.c 4125 2010-05-06 22:18:50Z pak21 $ + $Id: command.c 4633 2012-01-19 23:26:10Z pak21 $ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -33,6 +33,7 @@ #include "debugger_internals.h" #include "mempool.h" #include "ui/ui.h" +#include "utils.h" #include "z80/z80.h" #include "z80/z80_macros.h" @@ -46,18 +47,14 @@ in... [truncated message content] |