From 5ea10494af8d034c969704089aca28917c7439b6 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Thu, 29 Aug 2024 13:44:54 +0200 Subject: [PATCH] Add header guard to all header files --- src/args.h | 5 +++++ src/config.h | 5 +++++ src/cpu.h | 5 +++++ src/debug.h | 5 +++++ src/disk_io.h | 5 +++++ src/display.h | 5 +++++ src/flash49.h | 5 +++++ src/hw_config.c | 20 ++++++++++---------- src/keyb.h | 5 +++++ src/machdep.h | 5 +++++ src/modules.h | 5 +++++ src/serial.h | 5 +++++ src/x11.h | 5 +++++ src/x_func.h | 5 +++++ 14 files changed, 75 insertions(+), 10 deletions(-) diff --git a/src/args.h b/src/args.h index 1b351e8..5e95a98 100644 --- a/src/args.h +++ b/src/args.h @@ -1,3 +1,6 @@ +#ifndef _ARGS_H +#define _ARGS_H 1 + /* ------------------------------------------------------------------------- saturn - A poor-man's emulator of some HP calculators Copyright (C) 1998-2000 Ivan Cibrario Bertolotti @@ -96,3 +99,5 @@ struct Args { ---------------------------------------------------------------------------*/ extern struct Args args; + +#endif /*!_ARGS_H*/ diff --git a/src/config.h b/src/config.h index 14277c3..6c42bfc 100644 --- a/src/config.h +++ b/src/config.h @@ -1,3 +1,6 @@ +#ifndef _CONFIG_H +#define _CONFIG_H 1 + /* ------------------------------------------------------------------------- saturn - A poor-man's emulator of some HP calculators Copyright (C) 1998-2000 Ivan Cibrario Bertolotti @@ -248,3 +251,5 @@ #define UTIL_CHF_MODULE_ID 17 /* 3.6 */ #define X_FUNC_CHF_MODULE_ID 18 /* 3.13 */ #define DEBUG_CHF_MODULE_ID 30 + +#endif /*!_CONFIG_H*/ diff --git a/src/cpu.h b/src/cpu.h index a666a07..74686a2 100644 --- a/src/cpu.h +++ b/src/cpu.h @@ -1,3 +1,6 @@ +#ifndef _CPU_H +#define _CPU_H 1 + /* ------------------------------------------------------------------------- saturn - A poor-man's emulator of some HP calculators Copyright (C) 1998-2000 Ivan Cibrario Bertolotti @@ -336,3 +339,5 @@ int CpuHaltAllowed( void ); /* 3.13 */ Address Disassemble( Address pc, char ob[ DISASSEMBLE_OB_SIZE ] ); void DumpCpuStatus( char ob[ DUMP_CPU_STATUS_OB_SIZE ] ); + +#endif /*!_CPU_H*/ diff --git a/src/debug.h b/src/debug.h index bf5b1e9..bc744f9 100644 --- a/src/debug.h +++ b/src/debug.h @@ -1,3 +1,6 @@ +#ifndef _DEBUG_H +#define _DEBUG_H 1 + /* ------------------------------------------------------------------------- saturn - A poor-man's emulator of some HP calculators Copyright (C) 1998-2000 Ivan Cibrario Bertolotti @@ -160,3 +163,5 @@ ---------------------------------------------------------------------------*/ void SetDebugLevel( int new_level ); + +#endif /*!_DEBUG_H*/ diff --git a/src/disk_io.h b/src/disk_io.h index a121317..542a953 100644 --- a/src/disk_io.h +++ b/src/disk_io.h @@ -1,3 +1,6 @@ +#ifndef _DISK_IO_H +#define _DISK_IO_H 1 + /* ------------------------------------------------------------------------- saturn - A poor-man's emulator of some HP calculators Copyright (C) 1998-2000 Ivan Cibrario Bertolotti @@ -94,3 +97,5 @@ int WriteStructToFile( const void* s, size_t s_size, const char* name ); int ReadObjectFromFile( const char* name, const char* hdr, Address start, Address end ); int WriteObjectToFile( Address start, Address end, const char* hdr, const char* name ); + +#endif /*!_DISK_IO_H*/ diff --git a/src/display.h b/src/display.h index 634d58f..09a0775 100644 --- a/src/display.h +++ b/src/display.h @@ -1,3 +1,6 @@ +#ifndef _DISPLAY_H +#define _DISPLAY_H 1 + /* ------------------------------------------------------------------------- saturn - A poor-man's emulator of some HP calculators Copyright (C) 1998-2000 Ivan Cibrario Bertolotti @@ -86,3 +89,5 @@ void InitLcd( Display* lcd_display, Window lcd_window, unsigned long lcd_fg_pixe void DrawLcd( void ); void RefreshLcd( void ); + +#endif /*!_DISPLAY_H*/ diff --git a/src/flash49.h b/src/flash49.h index 3068fc6..29bf26c 100644 --- a/src/flash49.h +++ b/src/flash49.h @@ -1,3 +1,6 @@ +#ifndef _FLASH49_H +#define _FLASH49_H 1 + /* ------------------------------------------------------------------------- saturn - A poor-man's emulator of some HP calculators Copyright (C) 1998-2000 Ivan Cibrario Bertolotti @@ -153,3 +156,5 @@ enum FlashState { /* Read/Write operations, nibble-by-nibble */ Nibble FlashRead49( XAddress address ); void FlashWrite49( XAddress address, Nibble datum ); + +#endif /*!_FLASH49_H*/ diff --git a/src/hw_config.c b/src/hw_config.c index b08c9c8..c0da370 100644 --- a/src/hw_config.c +++ b/src/hw_config.c @@ -166,11 +166,11 @@ table[] = {"hp48", { /* name, id, access_prio, - init, save, - read, write, - r_config, r_abs_base_addr, r_size, - map_flags - */ + init, save, + read, write, + r_config, r_abs_base_addr, r_size, + map_flags + */ { "ROM (ROM)", @@ -257,11 +257,11 @@ table[] = {"hp49", { /* name, id, access_prio, - init, save, - read, write, - r_config, r_abs_base_addr, r_size, - map_flags - */ + init, save, + read, write, + r_config, r_abs_base_addr, r_size, + map_flags + */ { "ROM (ROM)", diff --git a/src/keyb.h b/src/keyb.h index 241fe50..9546e73 100644 --- a/src/keyb.h +++ b/src/keyb.h @@ -1,3 +1,6 @@ +#ifndef _KEYB_H +#define _KEYB_H 1 + /* ------------------------------------------------------------------------- saturn - A poor-man's emulator of some HP calculators Copyright (C) 1998-2000 Ivan Cibrario Bertolotti @@ -85,3 +88,5 @@ InputRegister KeybIN( OutputRegister out ); void KeybPress( const char* key ); void KeybRelease( const char* key ); void KeybReset( void ); + +#endif /*!_KEYB_H*/ diff --git a/src/machdep.h b/src/machdep.h index 55c0ee3..34f25fb 100644 --- a/src/machdep.h +++ b/src/machdep.h @@ -1,3 +1,6 @@ +#ifndef _MACHDEP_H +#define _MACHDEP_H 1 + /* ------------------------------------------------------------------------- saturn - A poor-man's emulator of some HP calculators Copyright (C) 1998-2000 Ivan Cibrario Bertolotti @@ -72,3 +75,5 @@ typedef int int12; typedef int int16; typedef int int20; typedef int int32; + +#endif /*!_MACHDEP_H*/ diff --git a/src/modules.h b/src/modules.h index 877e8a1..daf7148 100644 --- a/src/modules.h +++ b/src/modules.h @@ -1,3 +1,6 @@ +#ifndef _MODULES_H +#define _MODULES_H 1 + /* ------------------------------------------------------------------------- saturn - A poor-man's emulator of some HP calculators Copyright (C) 1998-2000 Ivan Cibrario Bertolotti @@ -584,3 +587,5 @@ void WriteNibble( Address addr, Nibble datum ); /* Monitor */ void ModMapCheck( Address addr, char ob[ MOD_MAP_CHECK_OB_SIZE ] ); void ModMapTable( char ob[ MOD_MAP_TABLE_OB_SIZE ] ); + +#endif /*!_MODULES_H*/ diff --git a/src/serial.h b/src/serial.h index 8c24554..5265026 100644 --- a/src/serial.h +++ b/src/serial.h @@ -1,3 +1,6 @@ +#ifndef _SERIAL_H +#define _SERIAL_H 1 + /* ------------------------------------------------------------------------- saturn - A poor-man's emulator of some HP calculators Copyright (C) 1998-2000 Ivan Cibrario Bertolotti @@ -139,3 +142,5 @@ void Serial_TBR_Write( int8 d ); /* Event handling */ void HandleSerial( void ); + +#endif /*!_SERIAL_H*/ diff --git a/src/x11.h b/src/x11.h index 93ac0a7..8798bd8 100644 --- a/src/x11.h +++ b/src/x11.h @@ -1,3 +1,6 @@ +#ifndef _X11_H +#define _X11_H 1 + /* ------------------------------------------------------------------------- saturn - A poor-man's emulator of some HP calculators Copyright (C) 1998-2000 Ivan Cibrario Bertolotti @@ -150,3 +153,5 @@ void IdleXLoop( unsigned long max_wait ); void InitializeGui( int argc, char* argv[] ); void ActivateFSB( char* title, char* file_name, FsbContinuation continuation ); + +#endif /*!_X11_H*/ diff --git a/src/x_func.h b/src/x_func.h index 4eb7a39..059649f 100644 --- a/src/x_func.h +++ b/src/x_func.h @@ -1,3 +1,6 @@ +#ifndef _X_FUNC_H +#define _X_FUNC_H 1 + /* ------------------------------------------------------------------------- saturn - A poor-man's emulator of some HP calculators Copyright (C) 1998-2000 Ivan Cibrario Bertolotti @@ -104,3 +107,5 @@ ---------------------------------------------------------------------------*/ void ExtendedFunction( Nibble function_code ); + +#endif /*!_X_FUNC_H*/