From 807292bc9fa318b751c2cd78a87765e06631f380 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 24 Sep 2024 22:52:29 +0200 Subject: [PATCH] fix includes, clean --- libChf/tests/test01.c | 2 +- libChf/tests/test02.c | 2 +- libChf/tests/test03.c | 2 +- libChf/tests/test04.c | 2 +- libChf/tests/test05.c | 2 +- libChf/tests/test06.c | 2 +- libChf/tests/test07.c | 2 +- src/config.h | 57 ------------------------------------------- src/ui48_config.c | 7 ------ src/ui48_main.c | 12 +++++++++ 10 files changed, 19 insertions(+), 71 deletions(-) diff --git a/libChf/tests/test01.c b/libChf/tests/test01.c index 570408a..a8721da 100644 --- a/libChf/tests/test01.c +++ b/libChf/tests/test01.c @@ -16,7 +16,7 @@ #define CHF_MODULE_ID 255 #define CHF_EXTENDED_INFO -#include "Chf.h" +#include "../src/Chf.h" int main( int argc, char* argv[] ) { diff --git a/libChf/tests/test02.c b/libChf/tests/test02.c index 02438d9..5200345 100644 --- a/libChf/tests/test02.c +++ b/libChf/tests/test02.c @@ -16,7 +16,7 @@ #define CHF_MODULE_ID 255 #define CHF_EXTENDED_INFO -#include "Chf.h" +#include "../src/Chf.h" void* task( void* arg ) { diff --git a/libChf/tests/test03.c b/libChf/tests/test03.c index 9108452..3a3f6aa 100644 --- a/libChf/tests/test03.c +++ b/libChf/tests/test03.c @@ -19,7 +19,7 @@ #define CHF_MODULE_ID 255 #define CHF_EXTENDED_INFO -#include "Chf.h" +#include "../src/Chf.h" void* task( void* arg ) { diff --git a/libChf/tests/test04.c b/libChf/tests/test04.c index 86810b8..5fc2928 100644 --- a/libChf/tests/test04.c +++ b/libChf/tests/test04.c @@ -19,7 +19,7 @@ #define CHF_MODULE_ID 255 #define CHF_EXTENDED_INFO -#include "Chf.h" +#include "../src/Chf.h" struct tdata_s { const ChfDescriptor *d, *e; diff --git a/libChf/tests/test05.c b/libChf/tests/test05.c index 8cd19e2..b24417a 100644 --- a/libChf/tests/test05.c +++ b/libChf/tests/test05.c @@ -19,7 +19,7 @@ #define CHF_MODULE_ID 255 #define CHF_EXTENDED_INFO -#include "Chf.h" +#include "../src/Chf.h" #define H_STACK_SIZE 10 #define C_STACK_SIZE 30 diff --git a/libChf/tests/test06.c b/libChf/tests/test06.c index a31963d..b89b2d4 100644 --- a/libChf/tests/test06.c +++ b/libChf/tests/test06.c @@ -19,7 +19,7 @@ #define CHF_MODULE_ID 255 #define CHF_EXTENDED_INFO -#include "Chf.h" +#include "../src/Chf.h" #define H_STACK_SIZE 10 #define C_STACK_SIZE 30 diff --git a/libChf/tests/test07.c b/libChf/tests/test07.c index d721f2a..384b9b6 100644 --- a/libChf/tests/test07.c +++ b/libChf/tests/test07.c @@ -16,7 +16,7 @@ #define CHF_MODULE_ID 255 #define CHF_EXTENDED_INFO -#include "Chf.h" +#include "../src/Chf.h" extern ChfTable message_table[]; extern size_t message_table_size; diff --git a/src/config.h b/src/config.h index 6f97310..8229ce8 100644 --- a/src/config.h +++ b/src/config.h @@ -155,13 +155,6 @@ */ #define DEBUG_LEVEL DEBUG_C_REVISION -/* 2.1: FORCE_NONMODAL - If this symbol is defined, nonmodal navigation is forced in the - OSF/Motif GUI, by setting navigationType to XmNONE and traversalOn - to False at the source code level. -*/ -/* #define FORCE_NONMODAL */ - /* 2.4: N_PORT_2_BANK This symbol is used to dimension the HP48GX Port_2: it denotes the number of 128 Kbyte banks the port must have and must be a power of 2 @@ -202,14 +195,6 @@ */ #define CPU_SLOW_IN 16 -/* 4.1.1.1: LCD_MAG - This symbol represents the magnification ratio of the emulated LCD pixels - when drawn on the emulated display; supported values are 1 and 2; 2 is the - default. Currently, the value cannot be set at runtime for performance - reasons. -*/ -#define LCD_MAG 2 - /* 4.1.1.1: When defined, this symbol represents the threshold of the long key pression. When the mouse button is kept pressed on a calculator's key for more than LONG_PRESS_THR milliseconds, the key stays pressed after @@ -232,48 +217,6 @@ #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 - * - -.- */ - /*--------------------------------------------------------------------------- Global variables ---------------------------------------------------------------------------*/ diff --git a/src/ui48_config.c b/src/ui48_config.c index e35f70f..ae1afdf 100644 --- a/src/ui48_config.c +++ b/src/ui48_config.c @@ -129,7 +129,6 @@ config_t* config_init( int argc, char* argv[] ) char* clopt_ram_file_name = "ram"; char* clopt_port_1_file_name = "port1"; char* clopt_port_2_file_name = "port2"; - /* char* clopt_hw = "hp48"; */ const char* optstring = "h"; struct option long_options[] = { @@ -162,7 +161,6 @@ config_t* config_init( int argc, char* argv[] ) /* {"ram", required_argument, NULL, 8040 }, */ /* {"port1", required_argument, NULL, 8050 }, */ /* {"port2", required_argument, NULL, 8060 }, */ - /* {"hw", required_argument, NULL, 8070 }, */ {0, 0, 0, 0 } }; @@ -236,9 +234,6 @@ config_t* config_init( int argc, char* argv[] ) /* case 8060: */ /* clopt_port_2_file_name = optarg; */ /* break; */ - /* case 8070: */ - /* clopt_hw = optarg; */ - /* break; */ default: break; @@ -300,8 +295,6 @@ config_t* config_init( int argc, char* argv[] ) /* config.port_1_file_name = strdup( clopt_port_1_file_name ); */ /* if ( clopt_port_2_file_name != NULL ) */ /* config.port_2_file_name = strdup( clopt_port_2_file_name ); */ - /* if ( clopt_hw != NULL ) */ - /* config.hw = strdup( clopt_hw ); */ config.mod_file_name = normalize_filename( config.state_dir_path, clopt_mod_file_name ); config.cpu_file_name = normalize_filename( config.state_dir_path, clopt_cpu_file_name ); diff --git a/src/ui48_main.c b/src/ui48_main.c index 3d3981f..1830190 100644 --- a/src/ui48_main.c +++ b/src/ui48_main.c @@ -111,6 +111,18 @@ int main( int argc, char** argv ) else break; + /* if ( ( st = ChfStaticInit( argv[ 0 ], /\* Application's name *\/ */ + /* CHF_DEFAULT, /\* Options *\/ */ + /* [], /\* Name of the message catalog *\/ */ + /* CONDITION_STACK_SIZE, /\* Size of the condition stack *\/ */ + /* HANDLER_STACK_SIZE, /\* Size of the handler stack *\/ */ + /* EXIT_FAILURE /\* Abnormal exit code *\/ */ + /* ) ) != CHF_S_OK || */ + /* ChfGetMessage( CHF_MODULE_ID, MAIN_M_COPYRIGHT, NULL ) == NULL ) */ + /* fprintf( stderr, "saturn-E-Primary Chf initialization failed (%d)\n", st ); */ + /* else */ + /* break; */ + /* Bring down Chf before initializing it again */ if ( st == CHF_S_OK ) ChfExit();