From 61ec50dabe14c5d4582ac187706ea27645b3562b Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 29 Nov 2017 10:54:33 -0500 Subject: Change Doxygen comment style from //! to /// Also see https://groups.google.com/forum/#!topic/cryptopp-users/A7-Xt5Knlzw --- ossig.h | 96 ++++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'ossig.h') diff --git a/ossig.h b/ossig.h index 107eabd6..2c172586 100644 --- a/ossig.h +++ b/ossig.h @@ -1,8 +1,8 @@ // ossig.h - written and placed in the public domain by Jeffrey Walton // -//! \file ossig.h -//! \brief Utility class for trapping OS signals. -//! \since Crypto++ 5.6.5 +/// \file ossig.h +/// \brief Utility class for trapping OS signals. +/// \since Crypto++ 5.6.5 #ifndef CRYPTOPP_OS_SIGNAL_H #define CRYPTOPP_OS_SIGNAL_H @@ -19,62 +19,62 @@ NAMESPACE_BEGIN(CryptoPP) #if defined(UNIX_SIGNALS_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING) -//! \brief Signal handler function pointer -//! \details SignalHandlerFn is provided as a stand alone function pointer with external "C" linkage -//! \sa SignalHandler, NullSignalHandler +/// \brief Signal handler function pointer +/// \details SignalHandlerFn is provided as a stand alone function pointer with external "C" linkage +/// \sa SignalHandler, NullSignalHandler extern "C" { typedef void (*SignalHandlerFn) (int); }; -//! \brief Null signal handler function -//! \param unused the signal number -//! \details NullSignalHandler is provided as a stand alone function with external "C" linkage -//! and not a static member function due to the the member function's implicit -//! external "C++" linkage. -//! \sa SignalHandler, SignalHandlerFn +/// \brief Null signal handler function +/// \param unused the signal number +/// \details NullSignalHandler is provided as a stand alone function with external "C" linkage +/// and not a static member function due to the the member function's implicit +/// external "C++" linkage. +/// \sa SignalHandler, SignalHandlerFn extern "C" { inline void NullSignalHandler(int unused) {CRYPTOPP_UNUSED(unused);} }; -//! Signal handler for Linux and Unix compatibles -//! \tparam S Signal number -//! \tparam O Flag indicating exsting handler should be overwriiten -//! \details SignalHandler() can be used to install a signal handler with the signature -//! void handler_fn(int). If SignalHandlerFn is not NULL, then -//! the sigaction is set to the function and the sigaction flags is set to the flags. -//! If SignalHandlerFn is NULL, then a default handler is installed -//! using sigaction flags set to 0. The default handler only returns from the call. -//! \details Upon destruction the previous signal handler is restored if the former signal handler -//! was replaced. -//! \details On Cygwin systems using Newlib, you should define _XOPEN_SOURCE=700 or -//! _GNU_SOURCE; or use -std=gnu++03, -std=gnu++11, or similar. If -//! you compile with -std=c++03, -std=c++11 or similar, then define -//! _XOPEN_SOURCE=700. -//! \warning Do not use SignalHandler in a code block that uses setjmp or longjmp -//! because the destructor may not run. -//! \since Crypto++ 5.6.5 -//! \sa NullSignalHandler, SignalHandlerFn, \ref CRYPTOPP_ASSERT "CRYPTOPP_ASSERT", DebugTrapHandler +/// Signal handler for Linux and Unix compatibles +/// \tparam S Signal number +/// \tparam O Flag indicating exsting handler should be overwriiten +/// \details SignalHandler() can be used to install a signal handler with the signature +/// void handler_fn(int). If SignalHandlerFn is not NULL, then +/// the sigaction is set to the function and the sigaction flags is set to the flags. +/// If SignalHandlerFn is NULL, then a default handler is installed +/// using sigaction flags set to 0. The default handler only returns from the call. +/// \details Upon destruction the previous signal handler is restored if the former signal handler +/// was replaced. +/// \details On Cygwin systems using Newlib, you should define _XOPEN_SOURCE=700 or +/// _GNU_SOURCE; or use -std=gnu++03, -std=gnu++11, or similar. If +/// you compile with -std=c++03, -std=c++11 or similar, then define +/// _XOPEN_SOURCE=700. +/// \warning Do not use SignalHandler in a code block that uses setjmp or longjmp +/// because the destructor may not run. +/// \since Crypto++ 5.6.5 +/// \sa NullSignalHandler, SignalHandlerFn, \ref CRYPTOPP_ASSERT "CRYPTOPP_ASSERT", DebugTrapHandler template struct SignalHandler { - //! \brief Construct a signal handler - //! \param pfn Pointer to a signal handler function - //! \param flags Flags to use with the signal handler - //! \details SignalHandler() installs a signal handler with the signature - //! void handler_fn(int). If SignalHandlerFn is not NULL, then - //! the sigaction is set to the function and the sigaction flags is set to the flags. - //! If SignalHandlerFn is NULL, then a default handler is installed - //! using sigaction flags set to 0. The default handler only returns from the call. - //! \details Upon destruction the previous signal handler is restored if the former signal handler - //! was overwritten. - //! \details On Cygwin systems using Newlib, you should define _XOPEN_SOURCE=700 or - //! _GNU_SOURCE; or use -std=gnu++03, -std=gnu++11, or similar. If - //! you compile with -std=c++03, -std=c++11 or similar, then define - //! _XOPEN_SOURCE=700. - //! \warning Do not use SignalHandler in a code block that uses setjmp or longjmp - //! because the destructor may not run. setjmp is why cpu.cpp does not use SignalHandler - //! during CPU feature testing. - //! \since Crypto++ 5.6.5 + /// \brief Construct a signal handler + /// \param pfn Pointer to a signal handler function + /// \param flags Flags to use with the signal handler + /// \details SignalHandler() installs a signal handler with the signature + /// void handler_fn(int). If SignalHandlerFn is not NULL, then + /// the sigaction is set to the function and the sigaction flags is set to the flags. + /// If SignalHandlerFn is NULL, then a default handler is installed + /// using sigaction flags set to 0. The default handler only returns from the call. + /// \details Upon destruction the previous signal handler is restored if the former signal handler + /// was overwritten. + /// \details On Cygwin systems using Newlib, you should define _XOPEN_SOURCE=700 or + /// _GNU_SOURCE; or use -std=gnu++03, -std=gnu++11, or similar. If + /// you compile with -std=c++03, -std=c++11 or similar, then define + /// _XOPEN_SOURCE=700. + /// \warning Do not use SignalHandler in a code block that uses setjmp or longjmp + /// because the destructor may not run. setjmp is why cpu.cpp does not use SignalHandler + /// during CPU feature testing. + /// \since Crypto++ 5.6.5 SignalHandler(SignalHandlerFn pfn = NULLPTR, int flags = 0) : m_installed(false) { // http://pubs.opengroup.org/onlinepubs/007908799/xsh/sigaction.html -- cgit v1.2.1