Lua Computer: collection of minor updates, none notable (read romapidoc)

Former-commit-id: 80e3f0d13c2dc5bcff0843e509f416e9314cd52e
Former-commit-id: e7e35bfd23d70db84f568f0c5388f3a1d89222bc
This commit is contained in:
Song Minjae
2016-09-26 12:15:45 +09:00
parent 29db14d184
commit 75d73f7d18
76 changed files with 2326 additions and 781 deletions

View File

@@ -0,0 +1,77 @@
The Filesystem API provides functions for manipulating files and the filesystem.
The path for the argument of functions blocks `\,.\,.\,' to be entered, preventing users from access outside of the computer and eliminating the potential of harming the real computer of the innocent players.
\subsection{Functions}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
fs.list(\textbf{path}: string) & table & Returns list of files in \textbf{path}, in lua table.
\\ \\
fs.exists(\textbf{path}: string) & bool & Checks if \textbf{path} exists on the filesystem.
\\ \\
fs.isDir(\textbf{path}: string) & bool & Checks if \textbf{path} is a directory.
\\ \\
fs.isFile(\textbf{path}: string) & bool & Checks if \textbf{path} is a file.
\\ \\
fs.isReadOnly(\textbf{path}: string) & bool & Checks if \textbf{path} is read only.
\\ \\
fs.getSize(\textbf{path}: string) & int & Returns a size of the file/directory, in bytes.
\\ \\
fs.mkdir(\textbf{path}: string) & bool & Create a directory to \textbf{path}. Returns \textbf{true} upon success.
\\ \\
fs.mv(\textbf{from}: string, \textbf{dest}: string) & bool & Moves the directory to the destination. Subdirectories / files will also be moved. Returns \textbf{true} upon success.
\\ \\
fs.cp(\textbf{from}: string, \textbf{dest}: string) & bool & Copies the directory to the destination. Subdirectories / files will also be copied. Returns \textbf{true} upon success.
\\ \\
fs.rm(\textbf{path}: string) & bool & Deletes the \textbf{path}. If \textbf{path} is a directory, all its members will also be deleted. Returns \textbf{true} upon success.
\\ \\
fs.concat(\textbf{p1}: string, \textbf{p2}: string) & string & Concatenates two paths and return new path as string.
\\ \\
fs.open(\textbf{path}: string, \textbf{mode}: string) & file & Opens file and returns its handle. See section \emph{File Handler} for details.
\\ \\
fs.parent(\textbf{path}: string) & string & Returs parent directory to the \textbf{path}.
\\ \\
fs.dofile(\textbf{path}: string) & nil & Loads the script on \textbf{path} and executes it.
\\ \\
fs.fetchText(\textbf{path}: string) & string & Opens the file on \textbf{path} and returns its contents as a plain text.
\end{tabularx}
\subsection{File Handler}
When it comes to opening a file, there are six modes available---r, w, a, rb, wb, ab, each represents \textbf{r}ead, \textbf{w}rite, \textbf{a}ppend and \textbf{b}yte.
\begin{tabularx}{\textwidth}{l X}
\textbf{\large Function} & \textbf{\large Description}
\\ \\
\endhead
file.close() & Closes the file. Any data wrote will be actually wrote to disk when this function is called.
\\ \\
file.flush() & (in write/append mode) Flushes the data to the file, keeps the handle available afterwards
\\ \\
\multicolumn{2}{c}{\textbf{Read mode}}
\\ \\
file.readLine() & Reads text from the file line by line. Returns string of line, or \emph{nil} if there is no next line.
\\ \\
file.readAll() & Reads and returns whole text in the file as string.
\\ \\
\multicolumn{2}{c}{\textbf{Read binary mode}}
\\ \\
file.read() & Reads single byte in the file as int, or \emph{-1} if end-of-file is reached.
\\ \\
file.readAll() & Reads and returns whole byte in the file as string.
\\ \\
\multicolumn{2}{c}{\textbf{Write/append mode}}
\\ \\
file.write(string) & Writes \textbf{string} to the file.
\\ \\
file.writeLine(string) & Writes \textbf{string} to the file and append line feed.
\\ \\
\multicolumn{2}{c}{\textbf{Write/append binary mode}}
\\ \\
file.write(int) & Writes \textbf{int} to the file.
\\ \\
file.writeBytes(string) & Writes \textbf{string} to the file and append line feed.
\end{tabularx}

View File

@@ -0,0 +1,10 @@
The Hexutils library provides utility to convert byte value to hexadecimal string.
\subsection{Functions}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
hexutils.toHexString(\textbf{bytes}: string) & string & Converts byte array to the string of its hexadecimal representations.
\end{tabularx}

View File

@@ -0,0 +1,18 @@
The Input API provides access to game's Input API to get input-related informations.
\subsection{Functions}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
input.isKeyDown(keycode: int) & bool & Checks whether the key is down. By combining with `and' or `or' statement, you can inquire for multiple keys being down simultaneously.
\\ \\
input.readLine() & string & Reads a line of string and returns it.
\end{tabularx}
You can use \emph{Keys} Library with this API. Examples:
\begin{itemize}
\item input.isKeyDown(keys.q)
\end{itemize}

View File

@@ -0,0 +1,72 @@
The Keys library helps you with Input API to get key code by key's names, or identify a key code.
Notes on compatibility with ComputerCraft: although this library is ComputerCraft-compliant, but Numpads are \emph{not} supported whatsoever. \textit{Come on, it's not like everyone has or likes numpad on their keyboard.}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
keys.<key name: String> & int & Returns key code corresponds to the key name.
\\ \\
keys.getName(keycode: int) & string & Returns key name corresponds to the keycode.
\end{tabularx}
\subsection{Accepted Key Names}
\emph{NOTE: following sets are considered as the same keys.}
\begin{itemize}
\item leftAlt --- leftCommand
(leftAlt is often recognised as leftCommand on macOS)
\item leftControl --- capsLock --- backspace
(colemak key layout puts secondary backspace on capsLock, Happy Hacking Keyboard puts Control on the location of Caps Lock)
\end{itemize}
\begin{tasks}[counter-format=\-](5)
\task (\emph{a} to \emph{z})
\task (\emph{zero} to \emph{nine})
\task minus
\task equals
\task backspace
\task tab
\task leftBracket
\task rightBracket
\task enter
\task leftCtrl
\task semiColon
\task apostrophe
\task grave
\task leftShift
\task backslash
\task comma
\task period
\task slash
\task rightShift
\task multiply
\task leftAlt
\task space
\task capsLock
\task scollLock
\task (\emph{f1} to \emph{f15})
\task cimcumflex
\task at
\task colon
\task underscore
\task rightCtrl
\task rightAlt
\task pause
\task home
\task up
\task pageUp
\task left
\task right
\task end
\task down
\task pageDown
\task insert
\task delete
\task leftCommand
\end{tasks}

View File

@@ -0,0 +1,20 @@
The Serurity API provides functions for security purposes, such as hashing and CSPRNG\footnote{Cryptographically secure psuedo-random number generator}.
\subsection{Functions}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
security.toSHA1(string) & string & Returns SHA-256 hash of input string in array of bytes (as a string)
\\ \\
security.toSHA256(string) & string & Returns SHA-1 hash of input string in array of bytes
\\ \\
security.toMD5(string) & string & Returns MD-5 hash of input string in array of bytes
\\ \\
security.randomBytes(\textbf{len}: int) & string & Returns byte array of random values in desired \textbf{len}gth.
\\ \\
security.decodeBase64(string) & string & Decodes Base64 string and returns the result as string.
\\ \\
security.encodeBase64(string) & string & Encodes input string as Base64 format and returns the result as array of bytes.
\end{tabularx}

View File

@@ -0,0 +1,6 @@
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
shell.run(\textbf{path}: string) & nil & Loads the script on \textbf{path} and executes it.
\end{tabularx}

View File

@@ -0,0 +1,109 @@
The Terminal API provides functions for sending text to the terminals, and drawing text-mode graphics. The API expects connected terminal to use Codepage 437. See section \emph{Codepage} for details.
\subsection{Functions}
Note: cursor coordinates starts from one, not zero.
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
term.write(string) & nil & Writes string to the current cursor position. Line feed is not appended.
\\ \\
term.print(string) & nil & Writes string to the current cursor position and make a new line.
\\ \\
term.newLine() & nil & Make a new line.
\\ \\
term.moveCursor(\textbf{x}: int) & nil & Moves cursor horizontally, starting from 1.
\\ \\
term.width() & int & Returns the width of the terminal. Graphic terminals also can use this.
\\ \\
term.scroll(\textbf{n}: int) & nil & Make a new line \textbf{n} times.
\\ \\
term.isTeletype() & bool & Returns \textbf{true} if the terminal is teletype.
\\ \\
\multicolumn{3}{c}{\textbf{Graphic terminals only}}
\\ \\
term.emit(\textbf{c}: int, \textbf{x}: int, \textbf{y}: int) & nil & Emits \textbf{c} into (\textbf{x}, \textbf{y}), control sequence will not be processed and printed as symbols instead. Cursor will not be moved.
\\ \\
term.emitRaw(\textbf{bufferChar}: int) & nil & Emits \textbf{bufferChar} into into (\textbf{x}, \textbf{y}). Buffer char means a single character actually stored into the screen buffer, has four bits for back- and foreground colours respectively, and eight bits for a letter.
\\ \\
term.emitString(\textbf{s}, \textbf{x}: int, \textbf{y}: int) & nil & Emits \textbf{s} (a string) into (\textbf{x}, \textbf{y}), printing control sequences as symbols. Cursor will not be moved.
\\ \\
\begin{tabular}[t]{@{}l@{}}term.resetColour()\\term.resetColor()\end{tabular} & nil & Resets any colour changes to the defaults.
\\ \\
term.clear() & nil & Clears whole screen buffer and move cursor to (1, 1)
\\ \\
term.clearLine() & nil & Clears current line on the screen buffer, does not moves cursor.
\\ \\
term.setCursor(\textbf{x}: int, \textbf{y}: int) & nil & Moves cursor to (\textbf{x}, \textbf{y})
\\ \\
term.getCursor() & int, int & Returns current coordinates of the cursor.
\\ \\
term.getX() & int & Returns X coordinate of the cursor.
\\ \\
term.getY() & int & Returns Y coordinate of the cursor.
\\ \\
term.setX(int) & nil & Sets X coordinate of the cursor.
\\ \\
term.setY(int) & nil & Sets Y coordinate of the cursor.
\\ \\
term.setCursorBlink(bool) & nil & Sets cursor blinking. \textbf{true} makes the cursor blink.
\\ \\
term.size() & int, int & Returns width and height of the terminal.
\\ \\
term.height() & int & Returns height of the terminal.
\\ \\
term.isCol() & bool & Returns if the terminal supports colour.
\\ \\
term.setForeCol(\textbf{col}: int) & nil & Sets foreground colour to \textbf{col}
\\ \\
term.setBackCol(\textbf{col}: int) & nil & Sets background colour to \textbf{col}.
\\ \\
term.foreCol() & int & Returns current foreground colour.
\\ \\
term.backCol() & int & Returns current background colour.
\end{tabularx}
\subsection{Standard Colours}
\begin{tabularx}{\textwidth}{c l c l c l c l}
0 & \textcolor{black}{Black} & 1 & White & 2 & \textcolor{dimgrey}{Dim grey} & 3 & \textcolor{brightgrey}{Bright grey}
\\ \\
4 & \textcolor{yellow}{Yellow} & 5 & \textcolor{orange}{Orange} & 6 & \textcolor{red}{Red} & 7 & \textcolor{magenta}{Magenta}
\\ \\
8 & \textcolor{purple}{Purple} & 9 & \textcolor{blue}{Blue} & 10 & \textcolor{cyan}{Cyan} & 11 & \textcolor{lime}{Lime}
\\ \\
12 & \textcolor{green}{Green} & 13 & \textcolor{darkgreen}{Dark green} & 14 & \textcolor{brown}{Brown} & 15 & \textcolor{tan}{Tan}
\end{tabularx}
Non-colour terminals support colour index of 0--3.
\subsection{Codepage}
\newlength{\cpimagew}
\setlength{\cpimagew}{\linewidth}
\addtolength{\cpimagew}{-4em}
\begin{center}\includegraphics[width=\cpimagew]{mda.png}\end{center}
Character 0x9E (currency symbol) and 0xFA (middle dot) can be accessed with following Lua constants: \emph{MONEYSYM} and \emph{MIDDOT}. See \emph{Lua Globals} > \emph{Constants} section.
\subsection{Accepted Control Sequences}
\begin{tabularx}{\textwidth}{c X c X}
\textbf{\large No.} & \textbf{\large Description} & \textbf{\large No.} & \textbf{\large Description}
\\ \\
\endhead
7 & BEL. Emits short beep. & 8 & BS. Moves cursor to left 1 character.
\\ \\
9 & TAB. Inserts appropriate horizontal space. Tab size is variable. & 10 & LF. Prints a new line.
\\ \\
12 & FF. Clears everything in screen buffer and moves cursor to (1, 1) & 13 & CR. Moves x coordinate of cursor to 1.
\\ \\
16 & DLE. Sets foreground colour to the default STDERR colour. & 127 & DEL. Backspace and deletes one character.
\\ \\
17 & DC1. Sets foreground colour to 0. (black) & 18 & DC2. Sets foreground colour to 1. (white)
\\ \\
19 & DC3. Sets foreground colour to 2. (dim grey) & 20 & DC4. Sets foreground colour to 3. (bright grey)
\end{tabularx}

View File

@@ -0,0 +1,22 @@
The Bit API is for manipulating numbers using bitwise binary operations. The ROMBASIC already comes with Lua's bit32 library so make sure to use that for your casual usage.
\subsection{Functions}
\begin{tabularx}{\textwidth}{l X}
\textbf{\large Function} & \textbf{\large Notes}
\\ \\
\endhead
bit.blshift(n, bits) & Alias of bit32.lshift(n, bits)
\\ \\
bit.brshift(n, bits) & Alias of bit32.arshift(n, bits)
\\ \\
bit.blogic\_rshift(n, bits) & Alias of bit32.brshift(n, bits)
\\ \\
bit.bxor(m, n) & Alias of bit32.bxor(m, n)
\\ \\
bit.bor(m, n) & Alias of bit32.bor(m, n)
\\ \\
bit.band(m, n) & Alias of bit32.band(m, n)
\\ \\
bit.bnot(n) & Alias of bit32.bnot(n)
\end{tabularx}

View File

@@ -0,0 +1,21 @@
The Colors API allows you to manipulate sets of colors. This is useful in colors on Advanced Computers and Advanced Monitors. British spellings are also supported.
\subsection{Constants}
When the colours are used in ComputerCraft's Term API, nearest console colours will be used. Below is the table of colours coded with their substitutions.
\begin{tabularx}{\textwidth}{l l l l}
colors.white & colors.\textcolor{orange}{orange} & colors.\textcolor{magenta}{magenta} & colors.\textcolor{cyan}{lightBlue}
\\ \\
colors.\textcolor{yellow}{yellow} & colors.\textcolor{lime}{lime} & colors.\textcolor{tan}{pink} & colors.\textcolor{dimgrey}{gray}
\\ \\
colors.\textcolor{brightgrey}{lightGray} & colors.\textcolor{cyan}{cyan} & colors.\textcolor{purple}{purple} & colors.\textcolor{blue}{blue}
\\ \\
colors.\textcolor{brown}{brown} & colors.\textcolor{green}{green} & colors.\textcolor{red}{red} & colors.\textcolor{black}{black}
\end{tabularx}
Note that pink is understood as \textcolor{tan}{tan} when it is used, lightBlue and cyan are merged to \textcolor{cyan}{cyan}.
\subsection{Functions}
All three functions are not supported, as there is no bundled cable thus there is no use of them.

View File

@@ -0,0 +1,3 @@
\begin{itemize}
\item io library is limited to io.read (read a line from keyboard) and io.write (print without new line)
\end{itemize}

View File

@@ -0,0 +1,51 @@
ROMBASIC adds global functions and constants for operability.
\subsection{Functions}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
\unemph{\_G.}runScript(\textbf{fun}: str, \textbf{env}: str) & nil & Runs Lua script \textbf{fun} with the environment tag \textbf{env}.
\\ \\
computer.totalMemory() & int & Returns the total size of the memory installed in the computer, in bytes.
\\ \\
computer.freeMemory() & int & Returns the amount of free memory on the computer.
\end{tabularx}
\subsection{Constants}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Name} & \textbf{\large Type} & \textbf{\large Description}
\\ \\
\endhead
\unemph{\_G.}EMDASH & string & EM dash represented by box-drawing character. Code 0xC4
\\ \\
\unemph{\_G.}UNCHECKED & string & Unchecked checkbox. Code 0x9C
\\ \\
\unemph{\_G.}CHECKED & string & Checked checkbox. Code 0x9D
\\ \\
\unemph{\_G.}MONEYSYM & string & Currency symbol used in the world. Code 0x9E
\\ \\
\unemph{\_G.}MIDDOT & string & Middle dot used in typography. Code 0xFA (note: 0xF9 is a Dot Product used in Mathematics)
\\ \\
\unemph{\_G.}DC1 & string & Ascii control sequence DC1. Used to change foreground colour to black.
\\ \\
\unemph{\_G.}DC2 & string & Ascii control sequence DC2. Used to change foreground colour to white.
\\ \\
\unemph{\_G.}DC3 & string & Ascii control sequence DC3. Used to change foreground colour to dim grey.
\\ \\
\unemph{\_G.}DC4 & string & Ascii control sequence DC4. Used to change foreground colour to bright grey.
\\ \\
\unemph{\_G.}DLE & string & Ascii control sequence DLE. Used to change foreground colour to terminal's default error text colour.
\\ \\
computer.prompt & string & Default text for prompt input indicator.
\\ \\
computer.verbose & bool & Sets whether print debug information to the console.
\\ \\
computer.loadedCLayer & table & List of names of compatibility layers has been loaded.
\\ \\
computer.bootloader & string & Path to the boot file. Should point to the EFI (/boot/efi).
\\ \\
computer.OEM & string & Manufacturer of the computer. If you \emph{are} a manufacturer, you may want to fill in this variable with your own company's name.
\end{tabularx}

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@@ -0,0 +1,18 @@
The line printer is a printer that operates on line basis. It only prints text in line-by-line, hence the name, on almost endlessly long roll of papers; it has no notion of page, it just prints. If you want some pages to keep, you must tear them out yourself.
Line printers do not work indefinitely; ignoring the obvious depletion of ink, belt for loading paper will be out of service on about 50 000 lines of printing, give or take a few, or paper will jam if the printer had struck with the unluckiness.
\subsection{Functions}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
lp.print(string) & nil & Prints a line of string.
\\ \\
lp.scroll(\textbf{n}: int) & nil & Scrolls the paper by \textbf{n} lines.
\\ \\
lp.status() & int & Returns a status of the line printer.
\\ \\
lp.reset() & nil & Resets the line printer.
\end{tabularx}

View File

@@ -37,23 +37,35 @@
\@writefile{toc}{\contentsline {section}{\numberline {1.2}Hexutils}{9}{section.1.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.2.1}Functions}{9}{subsection.1.2.1}}
\gdef \LT@iv {\LT@entry
{2}{138.81004pt}\LT@entry
{1}{45.25516pt}\LT@entry
{1}{150.9348pt}}
\@writefile{toc}{\contentsline {section}{\numberline {1.3}Input}{10}{section.1.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.3.1}Functions}{10}{subsection.1.3.1}}
\gdef \LT@v {\LT@entry
{2}{126.83005pt}\LT@entry
{1}{45.25516pt}\LT@entry
{1}{162.9148pt}}
\@writefile{toc}{\contentsline {section}{\numberline {1.4}Keys}{11}{section.1.4}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.4.1}Accepted Key Names}{11}{subsection.1.4.1}}
\gdef \LT@vi {\LT@entry
{2}{136.82pt}\LT@entry
{1}{45.25516pt}\LT@entry
{1}{152.92484pt}}
\@writefile{toc}{\contentsline {section}{\numberline {1.3}Security}{10}{section.1.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.3.1}Functions}{10}{subsection.1.3.1}}
\gdef \LT@v {\LT@entry
\@writefile{toc}{\contentsline {section}{\numberline {1.5}Security}{12}{section.1.5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5.1}Functions}{12}{subsection.1.5.1}}
\gdef \LT@vii {\LT@entry
{2}{102.18004pt}\LT@entry
{1}{45.25516pt}\LT@entry
{2}{180.42001pt}}
\@writefile{toc}{\contentsline {section}{\numberline {1.4}Shell}{11}{section.1.4}}
\gdef \LT@vi {\LT@entry
\@writefile{toc}{\contentsline {section}{\numberline {1.6}Shell}{13}{section.1.6}}
\gdef \LT@viii {\LT@entry
{2}{139.76003pt}\LT@entry
{1}{45.25516pt}\LT@entry
{1}{149.98482pt}}
\@writefile{toc}{\contentsline {section}{\numberline {1.5}Terminal}{12}{section.1.5}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5.1}Functions}{12}{subsection.1.5.1}}
\gdef \LT@vii {\LT@entry
\@writefile{toc}{\contentsline {section}{\numberline {1.7}Terminal}{14}{section.1.7}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.7.1}Functions}{14}{subsection.1.7.1}}
\gdef \LT@ix {\LT@entry
{1}{22.26001pt}\LT@entry
{1}{39.16003pt}\LT@entry
{1}{22.26001pt}\LT@entry
@@ -62,57 +74,58 @@
{1}{49.88002pt}\LT@entry
{1}{22.26001pt}\LT@entry
{1}{58.02002pt}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5.2}Standard Colours}{14}{subsection.1.5.2}}
\gdef \LT@viii {\LT@entry
\@writefile{toc}{\contentsline {subsection}{\numberline {1.7.2}Standard Colours}{16}{subsection.1.7.2}}
\gdef \LT@x {\LT@entry
{1}{28.3155pt}\LT@entry
{1}{139.1845pt}\LT@entry
{1}{28.3155pt}\LT@entry
{1}{139.1845pt}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5.3}Codepage}{15}{subsection.1.5.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.5.4}Accepted Control Sequences}{15}{subsection.1.5.4}}
\gdef \LT@ix {\LT@entry
\@writefile{toc}{\contentsline {subsection}{\numberline {1.7.3}Codepage}{17}{subsection.1.7.3}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.7.4}Accepted Control Sequences}{17}{subsection.1.7.4}}
\gdef \LT@xi {\LT@entry
{2}{134.13005pt}\LT@entry
{1}{45.25516pt}\LT@entry
{1}{155.61479pt}}
\gdef \LT@x {\LT@entry
{2}{123.76009pt}\LT@entry
\gdef \LT@xii {\LT@entry
{2}{111.63007pt}\LT@entry
{2}{36.06001pt}\LT@entry
{1}{175.1799pt}}
\@writefile{toc}{\contentsline {section}{\numberline {1.6}Lua Globals}{17}{section.1.6}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.6.1}Functions}{17}{subsection.1.6.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.6.2}Constants}{17}{subsection.1.6.2}}
{1}{187.30992pt}}
\@writefile{toc}{\contentsline {section}{\numberline {1.8}Lua Globals}{18}{section.1.8}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.8.1}Functions}{18}{subsection.1.8.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {1.8.2}Constants}{18}{subsection.1.8.2}}
\@writefile{toc}{\contentsline {section}{\numberline {1.9}Changes from Generic Lua Environment}{20}{section.1.9}}
\@writefile{lof}{\addvspace {10pt}}
\@writefile{lot}{\addvspace {10pt}}
\@writefile{toc}{\contentsline {chapter}{\chapternumberline {2}Compatibility Layers---ComputerCraft}{19}{chapter.2}}
\gdef \LT@xi {\LT@entry
\@writefile{toc}{\contentsline {chapter}{\chapternumberline {2}Compatibility Layers---ComputerCraft}{21}{chapter.2}}
\gdef \LT@xiii {\LT@entry
{2}{108.45001pt}\LT@entry
{2}{125.76003pt}}
\@writefile{toc}{\contentsline {section}{\numberline {2.1}Bit}{20}{section.2.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1.1}Functions}{20}{subsection.2.1.1}}
\gdef \LT@xii {\LT@entry
\@writefile{toc}{\contentsline {section}{\numberline {2.1}Bit}{22}{section.2.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.1.1}Functions}{22}{subsection.2.1.1}}
\gdef \LT@xiv {\LT@entry
{1}{77.19011pt}\LT@entry
{1}{68.63008pt}\LT@entry
{1}{76.35007pt}\LT@entry
{1}{76.36005pt}}
\@writefile{toc}{\contentsline {section}{\numberline {2.2}Colors}{21}{section.2.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2.1}Constants}{21}{subsection.2.2.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2.2}Functions}{21}{subsection.2.2.2}}
\@writefile{toc}{\contentsline {section}{\numberline {2.3}Term}{22}{section.2.3}}
\@writefile{toc}{\contentsline {section}{\numberline {2.4}Filesystem}{23}{section.2.4}}
\@writefile{toc}{\contentsline {section}{\numberline {2.2}Colors}{23}{section.2.2}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2.1}Constants}{23}{subsection.2.2.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {2.2.2}Functions}{23}{subsection.2.2.2}}
\@writefile{toc}{\contentsline {section}{\numberline {2.3}Term}{24}{section.2.3}}
\@writefile{toc}{\contentsline {section}{\numberline {2.4}Filesystem}{25}{section.2.4}}
\@writefile{lof}{\addvspace {10pt}}
\@writefile{lot}{\addvspace {10pt}}
\@writefile{toc}{\contentsline {chapter}{\chapternumberline {3}Compatibility Layers---OpenComputers}{25}{chapter.3}}
\@writefile{toc}{\contentsline {chapter}{\chapternumberline {3}Compatibility Layers---OpenComputers}{27}{chapter.3}}
\@writefile{lof}{\addvspace {10pt}}
\@writefile{lot}{\addvspace {10pt}}
\@writefile{toc}{\contentsline {chapter}{\chapternumberline {4}Peripherals}{27}{chapter.4}}
\gdef \LT@xiii {\LT@entry
\@writefile{toc}{\contentsline {chapter}{\chapternumberline {4}Peripherals}{29}{chapter.4}}
\gdef \LT@xv {\LT@entry
{2}{71.78003pt}\LT@entry
{1}{45.25516pt}\LT@entry
{2}{153.90001pt}}
\@writefile{toc}{\contentsline {section}{\numberline {4.1}Line Printer}{28}{section.4.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1.1}Functions}{28}{subsection.4.1.1}}
\@writefile{toc}{\contentsline {section}{\numberline {4.1}Line Printer}{30}{section.4.1}}
\@writefile{toc}{\contentsline {subsection}{\numberline {4.1.1}Functions}{30}{subsection.4.1.1}}
\@writefile{lof}{\addvspace {10pt}}
\@writefile{lot}{\addvspace {10pt}}
\@writefile{toc}{\contentsline {chapter}{\chapternumberline {5}References}{29}{chapter.5}}
\memsetcounter{lastsheet}{31}
\memsetcounter{lastpage}{31}
\@writefile{toc}{\contentsline {chapter}{\chapternumberline {5}References}{31}{chapter.5}}
\memsetcounter{lastsheet}{33}
\memsetcounter{lastpage}{33}

View File

@@ -1,4 +1,4 @@
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238) (format=lualatex 2015.10.5) 22 SEP 2016 18:24
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238) (format=lualatex 2015.10.5) 26 SEP 2016 12:12
restricted \write18 enabled.
file:line:error style messages enabled.
**romapidoc.tex
@@ -552,7 +552,7 @@ luatexbase-attr: luatexbase.attributes["luaotfload@cursbase"] = 6
luatexbase-attr: luatexbase.attributes["luaotfload@curscurs"] = 7
luatexbase-attr: luatexbase.attributes["luaotfload@cursdone"] = 8
luatexbase-attr: luatexbase.attributes["luaotfload@state"] = 9
luaotfload | main : fontloader loaded in 0.033 seconds
luaotfload | main : fontloader loaded in 0.031 seconds
luatexbase-mcb: inserting 'luaotfload.node_processor'
at position 1 in 'pre_linebreak_filter'
luatexbase-mcb: inserting 'luaotfload.node_processor'
@@ -1084,7 +1084,147 @@ Package: longtable 2014/10/28 v4.11 Multi-page Table package (DPC)
\c@LT@chunks=\count306
\LT@p@ftn=\toks27
))
Package hyperref Info: Option `unicode' set `true' on input line 80.
(/usr/local/texlive/2015/texmf-dist/tex/latex/tasks/tasks.sty
(/usr/local/texlive/2015/texmf-dist/tex/latex/l3packages/l3keys2e/l3keys2e.sty
Package: l3keys2e 2014/11/25 v5471 LaTeX2e option processing using LaTeX3 keys
)
Package: tasks 2014/07/29 v0.10a Horizontal columned lists.
(/usr/local/texlive/2015/texmf-dist/tex/latex/eepic/epic.sty
Enhancements to Picture Environment. Version 1.2 - Released June 1, 1986
\@@multicnt=\count307
\d@lta=\count308
\@delta=\dimen267
\@@delta=\dimen268
\@gridcnt=\count309
\@joinkind=\count310
\@dotgap=\dimen269
\@ddotgap=\dimen270
\@x@diff=\count311
\@y@diff=\count312
\x@diff=\dimen271
\y@diff=\dimen272
\@dotbox=\box262
\num@segments=\count313
\num@segmentsi=\count314
\@datafile=\read3
) (/usr/local/texlive/2015/texmf-dist/tex/latex/cntformats/cntformats.sty
Package: cntformats 2014/07/20 v0.7 A different way to read counters. (CN)
(/usr/local/texlive/2015/texmf-dist/tex/latex/etoolbox/etoolbox.sty
Package: etoolbox 2015/05/04 v2.2 e-TeX tools for LaTeX (JAW)
\etb@tempcnta=\count315
)
(/usr/local/texlive/2015/texmf-dist/tex/latex/cnltx/cnltx-base.sty
Package: cnltx-base 2015/01/11 v0.12 LaTeX tools and documenting facilities (CN)
(/usr/local/texlive/2015/texmf-dist/tex/latex/pgfopts/pgfopts.sty
Package: pgfopts 2014/07/10 v2.1a LaTeX package options with pgfkeys
(/usr/local/texlive/2015/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
\pgfkeys@pathtoks=\toks28
\pgfkeys@temptoks=\toks29
(/usr/local/texlive/2015/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.c
ode.tex
\pgfkeys@tmptoks=\toks30
)))
\pgfopts@list@add@a@toks=\toks31
\pgfopts@list@add@b@toks=\toks32
)
\c@cnltx@tmpa=\count316
\c@cnltx@tmpb=\count317
\c@cnltx@tmpc=\count318
\cnltx@tmpa@length=\skip271
\cnltx@tmpb@length=\skip272
\cnltx@tmpc@length=\skip273
(/usr/local/texlive/2015/texmf-dist/tex/latex/trimspaces/trimspaces.sty
Package: trimspaces 2009/09/17 v1.1 Trim spaces around a token list
)))
(/usr/local/texlive/2015/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.st
y
Package: xtemplate 2014/11/25 v5471 L3 Experimental prototype document functions
\l__xtemplate_tmp_dim=\dimen273
\l__xtemplate_tmp_int=\count319
\l__xtemplate_tmp_muskip=\muskip17
\l__xtemplate_tmp_skip=\skip274
Variant \prop_get:NoNTF already defined; not changing it on line 106
Variant \prop_get:NoNT already defined; not changing it on line 107
Variant \prop_get:NoNF already defined; not changing it on line 108
) (/usr/local/texlive/2015/texmf-dist/tex/latex/environ/environ.sty
Package: environ 2014/05/04 v0.3 A new way to define environments
\@envbody=\toks33
)
\l__tasks_depth_int=\count320
\g__tasks_int=\count321
\g__tasks_total_items_int=\count322
\l__tasks_columns_int=\count323
\l__tasks_rows_int=\count324
\g__tasks_current_col_num_int=\count325
\g__tasks_current_row_num_int=\count326
\l__tasks_item_columns_int=\count327
\l__tasks_item_indent_dim=\dimen274
\l__tasks_item_default_indent_dim=\dimen275
\l__tasks_item_width_dim=\dimen276
\l__tasks_label_width_dim=\dimen277
\l__tasks_label_default_width_dim=\dimen278
\l__tasks_label_offset_dim=\dimen279
\l__tasks_label_default_offset_dim=\dimen280
\l__tasks_column_sep_dim=\dimen281
\l__tasks_after_item_skip=\skip275
\l__tasks_custom_after_item_skip=\skip276
\l__tasks_before_list_skip=\skip277
\l__tasks_after_list_skip=\skip278
\l__tasks_item_coffin=\box263
\l__tasks_label_coffin=\box264
\c@task=\count328
\l__tasks_tmpa_int=\count329
\l__tasks_tmpb_int=\count330
\l__tasks_tmpa_coffin=\box265
.................................................
. xtemplate info: "declare-object-type"
.
. Declaring object type 'tasks' taking 3 argument(s) on line 377.
.................................................
\l__tasks_choice_width_dim=\dimen282
\l__tasks_choice_linewidth_dim=\dimen283
\l__tasks_choice_checkwidth_dim=\dimen284
\l__tasks_choice_raise_dim=\dimen285
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \startnewitemline with sig. '' on line 670.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \NewTasks with sig. 'O{}mO{\task }D(){1}' on line 679.
.................................................
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \RenewTasks with sig. 'O{}mO{\task }D(){1}' on line 686.
.................................................
.................................................
. LaTeX info: "xparse/define-environment"
.
. Defining environment 'tasks' with sig. 'O{}D(){1}' on line 694.
.................................................
(/usr/local/texlive/2015/texmf-dist/tex/latex/tasks/tasks.cfg
File: tasks.cfg 2014/07/29 v0.10a tasks instances
)
.................................................
. LaTeX info: "xparse/define-command"
.
. Defining command \settasks with sig. 'm' on line 710.
.................................................
)
Package hyperref Info: Option `unicode' set `true' on input line 83.
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/puenc.def
File: puenc.def 2012/11/06 v6.83m Hyperref: PDF Unicode definition (HO)
@@ -1092,44 +1232,44 @@ File: puenc.def 2012/11/06 v6.83m Hyperref: PDF Unicode definition (HO)
(./romapidoc.aux)
\openout1 = romapidoc.aux
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 84.
LaTeX Font Info: ... okay on input line 84.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 84.
LaTeX Font Info: ... okay on input line 84.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 84.
LaTeX Font Info: ... okay on input line 84.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 84.
LaTeX Font Info: ... okay on input line 84.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 84.
LaTeX Font Info: ... okay on input line 84.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 84.
LaTeX Font Info: ... okay on input line 84.
LaTeX Font Info: Checking defaults for EU2/lmr/m/n on input line 84.
LaTeX Font Info: ... okay on input line 84.
LaTeX Font Info: Checking defaults for T3/cmr/m/n on input line 84.
LaTeX Font Info: Try loading font information for T3+cmr on input line 84.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 87.
LaTeX Font Info: ... okay on input line 87.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 87.
LaTeX Font Info: ... okay on input line 87.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 87.
LaTeX Font Info: ... okay on input line 87.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 87.
LaTeX Font Info: ... okay on input line 87.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 87.
LaTeX Font Info: ... okay on input line 87.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 87.
LaTeX Font Info: ... okay on input line 87.
LaTeX Font Info: Checking defaults for EU2/lmr/m/n on input line 87.
LaTeX Font Info: ... okay on input line 87.
LaTeX Font Info: Checking defaults for T3/cmr/m/n on input line 87.
LaTeX Font Info: Try loading font information for T3+cmr on input line 87.
(/usr/local/texlive/2015/texmf-dist/tex/latex/tipa/t3cmr.fd
File: t3cmr.fd 2001/12/31 TIPA font definitions
)
LaTeX Font Info: ... okay on input line 84.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 84.
LaTeX Font Info: ... okay on input line 84.
LaTeX Font Info: Checking defaults for PU/pdf/m/n on input line 84.
LaTeX Font Info: ... okay on input line 84.
LaTeX Font Info: ... okay on input line 87.
LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 87.
LaTeX Font Info: ... okay on input line 87.
LaTeX Font Info: Checking defaults for PU/pdf/m/n on input line 87.
LaTeX Font Info: ... okay on input line 87.
(/usr/local/texlive/2015/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count307
\scratchdimen=\dimen267
\scratchbox=\box262
\nofMPsegments=\count308
\nofMParguments=\count309
\everyMPshowfont=\toks28
\MPscratchCnt=\count310
\MPscratchDim=\dimen268
\MPnumerator=\count311
\makeMPintoPDFobject=\count312
\everyMPtoPDFconversion=\toks29
\scratchcounter=\count331
\scratchdimen=\dimen286
\scratchbox=\box266
\nofMPsegments=\count332
\nofMParguments=\count333
\everyMPshowfont=\toks34
\MPscratchCnt=\count334
\MPscratchDim=\dimen287
\MPnumerator=\count335
\makeMPintoPDFobject=\count336
\everyMPtoPDFconversion=\toks35
) (/usr/local/texlive/2015/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf
@@ -1151,64 +1291,64 @@ File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
.................................................
\symlegacymaths=\mathgroup4
LaTeX Font Info: Overwriting symbol font `legacymaths' in version `bold'
(Font) OT1/cmr/m/n --> OT1/cmr/bx/n on input line 84.
LaTeX Font Info: Redeclaring math accent \acute on input line 84.
LaTeX Font Info: Redeclaring math accent \grave on input line 84.
LaTeX Font Info: Redeclaring math accent \ddot on input line 84.
LaTeX Font Info: Redeclaring math accent \tilde on input line 84.
LaTeX Font Info: Redeclaring math accent \bar on input line 84.
LaTeX Font Info: Redeclaring math accent \breve on input line 84.
LaTeX Font Info: Redeclaring math accent \check on input line 84.
LaTeX Font Info: Redeclaring math accent \hat on input line 84.
LaTeX Font Info: Redeclaring math accent \dot on input line 84.
LaTeX Font Info: Redeclaring math accent \mathring on input line 84.
LaTeX Font Info: Redeclaring math symbol \colon on input line 84.
LaTeX Font Info: Redeclaring math symbol \Gamma on input line 84.
LaTeX Font Info: Redeclaring math symbol \Delta on input line 84.
LaTeX Font Info: Redeclaring math symbol \Theta on input line 84.
LaTeX Font Info: Redeclaring math symbol \Lambda on input line 84.
LaTeX Font Info: Redeclaring math symbol \Xi on input line 84.
LaTeX Font Info: Redeclaring math symbol \Pi on input line 84.
LaTeX Font Info: Redeclaring math symbol \Sigma on input line 84.
LaTeX Font Info: Redeclaring math symbol \Upsilon on input line 84.
LaTeX Font Info: Redeclaring math symbol \Phi on input line 84.
LaTeX Font Info: Redeclaring math symbol \Psi on input line 84.
LaTeX Font Info: Redeclaring math symbol \Omega on input line 84.
LaTeX Font Info: Redeclaring math symbol \mathdollar on input line 84.
LaTeX Font Info: Redeclaring symbol font `operators' on input line 84.
(Font) OT1/cmr/m/n --> OT1/cmr/bx/n on input line 87.
LaTeX Font Info: Redeclaring math accent \acute on input line 87.
LaTeX Font Info: Redeclaring math accent \grave on input line 87.
LaTeX Font Info: Redeclaring math accent \ddot on input line 87.
LaTeX Font Info: Redeclaring math accent \tilde on input line 87.
LaTeX Font Info: Redeclaring math accent \bar on input line 87.
LaTeX Font Info: Redeclaring math accent \breve on input line 87.
LaTeX Font Info: Redeclaring math accent \check on input line 87.
LaTeX Font Info: Redeclaring math accent \hat on input line 87.
LaTeX Font Info: Redeclaring math accent \dot on input line 87.
LaTeX Font Info: Redeclaring math accent \mathring on input line 87.
LaTeX Font Info: Redeclaring math symbol \colon on input line 87.
LaTeX Font Info: Redeclaring math symbol \Gamma on input line 87.
LaTeX Font Info: Redeclaring math symbol \Delta on input line 87.
LaTeX Font Info: Redeclaring math symbol \Theta on input line 87.
LaTeX Font Info: Redeclaring math symbol \Lambda on input line 87.
LaTeX Font Info: Redeclaring math symbol \Xi on input line 87.
LaTeX Font Info: Redeclaring math symbol \Pi on input line 87.
LaTeX Font Info: Redeclaring math symbol \Sigma on input line 87.
LaTeX Font Info: Redeclaring math symbol \Upsilon on input line 87.
LaTeX Font Info: Redeclaring math symbol \Phi on input line 87.
LaTeX Font Info: Redeclaring math symbol \Psi on input line 87.
LaTeX Font Info: Redeclaring math symbol \Omega on input line 87.
LaTeX Font Info: Redeclaring math symbol \mathdollar on input line 87.
LaTeX Font Info: Redeclaring symbol font `operators' on input line 87.
LaTeX Font Info: Encoding `OT1' has changed to `EU2' for symbol font
(Font) `operators' in the math version `normal' on input line 84.
(Font) `operators' in the math version `normal' on input line 87.
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) OT1/cmr/m/n --> EU2/MyriadPro(0)/m/n on input line 84.
(Font) OT1/cmr/m/n --> EU2/MyriadPro(0)/m/n on input line 87.
LaTeX Font Info: Encoding `OT1' has changed to `EU2' for symbol font
(Font) `operators' in the math version `bold' on input line 84.
(Font) `operators' in the math version `bold' on input line 87.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) OT1/cmr/bx/n --> EU2/MyriadPro(0)/m/n on input line 84.
(Font) OT1/cmr/bx/n --> EU2/MyriadPro(0)/m/n on input line 87.
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) EU2/MyriadPro(0)/m/n --> EU2/MyriadPro(0)/m/n on input l
ine 84.
ine 87.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `normal'
(Font) OT1/cmr/m/it --> EU2/MyriadPro(0)/m/it on input line 84.
(Font) OT1/cmr/m/it --> EU2/MyriadPro(0)/m/it on input line 87.
LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `normal'
(Font) OT1/cmr/bx/n --> EU2/MyriadPro(0)/bx/n on input line 84.
(Font) OT1/cmr/bx/n --> EU2/MyriadPro(0)/bx/n on input line 87.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `normal'
(Font) OT1/cmss/m/n --> EU2/lmss/m/n on input line 84.
(Font) OT1/cmss/m/n --> EU2/lmss/m/n on input line 87.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `normal'
(Font) OT1/cmtt/m/n --> EU2/lmtt/m/n on input line 84.
(Font) OT1/cmtt/m/n --> EU2/lmtt/m/n on input line 87.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) EU2/MyriadPro(0)/m/n --> EU2/MyriadPro(0)/bx/n on input
line 84.
line 87.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold'
(Font) OT1/cmr/bx/it --> EU2/MyriadPro(0)/bx/it on input line 8
4.
7.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `bold'
(Font) OT1/cmss/bx/n --> EU2/lmss/bx/n on input line 84.
(Font) OT1/cmss/bx/n --> EU2/lmss/bx/n on input line 87.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold'
(Font) OT1/cmtt/m/n --> EU2/lmtt/bx/n on input line 84.
\AtBeginShipoutBox=\box263
Package hyperref Info: Link coloring OFF on input line 84.
(Font) OT1/cmtt/m/n --> EU2/lmtt/bx/n on input line 87.
\AtBeginShipoutBox=\box267
Package hyperref Info: Link coloring OFF on input line 87.
(/usr/local/texlive/2015/texmf-dist/tex/latex/hyperref/nameref.sty
Package: nameref 2012/10/27 v2.43 Cross-referencing by name of section
@@ -1216,14 +1356,14 @@ Package: nameref 2012/10/27 v2.43 Cross-referencing by name of section
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/gettitlestring.sty
Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO)
)
\c@section@level=\count313
\c@section@level=\count337
)
Redoing nameref's sectioning
Redoing nameref's label
LaTeX Info: Redefining \nameref on input line 84.
LaTeX Info: Redefining \ref on input line 84.
LaTeX Info: Redefining \pageref on input line 84.
LaTeX Info: Redefining \nameref on input line 84.
LaTeX Info: Redefining \nameref on input line 87.
LaTeX Info: Redefining \ref on input line 87.
LaTeX Info: Redefining \pageref on input line 87.
LaTeX Info: Redefining \nameref on input line 87.
(./romapidoc.out) (./romapidoc.out)
\@outlinefile=\write4
@@ -1235,11 +1375,11 @@ luaotfload | load : Lookup/name: "MyriadPro" -> "MyriadPro-It.otf"
luaotfload | load : Lookup/name: "MyriadPro" -> "MyriadPro-Regular.otf"
luaotfload | load : Lookup/name: "MyriadPro" -> "MyriadPro-Regular.otf"
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <10.95> on input line 86.
(Font) <10.95> on input line 89.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 86.
(Font) <8> on input line 89.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 86.
(Font) <6> on input line 89.
[1
{/usr/local/texlive/2015/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2
@@ -1262,218 +1402,295 @@ luaotfload | load : Lookup/name: "MyriadPro" -> "MyriadPro-Regular.otf"
luaotfload | load : Lookup/name: "MyriadPro" -> "MyriadPro-Bold.otf" [5]
luaotfload | load : Lookup/name: "MyriadPro" -> "MyriadPro-Regular.otf"
luaotfload | load : Lookup/name: "MyriadPro" -> "MyriadPro-Bold.otf"
(./api_filesystem.tex
luaotfload | load : Lookup/name: "MyriadPro" -> "MyriadPro-Bold.otf"
luaotfload | load : Lookup/name: "MyriadPro" -> "MyriadPro-It.otf"
Underfull \hbox (badness 2735) in paragraph at lines 138--138
Underfull \hbox (badness 2735) in paragraph at lines 40--40
[][]|\EU2/MyriadPro(0)/m/n/10 Moves the di-rec-tory to the
[]
Underfull \hbox (badness 1655) in paragraph at lines 138--138
Underfull \hbox (badness 1655) in paragraph at lines 40--40
\EU2/MyriadPro(0)/m/n/10 des-ti-na-tion. Sub-di-rec-to-ries /
[]
Underfull \hbox (badness 2150) in paragraph at lines 138--138
Underfull \hbox (badness 2150) in paragraph at lines 40--40
[][]|\EU2/MyriadPro(0)/m/n/10 Copies the di-rec-tory to the
[]
Underfull \hbox (badness 1655) in paragraph at lines 138--138
Underfull \hbox (badness 1655) in paragraph at lines 40--40
\EU2/MyriadPro(0)/m/n/10 des-ti-na-tion. Sub-di-rec-to-ries /
[]
LaTeX Font Info: Font shape `EU2/MyriadPro(0)/m/sl' in size <10> not availabl
e
(Font) Font shape `EU2/MyriadPro(0)/m/it' tried instead on input li
ne 138.
ne 40.
luaotfload | load : Lookup/name: "MyriadPro" -> "MyriadPro-It.otf"
luaotfload | load : Lookup/name: "MyriadPro" -> "MyriadPro-It.otf" [6
] [7] [8]
Underfull \hbox (badness 4792) in paragraph at lines 188--188
] [7]) [8] (./api_hexutils.tex
Underfull \hbox (badness 4792) in paragraph at lines 10--10
[][]|\EU2/MyriadPro(0)/m/n/10 Con-verts byte ar-ray to the
[]
[9
) [9
]
Underfull \hbox (badness 3354) in paragraph at lines 212--212
] (./api_input.tex
Underfull \hbox (badness 1515) in paragraph at lines 12--12
\EU2/MyriadPro(0)/m/n/10 By com-bin-ing with and or or
[]
Underfull \hbox (badness 3884) in paragraph at lines 12--12
\EU2/MyriadPro(0)/m/n/10 state-ment, you can in-quire for
[]
) [10
] (./api_keys.tex
Overfull \hbox (3.01012pt too wide) in paragraph at lines 3--4
[][]\EU2/MyriadPro(0)/m/n/10 Notes on com-pat-i-bil-ity with Com-put-er-Craft:
al-though this li-brary is ComputerCraft-
[]
Underfull \hbox (badness 2150) in paragraph at lines 12--12
[][]|\EU2/MyriadPro(0)/m/n/10 Re-turns key name cor-re-sponds to
[]
Overfull \hbox (9.77664pt too wide) in paragraph at lines 72--72
[]|\EU2/MyriadPro(0)/m/n/10 (\EU2/MyriadPro(0)/m/it/10 zero \EU2/MyriadPro(0)/m
/n/10 to \EU2/MyriadPro(0)/m/it/10 nine\EU2/MyriadPro(0)/m/n/10 )|
[]
Overfull \hbox (1.58002pt too wide) in paragraph at lines 72--72
[]|\EU2/MyriadPro(0)/m/n/10 backspace|
[]
Overfull \hbox (2.65999pt too wide) in paragraph at lines 72--72
[]|\EU2/MyriadPro(0)/m/n/10 leftBracket|
[]
Overfull \hbox (9.01001pt too wide) in paragraph at lines 72--72
[]|\EU2/MyriadPro(0)/m/n/10 rightBracket|
[]
Overfull \hbox (2.23003pt too wide) in paragraph at lines 72--72
[]|\EU2/MyriadPro(0)/m/n/10 semiColon|
[]
Overfull \hbox (6.18004pt too wide) in paragraph at lines 72--72
[]|\EU2/MyriadPro(0)/m/n/10 apostrophe|
[]
Overfull \hbox (6.32997pt too wide) in paragraph at lines 72--72
[]|\EU2/MyriadPro(0)/m/n/10 cimcumflex|
[]
Overfull \hbox (5.03001pt too wide) in paragraph at lines 72--72
[]|\EU2/MyriadPro(0)/m/n/10 underscore|
[]
Overfull \hbox (4.14001pt too wide) in paragraph at lines 72--72
[]|\EU2/MyriadPro(0)/m/n/10 pageDown|
[]
Overfull \hbox (15.58pt too wide) in paragraph at lines 72--72
[]|\EU2/MyriadPro(0)/m/n/10 leftCommand|
[]
) [11
] (./api_security.tex
Underfull \hbox (badness 3354) in paragraph at lines 20--20
[][]|\EU2/MyriadPro(0)/m/n/10 Re-turns SHA-256 hash of in-put
[]
Underfull \hbox (badness 4805) in paragraph at lines 212--212
Underfull \hbox (badness 4805) in paragraph at lines 20--20
[][]|\EU2/MyriadPro(0)/m/n/10 De-codes Base64 string and re-
[]
Underfull \hbox (badness 2707) in paragraph at lines 212--212
Underfull \hbox (badness 2707) in paragraph at lines 20--20
[][]|\EU2/MyriadPro(0)/m/n/10 En-codes in-put string as Base64
[]
[10
) [12
] [11
] (./api_shell.tex) [13
]
Underfull \hbox (badness 2165) in paragraph at lines 292--292
] (./api_terminal.tex
Underfull \hbox (badness 2165) in paragraph at lines 66--66
\EU2/MyriadPro(0)/m/n/10 nal. Graphic ter-mi-nals also can
[]
Underfull \hbox (badness 2932) in paragraph at lines 292--292
Underfull \hbox (badness 2932) in paragraph at lines 66--66
[][]|\EU2/MyriadPro(0)/m/n/10 Re-turns \EU2/MyriadPro(0)/bx/n/10 true \EU2/Myri
adPro(0)/m/n/10 if the ter-mi-nal is
[]
Underfull \hbox (badness 2772) in paragraph at lines 292--292
Underfull \hbox (badness 2772) in paragraph at lines 66--66
[][]|\EU2/MyriadPro(0)/m/n/10 Emits \EU2/MyriadPro(0)/bx/n/10 c \EU2/MyriadPro(
0)/m/n/10 into (\EU2/MyriadPro(0)/bx/n/10 x\EU2/MyriadPro(0)/m/n/10 , \EU2/Myri
adPro(0)/bx/n/10 y\EU2/MyriadPro(0)/m/n/10 ), con-trol se-
[]
Underfull \hbox (badness 3118) in paragraph at lines 292--292
Underfull \hbox (badness 3118) in paragraph at lines 66--66
\EU2/MyriadPro(0)/m/n/10 ing con-trol se-quences as sym-
[]
Underfull \hbox (badness 1365) in paragraph at lines 292--292
Underfull \hbox (badness 1365) in paragraph at lines 66--66
[][]|\EU2/MyriadPro(0)/m/n/10 Clears whole screen buffer and
[]
Underfull \hbox (badness 5022) in paragraph at lines 292--292
Underfull \hbox (badness 5022) in paragraph at lines 66--66
[][]|\EU2/MyriadPro(0)/m/n/10 Re-turns cur-rent co-or-di-nates of
[]
Underfull \hbox (badness 10000) in paragraph at lines 292--292
Underfull \hbox (badness 10000) in paragraph at lines 66--66
[][]|\EU2/MyriadPro(0)/m/n/10 Re-turns cur-rent fore-ground
[]
Underfull \hbox (badness 10000) in paragraph at lines 292--292
Underfull \hbox (badness 10000) in paragraph at lines 66--66
[][]|\EU2/MyriadPro(0)/m/n/10 Re-turns cur-rent back-ground
[]
[12
[14
] [13] <mda.pdf, id=157, 597.51233pt x 845.0471pt>
File: mda.pdf Graphic file (type pdf)
<use mda.pdf>
Package pdftex.def Info: mda.pdf used on input line 310.
(pdftex.def) Requested size: 148.4842pt x 210.0pt.
] [15]
\cpimagew=\skip279
<mda.png, id=184, 4625.28pt x 1798.72pt>
File: mda.png Graphic file (type png)
<use mda.png>
Package pdftex.def Info: mda.png used on input line 88.
(pdftex.def) Requested size: 295.0pt x 114.69775pt.
Underfull \vbox (badness 10000) has occurred while \output is active []
[14]
Underfull \hbox (badness 6658) in paragraph at lines 331--331
[16]
Underfull \hbox (badness 6658) in paragraph at lines 109--109
[][]|\EU2/MyriadPro(0)/m/n/10 DEL. Backspace and deletes
[]
[15<./mda.pdf>] [16]
Underfull \hbox (badness 1092) in paragraph at lines 352--352
) [17<./mda.png>] (./luaglobals.tex
Underfull \hbox (badness 1092) in paragraph at lines 14--14
\EU2/MyriadPro(0)/m/n/10 ory in-stalled in the com-puter, in
[]
Underfull \hbox (badness 3019) in paragraph at lines 383--383
[][]|\EU2/MyriadPro(0)/m/n/10 Cur-rency sym-bol used in the world.
[]
Underfull \hbox (badness 1888) in paragraph at lines 383--383
Underfull \hbox (badness 10000) in paragraph at lines 51--51
[][]|\EU2/MyriadPro(0)/m/n/10 Ascii con-trol se-quence DC1. Used to
[]
Underfull \hbox (badness 1888) in paragraph at lines 383--383
Underfull \hbox (badness 10000) in paragraph at lines 51--51
[][]|\EU2/MyriadPro(0)/m/n/10 Ascii con-trol se-quence DC2. Used to
[]
Underfull \hbox (badness 1888) in paragraph at lines 383--383
Underfull \hbox (badness 10000) in paragraph at lines 51--51
[][]|\EU2/MyriadPro(0)/m/n/10 Ascii con-trol se-quence DC3. Used to
[]
Underfull \hbox (badness 1888) in paragraph at lines 383--383
Underfull \hbox (badness 10000) in paragraph at lines 51--51
[][]|\EU2/MyriadPro(0)/m/n/10 Ascii con-trol se-quence DC4. Used to
[]
Underfull \hbox (badness 4713) in paragraph at lines 383--383
\EU2/MyriadPro(0)/m/n/10 change fore-ground colour to bright
[]
Underfull \hbox (badness 2478) in paragraph at lines 383--383
Underfull \hbox (badness 10000) in paragraph at lines 51--51
[][]|\EU2/MyriadPro(0)/m/n/10 Ascii con-trol se-quence DLE. Used to
[]
[17
] [18]
luaotfload | load : Lookup/name: "MyriadPro" -> "MyriadPro-Bold.otf" [19
Underfull \hbox (badness 2781) in paragraph at lines 51--51
\EU2/MyriadPro(0)/m/n/10 change fore-ground colour to ter-mi-nals
[]
] [20
[18
]) [19] (./luadifferences.tex) [20
]
luaotfload | load : Lookup/name: "MyriadPro" -> "MyriadPro-Bold.otf" [21
] (./cc_bit.tex) [22
] [21
] [22
] [23
]
(./cc_colors.tex) [23
] [24
] [25] [26
] [25
] [26
] [27] [28
] [29
] [29] (./peri_lp.tex) [30
] [30
] [31
]
[31
] [32
] [33
]
\tf@toc=\write5
\openout5 = romapidoc.toc
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 480.
Package atveryend Info: Empty hook `AfterLastShipout' on input line 480.
(./romapidoc.aux)
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 480.
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 480.
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 165.
Package atveryend Info: Empty hook `AfterLastShipout' on input line 165.
(./romapidoc.aux)
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 165.
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 165.
Package rerunfilecheck Info: File `romapidoc.out' has not changed.
(rerunfilecheck) Checksum: 03D8004877E474961620BACB7D2C8DE2;1800.
Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 480.
(rerunfilecheck) Checksum: A4B98F6CE220B3C970CC4D5ECA7A4CF8;2202.
Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 165.
)
Here is how much of LuaTeX's memory you used:
25439 strings out of 494693
125006,552014 words of node,token memory allocated
724 words of node memory still in use:
3 hlist, 1 vlist, 1 rule, 2 glue, 1 kern, 5 attribute, 140 glue_spec, 5 attri
27266 strings out of 494693
125070,662416 words of node,token memory allocated
778 words of node memory still in use:
3 hlist, 1 vlist, 1 rule, 2 glue, 1 kern, 5 attribute, 141 glue_spec, 5 attri
bute_list, 2 write nodes
avail lists: 2:14425,3:272,4:3580,5:1297,6:6112,7:343,8:18,9:884,10:384
28550 multiletter control sequences out of 65536+600000
avail lists: 2:14493,3:271,4:3580,5:1301,6:6145,7:343,8:21,9:884,10:390
30200 multiletter control sequences out of 65536+600000
62 fonts using 5300671 bytes
55i,12n,59p,1189b,492s stack positions out of 5000i,500n,10000p,200000b,100000s
67i,12n,59p,1189b,492s stack positions out of 5000i,500n,10000p,200000b,100000s
</Library/Fonts/MyriadPro-It.otf></Library/Fonts/MyriadPro-Regular.otf></Library
/Fonts/MyriadPro-Bold.otf>
Output written on romapidoc.pdf (31 pages, 201848 bytes).
Output written on romapidoc.pdf (33 pages, 95180 bytes).
PDF statistics: 281 PDF objects out of 1000 (max. 8388607)
235 compressed objects within 3 object streams
76 named destinations out of 1000 (max. 131072)
129 words of extra memory for PDF output out of 10000 (max. 10000000)
PDF statistics: 304 PDF objects out of 1000 (max. 8388607)
255 compressed objects within 3 object streams
85 named destinations out of 1000 (max. 131072)
153 words of extra memory for PDF output out of 10000 (max. 10000000)

View File

@@ -1,16 +1,19 @@
\BOOKMARK [0][-]{chapter.1}{\376\377\000A\000P\000I\000s\000\040\000a\000n\000d\000\040\000L\000i\000b\000r\000a\000r\000i\000e\000s}{}% 1
\BOOKMARK [1][-]{section.1.1}{\376\377\000F\000i\000l\000e\000s\000y\000s\000t\000e\000m}{chapter.1}% 2
\BOOKMARK [1][-]{section.1.2}{\376\377\000H\000e\000x\000u\000t\000i\000l\000s}{chapter.1}% 3
\BOOKMARK [1][-]{section.1.3}{\376\377\000S\000e\000c\000u\000r\000i\000t\000y}{chapter.1}% 4
\BOOKMARK [1][-]{section.1.4}{\376\377\000S\000h\000e\000l\000l}{chapter.1}% 5
\BOOKMARK [1][-]{section.1.5}{\376\377\000T\000e\000r\000m\000i\000n\000a\000l}{chapter.1}% 6
\BOOKMARK [1][-]{section.1.6}{\376\377\000L\000u\000a\000\040\000G\000l\000o\000b\000a\000l\000s}{chapter.1}% 7
\BOOKMARK [0][-]{chapter.2}{\376\377\000C\000o\000m\000p\000a\000t\000i\000b\000i\000l\000i\000t\000y\000\040\000L\000a\000y\000e\000r\000s\040\024\000C\000o\000m\000p\000u\000t\000e\000r\000C\000r\000a\000f\000t}{}% 8
\BOOKMARK [1][-]{section.2.1}{\376\377\000B\000i\000t}{chapter.2}% 9
\BOOKMARK [1][-]{section.2.2}{\376\377\000C\000o\000l\000o\000r\000s}{chapter.2}% 10
\BOOKMARK [1][-]{section.2.3}{\376\377\000T\000e\000r\000m}{chapter.2}% 11
\BOOKMARK [1][-]{section.2.4}{\376\377\000F\000i\000l\000e\000s\000y\000s\000t\000e\000m}{chapter.2}% 12
\BOOKMARK [0][-]{chapter.3}{\376\377\000C\000o\000m\000p\000a\000t\000i\000b\000i\000l\000i\000t\000y\000\040\000L\000a\000y\000e\000r\000s\040\024\000O\000p\000e\000n\000C\000o\000m\000p\000u\000t\000e\000r\000s}{}% 13
\BOOKMARK [0][-]{chapter.4}{\376\377\000P\000e\000r\000i\000p\000h\000e\000r\000a\000l\000s}{}% 14
\BOOKMARK [1][-]{section.4.1}{\376\377\000L\000i\000n\000e\000\040\000P\000r\000i\000n\000t\000e\000r}{chapter.4}% 15
\BOOKMARK [0][-]{chapter.5}{\376\377\000R\000e\000f\000e\000r\000e\000n\000c\000e\000s}{}% 16
\BOOKMARK [1][-]{section.1.3}{\376\377\000I\000n\000p\000u\000t}{chapter.1}% 4
\BOOKMARK [1][-]{section.1.4}{\376\377\000K\000e\000y\000s}{chapter.1}% 5
\BOOKMARK [1][-]{section.1.5}{\376\377\000S\000e\000c\000u\000r\000i\000t\000y}{chapter.1}% 6
\BOOKMARK [1][-]{section.1.6}{\376\377\000S\000h\000e\000l\000l}{chapter.1}% 7
\BOOKMARK [1][-]{section.1.7}{\376\377\000T\000e\000r\000m\000i\000n\000a\000l}{chapter.1}% 8
\BOOKMARK [1][-]{section.1.8}{\376\377\000L\000u\000a\000\040\000G\000l\000o\000b\000a\000l\000s}{chapter.1}% 9
\BOOKMARK [1][-]{section.1.9}{\376\377\000C\000h\000a\000n\000g\000e\000s\000\040\000f\000r\000o\000m\000\040\000G\000e\000n\000e\000r\000i\000c\000\040\000L\000u\000a\000\040\000E\000n\000v\000i\000r\000o\000n\000m\000e\000n\000t}{chapter.1}% 10
\BOOKMARK [0][-]{chapter.2}{\376\377\000C\000o\000m\000p\000a\000t\000i\000b\000i\000l\000i\000t\000y\000\040\000L\000a\000y\000e\000r\000s\040\024\000C\000o\000m\000p\000u\000t\000e\000r\000C\000r\000a\000f\000t}{}% 11
\BOOKMARK [1][-]{section.2.1}{\376\377\000B\000i\000t}{chapter.2}% 12
\BOOKMARK [1][-]{section.2.2}{\376\377\000C\000o\000l\000o\000r\000s}{chapter.2}% 13
\BOOKMARK [1][-]{section.2.3}{\376\377\000T\000e\000r\000m}{chapter.2}% 14
\BOOKMARK [1][-]{section.2.4}{\376\377\000F\000i\000l\000e\000s\000y\000s\000t\000e\000m}{chapter.2}% 15
\BOOKMARK [0][-]{chapter.3}{\376\377\000C\000o\000m\000p\000a\000t\000i\000b\000i\000l\000i\000t\000y\000\040\000L\000a\000y\000e\000r\000s\040\024\000O\000p\000e\000n\000C\000o\000m\000p\000u\000t\000e\000r\000s}{}% 16
\BOOKMARK [0][-]{chapter.4}{\376\377\000P\000e\000r\000i\000p\000h\000e\000r\000a\000l\000s}{}% 17
\BOOKMARK [1][-]{section.4.1}{\376\377\000L\000i\000n\000e\000\040\000P\000r\000i\000n\000t\000e\000r}{chapter.4}% 18
\BOOKMARK [0][-]{chapter.5}{\376\377\000R\000e\000f\000e\000r\000e\000n\000c\000e\000s}{}% 19

Binary file not shown.

View File

@@ -15,6 +15,7 @@
\usepackage{ltablex}
\usepackage{parskip}
\usepackage{tasks}
\frenchspacing
\setlength{\parindent}{0pt}
@@ -22,7 +23,9 @@
\setsecnumdepth{subsection}
%% Idioms %%
\hyphenation{Com-put-er-Craft}
\hyphenation{O-pen-Com-put-ers}
@@ -95,349 +98,47 @@
\chapter{APIs and Libraries}
\section{Filesystem}
The Filesystem API provides functions for manipulating files and the filesystem.
The path for the argument of functions blocks `\,.\,.\,' to be entered, preventing users from access outside of the computer and eliminating the potential of harming the real computer of the innocent players.
\subsection{Functions}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
fs.list(\textbf{path}: string) & table & Returns list of files in \textbf{path}, in lua table.
\\ \\
fs.exists(\textbf{path}: string) & bool & Checks if \textbf{path} exists on the filesystem.
\\ \\
fs.isDir(\textbf{path}: string) & bool & Checks if \textbf{path} is a directory.
\\ \\
fs.isFile(\textbf{path}: string) & bool & Checks if \textbf{path} is a file.
\\ \\
fs.isReadOnly(\textbf{path}: string) & bool & Checks if \textbf{path} is read only.
\\ \\
fs.getSize(\textbf{path}: string) & int & Returns a size of the file/directory, in bytes.
\\ \\
fs.mkdir(\textbf{path}: string) & bool & Create a directory to \textbf{path}. Returns \textbf{true} upon success.
\\ \\
fs.mv(\textbf{from}: string, \textbf{dest}: string) & bool & Moves the directory to the destination. Subdirectories / files will also be moved. Returns \textbf{true} upon success.
\\ \\
fs.cp(\textbf{from}: string, \textbf{dest}: string) & bool & Copies the directory to the destination. Subdirectories / files will also be copied. Returns \textbf{true} upon success.
\\ \\
fs.rm(\textbf{path}: string) & bool & Deletes the \textbf{path}. If \textbf{path} is a directory, all its members will also be deleted. Returns \textbf{true} upon success.
\\ \\
fs.concat(\textbf{p1}: string, \textbf{p2}: string) & string & Concatenates two paths and return new path as string.
\\ \\
fs.open(\textbf{path}: string, \textbf{mode}: string) & file & Opens file and returns its handle. See section \emph{File Handler} for details.
\\ \\
fs.parent(\textbf{path}: string) & string & Returs parent directory to the \textbf{path}.
\\ \\
fs.dofile(\textbf{path}: string) & nil & Loads the script on \textbf{path} and executes it.
\\ \\
fs.fetchText(\textbf{path}: string) & string & Opens the file on \textbf{path} and returns its contents as a plain text.
\end{tabularx}
\subsection{File Handler}
When it comes to opening a file, there are six modes available---r, w, a, rb, wb, ab, each represents \textbf{r}ead, \textbf{w}rite, \textbf{a}ppend and \textbf{b}yte.
\begin{tabularx}{\textwidth}{l X}
\textbf{\large Function} & \textbf{\large Description}
\\ \\
\endhead
file.close() & Closes the file. Any data wrote will be actually wrote to disk when this function is called.
\\ \\
file.flush() & (in write/append mode) Flushes the data to the file, keeps the handle available afterwards
\\ \\
\multicolumn{2}{c}{\textbf{Read mode}}
\\ \\
file.readLine() & Reads text from the file line by line. Returns string of line, or \emph{nil} if there is no next line.
\\ \\
file.readAll() & Reads and returns whole text in the file as string.
\\ \\
\multicolumn{2}{c}{\textbf{Read binary mode}}
\\ \\
file.read() & Reads single byte in the file as int, or \emph{-1} if end-of-file is reached.
\\ \\
file.readAll() & Reads and returns whole byte in the file as string.
\\ \\
\multicolumn{2}{c}{\textbf{Write/append mode}}
\\ \\
file.write(string) & Writes \textbf{string} to the file.
\\ \\
file.writeLine(string) & Writes \textbf{string} to the file and append line feed.
\\ \\
\multicolumn{2}{c}{\textbf{Write/append binary mode}}
\\ \\
file.write(int) & Writes \textbf{int} to the file.
\\ \\
file.writeBytes(string) & Writes \textbf{string} to the file and append line feed.
\end{tabularx}
\input{api_filesystem}
\section{Hexutils}
\input{api_hexutils}
The Hexutils library provides utility to convert byte value to hexadecimal string.
\subsection{Functions}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
hexutils.toHexString(\textbf{bytes}: string) & string & Converts byte array to the string of its hexadecimal representations.
\end{tabularx}
\section{Input}
\input{api_input}
\section{Keys}
\input{api_keys}
\section{Security}
The Serurity API provides functions for security purposes, such as hashing and CSPRNG\footnote{Cryptographically secure psuedo-random number generator}.
\subsection{Functions}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
security.toSHA1(string) & string & Returns SHA-256 hash of input string in array of bytes (as a string)
\\ \\
security.toSHA256(string) & string & Returns SHA-1 hash of input string in array of bytes
\\ \\
security.toMD5(string) & string & Returns MD-5 hash of input string in array of bytes
\\ \\
security.randomBytes(\textbf{len}: int) & string & Returns byte array of random values in desired \textbf{len}gth.
\\ \\
security.decodeBase64(string) & string & Decodes Base64 string and returns the result as string.
\\ \\
security.encodeBase64(string) & string & Encodes input string as Base64 format and returns the result as array of bytes.
\end{tabularx}
\input{api_security}
\section{Shell}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
shell.run(\textbf{path}: string) & nil & Loads the script on \textbf{path} and executes it.
\end{tabularx}
\input{api_shell}
\section{Terminal}
The Terminal API provides functions for sending text to the terminals, and drawing text-mode graphics. The API expects connected terminal to use Codepage 437. See section \emph{Codepage} for details.
\subsection{Functions}
Note: cursor coordinates starts from one, not zero.
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
term.write(string) & nil & Writes string to the current cursor position. Line feed is not appended.
\\ \\
term.print(string) & nil & Writes string to the current cursor position and make a new line.
\\ \\
term.newLine() & nil & Make a new line.
\\ \\
term.moveCursor(\textbf{x}: int) & nil & Moves cursor horizontally, starting from 1.
\\ \\
term.width() & int & Returns the width of the terminal. Graphic terminals also can use this.
\\ \\
term.scroll(\textbf{n}: int) & nil & Make a new line \textbf{n} times.
\\ \\
term.isTeletype() & bool & Returns \textbf{true} if the terminal is teletype.
\\ \\
\multicolumn{3}{c}{\textbf{Graphic terminals only}}
\\ \\
term.emit(\textbf{c}: int, \textbf{x}: int, \textbf{y}: int) & nil & Emits \textbf{c} into (\textbf{x}, \textbf{y}), control sequence will not be processed and printed as symbols instead. Cursor will not be moved.
\\ \\
term.emitRaw(\textbf{bufferChar}: int) & nil & Emits \textbf{bufferChar} into into (\textbf{x}, \textbf{y}). Buffer char means a single character actually stored into the screen buffer, has four bits for back- and foreground colours respectively, and eight bits for a letter.
\\ \\
term.emitString(\textbf{s}, \textbf{x}: int, \textbf{y}: int) & nil & Emits \textbf{s} (a string) into (\textbf{x}, \textbf{y}), printing control sequences as symbols. Cursor will not be moved.
\\ \\
\begin{tabular}[t]{@{}l@{}}term.resetColour()\\term.resetColor()\end{tabular} & nil & Resets any colour changes to the defaults.
\\ \\
term.clear() & nil & Clears whole screen buffer and move cursor to (1, 1)
\\ \\
term.clearLine() & nil & Clears current line on the screen buffer, does not moves cursor.
\\ \\
term.setCursor(\textbf{x}: int, \textbf{y}: int) & nil & Moves cursor to (\textbf{x}, \textbf{y})
\\ \\
term.getCursor() & int, int & Returns current coordinates of the cursor.
\\ \\
term.getX() & int & Returns X coordinate of the cursor.
\\ \\
term.getY() & int & Returns Y coordinate of the cursor.
\\ \\
term.setX(int) & nil & Sets X coordinate of the cursor.
\\ \\
term.setY(int) & nil & Sets Y coordinate of the cursor.
\\ \\
term.setCursorBlink(bool) & nil & Sets cursor blinking. \textbf{true} makes the cursor blink.
\\ \\
term.size() & int, int & Returns width and height of the terminal.
\\ \\
term.height() & int & Returns height of the terminal.
\\ \\
term.isCol() & bool & Returns if the terminal supports colour.
\\ \\
term.setForeCol(\textbf{col}: int) & nil & Sets foreground colour to \textbf{col}
\\ \\
term.setBackCol(\textbf{col}: int) & nil & Sets background colour to \textbf{col}.
\\ \\
term.foreCol() & int & Returns current foreground colour.
\\ \\
term.backCol() & int & Returns current background colour.
\end{tabularx}
\subsection{Standard Colours}
\begin{tabularx}{\textwidth}{c l c l c l c l}
0 & \textcolor{black}{Black} & 1 & White & 2 & \textcolor{dimgrey}{Dim grey} & 3 & \textcolor{brightgrey}{Bright grey}
\\ \\
4 & \textcolor{yellow}{Yellow} & 5 & \textcolor{orange}{Orange} & 6 & \textcolor{red}{Red} & 7 & \textcolor{magenta}{Magenta}
\\ \\
8 & \textcolor{purple}{Purple} & 9 & \textcolor{blue}{Blue} & 10 & \textcolor{cyan}{Cyan} & 11 & \textcolor{lime}{Lime}
\\ \\
12 & \textcolor{green}{Green} & 13 & \textcolor{darkgreen}{Dark green} & 14 & \textcolor{brown}{Brown} & 15 & \textcolor{tan}{Tan}
\end{tabularx}
Non-colour terminals support colour index of 0--3.
\subsection{Codepage}
{\center\includegraphics[height=21em]{mda.pdf}}
Character 0x9D (currency symbol) and 0xFA (middle dot) can be accessed with following Lua constants: \emph{MONEYSYM} and \emph{MIDDOT}.
\subsection{Accepted Control Sequences}
\begin{tabularx}{\textwidth}{c X c X}
\textbf{\large No.} & \textbf{\large Description} & \textbf{\large No.} & \textbf{\large Description}
\\ \\
\endhead
7 & BEL. Emits short beep. & 8 & BS. Moves cursor to left 1 character.
\\ \\
9 & TAB. Inserts appropriate horizontal space. Tab size is variable. & 10 & LF. Prints a new line.
\\ \\
12 & FF. Clears everything in screen buffer and moves cursor to (1, 1) & 13 & CR. Moves x coordinate of cursor to 1.
\\ \\
16 & DLE. Sets foreground colour to the default STDERR colour. & 127 & DEL. Backspace and deletes one character.
\\ \\
17 & DC1. Sets foreground colour to 0. (black) & 18 & DC2. Sets foreground colour to 1. (white)
\\ \\
19 & DC3. Sets foreground colour to 2. (dim grey) & 20 & DC4. Sets foreground colour to 3. (bright grey)
\end{tabularx}
\input{api_terminal}
\section{Lua Globals}
\input{luaglobals}
ROMBASIC adds global functions and constants for operability.
\subsection{Functions}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
\unemph{\_G.}runScript(\textbf{fun}: str, \textbf{env}: str) & nil & Runs Lua script \textbf{fun} with the environment tag \textbf{env}.
\\ \\
\unemph{\_G.}getMem() & int & Returns the current memory usage in bytes.
\\ \\
\unemph{\_G.}getTotalMem() & int & Returns the total size of the memory installed in the computer, in bytes.
\\ \\
\unemph{\_G.}getFreeMem() & int & Returns the amount of free memory on the computer.
\end{tabularx}
\subsection{Constants}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Name} & \textbf{\large Type} & \textbf{\large Description}
\\ \\
\endhead
\unemph{\_G.}MONEYSYM & string & Currency symbol used in the world. Code 0x9D
\\ \\
\unemph{\_G.}MIDDOT & string & Middle dot used in typography. Code 0xFA (note: 0xF9 is a Dot Product used in Mathematics)
\\ \\
\unemph{\_G.}DC1 & string & Ascii control sequence DC1. Used to change foreground colour to black.
\\ \\
\unemph{\_G.}DC2 & string & Ascii control sequence DC2. Used to change foreground colour to white.
\\ \\
\unemph{\_G.}DC3 & string & Ascii control sequence DC3. Used to change foreground colour to dim grey.
\\ \\
\unemph{\_G.}DC4 & string & Ascii control sequence DC4. Used to change foreground colour to bright grey.
\\ \\
\unemph{\_G.}DLE & string & Ascii control sequence DLE. Used to change foreground colour to terminal's default error text colour.
\\ \\
\_COMPUTER.prompt & string & Default text for prompt input indicator.
\\ \\
\_COMPUTER.verbose & bool & Sets whether print debug information to the console.
\\ \\
\_COMPUTER.loadedCLayer & table & List of names of compatibility layers has been loaded.
\\ \\
\_COMPUTER.bootloader & string & Path to the boot file. Should point to the EFI (/boot/efi).
\\ \\
\_COMPUTER.OEM & string & Manufacturer of the computer. If you \emph{are} a manufacturer, you may want to fill in this variable with your own company's name.
\end{tabularx}
\section{Changes from Generic Lua Environment}
\input{luadifferences}
\chapter[Compatibility Layers---ComputerCraft]{{\LARGE Compatibility Layers} \\ ComputerCraft}
\section{Bit}
The Bit API is for manipulating numbers using bitwise binary operations. The ROMBASIC already comes with Lua's bit32 library so make sure to use that for your casual usage.
\subsection{Functions}
\begin{tabularx}{\textwidth}{l X}
\textbf{\large Function} & \textbf{\large Notes}
\\ \\
\endhead
bit.blshift(n, bits) & Alias of bit32.lshift(n, bits)
\\ \\
bit.brshift(n, bits) & Alias of bit32.arshift(n, bits)
\\ \\
bit.blogic\_rshift(n, bits) & Alias of bit32.brshift(n, bits)
\\ \\
bit.bxor(m, n) & Alias of bit32.bxor(m, n)
\\ \\
bit.bor(m, n) & Alias of bit32.bor(m, n)
\\ \\
bit.band(m, n) & Alias of bit32.band(m, n)
\\ \\
bit.bnot(n) & Alias of bit32.bnot(n)
\end{tabularx}
\input{cc_bit}
\section{Colors}
The Colors API allows you to manipulate sets of colors. This is useful in colors on Advanced Computers and Advanced Monitors. British spellings are also supported.
\subsection{Constants}
When the colours are used in ComputerCraft's Term API, nearest console colours will be used. Below is the table of colours coded with their substitutions.
\begin{tabularx}{\textwidth}{l l l l}
colors.white & colors.\textcolor{orange}{orange} & colors.\textcolor{magenta}{magenta} & colors.\textcolor{cyan}{lightBlue}
\\ \\
colors.\textcolor{yellow}{yellow} & colors.\textcolor{lime}{lime} & colors.\textcolor{tan}{pink} & colors.\textcolor{dimgrey}{gray}
\\ \\
colors.\textcolor{brightgrey}{lightGray} & colors.\textcolor{cyan}{cyan} & colors.\textcolor{purple}{purple} & colors.\textcolor{blue}{blue}
\\ \\
colors.\textcolor{brown}{brown} & colors.\textcolor{green}{green} & colors.\textcolor{red}{red} & colors.\textcolor{black}{black}
\end{tabularx}
Note that pink is understood as \textcolor{tan}{tan} when it is used, lightBlue and cyan are merged to \textcolor{cyan}{cyan}.
\subsection{Functions}
All three functions are not supported, as there is no bundled cable thus there is no use of them.
\input{cc_colors}
\section{Term}
\section{Filesystem}
\chapter[Compatibility Layers---OpenComputers]{{\LARGE Compatibility Layers} \\ OpenComputers}
@@ -445,25 +146,9 @@ All three functions are not supported, as there is no bundled cable thus there i
\chapter{Peripherals}
\section{Line Printer}
\input{peri_lp}
The line printer is a printer that operates on line basis. It only prints text in line-by-line, hence the name, on almost endlessly long roll of papers; it has no notion of page, it just prints. If you want some pages to keep, you must tear them out yourself.
Line printers do not work indefinitely; ignoring the obvious depletion of ink, belt for loading paper will be out of service on about 50 000 lines of printing, give or take a few, or paper will jam if the printer had struck with the unluckiness.
\subsection{Functions}
\begin{tabularx}{\textwidth}{l l X}
\textbf{\large Function} & \textbf{\large Return} & \textbf{\large Description}
\\ \\
\endhead
lp.print(string) & nil & Prints a line of string.
\\ \\
lp.scroll(\textbf{n}: int) & nil & Scrolls the paper by \textbf{n} lines.
\\ \\
lp.status() & int & Returns a status of the line printer.
\\ \\
lp.reset() & nil & Resets the line printer.
\end{tabularx}
\chapter{References}

View File

@@ -4,27 +4,32 @@
\contentsline {subsection}{\numberline {1.1.2}File Handler}{7}{subsection.1.1.2}
\contentsline {section}{\numberline {1.2}Hexutils}{9}{section.1.2}
\contentsline {subsection}{\numberline {1.2.1}Functions}{9}{subsection.1.2.1}
\contentsline {section}{\numberline {1.3}Security}{10}{section.1.3}
\contentsline {section}{\numberline {1.3}Input}{10}{section.1.3}
\contentsline {subsection}{\numberline {1.3.1}Functions}{10}{subsection.1.3.1}
\contentsline {section}{\numberline {1.4}Shell}{11}{section.1.4}
\contentsline {section}{\numberline {1.5}Terminal}{12}{section.1.5}
\contentsline {section}{\numberline {1.4}Keys}{11}{section.1.4}
\contentsline {subsection}{\numberline {1.4.1}Accepted Key Names}{11}{subsection.1.4.1}
\contentsline {section}{\numberline {1.5}Security}{12}{section.1.5}
\contentsline {subsection}{\numberline {1.5.1}Functions}{12}{subsection.1.5.1}
\contentsline {subsection}{\numberline {1.5.2}Standard Colours}{14}{subsection.1.5.2}
\contentsline {subsection}{\numberline {1.5.3}Codepage}{15}{subsection.1.5.3}
\contentsline {subsection}{\numberline {1.5.4}Accepted Control Sequences}{15}{subsection.1.5.4}
\contentsline {section}{\numberline {1.6}Lua Globals}{17}{section.1.6}
\contentsline {subsection}{\numberline {1.6.1}Functions}{17}{subsection.1.6.1}
\contentsline {subsection}{\numberline {1.6.2}Constants}{17}{subsection.1.6.2}
\contentsline {chapter}{\chapternumberline {2}Compatibility Layers---ComputerCraft}{19}{chapter.2}
\contentsline {section}{\numberline {2.1}Bit}{20}{section.2.1}
\contentsline {subsection}{\numberline {2.1.1}Functions}{20}{subsection.2.1.1}
\contentsline {section}{\numberline {2.2}Colors}{21}{section.2.2}
\contentsline {subsection}{\numberline {2.2.1}Constants}{21}{subsection.2.2.1}
\contentsline {subsection}{\numberline {2.2.2}Functions}{21}{subsection.2.2.2}
\contentsline {section}{\numberline {2.3}Term}{22}{section.2.3}
\contentsline {section}{\numberline {2.4}Filesystem}{23}{section.2.4}
\contentsline {chapter}{\chapternumberline {3}Compatibility Layers---OpenComputers}{25}{chapter.3}
\contentsline {chapter}{\chapternumberline {4}Peripherals}{27}{chapter.4}
\contentsline {section}{\numberline {4.1}Line Printer}{28}{section.4.1}
\contentsline {subsection}{\numberline {4.1.1}Functions}{28}{subsection.4.1.1}
\contentsline {chapter}{\chapternumberline {5}References}{29}{chapter.5}
\contentsline {section}{\numberline {1.6}Shell}{13}{section.1.6}
\contentsline {section}{\numberline {1.7}Terminal}{14}{section.1.7}
\contentsline {subsection}{\numberline {1.7.1}Functions}{14}{subsection.1.7.1}
\contentsline {subsection}{\numberline {1.7.2}Standard Colours}{16}{subsection.1.7.2}
\contentsline {subsection}{\numberline {1.7.3}Codepage}{17}{subsection.1.7.3}
\contentsline {subsection}{\numberline {1.7.4}Accepted Control Sequences}{17}{subsection.1.7.4}
\contentsline {section}{\numberline {1.8}Lua Globals}{18}{section.1.8}
\contentsline {subsection}{\numberline {1.8.1}Functions}{18}{subsection.1.8.1}
\contentsline {subsection}{\numberline {1.8.2}Constants}{18}{subsection.1.8.2}
\contentsline {section}{\numberline {1.9}Changes from Generic Lua Environment}{20}{section.1.9}
\contentsline {chapter}{\chapternumberline {2}Compatibility Layers---ComputerCraft}{21}{chapter.2}
\contentsline {section}{\numberline {2.1}Bit}{22}{section.2.1}
\contentsline {subsection}{\numberline {2.1.1}Functions}{22}{subsection.2.1.1}
\contentsline {section}{\numberline {2.2}Colors}{23}{section.2.2}
\contentsline {subsection}{\numberline {2.2.1}Constants}{23}{subsection.2.2.1}
\contentsline {subsection}{\numberline {2.2.2}Functions}{23}{subsection.2.2.2}
\contentsline {section}{\numberline {2.3}Term}{24}{section.2.3}
\contentsline {section}{\numberline {2.4}Filesystem}{25}{section.2.4}
\contentsline {chapter}{\chapternumberline {3}Compatibility Layers---OpenComputers}{27}{chapter.3}
\contentsline {chapter}{\chapternumberline {4}Peripherals}{29}{chapter.4}
\contentsline {section}{\numberline {4.1}Line Printer}{30}{section.4.1}
\contentsline {subsection}{\numberline {4.1.1}Functions}{30}{subsection.4.1.1}
\contentsline {chapter}{\chapternumberline {5}References}{31}{chapter.5}