From 038d2288cc4a940618250056fd492d7f9e3b3dd9 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Wed, 26 Dec 2018 00:34:00 +0100 Subject: [PATCH] - unify defines in header files Signed-off-by: Thilo Graf --- include/ca.h | 6 +++--- include/ca_ci.h | 6 +++--- include/cs_api.h | 5 +++-- include/cs_frontpanel.h | 6 +++--- include/cs_types.h | 6 +++--- include/dmx_hal.h | 6 +++--- include/glfb.h | 8 +++++--- include/hardware_caps.h | 3 ++- include/init.h | 8 +++++--- include/mmi.h | 6 +++--- include/pwrmngr.h | 6 +++--- libarmbox/audio_lib.h | 6 +++--- libarmbox/hdmi_cec.h | 5 +++++ libarmbox/hdmi_cec_types.h | 5 +++++ libarmbox/playback_gst.h | 7 +++---- libarmbox/playback_libeplayer3.h | 7 ++++--- libarmbox/record_lib.h | 7 ++++--- libarmbox/video_lib.h | 6 +++--- libazbox/audio_lib.h | 7 +++---- libazbox/playback_lib.h | 6 +++--- libazbox/video_lib.h | 6 +++--- libgeneric-pc/audio_lib.h | 6 +++--- libgeneric-pc/playback_gst.h | 7 +++---- libgeneric-pc/playback_lib.h | 7 ++++--- libgeneric-pc/video_lib.h | 6 +++--- libraspi/audio_lib.h | 7 +++---- libraspi/dmx_lib.h | 6 +++--- libraspi/video_lib.h | 6 +++--- libspark/audio_lib.h | 7 ++++--- libspark/audio_mixer.h | 3 ++- libspark/playback_libeplayer3.h | 7 ++++--- libspark/record_lib.h | 7 ++++--- libspark/video_lib.h | 6 +++--- libtriple/audio_td.h | 7 +++---- libtriple/playback_td.h | 7 ++++--- libtriple/record_td.h | 7 ++++--- libtriple/video_td.h | 6 +++--- 37 files changed, 125 insertions(+), 105 deletions(-) diff --git a/include/ca.h b/include/ca.h index d615f43..cb77d94 100644 --- a/include/ca.h +++ b/include/ca.h @@ -1,5 +1,5 @@ -#ifndef __ca__ -#define __ca__ +#ifndef __CA_H__ +#define __CA_H__ #include #include "cs_types.h" @@ -116,4 +116,4 @@ public: virtual ~cCA(); }; -#endif // __ca__ +#endif // __CA_H__ diff --git a/include/ca_ci.h b/include/ca_ci.h index 1ef8d48..353e2f5 100644 --- a/include/ca_ci.h +++ b/include/ca_ci.h @@ -1,5 +1,5 @@ -#ifndef __ca_ci__ -#define __ca_ci__ +#ifndef __CA_CI_H__ +#define __CA_CI_H__ #include #include @@ -362,4 +362,4 @@ public: virtual ~cCA(); }; -#endif // __ca_ci__ +#endif // __CA_CI_H__ diff --git a/include/cs_api.h b/include/cs_api.h index 8a3bdc4..a90a2f9 100644 --- a/include/cs_api.h +++ b/include/cs_api.h @@ -1,7 +1,7 @@ /* compatibility header for tripledragon. I'm lazy, so I just left it as "cs_api.h" so that I don't need too many ifdefs in the code */ -#ifndef __CS_API_H_ +#ifndef __CS_API_H__ #define __CS_API_H_ #include "init.h" @@ -34,4 +34,5 @@ static inline void cs_deregister_messenger(void) { return; }; static inline unsigned int cs_get_revision(void) { return 1; }; static inline unsigned int cs_get_chip_type(void) { return 0; }; extern int cnxt_debug; -#endif //__CS_API_H_ + +#endif // __CS_API_H__ diff --git a/include/cs_frontpanel.h b/include/cs_frontpanel.h index 9d9336b..963cc5a 100644 --- a/include/cs_frontpanel.h +++ b/include/cs_frontpanel.h @@ -1,5 +1,5 @@ -#ifndef __CS_FRONTPANEL_H_ -#define __CS_FRONTPANEL_H_ +#ifndef __CS_FRONTPANEL_H__ +#define __CS_FRONTPANEL_H__ #define VFDDISPLAYCHARS 0xc0425a00 #define VFDWRITECGRAM 0x40425a01 @@ -317,4 +317,4 @@ typedef struct { bool number_support; } fp_display_caps_t; -#endif // __CS_FRONTPANEL_H_ +#endif // __CS_FRONTPANEL_H__ diff --git a/include/cs_types.h b/include/cs_types.h index d044475..60a50fc 100644 --- a/include/cs_types.h +++ b/include/cs_types.h @@ -1,8 +1,8 @@ /* pretty useless, but we don't need to work around this if * we just copy it over... */ -#ifndef __CS_TYPES_H_ -#define __CS_TYPES_H_ +#ifndef __CS_TYPES_H__ +#define __CS_TYPES_H__ typedef enum { @@ -20,4 +20,4 @@ typedef signed int s32; typedef signed short s16; typedef signed char s8; -#endif // __CS_TYPES_H_ +#endif // __CS_TYPES_H__ diff --git a/include/dmx_hal.h b/include/dmx_hal.h index 8ad5f3d..56b411f 100644 --- a/include/dmx_hal.h +++ b/include/dmx_hal.h @@ -15,8 +15,8 @@ * along with this program. If not, see . */ -#ifndef __dmx_hal__ -#define __dmx_hal__ +#ifndef __DMX_HAL_H__ +#define __DMX_HAL_H__ #include #include @@ -99,4 +99,4 @@ class cDemux void *pdata; }; -#endif //__dmx_hal__ +#endif // __DMX_HAL_H__ diff --git a/include/glfb.h b/include/glfb.h index 5b95ce6..f7c51de 100644 --- a/include/glfb.h +++ b/include/glfb.h @@ -16,8 +16,9 @@ along with this program. If not, see . */ -#ifndef __glfb__ -#define __glfb__ +#ifndef __GLFB_H__ +#define __GLFB_H__ + #include #include #include /* for screeninfo etc. */ @@ -39,4 +40,5 @@ private: void blit_osd(); void *pdata; /* not yet used */ }; -#endif + +#endif // __GLFB_H__ diff --git a/include/hardware_caps.h b/include/hardware_caps.h index 44a11a9..39079dd 100644 --- a/include/hardware_caps.h +++ b/include/hardware_caps.h @@ -53,4 +53,5 @@ hw_caps_t *get_hwcaps(void); #ifdef __cplusplus } #endif -#endif + +#endif // __HARDWARE_CAPS_H__ diff --git a/include/init.h b/include/init.h index 9203a65..41d354a 100644 --- a/include/init.h +++ b/include/init.h @@ -1,5 +1,7 @@ -#ifndef __init__ -#define __init__ +#ifndef __INIT_H__ +#define __INIT_H__ + void hal_api_init(); void hal_api_exit(); -#endif // __init__ + +#endif // __INIT_H__ diff --git a/include/mmi.h b/include/mmi.h index afbf226..4d0884b 100644 --- a/include/mmi.h +++ b/include/mmi.h @@ -1,5 +1,5 @@ -#ifndef __MMI_H_ -#define __MMI_H_ +#ifndef __MMI_H__ +#define __MMI_H__ #define MAX_MMI_ITEMS 40 #define MAX_MMI_TEXT_LEN 255 @@ -47,5 +47,5 @@ typedef struct { #define enguiryText enquiryText #define MMI_ENGUIRY_INFO MMI_ENQUIRY_INFO -#endif // __MMI_H_ +#endif // __MMI_H__ diff --git a/include/pwrmngr.h b/include/pwrmngr.h index 167929a..aee6c34 100644 --- a/include/pwrmngr.h +++ b/include/pwrmngr.h @@ -15,8 +15,8 @@ * along with this program. If not, see . */ -#ifndef __pwrmngr_hal__ -#define __pwrmngr_hal__ +#ifndef __PWRMNGR_H__ +#define __PWRMNGR_H__ class cCpuFreqManager { @@ -44,4 +44,4 @@ public: bool SetStandby(bool Active, bool Passive); }; -#endif +#endif // __PWRMNGR_H__ diff --git a/libarmbox/audio_lib.h b/libarmbox/audio_lib.h index 1fb896f..44aea6e 100644 --- a/libarmbox/audio_lib.h +++ b/libarmbox/audio_lib.h @@ -1,7 +1,7 @@ /* public header file */ -#ifndef _AUDIO_LIB_H_ -#define _AUDIO_LIB_H_ +#ifndef __AUDIO_LIB_H__ +#define __AUDIO_LIB_H__ #include "cs_types.h" @@ -98,4 +98,4 @@ class cAudio void EnableAnalogOut(bool enable); }; -#endif +#endif // __AUDIO_LIB_H__ diff --git a/libarmbox/hdmi_cec.h b/libarmbox/hdmi_cec.h index ebd463d..fb49137 100644 --- a/libarmbox/hdmi_cec.h +++ b/libarmbox/hdmi_cec.h @@ -1,3 +1,6 @@ +#ifndef __HDMI_CEC_H__ +#define __HDMI_CEC_H__ + /* Copyright (C) 2018 TangoCash @@ -92,3 +95,5 @@ public: return muted; }; }; + +#endif // __HDMI_CEC_H__ diff --git a/libarmbox/hdmi_cec_types.h b/libarmbox/hdmi_cec_types.h index 7d2453b..9600222 100644 --- a/libarmbox/hdmi_cec_types.h +++ b/libarmbox/hdmi_cec_types.h @@ -1,3 +1,6 @@ +#ifndef __HDMI_CEC_TYPES_H__ +#define __HDMI_CEC_TYPES_H__ + typedef enum cec_vendor_id { CEC_VENDOR_TOSHIBA = 0x000039, @@ -706,3 +709,5 @@ static cec_opcode GetResponseOpcode(cec_opcode opcode) return CEC_OPCODE_NONE; } + +#endif // __HDMI_CEC_TYPES_H__ diff --git a/libarmbox/playback_gst.h b/libarmbox/playback_gst.h index c3e6488..7de63ef 100644 --- a/libarmbox/playback_gst.h +++ b/libarmbox/playback_gst.h @@ -16,8 +16,8 @@ * */ -#ifndef __PLAYBACK_CS_H -#define __PLAYBACK_CS_H +#ifndef __PLAYBACK_GST_H__ +#define __PLAYBACK_GST_H__ #include #include @@ -104,5 +104,4 @@ public: void getMeta(); }; -#endif - +#endif // __PLAYBACK_GST_H__ diff --git a/libarmbox/playback_libeplayer3.h b/libarmbox/playback_libeplayer3.h index 33a9471..3d5cb2e 100644 --- a/libarmbox/playback_libeplayer3.h +++ b/libarmbox/playback_libeplayer3.h @@ -1,5 +1,5 @@ -#ifndef __HAL_PLAYBACK_H -#define __HAL_PLAYBACK_H +#ifndef __PLAYBACK_LIBEPLAYER3_H__ +#define __PLAYBACK_LIBEPLAYER3_H__ #include #include @@ -86,4 +86,5 @@ class cPlayback void DMNotify(int Event, void *pTsBuf, void *Tag); #endif }; -#endif + +#endif // __PLAYBACK_LIBEPLAYER3_H__ diff --git a/libarmbox/record_lib.h b/libarmbox/record_lib.h index 75bb988..9e554cd 100644 --- a/libarmbox/record_lib.h +++ b/libarmbox/record_lib.h @@ -1,5 +1,5 @@ -#ifndef __record_hal__ -#define __record_hal__ +#ifndef __RECORD_LIB_H__ +#define __RECORD_LIB_H__ #include #include "dmx_hal.h" @@ -53,4 +53,5 @@ class cRecord void RecordThread(); void WriterThread(); }; -#endif + +#endif // __RECORD_LIB_H__ diff --git a/libarmbox/video_lib.h b/libarmbox/video_lib.h index edec65d..c88695a 100644 --- a/libarmbox/video_lib.h +++ b/libarmbox/video_lib.h @@ -1,5 +1,5 @@ -#ifndef _VIDEO_LIB_H -#define _VIDEO_LIB_H +#ifndef __VIDEO_LIB_H__ +#define __VIDEO_LIB_H__ #include #include "cs_types.h" @@ -254,4 +254,4 @@ class cVideo bool GetScreenImage(unsigned char * &data, int &xres, int &yres, bool get_video = true, bool get_osd = false, bool scale_to_video = false); }; -#endif +#endif // __VIDEO_LIB_H__ diff --git a/libazbox/audio_lib.h b/libazbox/audio_lib.h index 871060d..3527e82 100644 --- a/libazbox/audio_lib.h +++ b/libazbox/audio_lib.h @@ -1,7 +1,7 @@ /* public header file */ -#ifndef _AUDIO_LIB_H_ -#define _AUDIO_LIB_H_ +#ifndef __AUDIO_LIB_H__ +#define __AUDIO_LIB_H__ #include "../common/cs_types.h" @@ -94,5 +94,4 @@ class cAudio void EnableAnalogOut(bool enable); }; -#endif - +#endif // __AUDIO_LIB_H__ diff --git a/libazbox/playback_lib.h b/libazbox/playback_lib.h index 6997acb..f804047 100644 --- a/libazbox/playback_lib.h +++ b/libazbox/playback_lib.h @@ -1,5 +1,5 @@ -#ifndef __PLAYBACK_LIB_H_ -#define __PLAYBACK_LIB_H_ +#ifndef __PLAYBACK_LIB_H__ +#define __PLAYBACK_LIB_H__ #include #include @@ -59,4 +59,4 @@ class cPlayback void DMNotify(int Event, void *pTsBuf, void *Tag); #endif }; -#endif // __PLAYBACK_LIB_H_ +#endif // __PLAYBACK_LIB_H__ diff --git a/libazbox/video_lib.h b/libazbox/video_lib.h index 15f8bfc..b6050f5 100644 --- a/libazbox/video_lib.h +++ b/libazbox/video_lib.h @@ -1,5 +1,5 @@ -#ifndef _VIDEO_LIB_H -#define _VIDEO_LIB_H +#ifndef __VIDEO_LIB_H__ +#define __VIDEO_LIB_H__ #include #include "cs_types.h" @@ -193,4 +193,4 @@ class cVideo void SetDemux(cDemux *dmx); }; -#endif +#endif // __VIDEO_LIB_H__ diff --git a/libgeneric-pc/audio_lib.h b/libgeneric-pc/audio_lib.h index 375208c..8d4f45b 100644 --- a/libgeneric-pc/audio_lib.h +++ b/libgeneric-pc/audio_lib.h @@ -1,7 +1,7 @@ /* public header file */ -#ifndef _AUDIO_LIB_H_ -#define _AUDIO_LIB_H_ +#ifndef __AUDIO_LIB_H__ +#define __AUDIO_LIB_H__ #include #include @@ -102,4 +102,4 @@ class cAudio : public OpenThreads::Thread int my_read(uint8_t *buf, int buf_size); }; -#endif +#endif // __AUDIO_LIB_H__ diff --git a/libgeneric-pc/playback_gst.h b/libgeneric-pc/playback_gst.h index 80a0e30..ed29b8b 100644 --- a/libgeneric-pc/playback_gst.h +++ b/libgeneric-pc/playback_gst.h @@ -16,8 +16,8 @@ * */ -#ifndef __PLAYBACK_CS_H -#define __PLAYBACK_CS_H +#ifndef __PLAYBACK_GST_H__ +#define __PLAYBACK_GST_H__ #include #include @@ -103,5 +103,4 @@ public: void getMeta(); }; -#endif - +#endif // __PLAYBACK_GST_H__ diff --git a/libgeneric-pc/playback_lib.h b/libgeneric-pc/playback_lib.h index c21d6ab..cca231b 100644 --- a/libgeneric-pc/playback_lib.h +++ b/libgeneric-pc/playback_lib.h @@ -1,5 +1,5 @@ -#ifndef __PLAYBACK_H -#define __PLAYBACK_H +#ifndef __PLAYBACK_LIB_H__ +#define __PLAYBACK_LIB_H__ #include #include @@ -57,4 +57,5 @@ class cPlayback AVFormatContext *GetAVFormatContext(){ return NULL; } void ReleaseAVFormatContext() {} }; -#endif + +#endif // __PLAYBACK_LIB_H__ diff --git a/libgeneric-pc/video_lib.h b/libgeneric-pc/video_lib.h index 1bec147..8201f7c 100644 --- a/libgeneric-pc/video_lib.h +++ b/libgeneric-pc/video_lib.h @@ -1,5 +1,5 @@ -#ifndef _VIDEO_LIB_H -#define _VIDEO_LIB_H +#ifndef __VIDEO_LIB_H__ +#define __VIDEO_LIB_H__ #include #include @@ -224,4 +224,4 @@ class cVideo : public OpenThreads::Thread bool stillpicture; }; -#endif +#endif // __VIDEO_LIB_H__ diff --git a/libraspi/audio_lib.h b/libraspi/audio_lib.h index 835609d..c039853 100644 --- a/libraspi/audio_lib.h +++ b/libraspi/audio_lib.h @@ -1,7 +1,7 @@ /* public header file */ -#ifndef _AUDIO_LIB_H_ -#define _AUDIO_LIB_H_ +#ifndef __AUDIO_LIB_H__ +#define __AUDIO_LIB_H__ #include #include "cs_types.h" @@ -100,5 +100,4 @@ class cAudio int my_read(uint8_t *buf, int buf_size); }; -#endif - +#endif // __AUDIO_LIB_H__ diff --git a/libraspi/dmx_lib.h b/libraspi/dmx_lib.h index 7a5e1a5..86eabf3 100644 --- a/libraspi/dmx_lib.h +++ b/libraspi/dmx_lib.h @@ -1,5 +1,5 @@ -#ifndef __dmx_hal__ -#define __dmx_hal__ +#ifndef __DMX_LIB_H__ +#define __DMX_LIB_H__ #include #include @@ -66,4 +66,4 @@ class cDemux void *pdata; }; -#endif //__dmx_hal__ +#endif // __DMX_LIB_H__ diff --git a/libraspi/video_lib.h b/libraspi/video_lib.h index 5f325f8..e70c343 100644 --- a/libraspi/video_lib.h +++ b/libraspi/video_lib.h @@ -1,5 +1,5 @@ -#ifndef _VIDEO_LIB_H -#define _VIDEO_LIB_H +#ifndef __VIDEO_LIB_H__ +#define __VIDEO_LIB_H__ #include #include @@ -213,4 +213,4 @@ class cVideo int pig_h; }; -#endif +#endif // __VIDEO_LIB_H__ diff --git a/libspark/audio_lib.h b/libspark/audio_lib.h index 8622f52..dbcdd73 100644 --- a/libspark/audio_lib.h +++ b/libspark/audio_lib.h @@ -1,7 +1,8 @@ /* public header file */ -#ifndef _AUDIO_TD_H_ -#define _AUDIO_TD_H_ +#ifndef __AUDIO_LIB_H__ +#define __AUDIO_LIB_H__ + #include "cs_types.h" typedef enum @@ -106,4 +107,4 @@ class cAudio void muteMixers(bool m = true); }; -#endif +#endif // __AUDIO_LIB_H__ diff --git a/libspark/audio_mixer.h b/libspark/audio_mixer.h index 2a6f6fc..d8e6d35 100644 --- a/libspark/audio_mixer.h +++ b/libspark/audio_mixer.h @@ -19,6 +19,7 @@ #ifndef __AUDIO_MIXER_H__ #define __AUDIO_MIXER_H__ + #include class mixerVolume @@ -32,5 +33,5 @@ class mixerVolume ~mixerVolume(void); bool setVolume(long volume); }; -#endif +#endif // __AUDIO_MIXER_H__ diff --git a/libspark/playback_libeplayer3.h b/libspark/playback_libeplayer3.h index a838adc..f8048fd 100644 --- a/libspark/playback_libeplayer3.h +++ b/libspark/playback_libeplayer3.h @@ -1,5 +1,5 @@ -#ifndef __HAL_PLAYBACK_H -#define __HAL_PLAYBACK_H +#ifndef __PLAYBACK_LIBEPLAYER3_H__ +#define __PLAYBACK_LIBEPLAYER3_H__ #include #include @@ -89,4 +89,5 @@ class cPlayback void DMNotify(int Event, void *pTsBuf, void *Tag); #endif }; -#endif + +#endif // __PLAYBACK_LIBEPLAYER3_H__ diff --git a/libspark/record_lib.h b/libspark/record_lib.h index 75bb988..9e554cd 100644 --- a/libspark/record_lib.h +++ b/libspark/record_lib.h @@ -1,5 +1,5 @@ -#ifndef __record_hal__ -#define __record_hal__ +#ifndef __RECORD_LIB_H__ +#define __RECORD_LIB_H__ #include #include "dmx_hal.h" @@ -53,4 +53,5 @@ class cRecord void RecordThread(); void WriterThread(); }; -#endif + +#endif // __RECORD_LIB_H__ diff --git a/libspark/video_lib.h b/libspark/video_lib.h index 73ee6e5..278b88e 100644 --- a/libspark/video_lib.h +++ b/libspark/video_lib.h @@ -1,5 +1,5 @@ -#ifndef _VIDEO_LIB_H -#define _VIDEO_LIB_H +#ifndef __VIDEO_LIB_H__ +#define __VIDEO_LIB_H__ #include #include "cs_types.h" @@ -219,4 +219,4 @@ class cVideo bool GetScreenImage(unsigned char * &data, int &xres, int &yres, bool get_video = true, bool get_osd = false, bool scale_to_video = false); }; -#endif +#endif // __VIDEO_LIB_H__ diff --git a/libtriple/audio_td.h b/libtriple/audio_td.h index 8fe0e7d..cb06a19 100644 --- a/libtriple/audio_td.h +++ b/libtriple/audio_td.h @@ -1,7 +1,7 @@ /* public header file */ -#ifndef _AUDIO_TD_H_ -#define _AUDIO_TD_H_ +#ifndef __AUDIO_TD_H__ +#define __AUDIO_TD_H__ #include #include "cs_types.h" @@ -95,5 +95,4 @@ class cAudio void EnableAnalogOut(bool enable); }; -#endif - +#endif // __AUDIO_TD_H__ diff --git a/libtriple/playback_td.h b/libtriple/playback_td.h index 51d5ac1..cd534b6 100644 --- a/libtriple/playback_td.h +++ b/libtriple/playback_td.h @@ -1,5 +1,5 @@ -#ifndef __PLAYBACK_TD_H -#define __PLAYBACK_TD_H +#ifndef __PLAYBACK_TD_H__ +#define __PLAYBACK_TD_H__ #include #include @@ -125,4 +125,5 @@ class cPlayback void DMNotify(int Event, void *pTsBuf, void *Tag); #endif }; -#endif + +#endif // __PLAYBACK_TD_H__ diff --git a/libtriple/record_td.h b/libtriple/record_td.h index fdb2013..f77bdf9 100644 --- a/libtriple/record_td.h +++ b/libtriple/record_td.h @@ -1,5 +1,5 @@ -#ifndef __RECORD_TD_H -#define __RECORD_TD_H +#ifndef __RECORD_TD_H__ +#define __RECORD_TD_H__ #include #include "dmx_hal.h" @@ -40,4 +40,5 @@ class cRecord void RecordThread(); }; -#endif + +#endif // __RECORD_TD_H__ diff --git a/libtriple/video_td.h b/libtriple/video_td.h index 567df13..b9b7921 100644 --- a/libtriple/video_td.h +++ b/libtriple/video_td.h @@ -1,5 +1,5 @@ -#ifndef _VIDEO_TD_H -#define _VIDEO_TD_H +#ifndef __VIDEO_TD_H__ +#define __VIDEO_TD_H__ #include #define video_format_t vidDispSize_t @@ -193,4 +193,4 @@ class cVideo bool GetScreenImage(unsigned char * &data, int &xres, int &yres, bool get_video = true, bool get_osd = false, bool scale_to_video = false); }; -#endif +#endif // __VIDEO_TD_H__