Sophie

Sophie

distrib > Fedora > 20 > x86_64 > media > updates > by-pkgid > c579c38484b8ffa244858626df1128ca > files > 210

libhtp-doc-0.5.6-3.fc20.noarch.rpm

\hypertarget{bstr__builder_8h}{\section{bstr\-\_\-builder.\-h File Reference}
\label{bstr__builder_8h}\index{bstr\-\_\-builder.\-h@{bstr\-\_\-builder.\-h}}
}
{\ttfamily \#include \char`\"{}htp\-\_\-list.\-h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structbstr__builder__t}{bstr\-\_\-builder\-\_\-t}
\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{bstr__builder_8h_ad58ffd03bf6a79763e080d2c58fd2d08}{B\-S\-T\-R\-\_\-\-B\-U\-I\-L\-D\-E\-R\-\_\-\-D\-E\-F\-A\-U\-L\-T\-\_\-\-S\-I\-Z\-E}~16
\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \hyperlink{structbstr__builder__t}{bstr\-\_\-builder\-\_\-t} \hyperlink{bstr__builder_8h_a59f95100f4bac9f067ede79bd0dd344a}{bstr\-\_\-builder\-\_\-t}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{htp__core_8h_ab8a71422665c0773654b9b4d96f01e31}{htp\-\_\-status\-\_\-t} \hyperlink{bstr__builder_8h_a7960a70d5805c6923451a0d1672c958e}{bstr\-\_\-builder\-\_\-appendn} (\hyperlink{structbstr__builder__t}{bstr\-\_\-builder\-\_\-t} $\ast$bb, \hyperlink{bstr_8h_ad24e3759c8d17c13ae2f05d9dde4d0b6}{bstr} $\ast$b)
\item 
\hyperlink{htp__core_8h_ab8a71422665c0773654b9b4d96f01e31}{htp\-\_\-status\-\_\-t} \hyperlink{bstr__builder_8h_af321d8263825604b52bae18b9c86133d}{bstr\-\_\-builder\-\_\-append\-\_\-c} (\hyperlink{structbstr__builder__t}{bstr\-\_\-builder\-\_\-t} $\ast$bb, const char $\ast$cstr)
\item 
\hyperlink{htp__core_8h_ab8a71422665c0773654b9b4d96f01e31}{htp\-\_\-status\-\_\-t} \hyperlink{bstr__builder_8h_a1d3f608e4787b2e01540b2e675fd3565}{bstr\-\_\-builder\-\_\-append\-\_\-mem} (\hyperlink{structbstr__builder__t}{bstr\-\_\-builder\-\_\-t} $\ast$bb, const void $\ast$data, size\-\_\-t len)
\item 
void \hyperlink{bstr__builder_8h_a1b2387b545c3ebc9cfbeae4c3ede3e8b}{bstr\-\_\-builder\-\_\-clear} (\hyperlink{structbstr__builder__t}{bstr\-\_\-builder\-\_\-t} $\ast$bb)
\item 
\hyperlink{structbstr__builder__t}{bstr\-\_\-builder\-\_\-t} $\ast$ \hyperlink{bstr__builder_8h_af9f224ea0307fc747464f861b3141f5d}{bstr\-\_\-builder\-\_\-create} (void)
\item 
void \hyperlink{bstr__builder_8h_a4c90e3030e9ab7bf81caf09a76c57ec9}{bstr\-\_\-builder\-\_\-destroy} (\hyperlink{structbstr__builder__t}{bstr\-\_\-builder\-\_\-t} $\ast$bb)
\item 
size\-\_\-t \hyperlink{bstr__builder_8h_a015b1e7016ec84c36209f03ec96a7a49}{bstr\-\_\-builder\-\_\-size} (const \hyperlink{structbstr__builder__t}{bstr\-\_\-builder\-\_\-t} $\ast$bb)
\item 
\hyperlink{bstr_8h_ad24e3759c8d17c13ae2f05d9dde4d0b6}{bstr} $\ast$ \hyperlink{bstr__builder_8h_aa20111ccd65d633649a4b4cf9b711954}{bstr\-\_\-builder\-\_\-to\-\_\-str} (const \hyperlink{structbstr__builder__t}{bstr\-\_\-builder\-\_\-t} $\ast$bb)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
\begin{DoxyAuthor}{Author}
Ivan Ristic \href{mailto:ivanr@webkreator.com}{\tt ivanr@webkreator.\-com} 
\end{DoxyAuthor}


\subsection{Macro Definition Documentation}
\hypertarget{bstr__builder_8h_ad58ffd03bf6a79763e080d2c58fd2d08}{\index{bstr\-\_\-builder.\-h@{bstr\-\_\-builder.\-h}!B\-S\-T\-R\-\_\-\-B\-U\-I\-L\-D\-E\-R\-\_\-\-D\-E\-F\-A\-U\-L\-T\-\_\-\-S\-I\-Z\-E@{B\-S\-T\-R\-\_\-\-B\-U\-I\-L\-D\-E\-R\-\_\-\-D\-E\-F\-A\-U\-L\-T\-\_\-\-S\-I\-Z\-E}}
\index{B\-S\-T\-R\-\_\-\-B\-U\-I\-L\-D\-E\-R\-\_\-\-D\-E\-F\-A\-U\-L\-T\-\_\-\-S\-I\-Z\-E@{B\-S\-T\-R\-\_\-\-B\-U\-I\-L\-D\-E\-R\-\_\-\-D\-E\-F\-A\-U\-L\-T\-\_\-\-S\-I\-Z\-E}!bstr_builder.h@{bstr\-\_\-builder.\-h}}
\subsubsection[{B\-S\-T\-R\-\_\-\-B\-U\-I\-L\-D\-E\-R\-\_\-\-D\-E\-F\-A\-U\-L\-T\-\_\-\-S\-I\-Z\-E}]{\setlength{\rightskip}{0pt plus 5cm}\#define B\-S\-T\-R\-\_\-\-B\-U\-I\-L\-D\-E\-R\-\_\-\-D\-E\-F\-A\-U\-L\-T\-\_\-\-S\-I\-Z\-E~16}}\label{bstr__builder_8h_ad58ffd03bf6a79763e080d2c58fd2d08}


\subsection{Typedef Documentation}
\hypertarget{bstr__builder_8h_a59f95100f4bac9f067ede79bd0dd344a}{\index{bstr\-\_\-builder.\-h@{bstr\-\_\-builder.\-h}!bstr\-\_\-builder\-\_\-t@{bstr\-\_\-builder\-\_\-t}}
\index{bstr\-\_\-builder\-\_\-t@{bstr\-\_\-builder\-\_\-t}!bstr_builder.h@{bstr\-\_\-builder.\-h}}
\subsubsection[{bstr\-\_\-builder\-\_\-t}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf bstr\-\_\-builder\-\_\-t} {\bf bstr\-\_\-builder\-\_\-t}}}\label{bstr__builder_8h_a59f95100f4bac9f067ede79bd0dd344a}


\subsection{Function Documentation}
\hypertarget{bstr__builder_8h_af321d8263825604b52bae18b9c86133d}{\index{bstr\-\_\-builder.\-h@{bstr\-\_\-builder.\-h}!bstr\-\_\-builder\-\_\-append\-\_\-c@{bstr\-\_\-builder\-\_\-append\-\_\-c}}
\index{bstr\-\_\-builder\-\_\-append\-\_\-c@{bstr\-\_\-builder\-\_\-append\-\_\-c}!bstr_builder.h@{bstr\-\_\-builder.\-h}}
\subsubsection[{bstr\-\_\-builder\-\_\-append\-\_\-c}]{\setlength{\rightskip}{0pt plus 5cm}{\bf htp\-\_\-status\-\_\-t} bstr\-\_\-builder\-\_\-append\-\_\-c (
\begin{DoxyParamCaption}
\item[{{\bf bstr\-\_\-builder\-\_\-t} $\ast$}]{bb, }
\item[{const char $\ast$}]{cstr}
\end{DoxyParamCaption}
)}}\label{bstr__builder_8h_af321d8263825604b52bae18b9c86133d}
Adds one new piece, in the form of a N\-U\-L-\/terminated string, to the builder. This function will make a copy of the provided string.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em bb} & \\
\hline
\mbox{\tt in}  & {\em cstr} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
H\-T\-P\-\_\-\-O\-K on success, H\-T\-P\-\_\-\-E\-R\-R\-O\-R on failure. 
\end{DoxyReturn}
\hypertarget{bstr__builder_8h_a1d3f608e4787b2e01540b2e675fd3565}{\index{bstr\-\_\-builder.\-h@{bstr\-\_\-builder.\-h}!bstr\-\_\-builder\-\_\-append\-\_\-mem@{bstr\-\_\-builder\-\_\-append\-\_\-mem}}
\index{bstr\-\_\-builder\-\_\-append\-\_\-mem@{bstr\-\_\-builder\-\_\-append\-\_\-mem}!bstr_builder.h@{bstr\-\_\-builder.\-h}}
\subsubsection[{bstr\-\_\-builder\-\_\-append\-\_\-mem}]{\setlength{\rightskip}{0pt plus 5cm}{\bf htp\-\_\-status\-\_\-t} bstr\-\_\-builder\-\_\-append\-\_\-mem (
\begin{DoxyParamCaption}
\item[{{\bf bstr\-\_\-builder\-\_\-t} $\ast$}]{bb, }
\item[{const void $\ast$}]{data, }
\item[{size\-\_\-t}]{len}
\end{DoxyParamCaption}
)}}\label{bstr__builder_8h_a1d3f608e4787b2e01540b2e675fd3565}
Adds one new piece, defined with the supplied pointer and length, to the builder. This function will make a copy of the provided data region.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em bb} & \\
\hline
\mbox{\tt in}  & {\em data} & \\
\hline
\mbox{\tt in}  & {\em len} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}


H\-T\-P\-\_\-\-O\-K on success, H\-T\-P\-\_\-\-E\-R\-R\-O\-R on failure. 
\end{DoxyReturn}
\hypertarget{bstr__builder_8h_a7960a70d5805c6923451a0d1672c958e}{\index{bstr\-\_\-builder.\-h@{bstr\-\_\-builder.\-h}!bstr\-\_\-builder\-\_\-appendn@{bstr\-\_\-builder\-\_\-appendn}}
\index{bstr\-\_\-builder\-\_\-appendn@{bstr\-\_\-builder\-\_\-appendn}!bstr_builder.h@{bstr\-\_\-builder.\-h}}
\subsubsection[{bstr\-\_\-builder\-\_\-appendn}]{\setlength{\rightskip}{0pt plus 5cm}{\bf htp\-\_\-status\-\_\-t} bstr\-\_\-builder\-\_\-appendn (
\begin{DoxyParamCaption}
\item[{{\bf bstr\-\_\-builder\-\_\-t} $\ast$}]{bb, }
\item[{{\bf bstr} $\ast$}]{b}
\end{DoxyParamCaption}
)}}\label{bstr__builder_8h_a7960a70d5805c6923451a0d1672c958e}
Adds one new string to the builder. This function will adopt the string and destroy it when the builder itself is destroyed.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em bb} & \\
\hline
\mbox{\tt in}  & {\em b} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
H\-T\-P\-\_\-\-O\-K on success, H\-T\-P\-\_\-\-E\-R\-R\-O\-R on failure. 
\end{DoxyReturn}
\hypertarget{bstr__builder_8h_a1b2387b545c3ebc9cfbeae4c3ede3e8b}{\index{bstr\-\_\-builder.\-h@{bstr\-\_\-builder.\-h}!bstr\-\_\-builder\-\_\-clear@{bstr\-\_\-builder\-\_\-clear}}
\index{bstr\-\_\-builder\-\_\-clear@{bstr\-\_\-builder\-\_\-clear}!bstr_builder.h@{bstr\-\_\-builder.\-h}}
\subsubsection[{bstr\-\_\-builder\-\_\-clear}]{\setlength{\rightskip}{0pt plus 5cm}void bstr\-\_\-builder\-\_\-clear (
\begin{DoxyParamCaption}
\item[{{\bf bstr\-\_\-builder\-\_\-t} $\ast$}]{bb}
\end{DoxyParamCaption}
)}}\label{bstr__builder_8h_a1b2387b545c3ebc9cfbeae4c3ede3e8b}
Clears this string builder, destroying all existing pieces. You may want to clear a builder once you've either read all the pieces and done something with them, or after you've converted the builder into a single string.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em bb} & \\
\hline
\end{DoxyParams}
\hypertarget{bstr__builder_8h_af9f224ea0307fc747464f861b3141f5d}{\index{bstr\-\_\-builder.\-h@{bstr\-\_\-builder.\-h}!bstr\-\_\-builder\-\_\-create@{bstr\-\_\-builder\-\_\-create}}
\index{bstr\-\_\-builder\-\_\-create@{bstr\-\_\-builder\-\_\-create}!bstr_builder.h@{bstr\-\_\-builder.\-h}}
\subsubsection[{bstr\-\_\-builder\-\_\-create}]{\setlength{\rightskip}{0pt plus 5cm}{\bf bstr\-\_\-builder\-\_\-t}$\ast$ bstr\-\_\-builder\-\_\-create (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{bstr__builder_8h_af9f224ea0307fc747464f861b3141f5d}
Creates a new string builder.

\begin{DoxyReturn}{Returns}
New string builder, or N\-U\-L\-L on error. 
\end{DoxyReturn}
\hypertarget{bstr__builder_8h_a4c90e3030e9ab7bf81caf09a76c57ec9}{\index{bstr\-\_\-builder.\-h@{bstr\-\_\-builder.\-h}!bstr\-\_\-builder\-\_\-destroy@{bstr\-\_\-builder\-\_\-destroy}}
\index{bstr\-\_\-builder\-\_\-destroy@{bstr\-\_\-builder\-\_\-destroy}!bstr_builder.h@{bstr\-\_\-builder.\-h}}
\subsubsection[{bstr\-\_\-builder\-\_\-destroy}]{\setlength{\rightskip}{0pt plus 5cm}void bstr\-\_\-builder\-\_\-destroy (
\begin{DoxyParamCaption}
\item[{{\bf bstr\-\_\-builder\-\_\-t} $\ast$}]{bb}
\end{DoxyParamCaption}
)}}\label{bstr__builder_8h_a4c90e3030e9ab7bf81caf09a76c57ec9}
Destroys an existing string builder, also destroying all the pieces stored within.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em bb} & \\
\hline
\end{DoxyParams}
\hypertarget{bstr__builder_8h_a015b1e7016ec84c36209f03ec96a7a49}{\index{bstr\-\_\-builder.\-h@{bstr\-\_\-builder.\-h}!bstr\-\_\-builder\-\_\-size@{bstr\-\_\-builder\-\_\-size}}
\index{bstr\-\_\-builder\-\_\-size@{bstr\-\_\-builder\-\_\-size}!bstr_builder.h@{bstr\-\_\-builder.\-h}}
\subsubsection[{bstr\-\_\-builder\-\_\-size}]{\setlength{\rightskip}{0pt plus 5cm}size\-\_\-t bstr\-\_\-builder\-\_\-size (
\begin{DoxyParamCaption}
\item[{const {\bf bstr\-\_\-builder\-\_\-t} $\ast$}]{bb}
\end{DoxyParamCaption}
)}}\label{bstr__builder_8h_a015b1e7016ec84c36209f03ec96a7a49}
Returns the size (the number of pieces) currently in a string builder.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em bb} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
size 
\end{DoxyReturn}
\hypertarget{bstr__builder_8h_aa20111ccd65d633649a4b4cf9b711954}{\index{bstr\-\_\-builder.\-h@{bstr\-\_\-builder.\-h}!bstr\-\_\-builder\-\_\-to\-\_\-str@{bstr\-\_\-builder\-\_\-to\-\_\-str}}
\index{bstr\-\_\-builder\-\_\-to\-\_\-str@{bstr\-\_\-builder\-\_\-to\-\_\-str}!bstr_builder.h@{bstr\-\_\-builder.\-h}}
\subsubsection[{bstr\-\_\-builder\-\_\-to\-\_\-str}]{\setlength{\rightskip}{0pt plus 5cm}{\bf bstr}$\ast$ bstr\-\_\-builder\-\_\-to\-\_\-str (
\begin{DoxyParamCaption}
\item[{const {\bf bstr\-\_\-builder\-\_\-t} $\ast$}]{bb}
\end{DoxyParamCaption}
)}}\label{bstr__builder_8h_aa20111ccd65d633649a4b4cf9b711954}
Creates a single string out of all the pieces held in a string builder. This method will not destroy any of the pieces.


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em bb} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
New string, or N\-U\-L\-L on error. 
\end{DoxyReturn}