--- a/src/sh4/sh4dasm.in Wed Nov 07 11:46:58 2007 +0000 +++ b/src/sh4/sh4dasm.in Tue Jan 15 20:50:23 2008 +0000 @@ -1,5 +1,5 @@ /** - * $Id: sh4dasm.in,v 1.3 2007-11-07 11:46:58 nkeynes Exp $ + * $Id$ * * SH4 CPU definition and disassembly functions * @@ -285,19 +285,16 @@ } -void sh4_disasm_region( const gchar *filename, int from, int to ) +void sh4_disasm_region( FILE *f, int from, int to ) { int pc; char buf[80]; char opcode[16]; - FILE *f; - f = fopen( filename, "w" ); for( pc = from; pc < to; pc+=2 ) { buf[0] = '\0'; sh4_disasm_instruction( pc, buf, sizeof(buf), opcode ); fprintf( f, " %08x: %s %s\n", pc, opcode, buf ); } - fclose(f); }