From 7e78d0f8a828f6258167fd48358c242bbe51a7e0 Mon Sep 17 00:00:00 2001 From: interp Date: Tue, 12 Feb 2002 11:50:54 +0000 Subject: [PATCH] * Created LaTeX style documentation. All documentation in plain text files were now moved to this LaTeX doc (man.tex). Currently, not everything is documented. --- doc/ftpd.scm.doc | 178 --- doc/latex/.gitignore | 18 + doc/latex/cgi-script.tex | 8 + doc/latex/cgi-server.tex | 8 + doc/latex/cgi.tex | 8 + doc/latex/decls.tex | 281 +++++ doc/latex/ftp.tex | 257 ++++ doc/latex/ftpd.tex | 171 +++ doc/latex/httpd.tex | 8 + doc/latex/intro.tex | 133 +++ doc/latex/man.ps | 2392 ++++++++++++++++++++++++++++++++++++++ doc/latex/man.tex | 34 + doc/latex/netrc.tex | 142 +++ doc/latex/ntp.tex | 8 + doc/latex/pop3.tex | 8 + doc/latex/rfc822.tex | 170 +++ doc/latex/skeleton.tex | 8 + doc/latex/smtp.tex | 8 + doc/latex/stringhax.tex | 79 ++ doc/latex/toothless.tex | 57 + doc/latex/uri.tex | 222 ++++ doc/latex/url.tex | 116 ++ doc/rfc822.scm.doc | 161 --- doc/stringhax.scm.doc | 79 -- doc/toothless.scm.doc | 64 - doc/uri.scm.doc | 152 --- doc/url.scm.doc | 69 -- 27 files changed, 4136 insertions(+), 703 deletions(-) delete mode 100644 doc/ftpd.scm.doc create mode 100644 doc/latex/.gitignore create mode 100644 doc/latex/cgi-script.tex create mode 100644 doc/latex/cgi-server.tex create mode 100644 doc/latex/cgi.tex create mode 100644 doc/latex/decls.tex create mode 100644 doc/latex/ftp.tex create mode 100644 doc/latex/ftpd.tex create mode 100644 doc/latex/httpd.tex create mode 100644 doc/latex/intro.tex create mode 100644 doc/latex/man.ps create mode 100644 doc/latex/man.tex create mode 100644 doc/latex/netrc.tex create mode 100644 doc/latex/ntp.tex create mode 100644 doc/latex/pop3.tex create mode 100644 doc/latex/rfc822.tex create mode 100644 doc/latex/skeleton.tex create mode 100644 doc/latex/smtp.tex create mode 100644 doc/latex/stringhax.tex create mode 100644 doc/latex/toothless.tex create mode 100644 doc/latex/uri.tex create mode 100644 doc/latex/url.tex delete mode 100644 doc/rfc822.scm.doc delete mode 100644 doc/stringhax.scm.doc delete mode 100644 doc/toothless.scm.doc delete mode 100644 doc/uri.scm.doc delete mode 100644 doc/url.scm.doc diff --git a/doc/ftpd.scm.doc b/doc/ftpd.scm.doc deleted file mode 100644 index 6c67165..0000000 --- a/doc/ftpd.scm.doc +++ /dev/null @@ -1,178 +0,0 @@ -This file documents how to use the ftp-daemon ftpd - -USAGE ------ - -Usage as a stand-alone daemon: - -Start the daemon in a scsh (or with a script, see below) using - -,config ,load modules.scm -,open ftpd -(ftpd []) - -(confirm open's question for opening the ftpd-structure) -where is the root-directory of the ftp-server and - the port the server is listening to. Usage of relative paths in - is not encouraged. defaults to 21. - -For example - -(ftpd (cwd) 8080) - -starts the server with the current directory as anonymous home and -listening to port 8080. - - -Usage with the collaboration of a daemon like inetd: - -Instead of FTPD, inetd uses FTPD-INETD, for example: - -(ftpd-inetd (cwd)) - -starts the server with the current directory as anonymous home and -handling the connection (given from inetd) through the current input- -and output-ports. - - -Example - -This is how archive.informatik.uni-tuebingen.de is called at the -university of Tuebingen: - -#!/bin/sh -/afs/informatik.uni-tuebingen.de/rs_aix43/scsh-0.6-alpha/bin/scsh <{\ttt}ll@{}}}% + {\end{tabular}\end{tightinset}}% + +\newenvironment{desctable}[1]% + {\begin{inset}\renewcommand{\arraystretch}{1.5}% + \begin{tabular}{lp{#1}}}% + {\end{tabular}\end{inset}} + +\def\*{{\ttt *}} + +% Names of things + +\newcommand{\keyword} [1]{\index{#1}{\normalfont\textsf{#1}}} + +\newcommand{\evalto}{$\Longrightarrow$\ } +\renewcommand{\star}{$^*$\/} +\newcommand{\+}{$^+$} + +% Semantic domains, used to indicate the type of a value + +\newcommand{\sem}{\normalfont\itshape} %semantic font +\newcommand{\semvar}[1]{\textit{#1}} %semantic font +\newcommand{\synvar}[1]{\textrm{\textit{$<$#1$>$}}} %syntactic font +\newcommand{\type}{\sem} +\newcommand{\zeroormore}[1]{{\sem #1$_1$ \ldots #1$_n$}} +\newcommand{\oneormore}[1]{{\sem #1$_1$ #1$_2$ \ldots #1$_n$}} + +\newcommand{\proc} {{\sem procedure}} +\newcommand{\boolean} {{\sem boolean}} +\newcommand{\true} {{\sem true}} +\newcommand{\false} {{\sem false}} + +\newcommand{\num} {{\sem number}} +\newcommand{\fixnum} {{\sem fixnum}} +\newcommand{\integer} {{\sem integer}} +\newcommand{\real} {{\sem real}} + +\newcommand{\character} {{\sem character}} +\newcommand{\str} {{\sem string}} +\newcommand{\sym} {{\sem symbol}} + +\newcommand{\location} {{\sem location}} +\newcommand{\object} {{\sem object}} + +\newcommand{\error} {{\sem error}} +\newcommand{\syntaxerror} {{\sem syntax error}} +\newcommand{\readerror} {{\sem read error}} +\newcommand{\undefined} {{\sem undefined}} +\newcommand{\noreturn} {{\sem no return value}} + +\newcommand{\port} {{\sem port}} + +% semantic variables + +\newcommand{\identifier} {{\sem identifier}} +\newcommand{\identifiers} {\zeroormore{\}} +\newcommand{\expr} {{\sem expression}} +\newcommand{\body} {{\sem body}} +\newcommand{\valueofbody} {{\sem value~of~body}} +\newcommand{\emptylist} {{\sem empty~list}} +\newcommand{\car} {\keyword{car}} +\newcommand{\cdr} {\keyword{cdr}} +\newcommand{\TMPDIR}{\texttt{\$TMPDIR}} + +% generally useful things + +% For line-breaking \tt stuff. +\renewcommand{\=}{\discretionary{-}{}{-}} +\newcommand{\ob}{\discretionary{}{}{}} % Optional break. + +\newcommand{\indx}[1]{#1 \index{ #1 }} +%\newcommand{\gloss}[1]{#1 \glossary{ #1 }} + +% This lossage produces #2 if #1 is zero length, otw #3. +% We use it to conditionally add a space between the procedure and +% the args in procedure prototypes, but only if there are any args-- +% we want to produce "(read)", not "(read )". +\newlength{\voidlen} +\newcommand{\testvoid}[3]{\settowidth\voidlen{#1}\ifdim\voidlen>0in{#3}\else{#2}\fi} + + +% Typeset a definition prototype line, e.g.: +% (cons ) -> pair procedure +% +% Five args are: proc-name args ret-value(s) type index-entry +\newcommand{\dfnix}[5] + {\hbox to \linewidth{\ttchars% + {\ttt(#1\testvoid{#2}{}{\ }{\sem{#2}}\testvoid{#2}{}{\/})\hskip 1em minus +0.5em$\longrightarrow$\hskip 1em minus 0.5em{\sem{#3}}\hfill\quad\textnormal{#4}}}\index{#5}} + +\newcommand{\dfnx}[4] {\dfnix{#1}{#2}{#3}{#4}{#1@\texttt{#1}}} + +\newcommand{\dfn} {\par\medskip\dfnx} % Takes 4 args, actually. +\newcommand{\dfni} {\par\medskip\dfnix} % Takes 5 args, actually. + +\newcommand{\defvar} {\par\medskip\defvarx} % Takes 2 args, actually. +\newcommand{\defvarx}[2]% + {\index{#1} + \hbox to \linewidth{\ttchars{{\ttt{#1}} \hfill #2}}}% + +% Typeset the protocol line, then do the following descriptive text indented. +% If you want to group two procs together, do the first one with a \dfn, +% then the second one, and the documentation, with a \defndescx. + +% This one doesn't put whitespace above. Use it immediately after a \dfn +% to group two prototype lines together. +\newenvironment{dfndescx}[4]% + {\dfnx{#1}{#2}{#3}{#4}\begin{desc}}{\end{desc}} + +\newenvironment{dfndesc}[4] % This one puts whitespace above. + {\par\medskip\begin{dfndescx}{#1}{#2}{#3}{#4}} + {\end{dfndescx}} + +\newenvironment{desc}% + {\nopagebreak[2]% + \smallskip + \bgroup\begin{list}{}{\topsep=0pt\parskip=0pt}\item[]} + {\end{list}\leavevmode\egroup\global\@ignoretrue} + +\newcommand{\defun} [3] {\dfn{#1}{#2}{#3}{procedure}} % preskip +\newcommand{\defunx}[3]{\dfnx{#1}{#2}{#3}{procedure}} % no skip + +\newenvironment{defundescx}[3]% + {\begin{dfndescx}{#1}{#2}{#3}{procedure}} + {\end{dfndescx}} + +\newenvironment{defundesc}[3]% + {\begin{dfndesc}{#1}{#2}{#3}{procedure}} + {\end{dfndesc}} + + +\newenvironment{column}{\begin{tabular}[t]{@{}l@{}}}{\end{tabular}} + +\newenvironment{exampletable}% + {\begin{leftinset}% + \newcommand{\header}[1]{\multicolumn{2}{@{}l@{}}{##1}\\}% + \newcommand{\splitline}[2]% + {\multicolumn{2}{@{}l@{}}{##1}\\\multicolumn{2}{@{}l@{}}{\qquad\evalto\quad{##2}}} + \begin{tabular}{@{}l@{\quad\evalto\quad}l@{}}}% + {\end{tabular}\end{leftinset}} + +% Put on blank lines in a code env to allow a pagebreak. +\newcommand{\cb}{\pagebreak[0]} + +\newenvironment{boxedcode} + {\begin{inset}\tabular{|l|}\hline} + {\\ \hline \end{tabular}\end{inset}} + +% A ragged-right decl that doesn't redefine \\ -- for use in tables. +\newcommand{\raggedrightparbox}{\let\temp=\\\raggedright\let\\=\temp} + +\newenvironment{boxedfigure}[1]% + {\begin{figure}[#1]\begin{boxedminipage}{\linewidth}\vskip 1.5ex} + {\end{boxedminipage}\end{figure}} + +%FIXME-command: types out the desired FIXME +\newcommand{\FIXME}[1]% +{\typeout{**********************************}% +\typeout{FIXME: #1}% +\typeout{**********************************}} + + +\makeatother diff --git a/doc/latex/ftp.tex b/doc/latex/ftp.tex new file mode 100644 index 0000000..2abd5af --- /dev/null +++ b/doc/latex/ftp.tex @@ -0,0 +1,257 @@ +\section{FTP client} +\begin{description} +\item[Used files:] ftp.scm +\item[Name of the package:] ftp +\end{description} + +\subsection{What users want to know} +This module lets you transfer files between networked machines from +the Scheme Shell, using the File Transfer Protocol as described in +RFC~959. The protocol specifies the behaviour of a server machine, +which runs an ftp daemon (not implemented by this module), and of +clients (that's us) which request services from the server. + +Some of the procedures in this module extract useful information from +the server's reply, such as the size of a file, or the name of the +directory we have moved to. These procedures return either the +extracted information, or \sharpf{} to indicate failure. Other +procedures return a ``status'', which is either the server's reply as +a string, or \sharpf{} to signify failure. + +The server's response is always checked. If the server's response +doesn't match the expected code from the server, an catchable +\ex{ftp:error} is raised. + +\FIXME{The source says you can look at pop3.scm to find out how to +catch the ftp:error raised by some procedures this. We have not had +a look there, yet.} + +\subsubsection*{Entry points } + +\defun{ftp:connect} {host \ovar{logfile}} {connection} +\begin{desc} + Open a command connection with the remote machine \semvar{host}. + Optionally start logging the conversation with the server to + \semvar{logfile}, which will be appended to if it already exists, + and created otherwise. Beware, the \semvar{logfile} contains + passwords in clear text (it is created with permissions + \ex{og-rxw})! +\end{desc} + +\defun{ftp:login} {connection \ovar{login \ovar{passwd}}} {status} +\begin{desc} + Log in to the remote host. If a \semvar{login} and \semvar{password} + are not provided, they are first searched for in the user's + \~/.netrc file, or default to user ``anonymous'' and password + ``user@host'' +\end{desc} + +\defun{ftp:type} {connection type} {status} +\begin{desc} + Change the transfer mode for future data connections. This may be + either \ex{'ascii }or \ex{'text}, respectively, for transfering text + files, or \ex{'binary} for transfering binary files. If + \semvar{type} is a string it is sent verbatim to the server. +\end{desc} + +\defun{ftp:rename} {connection oldname newname} {status} +\begin{desc} + Change the name of \semvar{oldname} on the remote host to + \semvar{newname} (assuming sufficient permissions). \semvar{oldname} + and \semvar{newname} are strings; if prefixed with "/" they are + taken relative to the server's root, and otherwise they are relative + to the current directory. Note that in the case of anonymous ftp + (user ``anonymous'' or ``ftp''), the server root is different from + the root of the servers's filesystem. +\end{desc} + +\defun{ftp:delete} {connection file} {status} +\begin{desc} + Delete \semvar{file} from the remote host (assuming the user has + appropriate permissions). +\end{desc} + +\defun{ftp:cd} {connection dir} {status} +\begin{desc} + Change the current directory on the server. +\end{desc} + +\defun{ftp:cdup} {connection} {status} +\begin{desc} + Move to the parent directory on the server. +\end{desc} + +\defun{ftp:pwd} {connection} {string} +\begin{desc} + Return the current directory on the remote host, as a string. +\end{desc} + +\defun{ftp:ls} {connection} {status} +\begin{desc} + Provide a listing of the current directory's contents, in short + format, \ie as a list of filenames. +\end{desc} + +\defun{ftp:dir} {connection} {status} +\begin{desc} + Provide a listing of the current directory's contents, in long + format. Most servers (\Unix, MS Windows, MacOS) use a standard + format with one file per line, with the file size and other + information, but other servers (VMS, \ldots) use their own format. +\end{desc} + +\defun{ftp:get} {connection remote-file \ovar{local-file}} {status $|$ string} +\begin{desc} + Download \semvar{remote-file} from the FTP server. If + \semvar{local-file} is a string, save the data to + \semvar{local-file} on the local host; otherwise save to a local + file named \semvar{remote-file}. \semvar{remote-file} and + \semvar{local-file} may be absolute file names (with a leading `/'), + or relative to the current directory. It \semvar{local-file} is + \sharpt, output data to \ex{(current-output-file)}, and if it is + \sharpf{} return the data as a string. +\end{desc} + +\defun{ftp:put} {connection local-file \ovar{remote-file}} {status} +\begin{desc} + Upload \semvar{local-file} to the FTP server. If + \semvar{remote-file} is specified, then save the data to + \semvar{remote-file} on the remote host; otherwise save to a remote + file named \semvar{local-file}. \semvar{local-file} and + \semvar{remote-file} may be absolute file names (with a leading + `/'), or relative to the current directory. +\end{desc} + +\defun{ftp:rmdir} {connection dir} {status} +\begin{desc} + Remove the directory \semvar{dir} from the remote host (assuming + sufficient permissions). +\end{desc} + +\defun{ftp:mkdir} {connection dir} {status} +\begin{desc} + Create a new directory named \semvar{dir} on the remote host + (assuming sufficient permissions). +\end{desc} + +\defun{ftp:modification-time} {connection file} {date} +\begin{desc} + Request the time of the last modification of \semvar{file} on the + remote host, and on success return a Scsh date record. This command + is not part of RFC~959 and is not implemented by all servers, but is + useful for mirroring. +\end{desc} + +\defun{ftp:size} {connection file} {integer} +\begin{desc} + Return the size of \semvar{file} in bytes. +\end{desc} + +\defun{ftp:abort} {connection} {status} +\begin{desc} + Abort the current data transfer. Not particularly useful with this + im\-ple\-men\-ta\-tion since the data transfer commands only return + once the transfer is complete. +\end{desc} + +\defun{ftp:quit} {connection} {status} +\begin{desc} + Close the connection to the remote host. The \semvar{connection} + object is useless after a quit command. +\end{desc} + + +\subsubsection*{Unimplemented} + +The following rfc959 commands are not implemented: + +\begin{table}[htb] +\begin{tabular}{|lp{10cm}|} +\hline +\ex{ACCT} & account; this is ignored by most servers) \\ +\ex{SMNT} & structure mount, for mounting another filesystem \\ +\ex{REIN} & reinitialize connection \\ +\ex{LOGOUT} & quit without interrupting ongoing transfers \\ +\ex{STRU} & file structure \\ +\ex{ALLO} & allocate space on server \\ +\hline +\end{tabular} +\end{table} + + + +\subsection{What programmers want to know} + +\subsection*{Overview} +Communication is initiated by the client. The server responds to each +request with a three digit status code and an explanatory message, and +occasionally with data (which is sent via a separate, one-off +channel). The client starts by opening a command connection to a well +known port on the server machine. Messages send to the server are of +the form + \codex{CMD [ arg ] } +Replies from the server are of the form + \codex{xyz Informative message } +where xyz is a three digit code which indicates whether the operation +succeeded or not, whether the server is waiting for more data, etc. +The server may also send multiline messages of the form + +\begin{code} +xyz- Start of multiline message +[ + More information ]* +xyz End of multiline message % +\end{code} + +For further informations have a look at the source file. + +This module has no support for sites behind a firewall. It shouldn't +be very tricky; it only requires using passive mode. Might want to add +something like the \ex{/usr/bin/ftp} command \ex{restrict}, which +implements data port range restrictions. + + +\subsubsection*{Portablitity} + +Items of the following list are necessary in order to use this module: +\begin{itemize} +\item The netrc.scm module for parsing ~/.netrc files. +\item Scsh socket code +\item Scsh records +\item Receive for multiple values +\item \scm{} signals/handlers +\end{itemize} + + +\subsubsection*{Related work} + +\begin{itemize} +\item RFC~959 describes the FTP protocol; see \newline + \ex{http://www.cis.ohio-state.edu/htbin/rfc/rfc959.html} +\item \ex{/anonymous@sunsite.unc.edu:/pub/Linux/libs/ftplib.tar.gz} is + a library similar to this one, written in C, by Thomas Pfau +\item \ex{FTP.pm} is a Perl module with similar functionality + (available from \ex{http://www.perl.com/CPAN}) +\item Emacs gets transparent remote file access from \ex{ange-ftp.el} + by Ange Norman. However, it cheats by using \ex{/usr/bin/ftp}. +\item Siod (a small-footprint Scheme implementation by George Carette) + comes with a file \ex{ftp.scm }with a small subset of these + functions defined. +\end{itemize} + +\subsubsection*{TODO} +\begin{itemize} +\item Handle passive mode and firewalls. +\item Unix-specific commands such as \ex{SITE UMASK}, \ex{SITE CHMOD}, + \ex{SITE IDLE}, \ex{SITE HELP}. +\item Object-based interface? (like SICP message passing). +\item Improved error handling. +\item A lot of the calls to format could be replaced by calls to + string-join. Maybe format is easier to read? +\item The \ex{ftp:rename} command should have an optional argument + \ex{:rename} which defaults to \sharpf, which would make us upload + to a temporary name and rename at the end of the upload. This + atomicity is important for ftp or http servers which are serving a + load, and to avoid problems with "no space on device". +\item Automatic relogin a la \ex{ang-ftp}. +\end{itemize} + diff --git a/doc/latex/ftpd.tex b/doc/latex/ftpd.tex new file mode 100644 index 0000000..bdd5c8c --- /dev/null +++ b/doc/latex/ftpd.tex @@ -0,0 +1,171 @@ +\section{FTP server} + +\begin{description} +\item[Used files:] ftpd.scm +\item[Name of the package:] ftpd +\end{description} + +\subsection{What users want to know} + +\subsubsection*{Entry points} + +\defun {ftpd} {anonymous-home \ovar{port}} {\noreturn} +\begin{defundescx}{ftp-inetd} {anonymous-home} {\noreturn} + \ex{ftpd} starts the server, using \semvar{anonymous-home} as the + root directory of the server. Usage of relative paths is not + encouraged. \semvar{port} specifies the port the server is + listening for connections. It defaults to 21. + + As the procedure does not return, you have to do a \ex{fork} in + order to have a ``real'' daemon: + \codex{(fork (lambda () (ftpd "/data/ftp" 8080)))} + \ex{ftpd-inetd} is the version to be used with a daemon like + \ex{inetd}. If the server is started this way, it handles the + connection through the current standard output and input ports. +\end{defundescx} + +\subsubsection*{Examples} + +To start the server with the current home directory as root directory +and listening on port 8080, use +\codex{(ftpd (cwd) 8080)} + +This is how the ftp server at the computing faculty of the university +of Tuebingen\footnote{\texttt{archive.informatik.uni-tuebingen.de}} is +started: +\begin{code} +#!/bin/sh /scsh-0.6-alpha/bin/scsh < ,config ,load modules.scm +modules.scm +> ,open ftp +Load structure ftp (y/n)? y +[ecm-utilities ecm-utilities.scm] +[netrc netrc.scm] +[ftp ftp.scm] +> ; do something nasty +> ,exit +atari-2600[73]\end{code} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/doc/latex/man.ps b/doc/latex/man.ps new file mode 100644 index 0000000..1c75a72 --- /dev/null +++ b/doc/latex/man.ps @@ -0,0 +1,2392 @@ +%!PS-Adobe-2.0 +%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software +%%Title: man.dvi +%%Pages: 40 +%%PageOrder: Ascend +%%BoundingBox: 0 0 596 842 +%%DocumentPaperSizes: a4 +%%EndComments +%DVIPSWebPage: (www.radicaleye.com) +%DVIPSCommandLine: dvips man.dvi -o +%DVIPSParameters: dpi=300, compressed +%DVIPSSource: TeX output 2002.02.12:1228 +%%BeginProcSet: texc.pro +%! +/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S +N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 +mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 +0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ +landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize +mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ +matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round +exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ +statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] +N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin +/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array +/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 +array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N +df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A +definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get +}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} +B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr +1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 +1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx +0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx +sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ +rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp +gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B +/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ +/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ +A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy +get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} +ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp +fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 +{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add +chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ +1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} +forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn +/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put +}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ +bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A +mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ +SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ +userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X +1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 +index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N +/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ +/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) +(LaserWriter 16/600)]{A length product length le{A length product exch 0 +exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse +end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask +grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} +imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round +exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto +fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p +delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} +B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ +p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S +rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end + +%%EndProcSet +TeXDict begin 39158280 55380996 1000 300 300 (man.dvi) +@start +%DVIPSBitmapFont: Fa cmtt12 12 10 +/Fa 10 119 df<387FFFC0B512E0A26C13C013047D901A>45 D97 D101 D<127E12FE127E120EA6133FEBFF80000F13C0EBE1E013801300 +A2120EAB387FC3FC38FFE7FE387FC3FC171E7F9D1A>104 D108 D111 D<387F83F838FF8FFEEA7FBF3803FE1EEBF80CEBE000A25BA25B +A9EA7FFFB5FC7E17157F941A>114 D<380FFB80EA3FFF5AEAF80FEAE003A300F8C7FCEA +7FC0EA3FFCEA0FFF38007F80EB07C0EA600112E012F0130338FC0F80B512005BEAE7F812 +157C941A>I<487E1203A6387FFFE0B5FCA238038000AA1470A314F0EBE1E0EA01FF6C13 +C0EB3F00141C7F9B1A>I<387F83FC38FFC7FE387F83FC380E00E0A3380701C0A3380383 +80A33801C700A3EA00EEA3137CA2133817157F941A>118 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fb cmitt10 10.95 6 +/Fb 6 117 df103 D<13381378A213301300A5EA0F80EA1FC012 +3FEA79E0127113C012F11263EA03801207A21300EA0F18EA0E3C1338121E1378EA0FF013 +E0EA07C00E1D799C18>105 D110 D<381E1F80383F3FE0387FFFF0EA73F0EBE07838F7C0F812E73867807000 +07130048C7FCA2120EA2121EA2121CA2123CA2121815147B9318>114 +D<137F3801FF804813C0EA07C31303148090C7FC7F13FC6CB4FCC613801307EB03C01270 +12F0EB0780EB1F00EA7FFE6C5AEA1FF012147C9318>II E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fc cmti10 10.95 30 +/Fc 30 122 df12 +D<91393FC0FF809139E0E38040903A0181E600E00103EBEC01EC80DC903A07001C00C003 +1813001538A2130EA25D90B7128090390E007003EE07005BA215E0160EA25BA24A485AA3 +01701540EE3880EC0380A301E0EC1900ED000E4A90C7FC13C0140612013831860E38798F +0C38F31E1838620C30383C07C02B29829F28>14 D45 +D<127012F8A212F012E005057B840E>I<1378EA0186EA0603EA0801148012101220EB03 +001240EA7007EA781E485AEA6078C65AEA03C0485A48C7FC120E120CEA1840A2EA088000 +0FC7FCC8FCA5121C123EA2123C1238112178A017>63 D<14021406A2140E141EA2143F14 +2F144F14CF148FEB010FA21302A213041308A20110138014071320EB3FFFEB40071380A2 +EA0100A2120212061204001E14C039FF807FF81D207E9F22>65 D79 D97 +DI<137EEA01C138030080EA0E07 +121E001C1300003CC7FC5AA35AA45B12701302EA300CEA1830EA07C011147C9315>I<14 +78EB03F8EB0070A414E0A4EB01C0A213F1EA038938070780EA0E03121C123C3838070012 +78A3EAF00EA31420EB1C40A2EA703C135C38308C80380F070015207C9F17>I<137CEA01 +C2EA0701120E121C123CEA3802EA780CEA7FF0EA78005AA4EA7001A21302EA380CEA1830 +EA07C010147C9315>I<1478EB019CEB033CA2EB07181400A2130EA5EBFFE0EB1C00A45B +A55BA55BA5485AA35B1231007BC7FC12F31266123C1629829F0E>III<13C0EA01E0A213C0C7FCA7120E +12131223EA4380EA4700A21287120EA35AA3EA38401380A21270EA31001232121C0B1F7C +9E0E>I107 DI<391C0F80F0392630C318394740640C903880680EEB0070A200 +8E495A120EA34848485AA3ED70803A3803807100A215E115623970070064D83003133821 +147C9325>I<381C0F80382630C0384740601380EB0070A2008E13E0120EA3381C01C0A3 +EB038400381388A2EB0708EB031000701330383001C016147C931A>I<137CEA01C33803 +0180000E13C0121E001C13E0123C1278A338F003C0A3EB07801400EA700F130EEA3018EA +1870EA07C013147C9317>I<3801C1E0380262183804741C1378EB701EA2EA08E01200A3 +3801C03CA3143838038078147014E0EBC1C038072380EB1E0090C7FCA2120EA45AA2B47E +171D809317>I114 D<13FCEA0302EA0601EA0C03130713061300EA0F8013F0EA07 +F8EA03FCEA003E130E1270EAF00CA2EAE008EA4010EA2060EA1F8010147D9313>II<000E13C0001313E0382301C0EA4381EA4701A238870380120EA338 +1C0700A31410EB0E201218A2381C1E40EA0C263807C38014147C9318>I<380E0380EA13 +07002313C0EA4383EA4701130000871380120EA3381C0100A31302A25BA25BEA0E30EA03 +C012147C9315>I<000EEBC1C0001313E3392301C3E0384381C1384701C0156039870380 +40120EA3391C070080A3EC0100A21306EB0F02000C5B380E13083803E1F01B147C931E> +I<38038380380CC440381068E013711220EB70C03840E0001200A3485AA3144038638080 +12F3EB810012E5EA84C6EA787813147D9315>I<000E13C0001313E0382301C0EA4381EA +4701A238870380120EA3381C0700A4130E1218A2EA1C1EEA0C3CEA07DCEA001CA25B12F0 +5BEAE060485AEA4380003EC7FC131D7C9316>I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fd cmr9 9 40 +/Fd 40 122 df<126012F012F812681208A31210A212201240050B7D990B>39 +D<1380EA010012025A120C120812185AA35AA412E0AA1260A47EA37E1208120C12047E7E +EA008009267D9B0F>I<7E12407E7E12181208120C7EA37EA41380AA1300A41206A35A12 +08121812105A5A5A09267E9B0F>I<126012F0A212701210A31220A21240A2040B7D830B> +44 D<126012F0A2126004047D830B>46 D<130CA2131C1318A213381330A213701360A2 +13E013C0A212011380A2120313005A1206A2120E120CA2121C1218A212381230A2127012 +60A212E05AA20E257E9B13>II<12035AB4FC1207B3A2EA +7FF80D187D9713>I +51 D54 +D<126012F0A212601200A8126012F0A2126004107D8F0B>58 D67 D70 +D73 D<137F3801C1C038070070000E7F487F00 +3C131E0038130E0078130F00707F00F01480A80078EB0F00A20038130E003C131E001C13 +1C6C5B6C5B3801C1C0D8007FC7FC191A7E991E>79 D82 DI<007FB5FC38701C0700401301A200C0148000801300A300001400B13803FFE0191A7F +991C>I<1220A21240A21280A312E012F0A21260040B7D990B>96 +DI<12FC121CA913FCEA1D07381E0380381C01C0130014E0A6EB01C014 +80381E0300EA1906EA10F8131A809915>II<133F1307A9EA03E7EA0C17EA180F487E127012 +E0A6126012706C5AEA1C373807C7E0131A7F9915>IIII<12FC121CA9137CEA1D87381E0380A2121CAB38FF9FF0 +141A809915>I<1218123CA212181200A612FC121CAE12FF081A80990A>I<12FC121CB3A6 +EAFF80091A80990A>108 D<38FC7C1F391D8E6380391E0781C0A2001C1301AB39FF9FE7 +F81D107F8F20>II +II +114 DI<1208A41218A21238EAFFC0EA3800A81320A41218EA +1C40EA07800B177F960F>I<38FC1F80EA1C03AB1307120CEA0E0B3803F3F01410808F15> +I<38FF0F80383C0700EA1C061304A26C5AA26C5AA3EA03A0A2EA01C0A36C5A11107F8F14 +>I<39FE7F1F8039381C0700003C1306381C0C04130E380E16081317A238072310149013 +A33803C1A014E0380180C0A319107F8F1C>I<38FF0F80383C0700EA1C061304A26C5AA2 +6C5AA3EA03A0A2EA01C0A36C5AA248C7FCA212E112E212E4127811177F8F14>121 +D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fe cmr6 6 7 +/Fe 7 56 df<1218127812981218AC12FF08107D8F0F>49 D<121FEA6180EA40C0EA8060 +12C01200A213C0EA0180EA030012065AEA10201220EA7FC012FF0B107F8F0F>I<121FEA +2180EA60C0A212001380EA0100121FEA00801340136012C0A2EA8040EA6080EA1F000B10 +7F8F0F>IIII<1240EA7FF013E0EA8040A2EA0080EA01 +001202A212061204A2120CA50C117F900F>I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Ff cmr8 8 7 +/Ff 7 56 df<1206120E12FE120EB1EAFFE00B157D9412>49 DII<1330A213 +7013F012011370120212041208121812101220124012C0EAFFFEEA0070A5EA03FE0F157F +9412>III<1240EA7FFE13FC13F8EAC008EA80101320EA00401380A2EA01005AA21202 +1206A2120EA512040F167E9512>I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fg cmsy10 10.95 4 +/Fg 4 107 df0 D15 D<1506A481A2ED0180ED00C016E016 +701638B8FCA2C91238167016E016C0ED0180ED0300A21506A428187D962E>33 +D<12C0B3B3A9022D7BA10D>106 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fh cmbx12 12 44 +/Fh 44 122 df<1238127C12FE12FFA2127F123B1203A31206A2120C121C121812701220 +08117CA210>39 D<1238127C12FEA3127C123807077C8610>46 D<13FE3807FFC0380F83 +E0381F01F0383E00F8A248137CA312FC147EAD007C137CA36C13F8A2381F01F0380F83E0 +3807FFC03800FE0017207E9F1C>48 D<13181378EA01F812FFA21201B3A7387FFFE0A213 +207C9F1C>II<13FE3807FFC0380F07E0381E03F0123FEB +81F8A3EA1F0314F0120014E0EB07C0EB1F803801FE007F380007C0EB01F014F8EB00FCA2 +003C13FE127EB4FCA314FCEA7E01007813F8381E07F0380FFFC03801FE0017207E9F1C> +I<14E013011303A21307130F131FA21337137713E7EA01C71387EA03071207120E120C12 +181238127012E0B6FCA2380007E0A790B5FCA218207E9F1C>I<00301320383E01E0383F +FFC0148014005B13F8EA33C00030C7FCA4EA31FCEA37FF383E0FC0383807E0EA30030000 +13F0A214F8A21238127C12FEA200FC13F0A2387007E0003013C0383C1F80380FFF00EA03 +F815207D9F1C>II<12601278387FFFFEA2 +14FC14F8A214F038E0006014C038C00180EB0300A2EA00065B131C131813381378A25BA3 +1201A31203A76C5A17227DA11C>I<13FE3803FFC0380703E0380E00F05A1478123C123E +123F1380EBE0F0381FF9E0EBFFC06C13806C13C06C13E04813F0381E7FF8383C1FFCEA78 +07EB01FEEAF000143E141EA36C131C007813387E001F13F0380FFFC00001130017207E9F +1C>II63 D68 DI72 D79 +DI82 D<007FB61280A2397E03F80F0078140700701403006014 +0100E015C0A200C01400A400001500B3A248B512F0A222227EA127>84 +DI87 +D97 DIII<13FE3807FF80380F87C0381E01 +E0003E13F0EA7C0014F812FCA2B5FCA200FCC7FCA3127CA2127E003E13186C1330380FC0 +703803FFC0C6130015167E951A>I<3801FE0F3907FFBF80380F87C7381F03E7391E01E0 +00003E7FA5001E5BEA1F03380F87C0EBFF80D809FEC7FC0018C8FCA2121C381FFFE06C13 +F86C13FE001F7F383C003F48EB0F80481307A40078EB0F006C131E001F137C6CB45A0001 +13C019217F951C>103 DI<121C123E127FA3123E121CC7FCA7B4FCA2121FB2EAFFE0 +A20B247EA310>I107 +DI<3AFF07F007F090391FFC1FFC3A1F303E30 +3E01401340496C487EA201001300AE3BFFE0FFE0FFE0A22B167E9530>I<38FF07E0EB1F +F8381F307CEB403CEB803EA21300AE39FFE1FFC0A21A167E951F>I<13FE3807FFC0380F +83E0381E00F0003E13F848137CA300FC137EA7007C137CA26C13F8381F01F0380F83E038 +07FFC03800FE0017167E951C>I<38FF0FE0EB3FF8381FE07CEB803E497E1580A2EC0FC0 +A8EC1F80A29038803F00EBC03EEBE0FCEB3FF8EB0FC090C8FCA8EAFFE0A21A207E951F> +I114 +DI<487EA412 +03A21207A2120F123FB5FCA2EA0F80ABEB8180A5EB8300EA07C3EA03FEEA00F811207F9F +16>I<38FF01FEA2381F003EAF147E14FE380F81BE3907FF3FC0EA01FC1A167E951F>I<39 +FFE01FE0A2391F800700000F1306EBC00E0007130C13E000035BA26C6C5AA26C6C5AA2EB +7CC0A2137F6D5AA26DC7FCA2130EA21B167F951E>I<3AFFE3FF07F8A23A1F007800C090 +38807C01000F1580A23A07C07E030014DE5D3903E1DF06148FD801F1138CEBF307A2D800 +FF13D8EBFE0315F890387C01F0A2013C5BEB3800A225167F9528>I<39FFE07FC0A2390F +801C006C6C5A6C6C5AEBF0606C6C5A3800F980137F6DC7FC7F80497E1337EB63E0EBC1F0 +3801C0F848487E3807007E000E133E39FF80FFE0A21B167F951E>I<39FFE01FE0A2391F +800700000F1306EBC00E0007130C13E000035BA26C6C5AA26C6C5AA2EB7CC0A2137F6D5A +A26DC7FCA2130EA2130CA25B1278EAFC3813305BEA69C0EA7F80001FC8FC1B207F951E> +I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fi cmtt10 10.95 87 +/Fi 87 123 df<127012F8B012701200A5127012F8A31270051C779B18>33 +DI +I<13C01201A3EA07F0EA1FFC487EEA7DDF3871C780EAF1C3EAE1C7A338F1C0001279127F +6C7EEA0FF8EA03FC6C7E13CFEBC780EA61C312F1A212E1EAF1C73871CF00EA7DDFEA3FFE +EA1FF8EA07F0EA01C0A3120011247D9F18>III<1238127C127EA2123E120EA3121E123C127812F812F012C0070E789B18>I<1370 +13F01201EA03C0EA0780EA0F00121E121C123C123812781270A212F05AA87E1270A21278 +1238123C121C121E7EEA0780EA03C0EA01F0120013700C24799F18>I<126012F012787E +7E7EEA0780120313C0120113E01200A213F01370A813F013E0A2120113C0120313801207 +EA0F00121E5A5A5A12600C247C9F18>II<1360 +13F0A7387FFFC0B512E0A26C13C03800F000A7136013147E9718>I<123C127E127FA312 +3F120F120E121E127C12F81270080C788518>I<387FFFC0B512E0A26C13C013047E8F18> +I<127812FCA412780606778518>I<1303EB0780130FA214005BA2133EA2133C137CA25B +A25B1201A2485AA2485AA25B120FA248C7FCA2121E123EA25AA2127812F8A25A12601124 +7D9F18>I +IIII<131F5B1377A213E7120113C7EA038712071307120E121E123C1238127812F0B512 +F8A338000700A6EB7FF0A3151C7F9B18>I<383FFF80A30038C7FCA8EA3BFCEA3FFE7F38 +3E0780383803C0380001E01300A2126012F0130100E013C0EAF003387C0F80383FFF006C +5AEA07F8131C7E9B18>I<137E48B4FC00071380380FC3C0EA1F03123C383801800078C7 +FC1270A2EAF3F8EAEFFEB5FC38FE0F8038F803C0EAF00114E0EAE000A27E127013010078 +13C0EA3C03381E0F80380FFF006C5AEA03F8131C7E9B18>I<12E0B512E0A338E0038013 +0738000F00131E5B13381378137013F05B12015BA212035BA3120790C7FCA7131D7E9C18 +>III<127812FCA412781200A8127812FCA4 +12780614779318>I<123C127EA4123C1200A81238127C127EA3123E120E121E123C1278 +12F01260071A789318>I<14C0EB03E01307EB1FC0EB3F80EBFE00485AEA07F0485AEA3F +8048C7FC12FCA2127F6C7EEA0FE06C7EEA01FC6C7EEB3F80EB1FC0EB07E01303EB00C013 +187E9918>I<387FFFC0B512E0A26C13C0C8FCA4387FFFC0B512E0A26C13C0130C7E9318> +I<126012F87E127F6C7EEA0FE06C7EEA01FC6C7EEB3F80EB1FC0EB07E0A2EB1FC0EB3F80 +EBFE00485AEA07F0485AEA3F8048C7FC12FC5A126013187E9918>II<13FCEA03FE487E380F8780381E03C0EA3C3FEA387F3878FFE0EA71E3 +13C112F3EAE380A6EAF3C1007113C013E33878FF8038387F00EA3C3E381E00E0EA0F83EA +07FF6C13803800FE00131C7E9B18>I<137013F8A213D8A2EA01DCA3138CEA038EA4EA07 +07A5380FFF80A3EA0E03381C01C0A3387F07F000FF13F8007F13F0151C7F9B18>II<3801FCE0EA03FE +EA07FFEA0F07EA1E03EA3C01EA78001270A200F013005AA87E007013E0A21278EA3C0100 +1E13C0EA0F073807FF806C1300EA01FC131C7E9B18>IIII<3801F9C0EA07FF5AEA1F0FEA1C03123CEA78011270 +A200F0C7FC5AA5EB0FF0131F130F38F001C0127013031278123CEA1C07EA1F0FEA0FFFEA +07FDEA01F9141C7E9B18>I<387F07F038FF8FF8387F07F0381C01C0A9EA1FFFA3EA1C01 +AA387F07F038FF8FF8387F07F0151C7F9B18>II<3801FFC0A338000E00B2126012F0131E5BEA7FFC6C5A +EA1FE0121C7D9B18>I<387F07F038FF87F8387F07F0381C03C0EB078014005B131E5B13 +3813785B121D7F121F13BC131CEA1E1E130EEA1C0F7F1480130314C01301387F03F038FF +87F8387F03F0151C7F9B18>II<38FC +01F8EAFE03A2383B06E0A4138EA2EA398CA213DCA3EA38D8A213F81370A21300A638FE03 +F8A3151C7F9B18>I<387E07F038FF0FF8387F07F0381D81C0A313C1121CA213E1A31361 +1371A213311339A31319A2131D130DA3EA7F07EAFF87EA7F03151C7F9B18>IIIII<3807F9C0EA1FFF5AEA7C0FEA7003EAF00112E0A290C7FC7E127812 +3FEA1FF0EA0FFEEA01FF38001F80EB03C0EB01E01300A2126012E0130100F013C0EAFC07 +B512801400EAE7FC131C7E9B18>I<387FFFF8B5FCA238E07038A400001300B2EA07FFA3 +151C7F9B18>I<38FF83FEA3381C0070B2001E13F0000E13E0EA0F013807C7C03803FF80 +6C1300EA007C171C809B18>I<38FE03F8EAFF07EAFE03383C01E0001C13C0A3EA1E0300 +0E1380A438070700A4EA038EA4EA018C13DCA3EA00D813F8A21370151C7F9B18>I<38FE +03F8A338700070A36C13E0A513F8EA39FC13DCA2001913C0A3138CA2EA1D8DA31305000D +1380EA0F07A2EA0E03151C7F9B18>I<38FE03F8EAFF07EAFE03381C01C0EA1E03000E13 +80EA0F0700071300A2EA038EA2EA01DCA3EA00F8A21370A9EA01FC487E6C5A151C7F9B18 +>89 D<383FFFE05AA2387001C01303EB07801400C65A131E131C133C5B137013F0485A5B +1203485A90C7FC5A001E13E0121C123C5A1270B5FCA3131C7E9B18>II<126012F07EA21278127CA27EA2121E121FA26C7EA21207 +7FA26C7EA26C7EA212007FA2137CA2133C133EA27FA27F1480A21307EB030011247D9F18 +>II<387FFFC0B512E0A26C13C013047E7F +18>95 D97 D<127E12FE127E120EA5 +133EEBFF80000F13C0EBE3E0EB80F0EB00701478000E1338A5120F14781470EB80F0EBC3 +E0EBFFC0000E138038067E00151C809B18>IIIII<3803F1F03807FFF85A38 +1E1F30383C0F00EA3807A5EA3C0FEA1E1EEA1FFC485AEA3BF00038C7FC123CEA1FFF14C0 +4813E0387801F038F00078481338A36C1378007813F0EA7E03383FFFE0000F13803803FE +00151F7F9318>I<127E12FE127E120EA5133FEBFF80000F13C0EBE1E013801300A2120E +AA387FC7FC38FFE7FE387FC7FC171C809B18>II<1338137CA313381300A4EA0FFCA3EA001CB3A3 +133CEA6038EAF078EAFFF0EA7FE0EA3FC00E277E9C18>I<127E12FE127E120EA5EB3FF0 +A3EB0780EB0F00131E5B5B5BEA0FF87F139C131EEA0E0FEB0780130314C0387FC7F812FF +127F151C7F9B18>II<38FBE3E038FFF7F0EB +FFF8383E3E38EA3C3CA2EA3838AB38FE3E3EEB7E7EEB3E3E1714809318>I +III<3803F380EA0FFBEA1FFFEA3E1FEA780FEA +700712F0EAE003A6EAF0071270EA780FEA3E1FEA1FFFEA0FFBEA03F3EA0003A7EB1FF0EB +3FF8EB1FF0151E7E9318>I<38FF0FC0EB3FF0137FEA07F8EBE060EBC0005BA390C7FCA8 +EAFFFC7F5B14147E9318>II< +487E1203A4387FFFC0B5FCA238038000A9144014E0A21381EBC3C0EA01FF6C1380EB7E00 +13197F9818>I<387E07E0EAFE0FEA7E07EA0E00AC1301EA0F073807FFFC6C13FE3801FC +FC1714809318>I<387F8FF000FF13F8007F13F0381C01C0380E0380A338070700A3138F +EA038EA3EA01DCA3EA00F8A2137015147F9318>I<38FF07F8138F1307383800E0A4381C +01C0137113F9A213D9EA1DDD000D1380A3138DEA0F8FA23807070015147F9318>I<387F +8FF0139F138F380F0700EA078EEA039EEA01DC13F81200137013F07FEA01DCEA039E138E +EA0707000E1380387F8FF000FF13F8007F13F015147F9318>I<387F8FF000FF13F8007F +13F0380E01C0EB0380A21207EB0700A2EA0387A2138EEA01CEA213CC120013DC1378A313 +70A313F05B1279EA7BC0EA7F806CC7FC121E151E7F9318>I<383FFFF05AA2387001E0EB +03C0EB078038000F00131E137C5B485A485AEA0780380F0070121E5A5AB512F0A314147F +9318>I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fj cmtt9 9 29 +/Fj 29 123 df45 D<127012F8A312700505798414>I<130613 +0E131E131C133C133813781370A213F013E0120113C012031380120713005A120E121E12 +1CA2123C12381278127012F05AA20F1D7E9914>I51 D<127012F8A312701200A6127012F8A312700510798F14> +58 D64 +D97 D<12FCA2121CA513F8EA1FFE130F381E0780EA1C0314C01301 +A41303001E13801307381F0F0013FEEA1CF81217809614>II<137EA2130EA5 +EA07CEEA1FFEEA3C3EEA781EEA700E12F012E0A412F0EA701E1278EA3C3E381FFFC0EA07 +CF12177F9614>II<13FCEA01FEEA078E13041300A3EAFF +FEA2EA0700ACEAFFF8A20F177F9614>II<12FCA2121CA51378EA1DFEEA1F8FEA1E07A2121C +A938FF9FE0A21317809614>I<1203EA0780A2EA0300C7FCA4EAFF80A21203ACEAFFFCA2 +0E187D9714>I<12FCA2121CA5EBFFC0A2EB3E005B5BEA1DF0EA1FE0A27F1370EA1E78EA +1C3C7FA238FF3FC0A21217809614>107 DIIIII114 +DI<120EA5EAFFFCA2EA0E00A8130EA3EA0F1EEA07FC +EA01F00F157F9414>II<38 +FF7F80A2383C1E00EA1C1CA36C5AA3EA0630EA0770A36C5AA311107F8F14>I<38FF7F80 +A238700700EA380EA3EA39CEA3EA1B6C121AA3EA1E7CA2EA0E3811107F8F14>I<38FF7F +80A2381C0E005BA2120E5BA212071330A2EA0370A25B1201A25BA3485A12730077C7FC12 +7E123C11187F8F14>121 DI E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fk cmsy6 6 1 +/Fk 1 4 df<120CA2EACCC012EDEA7F80EA0C00EA7F80EAEDC012CCEA0C00A20A0B7D8B +10>3 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fl cmr10 10.95 81 +/Fl 81 127 df<90381F83E09038F06E303901C07878380380F8903800F03048EB7000A7 +B612803907007000B2383FE3FF1D20809F1B>11 D<133FEBE0C0EA01C0380381E0EA0701 +A290C7FCA6B512E0EA0700B2383FC3FC1620809F19>I<90381F81F89038F04F043901C0 +7C06390380F80FEB00F05A0270C7FCA6B7FC3907007007B23A3FE3FE3FE02320809F26> +14 D<127012F8A71270AA1220A51200A5127012F8A3127005217CA00D>33 +DI<9038018030A301031370EC0060A44913E001065BA4EB0E01010C5BB71280A22600 +1803C7FCEB3807EB3006A4EB700EEB600CB71280A22600C018C7FC00011338EB8030A400 +031370EB0060A34813E000065BA321297E9F26>I<127012F812FCA212741204A31208A2 +1210A212201240060E7C9F0D>39 D<13401380EA01005A12061204120C5AA212381230A2 +12701260A412E0AC1260A412701230A212381218A27E120412067E7EEA008013400A2E7B +A112>I<7E12407E12307E1208120C7EA212077EA213801201A413C0AC1380A412031300 +A25A1206A25A120812185A12205A5A0A2E7EA112>I<127012F012F8A212781208A31210 +A31220A21240050E7C840D>44 DI<127012F8A3127005057C84 +0D>I<14C0A213011480A2130314005B1306A2130E130CA2131C131813381330A2137013 +60A213E05B12015BA2120390C7FCA25A1206120E120CA2121C1218A21238123012701260 +A212E05AA2122D7EA117>II<13801203120F +12F31203B3A6EA07C0EA7FFE0F1E7C9D17>III<1306A2130EA2131E132E +A2134E138EA2EA010E1202A212041208A212101220A2124012C0B512F038000E00A7EBFF +E0141E7F9D17>II<137CEA0182EA0701380E0380EA0C0712183838030090C7FC12781270A2EAF1F0 +EAF21CEAF406EAF807EB0380A200F013C0A51270A214801238EB07001218EA0C0E6C5AEA +01F0121F7E9D17>I<1240387FFFE014C0A23840008038800100A21302485AA25B5BA25B +A21360A213E05B1201A41203A76C5A131F7E9D17>I +I +I<127012F8A312701200AA127012F8A3127005147C930D>I<127012F8A312701200AA12 +7012F012F8A212781208A31210A31220A21240051D7C930D>I63 DI<5B497EA3497EA3EB09E0A3EB10F0A3EB2078A3497EA2EB +C03EEB801EA248B5FCEB000FA20002EB0780A348EB03C0A2120C001E14E039FF801FFE1F +207F9F22>II<90380FE010 +9038381C309038E002703803C00139078000F048C71270121E15305A1510127C127800F8 +1400A91278007C1410123CA26C1420A27E6C6C13406C6C13803900E00300EB380CEB0FF0 +1C217E9F21>IIII<90 +380FE02090387818609038E004E03803800238070001481300001E1460A25A1520127C12 +7800F81400A7EC7FFCEC03E000781301127C123CA27EA27E7E380380023900E004609038 +78182090380FE0001E217D9F24>I<39FFF07FF8390F000780AD90B5FCEB0007AF39FFF0 +7FF81D1F7E9E22>II<3807FFC038003E00131E +B3A3122012F8A3EAF01CEA403CEA6038EA1070EA0FC012207F9E17>I76 +DIIII< +B512E0380F80780007131E80EC0780A215C0A41580A2EC0F00141E1478EBFFE0EB806014 +38143C141C141EA3141FA315011581140F390FC0078239FFFC03C4C812F820207F9E22> +82 D<3803F040380C0CC0EA1803EA3001EA6000A212E01440A36C13007E127CEA7F80EA +3FF86CB4FC00071380C613C0EB1FE013031301EB00F014707EA46C136014E06C13C038F8 +018038C60300EA81FC14217E9F19>I<007FB512E038780F010060EB006000401420A200 +C0143000801410A400001400B3497E3803FFFC1C1F7E9E21>I<39FFF00FF8390F0003E0 +EC0080B3A46CEB01001380120314026C6C5A6C6C5AEB3830EB0FC01D207E9E22>I<39FF +F003FE391F8000F86CC7126015206C6C1340A36C6C1380A2EBE00100011400A23800F002 +A213F8EB7804A26D5AA36D5AA2131F6D5AA2EB07C0A36D5AA36DC7FC1F207F9E22>I<3B +FFF07FF81FF03B1F000FC007C06C903907800180170015C001805C00071502EC09E013C0 +00035DEC19F01410D801E05CA2EC2078D800F05CA2EC403C01785CA2EC801E017C146001 +3C144090383D000F133F6D5CA2011E1307010E91C7FCA2010C7F010413022C207F9E2F> +I<39FFF001FF391F800078000F146012076D1340000314807F3901F001001200EBF802EB +7C06EB3C04EB3E08131EEB1F10EB0FB0EB07A014E06D5AACEB3FFC201F7F9E22>89 +D<12FFA212C0B3B3A512FFA2082D7CA10D>91 DI<12FFA21203B3B3A512FFA2082D80 +A10D>I<120812101220A21240A21280A312B812FCA2127C1238060E7D9F0D>96 +DI<121C12FC121CAA137CEA1D87381E0180EB00 +C0001C13E01470A21478A6147014F014E0001E13C0381A018038198700EA107C15207E9F +19>IIII<137CEA01C6EA030F1207EA0E061300A7EAFFF0EA0E00B2EA7FE010 +20809F0E>I<14E03803E330EA0E3CEA1C1C38380E00EA780FA5EA380E6C5AEA1E38EA33 +E00020C7FCA21230A2EA3FFE381FFF8014C0383001E038600070481330A4006013606C13 +C0381C03803803FC00141F7F9417>I<121C12FC121CAA137C1386EA1D03001E1380A212 +1CAE38FF8FF014207E9F19>I<1238127CA31238C7FCA6121C12FC121CB1EAFF80091F7F +9E0C>I<13E0EA01F0A3EA00E01300A61370EA07F012001370B3A31260EAF06013C0EA61 +80EA3F000C28829E0E>I<121C12FC121CAAEB1FE0EB0780EB060013045B5B5B136013E0 +EA1DF0EA1E70EA1C38133C131C7F130F7F148014C038FF9FF014207E9F18>I<121C12FC +121CB3ABEAFF8009207F9F0C>I<391C3E03E039FCC30C30391D019018001EEBE01CA200 +1C13C0AE3AFF8FF8FF8021147E9326>IIII<3801F04038070CC0EA0E02EA1C03EA38011278127012F0A61270 +12781238EA1C03EA0C05EA0709EA01F1EA0001A8EB0FF8151D7F9318>III<1202A31206A2120EA2123EEAFFF8EA0E00AB1304A5EA07081203EA01F00E1C7F +9B12>I<381C0380EAFC1FEA1C03AE1307120CEA061B3803E3F014147E9319>I<38FF83F8 +383E00E0001C13C06C1380A338070100A21383EA0382A2EA01C4A213E4EA00E8A21370A3 +132015147F9318>I<39FF9FE1FC393C078070391C030060EC8020000E1440A214C0D807 +04138014E0A239038861001471A23801D032143A143E3800E01CA2EB6018EB40081E147F +9321>I<38FF87F8381E03C0380E0180EB0300EA0702EA0384EA01C813D8EA00F0137013 +7813F8139CEA010E1202EA060738040380000C13C0003C13E038FE07FC16147F9318>I< +38FF83F8383E00E0001C13C06C1380A338070100A21383EA0382A2EA01C4A213E4EA00E8 +A21370A31320A25BA3EAF080A200F1C7FC1262123C151D7F9318>III126 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fm cmbx10 10.95 55 +/Fm 55 122 df12 D34 D45 D48 D<137013F0120712FF12F91201B3A4387FFFC0A2121D7D9C1A>IIII<001C13E0EA1FFF14C01480140013FC13C00018C7FCA4EA19FE381FFF80381E07C038 +1C03E0381801F0120014F8A2127812FCA314F0EA7803007013E0383C0FC0380FFF00EA03 +FC151D7E9C1A>I<133F3801FFC03807C0E0EA0F81381F03F0121E123E127CEB01E090C7 +FCEAFC1013FF00FD13C0EB03E038FE01F0A200FC13F8A4127CA3003C13F0123E381E03E0 +380F07C03807FF803801FE00151D7E9C1A>I<1260387FFFF8A214F014E014C0EAE00138 +C00380EB0700130EC65A131813385BA213F0A2485AA21203A31207A76C5A151E7D9D1A> +III<1238127C12FE +A3127C12381200A61238127C12FEA3127C123807147C930F>I<14E0A2497EA3497EA2EB +06FCA2EB0EFEEB0C7EA2497EA201307F141F01707FEB600FA2496C7E90B5FC4880EB8003 +000380EB0001A200066D7EA2000E803AFFE00FFFE0A2231F7E9E28>65 +D<903807FC0290383FFF0E9038FE03DE3903F000FE4848133E4848131E485A48C7120EA2 +481406127EA200FE1400A7127E1506127F7E150C6C7E6C6C13186C6C13386C6C13703900 +FE01C090383FFF80903807FC001F1F7D9E26>67 DIII<903807FC0290383FFF0E9038FE03DE3903F000FE4848133E +4848131E485A48C7120EA2481406127EA200FE91C7FCA591381FFFE0A2007E9038007E00 +A2127F7EA26C7E6C7E6C7E6C6C13FE3800FE0190383FFF8E903807FC06231F7D9E29>I< +B5380FFFF0A23A07E0007E00AC90B512FEA29038E0007EADB5380FFFF0A2241F7E9E29> +II76 DI< +D8FFE0EBFFF07FD807F8EB06007F7F1206137FEB3F80EB1FC0EB0FE0A2EB07F0EB03F8EB +01FCEB00FE147FA2EC3F86EC1FC6EC0FE6EC07F6EC03FEA214011400157E153E151EA2D8 +FFF0130E1506241F7E9E29>III82 D<3803FC08380FFF38381E03F8EA3800481378143812F0 +1418A26C13007EEA7FC013FE383FFF806C13C06C13E06C13F0C613F81307EB00FC147C14 +3C12C0A36C1338147800F8137038FE01E038EFFFC000811300161F7D9E1D>I<007FB512 +FCA2397C07E07C0070141C0060140CA200E0140E00C01406A400001400B10003B512C0A2 +1F1E7E9D24>II<00041380EA0C0138180300EA30 +06EA700EEA600CA2485AA238DC1B8038FE1FC000FF13E0A2EA7F0F383E07C0381C038013 +107B9F1B>92 D97 +DI +IIII<3803FC3C380FFFFE381E079E383C03DE007C13E0A5003C +13C0381E0780381FFF00EA13FC0030C7FCA21238383FFF806C13F06C13F84813FC387800 +7C0070133E00F0131EA30078133CA2383F01F8380FFFE000011300171E7F931A>II<121C12 +7FA5121CC7FCA6B4FCA2121FB0EAFFE0A20B217EA00E>I107 DI<3AFE0F +E03F8090391FF07FC03A1E70F9C3E09039407D01F0EB807E121FEB007CAC3AFFE3FF8FFE +A227147D932C>I<38FE0FC0EB3FE0381E61F0EBC0F81380EA1F00AD38FFE7FFA218147D +931D>I<48B4FC000713C0381F83F0383E00F8A248137CA200FC137EA6007C137CA26C13 +F8A2381F83F03807FFC00001130017147F931A>I<38FF1FC0EB7FF0381FE1F8EB80FCEB +007EA2143E143FA6143E147E147CEB80FCEBC1F8EB7FE0EB1F8090C7FCA7EAFFE0A2181D +7E931D>I114 DI<1203A45AA2 +5AA2123FEAFFFCA2EA1F00AA1306A5EA0F8CEA07F8EA03F00F1D7F9C14>I<38FF07F8A2 +EA1F00AD1301A2EA0F063807FCFF6C5A18147D931D>I<39FFE07F80A2391F001C00380F +8018A26C6C5AA26C6C5AA2EBF0E000015B13F900005B13FF6DC7FCA2133EA2131CA21914 +7F931C>I<3AFFC7FE1FE0A23A1F00F0030014F8D80F801306A29038C1BC0E0007140CEB +C3BE3903E31E18A29038F60F380001143001FE13B03900FC07E0A2EBF80301785BA29038 +30018023147F9326>I<38FFC0FFA2380F80703807C0606D5A3803E180EA01F36CB4C7FC +137E133E133F497E136FEBC7C0380183E0380381F048C67E000E7F39FF81FF80A219147F +931C>I<39FFE07F80A2391F001C00380F8018A26C6C5AA26C6C5AA2EBF0E000015B13F9 +00005B13FF6DC7FCA2133EA2131CA21318A2EA783012FC5BEAC0E0EAE1C0EA7F80001EC8 +FC191D7F931C>I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fn cmbx12 14.4 49 +/Fn 49 121 df<49B4FC011F13C090387F81E0EBFC013901F807F01203EA07F0A4EC01C0 +91C8FCA3EC3FF8B6FCA33807F003B3A33A7FFF3FFF80A3212A7FA925>12 +D<003C13F0387F01FC38FF83FEA2EBC3FFA3EA7FC1383EC0FB00001303A238018006A338 +03000CA200061318000E13384813704813E00010134018157EA923>34 +D45 D48 D<130E131E137EEA07FE12FFA212F81200B3ABB512 +FEA317277BA622>III<140FA2 +5C5C5C5C5BA2EB03BFEB073F130E131C133C1338137013E0EA01C0EA038012071300120E +5A5A5A12F0B612F8A3C7EA7F00A890381FFFF8A31D277EA622>I<00181303381F801FEB +FFFE5C5C5C14C091C7FC001CC8FCA7EB7FC0381DFFF8381F80FC381E003F121CC7EA1F80 +15C0A215E0A21218127C12FEA315C05A0078EB3F80A26CEB7F00381F01FE6CB45A000313 +F0C613801B277DA622>II<1238123E003FB512F0A34814E015C0A215803970000F00141E5C +48133814785CC6485A495A5C130749C7FCA25B131E133EA2137EA2137C13FCA41201A8EA +00701C297CA822>III<91387FE003903907FFFC07011FEB +FF0F90397FF00F9F9039FF0001FFD801FC7F4848147F4848143F4848141F485A160F485A +1607127FA290C9FC5AA97E7F1607123FA26C7E160E6C7E6C6C141C6C6C143C6C6C14786C +B4EB01F090397FF007C0011FB512800107EBFE009038007FF028297CA831>67 +D69 DI<91387FE003903907FFFC07011FEBFF0F90397FF00F9F9039FF0001FFD801FC7F4848 +80484880484880485A82485A82127FA290CAFC5AA892B512F87E7F03001300123FA26C7E +A26C7E6C7E6C7E6C7E6CB45B90387FF007011FB5129F0107EBFE0F9039007FF0032D297C +A835>III76 +DIIII82 +D<9038FF80600003EBF0E0000F13F8381F80FD383F001F003E1307481303A200FC1301A2 +14007EA26C140013C0EA7FFCEBFFE06C13F86C13FE80000714806C14C0C6FC010F13E0EB +007FEC1FF0140F140700E01303A46C14E0A26C13076C14C0B4EB0F80EBE03F39E3FFFE00 +00E15B38C01FF01C297CA825>I<007FB71280A39039807F807FD87C00140F00781507A2 +0070150300F016C0A2481501A5C791C7FCB3A490B612C0A32A287EA72F>II<000213080007131C000E13384813700018 +13604813C0A238600180A338C00300A200DF137C38FF83FEEBC3FFA3EA7FC1A2383F80FE +380F003C181578A923>92 D<3803FF80000F13F0381F01FC383F80FE147F801580EA1F00 +C7FCA4EB3FFF3801FC3FEA0FE0EA1F80EA3F00127E5AA4145F007EEBDFC0393F839FFC38 +1FFE0F3803FC031E1B7E9A21>97 D99 DIII<9038FF80 +F00003EBE3F8390FC1FE1C391F007C7C48137E003EEB3E10007EEB3F00A6003E133E003F +137E6C137C380FC1F8380BFFE00018138090C8FC1238A2123C383FFFF814FF6C14C06C14 +E06C14F0121F383C0007007CEB01F8481300A4007CEB01F0A2003FEB07E0390FC01F806C +B5120038007FF01E287E9A22>II<1207EA1FC0EA3FE0A5 +EA1FC0EA0700C7FCA7EAFFE0A3120FB3A3EAFFFEA30F2B7EAA12>I108 D<26FFC07FEB1FC0903AC1FFC07FF0903AC307E0C1F8D80F +C49038F101FC9039C803F20001D801FE7F01D05BA201E05BB03CFFFE3FFF8FFFE0A3331B +7D9A38>I<38FFC07E9038C1FF809038C30FC0D80FC413E0EBC80701D813F013D0A213E0 +B039FFFE3FFFA3201B7D9A25>II<38FFE1FE9038EFFF809038FE0FE0390F +F803F09038F001F801E013FC140015FEA2157FA8157E15FEA215FC140101F013F89038F8 +07F09038FC0FE09038EFFF809038E1FC0001E0C7FCA9EAFFFEA320277E9A25>I<38FFC1 +F0EBC7FCEBC63E380FCC7F13D813D0A2EBF03EEBE000B0B5FCA3181B7F9A1B>114 +D<3803FE30380FFFF0EA3E03EA7800127000F01370A27E00FE1300EAFFE06CB4FC14C06C +13E06C13F0000713F8C6FCEB07FC130000E0137C143C7E14387E6C137038FF01E038E7FF +C000C11300161B7E9A1B>I<13E0A41201A31203A21207120F381FFFE0B5FCA2380FE000 +AD1470A73807F0E0000313C03801FF8038007F0014267FA51A>I<39FFE07FF0A3000F13 +07B2140FA2000713173903F067FF3801FFC738007F87201B7D9A25>I<39FFFC03FFA339 +0FF000F0000714E07F0003EB01C0A2EBFC0300011480EBFE070000140013FFEB7F0EA214 +9EEB3F9C14FC6D5AA26D5AA36D5AA26D5AA2201B7F9A23>I<3BFFFC7FFC1FFCA33B0FE0 +0FE001C02607F007EB0380A201F8EBF00700031600EC0FF801FC5C0001150EEC1FFC2600 +FE1C5B15FE9039FF387E3C017F1438EC787F6D486C5A16F0ECE01F011F5CA26D486C5AA2 +EC800701075CA22E1B7F9A31>I<39FFFC1FFEA33907F003803803F8079038FC0F003801 +FE1E00005BEB7F3814F86D5A6D5A130F806D7E130F497EEB3CFEEB38FFEB787F9038F03F +803901E01FC0D803C013E0EB800F39FFF03FFFA3201B7F9A23>I +E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fo cmr10 10 19 +/Fo 19 118 df<126012F0A2126004047C830C>46 D<007FB512C038700F010060130000 +401440A200C014201280A300001400B1497E3803FFFC1B1C7F9B1E>84 +D97 D99 DI< +EA07E0EA0C30EA1818EA300CEA700EEA600612E0EAFFFEEAE000A41260EA70021230EA18 +04EA0C18EA03E00F127F9112>I<13F8EA018CEA071E1206EA0E0C1300A6EAFFE0EA0E00 +B0EA7FE00F1D809C0D>II<12FC121CAA137C1387EA1D03001E138012 +1CAD38FF9FF0141D7F9C17>I<1218123CA21218C7FCA712FC121CB0EAFF80091D7F9C0C> +I<12FC121CAAEB0FE0EB0780EB06005B13105B5B13E0121DEA1E70EA1C781338133C131C +7F130F148038FF9FE0131D7F9C16>107 D<39FC7E07E0391C838838391D019018001EEB +E01C001C13C0AD3AFF8FF8FF8021127F9124>109 DIII114 +DI<1204A4120CA2121C123CEAFFE0EA1C00A9 +1310A5120CEA0E20EA03C00C1A7F9910>I<38FC1F80EA1C03AD1307120CEA0E1B3803E3 +F014127F9117>I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fp cmbx10 10 7 +/Fp 7 117 df65 D97 DII114 +DI<1203A45AA25AA2EA3FFC12FFEA1F00A9130C +A4EA0F08EA0798EA03F00E1A7F9913>I E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fq cmsy8 8 1 +/Fq 1 4 df<1202A3EAC218EAF278EA3AE0EA0F80A2EA3AE0EAF278EAC218EA0200A30D +0E7E8E12>3 D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fr cmr12 12 20 +/Fr 20 122 df<127012F8A3127005057C840E>46 D48 D50 D56 D<497EA3497EA3EB05E0A2EB09F01308A2EB1078A3497EA3497EA2EBC01F +497EA248B51280EB0007A20002EB03C0A348EB01E0A348EB00F0121C003EEB01F839FF80 +0FFF20237EA225>65 DI<3803FFE038001F007FB3A6127012F8A213 +0EEAF01EEA401C6C5AEA1870EA07C013237EA119>74 D97 D<120E12FE121E120EAB131FEB61C0EB8060380F0030000E1338143C14 +1C141EA7141C143C1438000F1370380C8060EB41C038083F0017237FA21B>II<14E0130F13011300ABEA01F8EA0704EA0C02EA1C01EA38 +001278127012F0A7127012781238EA1801EA0C0238070CF03801F0FE17237EA21B>II<390E1FC07F3AFE60E183803A1E +807201C03A0F003C00E0A2000E1338AF3AFFE3FF8FFE27157F942A>109 +D<380E1F8038FE60C0381E80E0380F0070A2120EAF38FFE7FF18157F941B>III +114 DI<000E137038FE07F0EA1E +00000E1370AD14F0A238060170380382783800FC7F18157F941B>117 +D<38FF80FE381E00781430000E1320A26C1340A2EB80C000031380A23801C100A2EA00E2 +A31374A21338A31310A25BA35B12F05B12F10043C7FC123C171F7F941A>121 +D E +%EndDVIPSBitmapFont +%DVIPSBitmapFont: Fs cmr17 17.28 17 +/Fs 17 118 df45 D68 +D<13FE380303C0380C00E00010137080003C133C003E131C141EA21208C7FCA3EB0FFEEB +FC1EEA03E0EA0F80EA1F00123E123C127C481404A3143EA21278007C135E6CEB8F08390F +0307F03903FC03E01E1F7D9E21>97 D99 D101 +DI<15F090387F03083901C1C41C380380E8390700700848EB78 +00001E7FA2003E133EA6001E133CA26C5B6C13706D5A3809C1C0D8087FC7FC0018C8FCA5 +121C7E380FFFF86C13FF6C1480390E000FC00018EB01E048EB00F000701470481438A500 +701470A26C14E06CEB01C00007EB07003801C01C38003FE01E2F7E9F21>II<120FEA1F80A4EA0F00C7FCABEA0780127FA2120F12 +07B3A6EA0FC0EAFFF8A20D307EAF12>I107 +D<260780FEEB1FC03BFF83078060F0903A8C03C180783B0F9001E2003CD807A013E4DA00 +F47F01C013F8A2495BB3A2486C486C133F3CFFFC1FFF83FFF0A2341F7E9E38>109 +D<380780FE39FF83078090388C03C0390F9001E0EA07A06E7E13C0A25BB3A2486C487E3A +FFFC1FFF80A2211F7E9E25>II<380781FC39FF860780 +90388801C0390F9000E0D807A0137001C01378497F153E151E151FA2811680A716005DA2 +151E153E153C6D5B01A013705D90389803C0D9860FC7FCEB81F80180C8FCAB487EEAFFFC +A2212D7E9E25>I<3801FC10380E0330381800F048137048133012E01410A37E6C130012 +7EEA3FF06CB4FC6C13C0000313E038003FF0EB01F813006C133CA2141C7EA27E14186C13 +38143000CC136038C301C03880FE00161F7E9E1A>115 D<1340A513C0A31201A2120312 +07120F381FFFE0B5FC3803C000B01410A80001132013E000001340EB78C0EB1F00142C7F +AB19>II E +%EndDVIPSBitmapFont +end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 300dpi +TeXDict begin +%%BeginPaperSize: a4 +a4 +%%EndPaperSize + +%%EndSetup +%%Page: 1 1 +1 0 bop 447 469 a Fs(Do)r(cumen)n(tation)20 b(of)i(the)g(sunet-pac)n(k) +l(age)633 595 y Fr(comp)q(osed)16 b(b)o(y)f(Andreas)i(Bernauer)1311 +577 y Fq(\003)800 697 y Fr(28.)22 b(Jan)o(uar)17 b(2002)880 +914 y Fp(Abstract)400 990 y Fo(This)h(do)q(cumen)o(t)f(con)o(tains)h +(informations)d(for)j(users)h(and)f(programmers)338 1040 +y(using)13 b(the)i(sunet)g(pac)o(k)n(age.)224 1183 y +Fn(Con)n(ten)n(ts)224 1285 y Fm(1)42 b(Ov)o(erview)1184 +b(3)292 1342 y Fl(1.1)46 b(What's)14 b(in)i(sunet?)31 +b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.) +h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)69 b(3)292 1398 y(1.2)46 +b(Obtaining)17 b(the)e(system)46 b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h +(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)69 +b(4)292 1455 y(1.3)46 b(What)14 b(is)i(in)g(this)g(do)q(cu?)45 +b(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.) +f(.)g(.)h(.)f(.)g(.)69 b(4)292 1511 y(1.4)46 b(Ho)o(w)14 +b(to)h(use)h(the)f(mo)q(dules)32 b(.)23 b(.)f(.)g(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)69 +b(5)224 1613 y Fm(2)42 b(HTTP)18 b(serv)o(er)1093 b(6)224 +1715 y(3)42 b(CGI)17 b(serv)o(er)1144 b(7)224 1817 y(4)42 +b(CGI)17 b(scripts)1134 b(8)224 1919 y(5)42 b(FTP)18 +b(serv)o(er)1137 b(9)292 1975 y Fl(5.1)46 b(What)14 b(users)i(w)o(an)o +(t)e(to)g(kno)o(w)34 b(.)22 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g +(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)69 b(9)224 2077 y +Fm(6)42 b(FTP)18 b(clien)o(t)1128 b(13)292 2133 y Fl(6.1)46 +b(What)14 b(users)i(w)o(an)o(t)e(to)g(kno)o(w)34 b(.)22 +b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f +(.)g(.)46 b(13)292 2190 y(6.2)g(What)14 b(programmers)g(w)o(an)o(t)g +(to)h(kno)o(w)e(.)22 b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h +(.)f(.)g(.)46 b(16)p 224 2229 598 2 v 275 2256 a Fk(\003)293 +2272 y Fj(bernauer@i)o(nfo)o(rm)o(ati)o(k.u)o(ni)o(-tu)o(eb)o(ing)o +(en.)o(de)960 2613 y Fl(1)p eop +%%Page: 2 2 +2 1 bop 224 286 a Fm(7)42 b(Reading)19 b(netrc-\014les)946 +b(19)292 343 y Fl(7.1)46 b(Ov)o(erview)c(.)23 b(.)f(.)g(.)h(.)f(.)h(.)f +(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.) +g(.)h(.)f(.)g(.)46 b(19)292 399 y(7.2)g(En)o(try)14 b(p)q(oin)o(ts)f(.) +22 b(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.) +f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)46 b(19)292 456 +y(7.3)g(Related)15 b(w)o(ork)34 b(.)22 b(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.) +g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g +(.)46 b(21)292 512 y(7.4)g(Desirable)16 b(things)d(.)23 +b(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h +(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)46 b(21)224 614 y Fm(8)c(Handle)19 +b(URIs)1073 b(22)292 671 y Fl(8.1)46 b(Ov)o(erview)c(.)23 +b(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h +(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)46 b(22)292 +727 y(8.2)g(Pro)q(cedures)e(.)22 b(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g +(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.) +46 b(22)224 829 y Fm(9)c(URL)1264 b(27)292 885 y Fl(9.1)46 +b(Ov)o(erview)c(.)23 b(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)46 +b(27)292 942 y(9.2)g(En)o(try)14 b(p)q(oin)o(ts)f(.)22 +b(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f +(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)46 b(27)224 1044 +y Fm(10)16 b(Handle)j(RF)o(C822)e(headers)815 b(30)292 +1100 y Fl(10.1)23 b(What)14 b(users)i(w)o(an)o(t)e(to)g(kno)o(w)34 +b(.)22 b(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.) +h(.)f(.)g(.)46 b(30)224 1202 y Fm(11)16 b(Using)i(NTP)1113 +b(34)224 1304 y(12)16 b(Using)i(SMTP)1075 b(35)224 1406 +y(13)16 b(Using)i(POP3)1089 b(36)224 1508 y(14)16 b(Manipulating)k +(strings)897 b(37)224 1610 y(15)16 b(Ev)m(aluating)k(expression)d(in)h +(\\safe")g(en)o(vironmen)o(ts)331 b(39)292 1666 y Fl(15.1)23 +b(Ov)o(erview)42 b(.)23 b(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)h +(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h(.)f(.)g(.)46 +b(39)292 1723 y(15.2)23 b(The)15 b Fi(loser)g Fl(pac)o(k)m(age)22 +b(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f +(.)h(.)f(.)g(.)h(.)f(.)g(.)46 b(39)292 1779 y(15.3)23 +b(The)15 b Fi(toothless)f Fl(pac)o(k)m(age)33 b(.)23 +b(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h(.)f(.)g(.)h +(.)f(.)g(.)46 b(39)292 1836 y(15.4)23 b(The)15 b Fi(toothless-eval)f +Fl(pac)o(k)m(age)19 b(.)k(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)g(.)h(.)f(.)h +(.)f(.)g(.)h(.)f(.)g(.)46 b(40)960 2613 y(2)p eop +%%Page: 3 3 +3 2 bop 224 286 a Fn(1)67 b(Ov)n(erview)224 390 y Fh(1.1)56 +b(What's)18 b(in)h(sunet?)224 475 y Fl(The)g(Sc)o(heme)h(Underground)g +(Net)o(w)o(ork)d(P)o(ac)o(k)m(age)i(con)o(tains)g(a)f(set)h(of)g +(libraries)h(for)224 532 y(doing)c(Net)f(hac)o(king)h(from)e(Sc)o +(heme/scsh.)21 b(It)15 b(includes:)247 619 y(An)g(sm)o(tp)g(clien)o(t)h +(library)l(.)338 675 y(F)l(orge)e(mail)i(from)f(the)g(comfort)f(of)h(y) +o(our)g(o)o(wn)f(Sc)o(heme)i(pro)q(cess.)247 763 y(rfc822)e(header)i +(library)338 819 y(Read)d(email-st)o(yle)i(headers.)20 +b(Useful)15 b(in)g(sev)o(eral)f(con)o(texts)f(\(sm)o(tp,)g(h)o(ttp,)g +(etc.\))247 907 y(Simple)k(structured)e(HTML)g(output)g(library)338 +963 y(Balanced)h(delimiters,)h(etc.)247 1051 y(The)e(SU)h(W)l(eb)f +(serv)o(er)338 1107 y(This)g(is)h(a)f(complete)g(implemen)o(tation)i +(of)d(an)h(HTTP)g(1.0)f(serv)o(er)g(in)i(Sc)o(heme.)338 +1164 y(The)d(serv)o(er)g(con)o(tains)h(other)f(standalone)h(pac)o(k)m +(ages)f(that)g(ma)o(y)f(separately)i(b)q(e)338 1220 y(of)h(use:)392 +1307 y Fg(\017)23 b Fl(URI)15 b(and)g(URL)g(parsers)g(and)h(unparsers.) +392 1374 y Fg(\017)23 b Fl(A)15 b(library)h(to)f(help)h(writing)g(CGI)f +(scripts)g(in)h(Sc)o(heme.)392 1441 y Fg(\017)23 b Fl(Serv)o(er)15 +b(extensions)h(for)e(in)o(terfacing)i(to)f(CGI)g(scripts.)392 +1508 y Fg(\017)23 b Fl(Serv)o(er)15 b(extensions)h(for)e(uploading)j +(Sc)o(heme)f(co)q(de.)338 1595 y(The)f(serv)o(er)g(has)g(three)g(main)h +(design)g(goals:)361 1682 y(Extensibilit)o(y)438 1739 +y(The)g(serv)o(er)g(is)h(in)g(fact)e(nothing)i(but)f(extensions,)h +(using)g(a)f(mec)o(hanism)438 1795 y(called)j(\\path)e(handlers")h(to)f +(de\014ne)i(URL-sp)q(eci\014c)g(services.)28 b(It)17 +b(has)h(a)438 1852 y(to)q(olkit)c(of)f(services)i(that)e(can)h(b)q(e)g +(used)h(as-is,)f(extended)h(or)e(built)i(up)q(on.)438 +1908 y(User)d(extensions)h(ha)o(v)o(e)f(exactly)g(the)h(same)e(status)h +(as)g(the)g(base)g(services.)438 1970 y(The)i(extension)h(mec)o(hanism) +g(allo)o(ws)g(for)f(easy)g(implemen)o(tation)h(of)f(new)438 +2026 y(services)22 b(without)e(the)h(o)o(v)o(erhead)g(of)f(the)h(CGI)g +(in)o(terface.)37 b(Since)22 b(the)438 2083 y(serv)o(er)16 +b(is)g(written)h(on)f(top)g(of)g(the)g(Sc)o(heme)h(shell,)h(the)e(full) +i(set)e(of)g(Unix)438 2139 y(system)f(calls)h(and)f(program)f(to)q(ols) +h(is)h(a)o(v)m(ailable)h(to)e(the)g(implemen)o(tor.)361 +2206 y(Mobile)h(co)q(de)438 2262 y(The)11 b(serv)o(er)f(allo)o(ws)h(Sc) +o(heme)g(co)q(de)g(to)f(b)q(e)h(uploaded)h(for)e(direct)h(execution)438 +2319 y(inside)16 b(the)f(serv)o(er.)k(The)c(serv)o(er)f(has)h(complete) +g(con)o(trol)g(o)o(v)o(er)f(the)g(co)q(de,)438 2375 y(and)i(can)h +(safely)g(execute)g(it)f(in)i(restricted)e(en)o(vironmen)o(ts)h(that)f +(do)g(not)438 2432 y(pro)o(vide)k(access)f(to)g(p)q(oten)o(tially)i +(dangerous)e(primitiv)o(es)i(\(suc)o(h)e(as)g(the)438 +2488 y(\\delete)d(\014le")g(pro)q(cedure.\))960 2613 +y(3)p eop +%%Page: 4 4 +4 3 bop 361 286 a Fl(Clarit)o(y)438 343 y(I)454 326 y +Ff(1)495 343 y Fl(wrote)19 b(this)j(serv)o(er)e(to)g(help)i(m)o(yself)f +(understand)g(the)g(W)l(eb.)36 b(It)21 b(is)438 399 y(v)o(oluminously)e +(commen)o(ted,)e(and)h(I)g(hop)q(e)g(it)g(will)h(pro)o(v)o(e)e(to)f(b)q +(e)j(an)e(aid)438 456 y(in)f(understanding)g(the)f(lo)o(w-lev)o(el)i +(details)f(of)f(the)g(W)l(eb)h(proto)q(cols.)438 521 +y(The)g(S.U.)g(serv)o(er)f(has)h(the)g(abilit)o(y)i(to)d(upload)i(co)q +(de)g(from)e(W)l(eb)h(clien)o(ts)438 577 y(and)e(execute)h(that)e(co)q +(de)h(on)g(b)q(ehalf)h(of)f(the)g(clien)o(t)h(in)g(a)f(protected)g(en)o +(vi-)438 633 y(ronmen)o(t.)438 698 y(Some)h(simple)i(do)q(cumen)o +(tation)e(on)g(the)h(serv)o(er)f(is)g(a)o(v)m(ailable.)224 +820 y Fh(1.2)56 b(Obtaining)18 b(the)g(system)224 906 +y Fl(The)e(net)o(w)o(ork)f(co)q(de)i(is)g(a)o(v)m(ailable)g(b)o(y)f +(ftp)953 889 y Ff(2)973 906 y Fl(.)22 b(T)l(o)16 b(run)g(the)h(serv)o +(er,)e(y)o(ou)h(need)h(our)e(0.6)224 962 y(release)20 +b(of)g(scsh)513 946 y Ff(3)533 962 y Fl(.)33 b(Bey)o(ond)19 +b(actually)i(running)g(the)e(serv)o(er,)h(the)g(separate)f(parser)224 +1019 y(libraries)e(and)e(other)g(utilites)i(ma)o(y)d(b)q(e)i(of)f(use)h +(as)e(separate)h(mo)q(dules.)295 1075 y(The)g(sunet)h(pac)o(k)m(age)f +(con)o(tains)g(follo)o(wing)h(parts:)292 1169 y Fg(\017)23 +b Fl(Sev)o(eral)15 b(serv)o(ers)g(\(HTTP)l(,)g(CGI,)f(FTP\))292 +1263 y Fg(\017)23 b Fl(Sev)o(eral)15 b(clien)o(ts)i(\(to)d(FTP)l(,)h +(SMTP)l(,)f(POP3,)h(NTP\))292 1357 y Fg(\017)23 b Fl(pro)q(cedures)16 +b(to)e(handle)j(URIs)292 1450 y Fg(\017)23 b Fl(pro)q(cedures)16 +b(to)e(handle)j(RF)o(C822)c(headers)292 1544 y Fg(\017)23 +b Fl(analogue)15 b(of)g Fi(ls)g Fl(for)f(scsh)292 1638 +y Fg(\017)23 b Fl(.)7 b(.)g(.)224 1760 y Fh(1.3)56 b(What)19 +b(is)f(in)g(this)h(do)r(cu?)224 1846 y Fl(Unfortunately)13 +b(not)f(all)i(parts)e(of)h(sunet)g(are)f(do)q(cumen)o(ted)i(here.)19 +b(If)13 b(y)o(ou)g(miss)g(some-)224 1902 y(thing,)h(ha)o(v)o(e)f(a)f +(lo)q(ok)i(in)g(the)f(source)g(\014les)h({)f(they)g(are)g(alle)i(w)o +(ell)f(do)q(cumen)o(ted)g(\(I)f(hop)q(e)224 1958 y(so!\).)295 +2015 y(Curren)o(tly)i(the)g(ftp)g(serv)o(er,)g(the)g(ftp)g(clien)o(t,)h +(the)f(mo)q(dules)h(con)o(taining)g(the)g(pro-)224 2071 +y(cedures)i(handling)g(URIs)f(and)g(URLs,)g(the)g(mo)q(dule)h(handling) +h(RF)o(C)c(822)i(headers,)224 2128 y(the)j(netrc)g(pac)o(k)m(age,)h +(the)f(sa)o(v)o(e)g(ev)m(aluation)h(en)o(vironmen)o(t)f +Fi(toothless-eval)e Fl(and)224 2184 y(the)d(obsolete)h(library)g(for)e +(using)i(strings)g(are)e(do)q(cumen)o(ted.)p 224 2224 +598 2 v 276 2251 a Fe(1)293 2267 y Fd(That's)43 b(Olin)g(Shiv)o(ers)h +(\()p Fj(shivers@ai.)o(mi)o(t.e)o(du)o Fd(,)j Fj(http://ww)o(w.a)o(i.)o +(mit)o(.e)o(du/)o(pe)o(opl)o(e/)224 2312 y(shivers/)p +Fd(\).)22 b(F)m(or)16 b(the)g(rest)g(of)f(the)h(do)q(cumen)o(tation,)j +(if)d(not)g(men)o(tioned)i(otherwise,)f(`I')e(refers)g(to)224 +2358 y(him.)276 2388 y Fe(2)293 2404 y Fj(ftp://ftp-)o(swi)o(ss)o(.ai)o +(.mi)o(t.)o(edu)o(/p)o(ub/)o(scs)o(h/)o(con)o(tr)o(ib/)o(net)o(/n)o +(et.)o(ta)o(r.g)o(z)276 2433 y Fe(3)293 2449 y Fd(h)o +(ttp://www.scsh.net)960 2613 y Fl(4)p eop +%%Page: 5 5 +5 4 bop 224 286 a Fh(1.4)56 b(Ho)n(w)19 b(to)g(use)f(the)g(mo)r(dules) +224 372 y Fl(F)l(or)e(the)g(time)g(b)q(eing,)h(it)f(ma)o(y)g(help)h(to) +e(lo)q(ok)i(at)e(the)h(follo)o(wing.)23 b(Scsh)17 b(is)f(started)g(in) +224 429 y(the)f(sunet)h(directory)l(.)k(Then,)c(the)f(description)i +(\014le)f(of)f(the)g(mo)q(dules)i(is)e(loaded)h(and)224 +485 y(the)j(ftp-mo)q(dule)g(is)g(op)q(ened)g(\(to)f(use)h(a)f(ftp)g +(clien)o(t\).)30 b(After)18 b(the)h(things)f(are)g(done,)224 +542 y(scsh)e(is)f(\014nished)i(via)f(the)f Fi(,exit)f +Fl(command.)338 635 y Fi(atari-2600[72])22 b(scsh-0.6)338 +692 y(Welcome)h(to)g(scsh)h(0.6.0)f(\(Chinese)g(Democracy\))338 +748 y(Type)g(,?)h(for)f(help.)338 805 y(>)h(,config)e(,load)i +(modules.scm)338 861 y(modules.scm)338 918 y(>)g(,open)f(ftp)338 +974 y(Load)g(structure)g(ftp)g(\(y/n\)?)g(y)338 1031 +y([ecm-utilities)f(ecm-utilities.scm])338 1087 y([netrc)h(netrc.scm]) +338 1144 y([ftp)g(ftp.scm])338 1200 y(>)h(;)f(do)h(something)e(nasty) +338 1256 y(>)i(,exit)338 1313 y(atari-2600[73])960 2613 +y Fl(5)p eop +%%Page: 6 6 +6 5 bop 224 286 a Fn(2)67 b(HTTP)22 b(serv)n(er)224 388 +y Fm(Used)17 b(\014les:)23 b Fl(ftp)q(d.scm)224 482 y +Fm(Name)17 b(of)h(the)g(pac)o(k)m(age:)k Fl(ftp)q(d)224 +588 y(Not)15 b(do)q(cumen)o(ted)h(y)o(et.)960 2613 y(6)p +eop +%%Page: 7 7 +7 6 bop 224 286 a Fn(3)67 b(CGI)22 b(serv)n(er)224 388 +y Fm(Used)17 b(\014les:)23 b Fl(cgi-serv)o(er.scm)224 +482 y Fm(Name)17 b(of)h(the)g(pac)o(k)m(age:)k Fl(cgi-serv)o(er)224 +588 y(Not)15 b(implemen)o(ted)i(y)o(et.)960 2613 y(7)p +eop +%%Page: 8 8 +8 7 bop 224 286 a Fn(4)67 b(CGI)22 b(scripts)224 388 +y Fm(Used)17 b(\014les:)23 b Fl(cgi-script.scm)224 482 +y Fm(Name)17 b(of)h(the)g(pac)o(k)m(age:)k Fl(cgi-script)224 +588 y(Not)15 b(implemen)o(ted)i(y)o(et.)960 2613 y(8)p +eop +%%Page: 9 9 +9 8 bop 224 286 a Fn(5)67 b(FTP)22 b(serv)n(er)224 388 +y Fm(Used)17 b(\014les:)23 b Fl(ftp)q(d.scm)224 482 y +Fm(Name)17 b(of)h(the)g(pac)o(k)m(age:)k Fl(ftp)q(d)224 +603 y Fh(5.1)56 b(What)19 b(users)f(w)n(an)n(t)i(to)f(kno)n(w)224 +689 y Fm(En)o(try)e(p)q(oin)o(ts)224 800 y Fi(\(ftpd)23 +b Fc(anonymous-home)17 b Fl([)p Fc(p)n(ort)t Fl(])p Fi(\))48 +b Fg(\000)-7 b(!)47 b Fc(no)16 b(r)n(eturn)g(value)191 +b Fl(pro)q(cedure)224 856 y Fi(\(ftp-inetd)23 b Fc(anonymous-home)s +Fi(\))48 b Fg(\000)-7 b(!)47 b Fc(no)17 b(r)n(eturn)f(value)192 +b Fl(pro)q(cedure)338 925 y Fi(ftpd)18 b Fl(starts)f(the)h(serv)o(er,)h +(using)g Fc(anonymous-home)j Fl(as)c(the)h(ro)q(ot)e(directory)338 +982 y(of)d(the)g(serv)o(er.)19 b(Usage)14 b(of)g(relativ)o(e)g(paths)g +(is)h(not)f(encouraged.)20 b Fc(p)n(ort)f Fl(sp)q(eci\014es)338 +1038 y(the)c(p)q(ort)g(the)g(serv)o(er)g(is)h(listening)h(for)d +(connections.)21 b(It)16 b(defaults)f(to)g(21.)338 1113 +y(As)h(the)h(pro)q(cedure)g(do)q(es)g(not)f(return,)h(y)o(ou)f(ha)o(v)o +(e)g(to)g(do)g(a)h Fi(fork)f Fl(in)h(order)f(to)338 1170 +y(ha)o(v)o(e)f(a)f(\\real")h(daemon:)438 1246 y Fi(\(fork)23 +b(\(lambda)g(\(\))g(\(ftpd)h("/data/ftp")e(8080\)\)\))338 +1322 y(ftpd-inetd)17 b Fl(is)j(the)e(v)o(ersion)i(to)e(b)q(e)h(used)h +(with)f(a)f(daemon)h(lik)o(e)h Fi(inetd)p Fl(.)30 b(If)338 +1378 y(the)18 b(serv)o(er)f(is)i(started)e(this)h(w)o(a)o(y)l(,)g(it)g +(handles)h(the)f(connection)h(through)e(the)338 1435 +y(curren)o(t)e(standard)g(output)g(and)g(input)h(p)q(orts.)224 +1624 y Fm(Examples)224 1710 y Fl(T)l(o)i(start)f(the)h(serv)o(er)f +(with)i(the)f(curren)o(t)g(home)g(directory)g(as)g(ro)q(ot)f(directory) +h(and)224 1766 y(listening)f(on)e(p)q(ort)g(8080,)f(use)338 +1842 y Fi(\(ftpd)23 b(\(cwd\))g(8080\))295 1918 y Fl(This)16 +b(is)h(ho)o(w)f(the)g(ftp)g(serv)o(er)g(at)f(the)h(computing)h(facult)o +(y)f(of)g(the)g(univ)o(ersit)o(y)h(of)224 1975 y(T)l(uebingen)428 +1958 y Ff(4)465 1975 y Fl(is)f(started:)p 224 2014 598 +2 v 276 2041 a Fe(4)293 2057 y Fj(archive.in)o(for)o(ma)o(tik)o(.un)o +(i-)o(tue)o(bi)o(nge)o(n.d)o(e)960 2613 y Fl(9)p eop +%%Page: 10 10 +10 9 bop 338 286 a Fi(#!/bin/sh)22 b(/scsh-0.6-alpha/bin/scsh)f(<)f(arg)g(])h +()f()224 1263 y Fl(Replies)17 b(from)d(the)h(serv)o(er)g(are)g +(of)g(the)g(form)338 1339 y Fi(xyz)23 b()g(Informative)g +(message)f()i()224 1415 y Fl(where)17 b(xyz)f(is)h(a)f(three)h +(digit)g(co)q(de)g(whic)o(h)g(indicates)h(whether)f(the)f(op)q(eration) +h(suc-)224 1471 y(ceeded)g(or)e(not,)g(whether)h(the)g(serv)o(er)f(is)i +(w)o(aiting)e(for)g(more)h(data,)f(etc.)21 b(The)16 b(serv)o(er)224 +1528 y(ma)o(y)f(also)g(send)h(m)o(ultiline)h(messages)e(of)g(the)g +(form)338 1634 y Fi(xyz-)23 b()g(Start)g(of)h(multiline)e +(message)h()h()338 1690 y([)g(+)e(More)i(information)e +(]*)i()f()338 1747 y(xyz)g()g(End)h(of)f(multiline)g +(message)g()g(\045)295 1910 y Fl(F)l(or)14 b(further)h +(informations)h(ha)o(v)o(e)e(a)h(lo)q(ok)h(at)e(the)i(source)f(\014le.) +295 1966 y(This)22 b(mo)q(dule)g(has)f(no)g(supp)q(ort)h(for)e(sites)i +(b)q(ehind)h(a)e(\014rew)o(all.)39 b(It)21 b(shouldn't)224 +2022 y(b)q(e)h(v)o(ery)f(tric)o(ky;)j(it)d(only)h(requires)g(using)f +(passiv)o(e)h(mo)q(de.)38 b(Migh)o(t)21 b(w)o(an)o(t)f(to)g(add)224 +2079 y(something)g(lik)o(e)h(the)e Fi(/usr/bin/ftp)f +Fl(command)i Fi(restrict)p Fl(,)f(whic)o(h)h(implemen)o(ts)224 +2135 y(data)15 b(p)q(ort)g(range)f(restrictions.)224 +2255 y Fm(P)o(ortablitit)o(y)224 2341 y Fl(Items)h(of)g(the)g(follo)o +(wing)h(list)g(are)f(necessary)h(in)g(order)f(to)f(use)i(this)f(mo)q +(dule:)292 2435 y Fg(\017)23 b Fl(The)15 b(netrc.scm)g(mo)q(dule)i(for) +d(parsing)31 b(/.netrc)14 b(\014les.)949 2613 y(16)p +eop +%%Page: 17 17 +17 16 bop 292 286 a Fg(\017)23 b Fl(Scsh)16 b(so)q(c)o(k)o(et)e(co)q +(de)292 379 y Fg(\017)23 b Fl(Scsh)16 b(records)292 472 +y Fg(\017)23 b Fl(Receiv)o(e)16 b(for)e(m)o(ultiple)j(v)m(alues)292 +565 y Fg(\017)23 b Fl(Sc)o(heme)16 b(48)e(signals/handlers)224 +684 y Fm(Related)19 b(w)o(ork)292 770 y Fg(\017)k Fl(RF)o(C)14 +b(959)g(describ)q(es)j(the)e(FTP)g(proto)q(col;)f(see)338 +827 y Fi(http://www.cis.ohio-state)o(.edu/ht)o(bin/rfc)o(/rfc959.)o +(html)292 919 y Fg(\017)23 b Fi(/anonymous@sunsite.unc.ed)o(u:/pub/)o +(Linux/l)o(ibs/ftpl)o(ib.tar.)o(gz)11 b Fl(is)338 976 +y(a)k(library)h(similar)g(to)f(this)g(one,)g(written)g(in)h(C,)f(b)o(y) +g(Thomas)g(Pfau)292 1069 y Fg(\017)23 b Fi(FTP.pm)f Fl(is)h(a)f(P)o +(erl)h(mo)q(dule)h(with)f(similar)g(functionalit)o(y)h(\(a)o(v)m +(ailable)g(from)338 1125 y Fi(http://www.perl.com/CPAN)p +Fl(\))292 1218 y Fg(\017)f Fl(Emacs)13 b(gets)h(transparen)o(t)f +(remote)g(\014le)i(access)f(from)f Fi(ange-ftp.el)f Fl(b)o(y)i(Ange)338 +1274 y(Norman.)19 b(Ho)o(w)o(ev)o(er,)14 b(it)h(c)o(heats)g(b)o(y)g +(using)i Fi(/usr/bin/ftp)p Fl(.)292 1367 y Fg(\017)23 +b Fl(Sio)q(d)f(\(a)e(small-fo)q(otprin)o(t)i(Sc)o(heme)g(implemen)o +(tation)g(b)o(y)f(George)g(Carette\))338 1424 y(comes)16 +b(with)h(a)g(\014le)h Fi(ftp.scm)k Fl(with)c(a)e(small)h(subset)g(of)g +(these)f(functions)i(de-)338 1480 y(\014ned.)224 1600 +y Fm(TODO)292 1685 y Fg(\017)23 b Fl(Handle)16 b(passiv)o(e)g(mo)q(de)f +(and)h(\014rew)o(alls.)292 1778 y Fg(\017)23 b Fl(Unix-sp)q(eci\014c)13 +b(commands)d(suc)o(h)g(as)g Fi(SITE)23 b(UMASK)p Fl(,)9 +b Fi(SITE)24 b(CHMOD)p Fl(,)9 b Fi(SITE)23 b(IDLE)p Fl(,)338 +1835 y Fi(SITE)g(HELP)p Fl(.)292 1928 y Fg(\017)g Fl(Ob)s(ject-based)16 +b(in)o(terface?)21 b(\(lik)o(e)16 b(SICP)f(message)g(passing\).)292 +2020 y Fg(\017)23 b Fl(Impro)o(v)o(ed)15 b(error)f(handling.)292 +2113 y Fg(\017)23 b Fl(A)17 b(lot)h(of)f(the)g(calls)i(to)e(format)f +(could)j(b)q(e)f(replaced)g(b)o(y)g(calls)g(to)f(string-join.)338 +2170 y(Ma)o(yb)q(e)e(format)f(is)h(easier)h(to)f(read?)292 +2262 y Fg(\017)23 b Fl(The)11 b Fi(ftp:rename)f Fl(command)h(should)h +(ha)o(v)o(e)f(an)g(optional)g(argumen)o(t)g Fi(:rename)338 +2319 y Fl(whic)o(h)21 b(defaults)g(to)f Fi(#f)p Fl(,)h(whic)o(h)g(w)o +(ould)g(mak)o(e)f(us)h(upload)g(to)f(a)g(temp)q(orary)338 +2375 y(name)10 b(and)h(rename)f(at)g(the)g(end)h(of)f(the)g(upload.)19 +b(This)11 b(atomicit)o(y)f(is)h(imp)q(ortan)o(t)338 2432 +y(for)i(ftp)g(or)g(h)o(ttp)g(serv)o(ers)h(whic)o(h)g(are)f(serving)i(a) +e(load,)h(and)g(to)f(a)o(v)o(oid)g(problems)338 2488 +y(with)i("no)g(space)h(on)f(device".)949 2613 y(17)p +eop +%%Page: 18 18 +18 17 bop 292 286 a Fg(\017)23 b Fl(Automatic)15 b(relogin)h(a)f(la)g +Fi(ang-ftp)p Fl(.)949 2613 y(18)p eop +%%Page: 19 19 +19 18 bop 224 286 a Fn(7)67 b(Reading)23 b(netrc-\014les)224 +388 y Fm(Used)17 b(\014les:)23 b Fl(netrc.scm)224 482 +y Fm(Name)17 b(of)h(the)g(pac)o(k)m(age:)k Fl(netrc)224 +603 y Fh(7.1)56 b(Ov)n(erview)224 689 y Fl(This)18 b(mo)q(dule)g(pro)o +(vides)g(pro)q(cedures)g(to)e(parse)h(authen)o(tication)h(information)f +(con-)224 746 y(tained)f(in)40 b Fi(/.netrc)p Fl(.)295 +802 y(On)17 b(Unix)h(systems)f(the)40 b Fi(/.netrc)16 +b Fl(\014le)i(\(in)g(the)f(user's)f(home)h(directory\))g(ma)o(y)224 +859 y(con)o(tain)g(information)g(allo)o(wing)g(automatic)f(login)i(to)e +(remote)g(hosts.)24 b(The)17 b(format)224 915 y(of)e(the)g(\014le)h(is) +g(de\014ned)h(in)f(the)f Fi(ftp)p Fl(\(1\))f(man)o(ual)h(page.)20 +b(Example)c(lines)g(are)338 1009 y Fi(machine)23 b(ondine.cict.fr)f +(login)h(marsden)g(password)g(secret)338 1065 y(default)g(login)g +(anonymous)g(password)f(user@site)295 1216 y Fl(The)39 +b Fi(/.netrc)15 b Fl(\014le)i(should)f(b)q(e)h(protected)e(b)o(y)h +(appropriate)g(p)q(ermissions,)g(and)224 1272 y(\(lik)o(e)22 +b Fi(/usr/bin/ftp)p Fl(\))c(this)j(library)h(will)g(refuse)f(to)f(read) +g(the)h(\014le)h(if)f(it)g(is)g(badly)224 1329 y(protected.)j(\(unlik)o +(e)18 b Fi(ftp)e Fl(this)h(library)g(will)i(alw)o(a)o(ys)c(refuse)i(to) +f(read)h(the)f(\014le)i({)e Fi(ftp)224 1385 y Fl(refuses)i(it)f(only)h +(if)f(the)h(passw)o(ord)e(is)i(giv)o(en)f(for)g(a)g(non-default)h +(accoun)o(t\).)25 b(Appro-)224 1441 y(priate)16 b(p)q(ermissions)g(are) +f(set)g(if)h(only)f(the)h(user)f(has)g(p)q(ermissions)i(on)e(the)g +(\014le.)295 1498 y(Note)g(follo)o(wing)g(restrictions)h(and)f +(di\013erences:)292 1592 y Fg(\017)23 b Fl(The)15 b(macdef)h(statemen)o +(t)e(\(de\014ning)i(macros\))e(is)i(not)f(supp)q(orted.)292 +1686 y Fg(\017)23 b Fl(The)15 b(settings)g(for)g(one)g(mac)o(hine)h(m)o +(ust)f(b)q(e)h(on)f(a)g(single)h(line.)292 1779 y Fg(\017)23 +b Fl(The)15 b(is)h(no)f(error)g(pro)q(of)f(while)j(reading)f(the)f +(\014le.)292 1873 y Fg(\017)23 b Fl(Default)15 b(need)h(not)f(b)q(e)h +(the)f(last)g(line)i(of)e(the)g(netrc-\014le.)224 1995 +y Fh(7.2)56 b(En)n(try)18 b(p)r(oin)n(ts)224 2081 y Fl(What)f(y)o(ou)f +(probably)i(w)o(an)o(t,)e(is)i(to)f(read)g(out)f(the)i(default)f +(netrc-\014le.)27 b(Do)17 b(the)g(fol-)224 2137 y(lo)o(wing:)362 +2231 y Fi(\(let)23 b(\(\(netrc-record)f(\(netrc:parse\)\)\))433 +2287 y(\(netrc:lookup)g(netrc-record)h("name)g(of)g(the)h(machine"\)\)) +949 2613 y Fl(19)p eop +%%Page: 20 20 +20 19 bop 295 286 a Fl(and)20 b(y)o(ou)g(will)i(receiv)o(e)g(three)e(v) +m(alues:)32 b Fc(lo)n(gin-name)p Fl(,)20 b Fc(p)n(asswor)n(d)25 +b Fl(and)c Fc(ac)n(c)n(ount-)224 343 y(name)p Fl(.)e(If)13 +b(y)o(ou)f(only)h(w)o(an)o(t)e(the)i(login)g(name)g(or)f(the)h(passw)o +(ord,)e(use)i Fi(netrc:lookup-)224 399 y(login)i Fl(or)f +Fi(netrc:lookup-password)p Fl(,)e(resp.)295 456 y(Y)l(ou)k(will)i(get)e +(either)i(the)e(login)h(/)f(passw)o(ord)g(for)g(the)g(sp)q(eci\014ed)j +(mac)o(hine,)e(or)f(a)224 512 y(default)g(login)g(/)f(passw)o(ord)f(if) +i(the)f(mac)o(hine)h(is)g(unkno)o(wn.)224 588 y Fi +(\(user-mail-address\))45 b Fg(\000)-7 b(!)47 b Fc(string)563 +b Fl(pro)q(cedure)338 665 y(Calculate)18 b(the)g(user's)f(email)h +(address,)g(as)f(p)q(er)h(the)g(Emacs)f(function)h(of)f(the)338 +721 y(same)12 b(name.)19 b(Will)c(tak)o(e)d(in)o(to)g(accoun)o(t)h(the) +g(en)o(vironmen)o(t)g(v)m(ariable)h Fi(REPLYTO)p Fl(,)338 +778 y(if)h(set.)20 b(Otherwise)c(the)f(mail-address)i(will)g(lo)q(ok)e +(lik)o(e)h Fi(user@hostname)p Fl(.)224 920 y Fi(\(netrc:parse)22 +b Fl([)p Fc(\014lename)15 b Fl([)p Fc(fal)r(lb)n(ack-p)n(asswor)n(d)h +Fl([)p Fc(fal)r(lb)n(ack-lo)n(gin)s Fl(])n(])o(])p Fi(\))24 +b Fg(\000)-7 b(!)23 b Fc(netr)n(c-r)n(e)n(c)n(or)n(d)47 +b Fl(pro)q(cedure)224 977 y Fi(\(netrc:try-parse)22 b +Fc(\014lename)10 b(fal)r(lb)n(ack-p)n(asswor)n(d)h(fal)r(lb)n(ack-lo)n +(gin)s Fi(\))23 b Fg(\000)-7 b(!)23 b Fc(netr)n(c-r)n(e)n(c)n(or)n(d)47 +b Fl(pro)q(cedure)338 1053 y Fi(netrc:parse)18 b Fl(parses)h(the)h +(netrc)g(\014le)g(and)g(returns)g(a)f Fi(netrc)g Fl(record,)h(con-)338 +1109 y(taining)c(all)g(necessary)f(information)h(for)e(the)i(follo)o +(wing)f(pro)q(cedures.)338 1182 y Fc(\014lename)21 b +Fl(defaults)e(to)f(\\)g(/.netrc",)g Fc(fal)r(lb)n(ack-p)n(asswor)n(d)23 +b Fl(defaults)c(to)f(the)g(re-)338 1238 y(sult)h(of)f(the)g(call)i(to)d +Fi(user-mail-address)f Fl(and)j Fc(fal)r(lb)n(ack-lo)n(gin)h +Fl(defaults)f(to)338 1295 y(\\anon)o(ymous".)f(If)d(the)g(netrc)g +(\014le)g(do)q(es)g(not)g(pro)o(vide)g(a)f(default)h(passw)o(ord)f(or) +338 1351 y(a)h(default)i(login)g(\(stated)e(b)o(y)h(the)g(\\default")g +(statemen)o(t\),)e Fc(fal)r(lb)n(ack-p)n(asswor)n(d)338 +1408 y Fl(and)20 b Fc(fal)r(lb)n(ack-lo)n(gin)h Fl(will)g(b)q(e)f(used) +h(as)e(default)h(passw)o(ord)e(or)h(login,)j(resp)q(ec-)338 +1464 y(tiv)o(ely)d(\(th)o(us,)f Fi(user-mail-address)f +Fl(is)i(only)g(called)h(if)f(the)f(netrc)h(\014le)g(do)q(es)338 +1520 y(not)d(con)o(tain)g(a)g(default)h(sp)q(eci\014cation\).)24 +b(If)17 b(the)f(netrc)h(\014le)g(do)q(es)f(not)g(exist,)h(a)338 +1577 y(netrc-record)c(\014lled)h(with)f(default)h(v)m(alues)f(is)h +(returned.)19 b(If)13 b(the)g(netrc)f(\014le)i(do)q(es)338 +1633 y(not)i(ha)o(v)o(e)g(the)h(correct)f(p)q(ermissions,)i(a)e +(message)g(is)h(prin)o(ted)g(to)f(the)h(curren)o(t)338 +1690 y(error)d(p)q(ort)h(and)h(a)e(netrc-record)i(\014lled)h(with)e +(default)h(v)m(alues)h(is)e(returned.)338 1762 y Fi(netrc:try-parse)h +Fl(do)q(es)j(the)f(same)g(as)g Fi(netrc:parse)p Fl(,)g(except)h(of)f +(the)g(fol-)338 1819 y(lo)o(wing:)25 b(if)18 b(there)g(is)g(no)f +(\014le)i(called)g Fc(\014lename)p Fl(,)e(the)h(according)g(error)f +(will)i(b)q(e)338 1875 y(raised)12 b(and)f(if)h(the)f(sp)q(eci\014ed)j +(\014le)e(do)q(es)f(not)g(ha)o(v)o(e)g(the)h(correct)e(p)q(ermissions)j +(set,)338 1932 y(a)k Fi(netrc-refuse-warning)e Fl(will)k(b)q(e)f +(signalled.)29 b(So,)18 b(if)g(y)o(ou)g(don't)f(lik)o(e)h(the)338 +1988 y(error)g(handling)i(and)f(b)q(eha)o(vior)h(of)i +Fi(netrc:parse)p Fl(,)17 b(use)j Fi(netrc:try-parse)338 +2045 y Fl(and)d(catc)o(h)g(the)h(signalled)h(conditions.)27 +b(Note,)17 b(that)g Fi(netrc:parse)e Fl(resolv)o(es)338 +2101 y Fc(\014lename)20 b Fl(for)d(y)o(ou,)h Fi(netrc:try-parse)e +Fl(do)q(es)i(not)f({)h(y)o(ou)f(ha)o(v)o(e)h(to)f(do)h(it)g(on)338 +2158 y(y)o(our)c(o)o(wn.)224 2300 y Fi(\(netrc:lookup)22 +b Fc(netr)n(c-r)n(e)n(c)n(or)n(d)11 b(machine)g Fl([)p +Fc(default?)6 b Fl(])p Fi(\))24 b Fg(\000)-8 b(!)24 b +Fc(string)11 b(string)f(string)47 b Fl(pro)q(cedure)224 +2357 y Fi(\(netrc:lookup-password)21 b Fc(netr)n(c-r)n(e)n(c)n(or)n(d) +11 b(machine)g Fl([)p Fc(default?)6 b Fl(])p Fi(\))23 +b Fg(\000)-7 b(!)23 b Fc(string)47 b Fl(pro)q(cedure)224 +2413 y Fi(\(netrc:lookup-login)21 b Fc(netr)n(c-r)n(e)n(c)n(or)n(d)11 +b(machine)h Fl([)p Fc(default?)6 b Fl(])o Fi(\))24 b +Fg(\000)-8 b(!)24 b Fc(string)47 b Fl(pro)q(cedure)224 +2469 y Fi(\(R)24 b Fc(e)s Fi(\))48 b Fg(\000)-8 b(!)48 +b Fc(t)995 b Fl(pro)q(cedure)949 2613 y(20)p eop +%%Page: 21 21 +21 20 bop 338 286 a Fl(urn)22 b(the)g(login,)i(passw)o(ord)d(and)h(/)f +(or)h(accoun)o(t)f(information)h(for)g Fc(machine)338 +343 y Fl(sp)q(eci\014ed)e(b)o(y)e Fc(netr)n(c-r)n(e)n(c)n(or)n(d)p +Fl(,)f(resp)q(ectiv)o(ely)l(.)31 b(If)18 b Fc(default?)35 +b Fl(is)19 b Fi(#t)p Fl(,)f(default)h(v)m(al-)338 399 +y(ues)g(are)g(returned)h(if)g(no)f(suc)o(h)h Fc(machine)i +Fl(is)e(sp)q(eci\014ed)i(in)e(the)f Fc(netr)n(c-r)n(e)n(c)n(or)n(d)p +Fl(.)338 456 y(Otherwise)d([)p Fi(#f)e(#f)h(#f)p Fl(])g(or)f +Fi(#f)h Fl(is)h(returned,)f(resp)q(ectiv)o(ely)l(.)224 +606 y Fi(\(netrc:default-login)21 b Fc(netr)n(c-r)n(e)n(c)n(or)n(d)5 +b Fi(\))46 b Fg(\000)-7 b(!)47 b Fc(string)254 b Fl(pro)q(cedure)224 +663 y Fi(\(netrc:default-password)21 b Fc(netr)n(c-r)n(e)n(c)n(or)n(d)5 +b Fi(\))46 b Fg(\000)-7 b(!)47 b Fc(string)182 b Fl(pro)q(cedure)338 +744 y(Return)16 b(the)h(default)g(v)m(alues)h(for)e(the)h(login)h(or)e +(the)h(passw)o(ord,)f(resp)q(ectiv)o(ely)l(,)338 800 +y(sp)q(eci\014ed)c(b)o(y)f Fc(netr)n(c-r)n(e)n(c)n(or)n(d)p +Fl(.)17 b(If)11 b(the)f(netrc)h(\014le)g(did)h(not)e(sp)q(ecify)i(a)e +(default)h(login,)338 857 y(\\anon)o(ymous")16 b(is)h(returned)h(b)o(y) +g Fi(netrc:default-login)p Fl(.)23 b(If)17 b(the)g(netrc)g(\014le)338 +913 y(did)c(not)e(sp)q(ecify)i(a)e(default)i(passw)o(ord,)e(the)h +(result)g(of)f(the)h(call)h(to)e Fi(user-mail-)338 970 +y(address)j Fl(is)i(returned)f(b)o(y)h Fi(netrc:default-password)p +Fl(.)224 1160 y Fh(7.3)56 b(Related)17 b(w)n(ork)292 +1246 y Fg(\017)23 b Fl(Graham)14 b(Barr)h(has)g(written)g(a)g(similar)h +(library)g(for)f(P)o(erl,)g(called)i Fi(Netrc.pm)p Fl(.)292 +1340 y Fg(\017)23 b Fi(ange-ftp.el)d Fl(\(transparen)o(t)g(remote)h +(\014le)h(access)g(for)e(Emacs\))h(parses)g(the)338 1396 +y(user's)15 b(netrc)g(\014le.)224 1518 y Fh(7.4)56 b(Desirable)17 +b(things)292 1604 y Fg(\017)23 b Fl(Remo)o(v)o(e)17 b(restrictions)h +(\(as)f(stated)g(in)i(`)p Fc(Overview)5 b Fl('\))16 b(and)i(b)q(eha)o +(v)o(e)g(lik)o(e)h Fi(/usr/)338 1660 y(bin/ftp)14 b Fl(b)q(eha)o(v)o +(es)292 1754 y Fg(\017)23 b Fl(p)q(erhaps:)d(adding)c +(case-insensitivit)o(y)i(\(for)c(host)h(names\))292 1848 +y Fg(\017)23 b Fl(p)q(erhaps:)d(b)q(etter)c(record-disclosers)g(for)f +(netrc-en)o(try-)g(and)g(netrc-records)949 2613 y(21)p +eop +%%Page: 22 22 +22 21 bop 224 286 a Fn(8)67 b(Handle)23 b(URIs)224 388 +y Fm(Used)17 b(\014les:)23 b Fl(uri.scm)224 482 y Fm(Name)17 +b(of)h(the)g(pac)o(k)m(age:)k Fl(uri)224 603 y Fh(8.1)56 +b(Ov)n(erview)224 689 y Fl(A)15 b(URI)h(\(Uniform)f(Resource)g(Iden)o +(ti\014er\))h(is)f(of)g(follo)o(wing)h(syn)o(tax:)338 +765 y([)p Fc(scheme)s Fl(])e(:)20 b Fc(p)n(ath)f Fl([?)e +Fc(se)n(ar)n(ch)s Fl(])d([#)i Fc(fr)n(agmentid)5 b Fl(])224 +841 y(P)o(arts)15 b(in)i(brac)o(k)o(ets)e(ma)o(y)g(b)q(e)i(ommitted.)23 +b(The)16 b(last)g(part)f(is)i(usually)g(referred)f(to)g(as)224 +898 y(fragid)f(in)h(this)g(do)q(cumen)o(t.)295 954 y(As)i(y)o(ou)g +(see,)g(the)g(URI)g(con)o(tains)h(c)o(haracters)e(lik)o(e)i +Fi(:)f Fl(to)f(indicate)j(its)e(di\013eren)o(t)224 1011 +y(parts.)32 b(But)19 b(what,)g(if)h(the)f Fc(scheme)j +Fl(con)o(tains)e Fi(:)f Fl(as)g(part)f(of)h(its)h(name?)32 +b(F)l(or)19 b(this)224 1067 y(purp)q(ose,)d(some)g(sp)q(ecial)h(c)o +(haracters)e(are)h Fc(esc)n(ap)n(e)n(d)j Fl(if)e(they)e(are)h(a)f +(regular)h(part)f(of)h(a)224 1124 y(name)i(and)g(not)g(indicators)g +(for)f(the)h(structure)g(of)f(a)h(URI.)f(Escap)q(e-sequences)j(are)224 +1180 y(of)14 b(follo)o(wing)h(sc)o(heme:)20 b Fi(\\\045hh)14 +b Fl(where)h Fi(h)f Fl(is)h(a)f(hexadecimal)j(digit.)j(The)15 +b(hexadecimal)224 1236 y(n)o(um)o(b)q(er)20 b(refers)f(to)g(the)g +(\(US\))g(ASCI)q(I)i(co)q(de)f(of)f(the)h(escap)q(ed)g(c)o(haracter,)f +(e.g.)g Fi(\04520)224 1293 y Fl(is)i(space)f(\(ASCI)q(I)g(c)o(haracter) +g(32\))e(and)j Fi(\04561)e Fl(is)h(`a')f(\(ASCI)q(I)i(c)o(haracter)e +(97\).)33 b(This)224 1349 y(mo)q(dule)17 b(pro)o(vides)e(pro)q(cedures) +i(to)d(escap)q(e)i(and)g(unescap)q(e)g(strings)f(that)g(are)g(mean)o(t) +224 1406 y(to)g(b)q(e)h(used)f(in)h(a)f(URI.)224 1528 +y Fh(8.2)56 b(Pro)r(cedures)224 1638 y Fi(\(parse-uri)23 +b Fc(uri-string)16 b Fi(\))48 b Fg(\000)-8 b(!)47 b Fc(scheme)16 +b(p)n(ath)h(se)n(ar)n(ch)f(fr)n(ag-id)118 b Fl(pro)q(cedure)338 +1707 y(P)o(arses)14 b(an)h Fc(uri-string)20 b Fl(in)c(the)f(p)q +(ossible)i(four)e(\014elds,)h(as)f(men)o(tioned)h(ab)q(o)o(v)o(e)f(in) +338 1764 y Fc(Overview)p Fl(.)31 b(These)19 b(four)g(\014elds)h(are)f +(returned)g(as)g(a)g(m)o(ultiple)i(v)m(alue.)32 b(They)338 +1820 y(are)21 b Fc(not)k Fl(unescap)q(ed,)f(as)d(the)g(rules)h(for)f +(parsing)h(the)f Fc(p)n(ath)k Fl(comp)q(onen)o(t)d(in)338 +1877 y(particular)d(need)h(unescap)q(ed)g(text,)e(and)h(are)g(dep)q +(enden)o(t)h(on)e Fc(scheme)p Fl(.)30 b(The)338 1933 +y(URL)11 b(parser)f(is)i(resp)q(onsible)h(for)d(doing)h(this.)19 +b(If)11 b(the)g Fc(scheme)p Fl(,)g Fc(se)n(ar)n(ch)j +Fl(or)c Fc(fr)n(agid)338 1989 y Fl(p)q(ortions)i(are)f(not)h(sp)q +(eci\014ed,)i(they)e(are)g Fi(#f)p Fl(.)18 b(Otherwise,)13 +b Fc(scheme)p Fl(,)f Fc(se)n(ar)n(ch)p Fl(,)f(and)338 +2046 y Fc(fr)n(agid)22 b Fl(are)16 b(strings.)25 b Fc(p)n(ath)c +Fl(is)d(a)f(non-empt)o(y)g(string)g(list)g({)g(the)g(path)g(split)h(at) +338 2102 y(slashes.)338 2178 y(F)l(or)11 b(those)h(of)g(y)o(ou)f(who)h +(are)g(in)o(terested,)h(here)f(is)h(a)f(description)h(of)f(the)g +(parsing)338 2234 y(tec)o(hnique.)21 b(It)15 b(is)h(in)o(w)o(ards)f +(from)f(b)q(oth)i(ends.)392 2328 y Fg(\017)23 b Fl(First)15 +b(w)o(e)g(searc)o(h)h(forw)o(ards)e(for)h(the)h(\014rst)f(reserv)o(ed)h +(c)o(haracter)f(\()p Fi(=)p Fl(,)g Fi(;)p Fl(,)g Fi(/)p +Fl(,)438 2384 y Fi(#)p Fl(,)k Fi(?)p Fl(,)g Fi(:)f Fl(or)h +Fi(space)p Fl(\).)29 b(If)19 b(it's)f(a)h(colon,)g(then)g(that's)f(the) +h Fc(scheme)i Fl(part,)438 2441 y(otherwise)15 b(w)o(e)g(ha)o(v)o(e)g +(no)g Fc(scheme)j Fl(part.)i(A)o(t)14 b(all)i(ev)o(en)o(ts)f(w)o(e)g +(remo)o(v)o(e)g(it.)949 2613 y(22)p eop +%%Page: 23 23 +23 22 bop 392 286 a Fg(\017)23 b Fl(Then)11 b(w)o(e)g(searc)o(h)g(bac)o +(kw)o(ards)g(from)f(the)h(end)h(for)f(the)g(last)g(reserv)o(ed)g(c)o +(har.)438 343 y(If)k(it's)g(a)g(sharp,)g(then)g(that's)f(the)i +Fc(fr)n(agid)k Fl(part)14 b({)h(remo)o(v)o(e)g(it.)392 +416 y Fg(\017)23 b Fl(Then)11 b(w)o(e)g(searc)o(h)g(bac)o(kw)o(ards)g +(from)f(the)h(end)h(for)f(the)g(last)g(reserv)o(ed)g(c)o(har.)438 +472 y(If)k(it's)g(a)g(question-mark,)g(then)h(that's)e(the)h +Fc(se)n(ar)n(ch)j Fl(part)d({)g(remo)o(v)o(e)f(it.)392 +545 y Fg(\017)23 b Fl(What's)17 b(left)i(is)f(the)h(path.)29 +b(W)l(e)18 b(split)i(at)d(slashes.)30 b(The)19 b(empt)o(y)f(string)438 +602 y(b)q(ecomes)e(a)e(list)i(con)o(taining)g(the)g(empt)o(y)f(string.) +338 696 y(This)f(sc)o(heme)h(is)f(toleran)o(t)g(of)f(the)h(v)m(arious)h +(w)o(a)o(ys)e(p)q(eople)i(build)h(brok)o(en)e(URI's)338 +752 y(out)19 b(there)h(on)g(the)g(Net)767 736 y Ff(6)786 +752 y Fl(,)h(e.g.)33 b Fi(=)19 b Fl(is)i(a)e(reserv)o(ed)h(c)o +(haracter,)g(but)g(used)g(un-)338 809 y(escap)q(ed)e(in)h(the)e(searc)o +(h-part.)26 b(It)18 b(w)o(as)f(giv)o(en)h(to)f(me)1284 +792 y Ff(7)1321 809 y Fl(b)o(y)g(Dan)g(Connolly)i(of)338 +865 y(the)c(W3C)g(and)g(sligh)o(tly)h(mo)q(di\014ed.)224 +1015 y Fi(\(unescape-uri)22 b Fc(string)16 b Fl([)p Fc(start)g +Fl([)p Fc(end)5 b Fl(])n(])p Fi(\))48 b Fg(\000)-8 b(!)48 +b Fc(string)296 b Fl(pro)q(cedure)338 1097 y(Unescap)q(es)13 +b(a)e(string.)19 b(This)12 b(pro)q(cedure)h(should)g(only)f(b)q(e)g +(used)h Fc(after)k Fl(the)12 b(URL)338 1153 y(\(!\))23 +b(w)o(as)16 b(parsed,)h(since)h(unescaping)g(ma)o(y)e(in)o(tro)q(duce)i +(c)o(haracters)d(that)h(blo)o(w)338 1210 y(up)c(the)g(parse)f(\(that's) +f(wh)o(y)i(escap)q(e)g(sequences)h(are)e(used)h(in)h(URIs)e(;-\).)18 +b(Escap)q(e)338 1266 y(sequences)e(are)f(of)g(the)g(sc)o(heme)h(as)e +(describ)q(ed)k(in)e(\\Ov)o(erview".)224 1416 y Fi(uri-escaped-chars) +931 b Fl(c)o(har-set)338 1498 y(A)15 b(set)g(of)g(c)o(haracters)f(that) +g(are)h(escap)q(ed)h(in)g(URIs.)k(These)c(are)f(the)g(follo)o(wing)338 +1554 y(c)o(haracters:)21 b(dollar)c(\()p Fi($)p Fl(\),)e(min)o(us)i(\() +p Fi(-)p Fl(\),underscore)f(\()p Fi(_)p Fl(\),)f(at)h(\()p +Fi(@)p Fl(\),)f(dot)h(\()p Fi(.)p Fl(\),)f(and-)338 1611 +y(sign)22 b(\()p Fi(&)p Fl(\),)h(exclamation)f(mark)g(\()p +Fi(!)p Fl(\),)g(asterisk)g(\()p Fi(*)p Fl(\),)g(bac)o(kslash)h(\()p +Fi(\\)p Fl(\),)f(double)338 1667 y(quote)d(\()p Fi(")p +Fl(\),)h(single)h(quote)e(\()p Fi(')p Fl(\),)h(op)q(en)g(brace)g(\()p +Fi(\()p Fl(\),)f(close)i(brace)f(\()p Fi(\))p Fl(\),)f(comma)338 +1724 y(\()p Fi(,)p Fl(\))13 b(plus)j(\()p Fi(+)p Fl(\))e(and)g(all)i +(other)e(c)o(haracters)g(that)f(are)h(neither)i(letters)e(nor)h(digits) +338 1780 y(\(suc)o(h)g(as)g(space)g(and)h(con)o(trol)f(c)o +(haracters\).)224 1874 y Fi(\(escape-uri)23 b Fc(string)15 +b Fl([)p Fc(esc)n(ap)n(e)n(d-chars)t Fl(])n Fi(\))48 +b Fg(\000)-7 b(!)47 b Fc(string)282 b Fl(pro)q(cedure)338 +1955 y(Escap)q(es)10 b(c)o(haracters)g(of)f Fc(string)14 +b Fl(that)9 b(are)h(giv)o(en)h(with)f Fc(esc)n(ap)n(e)n(d-chars)p +Fl(.)18 b Fc(esc)n(ap)n(e)n(d-)338 2012 y(chars)h Fl(default)d(to)f +Fi(uri-escaped-chars)p Fl(.)j(Be)e(careful)g(with)g(using)g(this)g +(pro-)338 2068 y(cedure)h(to)e(c)o(h)o(unks)h(of)f(text)h(with)g(syn)o +(tactically)h(meaningful)g(reserv)o(ed)f(c)o(har-)338 +2125 y(acters)i(\(e.g.,)h(paths)g(with)g(URI)g(slashes)h(or)e(colons\)) +h({)g(they'll)h(b)q(e)g(escap)q(ed,)338 2181 y(and)e(lose)h(their)g(sp) +q(ecial)h(meaning.)30 b(E.g.)17 b(it)h(w)o(ould)h(b)q(e)g(a)f(mistak)o +(e)g(to)g(apply)338 2237 y Fi(escape-uri)9 b Fl(to)g(\\)p +Fi(//lcs.mit.edu:8001/foo/b)o(ar.html)p Fl(")d(b)q(ecause)11 +b(the)g(sla-)338 2294 y(shes)22 b(and)g(colons)g(w)o(ould)h(b)q(e)f +(escap)q(ed.)41 b(Note)22 b(that)f Fi(esacpe-uri)g Fl(do)q(esn't)338 +2350 y(c)o(hec)o(k)15 b(this)h(as)f(it)g(w)o(ould)h(lose)f(his)h +(meaning.)p 224 2390 598 2 v 276 2417 a Fe(6)293 2433 +y Fd(So)e(it)f(is)h(not)f(absolutely)i(conform)f(with)f(RF)o(C)g(1630) +276 2462 y Fe(7)293 2478 y Fd(That's)g(Olin)h(Shiv)o(ers.)949 +2613 y Fl(23)p eop +%%Page: 24 24 +24 23 bop 224 362 a Fi(\(resolve-uri)22 b Fc(cscheme)16 +b(cp)h(scheme)f(p)s Fi(\))47 b Fg(\000)-7 b(!)47 b Fc(scheme)16 +b(p)n(ath)133 b Fl(pro)q(cedure)338 438 y(Nob)q(o)q(dy)16 +b(really)g(kno)o(ws)e(what)h(this)h(pro)q(cedure)g(w)o(as)e(in)o +(tended)j(to)d(do.)338 510 y(The)23 b(co)q(de)h(seems)g(to)e(ha)o(v)o +(e)h(a)g(bug:)37 b(In)24 b(the)f(b)q(o)q(dy)h(of)f(receiv)o(e,)j +(there's)d(a)338 566 y(lo)q(op.)i(j)16 b(should,)i(according)f(to)f +(the)h(commen)o(t,)f(coun)o(t)g(sequen)o(tial)i Fi(/)p +Fl(.)24 b(But)17 b Fi(j)338 623 y Fl(coun)o(ts)11 b(nothing)g(in)h(the) +g(b)q(o)q(dy)l(.)19 b(Either)12 b(zero)f(is)g(added)h +Fi(\(\(lp)23 b(\(cdr)h(cp-tail\))338 679 y(\(cons)f(\(car)g(cp-tail\))g +(rhead\))g(\(+)h(j)f(0\)\)\))13 b Fl(or)g Fi(j)g Fl(is)h(set)f(to)g(1)g +Fi(\(\(lp)23 b(\(cdr)338 736 y(cp-tail\))g(\(cons)g(\(car)g(cp-tail\))g +(rhead\))g(1\)\))p Fl(.)c(Nev)o(ertheless,)c Fi(j)g Fl(is)g(ex-)338 +792 y(p)q(ected)i(to)e(reac)o(h)g(v)m(alue)i Fi(numsl)e +Fl(that)g(can)h(b)q(e)g(larger)g(than)f(one.)22 b(So)15 +b(what?)22 b(I)338 849 y(am)15 b(confused.)224 990 y +Fi(\(split-uri-path)22 b Fc(uri)17 b(start)f(end)5 b +Fi(\))47 b Fg(\000)-7 b(!)47 b Fc(list)409 b Fl(pro)q(cedure)338 +1066 y(Splits)19 b(uri)g(at)e(slashes.)29 b(Only)20 b(the)e(substring)g +(giv)o(en)h(with)f Fc(start)23 b Fl(\(inclusiv)o(e\))338 +1122 y(and)14 b Fc(end)k Fl(\(exclusiv)o(e\))c(as)g(indices)h(is)g +(considered.)20 b Fc(start)f Fl(and)13 b Fc(end)7 b Fg(\000)g +Fl(1)14 b(ha)o(v)o(e)f(to)338 1179 y(b)q(e)h(within)h(the)f(range)f(of) +h Fc(uri)p Fl(.)20 b(Otherwise)14 b(an)g(index-out-of-range)g +(exception)338 1235 y(will)j(b)q(e)f(raised.)k(Example:)438 +1311 y Fi(\(split-uri-path)i("foo/bar/colon")f(4)j(11\))338 +1387 y Fl(results)15 b(to)438 1463 y Fi('\("bar")23 b("col"\))224 +1631 y(\(uri-path-list->path)e Fc(plist)t Fi(\))48 b +Fg(\000)-8 b(!)48 b Fc(string)404 b Fl(pro)q(cedure)338 +1706 y(Generates)16 b(a)g(path)h(out)f(of)h(an)f(uri-path-list)j(b)o(y) +d(inserting)i(slashes)f(b)q(et)o(w)o(een)338 1763 y(the)c(elemen)o(ts)g +(of)g Fc(plist)p Fl(.)18 b(If)13 b(y)o(ou)g(w)o(an)o(t)e(to)i(use)g +(the)g(resulting)h(string)e(for)h(further)338 1819 y(op)q(eration,)i(y) +o(ou)g(should)h(escap)q(e)g(the)g(elemen)o(ts)g(of)e +Fc(plist)20 b Fl(in)c(case)f(the)g(con)o(tain)338 1876 +y(slashes.)23 b(This)16 b(do)q(esn't)g(escap)q(e)h(them)f(for)f(y)o +(ou,)h(y)o(ou)g(m)o(ust)f(do)h(that)f(y)o(ourself)338 +1932 y(lik)o(e)h Fi(\(uri-path-list->path)21 b(\(map)j(escape-uri)e +(pathlist\)\))p Fl(.)224 2074 y Fi(\(simplify-uri-path)g +Fc(p)n(ath)s Fi(\))48 b Fg(\000)-7 b(!)47 b Fc(list)507 +b Fl(pro)q(cedure)338 2149 y(Remo)o(v)o(es)11 b(`)p Fi(.)p +Fl(')g(and)i(`)p Fi(..)p Fl(')e(en)o(tries)h(from)g(path.)18 +b(The)13 b(result)g(is)f(a)g(\(ma)o(yb)q(e)g(empt)o(y\))338 +2206 y(list)j(represen)o(ting)g(a)f(path)g(that)f(do)q(es)i(not)f(con)o +(tain)g(an)o(y)g(`)p Fi(.)p Fl(')f(or)h(`)p Fi(..)p Fl(')7 +b(.)19 b(The)c(list)338 2262 y(can)h(only)g(b)q(e)g(empt)o(y)f(if)h +(the)g(path)f(did)i(not)e(start)g(with)g(a)h(slash)g(\(for)e(the)i +(rare)338 2319 y(o)q(ccasion)g(someone)g(w)o(an)o(ts)e(to)h(simplify)j +(a)d(relativ)o(e)i(path\).)j(The)c(result)h(is)f Fi(#f)338 +2375 y Fl(if)i(the)f(path)g(tries)h(to)f(bac)o(k)g(up)h(past)f(ro)q +(ot,)f(for)h(example)h(b)o(y)f(`)p Fi(/..)p Fl(')g(or)f(`)p +Fi(/foo)338 2432 y(/../..)p Fl(')e(or)h(just)h(`)p Fi(..)p +Fl(')6 b(.)21 b(`)p Fi(//)p Fl(')15 b(ma)o(y)g(o)q(ccur)h(somewhere)g +(in)g(the)g(path)f(referring)338 2488 y(to)f(ro)q(ot)h(but)g(not)g(b)q +(eing)h(bac)o(k)o(ed)g(up.)k(Examples:)949 2613 y(24)p +eop +%%Page: 25 25 +25 24 bop 438 286 a Fi(\(simplify-uri-path)462 343 y(\(split-uri-path) +45 b("/foo/bar/baz/..")h(0)23 b(15\)\))338 437 y Fl(results)15 +b(to)438 513 y Fi('\("")23 b("foo")g("bar"\))438 619 +y(\(simplify-uri-path)462 675 y(\(split-uri-path)e +("foo/bar/baz/../../..")g(0)j(20\)\))338 782 y Fl(results)15 +b(to)438 858 y Fi('\(\))438 964 y(\(simplify-uri-path)462 +1020 y(\(split-uri-path)21 b("/foo/../..")i(0)g(10\)\))338 +1127 y Fl(results)15 b(to)438 1203 y Fi(#f)p Fl(;)f(tried)i(to)f(bac)o +(k)g(up)g(ro)q(ot)438 1309 y Fi(\(simplify-uri-path)462 +1365 y(\(split-uri-path)21 b("foo/bar//")i(0)h(9\)\))338 +1472 y Fl(results)15 b(to)438 1548 y Fi('\(""\))23 b(;)h("//")f(refers) +g(to)h(root)438 1654 y(\(simplify-uri-path)462 1710 y(\(split-uri-path) +d("foo/bar/")i(0)h(8\)\))338 1817 y Fl(results)15 b(to)438 +1893 y Fi('\(""\))23 b(;)h(last)f("/")g(also)h(refers)f(to)g(root)438 +1999 y(\(simplify-uri-path)462 2056 y(\(split-uri-path)e +("/foo/bar//baz/../..")g(0)j(19\)\))338 2162 y Fl(results)15 +b(to)438 2238 y Fi(#f)p Fl(;)f(tries)i(to)e(bac)o(k)h(up)h(ro)q(ot)949 +2613 y(25)p eop +%%Page: 26 26 +26 25 bop 224 286 a Fh(Unexp)r(orted)17 b(names)224 397 +y Fi(uri-reserved)1051 b Fl(c)o(har-set)338 466 y(A)18 +b(list)i(of)e(reserv)o(ed)h(c)o(haracters)f(\(semicolon,)i(slash,)f +(hash,)g(question)h(mark,)338 523 y(double)c(colon)g(and)f(space\).)224 +616 y Fi(\(hex-digit?)23 b Fc(char)n(acter)5 b Fi(\))48 +b Fg(\000)-8 b(!)47 b Fc(b)n(o)n(ole)n(an)489 b Fl(pro)q(cedure)338 +698 y(Returns)19 b Fi(#t)f Fl(if)i(c)o(haracter)f(is)g(a)g(hexadecimal) +i(digit)f(\(i.e.,)g(one)f(of)g(1{9,)g(a{f,)338 754 y(A{F\),)14 +b Fi(#f)h Fl(otherwise.)224 904 y Fi(\(hexchar->int)22 +b Fc(char)n(acter)5 b Fi(\))48 b Fg(\000)-7 b(!)47 b +Fc(numb)n(er)438 b Fl(pro)q(cedure)338 986 y(T)l(ranslates)14 +b(the)f(giv)o(en)i(c)o(haracter)e(to)g(an)h(in)o(teger,)g(e.g.)19 +b Fi(\(hexchar->int)j(#a\))338 1042 y Fl(results)15 b(to)g(10.)224 +1192 y Fi(\(int->hexchar)22 b Fc(inte)n(ger)5 b Fi(\))47 +b Fg(\000)-7 b(!)47 b Fc(char)n(acter)450 b Fl(pro)q(cedure)338 +1274 y(T)l(ranslates)11 b(the)h(giv)o(en)g(in)o(teger)f(from)g(range)g +(1{15)g(in)o(to)g(an)h(hexadecimal)h(c)o(har-)338 1330 +y(acter)h(\(uses)g(upp)q(ercase)h(letters\),)f(e.g.)19 +b Fi(\(int->hexchar)j(14\))14 b Fl(results)h(to)f(`E'.)224 +1481 y Fi(\(rev-append)23 b Fc(list-a)16 b(list-b)s Fi(\))46 +b Fg(\000)-7 b(!)47 b Fc(list)546 b Fl(pro)q(cedure)338 +1562 y(P)o(erforms)10 b(a)h Fi(\(append)23 b(\(reverse)g(list-a\))f +(list-b\))p Fl(.)c(The)11 b(commen)o(t)g(sa)o(ys)338 +1618 y(it)18 b(should)h(b)q(e)f(de\014ned)h(in)g(a)e(list)i(pac)o(k)m +(age)e(but)h(I)g(am)f(w)o(ondering)i(ho)o(w)e(often)338 +1675 y(this)e(will)i(b)q(e)f(used.)949 2613 y(26)p eop +%%Page: 27 27 +27 26 bop 224 286 a Fn(9)67 b(URL)224 388 y Fm(Used)17 +b(\014les:)23 b Fl(url.scm)224 482 y Fm(Name)17 b(of)h(the)g(pac)o(k)m +(age:)k Fl(url)224 603 y Fh(9.1)56 b(Ov)n(erview)224 +689 y Fl(This)20 b(mo)q(dules)g(con)o(tains)f(pro)q(cedures)h(to)f +(parse)g(and)g(unparse)h(URLs.)32 b(Till)20 b(no)o(w,)224 +746 y(only)c(the)f(parsing)h(of)e(h)o(ttp)h(URLs)g(is)h(implemen)o +(ted.)224 867 y Fh(9.2)56 b(En)n(try)18 b(p)r(oin)n(ts)224 +978 y Fi(\(make-userhost)k Fc(user)12 b(p)n(asswor)n(d)f(host)h(p)n +(ort)t Fi(\))24 b Fg(\000)-7 b(!)24 b Fc(userhost-r)n(e)n(c)n(or)n(d)47 +b Fl(pro)q(cedure)224 1035 y Fi(\(userhost?)23 b Fc(thing)t +Fi(\))47 b Fg(\000)-7 b(!)47 b Fc(b)n(o)n(ole)n(an)598 +b Fl(pro)q(cedure)224 1091 y Fi(\(userhost:user)22 b +Fc(userhost-r)n(e)n(c)n(or)n(d)5 b Fi(\))47 b Fg(\000)-7 +b(!)47 b Fc(value)346 b Fl(pro)q(cedure)224 1147 y Fi +(\(userhost:password)22 b Fc(userhost-r)n(e)n(c)n(or)n(d)5 +b Fi(\))47 b Fg(\000)-8 b(!)48 b Fc(value)250 b Fl(pro)q(cedure)224 +1204 y Fi(\(userhost:host)22 b Fc(userhost-r)n(e)n(c)n(or)n(d)5 +b Fi(\))47 b Fg(\000)-7 b(!)47 b Fc(value)346 b Fl(pro)q(cedure)224 +1260 y Fi(\(userhost:port)22 b Fc(userhost-r)n(e)n(c)n(or)n(d)5 +b Fi(\))47 b Fg(\000)-7 b(!)47 b Fc(value)346 b Fl(pro)q(cedure)224 +1317 y Fi(\(set-userhost:user)22 b Fc(userhost-r)n(e)n(c)n(or)n(d)16 +b(new-value)s Fi(\))48 b Fg(\000)-8 b(!)48 b Fc(void)61 +b Fl(pro)q(cedure)224 1373 y Fi(\(set-userhost:password)21 +b Fc(userhost-r)n(e)n(c)n(or)n(d)11 b(new-value)s Fi(\))25 +b Fg(\000)-8 b(!)24 b Fc(void)48 b Fl(pro)q(cedure)224 +1430 y Fi(\(set-userhost:host)22 b Fc(userhost-r)n(e)n(c)n(or)n(d)16 +b(new-value)s Fi(\))48 b Fg(\000)-8 b(!)48 b Fc(void)61 +b Fl(pro)q(cedure)224 1486 y Fi(\(set-userhost:port)22 +b Fc(userhost-r)n(e)n(c)n(or)n(d)16 b(new-value)s Fi(\))48 +b Fg(\000)-8 b(!)48 b Fc(void)61 b Fl(pro)q(cedure)338 +1555 y Fi(make-userhost)11 b Fl(creates)j(a)f(new)h Fi(userhost)e +Fl(record.)19 b(This)c(record)e(describ)q(es)338 1612 +y(path-pre\014xes)24 b(of)f(the)g(form)g Fc(user)5 b +Fl(:)p Fc(p)n(asswor)n(d)g Fl(@)p Fc(host)t Fl(:)p Fc(p)n(ort)p +Fl(.)44 b(These)23 b(are)h(fre-)338 1668 y(quen)o(tly)g(used)g(as)g +(the)g(initial)h(pre\014x)g(of)e(URL's)g(describing)j(In)o(ternet)d +(re-)338 1724 y(sources.)c(Eac)o(h)c(slot)f(is)h(a)f(deco)q(ded)i +(string)f(or)f Fi(#f)p Fl(\(y)o(es,)f Fc(p)n(ort)20 b +Fl(is)15 b(also)f(a)g(string\).)338 1800 y Fi(userhost?)9 +b Fl(is)h(the)h(corresp)q(onding)g(predicate,)h Fi(userhost:user)p +Fl(,)d Fi(userhost:)338 1856 y(password)p Fl(,)17 b Fi(userhost:host)f +Fl(and)i Fi(userhost:port)e Fl(are)i(the)g(corresp)q(ondig)338 +1913 y(selectors)10 b(and)h Fi(set-userhost:user)p Fl(,)d +Fi(set-userhost:password)p Fl(,)g Fi(set-userhost:)338 +1969 y(host)19 b Fl(and)h Fi(set-userhost:port)d Fl(the)j(corresp)q +(onding)h(m)o(utators.)32 b(As)20 b(y)o(ou)338 2025 y(can)f(store)g(ev) +o(erything)g(in)o(to)g(the)g(record)h(\014elds,)g(the)g(selectors)f(ma) +o(y)g(return)338 2082 y(an)o(y)d(t)o(yp)q(e)g(of)f(v)m(alue.)24 +b(Ho)o(w)o(ev)o(er,)15 b(under)i(normal)f(circumstances,)h(only)f +Fc(string)338 2138 y Fl(or)e Fi(#f)h Fl(is)h(returned.)224 +2232 y Fi(\(parse-userhost)22 b Fc(p)n(ath)17 b(default)t +Fi(\))48 b Fg(\000)-7 b(!)47 b Fc(userhost-r)n(e)n(c)n(or)n(d)192 +b Fl(pro)q(cedure)224 2289 y Fi(\(userhost->string)22 +b Fc(userhost-r)n(e)n(c)n(or)n(d)5 b Fi(\))47 b Fg(\000)-7 +b(!)47 b Fc(string)261 b Fl(pro)q(cedure)338 2370 y Fi(parse-userhost) +17 b Fl(parses)i(a)g(URI)g(path)g(\(a)g(list)h(represen)o(ting)f(a)g +(path,)h(not)338 2426 y(a)e(string!\))28 b(in)o(to)18 +b(a)g(userhost)g(record.)28 b(Default)18 b(v)m(alues)i(are)d(tak)o(en)h +(from)f(the)338 2483 y(userhost)d(record)h Fc(default)k +Fl(except)c(for)f(the)h(host.)k(The)c(v)m(alues)h(are)e(unescap)q(ed) +949 2613 y(27)p eop +%%Page: 28 28 +28 27 bop 338 286 a Fl(and)20 b(stored)f(in)o(to)h(a)f(userhost)h +(record)f(that)g(is)h(returned.)34 b Fi(fatal-syntax-)338 +343 y(error)17 b Fl(is)h(called,)i(if)e(the)g(sp)q(eci\014ed)i(path)e +(has)f(no)h(initial)i(to)d(slashes)h(\(i.e.,)g(it)338 +399 y(starts)c(with)h(`//.)7 b(.)g(.)g('\).)338 474 y +Fi(userhost->string)19 b Fl(just)i(do)q(es)h(the)f(in)o(v)o(erse)h +(job:)32 b(it)21 b(unparses)h Fc(userhost-)338 530 y(r)n(e)n(c)n(or)n +(d)17 b Fl(in)o(to)c(a)f(string.)19 b(The)14 b(elemen)o(ts)f(of)g(the)g +(record)g(are)f(escap)q(ed)i(b)q(efore)f(the)338 587 +y(are)i(put)g(together.)338 661 y(F)l(or)f(details)h(ab)q(out)g +(escaping)g(and)g(unescaping)h(see)e(section)i(\\Handle)f(URIs")338 +717 y(at)f(page)h(22.)224 866 y Fi(\(make-http-url)22 +b Fc(userhost)12 b(p)n(ath)g(se)n(ar)n(ch)f(fr)n(ag-id)5 +b Fi(\))24 b Fg(\000)-7 b(!)23 b Fc(http-url-r)n(e)n(c)n(or)n(d)48 +b Fl(pro)q(cedure)224 922 y Fi(\(http-url?)23 b Fc(thing)t +Fi(\))47 b Fg(\000)-7 b(!)47 b Fc(b)n(o)n(ole)n(an)598 +b Fl(pro)q(cedure)224 978 y Fi(\(http-url:userhost)22 +b Fc(http-url)5 b Fi(\))48 b Fg(\000)-7 b(!)47 b Fc(value)399 +b Fl(pro)q(cedure)224 1035 y Fi(\(http-url:path)22 b +Fc(http-url)5 b Fi(\))49 b Fg(\000)-8 b(!)47 b Fc(value)495 +b Fl(pro)q(cedure)224 1091 y Fi(\(http-url:search)22 +b Fc(http-url)5 b Fi(\))48 b Fg(\000)-7 b(!)47 b Fc(value)447 +b Fl(pro)q(cedure)224 1148 y Fi(\(http-url:frag-id)22 +b Fc(http-url)5 b Fi(\))48 b Fg(\000)-7 b(!)47 b Fc(value)423 +b Fl(pro)q(cedure)224 1204 y Fi(\(set-http-url:userhost)21 +b Fc(http-url)c(new-value)s Fi(\))48 b Fg(\000)-7 b(!)47 +b Fc(void)115 b Fl(pro)q(cedure)224 1261 y Fi(\(set-http-url:path)22 +b Fc(http-url)17 b(new-value)s Fi(\))48 b Fg(\000)-7 +b(!)47 b Fc(void)210 b Fl(pro)q(cedure)224 1317 y Fi +(\(set-http-url:search)21 b Fc(http-url)d(new-value)s +Fi(\))48 b Fg(\000)-8 b(!)48 b Fc(void)162 b Fl(pro)q(cedure)224 +1374 y Fi(\(set-http-url:frag-id)21 b Fc(http-url)d(new-value)s +Fi(\))48 b Fg(\000)-8 b(!)47 b Fc(void)139 b Fl(pro)q(cedure)338 +1454 y Fi(make-http-url)11 b Fl(creates)i(a)f(new)i Fi(httpd-url)e +Fl(record.)19 b Fc(userhost)f Fl(is)13 b(a)g(record,)338 +1510 y(con)o(taining)g(the)g(initial)i(part)d(of)h(the)g(address)g +(\(lik)o(e)g Fi(anonymous@clark.lcs.)338 1566 y(mit.edu:80)p +Fl(\).)k Fc(p)n(ath)e Fl(con)o(tains)c(the)h(URL's)e(path)i(split)g(at) +f(slashes,)h(e.g.)e Fi("foo/)338 1623 y(bar/baz/")15 +b Fl(b)q(ecomes)i Fi('\("foo")23 b("bar")h("baz")f(""\))p +Fl(.)g(These)18 b(elemen)o(ts)f(are)338 1679 y(in)23 +b(ra)o(w,)g(unescap)q(ed)g(format.)40 b(T)l(o)22 b(con)o(v)o(ert)g +(them)g(bac)o(k)g(to)g(a)g(string,)h(use)338 1736 y Fi +(\(uri-path-list->path)e(\(map)i(escape-uri)g(pathlist\)\))p +Fl(.)28 b Fc(se)n(ar)n(ch)21 b Fl(and)338 1792 y Fc(fr)n(ag-id)j +Fl(are)18 b(the)i(last)e(t)o(w)o(o)g(parts)h(of)f(the)h(URL)g(\(see)g +(section)h(8)e(on)h(page)g(22)338 1849 y(ab)q(out)c(parts)f(of)h(an)g +(URI\).)338 1923 y Fi(http-url:userhost)p Fl(,)20 b Fi(http-url:path)p +Fl(,)h Fi(http-url:search)f Fl(and)h Fi(http-)338 1980 +y(url:frag-id)8 b Fl(are)i(the)g(corresp)q(onding)i(selectors,)f +Fi(set-http-url:userhost)p Fl(,)338 2036 y Fi(set-http-url:path)p +Fl(,)d Fi(set-http-url:search)g Fl(and)i Fi(set-http-url:frag-)338 +2092 y(id)16 b Fl(the)g(corresp)q(onding)h(m)o(utators.)k(As)16 +b(y)o(ou)g(can)g(store)f(ev)o(ery)h(t)o(yp)q(e)h(of)e(v)m(alue)338 +2149 y(in)o(to)e(the)h(record)f(\014elds,)i(the)e(selectors)h(can)g +(return)f(an)o(y)g(t)o(yp)q(e)h(of)f(v)m(alue.)20 b(Ho)o(w-)338 +2205 y(ev)o(er,)12 b Fi(http-:userhost)d Fl(usually)k(returns)e(a)h +Fi(userhost)e Fl(record,)i Fi(http-:path)338 2262 y Fl(returns)g(a)h +(list)g(of)g Fc(string)p Fl(s)e(and)i Fi(http-url:search)e +Fl(and)i Fi(http-url:frag-id)338 2318 y Fl(return)i(b)q(oth)g +Fc(string)p Fl(s.)224 2410 y Fi(\(parse-http-url)22 b +Fc(p)n(ath)17 b(se)n(ar)n(ch)e(fr)n(ag-id)5 b Fi(\))48 +b Fg(\000)-7 b(!)47 b Fc(http-url-r)n(e)n(c)n(or)n(d)74 +b Fl(pro)q(cedure)224 2466 y Fi(\(http-url->string)22 +b Fc(http-url-r)n(e)n(c)n(or)n(d)5 b Fi(\))48 b Fg(\000)-8 +b(!)48 b Fc(string)276 b Fl(pro)q(cedure)949 2613 y(28)p +eop +%%Page: 29 29 +29 28 bop 338 286 a Fl(The)15 b(URI)g(parser)g(\()p Fi(parse-uri)f +Fl(in)i Fi(uri.scm)p Fl(\))e(maps)h(a)g(string)g(to)g(four)g(parts:)338 +343 y Fc(scheme)p Fl(,)c Fc(p)n(ath)p Fl(,)i Fc(se)n(ar)n(ch)h +Fl(and)e Fc(fr)n(ag-id)k Fl(\(see)c(section)g(8.2)e(at)h(page)g(22)g +(for)g(details\).)338 399 y(If)g Fc(scheme)k Fl(is)c(\\h)o(ttp",)g +(then)h(the)f(other)g(three)g(parts)g(can)g(b)q(e)h(passed)g(to)e +Fi(parse-)338 456 y(http-url)p Fl(,)g(whic)o(h)i(parses)f(them)g(in)o +(to)h(a)e Fi(http-url)h Fl(record.)18 b(All)12 b(strings)g(come)338 +512 y(bac)o(k)19 b(from)f(the)h(URI)g(parser)f(enco)q(ded.)33 +b Fc(se)n(ar)n(ch)22 b Fl(and)d Fc(fr)n(ag-id)g Fl(are)g(left)g(that) +338 569 y(w)o(a)o(y;)12 b(this)h(parser)f(deco)q(des)i(the)f(path)f +(elemen)o(ts.)20 b(The)13 b(\014rst)f(t)o(w)o(o)f(list)j(elemen)o(ts) +338 625 y(of)h(the)g(path)g(indicating)i(the)e(leading)i(double-slash)g +(are)e(omitted.)338 700 y Fi(http-url->string)f Fl(just)i(do)q(es)g +(the)h(in)o(v)o(erse)f(job.)23 b(It)16 b(con)o(v)o(erts)g(a)g +Fi(http-url)338 757 y Fl(record)f(in)o(to)g(a)g Fc(string)p +Fl(.)949 2613 y(29)p eop +%%Page: 30 30 +30 29 bop 224 286 a Fn(10)67 b(Handle)22 b(RF)n(C822)g(headers)224 +388 y Fm(Used)17 b(\014les:)23 b Fl(rfc822.scm)224 482 +y Fm(Name)17 b(of)h(the)g(pac)o(k)m(age:)k Fl(rfc822)224 +603 y Fh(10.1)56 b(What)19 b(users)f(w)n(an)n(t)i(to)f(kno)n(w)224 +689 y Fm(A)e(note)h(on)g(line-terminators)224 775 y Fl +(Line-terminating)d(sequences)g(are)d(alw)o(a)o(ys)h(a)g(drag,)f(b)q +(ecause)i(there's)f(no)g(agreemen)o(t)224 832 y(on)g(them)f({)g(the)h +(Net)f(proto)q(cols)h(and)f(DOS)h(use)g(carriage-return/line-feed)h(\() +p Fi(cr)p Fl(/)p Fi(lf)p Fl(\);)224 888 y(Unix)19 b(uses)e +Fi(lf)p Fl(;)h(the)g(Mac)f(uses)h Fi(cr)p Fl(.)27 b(One)18 +b(one)g(hand,)g(y)o(ou'd)f(lik)o(e)i(to)d(use)i(the)g(co)q(de)224 +944 y(for)e(all)i(of)f(the)g(ab)q(o)o(v)o(e,)f(on)h(the)g(other,)g(y)o +(ou'd)f(also)h(lik)o(e)h(to)f(use)g(the)g(co)q(de)g(for)g(strict)224 +1001 y(applications)f(that)d(need)i(de\014nitely)h(not)e(to)f +(recognise)i(bare)f Fi(cr)p Fl('s)g(or)f Fi(lf)p Fl('s)h(as)f(termi-) +224 1057 y(nators.)295 1114 y(RF)o(C)i(822)h(requires)i(a)e +Fi(cr)p Fl(/)p Fi(lf)g Fl(\(carriage-return/line-feed\))i(pair)f(to)g +(terminate)224 1170 y(lines)g(of)e(text.)20 b(On)15 b(the)h(other)f +(hand,)g(careful)h(p)q(erusal)g(of)f(the)h(text)e(sho)o(ws)h(up)h(some) +224 1227 y(am)o(biguities)d(\(there)e(are)g(ma)o(yb)q(e)h(three)f(or)g +(four)h(of)f(these,)h(and)f(I'm)h(to)q(o)f(lazy)h(to)e(write)224 +1283 y(them)i(all)h(do)o(wn\).)19 b(F)l(urthermore,)12 +b(it)g(is)h(an)f(unfortunate)g(fact)f(that)h(man)o(y)f(Unix)i(apps)224 +1340 y(separate)i(lines)h(of)f(RF)o(C)e(822)i(text)f(with)h(simple)i +(linefeeds)g(\(e.g.,)c(messages)i(k)o(ept)g(in)224 1396 +y Fi(/usr/spool/mail)p Fl(\).)33 b(As)20 b(a)g(result,)i(this)e(co)q +(de)h(tak)o(es)f(a)f(broad-minded)j(view)f(of)224 1453 +y(line-terminators:)28 b(lines)21 b(can)e(b)q(e)g(terminated)g(b)o(y)g +(either)h Fi(cr)p Fl(/)p Fi(lf)d Fl(or)i(just)f Fi(lf)p +Fl(,)h(and)224 1509 y(either)d(terminating)g(sequence)g(is)g(trimmed.) +295 1565 y(If)11 b(y)o(ou)f(need)h(stricter)g(parsing,)g(y)o(ou)f(can)h +(call)h(the)e(lo)o(w)o(er-lev)o(el)i(pro)q(cedure)f Fi(\045read-)224 +1622 y(rfc822-field)h Fl(and)i Fi(\045read-rfc822-headers)p +Fl(.)j(They)d(tak)o(e)f(the)g(read-line)j(pro)q(ce-)224 +1678 y(dure)h(as)g(an)f(extra)g(parameter.)24 b(This)17 +b(means)g(that)f(y)o(ou)g(can)h(pass)g(in)g(a)g(pro)q(cedure)224 +1735 y(that)i(recognises)h(only)h Fi(cr)p Fl(/)p Fi(lf)p +Fl('s,)e(or)g(only)i Fi(cr)p Fl('s)e(\(for)g(a)g(Mac)g(app,)i(p)q +(erhaps\),)f(and)224 1791 y(y)o(ou)d(can)g(determine)h(whether)f(or)f +(not)g(the)h(terminators)f(get)h(trimmed.)25 b(Ho)o(w)o(ev)o(er,)224 +1848 y(y)o(our)18 b(read-line)i(pro)q(cedure)g(m)o(ust)e(indicate)i +(the)e(header-terminating)i(empt)o(y)e(line)224 1904 +y(b)o(y)g(returning)g Fc(either)23 b Fl(the)18 b(empt)o(y)g(string)g +(or)f(the)h(t)o(w)o(o-c)o(har)f(string)h Fi(cr)p Fl(/)p +Fi(lf)f Fl(\(or)g(the)224 1961 y(EOF)e(ob)s(ject\).)224 +2081 y Fm(Description)k(of)e(the)h(pro)q(cedures)224 +2191 y Fi(\(read-rfc822-field)k Fl([)p Fc(p)n(ort)t Fl(])p +Fi(\))47 b Fg(\000)-7 b(!)47 b Fc(name)16 b(b)n(o)n(dy)337 +b Fl(pro)q(cedure)224 2248 y Fi(\(\045read-rfc822-field)45 +b Fc(r)n(e)n(ad-line)16 b(p)n(ort)t Fi(\))48 b Fg(\000)-7 +b(!)47 b Fc(name)16 b(b)n(o)n(dy)128 b Fl(pro)q(cedure)338 +2317 y(Read)15 b(one)g(\014eld)h(from)f(the)g(p)q(ort,)g(and)g(return)g +(t)o(w)o(o)f(v)m(alues:)361 2423 y Fc(name)g Fl(Sym)o(b)q(ol)i(suc)o(h) +g(as)e Fi('subject)g Fl(or)h Fi('to)p Fl(.)k(The)d(\014eld)g(name)f(is) +h(con)o(v)o(erted)438 2479 y(to)i(a)h(sym)o(b)q(ol)g(using)g(the)g(Sc)o +(heme)h(implemen)o(tation's)g(preferred)f(case.)949 2613 +y(30)p eop +%%Page: 31 31 +31 30 bop 438 286 a Fl(If)19 b(the)g(implemen)o(tation)h(reads)f(sym)o +(b)q(ols)g(in)h(a)f(case-sensitiv)o(e)h(fashion)438 343 +y(\(e.g.,)11 b(scsh\),)i(lo)o(w)o(ercase)g(is)g(used.)20 +b(This)13 b(means)g(y)o(ou)f(can)h(compare)f(these)438 +399 y(sym)o(b)q(ols)g(to)f(quoted)h(constan)o(ts)e(using)j +Fi(eq?)p Fl(.)19 b(When)12 b(prin)o(ting)g(these)g(\014eld)438 +456 y(names)e(out,)h(it)f(lo)q(oks)h(b)q(est)g(if)g(y)o(ou)f +(capitalize)i(them)e(with)h Fi(\(capitalize-)438 512 +y(string)23 b(\(symbol->string)f(field-name\)\))p Fl(.)361 +585 y(v)m(arb)q(o)q(dy)e(List)g(of)f(strings)h(whic)o(h)h(are)e(the)h +(\014eld's)g(b)q(o)q(dy)l(,)i(e.g.)32 b(\(\\shiv)o(ers@)438 +642 y(lcs.mit.edu"\).)20 b(Eac)o(h)15 b(list)g(elemen)o(t)h(is)f(one)g +(line)i(from)d(the)h(\014eld's)h(b)q(o)q(dy)l(,)438 698 +y(so)k(if)h(the)f(\014eld)i(spreads)e(out)g(o)o(v)o(er)g(three)g +(lines,)j(then)d(the)h(b)q(o)q(dy)g(is)g(a)438 755 y(list)c(of)f(three) +h(strings.)23 b(The)17 b(terminating)g Fi(cr)p Fl(/)p +Fi(lf)p Fl('s)e(are)i(trimmed)f(from)438 811 y(eac)o(h)i(string.)29 +b(A)18 b(leading)h(space)g(or)e(a)h(leading)i(horizon)o(tal)e(tab)g(is) +h(also)438 868 y(trimmed,)c(but)g(one)h(and)f(on)o(yl)g(one.)338 +974 y(When)h(there)g(are)g(no)g(more)g(\014elds)h({)f(EOF)g(or)f(a)h +(blank)h(line)g(has)f(terminated)338 1030 y(the)f(header)h(section)f({) +g(then)h(the)f(pro)q(cedure)h(returns)f([)p Fi(#f)g(#f)p +Fl(].)338 1105 y(The)c Fi(\045read-rfc822-field)d Fl(v)m(arian)o(t)j +(allo)o(ws)g(y)o(ou)g(to)f(sp)q(ecify)j(y)o(our)d(o)o(wn)g(read-)338 +1162 y(line)15 b(pro)q(cedure.)20 b(The)14 b(one)f(used)h(b)o(y)g +Fi(read-rfc822-field)e Fl(terminates)h(lines)338 1218 +y(with)g(either)g Fi(cr)p Fl(/)p Fi(lf)f Fl(or)g(just)g +Fi(lf)p Fl(,)g(and)h(it)g(trims)f(the)h(terminator)f(from)g(the)g +(line.)338 1275 y(Y)l(our)i(read-line)i(pro)q(cedure)f(should)g(trim)f +(the)g(terminator)f(of)h(the)g(line,)i(so)e(an)338 1331 +y(empt)o(y)h(line)i(is)e(returned)h(as)f(an)g(empt)o(y)g(string.)338 +1406 y(The)h(pro)q(cedures)i(raise)e(an)h(error)e(if)i(the)g(syn)o(tax) +e(of)h(the)h(read)f(\014eld)i(\(the)e(line)338 1463 y(returned)f(b)o(y) +h(the)f(read-line-function\))j(is)d(illegal)j(\(regarding)c(RF)o(C)g +(822\).)224 1613 y Fi(\(read-rfc822-headers)21 b Fl([)p +Fc(p)n(ort)t Fl(])p Fi(\))48 b Fg(\000)-7 b(!)47 b Fc(asso)n(ciation)15 +b(list)204 b Fl(pro)q(cedure)224 1670 y Fi(\(\045read-rfc822-headers)21 +b Fc(r)n(e)n(ad-line)13 b(p)n(ort)t Fi(\))37 b Fg(\000)-8 +b(!)35 b Fc(asso)n(ciation)14 b(list)47 b Fl(pro)q(cedure)338 +1751 y(Read)22 b(in)h(and)g(parse)f(up)h(a)f(section)h(of)f(text)g +(that)f(lo)q(oks)i(lik)o(e)h(the)e(header)338 1807 y(p)q(ortion)14 +b(of)f(an)h(RF)o(C)e(822)h(message.)19 b(Return)13 b(an)h(asso)q +(ciation)g(list)g(mapping)h(a)338 1864 y(\014eld)g(name)g(\(a)e(sym)o +(b)q(ol)i(suc)o(h)g(as)f('date)f(or)h('sub)s(ject\))g(to)f(a)h(list)i +(of)d(\014eld)j(b)q(o)q(dies)338 1920 y({)e(one)h(for)e(eac)o(h)i(o)q +(ccurence)h(of)e(the)g(\014eld)i(in)g(the)e(header.)20 +b(So)15 b(if)g(there)f(are)g(\014v)o(e)338 1977 y(\\Receiv)o(ed-b)o +(y:")26 b(\014elds)19 b(in)g(the)g(header,)f(the)h(alist)f(maps)g +('receiv)o(ed-b)o(y)h(to)f(a)338 2033 y(\014v)o(e)13 +b(elemen)o(t)g(list.)20 b(Eac)o(h)13 b(b)q(o)q(dy)g(is)g(in)h(turn)f +(represen)o(ted)g(b)o(y)g(a)f(list)i(of)e(strings)h({)338 +2090 y(one)g(for)g(eac)o(h)h(line)h(of)e(the)h(\014eld.)20 +b(So)14 b(a)f(\014eld)i(spread)f(across)e(three)i(lines)h(w)o(ould)338 +2146 y(pro)q(duce)h(a)f(three)g(elemen)o(t)h(b)q(o)q(dy)l(.)338 +2221 y(The)j Fi(\045read-rfc822-headers)d Fl(v)m(arian)o(t)j(allo)o(ws) +g(y)o(ou)g(to)f(sp)q(ecify)j(y)o(our)d(o)o(wn)338 2278 +y(read-line)d(pro)q(cedure.)20 b(See)15 b Fc(A)f(note)h(on)f +(line-terminators)j Fl(ab)q(o)o(v)o(e)c(for)g(reasons)338 +2334 y(wh)o(y)l(.)338 2409 y(Hin)o(t:)18 b(If)13 b(y)o(ou)e(w)o(an)o(t) +g(to)h(get)f(familiar)i(with)g(these)f(pro)q(cedures,)h(y)o(ou)f(migh)o +(t)g(\014nd)338 2466 y Fi(make-string-input-port)p Fl(,)f(that)j(mak)o +(es)g(a)g(p)q(ort)h(out)f(of)g(a)g(string,)h(helpful.)949 +2613 y(31)p eop +%%Page: 32 32 +32 31 bop 224 368 a Fi(\(rejoin-header-lines)21 b Fc(alist)12 +b Fl([)p Fc(sep)n(er)n(ator)5 b Fl(])p Fi(\))29 b Fg(\000)-7 +b(!)29 b Fc(asso)n(ciation)12 b(list)47 b Fl(pro)q(cedure)338 +449 y(T)l(ak)o(es)17 b(a)g(\014eld)i Fc(alist)e Fl(suc)o(h)h(as)g(is)g +(returned)g(b)o(y)g Fi(read-rfc822-headers)d Fl(and)338 +506 y(returns)k(an)h(equiv)m(alen)o(t)i(asso)q(ciation)e(list.)34 +b(Eac)o(h)20 b(b)q(o)q(dy)h(\()p Fc(string)p Fl(list\))e(in)h(the)338 +562 y(input)h Fc(alist)f Fl(is)g(joined)i(in)o(to)e(a)g(single)h(list)g +(in)g(the)g(output)f(alist.)35 b Fc(sep)n(ar)n(ator)338 +619 y Fl(is)23 b(the)f(string)h(used)f(to)g(join)h(these)g(elemen)o(ts) +g(together;)i(it)d(defaults)h(to)f(a)338 675 y(single)c(space,)f(but)f +(can)h(usefully)h(b)q(e)g(\\)p Fi(\\n)p Fl(")d(\(linefeed\))j(or)e(\\)p +Fi(\\r\\n)p Fl(")g(\(carriage-)338 731 y(return/line-feed\).)338 +807 y(T)l(o)f(rejoin)g(a)g(single)i(b)q(o)q(dy)f(list,)f(use)h(scsh's)f +Fi(join-strings)e Fl(pro)q(cedure.)295 932 y(F)l(or)j(the)g(follo)o +(wing)h(de\014nitions')h(examples,)f(let's)g(use)f(this)h(set)f(of)g +(of)g(RF)o(C)f(822)224 988 y(headers:)457 1082 y Fi(From:)23 +b(shivers)457 1139 y(To:)h(ziggy,)505 1195 y(newts)457 +1252 y(To:)g(gjs,)f(tk)224 1370 y(\(get-header-all)f +Fc(he)n(aders)16 b(name)s Fi(\))48 b Fg(\000)-7 b(!)47 +b Fc(string)16 b(list)f(list)186 b Fl(pro)q(cedure)338 +1452 y(Returns)15 b(all)h(en)o(tries)f(or)g Fi(#f)p Fl(,)f(e.g.)438 +1528 y Fi(\(get-header-all)22 b(hdrs)h('to\))338 1604 +y Fl(results)15 b(to)438 1680 y Fi('\(\(")23 b(ziggy,")g(")h(newts"\))f +(\(")g(gjs,)h(tk"\)\))224 1856 y(\(get-header-lines)e +Fc(he)n(aders)16 b(name)s Fi(\))48 b Fg(\000)-7 b(!)47 +b Fc(string)15 b(list)214 b Fl(pro)q(cedure)338 1937 +y(Returns)15 b(all)h(lines)g(of)f(the)g(\014rst)g(en)o(try)g(or)g +Fi(#f)p Fl(,)f(e.g.)438 2013 y Fi(\(get-header-lines)21 +b(hdrs)j('to\))338 2089 y Fl(results)15 b(to)438 2165 +y Fi('\(")23 b(ziggy,")g(")h(newts"\))224 2341 y(\(get-headers)e +Fc(he)n(aders)17 b(name)f Fl([)p Fc(sep)n(er)n(ator)5 +b Fl(])o Fi(\))47 b Fg(\000)-7 b(!)47 b Fc(string)187 +b Fl(pro)q(cedure)338 2423 y(Returns)22 b(the)g(\014rst)g(en)o(try)g +(with)g(the)g(lines)i(joined)f(together)f(b)o(y)g(sep)q(erator)338 +2479 y(\(newline)17 b(b)o(y)e(default\),)g(e.g.)949 2613 +y(32)p eop +%%Page: 33 33 +33 32 bop 438 286 a Fi(\(get-header)22 b(hdrs)h('to\))338 +362 y Fl(results)15 b(to)438 456 y Fi(")24 b(ziggy,)486 +513 y(newts")338 607 y Fl(Note,)14 b(that)h Fi(newts)f +Fl(is)i(led)g(b)o(y)f(t)o(w)o(o)f(spaces.)224 757 y Fi +(\(string->symbol-pref)21 b Fc(string)t Fi(\))47 b Fg(\000)-7 +b(!)47 b Fc(symb)n(ol)356 b Fl(pro)q(cedure)338 838 y(T)l(ak)o(es)10 +b(a)h(and)g(con)o(v)o(erts)f(it)i(to)e(a)h(sym)o(b)q(ol)g(using)h(the)f +(Sc)o(heme)h(implemen)o(tation's)338 895 y(preferred)19 +b(case.)33 b(\(The)19 b(preferred)h(case)f(is)h(recognized)g(b)o(y)f(a) +g(doing)h(once)g(a)338 951 y Fi(symbol->string)13 b Fl(con)o(v)o +(ersion)i(of)k Fi('a)p Fl(.\))224 1140 y Fm(Desireable)f(functionaliti) +q(es)292 1226 y Fg(\017)23 b Fl(Unfolding)16 b(long)g(lines.)292 +1320 y Fg(\017)23 b Fl(Lexing)16 b(structured)f(\014elds.)292 +1413 y Fg(\017)23 b Fl(Unlexing)17 b(structured)e(\014elds)h(in)o(to)g +(canonical)g(form.)292 1507 y Fg(\017)23 b Fl(P)o(arsing)15 +b(and)g(unparsing)h(dates.)292 1601 y Fg(\017)23 b Fl(P)o(arsing)15 +b(and)g(unparsing)h(addresses.)949 2613 y(33)p eop +%%Page: 34 34 +34 33 bop 224 286 a Fn(11)67 b(Using)22 b(NTP)224 388 +y Fm(Used)17 b(\014les:)23 b Fl(nettime.scm)224 482 y +Fm(Name)17 b(of)h(the)g(pac)o(k)m(age:)k Fl(nettime)224 +588 y(Not)15 b(implemen)o(ted)i(y)o(et.)949 2613 y(34)p +eop +%%Page: 35 35 +35 34 bop 224 286 a Fn(12)67 b(Using)22 b(SMTP)224 388 +y Fm(Used)17 b(\014les:)23 b Fl(sm)o(tp.scm)224 482 y +Fm(Name)17 b(of)h(the)g(pac)o(k)m(age:)k Fl(sm)o(tp)224 +588 y(Not)15 b(implemen)o(ted)i(y)o(et.)949 2613 y(35)p +eop +%%Page: 36 36 +36 35 bop 224 286 a Fn(13)67 b(Using)22 b(POP3)224 388 +y Fm(Used)17 b(\014les:)23 b Fl(p)q(op3.scm)224 482 y +Fm(Name)17 b(of)h(the)g(pac)o(k)m(age:)k Fl(p)q(op3)224 +588 y(Not)15 b(implemen)o(ted)i(y)o(et.)949 2613 y(36)p +eop +%%Page: 37 37 +37 36 bop 224 286 a Fn(14)67 b(Manipulating)24 b(strings)224 +388 y Fm(Used)17 b(\014les:)23 b Fl(stringhax.scm)224 +478 y Fm(Name)17 b(of)h(the)g(pac)o(k)m(age:)k Fl(strings)224 +599 y Fh(Ov)n(erview)224 684 y Fl(This)16 b(mo)q(dule)g(pro)o(vides)g +(sev)o(eral)f(pro)q(cedures)h(to)f(manipulate)h(strings.)224 +763 y Fi(\(string-map)23 b Fc(pr)n(o)n(c)n(e)n(dur)n(e)15 +b(string)t Fi(\))47 b Fg(\000)-7 b(!)47 b Fc(string)389 +b Fl(pro)q(cedure)338 841 y(Do)q(es)12 b(a)g(map)h(on)f(eac)o(h)h(c)o +(haracter)f(of)g Fc(string)k Fl(and)c(returns)h(the)f(result,)h(a)g +(newly)338 897 y(allo)q(cated)g(string.)19 b Fc(pr)n(o)n(c)n(e)n(dur)n +(e)d Fl(tak)o(es)c(a)g(c)o(haracter)g(and)h(should)h(return)e(a)h(c)o +(har-)338 954 y(acter.)224 1099 y Fi(\(downcase-string)22 +b Fc(string)t Fi(\))47 b Fg(\000)-8 b(!)48 b Fc(string)469 +b Fl(pro)q(cedure)224 1156 y Fi(\(upcase-string)22 b +Fc(string)t Fi(\))47 b Fg(\000)-7 b(!)47 b Fc(string)517 +b Fl(pro)q(cedure)338 1234 y(Do)12 b(what)g(y)o(ou)h(exp)q(ect:)19 +b(con)o(v)o(ert)12 b Fc(string)k Fl(to)d(do)o(wncase)f(or)h(up)q(case)g +(using)h(c)o(har-)338 1290 y(do)o(wncase)g(or)f(c)o(har-up)q(case,)i +(resp)q(ectiv)o(ely)l(.)21 b(The)14 b(result)h(is)f(a)g(newly)h(allo)q +(cated)338 1347 y(string.)224 1492 y Fi(\(char-set-index)22 +b Fc(string)15 b(char-set)i Fl([)p Fc(start)t Fl(])p +Fi(\))47 b Fg(\000)-7 b(!)47 b Fc(numb)n(er)155 b Fl(pro)q(cedure)224 +1548 y Fi(\(char-set-rindex)22 b Fc(string)15 b(char-set)i +Fl([)p Fc(start)t Fl(])p Fi(\))47 b Fg(\000)-7 b(!)47 +b Fc(numb)n(er)131 b Fl(pro)q(cedure)338 1627 y(Returns)13 +b(the)g(index)i(of)e(the)h(\014rst)f(c)o(haracter)g(that)g(is)h(in)g +Fc(char-set)p Fl(.)20 b Fi(char-set-)338 1683 y(index)12 +b Fl(searc)o(hes)i(from)e(left)i(to)f(righ)o(t,)g Fi(char-set-rindex)e +Fl(from)i(righ)o(t)g(to)g(left.)338 1739 y Fc(start)19 +b Fl(is)14 b(the)h(index)g(from)f(where)h(to)e(start)g(from)h(and)h +(defaults)f(to)g(0)g(in)h Fi(char-)338 1796 y(set-index)k +Fl(and)j Fi(\(string-length)g Fb(string)7 b Fi(\))20 +b Fl(in)i Fi(char-set-rindex)p Fl(.)35 b(If)338 1852 +y(the)15 b(searc)o(h)g(fails,)h Fi(#f)f Fl(is)g(returned.)224 +1998 y Fi(\(string-reduce)22 b Fc(default)17 b(c)n(onstruct)f(string)t +Fi(\))47 b Fg(\000)-8 b(!)48 b Fc(string)171 b Fl(pro)q(cedure)338 +2076 y(Do)q(es)16 b(a)f(\\fold-righ)o(t")h(on)g Fc(string)p +Fl(.)21 b(It)16 b(applies)i Fc(c)n(onstruct)i Fl(on)15 +b(ev)o(ery)h(c)o(haracter)338 2132 y(of)c Fc(string)p +Fl(.)18 b Fc(c)n(onstruct)e Fl(is)d(initially)i(in)o(v)o(ok)o(ed)e +(with)g(the)f(last)h(c)o(haracter)f(of)g(string)338 2189 +y(and)g Fc(default)p Fl(.)19 b(In)13 b(subsequen)o(t)g(in)o(v)o(o)q +(cations,)f(the)h(last)f(argumen)o(t)f(is)h(the)h(return)338 +2245 y(v)m(alue)19 b(from)f(the)g(previous)h(in)o(v)o(o)q(cation)g(of)f +Fc(c)n(onstruct)k Fl(while)e(the)e(\014rst)g(argu-)338 +2302 y(men)o(t)11 b(is)h(the)g(c)o(haracter)f(of)g Fc(string)k +Fl(leading)e(the)e(previous)i(used)f(c)o(haracter.)18 +b(So,)338 2358 y(the)c(string)h(is)g(tra)o(v)o(ersed)e(from)h(righ)o(t) +g(to)g(left.)20 b(The)14 b(result)h(of)f(the)h(application)338 +2415 y(of)g Fc(string-r)n(e)n(duc)n(e)i Fl(is)f(the)f(result)h(of)f +(the)g(last)g(application)i(of)e Fc(c)n(onstruct)p Fl(.)338 +2488 y(Example:)949 2613 y(37)p eop +%%Page: 38 38 +38 37 bop 438 286 a Fi(\(string-reduce)462 343 y("")462 +399 y(\(lambda)23 b(\(char)g(str\))509 456 y(\(string-append)f(str)i +(\(string)f(\(char-downcase)f(char\)\)\)\))462 512 y("DOWNCASE"\))338 +625 y Fl(results)15 b(to)g(\\do)o(wncase".)224 775 y +Fi(\(string-prefix?)22 b Fc(pr)n(e\014x)16 b(string)t +Fi(\))47 b Fg(\000)-7 b(!)47 b Fc(b)n(o)n(ole)n(an)340 +b Fl(pro)q(cedure)224 831 y Fi(\(string-suffix?)22 b +Fc(su\016x)16 b(string)t Fi(\))47 b Fg(\000)-7 b(!)47 +b Fc(b)n(o)n(ole)n(an)344 b Fl(pro)q(cedure)338 913 y(Return)19 +b Fi(#t)h Fl(if)g Fc(pr)n(e\014x)5 b Fl(/)p Fc(su\016x)25 +b Fl(is)c(a)e(real)i Fc(pr)n(e\014x)5 b Fl(/)p Fc(su\016x)25 +b Fl(of)19 b Fc(string)p Fl(,)h(otherwise)338 969 y(return)h +Fi(#f)p Fl(.)36 b(Real)21 b(pre\014x/su\016x)g(means)g(that)f +Fc(string)k Fl(ma)o(y)d(not)f(b)q(e)i(a)e(pre-)338 1026 +y(\014x/su\016x)14 b(of)g Fc(pr)n(e\014x)5 b Fl(/)p Fc(su\016x)20 +b Fl(\(in)14 b(other)g(w)o(ords:)19 b Fc(pr)n(e\014x)g +Fl(and)c Fc(su\016x)k Fl(ha)o(v)o(e)14 b(to)g(b)q(e)338 +1082 y(real)h(shorter)g(than)g Fc(string)j Fl(to)d(b)q(e)h(a)f(real)g +(pre\014x)h(or)e(su\016x.)224 1232 y Fi(\(skip-whitespace)22 +b Fc(string)t Fi(\))47 b Fg(\000)-8 b(!)48 b Fc(numb)n(er)437 +b Fl(pro)q(cedure)338 1314 y(Returns)14 b(the)h(index)h(of)e(the)h +(\014rst)g(c)o(haracter)f(in)i Fc(string)i Fl(that)c(is)h(not)f(a)h +(whites-)338 1370 y(pace)f(\(as)f(de\014ned)i(in)g Fi +(char-set:whitespace)p Fl(\).)h(If)e(there)g(isn't)g(suc)o(h)g(a)g(c)o +(har-)338 1427 y(acter,)g Fi(#f)h Fl(is)h(returned.)224 +1577 y Fi(\(trim-spaces)22 b Fc(string)t Fi(\))47 b Fg(\000)-7 +b(!)47 b Fc(string)565 b Fl(pro)q(cedure)338 1658 y(Returns)13 +b(a)g(newly)h(allo)q(cated)h(string)e(b)q(eing)i Fc(string)i +Fl(without)c(leading)i(or)e(trail-)338 1715 y(ing)j(spaces)f(\(not)f +(whitespaces!\).)949 2613 y(38)p eop +%%Page: 39 39 +39 38 bop 224 286 a Fn(15)67 b(Ev)l(aluating)24 b(expression)f(in)g +(\\safe")e(en)n(vironmen)n(ts)224 388 y Fm(Used)c(\014les:)23 +b Fl(none,)15 b(de\014ned)i(in)f(mo)q(dules.scm)224 481 +y Fm(Name)h(of)h(the)g(pac)o(k)m(age:)k Fl(loser,)15 +b(to)q(othless,)g(to)q(othless-ev)m(al)338 537 y(\(y)o(ou)f(w)o(an)o(t) +g(the)i(last)f(one\))224 659 y Fh(15.1)56 b(Ov)n(erview)224 +745 y Fl(These)19 b(mo)q(dules)g(de\014ne)h(an)e(en)o(vironmen)o(t)g +(that)g(is)h(R5RS)e(without)h(features)g(that)224 801 +y(could)h(examine)f(or)g(e\013ect)f(the)h(\014le)g(system.)27 +b(Y)l(ou)18 b(can)g(also)g(use)g(it)g(as)f(a)g(mo)q(del)i(of)224 +858 y(ho)o(w)c(to)f(execute)i(co)q(de)g(in)g(other)f(protected)g(en)o +(vironmen)o(ts)g(in)i(Sc)o(heme)e(48.)224 979 y Fh(15.2)56 +b(The)18 b Fa(loser)f Fh(pac)n(k)m(age)224 1065 y Fl(The)f +Fi(loser)e Fl(pac)o(k)m(age)h(exp)q(orts)g(only)h(one)f(pro)q(cedure:) +224 1145 y Fi(\(loser)23 b Fc(name)s Fi(\))48 b Fg(\000)-7 +b(!)47 b Fc(nothing)681 b Fl(pro)q(cedure)338 1226 y(Raises)15 +b(an)g(error)f(lik)o(e)j(\\Illegal)g(call)f Fc(name)p +Fl(".)224 1416 y Fh(15.3)56 b(The)18 b Fa(toothless)e +Fh(pac)n(k)m(age)224 1502 y Fl(The)g Fi(toothless)e Fl(pac)o(k)m(age)h +(con)o(tains)g(ev)o(erything)h(of)f(R5RS)f(except)h(that)g(follo)o +(wing)224 1558 y(pro)q(cedure)h(cause)g(an)f(error)f(if)i(called:)292 +1650 y Fg(\017)23 b Fi(call-with-input-file)292 1743 +y Fg(\017)g Fi(call-with-output-file)292 1836 y Fg(\017)g +Fi(load)292 1930 y Fg(\017)g Fi(open-input-file)292 2023 +y Fg(\017)g Fi(open-output-file)292 2116 y Fg(\017)g +Fi(transcript-on)292 2209 y Fg(\017)g Fi(with-input-from-file)292 +2302 y Fg(\017)g Fi(with-input-to-file)292 2395 y Fg(\017)g +Fi(eval)292 2488 y Fg(\017)g Fi(interaction-environment)949 +2613 y Fl(39)p eop +%%Page: 40 40 +40 39 bop 292 286 a Fg(\017)23 b Fi(scheme-report-environment)295 +380 y Fl(So,)14 b Fi(toothless)g Fl(creates)h(an)g(en)o(vironmen)o(t)h +(as)f(describ)q(ed)i(in)f Fc(Overview)k Fl(ab)q(o)o(v)o(e.)224 +502 y Fh(15.4)56 b(The)18 b Fa(toothless-e)o(va)o(l)e +Fh(pac)n(k)m(age)224 613 y Fi(\(eval-safely)22 b Fc(expr)n(ession)s +Fi(\))47 b Fg(\000)-7 b(!)47 b Fc(any)16 b(r)n(esult)395 +b Fl(pro)q(cedure)338 682 y(Creates)16 b(a)g(brand)h(new)g(pac)o(k)m +(age,)g(imp)q(orts)g(the)f Fi(toothless)g Fl(structure,)g(and)338 +738 y(ev)m(aluates)h Fc(expr)n(ession)h Fl(in)f(it.)23 +b(When)16 b(the)g(ev)m(aluation)i(is)e(done,)h(the)f(en)o(viron-)338 +794 y(men)o(t)11 b(is)h(thro)o(wn)f(a)o(w)o(a)o(y)l(,)g(so)g +Fc(expr)n(ession)s Fl('s)g(side-e\013ects)h(don't)f(p)q(ersist)h(from)f +(one)338 851 y Fi(eval-safely)i Fl(call)k(to)d(the)h(next.)20 +b(If)c Fc(expr)n(ession)h Fl(raises)e(an)g(error)g(exception,)338 +907 y(w)o(e)g(ab)q(ort)f(and)i(return)f Fi(#f)p Fl(.)949 +2613 y(40)p eop +%%Trailer +end +userdict /end-hook known{end-hook}if +%%EOF diff --git a/doc/latex/man.tex b/doc/latex/man.tex new file mode 100644 index 0000000..1425bdc --- /dev/null +++ b/doc/latex/man.tex @@ -0,0 +1,34 @@ +\documentclass[11pt]{article} +\usepackage[latin1]{inputenc} +\usepackage{code} +\date{28. Januar 2002} +\author{composed by Andreas Bernauer\footnote{\texttt{bernauer@informatik.uni-tuebingen.de}}} +\title{Documentation of the sunet-package} + +\input{decls} + +\begin{document} +\maketitle +\begin{abstract} +This document contains informations for users and programmers using +the sunet package. +\end{abstract} +\tableofcontents + +\include{intro} +\include{httpd} +\include{cgi-server} +\include{cgi-script} +\include{ftpd} +\include{ftp} +\include{netrc} +\include{uri} +\include{url} +\include{rfc822} +\include{ntp} +\include{smtp} +\include{pop3} +\include{stringhax} +\include{toothless} +\FIXME{Is there a possibility to get rid of the overfull \\hboxes?} +\end{document} diff --git a/doc/latex/netrc.tex b/doc/latex/netrc.tex new file mode 100644 index 0000000..18eed0d --- /dev/null +++ b/doc/latex/netrc.tex @@ -0,0 +1,142 @@ +\section{Reading netrc-files} +% +\begin{description} +\item[Used files:] netrc.scm +\item[Name of the package:] netrc +\end{description} +% +\subsection{Overview} +This module provides procedures to parse authentication information +contained in \ex{~/.netrc}. + +On Unix systems the \ex{~/.netrc} file (in the user's home directory) +may contain information allowing automatic login to remote hosts. The +format of the file is defined in the \ex{ftp}(1) manual page. Example +lines are +\begin{code} +machine ondine.cict.fr login marsden password secret +default login anonymous password user@site +\end{code} + +The \ex{~/.netrc} file should be protected by appropriate permissions, and +(like \ex{/usr/bin/ftp}) this library will refuse to read the file if it is +badly protected. (unlike \ex{ftp} this library will always refuse +to read the file -- \ex{ftp} refuses it only if the password is +given for a non-default account). Appropriate permissions are set if +only the user has permissions on the file. + +Note following restrictions and differences: +\begin{itemize} +\item The macdef statement (defining macros) is not supported. +\item The settings for one machine must be on a single line. +\item The is no error proof while reading the file. +\item Default need not be the last line of the netrc-file. +\end{itemize} + + + +\subsection{Entry points} + +What you probably want, is to read out the default netrc-file. Do the +following: +\begin{code} + (let ((netrc-record (netrc:parse))) + (netrc:lookup netrc-record "name of the machine")) +\end{code} + +and you will receive three values: \semvar{login-name}, +\semvar{password} and \semvar{account-name}. If you only want the +login name or the password, use \ex{netrc:\ob{}lookup\=login} or +\ex{netrc:\ob{}lookup\=password}, resp. + +You will get either the login / password for the specified machine, or +a default login / password if the machine is unknown. + + +\begin{defundesc}{user-mail-address}{}{string} + Calculate the user's email address, as per the Emacs function of the + same name. Will take into account the environment variable + \ex{REPLYTO}, if set. Otherwise the mail-address will look like + \ex{user@\ob{}hostname}. +\end{defundesc} + +\defun{netrc:parse} {\ovar{filename \ovar{fallback-password + \ovar{fallback-login}}}} {netrc-record} +\begin{defundescx}{netrc:try-parse} {filename fallback-password + fallback-login} {netrc-record} + + \ex{netrc:parse} parses the netrc file and returns a \ex{netrc} + record, containing all necessary information for the following + procedures. + + \semvar{filename} defaults to ``~/.netrc'', + \semvar{fallback-password} defaults to the result of the call to + \ex{user\=mail\=address} and \semvar{fallback-login} defaults to + ``anonymous''. If the netrc file does not provide a default password + or a default login (stated by the ``default'' statement), + \semvar{fallback-password} and \semvar{fallback-login} will be used + as default password or login, respectively (thus, + \ex{user\=mail\=address} is only called if the netrc file does not + contain a default specification). If the netrc file does not exist, + a netrc-record filled with default values is returned. If the netrc + file does not have the correct permissions, a message is printed to + the current error port and a netrc-record filled with default values + is returned. + + \ex{netrc:try-parse} does the same as \ex{netrc:\ob{}parse}, except + of the following: if there is no file called \semvar{filename}, the + according error will be raised and if the specified file does not + have the correct permissions set, a \ex{netrc\=refuse\=warning} will + be signalled. So, if you don't like the error handling and behavior + of \ex{netrc:\ob{}parse}, use \ex{netrc:\ob{}try\=parse} and catch + the signalled conditions. Note, that \ex{netrc:\ob{}parse} resolves + \semvar{filename} for you, \ex{netrc:\ob{}try-parse} does not -- you + have to do it on your own. +\end{defundescx} + +\defun{netrc:lookup}{netrc-record machine \ovar{default?}} {string + string string} +\defunx{netrc:lookup-password}{netrc-record machine + \ovar{default?}}{string} +\defunx{netrc:lookup-login}{netrc-record machine + \ovar{default?}}{string} +\begin{defundescx} + Return the login, password and / or account information for + \semvar{machine} specified by \semvar{netrc-record}, respectively. + If \semvar{default?} is \sharpt, default values are returned if no + such \semvar{machine} is specified in the \semvar{netrc-record}. + Otherwise [\sharpf\ \sharpf\ \sharpf] or \sharpf\ is returned, + respectively. +\end{defundescx} + +\defun{netrc:default-login}{netrc-record}{string} +\begin{defundescx}{netrc:default-password}{netrc-record}{string} + Return the default values for the login or the password, respectively, + specified by \semvar{netrc-record}. If the netrc file did not + specify a default login, ``anonymous'' is returned by + \ex{netrc:\ob{}default\=login}. If the netrc file did not specify a + default password, the result of the call to \ex{user\=mail\=address} + is returned by \ex{netrc:\ob{}default\=password}. +\end{defundescx} + +\subsection{Related work} +\begin{itemize} +\item Graham Barr has written a similar library for Perl, called + \ex{Netrc.pm}. +\item \ex{ange-ftp.el} (transparent remote file access for Emacs) + parses the user's netrc file. +\end{itemize} + +\subsection{Desirable things} +\begin{itemize} +\item Remove restrictions (as stated in `\emph{Overview}') and behave like + \ex{/usr/\ob{}bin/\ob{}ftp} behaves +\item perhaps: adding case-insensitivity (for host names) +\item perhaps: better record-disclosers for netrc-entry- and + netrc-records +\end{itemize} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/doc/latex/ntp.tex b/doc/latex/ntp.tex new file mode 100644 index 0000000..9e92422 --- /dev/null +++ b/doc/latex/ntp.tex @@ -0,0 +1,8 @@ +\section{Using NTP} +% +\begin{description} +\item[Used files:] nettime.scm +\item[Name of the package:] nettime +\end{description} +% +Not implemented yet. diff --git a/doc/latex/pop3.tex b/doc/latex/pop3.tex new file mode 100644 index 0000000..70541c9 --- /dev/null +++ b/doc/latex/pop3.tex @@ -0,0 +1,8 @@ +\section{Using POP3} +% +\begin{description} +\item[Used files:] pop3.scm +\item[Name of the package:] pop3 +\end{description} +% +Not implemented yet. diff --git a/doc/latex/rfc822.tex b/doc/latex/rfc822.tex new file mode 100644 index 0000000..1524693 --- /dev/null +++ b/doc/latex/rfc822.tex @@ -0,0 +1,170 @@ +\section{Handle RFC822 headers} +% +\begin{description} +\item[Used files:] rfc822.scm +\item[Name of the package:] rfc822 +\end{description} +% +\subsection{What users want to know} + +\subsubsection*{A note on line-terminators} +Line-terminating sequences are always a drag, because there's no +agreement on them -- the Net protocols and DOS use +carriage-return/line-feed (\ex{cr}/\ex{lf}); Unix uses \ex{lf}; the +Mac uses \ex{cr}. One one hand, you'd like to use the code for all of +the above, on the other, you'd also like to use the code for strict +applications that need definitely not to recognise bare \ex{cr}'s or +\ex{lf}'s as terminators. + +RFC 822 requires a \ex{cr}/\ex{lf} (carriage-return/line-feed) pair to +terminate lines of text. On the other hand, careful perusal of the +text shows up some ambiguities (there are maybe three or four of +these, and I'm too lazy to write them all down). Furthermore, it is an +unfortunate fact that many Unix apps separate lines of RFC~822 text +with simple linefeeds (e.g., messages kept in \ex{/usr/spool/mail}). +As a result, this code takes a broad-minded view of line-terminators: +lines can be terminated by either \ex{cr}/\ex{lf} or just \ex{lf}, and +either terminating sequence is trimmed. + +If you need stricter parsing, you can call the lower-level procedure +\ex{\%read\=rfc822\=field} and \ex{\%read\=rfc822\=headers}. They take +the read-line procedure as an extra parameter. This means that you can +pass in a procedure that recognises only \ex{cr}/\ex{lf}'s, or only +\ex{cr}'s (for a Mac app, perhaps), and you can determine whether or +not the terminators get trimmed. However, your read-line procedure +must indicate the header-terminating empty line by returning \emph{either} +the empty string or the two-char string \ex{cr}/\ex{lf} (or the EOF object). + +\subsubsection*{Description of the procedures} + +\defun{read-rfc822-field} {\ovar{port}} {name body} +\begin{defundescx}{\%read-rfc822-field } {read-line port} {name body} + + Read one field from the port, and return two values: + + \begin{description} + \item{\var{name}} Symbol such as \ex{'subject} or \ex{'to}. The + field name is converted to a symbol using the Scheme + implementation's preferred case. If the implementation reads + symbols in a case-sensitive fashion (e.g., scsh), lowercase is + used. This means you can compare these symbols to quoted constants + using \ex{eq?}. When printing these field names out, it looks best + if you capitalize them with \ex{(capitalize\=string (symbol->string field\=name))}. + + \item{var{body}} List of strings which are the field's body, e.g. + (``shivers\discretionary{@}{}{@}lcs.mit.edu''). Each list element is one line from + the field's body, so if the field spreads out over three lines, + then the body is a list of three strings. The terminating + \ex{cr}/\ex{lf}'s are trimmed from each string. A leading space or + a leading horizontal tab is also trimmed, but one and onyl one. + \end{description} + + When there are no more fields -- EOF or a blank line has terminated + the header section -- then the procedure returns [\sharpf\ \sharpf]. + + The \ex{\%read-rfc822-field} variant allows you to specify your own + read-line procedure. The one used by \ex{read-rfc822-field} + terminates lines with either \ex{cr}/\ex{lf} or just \ex{lf}, and it + trims the terminator from the line. Your read-line procedure should + trim the terminator of the line, so an empty line is returned as an + empty string. + + The procedures raise an error if the syntax of the read field (the + line returned by the read-line-function) is illegal (regarding + RFC~822). +\end{defundescx} + +\defun{read-rfc822-headers} {\ovar{port}} {association list} +\begin{defundescx}{\%read-rfc822-headers} {read-line port} + {association list} + + Read in and parse up a section of text that looks like the header + portion of an RFC~822 message. Return an association list mapping a + field name (a symbol such as 'date or 'subject) to a list of field + bodies -- one for each occurence of the field in the header. So if + there are five ``Received-by:'' fields in the header, the alist maps + 'received-by to a five element list. Each body is in turn + represented by a list of strings -- one for each line of the field. + So a field spread across three lines would produce a three element + body. + + The \ex{\%read-rfc822-headers} variant allows you to specify your + own read-line procedure. See \emph{A note on line-terminators} above + for reasons why. + + Hint: If you want to get familiar with these procedures, you might + find \ex{make\=string\=input\=port}, that makes a port out of a + string, helpful. +\end{defundescx} + +\begin{defundesc}{rejoin-header-lines} {alist \ovar{seperator}} + {association list} + + Takes a field \var{alist} such as is returned by + \ex{read-rfc822-headers} and returns an equivalent association list. + Each body (\str list) in the input \var{alist} is joined into a + single list in the output alist. \var{separator} is the string used + to join these elements together; it defaults to a single space, but + can usefully be ``\verb|\n|'' (linefeed) or ``\verb|\r\n|'' + (carriage-return/line-feed). + + To rejoin a single body list, use scsh's \ex{join-strings} + procedure. +\end{defundesc} + +For the following definitions' examples, let's use this set of of +RFC~822 headers: +\begin{code} + From: shivers + To: ziggy, + newts + To: gjs, tk\end{code} +% + +\begin{defundesc}{get-header-all} {headers name} {string list list} + Returns all entries or \sharpf, e.g.\ + \codex{(get-header-all hdrs 'to)} + results to + \codex{'((" ziggy," " newts") (" gjs, tk"))} +\end{defundesc} + +\begin{defundesc}{get-header-lines} {headers name} {string list} + Returns all lines of the first entry or \sharpf, e.g.\ + \codex{(get-header-lines hdrs 'to)} + results to + \codex{'(" ziggy," " newts")} +\end{defundesc} + +\begin{defundesc}{get-headers} {headers name \ovar{seperator}} {string} + Returns the first entry with the lines joined together by seperator + (newline by default), e.g.\ + \codex{(get-header hdrs 'to)} + results to + \begin{code} +" ziggy, + newts"\end{code} +% + Note, that \ex{newts} is led by two spaces. +\end{defundesc} + + +\begin{defundesc}{string->symbol-pref}{string}{symbol} + Takes a \string and converts it to a symbol using the Scheme + implementation's preferred case. (The preferred case is recognized by + a doing once a \ex{symbol->string} conversion of \ex{'a}.) +\end{defundesc} + +\subsubsection*{Desireable functionalities} + +\begin{itemize} +\item Unfolding long lines. +\item Lexing structured fields. +\item Unlexing structured fields into canonical form. +\item Parsing and unparsing dates. +\item Parsing and unparsing addresses. +\end{itemize} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/doc/latex/skeleton.tex b/doc/latex/skeleton.tex new file mode 100644 index 0000000..c802198 --- /dev/null +++ b/doc/latex/skeleton.tex @@ -0,0 +1,8 @@ +\section{Section-Title} +% +\begin{description} +\item[Used files:] +\item[Name of the package:] +\end{description} +% +Not implemented yet. diff --git a/doc/latex/smtp.tex b/doc/latex/smtp.tex new file mode 100644 index 0000000..be70e58 --- /dev/null +++ b/doc/latex/smtp.tex @@ -0,0 +1,8 @@ +\section{Using SMTP} +% +\begin{description} +\item[Used files:] smtp.scm +\item[Name of the package:] smtp +\end{description} +% +Not implemented yet. diff --git a/doc/latex/stringhax.tex b/doc/latex/stringhax.tex new file mode 100644 index 0000000..c9e4b64 --- /dev/null +++ b/doc/latex/stringhax.tex @@ -0,0 +1,79 @@ +\section{Manipulating strings} + + +\begin{description} +\item[Used files:] stringhax.scm +\item[Name of the package:] strings +\end{description} + + +\subsection*{Overview} + +This module provides several procedures to manipulate strings. + +\begin{defundesc}{string-map} {procedure string} {string} + Does a map on each character of \semvar{string} and returns the + result, a newly allocated string. \semvar{procedure} takes a + character and should return a character. +\end{defundesc} + +\defun{downcase-string} {string} {string} +\begin{defundescx}{upcase-string} {string} {string} + Do what you expect: convert \semvar{string} to downcase or upcase + using char-downcase or char-upcase, respectively. The result is a + newly allocated string. +\end{defundescx} + +\defun{char-set-index} {string char-set \ovar{start}} {number} +\begin{defundescx}{char-set-rindex} {string char-set \ovar{start}} {number} + Returns the index of the first character that is in + \semvar{char\=set}. \ex{char\=set\=index} searches from left to + right, \ex{char\=set\=rindex} from right to left. \semvar{start} is + the index from where to start from and defaults to 0 in + \ex{char\=set\=index} and \ex{(string-length \semvar{string})} in + \ex{char\=set\=rindex}. If the search fails, \sharpf{} is returned. +\end{defundescx} + +\begin{defundesc}{string-reduce} {default construct string} {string} + Does a ``fold-right'' on \semvar{string}. It applies + \semvar{construct} on every character of \semvar{string}. + \semvar{construct} is initially invoked with the last character of + string and \semvar{default}. In subsequent invocations, the last + argument is the return value from the previous invocation of + \semvar{construct} while the first argument is the character of + \semvar{string} leading the previous used character. So, the string + is traversed from right to left. The result of the application of + \semvar{string-reduce} is the result of the last application of + \semvar{construct}. + + Example: +\begin{code} +(string-reduce + "" + (lambda (char str) + (string-append str (string (char-downcase char)))) + "DOWNCASE")\end{code} + +results to ``downcase''. +\end{defundesc} + +\defun{string-prefix?} {prefix string} {boolean} +\begin{defundescx}{string-suffix?} {suffix string} {boolean} + Return \sharpt{} if \semvar{prefix}/\semvar{suffix} is a real + \semvar{prefix}/\semvar{suffix} of \semvar{string}, otherwise return + \sharpf. Real prefix/suffix means that \semvar{string} may not be a + prefix/suffix of \semvar{prefix}/\semvar{suffix} (in other words: + \semvar{prefix} and \semvar{suffix} have to be real shorter than + \semvar{string} to be a real prefix or suffix. +\end{defundescx} + +\begin{defundesc}{skip-whitespace} {string} {number} + Returns the index of the first character in \semvar{string} that is + not a whitespace (as defined in \ex{char-set:whitespace}). If there + isn't such a character, \sharpf{} is returned. +\end{defundesc} + +\begin{defundesc}{trim-spaces} {string} {string} + Returns a newly allocated string being \semvar{string} without + leading or trailing spaces (not whitespaces!). +\end{defundesc} diff --git a/doc/latex/toothless.tex b/doc/latex/toothless.tex new file mode 100644 index 0000000..0f41a76 --- /dev/null +++ b/doc/latex/toothless.tex @@ -0,0 +1,57 @@ +\section{Evaluating expression in ``safe'' environments} +% +\begin{description} +\item[Used files:] none, defined in modules.scm +\item[Name of the package:] loser, toothless, toothless-eval \\ + (you want the last one) +\end{description} +% + +\subsection{Overview} +\FIXME{Is toothless really R5RS, too?} +These modules define an environment that is \RnRS without features that +could examine or effect the file system. You can also use it as a +model of how to execute code in other protected environments in \scm. + +\subsection{The \protect{\texttt{loser}} package} +The \ex{loser} package exports only one procedure: + +\begin{defundesc}{loser}{name}{nothing} + Raises an error like ``Illegal call \var{name}''. +\end{defundesc} + +\subsection{The \protect{\texttt{toothless}} package} +The \ex{toothless} package contains everything of \RnRS except +that following procedure cause an error if called: +\begin{itemize} +\item \ex{call-with-input-file} +\item \ex{call-with-output-file} +\item \ex{load} +\item \ex{open-input-file} +\item \ex{open-output-file} +\item \ex{transcript-on} +\item \ex{with-input-from-file} +\item \ex{with-input-to-file} +\item \ex{eval} +\item \ex{interaction-environment} +\item \ex{scheme-report-environment} +\end{itemize} + +So, \ex{toothless} creates an environment as described in +\emph{Overview} above. + +\subsection{The \protect{\texttt{toothless-eval}} package} + +\begin{defundesc}{eval-safely} {expression} {any result} + Creates a brand new package, imports the \ex{toothless} structure, + and evaluates \semvar{expression} in it. When the evaluation is + done, the environment is thrown away, so \semvar{expression}'s + side-effects don't persist from one \ex{eval\=safely} call to the + next. If \semvar{expression} raises an error exception, we abort and + return \sharpf. +\end{defundesc} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/doc/latex/uri.tex b/doc/latex/uri.tex new file mode 100644 index 0000000..fab555a --- /dev/null +++ b/doc/latex/uri.tex @@ -0,0 +1,222 @@ +\section{Handle URIs}\label{sec:uri} +% +\begin{description} +\item[Used files:] uri.scm +\item[Name of the package:] uri +\end{description} +% + +\subsection{Overview} +A URI (Uniform Resource Identifier) is of following syntax: +\begin{inset} +\ovar{scheme\/} : \semvar{path} \ovar{{\normalfont?\/} search} \ovar{{\normalfont\#} fragmentid} +\end{inset} +Parts in brackets may be ommitted. The last part is usually referred +to as fragid in this document. + +As you see, the URI contains characters like \verb|:| to indicate its +different parts. But what, if the \semvar{scheme} contains \verb|:| as +part of its name? For this purpose, some special characters are +\emph{escaped} if they are a regular part of a name and not indicators +for the structure of a URI. Escape-sequences are of following scheme: +\verb|\%hh| where \verb|h| is a hexadecimal digit. The hexadecimal +number refers to the (US) ASCII code of the escaped character, e.g.\ +\ex{\%20} is space (ASCII character 32) and \ex{\%61} is `a' (ASCII +character 97). This module provides procedures to escape and unescape +strings that are meant to be used in a URI. + +\subsection{Procedures} + +\begin{defundesc}{parse-uri} {uri-string } {scheme path search + frag-id} \label{proc:parse-uri} + + Parses an \semvar{uri\=string} in the possible four fields, as + mentioned above in \emph{Overview}. These four fields are returned + as a multiple value. They are \emph{not} unescaped, as the rules for + parsing the \semvar{path} component in particular need unescaped + text, and are dependent on \semvar{scheme}. The URL parser is + responsible for doing this. If the \semvar{scheme}, \semvar{search}\ + or \semvar{fragid} portions are not specified, they are \sharpf. + Otherwise, \semvar{scheme}, \semvar{search}, and \semvar{fragid} are + strings. \semvar{path} is a non-empty string list -- the path split + at slashes. + + For those of you who are interested, here is a description of the + parsing technique. It is inwards from both ends. + \begin{itemize} + \item First we search forwards for the first reserved character + (\verb|=|, \verb|;|, \verb|/|, \verb|#|, \verb|?|, \verb|:| or + \verb|space|). If it's a colon, then that's the \semvar{scheme} + part, otherwise we have no \semvar{scheme} part. At all events we + remove it. + \item Then we search backwards from the end for the last reserved + char. If it's a sharp, then that's the \semvar{fragid} part -- + remove it. + \item Then we search backwards from the end for the last reserved + char. If it's a question-mark, then that's the \semvar{search} + part -- remove it. + \item What's left is the path. We split at slashes. The empty string + becomes a list containing the empty string. + \end{itemize} + + This scheme is tolerant of the various ways people build broken + URI's out there on the Net\footnote{So it is not absolutely conform + with RFC~1630}, e.g. \verb|=| is a reserved character, but used + unescaped in the search-part. It was given to me\footnote{That's + Olin Shivers.} by Dan Connolly of the W3C and slightly modified. +\end{defundesc} + +\begin{defundesc}{unescape-uri} {string \ovar{start \ovar{end}}} {string} + Unescapes a string. This procedure should only be used \emph{after} + the URL (!) was parsed, since unescaping may introduce characters + that blow up the parse (that's why escape sequences are used in URIs + ;-). Escape sequences are of the scheme as described in ``Overview''. +\end{defundesc} + + +%\texttt{uri-escaped-chars} \hfill +%\texttt{char-set}\index{\texttt{uri-escaped-chars}} +\defvar{uri-escaped-chars}{char-set} +\begin{desc} + A set of characters that are escaped in URIs. These are the + following characters: dollar (\verb|$|), minus (\verb|-|),%fool Xemacs$ + underscore (\verb|_|), at (\verb|@|), dot (\verb|.|), and-sign + (\verb|&|), exclamation mark (\verb|!|), asterisk (\verb|*|), + backslash (\verb|\|), double quote (\verb|"|), single quote + (\verb|'|), open brace (\verb|(|), close brace (\verb|)|), comma + (\verb|,|) plus (\verb|+|) and all other characters that are neither + letters nor digits (such as space and control characters). +\end{desc} + +\begin{defundesc}{escape-uri} {string \ovar{escaped-chars}} {string} + Escapes characters of \semvar{string} that are given with + \semvar{escaped\=chars}. \semvar{escaped\=chars} default to + \ex{uri\=escaped\=chars}. Be careful with using this procedure to + chunks of text with syntactically meaningful reserved characters + (e.g., paths with URI slashes or colons) -- they'll be escaped, and + lose their special meaning. E.g.\ it would be a mistake to apply + \ex{escape-uri} to + ``\ex{//lcs.\ob{}mit.\ob{}edu:8001\ob/foo\ob/bar.html}'' because the + sla\-shes and co\-lons would be escaped. Note that \ex{esacpe-uri} + doesn't check this as it would lose his meaning. +\end{defundesc} + +\begin{defundesc}{resolve-uri} {cscheme cp scheme p} {scheme path} +\FIXME{Sorry, I can't figure out what resolve-uri is inteded to do. +Perhaps I find it out later.} + + Nobody really knows what this procedure was intended to do. + + The code seems to have a bug: In the body of receive, there's a + loop. j should, according to the comment, count sequential \verb|/|. + But \ex{j} counts nothing in the body. Either zero is added \ex{((lp + (cdr cp-tail) (cons (car cp-tail) rhead) (+ j 0)))} or \ex{j} is + set to 1 \ex{((lp (cdr cp-tail) (cons (car cp-tail) rhead) 1))}. + Nevertheless, \ex{j} is expected to reach value \ex{numsl} that can + be larger than one. So what? I am confused. +\end{defundesc} + +\begin{defundesc}{split-uri-path} {uri start end} {list} + Splits uri at slashes. Only the substring given with \semvar{start} + (inclusive) and \semvar{end} (exclusive) as indices is considered. + \semvar{start} and $\semvar{end} - 1$ have to be within the range of + \semvar{uri}. Otherwise an index-out-of-range exception will be + raised. Example: \codex{(split-uri-path "foo/bar/colon" 4 11)} + results to \codex{'("bar" "col")} +\end{defundesc} + +\begin{defundesc}{uri-path-list->path} {plist} {string} + Generates a path out of an uri-path-list by inserting slashes + between the elements of \semvar{plist}. If you want to use the + resulting string for further operation, you should escape the + elements of \semvar{plist} in case the contain slashes. This doesn't + escape them for you, you must do that yourself like + \ex{(uri-path-list->path (map escape-uri pathlist))}. +\end{defundesc} + +\begin{defundesc}{simplify-uri-path} {path} {list} + Removes `\ex{.}' and `\ex{..}' entries from path. The result is + a (maybe empty) list representing a path that does not contain any + `\ex{.}' or `\ex{..}'\,. The list can only be empty if the path + did not start with a slash (for the rare occasion someone wants to + simplify a relative path). The result is \sharpf{} if the path tries + to back up past root, for example by `\ex{/..}' or + `\ex{/foo\ob/..\ob/..}' or just `\ex{..}'\,. `\ex{//}' may occur + somewhere in the path referring to root but not being backed up. + Examples: +%FIXME: Can't we have a better environment for examples like these? + \begin{code} +(simplify-uri-path + (split-uri-path "/foo/bar/baz/.." 0 15))\end{code} + results to + \codex{'("" "foo" "bar")} + + \begin{code} +(simplify-uri-path + (split-uri-path "foo/bar/baz/../../.." 0 20))\end{code} + results to + \codex{'()} + + \begin{code} +(simplify-uri-path + (split-uri-path "/foo/../.." 0 10))\end{code} + results to + \codex{\sharpf ; tried to back up root} + + \begin{code} +(simplify-uri-path + (split-uri-path "foo/bar//" 0 9))\end{code} + results to + \codex{'("") ; "//" refers to root} + +\begin{code} +(simplify-uri-path + (split-uri-path "foo/bar/" 0 8))\end{code} + results to + \codex{'("") ; last "/" also refers to root} + + \begin{code} +(simplify-uri-path + (split-uri-path "/foo/bar//baz/../.." 0 19))\end{code} + results to + \codex{\sharpf ; tries to back up root} +\end{defundesc} + +\subsection*{Unexported names} + +\defvar{uri-reserved}{char-set} +\begin{desc} + A list of reserved characters (semicolon, slash, hash, question + mark, double colon and space). +\end{desc} + +\begin{defundesc}{hex-digit?} {character} {boolean} + Returns \sharpt{} if character is a hexadecimal digit (i.e., one of 1--9, + a--f, A--F), \sharpf{} otherwise. +\end{defundesc} + + +\begin{defundesc}{hexchar->int} {character} {number} + Translates the given character to an integer, e.g. \ex{(hexchar->int + \#a)} results to 10. +\end{defundesc} + +\begin{defundesc}{int->hexchar} {integer} {character} + Translates the given integer from range 1--15 into an hexadecimal + character (uses uppercase letters), e.g. \ex{(int->hexchar 14)} + results to `E'. +\end{defundesc} + +\begin{defundesc}{rev-append} {list-a list-b} {list} + Performs a \ex{(append (reverse list-a) list-b)}. The comment says it + should be defined in a list package but I am wondering how often + this will be used. +\end{defundesc} + +%EOF + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/doc/latex/url.tex b/doc/latex/url.tex new file mode 100644 index 0000000..5d66e9b --- /dev/null +++ b/doc/latex/url.tex @@ -0,0 +1,116 @@ +\section{URL} +% +\begin{description} +\item[Used files:] url.scm +\item[Name of the package:] url +\end{description} +% +\subsection{Overview} +This modules contains procedures to parse and unparse URLs. Till now, +only the parsing of http URLs is implemented. + +\subsection{Entry points} +\defun{make-userhost}{user password host port}{userhost-record} +\defunx{userhost?}{thing}{boolean} +\defunx{userhost:user}{userhost-record}{value} +\defunx{userhost:password}{userhost-record}{value} +\defunx{userhost:host}{userhost-record}{value} +\defunx{userhost:port}{userhost-record}{value} +\defunx{set-userhost:user}{userhost-record new-value}{void} +\defunx{set-userhost:password}{userhost-record new-value}{void} +\defunx{set-userhost:host}{userhost-record new-value}{void} +\defunx{set-userhost:port}{userhost-record new-value}{void} +\begin{desc} + \ex{make\=userhost} creates a new \ex{userhost} record. This record + describes path-prefixes of the form + \semvar{user}:\semvar{password}@\semvar{host}:\semvar{port}. These + are frequently used as the initial prefix of URL's describing + Internet resources. Each slot is a decoded string or \sharpf (yes, + \semvar{port} is also a string). + + \ex{userhost?} is the corresponding predicate, + \ex{userhost:\ob{}user}, \ex{userhost:\ob{}pass\ob{}word}, + \ex{userhost:\ob{}host} and \ex{userhost:\ob{}port} are the + correspondig selectors and \ex{set\=userhost:\ob{}user}, + \ex{set\=userhost:\ob{}pass\ob{}word}, \ex{set\=userhost:\ob{}host} + and \ex{set\=userhost:\ob{}port} the corresponding mutators. As you + can store everything into the record fields, the selectors may + return any type of value. However, under normal circumstances, only + \str\ or \sharpf\ is returned. +\end{desc} + +\defun{parse-userhost}{path default}{userhost-record} +\begin{defundescx}{userhost->string}{userhost-record}{string} + \ex{parse\=userhost} parses a URI path (a list representing a path, + not a string!) into a userhost record. Default values are taken from + the userhost record \semvar{default} except for the host. The values + are unescaped and stored into a userhost record that is returned. + \ex{fatal\=syntax\=error} is called, if the specified path has no + initial to slashes (i.e., it starts with `//\ldots'). + + \ex{userhost->string} just does the inverse job: it unparses + \semvar{userhost-record} into a string. The elements of the record + are escaped before the are put together. + + For details about escaping and unescaping see section ``Handle + URIs'' at page \pageref{sec:uri}. +\end{defundescx} + + +\defun{make-http-url}{userhost path search frag-id}{http-url-record} +\defunx{http-url?}{thing}{boolean} +\defunx{http-url:userhost}{http-url}{value} +\defunx{http-url:path}{http-url}{value} +\defunx{http-url:search}{http-url}{value} +\defunx{http-url:frag-id}{http-url}{value} +\defunx{set-http-url:userhost}{http-url new-value}{void} +\defunx{set-http-url:path}{http-url new-value}{void} +\defunx{set-http-url:search}{http-url new-value}{void} +\defunx{set-http-url:frag-id}{http-url new-value}{void} +\begin{desc} + \ex{make\=http\=url} creates a new \ex{httpd\=url} record. + \semvar{userhost} is a record, containing the initial part of the + address (like + \ex{ano\ob{}ny\ob{}mous@\ob{}clark.\ob{}lcs.\ob{}mit.\ob{}edu:\ob{}80}). + \semvar{path} contains the URL's path split at slashes, e.g.\ + \ex{"foo/\ob{}bar/\ob{}baz/"} becomes \ex{'("foo" "bar" "baz" "")}. + These elements are in raw, unescaped format. To convert them back to + a string, use \ex{(uri\=path\=list->path (map escape\=uri + pathlist))}. \semvar{search} and \semvar{frag\=id} are the last + two parts of the URL (see section \ref{sec:uri} on page + \pageref{sec:uri} about parts of an URI). + + \ex{http\=url:userhost}, \ex{http\=url:path}, \ex{http\=url:search} + and \ex{http\=url:frag\=id} are the corresponding selectors, + \ex{set\=http\=url:userhost}, \ex{set\=http\=url:path}, + \ex{set\=http\=url:search} and \ex{set\=http\=url:frag\=id} the + corresponding mutators. As you can store every type of value into + the record fields, the selectors can return any type of value. + However, \ex{http\=:userhost} usually returns a \ex{userhost} + record, \ex{http\=:path} returns a list of \str{}s and + \ex{http\=url:search} and \ex{http\=url:frag\=id} return both + \str{}s. +\end{desc} + +\defun{parse-http-url}{path search frag-id}{http-url-record} +\begin{defundescx}{http-url->string}{http-url-record}{string} + The URI parser (\ex{parse\=uri} in \ex{uri.\ob{}scm}) maps a string + to four parts: \semvar{scheme}, \semvar{path}, \semvar{search} and + \semvar{frag-id} (see section \ref{proc:parse-uri} at page + \pageref{proc:parse-uri} for details). If \semvar{scheme} is + ``http'', then the other three parts can be passed to + \ex{parse\=http\=url}, which parses them into a \ex{http\=url} + record. All strings come back from the URI parser encoded. + \semvar{search} and \var{frag\=id} are left that way; this parser + decodes the path elements. The first two list elements of the path + indicating the leading double-slash are omitted. + + \ex{http-url->string} just does the inverse job. It converts a + \ex{http\=url} record into a \str. +\end{defundescx} + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/doc/rfc822.scm.doc b/doc/rfc822.scm.doc deleted file mode 100644 index a2e38c7..0000000 --- a/doc/rfc822.scm.doc +++ /dev/null @@ -1,161 +0,0 @@ -This file documents names defined in rfc822.scm: - - - - -NOTES - - - -A note on line-terminators: - -Line-terminating sequences are always a drag, because there's no -agreement on them -- the Net protocols and DOS use cr/lf; Unix uses -lf; the Mac uses cr. One one hand, you'd like to use the code for all -of the above, on the other, you'd also like to use the code for strict -applications that need definitely not to recognise bare cr's or lf's -as terminators. - -RFC 822 requires a cr/lf (carriage-return/line-feed) pair to terminate -lines of text. On the other hand, careful perusal of the text shows up -some ambiguities (there are maybe three or four of these, and I'm too -lazy to write them all down). Furthermore, it is an unfortunate fact -that many Unix apps separate lines of RFC 822 text with simple -linefeeds (e.g., messages kept in /usr/spool/mail). As a result, this -code takes a broad-minded view of line-terminators: lines can be -terminated by either cr/lf or just lf, and either terminating sequence -is trimmed. - -If you need stricter parsing, you can call the lower-level procedure -%READ-RFC-822-FIELD and %READ-RFC822-HEADERS procs. They take the -read-line procedure as an extra parameter. This means that you can -pass in a procedure that recognises only cr/lf's, or only cr's (for a -Mac app, perhaps), and you can determine whether or not the -terminators get trimmed. However, your read-line procedure must -indicate the header-terminating empty line by returning *either* the -empty string or the two-char string cr/lf (or the EOF object). - - - - -DEFINITIONS AND DESCRIPTIONS - - - -(read-rfc822-field [port]) -(%read-rfc822-field read-line port) - -Read one field from the port, and return two values [NAME BODY]: - - - NAME Symbol such as 'subject or 'to. The field name is converted - to a symbol using the Scheme implementation's preferred - case. If the implementation reads symbols in a case-sensitive - fashion (e.g., scsh), lowercase is used. This means you can - compare these symbols to quoted constants using EQ?. When - printing these field names out, it looks best if you capitalise - them with (CAPITALIZE-STRING (SYMBOL->STRING FIELD-NAME)). - - - BODY List of strings which are the field's body, e.g. - ("shivers@lcs.mit.edu"). Each list element is one line from - the field's body, so if the field spreads out over three lines, - then the body is a list of three strings. The terminating - cr/lf's are trimmed from each string. A leading space or a - leading horizontal tab is also trimmed, but one and onyl one. - -When there are no more fields -- EOF or a blank line has terminated -the header section -- then the procedure returns [#f #f]. - -The %READ-RFC822-FIELD variant allows you to specify your own -read-line procedure. The one used by READ-RFC822-FIELD terminates -lines with either cr/lf or just lf, and it trims the terminator from -the line. Your read-line procedure should trim the terminator of the -line, so an empty line is returned as an empty string. - -The procedures raise an error if the syntax of the read field (the -line returned by the read-line-function) is illegal (RFC822 illegal). - - - -read-rfc822-headers [port] -%read-rfc822-headers read-line port - -Read in and parse up a section of text that looks like the header -portion of an RFC 822 message. Return an alist mapping a field name (a -symbol such as 'date or 'subject) to a list of field bodies -- one for -each occurence of the field in the header. So if there are five -"Received-by:" fields in the header, the alist maps 'received-by to a -five element list. Each body is in turn represented by a list of -strings -- one for each line of the field. So a field spread across -three lines would produce a three element body. - -The %READ-RFC822-HEADERS variant allows you to specify your own -read-line procedure. See notes (A note on line-terminators) above for -reasons why. - - - -rejoin-header-lines alist [seperator] - -Takes a field alist such as is returned by READ-RFC822-HEADERS and -returns an equivalent alist. Each body (string list) in the input -alist is joined into a single list in the output alist. SEPARATOR is -the string used to join these elements together; it defaults to a -single space " ", but can usefully be "\n" or "\r\n". - -To rejoin a single body list, use scsh's JOIN-STRINGS procedure. - - - -For the following definitions' examples, let's use this set of of -RFC822 headers: - From: shivers - To: ziggy, - newts - To: gjs, tk - - - -get-header-all headers name - -returns all entries or #f, p.e. -(get-header-all hdrs 'to) -> ((" ziggy," " newts") (" gjs, tk")) - - - -get-header-lines headers name - -returns all lines of the first entry or #f, p.e. -(get-header-lines hdrs 'to) -> (" ziggy," " newts") - - - -get-headers headers name [seperator] - -returns the first entry with the lines joined together by seperator -(newline by default (\n)), p.e. -(get-header hdrs 'to) -> "ziggy,\n newts" - - - -htab - -is the horizontal tab (ascii-code 9) - - - -string->symbol-pref - -is a procedure that takes a string and converts it to a symbol -using the Scheme implementation's preferred case. The preferred case -is recognized by a doing a symbol->string conversion of 'a. - - - - -DESIREABLE FUNCTIONALITIES - - - Unfolding long lines. - - Lexing structured fields. - - Unlexing structured fields into canonical form. - - Parsing and unparsing dates. - - Parsing and unparsing addresses. diff --git a/doc/stringhax.scm.doc b/doc/stringhax.scm.doc deleted file mode 100644 index 9f1da7b..0000000 --- a/doc/stringhax.scm.doc +++ /dev/null @@ -1,79 +0,0 @@ -This file documents names specified in stringhax.scm. - - - - -NOTES - -stringhax.scm provides several string-hacking procedures. - - - - -DEFINITIONS AND DESCRIPTIONS - - -procedure -string-map procedure string --> string - -Does a 'map' on each character of STRING and returns the result, a -newly allocated string. PROCEDURE takes a character and should return -a character. - - -procedure -downcase-string string --> string -upcase-string string --> string - -Do what you expect: converts STRING to downcase or upcase -respectively, using char-downcase or char-upcase respectively. The -result is a newly allocated string. - - -procedure -char-set-index string char-set [start] --> number -char-set-rindex string char-set [start] --> number - -Returns the index of the first character that is in -char-set. char-set-index searches from left to r0.6/scsh/lib/char-package.scmight, char-set-rindex -from right to left. START is the index from where to start from and -defaults to 0 in char-set-index and (string-length STRING) in -char-set-rindex. If the search fails, #f is returned. - - -procedure -string-reduce default construct string --> string - -Does a "fold-right" on string. The resulting string is -(CONSTRUCT ... (CONSTRUCT STRING[n-1] (CONSTRUCT STRING[n] DEFAULT)) ...) -Example: - -(string-reduce "" (lambda (char str) - (string-append str (string (char-downcase char)))) - "DOWNCASE") - -==> "downcase" - - -procedure -string-prefix? prefix string --> boolean -string-suffix? suffix string --> boolean - -Return #t if PREFIX/SUFFIX is a real prefix/suffix of STRING, -otherwise return #f. Real prefix/suffix means that STRING may not be a -prefix/suffix of PREFIX/SUFFIX. - - -procedure -skip-whitespace string --> number - -Returns the index of the first character in STRING that is not a -whitespace (as defined in char-set:whitespace). If there isn't such a -character, #f is returned. - - -procedure -trim-spaces string --> string - -Returns a newly allocated string being STRING without leading or -trailing spaces (not whitespaces!). \ No newline at end of file diff --git a/doc/toothless.scm.doc b/doc/toothless.scm.doc deleted file mode 100644 index c6839cb..0000000 --- a/doc/toothless.scm.doc +++ /dev/null @@ -1,64 +0,0 @@ -This file documents names defined in toothless.scm - - - - -NOTES - -toothless.scm defines a Scheme 48 module that is R4RS without features -that could examine or effect the file system. You can also use it as a -model of how to execute code in other protected environments in S48. - - - - -DEFINITIONS AND DESCRIPTIONS - - -structure -loser-package - -Exports: - -procedure -loser name --> error - -Raises an error like "Illegal call NAME". - - -structure -toothless - -Exports everything of R4RS. Following procedures are redefined, so -they raise an error if the are called: - -call-with-input-file -call-with-output-file -load -open-input-file -open-output-file -transcript-on -with-input-from-file -with-input-to-file -eval -interaction-environment -scheme-report-environment - -toothless shall create an environment as described in NOTES. - - -structure -toothless-eval - -Exports: - -procedure -eval-safely expression - -Creates a brand new package, imports the TOOTHLESS structure, and -evaluates EXP in it. When the evaluation is done, the environment is -thrown away, so EXP's side-effects don't persist from one EVAL-SAFELY -call to the next. If EXP raises an error exception, we abort and -return #f. - - diff --git a/doc/uri.scm.doc b/doc/uri.scm.doc deleted file mode 100644 index 41725a8..0000000 --- a/doc/uri.scm.doc +++ /dev/null @@ -1,152 +0,0 @@ -This file documents names specified in uri.scm. - - - - -NOTES - -URIs are of following syntax: - -[scheme] : path [? search ] [# fragmentid] - -Parts in [] may be ommitted. The last part is usually referred to as -fragid in this document. - - - -DEFINITIONS AND DESCRIPTIONS - - -char-set -uri-reserved - -A list of reserved characters (semicolon, slash, hash, question mark, -double colon and space). - -procedure -parse-uri uri-string --> (scheme, path, search, frag-id) - -Multiple-value return: scheme, path, search, frag-id, in this -order. scheme, search and frag-id are either #f or a string. path is a -nonempty list of strings. An empty path is a list containing the empty -string. parse-uri tries to be tolerant of the various ways people -build broken URIs out there on the Net (so it is not absolutely -conform with RFC 1630). - - -procedure -unescape-uri string [start [end]] --> string - -Unescapes a string. This procedure should only be used *after* the url -(!) was parsed, since unescaping may introduce characters that blow -up the parse (that's why escape sequences are used in URIs ;). -Escape-sequences are of following scheme: %hh where h is a hexadecimal -digit. E.g. %20 is space (ASCII character 32). - - -procedure -hex-digit? character --> boolean - -Returns #t if character is a hexadecimal digit (i.e., one of 1-9, a-f, -A-F), #f otherwise. - - -procedure -hexchar->int character --> number - -Translates the given character to an integer, p.e. (hexchar->int \#a) -=> 10. - - -procedure -int->hexchar integer --> character - -Translates the given integer from range 1-15 into an hexadecimal -character (uses uppercase letters), p.e. (int->hexchar 14) => E. - - -char-set -uri-escaped-chars - -A set of characters that are escaped in URIs. These are the following -characters: dollar ($), minus (-), underscore (_), at (@), dot (.), -and-sign (&), exclamation mark (!), asterisk (*), backslash (\), -double quote ("), single quote ('), open brace ((), close brace ()), -comma (,) plus (+) and all other characters that are neither letters -nor digits (such as space and control characters). - - -procedure -escape-uri string [escaped-chars] --> string - -Escapes characters of string that are given with escaped-chars. -escaped-chars default to uri-escaped-chars. Be careful with using this -procedure to chunks of text with syntactically meaningful reserved -characters (e.g., paths with URI slashes or colons) -- they'll be -escaped, and lose their special meaning. E.g. it would be a mistake to -apply escape-uri to "//lcs.mit.edu:8001/foo/bar.html" because the -slashes and colons would be escaped. Note that esacpe-uri doesn't -check this as it would lose his meaning. - - -procedure -resolve-uri cscheme cp scheme p --> (scheme, path) - -Sorry, I can't figure out what resolve-uri is inteded to do. Perhaps -I find it out later. - -The code seems to have a bug: In the body of receive, there's a -loop. j should, according to the comment, count sequential /. But j -counts nothing in the body. Either zero is added ((lp (cdr cp-tail) -(cons (car cp-tail) rhead) (+ j 0))) or j is set to 1 ((lp (cdr -cp-tail) (cons (car cp-tail) rhead) 1))). Nevertheless, j is expected -to reach value numsl that can be larger than one. So what? I am -confused. - - -procedure -rev-append list-a list-b --> list - -Performs a (append (reverse list-a) list-b). The comment says it -should be defined in a list package but I am wondering how often this -will be used. - - -procedure -split-uri-path uri start end --> list - -Splits uri at /'s. Only the substring given with start (inclusive) and -end (exclusive) is considered. Start and end - 1 have to be within the -range of the uri-string. Otherwise an index-out-of-range exception -will be raised. Example: (split-uri-path "foo/bar/colon" 4 11) ==> -'("bar" "col") - - -procedure -simplify-uri-path path --> list - -Removes "." and ".." entries from path. The result is a (maybe empty) -list representing a path that does not contain any "." or "..". The -list can only be empty if the path did not start with "/" (for the -rare occasion someone wants to simplify a relative path). The result -is #f if the path tries to back up past root, for example by "/.." or -"/foo/../.." or just "..". "//" may occur somewhere in the path -referring to root but not being backed up. -Examples: -(simplify-uri-path (split-uri-path "/foo/bar/baz/.." 0 15)) -==> '("" "foo" "bar") - -(simplify-uri-path (split-uri-path "foo/bar/baz/../../.." 0 20)) -==> '() - -(simplify-uri-path (split-uri-path "/foo/../.." 0 10)) -==> #f ; tried to back up root - -(simplify-uri-path (split-uri-path "foo/bar//" 0 9)) -==> '("") ; "//" refers to root - -(simplify-uri-path (split-uri-path "foo/bar/" 0 8)) -==> '("") ; last "/" also refers to root - -(simplify-uri-path (split-uri-path "/foo/bar//baz/../.." 0 19)) -==> #f ; tries to back up root diff --git a/doc/url.scm.doc b/doc/url.scm.doc deleted file mode 100644 index 4819ca4..0000000 --- a/doc/url.scm.doc +++ /dev/null @@ -1,69 +0,0 @@ -This file documents names defined in url.scm - - - - -NOTES - - - - -DEFINITIONS AND DESCRIPTIONS - - -userhost record - -A record containing the fields user, password, host and port. Created -by parsing a string like //:@:/. The -record describes path-prefixes of the form -//:@:/ These are frequently used as the -initial prefix of URL's describing Internet resources. - - -parse-userhost path default - -Parse a URI path (a list representing a path, not a string!) into a -userhost record. Default values are taken from the userhost record -DEFAULT except for the host. Returns a userhost record if it wins, and -#f if it cannot parse the path. It is an error if the specified path -does not begin with '//..' like noted at userhost. - - -userhost-escaped-chars list - -The union of uri-escaped-chars and the characters '@' and ':'. Used -for the unparser. - - -userhost->string userhost procedure - -Unparses a userhost record to a string. - - -http-url record - -Record containing the fields userhost (a userhost record), path (a -path list), search and frag-id. The PATH slot of this record is the -URL's path split at slashes, e.g., "foo/bar//baz/" => ("foo" "bar" "" -"baz" ""). These elements are in raw, unescaped format. To convert -back to a string, use (uri-path-list->path (map escape-uri pathlist)). - - -parse-http-url path search frag-id procedure - -Returns a http-url record. path, search and frag-id are results of a -parse-uri call on the initial uri. See there (uri.scm) for further -details. search and frag-id are stored as they are. This parser -decodes the path elements. It is an error if the path specifies an -user or a password as this is not allowd at http-urls. - - -default-http-userhost record - -A userhost record that specifies the port as 80 and anything else as -#f. - - -http-url->string http-url - -Unparses the given http-url to a string.