\hypertarget{liolib_8c}{
\section{liolib.c File Reference}
\label{liolib_8c}\index{liolib.c@{liolib.c}}
}
{\tt \#include $<$errno.h$>$}\par
{\tt \#include $<$stdio.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$string.h$>$}\par
{\tt \#include \char`\"{}lua.h\char`\"{}}\par
{\tt \#include \char`\"{}lauxlib.h\char`\"{}}\par
{\tt \#include \char`\"{}lualib.h\char`\"{}}\par
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define \hyperlink{liolib_8c_4fa96ecbbecfabf0003fa4163c5029e0}{liolib\_\-c}
\item 
\#define \hyperlink{liolib_8c_884b19ad6094d6238c4072a8064aeb12}{LUA\_\-LIB}
\item 
\#define \hyperlink{liolib_8c_3c1a27aacf1dd33edffa2422da638d0f}{IO\_\-INPUT}~1
\item 
\#define \hyperlink{liolib_8c_ae48313230e7f773bf495ada1171c506}{IO\_\-OUTPUT}~2
\item 
\#define \hyperlink{liolib_8c_9112c0a9eb8ce7bb74c43a60178f7fb6}{tofilep}(\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})~((FILE $\ast$$\ast$)luaL\_\-checkudata(\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, 1, LUA\_\-FILEHANDLE))
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static int \hyperlink{liolib_8c_d427e878d7d45afdcf5a98f5819ca564}{pushresult} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, int i, const char $\ast$filename)
\item 
static void \hyperlink{liolib_8c_8a72958ff3c7fa4721d4ca4e58c8f6c6}{fileerror} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, int arg, const char $\ast$filename)
\item 
static int \hyperlink{liolib_8c_2bd80ae170dce6c29d385b71398fd7c2}{io\_\-type} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static FILE $\ast$ \hyperlink{liolib_8c_3a596f9304846a90435b75c75c55acda}{tofile} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static FILE $\ast$$\ast$ \hyperlink{liolib_8c_98196b4c49ff2e9bbca69e2f99244599}{newfile} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_7b8451d8d8fcbbe8f259375da540d12f}{io\_\-noclose} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_c885ae15fd14fc88058b0b8c1cf2b1d9}{io\_\-pclose} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_693d26c59aa9f6a298ac288cb1a5c38d}{io\_\-fclose} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_17cd174f91e6d1fdf0de674448dc84f2}{aux\_\-close} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_1c6f8e04184b0f7939e45e24d2d7ef8a}{io\_\-close} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_ae9544c5f34e0dd673ba732e10b82d7d}{io\_\-gc} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_a30f4781b97e650e39d5a19bdbc4f49f}{io\_\-tostring} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_b4a969d43dbe0f89e98307e5b421f8a7}{io\_\-open} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_8cc0b2b08409fb97e5cc80a0caf9b5fd}{io\_\-popen} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_0347de9dda8be02044075c96482eddb3}{io\_\-tmpfile} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static FILE $\ast$ \hyperlink{liolib_8c_acd3015d8e9383b15ed899e99edf37c9}{getiofile} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, int findex)
\item 
static int \hyperlink{liolib_8c_d24c42234b91fa47a0fea46ba68e5109}{g\_\-iofile} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, int f, const char $\ast$mode)
\item 
static int \hyperlink{liolib_8c_827044fde6f2c21ab965ba3d729f6a0f}{io\_\-input} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_4464f89f0151ad432557b0a51258582c}{io\_\-output} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_c37d80ee2cc364b4adafcb6f7c20f28b}{io\_\-readline} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static void \hyperlink{liolib_8c_fd8108928fb92601a6dffdd7654602b9}{aux\_\-lines} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, int idx, int toclose)
\item 
static int \hyperlink{liolib_8c_6a36f72d8b3966c1ebafab8a4791cb6c}{f\_\-lines} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_b08031b51605d4ef676ec33a3b96a286}{io\_\-lines} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_5345908bf60e4bd37d768b052ac26ec7}{read\_\-number} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, FILE $\ast$f)
\item 
static int \hyperlink{liolib_8c_ce61fce0bdea311d6d7c2206881165c7}{test\_\-eof} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, FILE $\ast$f)
\item 
static int \hyperlink{liolib_8c_282c618ca6fa98405c89edc59d96157b}{read\_\-line} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, FILE $\ast$f)
\item 
static int \hyperlink{liolib_8c_6735c0513432f83bfa1b88b056ab379b}{read\_\-chars} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, FILE $\ast$f, size\_\-t n)
\item 
static int \hyperlink{liolib_8c_ddece2406777a40f0f591e3518293932}{g\_\-read} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, FILE $\ast$f, int first)
\item 
static int \hyperlink{liolib_8c_45307aa59a628966c6ea270e9b476d9a}{io\_\-read} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_dd5250a74576076467531e4eb8f5f68e}{f\_\-read} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_88c73a30c7d135dfb4958b7bfaa90cc7}{g\_\-write} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, FILE $\ast$f, int arg)
\item 
static int \hyperlink{liolib_8c_da35daf906cc262cc6944cad92b93ac3}{io\_\-write} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_dba67ef94aaa532d9224ca04f8126ac2}{f\_\-write} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_ce5e1a23cc9e2ffe7ae6cc523e54de73}{f\_\-seek} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_a7d559e7d43a6133ec495d6b4e5d68f2}{f\_\-setvbuf} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_2f93672e01db50e1e5361f5f01c71bd6}{io\_\-flush} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static int \hyperlink{liolib_8c_d45f522bd561c05889799a66d9ffdb33}{f\_\-flush} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static void \hyperlink{liolib_8c_2edb7e84ca2f51dafb5d77b9c81a804c}{createmeta} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\item 
static void \hyperlink{liolib_8c_356d1d6fd01a7ea96e63a516c858403a}{createstdfile} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, FILE $\ast$f, int k, const char $\ast$fname)
\item 
static void \hyperlink{liolib_8c_7522ae5361d8648ff6eecf0de3355c0c}{newfenv} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L}, \hyperlink{lua_8h_5f5bedea265eccf43c6e404e020988ce}{lua\_\-CFunction} cls)
\item 
LUALIB\_\-API int \hyperlink{liolib_8c_c0974dc739be76930e3528a0ad373b22}{luaopen\_\-io} (\hyperlink{structlua__State}{lua\_\-State} $\ast$\hyperlink{main_8c_62f94dfc0036bec0c14106c2f15caf3e}{L})
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
static const char $\ast$const \hyperlink{liolib_8c_5fd0b55ec7486b490e93e5a8a8c874e7}{fnames} \mbox{[}$\,$\mbox{]} = \{\char`\"{}input\char`\"{}, \char`\"{}\hyperlink{luac_8c_5a832fe6e2412dfabb93a2adae30e745}{output}\char`\"{}\}
\item 
static const \hyperlink{structluaL__Reg}{luaL\_\-Reg} \hyperlink{liolib_8c_8fe96dd62a007daad3a18e43dd136a29}{iolib} \mbox{[}$\,$\mbox{]}
\item 
static const \hyperlink{structluaL__Reg}{luaL\_\-Reg} \hyperlink{liolib_8c_7d119aba2782fead6c3dbbe2a9bd514c}{flib} \mbox{[}$\,$\mbox{]}
\end{CompactItemize}


\subsection{Define Documentation}
\hypertarget{liolib_8c_3c1a27aacf1dd33edffa2422da638d0f}{
\index{liolib.c@{liolib.c}!IO\_\-INPUT@{IO\_\-INPUT}}
\index{IO\_\-INPUT@{IO\_\-INPUT}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define IO\_\-INPUT~1}}
\label{liolib_8c_3c1a27aacf1dd33edffa2422da638d0f}


\hypertarget{liolib_8c_ae48313230e7f773bf495ada1171c506}{
\index{liolib.c@{liolib.c}!IO\_\-OUTPUT@{IO\_\-OUTPUT}}
\index{IO\_\-OUTPUT@{IO\_\-OUTPUT}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define IO\_\-OUTPUT~2}}
\label{liolib_8c_ae48313230e7f773bf495ada1171c506}


\hypertarget{liolib_8c_4fa96ecbbecfabf0003fa4163c5029e0}{
\index{liolib.c@{liolib.c}!liolib\_\-c@{liolib\_\-c}}
\index{liolib\_\-c@{liolib\_\-c}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define liolib\_\-c}}
\label{liolib_8c_4fa96ecbbecfabf0003fa4163c5029e0}


\hypertarget{liolib_8c_884b19ad6094d6238c4072a8064aeb12}{
\index{liolib.c@{liolib.c}!LUA\_\-LIB@{LUA\_\-LIB}}
\index{LUA\_\-LIB@{LUA\_\-LIB}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define LUA\_\-LIB}}
\label{liolib_8c_884b19ad6094d6238c4072a8064aeb12}


\hypertarget{liolib_8c_9112c0a9eb8ce7bb74c43a60178f7fb6}{
\index{liolib.c@{liolib.c}!tofilep@{tofilep}}
\index{tofilep@{tofilep}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define tofilep({\bf L})~((FILE $\ast$$\ast$)luaL\_\-checkudata({\bf L}, 1, LUA\_\-FILEHANDLE))}}
\label{liolib_8c_9112c0a9eb8ce7bb74c43a60178f7fb6}




\subsection{Function Documentation}
\hypertarget{liolib_8c_17cd174f91e6d1fdf0de674448dc84f2}{
\index{liolib.c@{liolib.c}!aux\_\-close@{aux\_\-close}}
\index{aux\_\-close@{aux\_\-close}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int aux\_\-close ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_17cd174f91e6d1fdf0de674448dc84f2}


\hypertarget{liolib_8c_fd8108928fb92601a6dffdd7654602b9}{
\index{liolib.c@{liolib.c}!aux\_\-lines@{aux\_\-lines}}
\index{aux\_\-lines@{aux\_\-lines}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void aux\_\-lines ({\bf lua\_\-State} $\ast$ {\em L}, \/  int {\em idx}, \/  int {\em toclose})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_fd8108928fb92601a6dffdd7654602b9}


\hypertarget{liolib_8c_2edb7e84ca2f51dafb5d77b9c81a804c}{
\index{liolib.c@{liolib.c}!createmeta@{createmeta}}
\index{createmeta@{createmeta}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void createmeta ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_2edb7e84ca2f51dafb5d77b9c81a804c}


\hypertarget{liolib_8c_356d1d6fd01a7ea96e63a516c858403a}{
\index{liolib.c@{liolib.c}!createstdfile@{createstdfile}}
\index{createstdfile@{createstdfile}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void createstdfile ({\bf lua\_\-State} $\ast$ {\em L}, \/  FILE $\ast$ {\em f}, \/  int {\em k}, \/  const char $\ast$ {\em fname})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_356d1d6fd01a7ea96e63a516c858403a}


\hypertarget{liolib_8c_d45f522bd561c05889799a66d9ffdb33}{
\index{liolib.c@{liolib.c}!f\_\-flush@{f\_\-flush}}
\index{f\_\-flush@{f\_\-flush}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int f\_\-flush ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_d45f522bd561c05889799a66d9ffdb33}


\hypertarget{liolib_8c_6a36f72d8b3966c1ebafab8a4791cb6c}{
\index{liolib.c@{liolib.c}!f\_\-lines@{f\_\-lines}}
\index{f\_\-lines@{f\_\-lines}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int f\_\-lines ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_6a36f72d8b3966c1ebafab8a4791cb6c}


\hypertarget{liolib_8c_dd5250a74576076467531e4eb8f5f68e}{
\index{liolib.c@{liolib.c}!f\_\-read@{f\_\-read}}
\index{f\_\-read@{f\_\-read}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int f\_\-read ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_dd5250a74576076467531e4eb8f5f68e}


\hypertarget{liolib_8c_ce5e1a23cc9e2ffe7ae6cc523e54de73}{
\index{liolib.c@{liolib.c}!f\_\-seek@{f\_\-seek}}
\index{f\_\-seek@{f\_\-seek}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int f\_\-seek ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_ce5e1a23cc9e2ffe7ae6cc523e54de73}


\hypertarget{liolib_8c_a7d559e7d43a6133ec495d6b4e5d68f2}{
\index{liolib.c@{liolib.c}!f\_\-setvbuf@{f\_\-setvbuf}}
\index{f\_\-setvbuf@{f\_\-setvbuf}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int f\_\-setvbuf ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_a7d559e7d43a6133ec495d6b4e5d68f2}


\hypertarget{liolib_8c_dba67ef94aaa532d9224ca04f8126ac2}{
\index{liolib.c@{liolib.c}!f\_\-write@{f\_\-write}}
\index{f\_\-write@{f\_\-write}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int f\_\-write ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_dba67ef94aaa532d9224ca04f8126ac2}


\hypertarget{liolib_8c_8a72958ff3c7fa4721d4ca4e58c8f6c6}{
\index{liolib.c@{liolib.c}!fileerror@{fileerror}}
\index{fileerror@{fileerror}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void fileerror ({\bf lua\_\-State} $\ast$ {\em L}, \/  int {\em arg}, \/  const char $\ast$ {\em filename})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_8a72958ff3c7fa4721d4ca4e58c8f6c6}


\hypertarget{liolib_8c_d24c42234b91fa47a0fea46ba68e5109}{
\index{liolib.c@{liolib.c}!g\_\-iofile@{g\_\-iofile}}
\index{g\_\-iofile@{g\_\-iofile}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int g\_\-iofile ({\bf lua\_\-State} $\ast$ {\em L}, \/  int {\em f}, \/  const char $\ast$ {\em mode})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_d24c42234b91fa47a0fea46ba68e5109}


\hypertarget{liolib_8c_ddece2406777a40f0f591e3518293932}{
\index{liolib.c@{liolib.c}!g\_\-read@{g\_\-read}}
\index{g\_\-read@{g\_\-read}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int g\_\-read ({\bf lua\_\-State} $\ast$ {\em L}, \/  FILE $\ast$ {\em f}, \/  int {\em first})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_ddece2406777a40f0f591e3518293932}


\hypertarget{liolib_8c_88c73a30c7d135dfb4958b7bfaa90cc7}{
\index{liolib.c@{liolib.c}!g\_\-write@{g\_\-write}}
\index{g\_\-write@{g\_\-write}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int g\_\-write ({\bf lua\_\-State} $\ast$ {\em L}, \/  FILE $\ast$ {\em f}, \/  int {\em arg})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_88c73a30c7d135dfb4958b7bfaa90cc7}


\hypertarget{liolib_8c_acd3015d8e9383b15ed899e99edf37c9}{
\index{liolib.c@{liolib.c}!getiofile@{getiofile}}
\index{getiofile@{getiofile}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static FILE$\ast$ getiofile ({\bf lua\_\-State} $\ast$ {\em L}, \/  int {\em findex})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_acd3015d8e9383b15ed899e99edf37c9}


\hypertarget{liolib_8c_1c6f8e04184b0f7939e45e24d2d7ef8a}{
\index{liolib.c@{liolib.c}!io\_\-close@{io\_\-close}}
\index{io\_\-close@{io\_\-close}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-close ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_1c6f8e04184b0f7939e45e24d2d7ef8a}


\hypertarget{liolib_8c_693d26c59aa9f6a298ac288cb1a5c38d}{
\index{liolib.c@{liolib.c}!io\_\-fclose@{io\_\-fclose}}
\index{io\_\-fclose@{io\_\-fclose}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-fclose ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_693d26c59aa9f6a298ac288cb1a5c38d}


\hypertarget{liolib_8c_2f93672e01db50e1e5361f5f01c71bd6}{
\index{liolib.c@{liolib.c}!io\_\-flush@{io\_\-flush}}
\index{io\_\-flush@{io\_\-flush}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-flush ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_2f93672e01db50e1e5361f5f01c71bd6}


\hypertarget{liolib_8c_ae9544c5f34e0dd673ba732e10b82d7d}{
\index{liolib.c@{liolib.c}!io\_\-gc@{io\_\-gc}}
\index{io\_\-gc@{io\_\-gc}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-gc ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_ae9544c5f34e0dd673ba732e10b82d7d}


\hypertarget{liolib_8c_827044fde6f2c21ab965ba3d729f6a0f}{
\index{liolib.c@{liolib.c}!io\_\-input@{io\_\-input}}
\index{io\_\-input@{io\_\-input}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-input ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_827044fde6f2c21ab965ba3d729f6a0f}


\hypertarget{liolib_8c_b08031b51605d4ef676ec33a3b96a286}{
\index{liolib.c@{liolib.c}!io\_\-lines@{io\_\-lines}}
\index{io\_\-lines@{io\_\-lines}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-lines ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_b08031b51605d4ef676ec33a3b96a286}


\hypertarget{liolib_8c_7b8451d8d8fcbbe8f259375da540d12f}{
\index{liolib.c@{liolib.c}!io\_\-noclose@{io\_\-noclose}}
\index{io\_\-noclose@{io\_\-noclose}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-noclose ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_7b8451d8d8fcbbe8f259375da540d12f}


\hypertarget{liolib_8c_b4a969d43dbe0f89e98307e5b421f8a7}{
\index{liolib.c@{liolib.c}!io\_\-open@{io\_\-open}}
\index{io\_\-open@{io\_\-open}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-open ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_b4a969d43dbe0f89e98307e5b421f8a7}


\hypertarget{liolib_8c_4464f89f0151ad432557b0a51258582c}{
\index{liolib.c@{liolib.c}!io\_\-output@{io\_\-output}}
\index{io\_\-output@{io\_\-output}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-output ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_4464f89f0151ad432557b0a51258582c}


\hypertarget{liolib_8c_c885ae15fd14fc88058b0b8c1cf2b1d9}{
\index{liolib.c@{liolib.c}!io\_\-pclose@{io\_\-pclose}}
\index{io\_\-pclose@{io\_\-pclose}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-pclose ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_c885ae15fd14fc88058b0b8c1cf2b1d9}


\hypertarget{liolib_8c_8cc0b2b08409fb97e5cc80a0caf9b5fd}{
\index{liolib.c@{liolib.c}!io\_\-popen@{io\_\-popen}}
\index{io\_\-popen@{io\_\-popen}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-popen ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_8cc0b2b08409fb97e5cc80a0caf9b5fd}


\hypertarget{liolib_8c_45307aa59a628966c6ea270e9b476d9a}{
\index{liolib.c@{liolib.c}!io\_\-read@{io\_\-read}}
\index{io\_\-read@{io\_\-read}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-read ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_45307aa59a628966c6ea270e9b476d9a}


\hypertarget{liolib_8c_c37d80ee2cc364b4adafcb6f7c20f28b}{
\index{liolib.c@{liolib.c}!io\_\-readline@{io\_\-readline}}
\index{io\_\-readline@{io\_\-readline}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-readline ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_c37d80ee2cc364b4adafcb6f7c20f28b}


\hypertarget{liolib_8c_0347de9dda8be02044075c96482eddb3}{
\index{liolib.c@{liolib.c}!io\_\-tmpfile@{io\_\-tmpfile}}
\index{io\_\-tmpfile@{io\_\-tmpfile}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-tmpfile ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_0347de9dda8be02044075c96482eddb3}


\hypertarget{liolib_8c_a30f4781b97e650e39d5a19bdbc4f49f}{
\index{liolib.c@{liolib.c}!io\_\-tostring@{io\_\-tostring}}
\index{io\_\-tostring@{io\_\-tostring}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-tostring ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_a30f4781b97e650e39d5a19bdbc4f49f}


\hypertarget{liolib_8c_2bd80ae170dce6c29d385b71398fd7c2}{
\index{liolib.c@{liolib.c}!io\_\-type@{io\_\-type}}
\index{io\_\-type@{io\_\-type}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-type ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_2bd80ae170dce6c29d385b71398fd7c2}


\hypertarget{liolib_8c_da35daf906cc262cc6944cad92b93ac3}{
\index{liolib.c@{liolib.c}!io\_\-write@{io\_\-write}}
\index{io\_\-write@{io\_\-write}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int io\_\-write ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_da35daf906cc262cc6944cad92b93ac3}


\hypertarget{liolib_8c_c0974dc739be76930e3528a0ad373b22}{
\index{liolib.c@{liolib.c}!luaopen\_\-io@{luaopen\_\-io}}
\index{luaopen\_\-io@{luaopen\_\-io}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}LUALIB\_\-API int luaopen\_\-io ({\bf lua\_\-State} $\ast$ {\em L})}}
\label{liolib_8c_c0974dc739be76930e3528a0ad373b22}


\hypertarget{liolib_8c_7522ae5361d8648ff6eecf0de3355c0c}{
\index{liolib.c@{liolib.c}!newfenv@{newfenv}}
\index{newfenv@{newfenv}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void newfenv ({\bf lua\_\-State} $\ast$ {\em L}, \/  {\bf lua\_\-CFunction} {\em cls})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_7522ae5361d8648ff6eecf0de3355c0c}


\hypertarget{liolib_8c_98196b4c49ff2e9bbca69e2f99244599}{
\index{liolib.c@{liolib.c}!newfile@{newfile}}
\index{newfile@{newfile}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static FILE$\ast$$\ast$ newfile ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_98196b4c49ff2e9bbca69e2f99244599}


\hypertarget{liolib_8c_d427e878d7d45afdcf5a98f5819ca564}{
\index{liolib.c@{liolib.c}!pushresult@{pushresult}}
\index{pushresult@{pushresult}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int pushresult ({\bf lua\_\-State} $\ast$ {\em L}, \/  int {\em i}, \/  const char $\ast$ {\em filename})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_d427e878d7d45afdcf5a98f5819ca564}


\hypertarget{liolib_8c_6735c0513432f83bfa1b88b056ab379b}{
\index{liolib.c@{liolib.c}!read\_\-chars@{read\_\-chars}}
\index{read\_\-chars@{read\_\-chars}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int read\_\-chars ({\bf lua\_\-State} $\ast$ {\em L}, \/  FILE $\ast$ {\em f}, \/  size\_\-t {\em n})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_6735c0513432f83bfa1b88b056ab379b}


\hypertarget{liolib_8c_282c618ca6fa98405c89edc59d96157b}{
\index{liolib.c@{liolib.c}!read\_\-line@{read\_\-line}}
\index{read\_\-line@{read\_\-line}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int read\_\-line ({\bf lua\_\-State} $\ast$ {\em L}, \/  FILE $\ast$ {\em f})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_282c618ca6fa98405c89edc59d96157b}


\hypertarget{liolib_8c_5345908bf60e4bd37d768b052ac26ec7}{
\index{liolib.c@{liolib.c}!read\_\-number@{read\_\-number}}
\index{read\_\-number@{read\_\-number}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int read\_\-number ({\bf lua\_\-State} $\ast$ {\em L}, \/  FILE $\ast$ {\em f})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_5345908bf60e4bd37d768b052ac26ec7}


\hypertarget{liolib_8c_ce61fce0bdea311d6d7c2206881165c7}{
\index{liolib.c@{liolib.c}!test\_\-eof@{test\_\-eof}}
\index{test\_\-eof@{test\_\-eof}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static int test\_\-eof ({\bf lua\_\-State} $\ast$ {\em L}, \/  FILE $\ast$ {\em f})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_ce61fce0bdea311d6d7c2206881165c7}


\hypertarget{liolib_8c_3a596f9304846a90435b75c75c55acda}{
\index{liolib.c@{liolib.c}!tofile@{tofile}}
\index{tofile@{tofile}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static FILE$\ast$ tofile ({\bf lua\_\-State} $\ast$ {\em L})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_3a596f9304846a90435b75c75c55acda}




\subsection{Variable Documentation}
\hypertarget{liolib_8c_7d119aba2782fead6c3dbbe2a9bd514c}{
\index{liolib.c@{liolib.c}!flib@{flib}}
\index{flib@{flib}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf luaL\_\-Reg} {\bf flib}\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_7d119aba2782fead6c3dbbe2a9bd514c}


\textbf{Initial value:}

\begin{Code}\begin{verbatim} {
  {"close", io_close},
  {"flush", f_flush},
  {"lines", f_lines},
  {"read", f_read},
  {"seek", f_seek},
  {"setvbuf", f_setvbuf},
  {"write", f_write},
  {"__gc", io_gc},
  {"__tostring", io_tostring},
  {NULL, NULL}
}
\end{verbatim}
\end{Code}
\hypertarget{liolib_8c_5fd0b55ec7486b490e93e5a8a8c874e7}{
\index{liolib.c@{liolib.c}!fnames@{fnames}}
\index{fnames@{fnames}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ const {\bf fnames}\mbox{[}$\,$\mbox{]} = \{\char`\"{}input\char`\"{}, \char`\"{}{\bf output}\char`\"{}\}\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_5fd0b55ec7486b490e93e5a8a8c874e7}


\hypertarget{liolib_8c_8fe96dd62a007daad3a18e43dd136a29}{
\index{liolib.c@{liolib.c}!iolib@{iolib}}
\index{iolib@{iolib}!liolib.c@{liolib.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf luaL\_\-Reg} {\bf iolib}\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{liolib_8c_8fe96dd62a007daad3a18e43dd136a29}


\textbf{Initial value:}

\begin{Code}\begin{verbatim} {
  {"close", io_close},
  {"flush", io_flush},
  {"input", io_input},
  {"lines", io_lines},
  {"open", io_open},
  {"output", io_output},
  {"popen", io_popen},
  {"read", io_read},
  {"tmpfile", io_tmpfile},
  {"type", io_type},
  {"write", io_write},
  {NULL, NULL}
}
\end{verbatim}
\end{Code}
