--- mon/src/mon_cmd.cpp 1999/10/04 19:31:09 1.1.1.1 +++ mon/src/mon_cmd.cpp 1999/10/25 08:04:47 1.4 @@ -1,12 +1,26 @@ /* * mon_cmd.cpp - mon standard commands * - * (C) 1997-1999 Christian Bauer + * mon (C) 1997-1999 Christian Bauer, Marc Hellwig + * + * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include -#include +#include "sysdeps.h" + +#include #include "mon.h" #include "mon_cmd.h" @@ -104,7 +118,7 @@ static inline uint8 char2print(uint8 c) void version(void) { - fprintf(monout, "mon V%d.%d\n", MON_VERSION, MON_REVISION); + fprintf(monout, "mon V%d.%d\n", MON_VERSION_MAJOR, MON_VERSION_MINOR); } @@ -157,14 +171,14 @@ void print_expr(void) } if (val > 0x7fffffff) { - fprintf(monout, "Hex unsigned: $%08lx\n" - "Hex signed : -$%08lx\n" - "Dec unsigned: %lu\n" - "Dec signed : %ld\n", val, -val, val, val); + fprintf(monout, "Hex unsigned: $%08x\n" + "Hex signed : -$%08x\n" + "Dec unsigned: %u\n" + "Dec signed : %d\n", val, -val, val, val); fprintf(monout, "Char : '%c%c%c%c'\n", char2print(val >> 24), char2print(val >> 16), char2print(val >> 8), char2print(val)); } else { - fprintf(monout, "Hex : $%08lx\n" - "Dec : %ld\n", val, val); + fprintf(monout, "Hex : $%08x\n" + "Dec : %d\n", val, val); fprintf(monout, "Char: '%c%c%c%c'\n", char2print(val >> 24), char2print(val >> 16), char2print(val >> 8), char2print(val)); } } @@ -208,10 +222,10 @@ void memory_dump(void) return; while (adr <= end_adr && !mon_aborted()) { - fprintf(monout, "%08lx:", mon_use_real_mem ? adr: adr % mon_mem_size); + fprintf(monout, "%08x:", mon_use_real_mem ? adr: adr % mon_mem_size); for (int i=0; i