\doxysection{workspace/post-\/scarcity/src/io/io.h File Reference}
\hypertarget{io_8h}{}\label{io_8h}\index{workspace/post-\/scarcity/src/io/io.h@{workspace/post-\/scarcity/src/io/io.h}}
{\ttfamily \#include $<$curl/curl.\+h$>$}\newline
{\ttfamily \#include "{}memory/consspaceobject.\+h"{}}\newline
Include dependency graph for io.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{io_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{io_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{io_8h_a1a6e0422d8cbefa27c3ff7b3fafeada3}{C\+\_\+\+IO\+\_\+\+IN}}~L"{}\texorpdfstring{$\ast$}{*}in\texorpdfstring{$\ast$}{*}"{}
\item 
\#define \mbox{\hyperlink{io_8h_ae593d1a3bcfcd4b0db87cb0f87a33dea}{C\+\_\+\+IO\+\_\+\+OUT}}~L"{}\texorpdfstring{$\ast$}{*}out\texorpdfstring{$\ast$}{*}"{}
\end{DoxyCompactItemize}
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{fopen_8h_a8c81a077422f5e2410ba71eb75108f6e}{URL\+\_\+\+FILE}} \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{io_8h_a94886a863fdd18ea9e5559e4a70a5059}{file\+\_\+to\+\_\+url\+\_\+file}} (FILE \texorpdfstring{$\ast$}{*}f)
\begin{DoxyCompactList}\small\item\em given this file handle f, return a new url\+\_\+file handle wrapping it. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{io_8h_a9d614d1f21a42692f5dbab12757ec1be}{get\+\_\+default\+\_\+stream}} (bool inputp, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} env)
\begin{DoxyCompactList}\small\item\em Resutn the current default input, or of {\ttfamily inputp} is false, output stream from this {\ttfamily env}ironment. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{io_8h_a12ce98b64f2019ac45b44826a4db7ec9}{io\+\_\+init}} ()
\begin{DoxyCompactList}\small\item\em Initialise the I/O subsystem. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{io_8h_abb88a49fb6af67a8370bad809a47faf8}{lisp\+\_\+close}} (struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}frame, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} frame\+\_\+pointer, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} env)
\begin{DoxyCompactList}\small\item\em Function, sort-\/of\+: close the file indicated by my first arg, and return nil. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{io_8h_a44891c34d2c712e623d05df4d661a5aa}{lisp\+\_\+open}} (struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}frame, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} frame\+\_\+pointer, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} env)
\begin{DoxyCompactList}\small\item\em Function\+: return a stream open on the URL indicated by the first argument; if a second argument is present and is non-\/nil, open it for reading. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{io_8h_ac795341ab3355d1a89753166159bfa80}{lisp\+\_\+read\+\_\+char}} (struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}frame, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} frame\+\_\+pointer, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} env)
\begin{DoxyCompactList}\small\item\em Function\+: return the next character from the stream indicated by arg 0; further arguments are ignored. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{io_8h_a63d8ed9d6c6a5c00d9f62dbc7a24425c}{lisp\+\_\+slurp}} (struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}frame, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} frame\+\_\+pointer, struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} env)
\begin{DoxyCompactList}\small\item\em Function\+: return a string representing all characters from the stream indicated by arg 0; further arguments are ignored. \end{DoxyCompactList}\item 
char \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{io_8h_a7af48ce42d938915fd8e59aad5f566ee}{lisp\+\_\+string\+\_\+to\+\_\+c\+\_\+string}} (struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} s)
\begin{DoxyCompactList}\small\item\em Convert this lisp string-\/like-\/thing (also works for symbols, and, later keywords) into a UTF-\/8 string. \end{DoxyCompactList}\item 
wint\+\_\+t \mbox{\hyperlink{io_8h_a3be41e66bc649c81ff099e4be3e5b1a8}{url\+\_\+fgetwc}} (\mbox{\hyperlink{fopen_8h_a8c81a077422f5e2410ba71eb75108f6e}{URL\+\_\+\+FILE}} \texorpdfstring{$\ast$}{*}input)
\begin{DoxyCompactList}\small\item\em get one wide character from the buffer. \end{DoxyCompactList}\item 
wint\+\_\+t \mbox{\hyperlink{io_8h_a201e1590889d70033b6cae46f30ce6e0}{url\+\_\+ungetwc}} (wint\+\_\+t wc, \mbox{\hyperlink{fopen_8h_a8c81a077422f5e2410ba71eb75108f6e}{URL\+\_\+\+FILE}} \texorpdfstring{$\ast$}{*}input)
\end{DoxyCompactItemize}
\doxysubsubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
CURLSH \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{io_8h_ac40101a2ddb1b4aac9f2f722c84d16dd}{io\+\_\+share}}
\begin{DoxyCompactList}\small\item\em The sharing hub for all connections. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{io_8h_a21ef246a2e9023dab932aef9cf51ffcd}{lisp\+\_\+io\+\_\+in}}
\begin{DoxyCompactList}\small\item\em bound to the Lisp string representing C\+\_\+\+IO\+\_\+\+IN in initialisation. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} \mbox{\hyperlink{io_8h_a4ab3e001c63210ab136b954086f9bed0}{lisp\+\_\+io\+\_\+out}}
\begin{DoxyCompactList}\small\item\em bound to the Lisp string representing C\+\_\+\+IO\+\_\+\+OUT in initialisation. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\Hypertarget{io_8h_a1a6e0422d8cbefa27c3ff7b3fafeada3}\label{io_8h_a1a6e0422d8cbefa27c3ff7b3fafeada3} 
\index{io.h@{io.h}!C\_IO\_IN@{C\_IO\_IN}}
\index{C\_IO\_IN@{C\_IO\_IN}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{C\_IO\_IN}{C\_IO\_IN}}
{\footnotesize\ttfamily \#define C\+\_\+\+IO\+\_\+\+IN~L"{}\texorpdfstring{$\ast$}{*}in\texorpdfstring{$\ast$}{*}"{}}



Definition at line \mbox{\hyperlink{io_8h_source_l00020}{20}} of file \mbox{\hyperlink{io_8h_source}{io.\+h}}.

\Hypertarget{io_8h_ae593d1a3bcfcd4b0db87cb0f87a33dea}\label{io_8h_ae593d1a3bcfcd4b0db87cb0f87a33dea} 
\index{io.h@{io.h}!C\_IO\_OUT@{C\_IO\_OUT}}
\index{C\_IO\_OUT@{C\_IO\_OUT}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{C\_IO\_OUT}{C\_IO\_OUT}}
{\footnotesize\ttfamily \#define C\+\_\+\+IO\+\_\+\+OUT~L"{}\texorpdfstring{$\ast$}{*}out\texorpdfstring{$\ast$}{*}"{}}



Definition at line \mbox{\hyperlink{io_8h_source_l00021}{21}} of file \mbox{\hyperlink{io_8h_source}{io.\+h}}.



\doxysubsection{Function Documentation}
\Hypertarget{io_8h_a94886a863fdd18ea9e5559e4a70a5059}\label{io_8h_a94886a863fdd18ea9e5559e4a70a5059} 
\index{io.h@{io.h}!file\_to\_url\_file@{file\_to\_url\_file}}
\index{file\_to\_url\_file@{file\_to\_url\_file}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{file\_to\_url\_file()}{file\_to\_url\_file()}}
{\footnotesize\ttfamily \mbox{\hyperlink{fopen_8h_a8c81a077422f5e2410ba71eb75108f6e}{URL\+\_\+\+FILE}} \texorpdfstring{$\ast$}{*} file\+\_\+to\+\_\+url\+\_\+file (\begin{DoxyParamCaption}\item[{FILE \texorpdfstring{$\ast$}{*}}]{f }\end{DoxyParamCaption})}



given this file handle f, return a new url\+\_\+file handle wrapping it. 


\begin{DoxyParams}{Parameters}
{\em f} & the file to be wrapped; \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the new handle, or null if no such handle could be allocated. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{io_8c_source_l00134}{134}} of file \mbox{\hyperlink{io_8c_source}{io.\+c}}.



References \mbox{\hyperlink{fopen_8h_source_l00056}{CFTYPE\+\_\+\+FILE}}, \mbox{\hyperlink{fopen_8h_a61eb2fbb79b1d44fffa49dd0a194e09b}{fcurl\+\_\+data\+::handle}}, and \mbox{\hyperlink{fopen_8h_source_l00061}{fcurl\+\_\+data\+::type}}.



Referenced by \mbox{\hyperlink{init_8c_source_l00049}{check\+\_\+exception()}}, \mbox{\hyperlink{debug_8c_source_l00136}{debug\+\_\+dump\+\_\+object()}}, \mbox{\hyperlink{debug_8c_source_l00119}{debug\+\_\+print\+\_\+object()}}, \mbox{\hyperlink{lispops_8c_source_l01001}{lisp\+\_\+inspect()}}, \mbox{\hyperlink{lispops_8c_source_l01040}{lisp\+\_\+print()}}, \mbox{\hyperlink{lispops_8c_source_l00906}{lisp\+\_\+read()}}, and \mbox{\hyperlink{init_8c_source_l00206}{main()}}.

\Hypertarget{io_8h_a9d614d1f21a42692f5dbab12757ec1be}\label{io_8h_a9d614d1f21a42692f5dbab12757ec1be} 
\index{io.h@{io.h}!get\_default\_stream@{get\_default\_stream}}
\index{get\_default\_stream@{get\_default\_stream}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{get\_default\_stream()}{get\_default\_stream()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} get\+\_\+default\+\_\+stream (\begin{DoxyParamCaption}\item[{bool}]{inputp,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{env }\end{DoxyParamCaption})}



Resutn the current default input, or of {\ttfamily inputp} is false, output stream from this {\ttfamily env}ironment. 



Definition at line \mbox{\hyperlink{io_8c_source_l00411}{411}} of file \mbox{\hyperlink{io_8c_source}{io.\+c}}.



References \mbox{\hyperlink{intern_8c_source_l00327}{c\+\_\+assoc()}}, \mbox{\hyperlink{io_8c_source_l00051}{lisp\+\_\+io\+\_\+in}}, \mbox{\hyperlink{io_8c_source_l00055}{lisp\+\_\+io\+\_\+out}}, and \mbox{\hyperlink{consspaceobject_8h_source_l00277}{NIL}}.



Referenced by \mbox{\hyperlink{lispops_8c_source_l01001}{lisp\+\_\+inspect()}}, \mbox{\hyperlink{lispops_8c_source_l01040}{lisp\+\_\+print()}}, \mbox{\hyperlink{lispops_8c_source_l00906}{lisp\+\_\+read()}}, and \mbox{\hyperlink{lispops_8c_source_l01263}{lisp\+\_\+repl()}}.

\Hypertarget{io_8h_a12ce98b64f2019ac45b44826a4db7ec9}\label{io_8h_a12ce98b64f2019ac45b44826a4db7ec9} 
\index{io.h@{io.h}!io\_init@{io\_init}}
\index{io\_init@{io\_init}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{io\_init()}{io\_init()}}
{\footnotesize\ttfamily int io\+\_\+init (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Initialise the I/O subsystem. 

\begin{DoxyReturn}{Returns}
0 on success; any other value means failure. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{io_8c_source_l00069}{69}} of file \mbox{\hyperlink{io_8c_source}{io.\+c}}.



References \mbox{\hyperlink{io_8c_source_l00046}{io\+\_\+share}}.



Referenced by \mbox{\hyperlink{init_8c_source_l00206}{main()}}.

\Hypertarget{io_8h_abb88a49fb6af67a8370bad809a47faf8}\label{io_8h_abb88a49fb6af67a8370bad809a47faf8} 
\index{io.h@{io.h}!lisp\_close@{lisp\_close}}
\index{lisp\_close@{lisp\_close}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{lisp\_close()}{lisp\_close()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} lisp\+\_\+close (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}}]{frame,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{frame\+\_\+pointer,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{env }\end{DoxyParamCaption})}



Function, sort-\/of\+: close the file indicated by my first arg, and return nil. 

If the first arg is not a stream, does nothing. All other args are ignored.


\begin{DoxyItemize}
\item (close stream)
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em frame} & my \doxylink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}. \\
\hline
{\em frame\+\_\+pointer} & a pointer to my \doxylink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}. \\
\hline
{\em env} & my environment. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
T if the stream was successfully closed, else NIL. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{io_8c_source_l00254}{254}} of file \mbox{\hyperlink{io_8c_source}{io.\+c}}.



References \mbox{\hyperlink{consspaceobject_8h_source_l00277}{NIL}}, \mbox{\hyperlink{consspaceobject_8h_source_l00297}{pointer2cell}}, \mbox{\hyperlink{consspaceobject_8h_source_l00363}{readp}}, \mbox{\hyperlink{consspaceobject_8h_source_l00282}{TRUE}}, \mbox{\hyperlink{fopen_8c_source_l00258}{url\+\_\+fclose()}}, and \mbox{\hyperlink{consspaceobject_8h_source_l00390}{writep}}.



Referenced by \mbox{\hyperlink{init_8c_source_l00206}{main()}}.

\Hypertarget{io_8h_a44891c34d2c712e623d05df4d661a5aa}\label{io_8h_a44891c34d2c712e623d05df4d661a5aa} 
\index{io.h@{io.h}!lisp\_open@{lisp\_open}}
\index{lisp\_open@{lisp\_open}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{lisp\_open()}{lisp\_open()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} lisp\+\_\+open (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}}]{frame,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{frame\+\_\+pointer,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{env }\end{DoxyParamCaption})}



Function\+: return a stream open on the URL indicated by the first argument; if a second argument is present and is non-\/nil, open it for reading. 

At present, further arguments are ignored and there is no mechanism to open to append, or error if the URL is faulty or indicates an unavailable resource.


\begin{DoxyItemize}
\item (open url)
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em frame} & my \doxylink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}. \\
\hline
{\em frame\+\_\+pointer} & a pointer to my \doxylink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}. \\
\hline
{\em env} & my environment. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string of one character, namely the next available character on my stream, if any, else NIL. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{io_8c_source_l00437}{437}} of file \mbox{\hyperlink{io_8c_source}{io.\+c}}.



References \mbox{\hyperlink{consspaceobject_8c_source_l00454}{c\+\_\+string\+\_\+to\+\_\+lisp\+\_\+string()}}, \mbox{\hyperlink{fopen_8h_source_l00057}{CFTYPE\+\_\+\+CURL}}, \mbox{\hyperlink{fopen_8h_source_l00056}{CFTYPE\+\_\+\+FILE}}, \mbox{\hyperlink{fopen_8h_source_l00055}{CFTYPE\+\_\+\+NONE}}, \mbox{\hyperlink{io_8c_source_l00360}{collect\+\_\+meta()}}, \mbox{\hyperlink{debug_8h_source_l00056}{DEBUG\+\_\+\+IO}}, \mbox{\hyperlink{debug_8c_source_l00101}{debug\+\_\+printf()}}, \mbox{\hyperlink{fopen_8h_a61eb2fbb79b1d44fffa49dd0a194e09b}{fcurl\+\_\+data\+::handle}}, \mbox{\hyperlink{io_8c_source_l00095}{lisp\+\_\+string\+\_\+to\+\_\+c\+\_\+string()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00200}{make\+\_\+exception()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00405}{make\+\_\+read\+\_\+stream()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00422}{make\+\_\+write\+\_\+stream()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00277}{NIL}}, \mbox{\hyperlink{consspaceobject_8h_source_l00303}{nilp}}, \mbox{\hyperlink{consspaceobject_8h_source_l00297}{pointer2cell}}, \mbox{\hyperlink{consspaceobject_8h_source_l00343}{stringp}}, \mbox{\hyperlink{fopen_8h_source_l00061}{fcurl\+\_\+data\+::type}}, and \mbox{\hyperlink{fopen_8c_source_l00202}{url\+\_\+fopen()}}.



Referenced by \mbox{\hyperlink{init_8c_source_l00206}{main()}}.

\Hypertarget{io_8h_ac795341ab3355d1a89753166159bfa80}\label{io_8h_ac795341ab3355d1a89753166159bfa80} 
\index{io.h@{io.h}!lisp\_read\_char@{lisp\_read\_char}}
\index{lisp\_read\_char@{lisp\_read\_char}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{lisp\_read\_char()}{lisp\_read\_char()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} lisp\+\_\+read\+\_\+char (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}}]{frame,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{frame\+\_\+pointer,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{env }\end{DoxyParamCaption})}



Function\+: return the next character from the stream indicated by arg 0; further arguments are ignored. 


\begin{DoxyItemize}
\item (read-\/char stream)
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em frame} & my \doxylink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}. \\
\hline
{\em frame\+\_\+pointer} & a pointer to my \doxylink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}. \\
\hline
{\em env} & my environment. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string of one character, namely the next available character on my stream, if any, else NIL. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{io_8c_source_l00504}{504}} of file \mbox{\hyperlink{io_8c_source}{io.\+c}}.



References \mbox{\hyperlink{consspaceobject_8c_source_l00338}{make\+\_\+string()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00277}{NIL}}, \mbox{\hyperlink{consspaceobject_8h_source_l00297}{pointer2cell}}, \mbox{\hyperlink{consspaceobject_8h_source_l00363}{readp}}, and \mbox{\hyperlink{io_8c_source_l00151}{url\+\_\+fgetwc()}}.



Referenced by \mbox{\hyperlink{init_8c_source_l00206}{main()}}.

\Hypertarget{io_8h_a63d8ed9d6c6a5c00d9f62dbc7a24425c}\label{io_8h_a63d8ed9d6c6a5c00d9f62dbc7a24425c} 
\index{io.h@{io.h}!lisp\_slurp@{lisp\_slurp}}
\index{lisp\_slurp@{lisp\_slurp}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{lisp\_slurp()}{lisp\_slurp()}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} lisp\+\_\+slurp (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}} \texorpdfstring{$\ast$}{*}}]{frame,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{frame\+\_\+pointer,  }\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{env }\end{DoxyParamCaption})}



Function\+: return a string representing all characters from the stream indicated by arg 0; further arguments are ignored. 

TODO\+: it should be possible to optionally pass a string URL to this function,


\begin{DoxyItemize}
\item (slurp stream)
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em frame} & my \doxylink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}. \\
\hline
{\em frame\+\_\+pointer} & a pointer to my \doxylink{consspaceobject_8h_structstack__frame}{stack\+\_\+frame}. \\
\hline
{\em env} & my environment. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
a string of one character, namely the next available character on my stream, if any, else NIL. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{io_8c_source_l00533}{533}} of file \mbox{\hyperlink{io_8c_source}{io.\+c}}.



References \mbox{\hyperlink{debug_8c_source_l00136}{debug\+\_\+dump\+\_\+object()}}, \mbox{\hyperlink{debug_8h_source_l00056}{DEBUG\+\_\+\+IO}}, \mbox{\hyperlink{debug_8c_source_l00041}{debug\+\_\+print()}}, \mbox{\hyperlink{debug_8c_source_l00085}{debug\+\_\+println()}}, \mbox{\hyperlink{consspaceobject_8c_source_l00338}{make\+\_\+string()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00277}{NIL}}, \mbox{\hyperlink{consspaceobject_8h_a259b3afe36776f8ba8498fdf95904f25}{cons\+\_\+space\+\_\+object\+::payload}}, \mbox{\hyperlink{consspaceobject_8h_source_l00297}{pointer2cell}}, \mbox{\hyperlink{consspaceobject_8h_source_l00363}{readp}}, \mbox{\hyperlink{fopen_8c_source_l00286}{url\+\_\+feof()}}, and \mbox{\hyperlink{io_8c_source_l00151}{url\+\_\+fgetwc()}}.



Referenced by \mbox{\hyperlink{init_8c_source_l00206}{main()}}.

\Hypertarget{io_8h_a7af48ce42d938915fd8e59aad5f566ee}\label{io_8h_a7af48ce42d938915fd8e59aad5f566ee} 
\index{io.h@{io.h}!lisp\_string\_to\_c\_string@{lisp\_string\_to\_c\_string}}
\index{lisp\_string\_to\_c\_string@{lisp\_string\_to\_c\_string}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{lisp\_string\_to\_c\_string()}{lisp\_string\_to\_c\_string()}}
{\footnotesize\ttfamily char \texorpdfstring{$\ast$}{*} lisp\+\_\+string\+\_\+to\+\_\+c\+\_\+string (\begin{DoxyParamCaption}\item[{struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}}}]{s }\end{DoxyParamCaption})}



Convert this lisp string-\/like-\/thing (also works for symbols, and, later keywords) into a UTF-\/8 string. 

NOTE that the returned value has been malloced and must be freed. TODO\+: candidate to moving into a utilities file.


\begin{DoxyParams}{Parameters}
{\em s} & the lisp string or symbol; \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the c string. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{io_8c_source_l00095}{95}} of file \mbox{\hyperlink{io_8c_source}{io.\+c}}.



References \mbox{\hyperlink{debug_8h_source_l00056}{DEBUG\+\_\+\+IO}}, \mbox{\hyperlink{debug_8c_source_l00041}{debug\+\_\+print()}}, \mbox{\hyperlink{debug_8c_source_l00119}{debug\+\_\+print\+\_\+object()}}, \mbox{\hyperlink{debug_8c_source_l00101}{debug\+\_\+printf()}}, \mbox{\hyperlink{consspaceobject_8h_source_l00303}{nilp}}, \mbox{\hyperlink{consspaceobject_8h_source_l00297}{pointer2cell}}, \mbox{\hyperlink{consspaceobject_8h_source_l00343}{stringp}}, and \mbox{\hyperlink{consspaceobject_8h_source_l00348}{symbolp}}.



Referenced by \mbox{\hyperlink{io_8c_source_l00437}{lisp\+\_\+open()}}, and \mbox{\hyperlink{intern_8c_source_l00412}{set()}}.

\Hypertarget{io_8h_a3be41e66bc649c81ff099e4be3e5b1a8}\label{io_8h_a3be41e66bc649c81ff099e4be3e5b1a8} 
\index{io.h@{io.h}!url\_fgetwc@{url\_fgetwc}}
\index{url\_fgetwc@{url\_fgetwc}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{url\_fgetwc()}{url\_fgetwc()}}
{\footnotesize\ttfamily wint\+\_\+t url\+\_\+fgetwc (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{fopen_8h_a8c81a077422f5e2410ba71eb75108f6e}{URL\+\_\+\+FILE}} \texorpdfstring{$\ast$}{*}}]{input }\end{DoxyParamCaption})}



get one wide character from the buffer. 


\begin{DoxyParams}{Parameters}
{\em file} & the stream to read from; \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the next wide character on the stream, or zero if no more. 
\end{DoxyReturn}


Definition at line \mbox{\hyperlink{io_8c_source_l00151}{151}} of file \mbox{\hyperlink{io_8c_source}{io.\+c}}.



References \mbox{\hyperlink{fopen_8h_source_l00057}{CFTYPE\+\_\+\+CURL}}, \mbox{\hyperlink{fopen_8h_source_l00056}{CFTYPE\+\_\+\+FILE}}, \mbox{\hyperlink{fopen_8h_source_l00055}{CFTYPE\+\_\+\+NONE}}, \mbox{\hyperlink{debug_8h_source_l00056}{DEBUG\+\_\+\+IO}}, \mbox{\hyperlink{debug_8c_source_l00041}{debug\+\_\+print()}}, \mbox{\hyperlink{debug_8c_source_l00101}{debug\+\_\+printf()}}, \mbox{\hyperlink{fopen_8h_a61eb2fbb79b1d44fffa49dd0a194e09b}{fcurl\+\_\+data\+::handle}}, \mbox{\hyperlink{fopen_8h_source_l00061}{fcurl\+\_\+data\+::type}}, \mbox{\hyperlink{io_8c_source_l00062}{ungotten}}, and \mbox{\hyperlink{fopen_8c_source_l00346}{url\+\_\+fgets()}}.



Referenced by \mbox{\hyperlink{lispops_8c_source_l00735}{lisp\+\_\+car()}}, \mbox{\hyperlink{lispops_8c_source_l00779}{lisp\+\_\+cdr()}}, \mbox{\hyperlink{io_8c_source_l00504}{lisp\+\_\+read\+\_\+char()}}, \mbox{\hyperlink{io_8c_source_l00533}{lisp\+\_\+slurp()}}, \mbox{\hyperlink{read_8c_source_l00559}{read()}}, \mbox{\hyperlink{read_8c_source_l00155}{read\+\_\+continuation()}}, \mbox{\hyperlink{read_8c_source_l00401}{read\+\_\+list()}}, \mbox{\hyperlink{read_8c_source_l00441}{read\+\_\+map()}}, \mbox{\hyperlink{read_8c_source_l00288}{read\+\_\+number()}}, \mbox{\hyperlink{read_8c_source_l00086}{read\+\_\+path()}}, \mbox{\hyperlink{read_8c_source_l00484}{read\+\_\+string()}}, and \mbox{\hyperlink{read_8c_source_l00507}{read\+\_\+symbol\+\_\+or\+\_\+key()}}.

\Hypertarget{io_8h_a201e1590889d70033b6cae46f30ce6e0}\label{io_8h_a201e1590889d70033b6cae46f30ce6e0} 
\index{io.h@{io.h}!url\_ungetwc@{url\_ungetwc}}
\index{url\_ungetwc@{url\_ungetwc}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{url\_ungetwc()}{url\_ungetwc()}}
{\footnotesize\ttfamily wint\+\_\+t url\+\_\+ungetwc (\begin{DoxyParamCaption}\item[{wint\+\_\+t}]{wc,  }\item[{\mbox{\hyperlink{fopen_8h_a8c81a077422f5e2410ba71eb75108f6e}{URL\+\_\+\+FILE}} \texorpdfstring{$\ast$}{*}}]{input }\end{DoxyParamCaption})}



Definition at line \mbox{\hyperlink{io_8c_source_l00220}{220}} of file \mbox{\hyperlink{io_8c_source}{io.\+c}}.



References \mbox{\hyperlink{fopen_8h_source_l00057}{CFTYPE\+\_\+\+CURL}}, \mbox{\hyperlink{fopen_8h_source_l00056}{CFTYPE\+\_\+\+FILE}}, \mbox{\hyperlink{fopen_8h_source_l00055}{CFTYPE\+\_\+\+NONE}}, \mbox{\hyperlink{fopen_8h_a61eb2fbb79b1d44fffa49dd0a194e09b}{fcurl\+\_\+data\+::handle}}, \mbox{\hyperlink{fopen_8h_source_l00061}{fcurl\+\_\+data\+::type}}, and \mbox{\hyperlink{io_8c_source_l00062}{ungotten}}.



Referenced by \mbox{\hyperlink{read_8c_source_l00155}{read\+\_\+continuation()}}, \mbox{\hyperlink{read_8c_source_l00288}{read\+\_\+number()}}, \mbox{\hyperlink{read_8c_source_l00086}{read\+\_\+path()}}, and \mbox{\hyperlink{read_8c_source_l00507}{read\+\_\+symbol\+\_\+or\+\_\+key()}}.



\doxysubsection{Variable Documentation}
\Hypertarget{io_8h_ac40101a2ddb1b4aac9f2f722c84d16dd}\label{io_8h_ac40101a2ddb1b4aac9f2f722c84d16dd} 
\index{io.h@{io.h}!io\_share@{io\_share}}
\index{io\_share@{io\_share}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{io\_share}{io\_share}}
{\footnotesize\ttfamily CURLSH\texorpdfstring{$\ast$}{*} io\+\_\+share\hspace{0.3cm}{\ttfamily [extern]}}



The sharing hub for all connections. 

TODO\+: Ultimately this probably doesn\textquotesingle{}t work for a multi-\/user environment and we will need one sharing hub for each user, or else we will need to not share at least cookies and ssl sessions. 

Definition at line \mbox{\hyperlink{io_8c_source_l00046}{46}} of file \mbox{\hyperlink{io_8c_source}{io.\+c}}.



Referenced by \mbox{\hyperlink{io_8c_source_l00069}{io\+\_\+init()}}, and \mbox{\hyperlink{fopen_8c_source_l00202}{url\+\_\+fopen()}}.

\Hypertarget{io_8h_a21ef246a2e9023dab932aef9cf51ffcd}\label{io_8h_a21ef246a2e9023dab932aef9cf51ffcd} 
\index{io.h@{io.h}!lisp\_io\_in@{lisp\_io\_in}}
\index{lisp\_io\_in@{lisp\_io\_in}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{lisp\_io\_in}{lisp\_io\_in}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} lisp\+\_\+io\+\_\+in\hspace{0.3cm}{\ttfamily [extern]}}



bound to the Lisp string representing C\+\_\+\+IO\+\_\+\+IN in initialisation. 



Definition at line \mbox{\hyperlink{io_8c_source_l00051}{51}} of file \mbox{\hyperlink{io_8c_source}{io.\+c}}.



Referenced by \mbox{\hyperlink{io_8c_source_l00411}{get\+\_\+default\+\_\+stream()}}, and \mbox{\hyperlink{init_8c_source_l00206}{main()}}.

\Hypertarget{io_8h_a4ab3e001c63210ab136b954086f9bed0}\label{io_8h_a4ab3e001c63210ab136b954086f9bed0} 
\index{io.h@{io.h}!lisp\_io\_out@{lisp\_io\_out}}
\index{lisp\_io\_out@{lisp\_io\_out}!io.h@{io.h}}
\doxysubsubsection{\texorpdfstring{lisp\_io\_out}{lisp\_io\_out}}
{\footnotesize\ttfamily struct \mbox{\hyperlink{consspaceobject_8h_structcons__pointer}{cons\+\_\+pointer}} lisp\+\_\+io\+\_\+out\hspace{0.3cm}{\ttfamily [extern]}}



bound to the Lisp string representing C\+\_\+\+IO\+\_\+\+OUT in initialisation. 



Definition at line \mbox{\hyperlink{io_8c_source_l00055}{55}} of file \mbox{\hyperlink{io_8c_source}{io.\+c}}.



Referenced by \mbox{\hyperlink{io_8c_source_l00411}{get\+\_\+default\+\_\+stream()}}, and \mbox{\hyperlink{init_8c_source_l00206}{main()}}.

