diff options
author | Juan J. Martinez <jjm@usebox.net> | 2023-09-19 21:19:40 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2023-09-19 22:19:34 +0100 |
commit | d495a881f3c277abd4a49fe9b3d5d2788ee4c92b (patch) | |
tree | f001f93e7be420d3cab8d6781213148e14dcbbd3 | |
parent | 50d06345810cf849548b95e92973f8466b7d5754 (diff) | |
download | uboxlib-dos-d495a881f3c277abd4a49fe9b3d5d2788ee4c92b.tar.gz uboxlib-dos-d495a881f3c277abd4a49fe9b3d5d2788ee4c92b.zip |
Use "pragma once"
-rw-r--r-- | include/ubox.h | 5 | ||||
-rw-r--r-- | include/ubox_assets.h | 5 | ||||
-rw-r--r-- | include/ubox_control.h | 5 | ||||
-rw-r--r-- | include/ubox_debug.h | 5 | ||||
-rw-r--r-- | include/ubox_joy.h | 5 | ||||
-rw-r--r-- | include/ubox_sound.h | 5 | ||||
-rw-r--r-- | include/ubox_text.h | 5 | ||||
-rw-r--r-- | include/ubox_timer.h | 5 | ||||
-rw-r--r-- | include/ubox_vga.h | 5 |
9 files changed, 9 insertions, 36 deletions
diff --git a/include/ubox.h b/include/ubox.h index 25d44eb..ac1c62c 100644 --- a/include/ubox.h +++ b/include/ubox.h @@ -1,5 +1,4 @@ -#ifndef _UBOX_H -#define _UBOX_H +#pragma once #include <stdint.h> @@ -11,5 +10,3 @@ #include "ubox_sound.h" #include "ubox_text.h" #include "ubox_assets.h" - -#endif /* _UBOX_H */ diff --git a/include/ubox_assets.h b/include/ubox_assets.h index e6f4292..c0434ea 100644 --- a/include/ubox_assets.h +++ b/include/ubox_assets.h @@ -1,5 +1,4 @@ -#ifndef _UBOX_ASSETS_H -#define _UBOX_ASSETS_H +#pragma once /* Simple asset manager supporting pak file (a ZIP file). * @@ -13,5 +12,3 @@ uint8_t ubox_assets_init(const char *dirname); uint8_t ubox_assets_read(const char *name, uint8_t **data, size_t *data_size); void ubox_assets_free(); - -#endif /* _UBOX_ASSETS_H */ diff --git a/include/ubox_control.h b/include/ubox_control.h index 47fff33..0bfea5f 100644 --- a/include/ubox_control.h +++ b/include/ubox_control.h @@ -1,5 +1,4 @@ -#ifndef _UBOX_CONTROL_H -#define _UBOX_CONTROL_H +#pragma once #define UBOX_CTL_NONE 0 #define UBOX_CTL_UP 1 @@ -11,5 +10,3 @@ void ubox_control_init(); uint8_t ubox_control_read(); - -#endif /* _UBOX_CONTROL_H */ diff --git a/include/ubox_debug.h b/include/ubox_debug.h index c1dabe9..fa2e25a 100644 --- a/include/ubox_debug.h +++ b/include/ubox_debug.h @@ -1,5 +1,4 @@ -#ifndef _UBOX_DEBUG_H -#define _UBOX_DEBUG_H +#pragma once #ifdef DEBUG #define UBOX_DEBUG_LOG(...) \ @@ -8,5 +7,3 @@ #else #define UBOX_DEBUG_LOG(...) /* release */ #endif - -#endif /* _UBOX_DEBUG_H */ diff --git a/include/ubox_joy.h b/include/ubox_joy.h index 002b58e..b86765c 100644 --- a/include/ubox_joy.h +++ b/include/ubox_joy.h @@ -1,10 +1,7 @@ -#ifndef _UBOX_JOY_H -#define _UBOX_JOY_H +#pragma once /* it also calibrates */ uint8_t ubox_joy_detect(); /* returns the bits specified in ubox_control.h */ uint8_t ubox_joy_read(); - -#endif /* _UBOX_JOY_H */ diff --git a/include/ubox_sound.h b/include/ubox_sound.h index d52962b..56142c1 100644 --- a/include/ubox_sound.h +++ b/include/ubox_sound.h @@ -1,5 +1,4 @@ -#ifndef _UBOX_SOUND_H -#define _UBOX_SOUND_H +#pragma once #ifndef UBOX_SOUND_DIVIDER /* ubox_sound_update will be called from the timer int, so we update every @@ -28,5 +27,3 @@ void ubox_sound_play_efx(uint8_t efxno); void ubox_sound_mute(); void ubox_sound_unmute(); - -#endif /* _UBOX_SOUND_H */ diff --git a/include/ubox_text.h b/include/ubox_text.h index 3c31da8..6ba214e 100644 --- a/include/ubox_text.h +++ b/include/ubox_text.h @@ -1,7 +1,4 @@ -#ifndef _UBOX_TEXT_H -#define _UBOX_TEXT_H +#pragma once void ubox_set_font(const uint8_t *pixdata, uint8_t width, uint8_t height); void ubox_put_text(uint16_t x, uint16_t y, const char *text, uint8_t color); - -#endif /* _TEXT_H */ diff --git a/include/ubox_timer.h b/include/ubox_timer.h index e2caaaf..3a723cc 100644 --- a/include/ubox_timer.h +++ b/include/ubox_timer.h @@ -1,5 +1,4 @@ -#ifndef _UBOX_TIMER_H -#define _UBOX_TIMER_H +#pragma once /* updates 18.2 times per second */ extern volatile uint32_t ubox_ticks; @@ -15,5 +14,3 @@ void ubox_timer_start(uint8_t secs, volatile uint8_t *updated); uint8_t ubox_timer_value(); void ubox_timer_stop(); void ubox_timer_resume(); - -#endif /* _UBOX_TIMER_H */ diff --git a/include/ubox_vga.h b/include/ubox_vga.h index 6d5bd35..1489b68 100644 --- a/include/ubox_vga.h +++ b/include/ubox_vga.h @@ -1,5 +1,4 @@ -#ifndef _UBOX_VGA_H -#define _UBOX_VGA_H +#pragma once /* palette index to be used as transparent color */ #ifndef UBOX_TRANSPARENT @@ -40,5 +39,3 @@ void ubox_blit_copy_all(); void ubox_blit_copy(const ubox_rect *dst); /* only for 16 width, w is ignored */ void ubox_blit_copy16(const ubox_rect *dst); - -#endif /* _UBOX_VGA_H */ |