\hypertarget{group__Internal}{ \section{Internal} \label{group__Internal}\index{Internal@{Internal}} } Functions to be used from within the OpenSCAP library. \subsection*{Data Structures} \begin{DoxyCompactItemize} \item struct \hyperlink{structoscap__text__traits}{oscap\_\-text\_\-traits} \begin{DoxyCompactList}\small\item\em \hyperlink{structoscap__text}{oscap\_\-text} traits \item\end{DoxyCompactList}\item struct \hyperlink{structoscap__text}{oscap\_\-text} \begin{DoxyCompactList}\small\item\em Representation of internationalizable character strings. \item\end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Variables} \begin{DoxyCompactItemize} \item \hypertarget{group__Internal_gad88d7d3cae38db3018026ead8f3613ac}{ bool \hyperlink{group__Internal_gad88d7d3cae38db3018026ead8f3613ac}{oscap\_\-text\_\-traits::can\_\-override}: 1} \label{group__Internal_gad88d7d3cae38db3018026ead8f3613ac} \begin{DoxyCompactList}\small\item\em  can override parent's value. \item\end{DoxyCompactList}\item \hypertarget{group__Internal_ga2ff920dd4192886783464850c9e771c4}{ bool \hyperlink{group__Internal_ga2ff920dd4192886783464850c9e771c4}{oscap\_\-text\_\-traits::can\_\-substitute}: 1} \label{group__Internal_ga2ff920dd4192886783464850c9e771c4} \begin{DoxyCompactList}\small\item\em can proces the sub element and such \item\end{DoxyCompactList}\item \hypertarget{group__Internal_ga3f761bbc1390ed8faee7b2e84cb32e29}{ bool \hyperlink{group__Internal_ga3f761bbc1390ed8faee7b2e84cb32e29}{oscap\_\-text\_\-traits::overrides}: 1} \label{group__Internal_ga3f761bbc1390ed8faee7b2e84cb32e29} \begin{DoxyCompactList}\small\item\em overrides parent's value \item\end{DoxyCompactList}\item \hypertarget{group__Internal_ga179ab1f0213b44e48c624102b6ebb0d4}{ char $\ast$ {\bfseries oscap\_\-text::text}} \label{group__Internal_ga179ab1f0213b44e48c624102b6ebb0d4} \item \hypertarget{group__Internal_gaeeefbb311de50144c40aa192bf5bed9e}{ struct \hyperlink{structoscap__text__traits}{oscap\_\-text\_\-traits} {\bfseries oscap\_\-text::traits}} \label{group__Internal_gaeeefbb311de50144c40aa192bf5bed9e} \end{DoxyCompactItemize} \subsection*{Debugging} \label{_amgrpda7d763aac39b294c7453c77c10d8239} \begin{DoxyCompactItemize} \item \hypertarget{group__Internal_gae208f15900608db65543579be1e91506}{ int {\bfseries \_\-\_\-debuglog\_\-level}} \label{group__Internal_gae208f15900608db65543579be1e91506} \item \hypertarget{group__Internal_gaad3fc713713e47317d1b0c62ccfb54e0}{ void {\bfseries \_\-\_\-oscap\_\-dprintf} (const char $\ast$, const char $\ast$, size\_\-t, const char $\ast$,...)} \label{group__Internal_gaad3fc713713e47317d1b0c62ccfb54e0} \item \hypertarget{group__Internal_gafa7ccd009019b94877babece01ec972d}{ \#define {\bfseries oscap\_\-dprintf}(...)~\_\-\_\-oscap\_\-dprintf (\_\-\_\-FILE\_\-\_\-, \_\-\_\-PRETTY\_\-FUNCTION\_\-\_\-, \_\-\_\-LINE\_\-\_\-, \_\-\_\-VA\_\-ARGS\_\-\_\-)} \label{group__Internal_gafa7ccd009019b94877babece01ec972d} \item \hypertarget{group__Internal_gaf00d3dee02bec38d88b90114c440d7e2}{ \#define {\bfseries OSCAP\_\-DEBUG\_\-FILE}~\char`\"{}oscap\_\-debug.log\char`\"{}} \label{group__Internal_gaf00d3dee02bec38d88b90114c440d7e2} \item \hypertarget{group__Internal_gadac017b064344cfb872d2c585efeac56}{ \#define {\bfseries OSCAP\_\-DEBUG\_\-FILE\_\-ENV}~\char`\"{}OSCAP\_\-DEBUG\_\-FILE\char`\"{}} \label{group__Internal_gadac017b064344cfb872d2c585efeac56} \item \hypertarget{group__Internal_gac0c33ea248158ac24ddda0a9abf42f8b}{ \#define {\bfseries OSCAP\_\-DEBUG\_\-LEVEL\_\-ENV}~\char`\"{}OSCAP\_\-DEBUG\_\-LEVEL\char`\"{}} \label{group__Internal_gac0c33ea248158ac24ddda0a9abf42f8b} \item \hypertarget{group__Internal_ga0b0b9c20bb1cdf1d6e1c1834a11c9b91}{ \#define {\bfseries debug}(l)~if ((\_\-\_\-debuglog\_\-level = (\_\-\_\-debuglog\_\-level == -\/1 ? atoi (getenv (OSCAP\_\-DEBUG\_\-LEVEL\_\-ENV) == NULL ? \char`\"{}0\char`\"{} : getenv (OSCAP\_\-DEBUG\_\-LEVEL\_\-ENV)) : \_\-\_\-debuglog\_\-level)) \&\& \_\-\_\-debuglog\_\-level $>$= (l))} \label{group__Internal_ga0b0b9c20bb1cdf1d6e1c1834a11c9b91} \item \hypertarget{group__Internal_gaacac41505f6d533bfebe565389a4f56f}{ \#define {\bfseries oscap\_\-dlprintf}(l,...)~do \{ debug(l) \{ oscap\_\-dprintf(\_\-\_\-VA\_\-ARGS\_\-\_\-); \}\} while(0)} \label{group__Internal_gaacac41505f6d533bfebe565389a4f56f} \end{DoxyCompactItemize} \subsection*{oscap\_\-text internals} \label{_amgrp04a7dca8314744f644b86a0c3b6c7fda} \begin{DoxyCompactItemize} \item \hypertarget{group__Internal_gaa2e00805c885fefec2154807e4fb6cca}{ {\bfseries OSCAP\_\-HIDDEN\_\-START}} \label{group__Internal_gaa2e00805c885fefec2154807e4fb6cca} \item \hypertarget{group__Internal_gad76a6013b1de5af933707f1886a4bd3d}{ struct \hyperlink{structoscap__text__traits}{oscap\_\-text\_\-traits} \hyperlink{group__Internal_gad76a6013b1de5af933707f1886a4bd3d}{OSCAP\_\-TEXT\_\-TRAITS\_\-PLAIN}} \label{group__Internal_gad76a6013b1de5af933707f1886a4bd3d} \begin{DoxyCompactList}\small\item\em Basic traits for plain text. \item\end{DoxyCompactList}\item \hypertarget{group__Internal_gaadc68bbd95f97b750b42b918492d5af7}{ struct \hyperlink{structoscap__text__traits}{oscap\_\-text\_\-traits} \hyperlink{group__Internal_gaadc68bbd95f97b750b42b918492d5af7}{OSCAP\_\-TEXT\_\-TRAITS\_\-HTML}} \label{group__Internal_gaadc68bbd95f97b750b42b918492d5af7} \begin{DoxyCompactList}\small\item\em Basic traits for HTML text. \item\end{DoxyCompactList}\item \hypertarget{group__Internal_gafbe29b5d7f7902afeb0675277e4c28f0}{ {\bfseries OSCAP\_\-HIDDEN\_\-END}} \label{group__Internal_gafbe29b5d7f7902afeb0675277e4c28f0} \item struct \hyperlink{structoscap__text}{oscap\_\-text} $\ast$ \hyperlink{group__Internal_gab5f56daa9c735f38478df4a4bf5ea199}{oscap\_\-text\_\-new\_\-full} (struct \hyperlink{structoscap__text__traits}{oscap\_\-text\_\-traits} traits, const char $\ast$string, const char $\ast$lang) \begin{DoxyCompactList}\small\item\em full-\/featured constructor \item\end{DoxyCompactList}\item \hypertarget{group__Internal_gaa4822e9851b8f8173e030738777412e2}{ struct \hyperlink{structoscap__text}{oscap\_\-text} $\ast$ \hyperlink{group__Internal_gaa4822e9851b8f8173e030738777412e2}{oscap\_\-text\_\-new\_\-parse} (struct \hyperlink{structoscap__text__traits}{oscap\_\-text\_\-traits} traits, xmlTextReaderPtr reader)} \label{group__Internal_gaa4822e9851b8f8173e030738777412e2} \begin{DoxyCompactList}\small\item\em Return a new string by parsing an xml element. \item\end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Memory allocation} \label{_amgrp99f35e40910243d1dbc72b9353378b58} \begin{DoxyCompactItemize} \item \hypertarget{group__Internal_gad1cae716de897150e4464419697269e5}{ void $\ast$ {\bfseries \_\-\_\-oscap\_\-alloc\_\-dbg} (size\_\-t s, const char $\ast$f, size\_\-t l)} \label{group__Internal_gad1cae716de897150e4464419697269e5} \item \hypertarget{group__Internal_ga4c2ef16f2add273357368a55f27b5b85}{ \_\-\_\-P void $\ast$ {\bfseries oscap\_\-alloc} (size\_\-t s)} \label{group__Internal_ga4c2ef16f2add273357368a55f27b5b85} \item \hypertarget{group__Internal_ga0a1b412613c0f83fd46bade7e2c19a93}{ void $\ast$ {\bfseries \_\-\_\-oscap\_\-calloc\_\-dbg} (size\_\-t n, size\_\-t s, const char $\ast$f, size\_\-t l)} \label{group__Internal_ga0a1b412613c0f83fd46bade7e2c19a93} \item \hypertarget{group__Internal_ga55aa95b57eaf892689a47c1d41a3385c}{ \_\-\_\-P void $\ast$ {\bfseries oscap\_\-calloc} (size\_\-t n, size\_\-t s)} \label{group__Internal_ga55aa95b57eaf892689a47c1d41a3385c} \item \hypertarget{group__Internal_ga1ef796ae53df1a6e65a5cc0c465fd99d}{ void $\ast$ {\bfseries \_\-\_\-oscap\_\-realloc\_\-dbg} (void $\ast$p, size\_\-t s, const char $\ast$f, size\_\-t l)} \label{group__Internal_ga1ef796ae53df1a6e65a5cc0c465fd99d} \item \hypertarget{group__Internal_gad8c532eadbcb1873b00e81c562b6a693}{ \_\-\_\-P void $\ast$ {\bfseries oscap\_\-realloc} (void $\ast$p, size\_\-t s)} \label{group__Internal_gad8c532eadbcb1873b00e81c562b6a693} \item \hypertarget{group__Internal_ga3f82fbff7c79faa9c60802024df0384e}{ void $\ast$ {\bfseries \_\-\_\-oscap\_\-reallocf\_\-dbg} (void $\ast$p, size\_\-t s, const char $\ast$f, size\_\-t l)} \label{group__Internal_ga3f82fbff7c79faa9c60802024df0384e} \item \hypertarget{group__Internal_gaa9c73db7966c5c443c780c238e51e0c9}{ \_\-\_\-P void $\ast$ {\bfseries oscap\_\-reallocf} (void $\ast$p, size\_\-t s)} \label{group__Internal_gaa9c73db7966c5c443c780c238e51e0c9} \item \hypertarget{group__Internal_ga97cb1983adcf08a9d319955e251076a4}{ void {\bfseries \_\-\_\-oscap\_\-free\_\-dbg} (void $\ast$$\ast$p, const char $\ast$f, size\_\-t l)} \label{group__Internal_ga97cb1983adcf08a9d319955e251076a4} \item \hypertarget{group__Internal_gade6835b7bb32cef91a22f8de8b8c22b4}{ \_\-\_\-P void {\bfseries oscap\_\-free} (void $\ast$p)} \label{group__Internal_gade6835b7bb32cef91a22f8de8b8c22b4} \item \hypertarget{group__Internal_gaa154bb988a42b081159233920fba1c2a}{ \#define {\bfseries \_\-\_\-P}~\hyperlink{struct____attribute____}{\_\-\_\-attribute\_\-\_\-} ((unused)) static} \label{group__Internal_gaa154bb988a42b081159233920fba1c2a} \item \hypertarget{group__Internal_ga948da36681f6c86f4bfaa0e4623bf4bd}{ \#define \hyperlink{group__Internal_ga948da36681f6c86f4bfaa0e4623bf4bd}{oscap\_\-alloc}(s)~\_\-\_\-oscap\_\-alloc\_\-dbg (s, \_\-\_\-PRETTY\_\-FUNCTION\_\-\_\-, \_\-\_\-LINE\_\-\_\-)} \label{group__Internal_ga948da36681f6c86f4bfaa0e4623bf4bd} \begin{DoxyCompactList}\small\item\em malloc wrapper \item\end{DoxyCompactList}\item \hypertarget{group__Internal_ga358852384c6d7818ca12f1beedaa37e9}{ \#define \hyperlink{group__Internal_ga358852384c6d7818ca12f1beedaa37e9}{oscap\_\-calloc}(n, s)~\_\-\_\-oscap\_\-calloc\_\-dbg (n, s, \_\-\_\-PRETTY\_\-FUNCTION\_\-\_\-, \_\-\_\-LINE\_\-\_\-)} \label{group__Internal_ga358852384c6d7818ca12f1beedaa37e9} \begin{DoxyCompactList}\small\item\em calloc wrapper \item\end{DoxyCompactList}\item \hypertarget{group__Internal_ga0e0d7d13109faed3f5a81d32f82d3bfe}{ \#define \hyperlink{group__Internal_ga0e0d7d13109faed3f5a81d32f82d3bfe}{oscap\_\-realloc}(p, s)~\_\-\_\-oscap\_\-realloc\_\-dbg ((void $\ast$)(p), s, \_\-\_\-PRETTY\_\-FUNCTION\_\-\_\-, \_\-\_\-LINE\_\-\_\-)} \label{group__Internal_ga0e0d7d13109faed3f5a81d32f82d3bfe} \begin{DoxyCompactList}\small\item\em realloc wrapper \item\end{DoxyCompactList}\item \hypertarget{group__Internal_gaa3c25f15f7899dc7b2cdea2b93cf840e}{ \#define \hyperlink{group__Internal_gaa3c25f15f7899dc7b2cdea2b93cf840e}{oscap\_\-reallocf}(p, s)~\_\-\_\-oscap\_\-reallocf\_\-dbg ((void $\ast$)(p), s, \_\-\_\-PRETTY\_\-FUNCTION\_\-\_\-, \_\-\_\-LINE\_\-\_\-)} \label{group__Internal_gaa3c25f15f7899dc7b2cdea2b93cf840e} \begin{DoxyCompactList}\small\item\em realloc wrapper freeing old memory on failure \item\end{DoxyCompactList}\item \hypertarget{group__Internal_gafe2b938359b7ce5b887e284575aeaa28}{ \#define \hyperlink{group__Internal_gafe2b938359b7ce5b887e284575aeaa28}{oscap\_\-free}(p)~\_\-\_\-oscap\_\-free\_\-dbg ((void $\ast$$\ast$)((void $\ast$)\&(p)), \_\-\_\-PRETTY\_\-FUNCTION\_\-\_\-, \_\-\_\-LINE\_\-\_\-)} \label{group__Internal_gafe2b938359b7ce5b887e284575aeaa28} \begin{DoxyCompactList}\small\item\em free wrapper \item\end{DoxyCompactList}\item \hypertarget{group__Internal_ga452a952a42c83c9d4aeb274bc86e3e52}{ \#define {\bfseries oscap\_\-talloc}(T)~((T $\ast$) oscap\_\-alloc(sizeof(T)))} \label{group__Internal_ga452a952a42c83c9d4aeb274bc86e3e52} \item \hypertarget{group__Internal_ga5af75a1401767cc54ada7b27338c156e}{ \#define {\bfseries oscap\_\-valloc}(v)~((typeof(v) $\ast$) oscap\_\-alloc(sizeof v))} \label{group__Internal_ga5af75a1401767cc54ada7b27338c156e} \item \hypertarget{group__Internal_ga3a077e4dad29aa6fe34ded73ca109c28}{ \#define {\bfseries \_\-A}(x)~assert(x)} \label{group__Internal_ga3a077e4dad29aa6fe34ded73ca109c28} \end{DoxyCompactItemize} \subsection{Detailed Description} Functions to be used from within the OpenSCAP library. \subsection{Function Documentation} \hypertarget{group__Internal_gab5f56daa9c735f38478df4a4bf5ea199}{ \index{Internal@{Internal}!oscap\_\-text\_\-new\_\-full@{oscap\_\-text\_\-new\_\-full}} \index{oscap\_\-text\_\-new\_\-full@{oscap\_\-text\_\-new\_\-full}!Internal@{Internal}} \subsubsection[{oscap\_\-text\_\-new\_\-full}]{\setlength{\rightskip}{0pt plus 5cm}struct {\bf oscap\_\-text}$\ast$ oscap\_\-text\_\-new\_\-full (struct {\bf oscap\_\-text\_\-traits} {\em traits}, \/ const char $\ast$ {\em string}, \/ const char $\ast$ {\em lang})\hspace{0.3cm}{\ttfamily \mbox{[}read\mbox{]}}}} \label{group__Internal_gab5f56daa9c735f38478df4a4bf5ea199} full-\/featured constructor \begin{DoxyParams}{Parameters} \item[{\em traits}]text features \item[{\em string}]text data \item[{\em lang}]text language \end{DoxyParams}