From 83a05247ac404e312fda45ef236b31525111fc46 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 11 Sep 2024 20:53:03 +0200 Subject: [PATCH] make a header for monitor (debugger); rename t48.c --- src/main.c | 6 +++--- src/{t48.c.unused => main_t48.c} | 8 +++---- src/monitor.h | 37 ++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 8 deletions(-) rename src/{t48.c.unused => main_t48.c} (99%) create mode 100644 src/monitor.h diff --git a/src/main.c b/src/main.c index bc8111b..19d8829 100644 --- a/src/main.c +++ b/src/main.c @@ -113,6 +113,7 @@ static char rcs_id[] = "$Id: saturn.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $"; #include "serial.h" #include "args.h" #include "debug.h" +#include "monitor.h" /* Chf condition codes (main program only) */ @@ -277,11 +278,10 @@ int main( int argc, char* argv[] ) ChfSignal(); } - if ( args.monitor ) { + if ( args.monitor ) /* Invoke Monitor */ - void Monitor( void ); Monitor(); - } else + else /* Call Emulator directly */ Emulator(); diff --git a/src/t48.c.unused b/src/main_t48.c similarity index 99% rename from src/t48.c.unused rename to src/main_t48.c index 75edeb0..44c4535 100644 --- a/src/t48.c.unused +++ b/src/main_t48.c @@ -86,6 +86,7 @@ static char rcs_id[] = "$Id: t48.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $"; #include "x11.h" #include "args.h" #include "debug.h" +#include "monitor.h" #define CHF_MODULE_ID X11_CHF_MODULE_ID #include @@ -579,15 +580,12 @@ int main( int argc, char* argv[] ) CpuReset(); } - if ( opt.monitor ) { + if ( opt.monitor ) /* Call Monitor */ Monitor(); - } - - else { + else /* Call Emulator directly */ Emulator(); - } return EXIT_SUCCESS; } diff --git a/src/monitor.h b/src/monitor.h new file mode 100644 index 0000000..6f3f574 --- /dev/null +++ b/src/monitor.h @@ -0,0 +1,37 @@ +#ifndef _MONITOR_H +#define _MONITOR_H 1 + +/* ------------------------------------------------------------------------- + saturn - A poor-man's emulator of some HP calculators + Copyright (C) 1998-2000 Ivan Cibrario Bertolotti + + 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 the documentation of this program; if not, write to + the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + For more information, please contact the author, preferably by email, + at the following address: + + Ivan Cibrario Bertolotti + IRITI - National Research Council + c/o IEN "Galileo Ferraris" + Strada delle Cacce, 91 + 10135 - Torino (ITALY) + + email: cibrario@iriti.cnr.it + ------------------------------------------------------------------------- */ + +void Monitor( void ); + +#endif /*!_MONITOR_H*/