\section{aversive\_\-10-03-12/modules/base/cirbuf/cirbuf\_\-add\_\-tail.c File Reference}
\label{cirbuf__add__tail_8c}\index{aversive\_\-10-03-12/modules/base/cirbuf/cirbuf\_\-add\_\-tail.c@{aversive\_\-10-03-12/modules/base/cirbuf/cirbuf\_\-add\_\-tail.c}}
{\tt \#include $<$string.h$>$}\par
{\tt \#include $<$cirbuf.h$>$}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
{\bf cirbuf\_\-int} {\bf cirbuf\_\-add\_\-tail\_\-safe} (struct {\bf cirbuf} $\ast$cbuf, char c)
\item 
void {\bf cirbuf\_\-add\_\-tail} (struct {\bf cirbuf} $\ast$cbuf, char c)
\end{CompactItemize}


\subsection{Function Documentation}
\index{cirbuf\_\-add\_\-tail.c@{cirbuf\_\-add\_\-tail.c}!cirbuf\_\-add\_\-tail@{cirbuf\_\-add\_\-tail}}
\index{cirbuf\_\-add\_\-tail@{cirbuf\_\-add\_\-tail}!cirbuf_add_tail.c@{cirbuf\_\-add\_\-tail.c}}
\subsubsection[cirbuf\_\-add\_\-tail]{\setlength{\rightskip}{0pt plus 5cm}void cirbuf\_\-add\_\-tail (struct {\bf cirbuf} $\ast$ {\em cbuf}, \/  char {\em c})}\label{cirbuf__add__tail_8c_bc3dc3350c5de3ba6457e37a0a849cd5}


Add a character at tail of the circular buffer. You \_\-must\_\- check that you have enough free space in the buffer before calling this func. 

Definition at line 53 of file cirbuf\_\-add\_\-tail.c.

Referenced by rdline\_\-char\_\-in().\index{cirbuf\_\-add\_\-tail.c@{cirbuf\_\-add\_\-tail.c}!cirbuf\_\-add\_\-tail\_\-safe@{cirbuf\_\-add\_\-tail\_\-safe}}
\index{cirbuf\_\-add\_\-tail\_\-safe@{cirbuf\_\-add\_\-tail\_\-safe}!cirbuf_add_tail.c@{cirbuf\_\-add\_\-tail.c}}
\subsubsection[cirbuf\_\-add\_\-tail\_\-safe]{\setlength{\rightskip}{0pt plus 5cm}{\bf cirbuf\_\-int} cirbuf\_\-add\_\-tail\_\-safe (struct {\bf cirbuf} $\ast$ {\em cbuf}, \/  char {\em c})}\label{cirbuf__add__tail_8c_01b0ed6692f88f487b324b97e6d231c1}


Add a character at tail of the circular buffer. Return 0 on success, or a negative value on \doxyref{error}{p.}{structerror}. 

Definition at line 43 of file cirbuf\_\-add\_\-tail.c.

References CIRBUF\_\-IS\_\-FULL, and EINVAL.

Referenced by rdline\_\-char\_\-in().