\hypertarget{stdio_8h}{}\doxysubsection{stdio.\+h File Reference}
\label{stdio_8h}\index{stdio.h@{stdio.h}}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{stdio_8h_aaca70138f0cb63ddb026921afc635179}{stdin}}~(\+\_\+\+\_\+iob\mbox{[}0\mbox{]})
\item 
\#define \mbox{\hyperlink{stdio_8h_a0c0ef221f95f64e8632451312fd18cc8}{stdout}}~(\+\_\+\+\_\+iob\mbox{[}1\mbox{]})
\item 
\#define \mbox{\hyperlink{stdio_8h_a5ce35bd5ba5021fd3b2e951e8f497656}{stderr}}~(\+\_\+\+\_\+iob\mbox{[}2\mbox{]})
\item 
\#define \mbox{\hyperlink{stdio_8h_a59adc4c82490d23754cd39c2fb99b0da}{E\+OF}}~(-\/1)
\item 
\#define \mbox{\hyperlink{stdio_8h_a793fcb8f10b6b8746d4186012929ddf1}{fdev\+\_\+set\+\_\+udata}}(stream,  u)~do \{ (stream)-\/$>$udata = u; \} while(0)
\item 
\#define \mbox{\hyperlink{stdio_8h_ac04f5faa8e86a4ce4ae084d85386af40}{fdev\+\_\+get\+\_\+udata}}(stream)~((stream)-\/$>$udata)
\item 
\#define \mbox{\hyperlink{stdio_8h_af41f158c022cbb6203ccd87d27301226}{fdev\+\_\+setup\+\_\+stream}}(stream,  put,  get,  rwflag)
\item 
\#define \mbox{\hyperlink{stdio_8h_a79826a1c733e4f67843256d34ad64352}{\+\_\+\+F\+D\+E\+V\+\_\+\+S\+E\+T\+U\+P\+\_\+\+R\+E\+AD}}~\+\_\+\+\_\+\+S\+RD
\item 
\#define \mbox{\hyperlink{stdio_8h_a822a791a1c06a12b95c14ace75b48ad2}{\+\_\+\+F\+D\+E\+V\+\_\+\+S\+E\+T\+U\+P\+\_\+\+W\+R\+I\+TE}}~\+\_\+\+\_\+\+S\+WR
\item 
\#define \mbox{\hyperlink{stdio_8h_a93db55caeeaf13488a635f8896a6bdf3}{\+\_\+\+F\+D\+E\+V\+\_\+\+S\+E\+T\+U\+P\+\_\+\+RW}}~(\+\_\+\+\_\+\+S\+RD$\vert$\+\_\+\+\_\+\+S\+WR)
\item 
\#define \mbox{\hyperlink{stdio_8h_a132917c782a0ba854c3ae9abe57c3b12}{\+\_\+\+F\+D\+E\+V\+\_\+\+E\+RR}}~(-\/1)
\item 
\#define \mbox{\hyperlink{stdio_8h_a280c47b9edff2751b8dbb9a715dc44c5}{\+\_\+\+F\+D\+E\+V\+\_\+\+E\+OF}}~(-\/2)
\item 
\#define \mbox{\hyperlink{stdio_8h_aea2b6be92ead4673bc487b271b7227fb}{F\+D\+E\+V\+\_\+\+S\+E\+T\+U\+P\+\_\+\+S\+T\+R\+E\+AM}}(put,  get,  rwflag)
\item 
\#define \mbox{\hyperlink{stdio_8h_aa1226b8f734a1b5148d931ae2908c45d}{fdev\+\_\+close}}()
\item 
\#define \mbox{\hyperlink{stdio_8h_a247111653f3e91bf2cb4930d590d8201}{putc}}(\+\_\+\+\_\+c,  \+\_\+\+\_\+stream)~\mbox{\hyperlink{stdio_8h_af3387285b3eb0ce4e0e7ca3ccaed9014}{fputc}}(\+\_\+\+\_\+c, \+\_\+\+\_\+stream)
\item 
\#define \mbox{\hyperlink{stdio_8h_a61e2590ae5f2f2e351365640d2ac755a}{putchar}}(\+\_\+\+\_\+c)~\mbox{\hyperlink{stdio_8h_af3387285b3eb0ce4e0e7ca3ccaed9014}{fputc}}(\+\_\+\+\_\+c, \mbox{\hyperlink{stdio_8h_a0c0ef221f95f64e8632451312fd18cc8}{stdout}})
\item 
\#define \mbox{\hyperlink{stdio_8h_acff255b3a0079ebb1516e8a4eb23a6fb}{getc}}(\+\_\+\+\_\+stream)~\mbox{\hyperlink{stdio_8h_a818d63019adc9d518a13f9c36ed04f35}{fgetc}}(\+\_\+\+\_\+stream)
\item 
\#define \mbox{\hyperlink{stdio_8h_ac0484b3e3a4d8361d91c3322440f9195}{getchar}}()~\mbox{\hyperlink{stdio_8h_a818d63019adc9d518a13f9c36ed04f35}{fgetc}}(\mbox{\hyperlink{stdio_8h_aaca70138f0cb63ddb026921afc635179}{stdin}})
\end{DoxyCompactItemize}
\doxysubsubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \+\_\+\+\_\+file \mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}}
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{stdio_8h_ad3d27a6dcc225237171196dd0739bb10}{fclose}} (\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream)
\item 
int \mbox{\hyperlink{stdio_8h_aa3b98c0d17b35642c0f3e4649092b9f1}{vfprintf}} (\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream, const char $\ast$\+\_\+\+\_\+fmt, va\+\_\+list \+\_\+\+\_\+ap)
\item 
int \mbox{\hyperlink{stdio_8h_a55b25ecbfd3811ea4495d1f235e2e186}{vfprintf\+\_\+P}} (\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream, const char $\ast$\+\_\+\+\_\+fmt, va\+\_\+list \+\_\+\+\_\+ap)
\item 
int \mbox{\hyperlink{stdio_8h_af3387285b3eb0ce4e0e7ca3ccaed9014}{fputc}} (int \+\_\+\+\_\+c, \mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream)
\item 
int \mbox{\hyperlink{stdio_8h_a4c04da4953607fa5fa4d3908fecde449}{printf}} (const char $\ast$\+\_\+\+\_\+fmt,...)
\item 
int \mbox{\hyperlink{stdio_8h_a418e63921ed6259e873cd21b6c5c8e6e}{printf\+\_\+P}} (const char $\ast$\+\_\+\+\_\+fmt,...)
\item 
int \mbox{\hyperlink{stdio_8h_a0b15be24dd9db93355e1f62937fdfd9a}{vprintf}} (const char $\ast$\+\_\+\+\_\+fmt, va\+\_\+list \+\_\+\+\_\+ap)
\item 
int \mbox{\hyperlink{stdio_8h_a6017094d9fd800fa02600d35399f2a2a}{sprintf}} (char $\ast$\+\_\+\+\_\+s, const char $\ast$\+\_\+\+\_\+fmt,...)
\item 
int \mbox{\hyperlink{stdio_8h_a2b829d696b17dedbf181cd5dc4d7a31d}{sprintf\+\_\+P}} (char $\ast$\+\_\+\+\_\+s, const char $\ast$\+\_\+\+\_\+fmt,...)
\item 
int \mbox{\hyperlink{stdio_8h_a77070c245d4ca4f7ec7d7144260fb875}{snprintf}} (char $\ast$\+\_\+\+\_\+s, size\+\_\+t \+\_\+\+\_\+n, const char $\ast$\+\_\+\+\_\+fmt,...)
\item 
int \mbox{\hyperlink{stdio_8h_a53ff61856759709eeceae10aaa10a0a3}{snprintf\+\_\+P}} (char $\ast$\+\_\+\+\_\+s, size\+\_\+t \+\_\+\+\_\+n, const char $\ast$\+\_\+\+\_\+fmt,...)
\item 
int \mbox{\hyperlink{stdio_8h_aaeb1bbe21a1b9b50b207ab059a67993f}{vsprintf}} (char $\ast$\+\_\+\+\_\+s, const char $\ast$\+\_\+\+\_\+fmt, va\+\_\+list ap)
\item 
int \mbox{\hyperlink{stdio_8h_af47f5141509d1e434f9da2b27287a707}{vsprintf\+\_\+P}} (char $\ast$\+\_\+\+\_\+s, const char $\ast$\+\_\+\+\_\+fmt, va\+\_\+list ap)
\item 
int \mbox{\hyperlink{stdio_8h_ac92e8c42a044c8f50aad5c2c69e638e0}{vsnprintf}} (char $\ast$\+\_\+\+\_\+s, size\+\_\+t \+\_\+\+\_\+n, const char $\ast$\+\_\+\+\_\+fmt, va\+\_\+list ap)
\item 
int \mbox{\hyperlink{stdio_8h_a2071feb5c92bf50a6bd508a07ead9515}{vsnprintf\+\_\+P}} (char $\ast$\+\_\+\+\_\+s, size\+\_\+t \+\_\+\+\_\+n, const char $\ast$\+\_\+\+\_\+fmt, va\+\_\+list ap)
\item 
int \mbox{\hyperlink{stdio_8h_a0e41285401c397eb29692205a95fcd9c}{fprintf}} (\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream, const char $\ast$\+\_\+\+\_\+fmt,...)
\item 
int \mbox{\hyperlink{stdio_8h_a36173b4a8551b61811089198beec69d9}{fprintf\+\_\+P}} (\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream, const char $\ast$\+\_\+\+\_\+fmt,...)
\item 
int \mbox{\hyperlink{stdio_8h_a19c2bbe9ce4af9f0a7e3448387004fd3}{fputs}} (const char $\ast$\+\_\+\+\_\+str, \mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream)
\item 
int \mbox{\hyperlink{stdio_8h_a3d25813cb225ca410518a3f48eb00caa}{fputs\+\_\+P}} (const char $\ast$\+\_\+\+\_\+str, \mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream)
\item 
int \mbox{\hyperlink{stdio_8h_a33f7bd99d40bf6f68a00d5507d65363d}{puts}} (const char $\ast$\+\_\+\+\_\+str)
\item 
int \mbox{\hyperlink{stdio_8h_ab4de83c560c79bf880fa39b997d61610}{puts\+\_\+P}} (const char $\ast$\+\_\+\+\_\+str)
\item 
size\+\_\+t \mbox{\hyperlink{stdio_8h_add5777719a41713629a62b68c239a774}{fwrite}} (const void $\ast$\+\_\+\+\_\+ptr, size\+\_\+t \+\_\+\+\_\+size, size\+\_\+t \+\_\+\+\_\+nmemb, \mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream)
\item 
int \mbox{\hyperlink{stdio_8h_a818d63019adc9d518a13f9c36ed04f35}{fgetc}} (\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream)
\item 
int \mbox{\hyperlink{stdio_8h_ab4f9b130166e5811519513d6178c1ae3}{ungetc}} (int \+\_\+\+\_\+c, \mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream)
\item 
char $\ast$ \mbox{\hyperlink{stdio_8h_a00d34a8bff0293d2d6f4563d248d8fb2}{fgets}} (char $\ast$\+\_\+\+\_\+str, int \+\_\+\+\_\+size, \mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream)
\item 
char $\ast$ \mbox{\hyperlink{stdio_8h_af577dcba9afe50a9d068d0b69ac85d2f}{gets}} (char $\ast$\+\_\+\+\_\+str)
\item 
size\+\_\+t \mbox{\hyperlink{stdio_8h_a54fa47156a34c1659a29ed96e46e3518}{fread}} (void $\ast$\+\_\+\+\_\+ptr, size\+\_\+t \+\_\+\+\_\+size, size\+\_\+t \+\_\+\+\_\+nmemb, \mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream)
\item 
void \mbox{\hyperlink{stdio_8h_aaa6d255675688c736c99ebd32f2a7214}{clearerr}} (\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream)
\item 
int \mbox{\hyperlink{stdio_8h_a47b00053272d6443c9befdb1304002cb}{feof}} (\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream)
\item 
int \mbox{\hyperlink{stdio_8h_aa89248dd55efb5f59a96e82976c97758}{ferror}} (\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream)
\item 
int \mbox{\hyperlink{stdio_8h_a67bae1ad3af79809fd770be392f90e21}{vfscanf}} (\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream, const char $\ast$\+\_\+\+\_\+fmt, va\+\_\+list \+\_\+\+\_\+ap)
\item 
int \mbox{\hyperlink{stdio_8h_a6c6b5b881ce8f4739777ff3a615e988a}{vfscanf\+\_\+P}} (\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream, const char $\ast$\+\_\+\+\_\+fmt, va\+\_\+list \+\_\+\+\_\+ap)
\item 
int \mbox{\hyperlink{stdio_8h_a0beb4fd9ff6833a364e3ce60370de058}{fscanf}} (\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream, const char $\ast$\+\_\+\+\_\+fmt,...)
\item 
int \mbox{\hyperlink{stdio_8h_a7aec94e711ad64724076666586a26839}{fscanf\+\_\+P}} (\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$\+\_\+\+\_\+stream, const char $\ast$\+\_\+\+\_\+fmt,...)
\item 
int \mbox{\hyperlink{stdio_8h_a3f0edc16dcabb5344d59d42cf7682102}{scanf}} (const char $\ast$\+\_\+\+\_\+fmt,...)
\item 
int \mbox{\hyperlink{stdio_8h_a0fb7fd70cd7618f27d8219c97e61bcf3}{scanf\+\_\+P}} (const char $\ast$\+\_\+\+\_\+fmt,...)
\item 
int \mbox{\hyperlink{stdio_8h_a8bd4b760f67791a54e73111734caa82f}{vscanf}} (const char $\ast$\+\_\+\+\_\+fmt, va\+\_\+list \+\_\+\+\_\+ap)
\item 
int \mbox{\hyperlink{stdio_8h_a5507d0e1bbfd387fbb2ffcfd8f5dca6f}{sscanf}} (const char $\ast$\+\_\+\+\_\+buf, const char $\ast$\+\_\+\+\_\+fmt,...)
\item 
int \mbox{\hyperlink{stdio_8h_aeca11dc4b3757ed4ff2f2a4950eba117}{sscanf\+\_\+P}} (const char $\ast$\+\_\+\+\_\+buf, const char $\ast$\+\_\+\+\_\+fmt,...)
\item 
int \mbox{\hyperlink{stdio_8h_adb974f28765a31026ee6bf71d5175951}{fflush}} (\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$stream)
\end{DoxyCompactItemize}


\doxysubsubsection{Macro Definition Documentation}
\mbox{\Hypertarget{stdio_8h_a280c47b9edff2751b8dbb9a715dc44c5}\label{stdio_8h_a280c47b9edff2751b8dbb9a715dc44c5}} 
\index{stdio.h@{stdio.h}!\_FDEV\_EOF@{\_FDEV\_EOF}}
\index{\_FDEV\_EOF@{\_FDEV\_EOF}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{\_FDEV\_EOF}{\_FDEV\_EOF}}
{\footnotesize\ttfamily \#define \+\_\+\+F\+D\+E\+V\+\_\+\+E\+OF~(-\/2)}

Return code for an end-\/of-\/file condition during device read.

To be used in the get function of \mbox{\hyperlink{group__avr__stdio_gab599ddf60819df4cc993c724a83cb1a4}{fdevopen()}}. \mbox{\Hypertarget{stdio_8h_a132917c782a0ba854c3ae9abe57c3b12}\label{stdio_8h_a132917c782a0ba854c3ae9abe57c3b12}} 
\index{stdio.h@{stdio.h}!\_FDEV\_ERR@{\_FDEV\_ERR}}
\index{\_FDEV\_ERR@{\_FDEV\_ERR}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{\_FDEV\_ERR}{\_FDEV\_ERR}}
{\footnotesize\ttfamily \#define \+\_\+\+F\+D\+E\+V\+\_\+\+E\+RR~(-\/1)}

Return code for an error condition during device read.

To be used in the get function of \mbox{\hyperlink{group__avr__stdio_gab599ddf60819df4cc993c724a83cb1a4}{fdevopen()}}. \mbox{\Hypertarget{stdio_8h_a79826a1c733e4f67843256d34ad64352}\label{stdio_8h_a79826a1c733e4f67843256d34ad64352}} 
\index{stdio.h@{stdio.h}!\_FDEV\_SETUP\_READ@{\_FDEV\_SETUP\_READ}}
\index{\_FDEV\_SETUP\_READ@{\_FDEV\_SETUP\_READ}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{\_FDEV\_SETUP\_READ}{\_FDEV\_SETUP\_READ}}
{\footnotesize\ttfamily \#define \+\_\+\+F\+D\+E\+V\+\_\+\+S\+E\+T\+U\+P\+\_\+\+R\+E\+AD~\+\_\+\+\_\+\+S\+RD}

\mbox{\hyperlink{stdio_8h_af41f158c022cbb6203ccd87d27301226}{fdev\+\_\+setup\+\_\+stream()}} with read intent \mbox{\Hypertarget{stdio_8h_a93db55caeeaf13488a635f8896a6bdf3}\label{stdio_8h_a93db55caeeaf13488a635f8896a6bdf3}} 
\index{stdio.h@{stdio.h}!\_FDEV\_SETUP\_RW@{\_FDEV\_SETUP\_RW}}
\index{\_FDEV\_SETUP\_RW@{\_FDEV\_SETUP\_RW}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{\_FDEV\_SETUP\_RW}{\_FDEV\_SETUP\_RW}}
{\footnotesize\ttfamily \#define \+\_\+\+F\+D\+E\+V\+\_\+\+S\+E\+T\+U\+P\+\_\+\+RW~(\+\_\+\+\_\+\+S\+RD$\vert$\+\_\+\+\_\+\+S\+WR)}

\mbox{\hyperlink{stdio_8h_af41f158c022cbb6203ccd87d27301226}{fdev\+\_\+setup\+\_\+stream()}} with read/write intent \mbox{\Hypertarget{stdio_8h_a822a791a1c06a12b95c14ace75b48ad2}\label{stdio_8h_a822a791a1c06a12b95c14ace75b48ad2}} 
\index{stdio.h@{stdio.h}!\_FDEV\_SETUP\_WRITE@{\_FDEV\_SETUP\_WRITE}}
\index{\_FDEV\_SETUP\_WRITE@{\_FDEV\_SETUP\_WRITE}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{\_FDEV\_SETUP\_WRITE}{\_FDEV\_SETUP\_WRITE}}
{\footnotesize\ttfamily \#define \+\_\+\+F\+D\+E\+V\+\_\+\+S\+E\+T\+U\+P\+\_\+\+W\+R\+I\+TE~\+\_\+\+\_\+\+S\+WR}

\mbox{\hyperlink{stdio_8h_af41f158c022cbb6203ccd87d27301226}{fdev\+\_\+setup\+\_\+stream()}} with write intent \mbox{\Hypertarget{stdio_8h_a59adc4c82490d23754cd39c2fb99b0da}\label{stdio_8h_a59adc4c82490d23754cd39c2fb99b0da}} 
\index{stdio.h@{stdio.h}!EOF@{EOF}}
\index{EOF@{EOF}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{EOF}{EOF}}
{\footnotesize\ttfamily \#define E\+OF~(-\/1)}

{\ttfamily E\+OF} declares the value that is returned by various standard IO functions in case of an error. Since the A\+VR platform (currently) doesn\textquotesingle{}t contain an abstraction for actual files, its origin as \char`\"{}end of file\char`\"{} is somewhat meaningless here. \mbox{\Hypertarget{stdio_8h_aa1226b8f734a1b5148d931ae2908c45d}\label{stdio_8h_aa1226b8f734a1b5148d931ae2908c45d}} 
\index{stdio.h@{stdio.h}!fdev\_close@{fdev\_close}}
\index{fdev\_close@{fdev\_close}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fdev\_close}{fdev\_close}}
{\footnotesize\ttfamily \#define fdev\+\_\+close(\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

This macro frees up any library resources that might be associated with {\ttfamily stream}. It should be called if {\ttfamily stream} is no longer needed, right before the application is going to destroy the {\ttfamily stream} object itself.

(Currently, this macro evaluates to nothing, but this might change in future versions of the library.) \mbox{\Hypertarget{stdio_8h_ac04f5faa8e86a4ce4ae084d85386af40}\label{stdio_8h_ac04f5faa8e86a4ce4ae084d85386af40}} 
\index{stdio.h@{stdio.h}!fdev\_get\_udata@{fdev\_get\_udata}}
\index{fdev\_get\_udata@{fdev\_get\_udata}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fdev\_get\_udata}{fdev\_get\_udata}}
{\footnotesize\ttfamily \#define fdev\+\_\+get\+\_\+udata(\begin{DoxyParamCaption}\item[{}]{stream }\end{DoxyParamCaption})~((stream)-\/$>$udata)}

This macro retrieves a pointer to user defined data from a F\+I\+LE stream object. \mbox{\Hypertarget{stdio_8h_a793fcb8f10b6b8746d4186012929ddf1}\label{stdio_8h_a793fcb8f10b6b8746d4186012929ddf1}} 
\index{stdio.h@{stdio.h}!fdev\_set\_udata@{fdev\_set\_udata}}
\index{fdev\_set\_udata@{fdev\_set\_udata}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fdev\_set\_udata}{fdev\_set\_udata}}
{\footnotesize\ttfamily \#define fdev\+\_\+set\+\_\+udata(\begin{DoxyParamCaption}\item[{}]{stream,  }\item[{}]{u }\end{DoxyParamCaption})~do \{ (stream)-\/$>$udata = u; \} while(0)}

This macro inserts a pointer to user defined data into a F\+I\+LE stream object.

The user data can be useful for tracking state in the put and get functions supplied to the \mbox{\hyperlink{group__avr__stdio_gab599ddf60819df4cc993c724a83cb1a4}{fdevopen()}} function. \mbox{\Hypertarget{stdio_8h_aea2b6be92ead4673bc487b271b7227fb}\label{stdio_8h_aea2b6be92ead4673bc487b271b7227fb}} 
\index{stdio.h@{stdio.h}!FDEV\_SETUP\_STREAM@{FDEV\_SETUP\_STREAM}}
\index{FDEV\_SETUP\_STREAM@{FDEV\_SETUP\_STREAM}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{FDEV\_SETUP\_STREAM}{FDEV\_SETUP\_STREAM}}
{\footnotesize\ttfamily \#define F\+D\+E\+V\+\_\+\+S\+E\+T\+U\+P\+\_\+\+S\+T\+R\+E\+AM(\begin{DoxyParamCaption}\item[{}]{put,  }\item[{}]{get,  }\item[{}]{rwflag }\end{DoxyParamCaption})}



Initializer for a user-\/supplied stdio stream. 

This macro acts similar to \mbox{\hyperlink{stdio_8h_af41f158c022cbb6203ccd87d27301226}{fdev\+\_\+setup\+\_\+stream()}}, but it is to be used as the initializer of a variable of type F\+I\+LE.

The remaining arguments are to be used as explained in \mbox{\hyperlink{stdio_8h_af41f158c022cbb6203ccd87d27301226}{fdev\+\_\+setup\+\_\+stream()}}. \mbox{\Hypertarget{stdio_8h_af41f158c022cbb6203ccd87d27301226}\label{stdio_8h_af41f158c022cbb6203ccd87d27301226}} 
\index{stdio.h@{stdio.h}!fdev\_setup\_stream@{fdev\_setup\_stream}}
\index{fdev\_setup\_stream@{fdev\_setup\_stream}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fdev\_setup\_stream}{fdev\_setup\_stream}}
{\footnotesize\ttfamily \#define fdev\+\_\+setup\+\_\+stream(\begin{DoxyParamCaption}\item[{}]{stream,  }\item[{}]{put,  }\item[{}]{get,  }\item[{}]{rwflag }\end{DoxyParamCaption})}



Setup a user-\/supplied buffer as an stdio stream. 

This macro takes a user-\/supplied buffer {\ttfamily stream}, and sets it up as a stream that is valid for stdio operations, similar to one that has been obtained dynamically from \mbox{\hyperlink{group__avr__stdio_gab599ddf60819df4cc993c724a83cb1a4}{fdevopen()}}. The buffer to setup must be of type F\+I\+LE.

The arguments {\ttfamily put} and {\ttfamily get} are identical to those that need to be passed to \mbox{\hyperlink{group__avr__stdio_gab599ddf60819df4cc993c724a83cb1a4}{fdevopen()}}.

The {\ttfamily rwflag} argument can take one of the values \+\_\+\+F\+D\+E\+V\+\_\+\+S\+E\+T\+U\+P\+\_\+\+R\+E\+AD, \+\_\+\+F\+D\+E\+V\+\_\+\+S\+E\+T\+U\+P\+\_\+\+W\+R\+I\+TE, or \+\_\+\+F\+D\+E\+V\+\_\+\+S\+E\+T\+U\+P\+\_\+\+RW, for read, write, or read/write intent, respectively.

\begin{DoxyNote}{Note}
No assignments to the standard streams will be performed by \mbox{\hyperlink{stdio_8h_af41f158c022cbb6203ccd87d27301226}{fdev\+\_\+setup\+\_\+stream()}}. If standard streams are to be used, these need to be assigned by the user. See also under \mbox{\hyperlink{group__avr__stdio_stdio_without_malloc}{Running stdio without malloc()}}. 
\end{DoxyNote}
\mbox{\Hypertarget{stdio_8h_acff255b3a0079ebb1516e8a4eb23a6fb}\label{stdio_8h_acff255b3a0079ebb1516e8a4eb23a6fb}} 
\index{stdio.h@{stdio.h}!getc@{getc}}
\index{getc@{getc}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{getc}{getc}}
{\footnotesize\ttfamily \#define getc(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+stream }\end{DoxyParamCaption})~\mbox{\hyperlink{stdio_8h_a818d63019adc9d518a13f9c36ed04f35}{fgetc}}(\+\_\+\+\_\+stream)}

The macro {\ttfamily getc} used to be a \char`\"{}fast\char`\"{} macro implementation with a functionality identical to \mbox{\hyperlink{stdio_8h_a818d63019adc9d518a13f9c36ed04f35}{fgetc()}}. For space constraints, in {\ttfamily avr-\/libc}, it is just an alias for {\ttfamily fgetc}. \mbox{\Hypertarget{stdio_8h_ac0484b3e3a4d8361d91c3322440f9195}\label{stdio_8h_ac0484b3e3a4d8361d91c3322440f9195}} 
\index{stdio.h@{stdio.h}!getchar@{getchar}}
\index{getchar@{getchar}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{getchar}{getchar}}
{\footnotesize\ttfamily \#define getchar(\begin{DoxyParamCaption}\item[{}]{void }\end{DoxyParamCaption})~\mbox{\hyperlink{stdio_8h_a818d63019adc9d518a13f9c36ed04f35}{fgetc}}(\mbox{\hyperlink{stdio_8h_aaca70138f0cb63ddb026921afc635179}{stdin}})}

The macro {\ttfamily getchar} reads a character from {\ttfamily stdin}. Return values and error handling is identical to \mbox{\hyperlink{stdio_8h_a818d63019adc9d518a13f9c36ed04f35}{fgetc()}}. \mbox{\Hypertarget{stdio_8h_a247111653f3e91bf2cb4930d590d8201}\label{stdio_8h_a247111653f3e91bf2cb4930d590d8201}} 
\index{stdio.h@{stdio.h}!putc@{putc}}
\index{putc@{putc}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{putc}{putc}}
{\footnotesize\ttfamily \#define putc(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+c,  }\item[{}]{\+\_\+\+\_\+stream }\end{DoxyParamCaption})~\mbox{\hyperlink{stdio_8h_af3387285b3eb0ce4e0e7ca3ccaed9014}{fputc}}(\+\_\+\+\_\+c, \+\_\+\+\_\+stream)}

The macro {\ttfamily putc} used to be a \char`\"{}fast\char`\"{} macro implementation with a functionality identical to \mbox{\hyperlink{stdio_8h_af3387285b3eb0ce4e0e7ca3ccaed9014}{fputc()}}. For space constraints, in {\ttfamily avr-\/libc}, it is just an alias for {\ttfamily fputc}. \mbox{\Hypertarget{stdio_8h_a61e2590ae5f2f2e351365640d2ac755a}\label{stdio_8h_a61e2590ae5f2f2e351365640d2ac755a}} 
\index{stdio.h@{stdio.h}!putchar@{putchar}}
\index{putchar@{putchar}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{putchar}{putchar}}
{\footnotesize\ttfamily \#define putchar(\begin{DoxyParamCaption}\item[{}]{\+\_\+\+\_\+c }\end{DoxyParamCaption})~\mbox{\hyperlink{stdio_8h_af3387285b3eb0ce4e0e7ca3ccaed9014}{fputc}}(\+\_\+\+\_\+c, \mbox{\hyperlink{stdio_8h_a0c0ef221f95f64e8632451312fd18cc8}{stdout}})}

The macro {\ttfamily putchar} sends character {\ttfamily c} to {\ttfamily stdout}. \mbox{\Hypertarget{stdio_8h_a5ce35bd5ba5021fd3b2e951e8f497656}\label{stdio_8h_a5ce35bd5ba5021fd3b2e951e8f497656}} 
\index{stdio.h@{stdio.h}!stderr@{stderr}}
\index{stderr@{stderr}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{stderr}{stderr}}
{\footnotesize\ttfamily \#define stderr~(\+\_\+\+\_\+iob\mbox{[}2\mbox{]})}

Stream destined for error output. Unless specifically assigned, identical to {\ttfamily stdout}.

If {\ttfamily stderr} should point to another stream, the result of another {\ttfamily \mbox{\hyperlink{group__avr__stdio_gab599ddf60819df4cc993c724a83cb1a4}{fdevopen()}}} must be explicitly assigned to it without closing the previous {\ttfamily stderr} (since this would also close {\ttfamily stdout}). \mbox{\Hypertarget{stdio_8h_aaca70138f0cb63ddb026921afc635179}\label{stdio_8h_aaca70138f0cb63ddb026921afc635179}} 
\index{stdio.h@{stdio.h}!stdin@{stdin}}
\index{stdin@{stdin}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{stdin}{stdin}}
{\footnotesize\ttfamily \#define stdin~(\+\_\+\+\_\+iob\mbox{[}0\mbox{]})}

Stream that will be used as an input stream by the simplified functions that don\textquotesingle{}t take a {\ttfamily stream} argument.

The first stream opened with read intent using {\ttfamily \mbox{\hyperlink{group__avr__stdio_gab599ddf60819df4cc993c724a83cb1a4}{fdevopen()}}} will be assigned to {\ttfamily stdin}. \mbox{\Hypertarget{stdio_8h_a0c0ef221f95f64e8632451312fd18cc8}\label{stdio_8h_a0c0ef221f95f64e8632451312fd18cc8}} 
\index{stdio.h@{stdio.h}!stdout@{stdout}}
\index{stdout@{stdout}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{stdout}{stdout}}
{\footnotesize\ttfamily \#define stdout~(\+\_\+\+\_\+iob\mbox{[}1\mbox{]})}

Stream that will be used as an output stream by the simplified functions that don\textquotesingle{}t take a {\ttfamily stream} argument.

The first stream opened with write intent using {\ttfamily \mbox{\hyperlink{group__avr__stdio_gab599ddf60819df4cc993c724a83cb1a4}{fdevopen()}}} will be assigned to both, {\ttfamily stdin}, and {\ttfamily stderr}. 

\doxysubsubsection{Typedef Documentation}
\mbox{\Hypertarget{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}\label{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}} 
\index{stdio.h@{stdio.h}!FILE@{FILE}}
\index{FILE@{FILE}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{FILE}{FILE}}
{\footnotesize\ttfamily typedef struct \+\_\+\+\_\+file \mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}}}

{\ttfamily F\+I\+LE} is the opaque structure that is passed around between the various standard IO functions. 

\doxysubsubsection{Function Documentation}
\mbox{\Hypertarget{stdio_8h_aaa6d255675688c736c99ebd32f2a7214}\label{stdio_8h_aaa6d255675688c736c99ebd32f2a7214}} 
\index{stdio.h@{stdio.h}!clearerr@{clearerr}}
\index{clearerr@{clearerr}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{clearerr()}{clearerr()}}
{\footnotesize\ttfamily void clearerr (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream }\end{DoxyParamCaption})}

Clear the error and end-\/of-\/file flags of {\ttfamily stream}. \mbox{\Hypertarget{stdio_8h_ad3d27a6dcc225237171196dd0739bb10}\label{stdio_8h_ad3d27a6dcc225237171196dd0739bb10}} 
\index{stdio.h@{stdio.h}!fclose@{fclose}}
\index{fclose@{fclose}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fclose()}{fclose()}}
{\footnotesize\ttfamily int fclose (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream }\end{DoxyParamCaption})}

This function closes {\ttfamily stream}, and disallows and further IO to and from it.

When using \mbox{\hyperlink{group__avr__stdio_gab599ddf60819df4cc993c724a83cb1a4}{fdevopen()}} to setup the stream, a call to \mbox{\hyperlink{stdio_8h_ad3d27a6dcc225237171196dd0739bb10}{fclose()}} is needed in order to free the internal resources allocated.

If the stream has been set up using \mbox{\hyperlink{stdio_8h_af41f158c022cbb6203ccd87d27301226}{fdev\+\_\+setup\+\_\+stream()}} or \mbox{\hyperlink{stdio_8h_aea2b6be92ead4673bc487b271b7227fb}{F\+D\+E\+V\+\_\+\+S\+E\+T\+U\+P\+\_\+\+S\+T\+R\+E\+A\+M()}}, use \mbox{\hyperlink{stdio_8h_aa1226b8f734a1b5148d931ae2908c45d}{fdev\+\_\+close()}} instead.

It currently always returns 0 (for success). \mbox{\Hypertarget{stdio_8h_a47b00053272d6443c9befdb1304002cb}\label{stdio_8h_a47b00053272d6443c9befdb1304002cb}} 
\index{stdio.h@{stdio.h}!feof@{feof}}
\index{feof@{feof}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{feof()}{feof()}}
{\footnotesize\ttfamily int feof (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream }\end{DoxyParamCaption})}

Test the end-\/of-\/file flag of {\ttfamily stream}. This flag can only be cleared by a call to \mbox{\hyperlink{stdio_8h_aaa6d255675688c736c99ebd32f2a7214}{clearerr()}}. \mbox{\Hypertarget{stdio_8h_aa89248dd55efb5f59a96e82976c97758}\label{stdio_8h_aa89248dd55efb5f59a96e82976c97758}} 
\index{stdio.h@{stdio.h}!ferror@{ferror}}
\index{ferror@{ferror}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{ferror()}{ferror()}}
{\footnotesize\ttfamily int ferror (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream }\end{DoxyParamCaption})}

Test the error flag of {\ttfamily stream}. This flag can only be cleared by a call to \mbox{\hyperlink{stdio_8h_aaa6d255675688c736c99ebd32f2a7214}{clearerr()}}. \mbox{\Hypertarget{stdio_8h_adb974f28765a31026ee6bf71d5175951}\label{stdio_8h_adb974f28765a31026ee6bf71d5175951}} 
\index{stdio.h@{stdio.h}!fflush@{fflush}}
\index{fflush@{fflush}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fflush()}{fflush()}}
{\footnotesize\ttfamily int fflush (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{stream }\end{DoxyParamCaption})}

Flush {\ttfamily stream}.

This is a null operation provided for source-\/code compatibility only, as the standard IO implementation currently does not perform any buffering. \mbox{\Hypertarget{stdio_8h_a818d63019adc9d518a13f9c36ed04f35}\label{stdio_8h_a818d63019adc9d518a13f9c36ed04f35}} 
\index{stdio.h@{stdio.h}!fgetc@{fgetc}}
\index{fgetc@{fgetc}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fgetc()}{fgetc()}}
{\footnotesize\ttfamily int fgetc (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream }\end{DoxyParamCaption})}

The function {\ttfamily fgetc} reads a character from {\ttfamily stream}. It returns the character, or {\ttfamily E\+OF} in case end-\/of-\/file was encountered or an error occurred. The routines \mbox{\hyperlink{stdio_8h_a47b00053272d6443c9befdb1304002cb}{feof()}} or \mbox{\hyperlink{stdio_8h_aa89248dd55efb5f59a96e82976c97758}{ferror()}} must be used to distinguish between both situations. \mbox{\Hypertarget{stdio_8h_a00d34a8bff0293d2d6f4563d248d8fb2}\label{stdio_8h_a00d34a8bff0293d2d6f4563d248d8fb2}} 
\index{stdio.h@{stdio.h}!fgets@{fgets}}
\index{fgets@{fgets}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fgets()}{fgets()}}
{\footnotesize\ttfamily char$\ast$ fgets (\begin{DoxyParamCaption}\item[{char $\ast$}]{\+\_\+\+\_\+str,  }\item[{int}]{\+\_\+\+\_\+size,  }\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream }\end{DoxyParamCaption})}

Read at most {\ttfamily size -\/ 1} bytes from {\ttfamily stream}, until a newline character was encountered, and store the characters in the buffer pointed to by {\ttfamily str}. Unless an error was encountered while reading, the string will then be terminated with a {\ttfamily N\+UL} character.

If an error was encountered, the function returns N\+U\+LL and sets the error flag of {\ttfamily stream}, which can be tested using \mbox{\hyperlink{stdio_8h_aa89248dd55efb5f59a96e82976c97758}{ferror()}}. Otherwise, a pointer to the string will be returned. \mbox{\Hypertarget{stdio_8h_a0e41285401c397eb29692205a95fcd9c}\label{stdio_8h_a0e41285401c397eb29692205a95fcd9c}} 
\index{stdio.h@{stdio.h}!fprintf@{fprintf}}
\index{fprintf@{fprintf}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fprintf()}{fprintf()}}
{\footnotesize\ttfamily int fprintf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

The function {\ttfamily fprintf} performs formatted output to {\ttfamily stream}. See {\ttfamily \mbox{\hyperlink{stdio_8h_aa3b98c0d17b35642c0f3e4649092b9f1}{vfprintf()}}} for details. \mbox{\Hypertarget{stdio_8h_a36173b4a8551b61811089198beec69d9}\label{stdio_8h_a36173b4a8551b61811089198beec69d9}} 
\index{stdio.h@{stdio.h}!fprintf\_P@{fprintf\_P}}
\index{fprintf\_P@{fprintf\_P}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fprintf\_P()}{fprintf\_P()}}
{\footnotesize\ttfamily int fprintf\+\_\+P (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

Variant of {\ttfamily \mbox{\hyperlink{stdio_8h_a0e41285401c397eb29692205a95fcd9c}{fprintf()}}} that uses a {\ttfamily fmt} string that resides in program memory. \mbox{\Hypertarget{stdio_8h_af3387285b3eb0ce4e0e7ca3ccaed9014}\label{stdio_8h_af3387285b3eb0ce4e0e7ca3ccaed9014}} 
\index{stdio.h@{stdio.h}!fputc@{fputc}}
\index{fputc@{fputc}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fputc()}{fputc()}}
{\footnotesize\ttfamily int fputc (\begin{DoxyParamCaption}\item[{int}]{\+\_\+\+\_\+c,  }\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream }\end{DoxyParamCaption})}

The function {\ttfamily fputc} sends the character {\ttfamily c} (though given as type {\ttfamily int}) to {\ttfamily stream}. It returns the character, or {\ttfamily E\+OF} in case an error occurred. \mbox{\Hypertarget{stdio_8h_a19c2bbe9ce4af9f0a7e3448387004fd3}\label{stdio_8h_a19c2bbe9ce4af9f0a7e3448387004fd3}} 
\index{stdio.h@{stdio.h}!fputs@{fputs}}
\index{fputs@{fputs}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fputs()}{fputs()}}
{\footnotesize\ttfamily int fputs (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+\+\_\+str,  }\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream }\end{DoxyParamCaption})}

Write the string pointed to by {\ttfamily str} to stream {\ttfamily stream}.

Returns 0 on success and E\+OF on error. \mbox{\Hypertarget{stdio_8h_a3d25813cb225ca410518a3f48eb00caa}\label{stdio_8h_a3d25813cb225ca410518a3f48eb00caa}} 
\index{stdio.h@{stdio.h}!fputs\_P@{fputs\_P}}
\index{fputs\_P@{fputs\_P}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fputs\_P()}{fputs\_P()}}
{\footnotesize\ttfamily int fputs\+\_\+P (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+\+\_\+str,  }\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream }\end{DoxyParamCaption})}

Variant of \mbox{\hyperlink{stdio_8h_a19c2bbe9ce4af9f0a7e3448387004fd3}{fputs()}} where {\ttfamily str} resides in program memory. \mbox{\Hypertarget{stdio_8h_a54fa47156a34c1659a29ed96e46e3518}\label{stdio_8h_a54fa47156a34c1659a29ed96e46e3518}} 
\index{stdio.h@{stdio.h}!fread@{fread}}
\index{fread@{fread}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fread()}{fread()}}
{\footnotesize\ttfamily size\+\_\+t fread (\begin{DoxyParamCaption}\item[{void $\ast$}]{\+\_\+\+\_\+ptr,  }\item[{size\+\_\+t}]{\+\_\+\+\_\+size,  }\item[{size\+\_\+t}]{\+\_\+\+\_\+nmemb,  }\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream }\end{DoxyParamCaption})}

Read {\ttfamily nmemb} objects, {\ttfamily size} bytes each, from {\ttfamily stream}, to the buffer pointed to by {\ttfamily ptr}.

Returns the number of objects successfully read, i. e. {\ttfamily nmemb} unless an input error occured or end-\/of-\/file was encountered. \mbox{\hyperlink{stdio_8h_a47b00053272d6443c9befdb1304002cb}{feof()}} and \mbox{\hyperlink{stdio_8h_aa89248dd55efb5f59a96e82976c97758}{ferror()}} must be used to distinguish between these two conditions. \mbox{\Hypertarget{stdio_8h_a0beb4fd9ff6833a364e3ce60370de058}\label{stdio_8h_a0beb4fd9ff6833a364e3ce60370de058}} 
\index{stdio.h@{stdio.h}!fscanf@{fscanf}}
\index{fscanf@{fscanf}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fscanf()}{fscanf()}}
{\footnotesize\ttfamily int fscanf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

The function {\ttfamily fscanf} performs formatted input, reading the input data from {\ttfamily stream}.

See \mbox{\hyperlink{stdio_8h_a67bae1ad3af79809fd770be392f90e21}{vfscanf()}} for details. \mbox{\Hypertarget{stdio_8h_a7aec94e711ad64724076666586a26839}\label{stdio_8h_a7aec94e711ad64724076666586a26839}} 
\index{stdio.h@{stdio.h}!fscanf\_P@{fscanf\_P}}
\index{fscanf\_P@{fscanf\_P}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fscanf\_P()}{fscanf\_P()}}
{\footnotesize\ttfamily int fscanf\+\_\+P (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

Variant of \mbox{\hyperlink{stdio_8h_a0beb4fd9ff6833a364e3ce60370de058}{fscanf()}} using a {\ttfamily fmt} string in program memory. \mbox{\Hypertarget{stdio_8h_add5777719a41713629a62b68c239a774}\label{stdio_8h_add5777719a41713629a62b68c239a774}} 
\index{stdio.h@{stdio.h}!fwrite@{fwrite}}
\index{fwrite@{fwrite}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{fwrite()}{fwrite()}}
{\footnotesize\ttfamily size\+\_\+t fwrite (\begin{DoxyParamCaption}\item[{const void $\ast$}]{\+\_\+\+\_\+ptr,  }\item[{size\+\_\+t}]{\+\_\+\+\_\+size,  }\item[{size\+\_\+t}]{\+\_\+\+\_\+nmemb,  }\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream }\end{DoxyParamCaption})}

Write {\ttfamily nmemb} objects, {\ttfamily size} bytes each, to {\ttfamily stream}. The first byte of the first object is referenced by {\ttfamily ptr}.

Returns the number of objects successfully written, i. e. {\ttfamily nmemb} unless an output error occured. \mbox{\Hypertarget{stdio_8h_af577dcba9afe50a9d068d0b69ac85d2f}\label{stdio_8h_af577dcba9afe50a9d068d0b69ac85d2f}} 
\index{stdio.h@{stdio.h}!gets@{gets}}
\index{gets@{gets}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{gets()}{gets()}}
{\footnotesize\ttfamily char$\ast$ gets (\begin{DoxyParamCaption}\item[{char $\ast$}]{\+\_\+\+\_\+str }\end{DoxyParamCaption})}

Similar to \mbox{\hyperlink{stdio_8h_a00d34a8bff0293d2d6f4563d248d8fb2}{fgets()}} except that it will operate on stream {\ttfamily stdin}, and the trailing newline (if any) will not be stored in the string. It is the caller\textquotesingle{}s responsibility to provide enough storage to hold the characters read. \mbox{\Hypertarget{stdio_8h_a4c04da4953607fa5fa4d3908fecde449}\label{stdio_8h_a4c04da4953607fa5fa4d3908fecde449}} 
\index{stdio.h@{stdio.h}!printf@{printf}}
\index{printf@{printf}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{printf()}{printf()}}
{\footnotesize\ttfamily int printf (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

The function {\ttfamily printf} performs formatted output to stream {\ttfamily stdout}. See {\ttfamily \mbox{\hyperlink{stdio_8h_aa3b98c0d17b35642c0f3e4649092b9f1}{vfprintf()}}} for details. \mbox{\Hypertarget{stdio_8h_a418e63921ed6259e873cd21b6c5c8e6e}\label{stdio_8h_a418e63921ed6259e873cd21b6c5c8e6e}} 
\index{stdio.h@{stdio.h}!printf\_P@{printf\_P}}
\index{printf\_P@{printf\_P}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{printf\_P()}{printf\_P()}}
{\footnotesize\ttfamily int printf\+\_\+P (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

Variant of {\ttfamily \mbox{\hyperlink{stdio_8h_a4c04da4953607fa5fa4d3908fecde449}{printf()}}} that uses a {\ttfamily fmt} string that resides in program memory. \mbox{\Hypertarget{stdio_8h_a33f7bd99d40bf6f68a00d5507d65363d}\label{stdio_8h_a33f7bd99d40bf6f68a00d5507d65363d}} 
\index{stdio.h@{stdio.h}!puts@{puts}}
\index{puts@{puts}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{puts()}{puts()}}
{\footnotesize\ttfamily int puts (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+\+\_\+str }\end{DoxyParamCaption})}

Write the string pointed to by {\ttfamily str}, and a trailing newline character, to {\ttfamily stdout}. \mbox{\Hypertarget{stdio_8h_ab4de83c560c79bf880fa39b997d61610}\label{stdio_8h_ab4de83c560c79bf880fa39b997d61610}} 
\index{stdio.h@{stdio.h}!puts\_P@{puts\_P}}
\index{puts\_P@{puts\_P}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{puts\_P()}{puts\_P()}}
{\footnotesize\ttfamily int puts\+\_\+P (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+\+\_\+str }\end{DoxyParamCaption})}

Variant of \mbox{\hyperlink{stdio_8h_a33f7bd99d40bf6f68a00d5507d65363d}{puts()}} where {\ttfamily str} resides in program memory. \mbox{\Hypertarget{stdio_8h_a3f0edc16dcabb5344d59d42cf7682102}\label{stdio_8h_a3f0edc16dcabb5344d59d42cf7682102}} 
\index{stdio.h@{stdio.h}!scanf@{scanf}}
\index{scanf@{scanf}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{scanf()}{scanf()}}
{\footnotesize\ttfamily int scanf (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

The function {\ttfamily scanf} performs formatted input from stream {\ttfamily stdin}.

See \mbox{\hyperlink{stdio_8h_a67bae1ad3af79809fd770be392f90e21}{vfscanf()}} for details. \mbox{\Hypertarget{stdio_8h_a0fb7fd70cd7618f27d8219c97e61bcf3}\label{stdio_8h_a0fb7fd70cd7618f27d8219c97e61bcf3}} 
\index{stdio.h@{stdio.h}!scanf\_P@{scanf\_P}}
\index{scanf\_P@{scanf\_P}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{scanf\_P()}{scanf\_P()}}
{\footnotesize\ttfamily int scanf\+\_\+P (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

Variant of \mbox{\hyperlink{stdio_8h_a3f0edc16dcabb5344d59d42cf7682102}{scanf()}} where {\ttfamily fmt} resides in program memory. \mbox{\Hypertarget{stdio_8h_a77070c245d4ca4f7ec7d7144260fb875}\label{stdio_8h_a77070c245d4ca4f7ec7d7144260fb875}} 
\index{stdio.h@{stdio.h}!snprintf@{snprintf}}
\index{snprintf@{snprintf}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{snprintf()}{snprintf()}}
{\footnotesize\ttfamily int snprintf (\begin{DoxyParamCaption}\item[{char $\ast$}]{\+\_\+\+\_\+s,  }\item[{size\+\_\+t}]{\+\_\+\+\_\+n,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

Like {\ttfamily \mbox{\hyperlink{stdio_8h_a6017094d9fd800fa02600d35399f2a2a}{sprintf()}}}, but instead of assuming {\ttfamily s} to be of infinite size, no more than {\ttfamily n} characters (including the trailing N\+UL character) will be converted to {\ttfamily s}.

Returns the number of characters that would have been written to {\ttfamily s} if there were enough space. \mbox{\Hypertarget{stdio_8h_a53ff61856759709eeceae10aaa10a0a3}\label{stdio_8h_a53ff61856759709eeceae10aaa10a0a3}} 
\index{stdio.h@{stdio.h}!snprintf\_P@{snprintf\_P}}
\index{snprintf\_P@{snprintf\_P}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{snprintf\_P()}{snprintf\_P()}}
{\footnotesize\ttfamily int snprintf\+\_\+P (\begin{DoxyParamCaption}\item[{char $\ast$}]{\+\_\+\+\_\+s,  }\item[{size\+\_\+t}]{\+\_\+\+\_\+n,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

Variant of {\ttfamily \mbox{\hyperlink{stdio_8h_a77070c245d4ca4f7ec7d7144260fb875}{snprintf()}}} that uses a {\ttfamily fmt} string that resides in program memory. \mbox{\Hypertarget{stdio_8h_a6017094d9fd800fa02600d35399f2a2a}\label{stdio_8h_a6017094d9fd800fa02600d35399f2a2a}} 
\index{stdio.h@{stdio.h}!sprintf@{sprintf}}
\index{sprintf@{sprintf}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{sprintf()}{sprintf()}}
{\footnotesize\ttfamily int sprintf (\begin{DoxyParamCaption}\item[{char $\ast$}]{\+\_\+\+\_\+s,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

Variant of {\ttfamily \mbox{\hyperlink{stdio_8h_a4c04da4953607fa5fa4d3908fecde449}{printf()}}} that sends the formatted characters to string {\ttfamily s}. \mbox{\Hypertarget{stdio_8h_a2b829d696b17dedbf181cd5dc4d7a31d}\label{stdio_8h_a2b829d696b17dedbf181cd5dc4d7a31d}} 
\index{stdio.h@{stdio.h}!sprintf\_P@{sprintf\_P}}
\index{sprintf\_P@{sprintf\_P}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{sprintf\_P()}{sprintf\_P()}}
{\footnotesize\ttfamily int sprintf\+\_\+P (\begin{DoxyParamCaption}\item[{char $\ast$}]{\+\_\+\+\_\+s,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

Variant of {\ttfamily \mbox{\hyperlink{stdio_8h_a6017094d9fd800fa02600d35399f2a2a}{sprintf()}}} that uses a {\ttfamily fmt} string that resides in program memory. \mbox{\Hypertarget{stdio_8h_a5507d0e1bbfd387fbb2ffcfd8f5dca6f}\label{stdio_8h_a5507d0e1bbfd387fbb2ffcfd8f5dca6f}} 
\index{stdio.h@{stdio.h}!sscanf@{sscanf}}
\index{sscanf@{sscanf}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{sscanf()}{sscanf()}}
{\footnotesize\ttfamily int sscanf (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+\+\_\+buf,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

The function {\ttfamily sscanf} performs formatted input, reading the input data from the buffer pointed to by {\ttfamily buf}.

See \mbox{\hyperlink{stdio_8h_a67bae1ad3af79809fd770be392f90e21}{vfscanf()}} for details. \mbox{\Hypertarget{stdio_8h_aeca11dc4b3757ed4ff2f2a4950eba117}\label{stdio_8h_aeca11dc4b3757ed4ff2f2a4950eba117}} 
\index{stdio.h@{stdio.h}!sscanf\_P@{sscanf\_P}}
\index{sscanf\_P@{sscanf\_P}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{sscanf\_P()}{sscanf\_P()}}
{\footnotesize\ttfamily int sscanf\+\_\+P (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+\+\_\+buf,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{}]{... }\end{DoxyParamCaption})}

Variant of \mbox{\hyperlink{stdio_8h_a5507d0e1bbfd387fbb2ffcfd8f5dca6f}{sscanf()}} using a {\ttfamily fmt} string in program memory. \mbox{\Hypertarget{stdio_8h_ab4f9b130166e5811519513d6178c1ae3}\label{stdio_8h_ab4f9b130166e5811519513d6178c1ae3}} 
\index{stdio.h@{stdio.h}!ungetc@{ungetc}}
\index{ungetc@{ungetc}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{ungetc()}{ungetc()}}
{\footnotesize\ttfamily int ungetc (\begin{DoxyParamCaption}\item[{int}]{\+\_\+\+\_\+c,  }\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream }\end{DoxyParamCaption})}

The \mbox{\hyperlink{stdio_8h_ab4f9b130166e5811519513d6178c1ae3}{ungetc()}} function pushes the character {\ttfamily c} (converted to an unsigned char) back onto the input stream pointed to by {\ttfamily stream}. The pushed-\/back character will be returned by a subsequent read on the stream.

Currently, only a single character can be pushed back onto the stream.

The \mbox{\hyperlink{stdio_8h_ab4f9b130166e5811519513d6178c1ae3}{ungetc()}} function returns the character pushed back after the conversion, or {\ttfamily E\+OF} if the operation fails. If the value of the argument {\ttfamily c} character equals {\ttfamily E\+OF}, the operation will fail and the stream will remain unchanged. \mbox{\Hypertarget{stdio_8h_aa3b98c0d17b35642c0f3e4649092b9f1}\label{stdio_8h_aa3b98c0d17b35642c0f3e4649092b9f1}} 
\index{stdio.h@{stdio.h}!vfprintf@{vfprintf}}
\index{vfprintf@{vfprintf}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{vfprintf()}{vfprintf()}}
{\footnotesize\ttfamily int vfprintf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{va\+\_\+list}]{\+\_\+\+\_\+ap }\end{DoxyParamCaption})}

{\ttfamily vfprintf} is the central facility of the {\ttfamily printf} family of functions. It outputs values to {\ttfamily stream} under control of a format string passed in {\ttfamily fmt}. The actual values to print are passed as a variable argument list {\ttfamily ap}.

{\ttfamily vfprintf} returns the number of characters written to {\ttfamily stream}, or {\ttfamily E\+OF} in case of an error. Currently, this will only happen if {\ttfamily stream} has not been opened with write intent.

The format string is composed of zero or more directives\+: ordinary characters (not {\ttfamily \%}), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments. Each conversion specification is introduced by the {\ttfamily \%} character. The arguments must properly correspond (after type promotion) with the conversion specifier. After the {\ttfamily \%}, the following appear in sequence\+:


\begin{DoxyItemize}
\item Zero or more of the following flags\+: 
\begin{DoxyItemize}
\item {\ttfamily \#} The value should be converted to an \char`\"{}alternate form\char`\"{}. For c, d, i, s, and u conversions, this option has no effect. For o conversions, the precision of the number is increased to force the first character of the output string to a zero (except if a zero value is printed with an explicit precision of zero). For x and X conversions, a non-\/zero result has the string \`{}0x\textquotesingle{} (or \`{}0X\textquotesingle{} for X conversions) prepended to it. 
\item {\ttfamily 0} (zero) Zero padding. For all conversions, the converted value is padded on the left with zeros rather than blanks. If a precision is given with a numeric conversion (d, i, o, u, i, x, and X), the 0 flag is ignored. 
\item {\ttfamily -\/} A negative field width flag; the converted value is to be left adjusted on the field boundary. The converted value is padded on the right with blanks, rather than on the left with blanks or zeros. A -\/ overrides a 0 if both are given. 
\item \textquotesingle{} \textquotesingle{} (space) A blank should be left before a positive number produced by a signed conversion (d, or i). 
\item {\ttfamily +} A sign must always be placed before a number produced by a signed conversion. A + overrides a space if both are used. 
\end{DoxyItemize}
\item An optional decimal digit string specifying a minimum field width. If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-\/adjustment flag has been given) to fill out the field width.
\item An optional precision, in the form of a period . followed by an optional digit string. If the digit string is omitted, the precision is taken as zero. This gives the minimum number of digits to appear for d, i, o, u, x, and X conversions, or the maximum number of characters to be printed from a string for {\ttfamily s} conversions.
\item An optional {\ttfamily l} or {\ttfamily h} length modifier, that specifies that the argument for the d, i, o, u, x, or X conversion is a {\ttfamily \char`\"{}long int\char`\"{}} rather than {\ttfamily int}. The {\ttfamily h} is ignored, as {\ttfamily \char`\"{}short int\char`\"{}} is equivalent to {\ttfamily int}.
\item A character that specifies the type of conversion to be applied.
\end{DoxyItemize}

The conversion specifiers and their meanings are\+:


\begin{DoxyItemize}
\item {\ttfamily diouxX} The int (or appropriate variant) argument is converted to signed decimal (d and i), unsigned octal (o), unsigned decimal (u), or unsigned hexadecimal (x and X) notation. The letters \char`\"{}abcdef\char`\"{} are used for x conversions; the letters \char`\"{}\+A\+B\+C\+D\+E\+F\char`\"{} are used for X conversions. The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros.
\item {\ttfamily p} The {\ttfamily void $\ast$} argument is taken as an unsigned integer, and converted similarly as a {\ttfamily \%\#x} command would do.
\item {\ttfamily c} The {\ttfamily int} argument is converted to an {\ttfamily \char`\"{}unsigned char\char`\"{}}, and the resulting character is written.
\item {\ttfamily s} The {\ttfamily \char`\"{}char $\ast$\char`\"{}} argument is expected to be a pointer to an array of character type (pointer to a string). Characters from the array are written up to (but not including) a terminating N\+UL character; if a precision is specified, no more than the number specified are written. If a precision is given, no null character need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating N\+UL character.
\item {\ttfamily \%} A {\ttfamily \%} is written. No argument is converted. The complete conversion specification is \char`\"{}\%\%\char`\"{}.
\item {\ttfamily eE} The double argument is rounded and converted in the format {\ttfamily \char`\"{}\mbox{[}-\/\mbox{]}d.\+ddde±dd\char`\"{}} where there is one digit before the decimal-\/point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-\/point character appears. An {\itshape E} conversion uses the letter {\ttfamily \textquotesingle{}E\textquotesingle{}} (rather than {\ttfamily \textquotesingle{}e\textquotesingle{}}) to introduce the exponent. The exponent always contains two digits; if the value is zero, the exponent is 00.
\item {\ttfamily fF} The double argument is rounded and converted to decimal notation in the format {\ttfamily \char`\"{}\mbox{[}-\/\mbox{]}ddd.\+ddd\char`\"{}}, where the number of digits after the decimal-\/point character is equal to the precision specification. If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-\/point character appears. If a decimal point appears, at least one digit appears before it.
\item {\ttfamily gG} The double argument is converted in style {\ttfamily f} or {\ttfamily e} (or {\ttfamily F} or {\ttfamily E} for {\ttfamily G} conversions). The precision specifies the number of significant digits. If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1. Style {\ttfamily e} is used if the exponent from its conversion is less than -\/4 or greater than or equal to the precision. Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit.
\item {\ttfamily S} Similar to the {\ttfamily s} format, except the pointer is expected to point to a program-\/memory (R\+OM) string instead of a R\+AM string.
\end{DoxyItemize}

In no case does a non-\/existent or small field width cause truncation of a numeric field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result.

Since the full implementation of all the mentioned features becomes fairly large, three different flavours of \mbox{\hyperlink{stdio_8h_aa3b98c0d17b35642c0f3e4649092b9f1}{vfprintf()}} can be selected using linker options. The default \mbox{\hyperlink{stdio_8h_aa3b98c0d17b35642c0f3e4649092b9f1}{vfprintf()}} implements all the mentioned functionality except floating point conversions. A minimized version of \mbox{\hyperlink{stdio_8h_aa3b98c0d17b35642c0f3e4649092b9f1}{vfprintf()}} is available that only implements the very basic integer and string conversion facilities, but only the {\ttfamily \#} additional option can be specified using conversion flags (these flags are parsed correctly from the format specification, but then simply ignored). This version can be requested using the following \mbox{\hyperlink{using_tools_gcc_minusW}{compiler options}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{-\/Wl,-\/u,\mbox{\hyperlink{stdio_8h_aa3b98c0d17b35642c0f3e4649092b9f1}{vfprintf}} -\/lprintf\_min}
\end{DoxyCode}


If the full functionality including the floating point conversions is required, the following options should be used\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{-\/Wl,-\/u,\mbox{\hyperlink{stdio_8h_aa3b98c0d17b35642c0f3e4649092b9f1}{vfprintf}} -\/lprintf\_flt -\/lm}
\end{DoxyCode}


\begin{DoxyParagraph}{Limitations\+:}

\begin{DoxyItemize}
\item The specified width and precision can be at most 255.
\end{DoxyItemize}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Notes\+:}

\begin{DoxyItemize}
\item For floating-\/point conversions, if you link default or minimized version of \mbox{\hyperlink{stdio_8h_aa3b98c0d17b35642c0f3e4649092b9f1}{vfprintf()}}, the symbol {\ttfamily }? will be output and double argument will be skiped. So you output below will not be crashed. For default version the width field and the \char`\"{}pad to left\char`\"{} ( symbol minus ) option will work in this case.
\item The {\ttfamily hh} length modifier is ignored ({\ttfamily char} argument is promouted to {\ttfamily int}). More exactly, this realization does not check the number of {\ttfamily h} symbols.
\item But the {\ttfamily ll} length modifier will to abort the output, as this realization does not operate {\ttfamily long} {\ttfamily long} arguments.
\item The variable width or precision field (an asterisk {\ttfamily $\ast$} symbol) is not realized and will to abort the output. 
\end{DoxyItemize}
\end{DoxyParagraph}
\mbox{\Hypertarget{stdio_8h_a55b25ecbfd3811ea4495d1f235e2e186}\label{stdio_8h_a55b25ecbfd3811ea4495d1f235e2e186}} 
\index{stdio.h@{stdio.h}!vfprintf\_P@{vfprintf\_P}}
\index{vfprintf\_P@{vfprintf\_P}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{vfprintf\_P()}{vfprintf\_P()}}
{\footnotesize\ttfamily int vfprintf\+\_\+P (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{va\+\_\+list}]{\+\_\+\+\_\+ap }\end{DoxyParamCaption})}

Variant of {\ttfamily \mbox{\hyperlink{stdio_8h_aa3b98c0d17b35642c0f3e4649092b9f1}{vfprintf()}}} that uses a {\ttfamily fmt} string that resides in program memory. \mbox{\Hypertarget{stdio_8h_a67bae1ad3af79809fd770be392f90e21}\label{stdio_8h_a67bae1ad3af79809fd770be392f90e21}} 
\index{stdio.h@{stdio.h}!vfscanf@{vfscanf}}
\index{vfscanf@{vfscanf}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{vfscanf()}{vfscanf()}}
{\footnotesize\ttfamily int vfscanf (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{stream,  }\item[{const char $\ast$}]{fmt,  }\item[{va\+\_\+list}]{ap }\end{DoxyParamCaption})}

Formatted input. This function is the heart of the {\bfseries{scanf}} family of functions.

Characters are read from {\itshape stream} and processed in a way described by {\itshape fmt}. Conversion results will be assigned to the parameters passed via {\itshape ap}.

The format string {\itshape fmt} is scanned for conversion specifications. Anything that doesn\textquotesingle{}t comprise a conversion specification is taken as text that is matched literally against the input. White space in the format string will match any white space in the data (including none), all other characters match only itself. Processing is aborted as soon as the data and format string no longer match, or there is an error or end-\/of-\/file condition on {\itshape stream}.

Most conversions skip leading white space before starting the actual conversion.

Conversions are introduced with the character {\bfseries{\%}}. Possible options can follow the {\bfseries{\%}}\+:


\begin{DoxyItemize}
\item a {\ttfamily $\ast$} indicating that the conversion should be performed but the conversion result is to be discarded; no parameters will be processed from {\ttfamily ap},
\item the character {\ttfamily h} indicating that the argument is a pointer to {\ttfamily short int} (rather than {\ttfamily int}),
\item the 2 characters {\ttfamily hh} indicating that the argument is a pointer to {\ttfamily char} (rather than {\ttfamily int}).
\item the character {\ttfamily l} indicating that the argument is a pointer to {\ttfamily long int} (rather than {\ttfamily int}, for integer type conversions), or a pointer to {\ttfamily double} (for floating point conversions),
\end{DoxyItemize}

In addition, a maximal field width may be specified as a nonzero positive decimal integer, which will restrict the conversion to at most this many characters from the input stream. This field width is limited to at most 255 characters which is also the default value (except for the {\ttfamily c} conversion that defaults to 1).

The following conversion flags are supported\+:


\begin{DoxyItemize}
\item {\ttfamily \%} Matches a literal {\ttfamily \%} character. This is not a conversion.
\item {\ttfamily d} Matches an optionally signed decimal integer; the next pointer must be a pointer to {\ttfamily int}.
\item {\ttfamily i} Matches an optionally signed integer; the next pointer must be a pointer to {\ttfamily int}. The integer is read in base 16 if it begins with {\bfseries{0x}} or {\bfseries{0X}}, in base 8 if it begins with {\bfseries{0}}, and in base 10 otherwise. Only characters that correspond to the base are used.
\item {\ttfamily o} Matches an octal integer; the next pointer must be a pointer to {\ttfamily unsigned int}.
\item {\ttfamily u} Matches an optionally signed decimal integer; the next pointer must be a pointer to {\ttfamily unsigned int}.
\item {\ttfamily x} Matches an optionally signed hexadecimal integer; the next pointer must be a pointer to {\ttfamily unsigned int}.
\item {\ttfamily f} Matches an optionally signed floating-\/point number; the next pointer must be a pointer to {\ttfamily float}.
\item {\ttfamily e, g, F, E, G} Equivalent to {\ttfamily f}.
\item {\ttfamily s} Matches a sequence of non-\/white-\/space characters; the next pointer must be a pointer to {\ttfamily char}, and the array must be large enough to accept all the sequence and the terminating {\ttfamily N\+UL} character. The input string stops at white space or at the maximum field width, whichever occurs first.
\item {\ttfamily c} Matches a sequence of width count characters (default 1); the next pointer must be a pointer to {\ttfamily char}, and there must be enough room for all the characters (no terminating {\ttfamily N\+UL} is added). The usual skip of leading white space is suppressed. To skip white space first, use an explicit space in the format.
\item {\ttfamily }\mbox{[} Matches a nonempty sequence of characters from the specified set of accepted characters; the next pointer must be a pointer to {\ttfamily char}, and there must be enough room for all the characters in the string, plus a terminating {\ttfamily N\+UL} character. The usual skip of leading white space is suppressed. The string is to be made up of characters in (or not in) a particular set; the set is defined by the characters between the open bracket {\ttfamily }\mbox{[} character and a close bracket {\ttfamily }\mbox{]} character. The set excludes those characters if the first character after the open bracket is a circumflex {\ttfamily $^\wedge$}. To include a close bracket in the set, make it the first character after the open bracket or the circumflex; any other position will end the set. The hyphen character {\ttfamily -\/} is also special; when placed between two other characters, it adds all intervening characters to the set. To include a hyphen, make it the last character before the final close bracket. For instance, {\ttfamily \mbox{[}$^\wedge$\mbox{]}0-\/9-\/\mbox{]}} means the set of {\itshape everything except close bracket, zero through nine, and hyphen}. The string ends with the appearance of a character not in the (or, with a circumflex, in) set or when the field width runs out. Note that usage of this conversion enlarges the stack expense.
\item {\ttfamily p} Matches a pointer value (as printed by {\ttfamily p} in \mbox{\hyperlink{stdio_8h_a4c04da4953607fa5fa4d3908fecde449}{printf()}}); the next pointer must be a pointer to {\ttfamily void}.
\item {\ttfamily n} Nothing is expected; instead, the number of characters consumed thus far from the input is stored through the next pointer, which must be a pointer to {\ttfamily int}. This is not a conversion, although it can be suppressed with the {\ttfamily $\ast$} flag.

These functions return the number of input items assigned, which can be fewer than provided for, or even zero, in the event of a matching failure. Zero indicates that, while there was input available, no conversions were assigned; typically this is due to an invalid input character, such as an alphabetic character for a {\ttfamily d} conversion. The value {\ttfamily E\+OF} is returned if an input failure occurs before any conversion such as an end-\/of-\/file occurs. If an error or end-\/of-\/file occurs after conversion has begun, the number of conversions which were successfully completed is returned.

By default, all the conversions described above are available except the floating-\/point conversions and the width is limited to 255 characters. The float-\/point conversion will be available in the extended version provided by the library {\ttfamily libscanf\+\_\+flt.\+a}. Also in this case the width is not limited (exactly, it is limited to 65535 characters). To link a program against the extended version, use the following compiler flags in the link stage\+:
\end{DoxyItemize}


\begin{DoxyCode}{0}
\DoxyCodeLine{-\/Wl,-\/u,\mbox{\hyperlink{stdio_8h_a67bae1ad3af79809fd770be392f90e21}{vfscanf}} -\/lscanf\_flt -\/lm}
\end{DoxyCode}


A third version is available for environments that are tight on space. In addition to the restrictions of the standard one, this version implements no {\ttfamily \%\mbox{[}} specification. This version is provided in the library {\ttfamily libscanf\+\_\+min.\+a}, and can be requested using the following options in the link stage\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{-\/Wl,-\/u,\mbox{\hyperlink{stdio_8h_a67bae1ad3af79809fd770be392f90e21}{vfscanf}} -\/lscanf\_min -\/lm}
\end{DoxyCode}
 \mbox{\Hypertarget{stdio_8h_a6c6b5b881ce8f4739777ff3a615e988a}\label{stdio_8h_a6c6b5b881ce8f4739777ff3a615e988a}} 
\index{stdio.h@{stdio.h}!vfscanf\_P@{vfscanf\_P}}
\index{vfscanf\_P@{vfscanf\_P}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{vfscanf\_P()}{vfscanf\_P()}}
{\footnotesize\ttfamily int vfscanf\+\_\+P (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{stdio_8h_aed4dabeb9f7c518ded42f930a04abce8}{F\+I\+LE}} $\ast$}]{\+\_\+\+\_\+stream,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{va\+\_\+list}]{\+\_\+\+\_\+ap }\end{DoxyParamCaption})}

Variant of \mbox{\hyperlink{stdio_8h_a67bae1ad3af79809fd770be392f90e21}{vfscanf()}} using a {\ttfamily fmt} string in program memory. \mbox{\Hypertarget{stdio_8h_a0b15be24dd9db93355e1f62937fdfd9a}\label{stdio_8h_a0b15be24dd9db93355e1f62937fdfd9a}} 
\index{stdio.h@{stdio.h}!vprintf@{vprintf}}
\index{vprintf@{vprintf}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{vprintf()}{vprintf()}}
{\footnotesize\ttfamily int vprintf (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{va\+\_\+list}]{\+\_\+\+\_\+ap }\end{DoxyParamCaption})}

The function {\ttfamily vprintf} performs formatted output to stream {\ttfamily stdout}, taking a variable argument list as in \mbox{\hyperlink{stdio_8h_aa3b98c0d17b35642c0f3e4649092b9f1}{vfprintf()}}.

See \mbox{\hyperlink{stdio_8h_aa3b98c0d17b35642c0f3e4649092b9f1}{vfprintf()}} for details. \mbox{\Hypertarget{stdio_8h_a8bd4b760f67791a54e73111734caa82f}\label{stdio_8h_a8bd4b760f67791a54e73111734caa82f}} 
\index{stdio.h@{stdio.h}!vscanf@{vscanf}}
\index{vscanf@{vscanf}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{vscanf()}{vscanf()}}
{\footnotesize\ttfamily int vscanf (\begin{DoxyParamCaption}\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{va\+\_\+list}]{\+\_\+\+\_\+ap }\end{DoxyParamCaption})}

The function {\ttfamily vscanf} performs formatted input from stream {\ttfamily stdin}, taking a variable argument list as in \mbox{\hyperlink{stdio_8h_a67bae1ad3af79809fd770be392f90e21}{vfscanf()}}.

See \mbox{\hyperlink{stdio_8h_a67bae1ad3af79809fd770be392f90e21}{vfscanf()}} for details. \mbox{\Hypertarget{stdio_8h_ac92e8c42a044c8f50aad5c2c69e638e0}\label{stdio_8h_ac92e8c42a044c8f50aad5c2c69e638e0}} 
\index{stdio.h@{stdio.h}!vsnprintf@{vsnprintf}}
\index{vsnprintf@{vsnprintf}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{vsnprintf()}{vsnprintf()}}
{\footnotesize\ttfamily int vsnprintf (\begin{DoxyParamCaption}\item[{char $\ast$}]{\+\_\+\+\_\+s,  }\item[{size\+\_\+t}]{\+\_\+\+\_\+n,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{va\+\_\+list}]{ap }\end{DoxyParamCaption})}

Like {\ttfamily \mbox{\hyperlink{stdio_8h_aaeb1bbe21a1b9b50b207ab059a67993f}{vsprintf()}}}, but instead of assuming {\ttfamily s} to be of infinite size, no more than {\ttfamily n} characters (including the trailing N\+UL character) will be converted to {\ttfamily s}.

Returns the number of characters that would have been written to {\ttfamily s} if there were enough space. \mbox{\Hypertarget{stdio_8h_a2071feb5c92bf50a6bd508a07ead9515}\label{stdio_8h_a2071feb5c92bf50a6bd508a07ead9515}} 
\index{stdio.h@{stdio.h}!vsnprintf\_P@{vsnprintf\_P}}
\index{vsnprintf\_P@{vsnprintf\_P}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{vsnprintf\_P()}{vsnprintf\_P()}}
{\footnotesize\ttfamily int vsnprintf\+\_\+P (\begin{DoxyParamCaption}\item[{char $\ast$}]{\+\_\+\+\_\+s,  }\item[{size\+\_\+t}]{\+\_\+\+\_\+n,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{va\+\_\+list}]{ap }\end{DoxyParamCaption})}

Variant of {\ttfamily \mbox{\hyperlink{stdio_8h_ac92e8c42a044c8f50aad5c2c69e638e0}{vsnprintf()}}} that uses a {\ttfamily fmt} string that resides in program memory. \mbox{\Hypertarget{stdio_8h_aaeb1bbe21a1b9b50b207ab059a67993f}\label{stdio_8h_aaeb1bbe21a1b9b50b207ab059a67993f}} 
\index{stdio.h@{stdio.h}!vsprintf@{vsprintf}}
\index{vsprintf@{vsprintf}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{vsprintf()}{vsprintf()}}
{\footnotesize\ttfamily int vsprintf (\begin{DoxyParamCaption}\item[{char $\ast$}]{\+\_\+\+\_\+s,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{va\+\_\+list}]{ap }\end{DoxyParamCaption})}

Like {\ttfamily \mbox{\hyperlink{stdio_8h_a6017094d9fd800fa02600d35399f2a2a}{sprintf()}}} but takes a variable argument list for the arguments. \mbox{\Hypertarget{stdio_8h_af47f5141509d1e434f9da2b27287a707}\label{stdio_8h_af47f5141509d1e434f9da2b27287a707}} 
\index{stdio.h@{stdio.h}!vsprintf\_P@{vsprintf\_P}}
\index{vsprintf\_P@{vsprintf\_P}!stdio.h@{stdio.h}}
\doxyparagraph{\texorpdfstring{vsprintf\_P()}{vsprintf\_P()}}
{\footnotesize\ttfamily int vsprintf\+\_\+P (\begin{DoxyParamCaption}\item[{char $\ast$}]{\+\_\+\+\_\+s,  }\item[{const char $\ast$}]{\+\_\+\+\_\+fmt,  }\item[{va\+\_\+list}]{ap }\end{DoxyParamCaption})}

Variant of {\ttfamily \mbox{\hyperlink{stdio_8h_aaeb1bbe21a1b9b50b207ab059a67993f}{vsprintf()}}} that uses a {\ttfamily fmt} string that resides in program memory. 