\hypertarget{mw__debug_8h}{ \section{mw\_\-debug.h File Reference} \label{mw__debug_8h}\index{mw\_\-debug.h@{mw\_\-debug.h}} } {\tt \#include $<$stdarg.h$>$}\par {\tt \#include $<$glib.h$>$}\par {\tt \#include \char`\"{}mw\_\-common.h\char`\"{}}\par \subsection*{Defines} \begin{CompactItemize} \item \#define \hyperlink{mw__debug_8h_87ff3f755a735cc7b25346a35f5485d8}{g\_\-debug}(format...)~g\_\-log(G\_\-LOG\_\-DOMAIN, G\_\-LOG\_\-LEVEL\_\-DEBUG, format) \item \#define \hyperlink{mw__debug_8h_50b503ca2ab0a3f3d87f74e313f18797}{g\_\-info}(format...)~g\_\-log(G\_\-LOG\_\-DOMAIN, G\_\-LOG\_\-LEVEL\_\-INFO, format) \item \#define \hyperlink{mw__debug_8h_1cec39c7a64f20d9089d4af76797d022}{MW\_\-MAILME\_\-ADDRESS}~\char`\"{}meanwhile-devel@lists.sourceforge.net\char`\"{} \begin{CompactList}\small\item\em email address used in mw\_\-debug\_\-mailme. \item\end{CompactList}\item \#define \hyperlink{mw__debug_8h_16e3e04fbd6c0ee72d409785e0ba4dda}{MW\_\-MAILME\_\-CUT\_\-START}~\char`\"{}-------- begin copy --------\char`\"{} \item \#define \hyperlink{mw__debug_8h_5b3d9b93f73f924fa942c7740f19bfa0}{MW\_\-MAILME\_\-CUT\_\-STOP}~\char`\"{}--------- end copy ---------\char`\"{} \item \#define \hyperlink{mw__debug_8h_5707b5bc15c1f40cf5bf883db2c6550a}{MW\_\-MAILME\_\-MESSAGE} \begin{CompactList}\small\item\em message used in mw\_\-debug\_\-mailme instructing user on what to do with the debugging output produced from that function \item\end{CompactList}\item \#define \hyperlink{mw__debug_8h_a67c7289eb763a7216fbb0e718f3813d}{NSTR}(str)~((str)? (str): \char`\"{}(null)\char`\"{}) \begin{CompactList}\small\item\em replaces NULL strings with \char`\"{}(null)\char`\"{}. \item\end{CompactList}\end{CompactItemize} \subsection*{Functions} \begin{CompactItemize} \item void \hyperlink{mw__debug_8h_65a276306d40a3bbeacd14ed1e5c3861}{mw\_\-debug\_\-data} (const guchar $\ast$buf, gsize len, const char $\ast$info,...) \item void \hyperlink{mw__debug_8h_d33086bf1a80cc08bae07cd36d07cc7e}{mw\_\-debug\_\-datav} (const guchar $\ast$buf, gsize len, const char $\ast$info, va\_\-list args) \item void \hyperlink{mw__debug_8h_bef8e11ddacd1b570281edbdd58b5eab}{mw\_\-debug\_\-opaque} (struct \hyperlink{structmwOpaque}{mwOpaque} $\ast$o, const char $\ast$info,...) \item void \hyperlink{mw__debug_8h_4472fe61c0e2e8af8af69b5f865c7cfe}{mw\_\-debug\_\-opaquev} (struct \hyperlink{structmwOpaque}{mwOpaque} $\ast$o, const char $\ast$info, va\_\-list args) \item void \hyperlink{mw__debug_8h_5bb0e9894f0db4ba0896aa0f05c67a62}{mw\_\-mailme\_\-data} (const guchar $\ast$buf, gsize len, const char $\ast$info,...) \item void \hyperlink{mw__debug_8h_aa403b022606c10a581c5d328bcd7c6d}{mw\_\-mailme\_\-datav} (const guchar $\ast$buf, gsize len, const char $\ast$info, va\_\-list args) \item void \hyperlink{mw__debug_8h_84b9630d04ad0fe9136bf5b04e40dfac}{mw\_\-mailme\_\-opaque} (struct \hyperlink{structmwOpaque}{mwOpaque} $\ast$o, const char $\ast$info,...) \begin{CompactList}\small\item\em Outputs a hex dump of a \hyperlink{structmwOpaque}{mwOpaque} with debugging info and a pre-defined message. \item\end{CompactList}\item void \hyperlink{mw__debug_8h_b27e7529ac1cb6fa56ea42727fe739d3}{mw\_\-mailme\_\-opaquev} (struct \hyperlink{structmwOpaque}{mwOpaque} $\ast$o, const char $\ast$info, va\_\-list args) \begin{CompactList}\small\item\em Outputs a hex dump of a \hyperlink{structmwOpaque}{mwOpaque} with debugging info and a pre-defined message. \item\end{CompactList}\end{CompactItemize} \subsection{Define Documentation} \hypertarget{mw__debug_8h_87ff3f755a735cc7b25346a35f5485d8}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!g\_\-debug@{g\_\-debug}} \index{g\_\-debug@{g\_\-debug}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define g\_\-debug(format...)~g\_\-log(G\_\-LOG\_\-DOMAIN, G\_\-LOG\_\-LEVEL\_\-DEBUG, format)}} \label{mw__debug_8h_87ff3f755a735cc7b25346a35f5485d8} \hypertarget{mw__debug_8h_50b503ca2ab0a3f3d87f74e313f18797}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!g\_\-info@{g\_\-info}} \index{g\_\-info@{g\_\-info}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define g\_\-info(format...)~g\_\-log(G\_\-LOG\_\-DOMAIN, G\_\-LOG\_\-LEVEL\_\-INFO, format)}} \label{mw__debug_8h_50b503ca2ab0a3f3d87f74e313f18797} \hypertarget{mw__debug_8h_1cec39c7a64f20d9089d4af76797d022}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!MW\_\-MAILME\_\-ADDRESS@{MW\_\-MAILME\_\-ADDRESS}} \index{MW\_\-MAILME\_\-ADDRESS@{MW\_\-MAILME\_\-ADDRESS}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define MW\_\-MAILME\_\-ADDRESS~\char`\"{}meanwhile-devel@lists.sourceforge.net\char`\"{}}} \label{mw__debug_8h_1cec39c7a64f20d9089d4af76797d022} email address used in mw\_\-debug\_\-mailme. \hypertarget{mw__debug_8h_16e3e04fbd6c0ee72d409785e0ba4dda}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!MW\_\-MAILME\_\-CUT\_\-START@{MW\_\-MAILME\_\-CUT\_\-START}} \index{MW\_\-MAILME\_\-CUT\_\-START@{MW\_\-MAILME\_\-CUT\_\-START}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define MW\_\-MAILME\_\-CUT\_\-START~\char`\"{}-------- begin copy --------\char`\"{}}} \label{mw__debug_8h_16e3e04fbd6c0ee72d409785e0ba4dda} \hypertarget{mw__debug_8h_5b3d9b93f73f924fa942c7740f19bfa0}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!MW\_\-MAILME\_\-CUT\_\-STOP@{MW\_\-MAILME\_\-CUT\_\-STOP}} \index{MW\_\-MAILME\_\-CUT\_\-STOP@{MW\_\-MAILME\_\-CUT\_\-STOP}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define MW\_\-MAILME\_\-CUT\_\-STOP~\char`\"{}--------- end copy ---------\char`\"{}}} \label{mw__debug_8h_5b3d9b93f73f924fa942c7740f19bfa0} \hypertarget{mw__debug_8h_5707b5bc15c1f40cf5bf883db2c6550a}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!MW\_\-MAILME\_\-MESSAGE@{MW\_\-MAILME\_\-MESSAGE}} \index{MW\_\-MAILME\_\-MESSAGE@{MW\_\-MAILME\_\-MESSAGE}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define MW\_\-MAILME\_\-MESSAGE}} \label{mw__debug_8h_5707b5bc15c1f40cf5bf883db2c6550a} \textbf{Value:} \begin{Code}\begin{verbatim}"\n" \ " Greetings! It seems that you've run across protocol data that the\n" \ "Meanwhile library does not yet know about. As such, there may be\n" \ "some unexpected behaviour in this session. If you'd like to help\n" \ "resolve this issue, please copy and paste the following block into\n" \ "an email to the address listed below with a brief explanation of\n" \ "what you were doing at the time of this message. Thanks a lot!" \end{verbatim} \end{Code} message used in mw\_\-debug\_\-mailme instructing user on what to do with the debugging output produced from that function \hypertarget{mw__debug_8h_a67c7289eb763a7216fbb0e718f3813d}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!NSTR@{NSTR}} \index{NSTR@{NSTR}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define NSTR(str)~((str)? (str): \char`\"{}(null)\char`\"{})}} \label{mw__debug_8h_a67c7289eb763a7216fbb0e718f3813d} replaces NULL strings with \char`\"{}(null)\char`\"{}. useful for printf where you're unsure that the s will be non-NULL. Note that while the linux printf will do this automatically, not all will. The others will instead segfault \subsection{Function Documentation} \hypertarget{mw__debug_8h_65a276306d40a3bbeacd14ed1e5c3861}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!mw\_\-debug\_\-data@{mw\_\-debug\_\-data}} \index{mw\_\-debug\_\-data@{mw\_\-debug\_\-data}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mw\_\-debug\_\-data (const guchar $\ast$ {\em buf}, gsize {\em len}, const char $\ast$ {\em info}, {\em ...})}} \label{mw__debug_8h_65a276306d40a3bbeacd14ed1e5c3861} \hypertarget{mw__debug_8h_d33086bf1a80cc08bae07cd36d07cc7e}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!mw\_\-debug\_\-datav@{mw\_\-debug\_\-datav}} \index{mw\_\-debug\_\-datav@{mw\_\-debug\_\-datav}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mw\_\-debug\_\-datav (const guchar $\ast$ {\em buf}, gsize {\em len}, const char $\ast$ {\em info}, va\_\-list {\em args})}} \label{mw__debug_8h_d33086bf1a80cc08bae07cd36d07cc7e} \hypertarget{mw__debug_8h_bef8e11ddacd1b570281edbdd58b5eab}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!mw\_\-debug\_\-opaque@{mw\_\-debug\_\-opaque}} \index{mw\_\-debug\_\-opaque@{mw\_\-debug\_\-opaque}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mw\_\-debug\_\-opaque (struct {\bf mwOpaque} $\ast$ {\em o}, const char $\ast$ {\em info}, {\em ...})}} \label{mw__debug_8h_bef8e11ddacd1b570281edbdd58b5eab} \hypertarget{mw__debug_8h_4472fe61c0e2e8af8af69b5f865c7cfe}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!mw\_\-debug\_\-opaquev@{mw\_\-debug\_\-opaquev}} \index{mw\_\-debug\_\-opaquev@{mw\_\-debug\_\-opaquev}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mw\_\-debug\_\-opaquev (struct {\bf mwOpaque} $\ast$ {\em o}, const char $\ast$ {\em info}, va\_\-list {\em args})}} \label{mw__debug_8h_4472fe61c0e2e8af8af69b5f865c7cfe} \hypertarget{mw__debug_8h_5bb0e9894f0db4ba0896aa0f05c67a62}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!mw\_\-mailme\_\-data@{mw\_\-mailme\_\-data}} \index{mw\_\-mailme\_\-data@{mw\_\-mailme\_\-data}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mw\_\-mailme\_\-data (const guchar $\ast$ {\em buf}, gsize {\em len}, const char $\ast$ {\em info}, {\em ...})}} \label{mw__debug_8h_5bb0e9894f0db4ba0896aa0f05c67a62} \hypertarget{mw__debug_8h_aa403b022606c10a581c5d328bcd7c6d}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!mw\_\-mailme\_\-datav@{mw\_\-mailme\_\-datav}} \index{mw\_\-mailme\_\-datav@{mw\_\-mailme\_\-datav}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mw\_\-mailme\_\-datav (const guchar $\ast$ {\em buf}, gsize {\em len}, const char $\ast$ {\em info}, va\_\-list {\em args})}} \label{mw__debug_8h_aa403b022606c10a581c5d328bcd7c6d} \hypertarget{mw__debug_8h_84b9630d04ad0fe9136bf5b04e40dfac}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!mw\_\-mailme\_\-opaque@{mw\_\-mailme\_\-opaque}} \index{mw\_\-mailme\_\-opaque@{mw\_\-mailme\_\-opaque}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mw\_\-mailme\_\-opaque (struct {\bf mwOpaque} $\ast$ {\em o}, const char $\ast$ {\em info}, {\em ...})}} \label{mw__debug_8h_84b9630d04ad0fe9136bf5b04e40dfac} Outputs a hex dump of a \hyperlink{structmwOpaque}{mwOpaque} with debugging info and a pre-defined message. if MW\_\-MAILME is undefined or false, this function acts the same as mw\_\-mailme\_\-opaque. \begin{itemize} \item block data to be printed in a hex block \item info a printf-style format string\end{itemize} The resulting message is in the following format: \begin{Code}\begin{verbatim} MW_MAILME_MESSAGE " Please send mail to: " MW_MAILME_ADDRESS MW_MAILME_CUT_START info block MW_MAILME_CUT_STOP \end{verbatim} \end{Code} \hypertarget{mw__debug_8h_b27e7529ac1cb6fa56ea42727fe739d3}{ \index{mw\_\-debug.h@{mw\_\-debug.h}!mw\_\-mailme\_\-opaquev@{mw\_\-mailme\_\-opaquev}} \index{mw\_\-mailme\_\-opaquev@{mw\_\-mailme\_\-opaquev}!mw_debug.h@{mw\_\-debug.h}} \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void mw\_\-mailme\_\-opaquev (struct {\bf mwOpaque} $\ast$ {\em o}, const char $\ast$ {\em info}, va\_\-list {\em args})}} \label{mw__debug_8h_b27e7529ac1cb6fa56ea42727fe739d3} Outputs a hex dump of a \hyperlink{structmwOpaque}{mwOpaque} with debugging info and a pre-defined message. Identical to mw\_\-mailme\_\-opaque, but taking a va\_\-list argument