merge args.h into config.h

This commit is contained in:
Gwenhael Le Moine 2024-09-22 15:12:32 +02:00
parent 9b0150b6a1
commit 938fecafda
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
14 changed files with 66 additions and 120 deletions

View file

@ -1,103 +0,0 @@
#ifndef _ARGS_H
#define _ARGS_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
------------------------------------------------------------------------- */
/* +-+ */
/* .+
.identifier : $Id: args.h,v 4.1 2000/12/11 09:54:19 cibrario Rel $
.context : SATURN, Saturn CPU / HP48 emulator
.title : $RCSfile: args.h,v $
.kind : C header
.author : Ivan Cibrario B.
.site : CSTV-CNR
.creation : 19-Jan-1998
.keywords : *
.description :
This header declares a global data structure containing the emulator
invocation arguments; this data structure is initialized before startup,
either by means of argc/argv or in other ways.
.include : config.h
.notes :
$Log: args.h,v $
Revision 4.1 2000/12/11 09:54:19 cibrario
Public release.
Revision 3.15 2000/11/15 14:03:06 cibrario
GUI enhancements and assorted bug fixes:
- added .batchXfer boolean (corresponding to command-line option
-batchXfer) to struct Args
Revision 3.10 2000/10/24 16:14:25 cibrario
Added/Replaced GPL header
Revision 2.1 2000/09/08 14:45:06 cibrario
Added the following fields to 'struct Args': reset, monitor, hw.
The latter mimes the setting of the -hw command line option and
of the *hw top-level application resource; the former two have
been added to export them cleanly from the GUI modules.
* Revision 1.1 1998/02/17 11:58:37 cibrario
* Initial revision
*
.- */
/*---------------------------------------------------------------------------
Data type definitions - require config.h
---------------------------------------------------------------------------*/
struct Args {
int reset; /* 2.1: Force emulator reset */
int monitor; /* 2.1: Call monitor() on startup */
int batchXfer; /* 3.15: Non-interactive file transfers */
char* mod_file_name;
char* cpu_file_name;
char* hdw_file_name;
char* rom_file_name;
char* ram_file_name;
char* port_1_file_name;
char* port_2_file_name;
char* hw; /* 2.1: Hardware configuration (unused) */
};
/*---------------------------------------------------------------------------
Global variables
---------------------------------------------------------------------------*/
extern struct Args args;
#endif /*!_ARGS_H*/

View file

@ -228,4 +228,70 @@
#define X_FUNC_CHF_MODULE_ID 18 /* 3.13 */
#define DEBUG_CHF_MODULE_ID 30
/* .+
.identifier : $Id: args.h,v 4.1 2000/12/11 09:54:19 cibrario Rel $
.context : SATURN, Saturn CPU / HP48 emulator
.title : $RCSfile: args.h,v $
.kind : C header
.author : Ivan Cibrario B.
.site : CSTV-CNR
.creation : 19-Jan-1998
.keywords : *
.description :
This header declares a global data structure containing the emulator
invocation arguments; this data structure is initialized before startup,
either by means of argc/argv or in other ways.
.include : config.h
.notes :
$Log: args.h,v $
Revision 4.1 2000/12/11 09:54:19 cibrario
Public release.
Revision 3.15 2000/11/15 14:03:06 cibrario
GUI enhancements and assorted bug fixes:
- added .batchXfer boolean (corresponding to command-line option
-batchXfer) to struct Args
Revision 3.10 2000/10/24 16:14:25 cibrario
Added/Replaced GPL header
Revision 2.1 2000/09/08 14:45:06 cibrario
Added the following fields to 'struct Args': reset, monitor, hw.
The latter mimes the setting of the -hw command line option and
of the *hw top-level application resource; the former two have
been added to export them cleanly from the GUI modules.
* Revision 1.1 1998/02/17 11:58:37 cibrario
* Initial revision
*
.- */
/*---------------------------------------------------------------------------
Data type definitions - require config.h
---------------------------------------------------------------------------*/
struct Args {
int reset; /* 2.1: Force emulator reset */
int monitor; /* 2.1: Call monitor() on startup */
int batchXfer; /* 3.15: Non-interactive file transfers */
char* mod_file_name;
char* cpu_file_name;
char* hdw_file_name;
char* rom_file_name;
char* ram_file_name;
char* port_1_file_name;
char* port_2_file_name;
char* hw; /* 2.1: Hardware configuration (unused) */
};
/*---------------------------------------------------------------------------
Global variables
---------------------------------------------------------------------------*/
extern struct Args args;
#endif /*!_CONFIG_H*/

View file

@ -113,7 +113,6 @@ static char rcs_id[] = "$Id: cpu.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $";
#include "modules.h"
#include "keyb.h"
#include "disk_io.h" /* 3.1: ReadStructFromFile/WriteStructToFile */
#include "args.h"
#include "debug.h"
#define CHF_MODULE_ID CPU_CHF_MODULE_ID

View file

@ -125,7 +125,6 @@ static char rcs_id[] = "$Id: emulator.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $
#include "x11_lcd.h"
#include "x11.h"
#include "serial.h"
#include "args.h"
#include "debug.h"
#define CHF_MODULE_ID CPU_CHF_MODULE_ID

View file

@ -85,8 +85,6 @@ static char rcs_id[] = "$Id: flash49.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $"
#include "flash49.h"
#include "debug.h"
#include "args.h"
#define CHF_MODULE_ID FLASH_CHF_MODULE_ID
#include <Chf.h>

View file

@ -118,8 +118,6 @@ static char rcs_id[] = "$Id: hdw.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $";
#include "x_func.h" /* 3.13: Extended emulator functions */
#include "debug.h"
#include "args.h"
#define CHF_MODULE_ID MOD_CHF_MODULE_ID
#include <Chf.h>

View file

@ -111,7 +111,6 @@ static char rcs_id[] = "$Id: saturn.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $";
#include "cpu.h"
#include "x11.h"
#include "serial.h"
#include "args.h"
#include "debug.h"
#include "monitor.h"

View file

@ -125,7 +125,6 @@ static char rcs_id[] = "$Id: modules.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $"
#include "cpu.h"
#include "modules.h"
#include "disk_io.h"
#include "args.h"
#include "debug.h"
#define CHF_MODULE_ID MOD_CHF_MODULE_ID

View file

@ -80,7 +80,6 @@ static char rcs_id[] = "$Id: monitor.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $"
#include "machdep.h"
#include "cpu.h"
#include "modules.h"
#include "args.h"
#include "debug.h"
#define CHF_MODULE_ID CPU_CHF_MODULE_ID

View file

@ -96,8 +96,6 @@ static char rcs_id[] = "$Id: romram.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $";
#include "disk_io.h"
#include "debug.h"
#include "args.h"
#define CHF_MODULE_ID MOD_CHF_MODULE_ID
#include <Chf.h>

View file

@ -109,8 +109,6 @@ static char rcs_id[] = "$Id: romram49.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $
#include "disk_io.h"
#include "debug.h"
#include "args.h"
#define CHF_MODULE_ID MOD_CHF_MODULE_ID
#include <Chf.h>

View file

@ -115,8 +115,6 @@ static char rcs_id[] = "$Id: serial.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $";
#include "serial.h" /* 2.5: Serial port emulation module */
#include "debug.h"
#include "args.h"
#define CHF_MODULE_ID SERIAL_CHF_MODULE_ID
#include <Chf.h>

View file

@ -213,7 +213,6 @@ static char rcs_id[] = "$Id: x11.c,v 4.1.1.1 2002/11/11 16:11:47 cibrario Exp $"
#include "keyb.h"
#include "serial.h"
#include "x11.h"
#include "args.h"
#include "debug.h"
#define CHF_MODULE_ID X11_CHF_MODULE_ID

View file

@ -104,7 +104,6 @@ static char rcs_id[] = "$Id: x_func.c,v 4.1 2000/12/11 09:54:19 cibrario Rel $";
#include "disk_io.h"
#include "x11.h" /* ActivateFSB() */
#include "x_func.h"
#include "args.h"
#include "debug.h"
#define CHF_MODULE_ID X_FUNC_CHF_MODULE_ID