diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/config.h | 4 | ||||
-rw-r--r-- | src/console.h | 4 | ||||
-rw-r--r-- | src/http/http.h | 5 | ||||
-rw-r--r-- | src/libpiano/crypt.h | 4 | ||||
-rw-r--r-- | src/libpiano/piano.h | 4 | ||||
-rw-r--r-- | src/libpiano/piano_private.h | 4 | ||||
-rw-r--r-- | src/main.h | 5 | ||||
-rw-r--r-- | src/player/backends/media_foundation.h | 7 | ||||
-rw-r--r-- | src/player/backends/utility/com_ptr.h | 4 | ||||
-rw-r--r-- | src/player/backends/utility/optional.h | 5 | ||||
-rw-r--r-- | src/player/player2.h | 4 | ||||
-rw-r--r-- | src/player/player2_private.h | 3 | ||||
-rw-r--r-- | src/settings.h | 6 | ||||
-rw-r--r-- | src/ui.h | 4 | ||||
-rw-r--r-- | src/ui_act.h | 4 | ||||
-rw-r--r-- | src/ui_dispatch.h | 5 | ||||
-rw-r--r-- | src/ui_readline.h | 5 | ||||
-rw-r--r-- | src/ui_types.h | 4 |
18 files changed, 16 insertions, 65 deletions
diff --git a/src/config.h b/src/config.h index c408542..8679001 100644 --- a/src/config.h +++ b/src/config.h @@ -1,5 +1,4 @@ -#ifndef SRC_CONFIG_H_S6A1C09K -#define SRC_CONFIG_H_S6A1C09K +# pragma once /* package name */ #define PACKAGE "pianobar" @@ -25,4 +24,3 @@ #define CURL_STATICLIB -#endif /* SRC_CONFIG_H_S6A1C09K */ diff --git a/src/console.h b/src/console.h index de5d951..627e77b 100644 --- a/src/console.h +++ b/src/console.h @@ -21,8 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SRC_CONSOLE_H_WY8F3MNH -#define SRC_CONSOLE_H_WY8F3MNH +# pragma once #include "config.h" #include <stdio.h> @@ -49,4 +48,3 @@ void BarConsolePuts(const char* c); void BarConsolePrint(const char* format, ...); void BarConsolePrintV(const char* format, va_list args); -#endif /* SRC_CONSOLE_H_WY8F3MNH */ diff --git a/src/http/http.h b/src/http/http.h index a321cd3..5ea617f 100644 --- a/src/http/http.h +++ b/src/http/http.h @@ -21,8 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SRC_HTTP_H_CN979RE9 -#define SRC_HTTP_H_CN979RE9 +#pragma once #include "config.h" @@ -42,5 +41,3 @@ bool HttpSetProxy(http_t, const char*); bool HttpRequest (http_t, PianoRequest_t * const); const char* HttpGetError (http_t); -#endif /* SRC_HTTP_H_CN979RE9 */ - diff --git a/src/libpiano/crypt.h b/src/libpiano/crypt.h index 890b8c1..30d2294 100644 --- a/src/libpiano/crypt.h +++ b/src/libpiano/crypt.h @@ -21,8 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SRC_LIBPIANO_CRYPT_H_O832IVGK -#define SRC_LIBPIANO_CRYPT_H_O832IVGK +#pragma once #include "piano.h" @@ -34,4 +33,3 @@ char *PianoDecryptString (PianoCipher_t, const char * const, size_t * const); char *PianoEncryptString (PianoCipher_t, const char *); -#endif /* SRC_LIBPIANO_CRYPT_H_O832IVGK */ diff --git a/src/libpiano/piano.h b/src/libpiano/piano.h index ca33626..2dbf607 100644 --- a/src/libpiano/piano.h +++ b/src/libpiano/piano.h @@ -21,8 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SRC_LIBPIANO_PIANO_H_MFBT13PN -#define SRC_LIBPIANO_PIANO_H_MFBT13PN +#pragma once #include "../config.h" @@ -366,4 +365,3 @@ PianoStation_t *PianoFindStationById (PianoStation_t * const, const char * const); const char *PianoErrorToStr (PianoReturn_t); -#endif /* SRC_LIBPIANO_PIANO_H_MFBT13PN */ diff --git a/src/libpiano/piano_private.h b/src/libpiano/piano_private.h index bc0cc0e..ffc14c8 100644 --- a/src/libpiano/piano_private.h +++ b/src/libpiano/piano_private.h @@ -21,12 +21,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SRC_LIBPIANO_PIANO_PRIVATE_H_C35CDGGL -#define SRC_LIBPIANO_PIANO_PRIVATE_H_C35CDGGL +#pragma once #include "piano.h" void PianoDestroyStation (PianoStation_t *station); void PianoDestroyUserInfo (PianoUserInfo_t *user); -#endif /* SRC_LIBPIANO_PIANO_PRIVATE_H_C35CDGGL */ @@ -21,8 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SRC_MAIN_H_4ZGSCG6X -#define SRC_MAIN_H_4ZGSCG6X +# pragma once //#include <curl/curl.h> @@ -50,5 +49,3 @@ typedef struct { unsigned int playerErrors; } BarApp_t; -#endif /* SRC_MAIN_H_4ZGSCG6X */ - diff --git a/src/player/backends/media_foundation.h b/src/player/backends/media_foundation.h index cf10122..6ad4966 100644 --- a/src/player/backends/media_foundation.h +++ b/src/player/backends/media_foundation.h @@ -1,5 +1,3 @@ -# ifndef __TD__BASIC_MEDIA_PLAYER_H__ -# define __TD__BASIC_MEDIA_PLAYER_H__ # pragma once # include <mfapi.h> @@ -98,7 +96,7 @@ private: com_ptr<IMFSimpleAudioVolume> m_SimpleAudioVolume; com_ptr<IMFPresentationClock> m_PresentationClock; com_ptr<IMFAudioStreamVolume> m_StreamAudioVolume; - + optional<float> m_SetMasterVolume; mutable float m_MasterVolume; mutable float m_ReplayGain; @@ -110,6 +108,3 @@ private: State m_State; HANDLE m_CloseEvent; }; - - -# endif // __TD__BASIC_MEDIA_PLAYER_H__
\ No newline at end of file diff --git a/src/player/backends/utility/com_ptr.h b/src/player/backends/utility/com_ptr.h index 23534b2..519caef 100644 --- a/src/player/backends/utility/com_ptr.h +++ b/src/player/backends/utility/com_ptr.h @@ -1,5 +1,3 @@ -# ifndef __TD__COM_PTR_H__ -# define __TD__COM_PTR_H__ # pragma once template <typename T> @@ -144,5 +142,3 @@ template <typename T> inline bool operator<=(const com_ptr<T>& a, const com_ptr< template <typename T> inline bool operator>(const com_ptr<T>& a, const com_ptr<T>& b) { return std::greater<T*>()(a.get(), b.get()); } template <typename T> inline bool operator>=(const com_ptr<T>& a, const com_ptr<T>& b) { return std::greater_equal<T*>()(a.get(), b.get()); } template <typename T> void swap(com_ptr<T> & lhs, com_ptr<T> & rhs) { lhs.swap(rhs); } - -# endif // __TD__COM_PTR_H__
\ No newline at end of file diff --git a/src/player/backends/utility/optional.h b/src/player/backends/utility/optional.h index 9ee0b71..dcdc59a 100644 --- a/src/player/backends/utility/optional.h +++ b/src/player/backends/utility/optional.h @@ -1,8 +1,6 @@ //------------------------------------------------------------------------------ // //------------------------------------------------------------------------------ -# ifndef __TD__OPTIONAL_H__ -# define __TD__OPTIONAL_H__ # pragma once # include <type_traits> @@ -512,6 +510,3 @@ inline bool operator>=(const T& v, const optional<T>& opt) using namespace std; return static_cast<bool>(opt) ? greater_equal<T>(v, *opt) : true; } - - -# endif // __TD__OPTIONAL_H__ diff --git a/src/player/player2.h b/src/player/player2.h index 710b35d..3ac29c2 100644 --- a/src/player/player2.h +++ b/src/player/player2.h @@ -21,8 +21,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef __PIANOBAR_PLAYER2_H__ -#define __PIANOBAR_PLAYER2_H__ #pragma once #include "config.h" @@ -49,5 +47,3 @@ bool BarPlayer2IsPaused(player2_t player); bool BarPlayer2IsStopped(player2_t player); bool BarPlayer2IsFinished(player2_t player); -#endif /* __PIANOBAR_PLAYER2_H__ */ - diff --git a/src/player/player2_private.h b/src/player/player2_private.h index 757a07e..b76eb8b 100644 --- a/src/player/player2_private.h +++ b/src/player/player2_private.h @@ -1,5 +1,3 @@ -#ifndef __PIANOBAR_PLAYER2_PRIVATE_H__ -#define __PIANOBAR_PLAYER2_PRIVATE_H__ #pragma once #include "config.h" @@ -32,4 +30,3 @@ typedef struct _player2_iface extern player2_iface player2_direct_show; extern player2_iface player2_windows_media_foundation; -#endif /* __PIANOBAR_PLAYER2_PRIVATE_H__ */ diff --git a/src/settings.h b/src/settings.h index f8225ce..0edb544 100644 --- a/src/settings.h +++ b/src/settings.h @@ -21,8 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SRC_SETTINGS_H_IPL0ON9L -#define SRC_SETTINGS_H_IPL0ON9L +#pragma once #include <stdbool.h> @@ -83,6 +82,8 @@ typedef struct { char *postfix; } BarMsgFormatStr_t; +#include "ui_types.h" + typedef struct { bool autoselect; unsigned int history, maxPlayerErrors; @@ -116,4 +117,3 @@ void BarSettingsDestroy (BarSettings_t *); void BarSettingsRead (BarSettings_t *); void BarSettingsWrite (PianoStation_t *, BarSettings_t *); -#endif /* SRC_SETTINGS_H_IPL0ON9L */ @@ -21,8 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SRC_UI_H_46P20TS0 -#define SRC_UI_H_46P20TS0 +#pragma once #include <stdbool.h> @@ -54,4 +53,3 @@ int BarUiPianoCall (BarApp_t * const, PianoRequestType_t, void *, PianoReturn_t *); void BarUiHistoryPrepend (BarApp_t *app, PianoSong_t *song); -#endif /* SRC_UI_H_46P20TS0 */ diff --git a/src/ui_act.h b/src/ui_act.h index 676fbb4..fb4457b 100644 --- a/src/ui_act.h +++ b/src/ui_act.h @@ -21,8 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SRC_UI_ACT_H_1FEFTC06 -#define SRC_UI_ACT_H_1FEFTC06 +#pragma once #include <piano.h> @@ -63,4 +62,3 @@ BarUiActCallback(BarUiActManageStation); BarUiActCallback(BarUiActVolReset); BarUiActCallback(BarUiActSettings); -#endif /* SRC_UI_ACT_H_1FEFTC06 */ diff --git a/src/ui_dispatch.h b/src/ui_dispatch.h index 24b68bb..7e34393 100644 --- a/src/ui_dispatch.h +++ b/src/ui_dispatch.h @@ -21,8 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SRC_UI_DISPATCH_H_PV2JON1Z -#define SRC_UI_DISPATCH_H_PV2JON1Z +#pragma once /* bit-mask */ typedef enum { @@ -114,5 +113,3 @@ static const BarUiDispatchAction_t dispatchActions[BAR_KS_COUNT] = { BarKeyShortcutId_t BarUiDispatch (BarApp_t *, const char, PianoStation_t *, PianoSong_t *, const bool, BarUiDispatchContext_t); -#endif /* SRC_UI_DISPATCH_H_PV2JON1Z */ - diff --git a/src/ui_readline.h b/src/ui_readline.h index 9343e1a..83214b9 100644 --- a/src/ui_readline.h +++ b/src/ui_readline.h @@ -21,8 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SRC_UI_READLINE_H_IFRX74VM -#define SRC_UI_READLINE_H_IFRX74VM +#pragma once #include "config.h" @@ -46,5 +45,3 @@ size_t BarReadlineStr (char *, const size_t, size_t BarReadlineInt (int *, BarReadline_t); bool BarReadlineYesNo (bool, BarReadline_t); -#endif /* SRC_UI_READLINE_H_IFRX74VM */ - diff --git a/src/ui_types.h b/src/ui_types.h index aab4199..ecd32d4 100644 --- a/src/ui_types.h +++ b/src/ui_types.h @@ -21,8 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef SRC_UI_TYPES_H_2HR75RII -#define SRC_UI_TYPES_H_2HR75RII +# pragma once typedef enum { MSG_NONE = 0, @@ -36,4 +35,3 @@ typedef enum { MSG_COUNT = 8, /* invalid type */ } BarUiMsg_t; -#endif /* SRC_UI_TYPES_H_2HR75RII */ |