all repos — h3rald @ 697db3139c492616b54810b9738da5e94a8aadbd

The sources of https://h3rald.com

Updates
h3rald h3rald@h3rald.com
Sun, 30 Jul 2023 20:16:00 +0000
commit

697db3139c492616b54810b9738da5e94a8aadbd

parent

df5d4f9c922f9992df9f2e9400dab8d53f9273a9

A assets/images/webring.icon.black.svg

@@ -0,0 +1,1 @@

+<svg fill="none" height="300" stroke="#000" stroke-linecap="square" stroke-width="28" width="300" xmlns="http://www.w3.org/2000/svg"><path d="M201.962 210a60 60 0 10-103.924-60l-50 86.603"/><path d="M98.038 210a60 60 0 10103.924-60l-50-86.603"/><path d="M150 120a60 60 0 100 120h100"/></svg>
A assets/images/webring.icon.white.svg

@@ -0,0 +1,1 @@

+<svg fill="none" height="300" stroke="#fff" stroke-linecap="square" stroke-width="28" width="300" xmlns="http://www.w3.org/2000/svg"><path d="M201.962 210a60 60 0 10-103.924-60l-50 86.603"/><path d="M98.038 210a60 60 0 10103.924-60l-50-86.603"/><path d="M150 120a60 60 0 100 120h100"/></svg>
M assets/min/Min_DeveloperGuide.htmassets/min/Min_DeveloperGuide.htm

@@ -7462,9 +7462,9 @@

<p>You can download one of the following pre-built min binaries:</p> <ul> -<li><a href="https://github.com/h3rald/min/releases/download/v0.37.0/min_v0.37.0_macosx_x64.zip">min v0.37.0 for macOS (x64)</a></li> -<li><a href="https://github.com/h3rald/min/releases/download/v0.37.0/min_v0.37.0_windows_x64.zip">min v0.37.0 for Windows (x64)</a></li> -<li><a href="https://github.com/h3rald/min/releases/download/v0.37.0/min_v0.37.0_linux_x64.zip">min v0.37.0 for Linux (x64)</a></li> +<li><a href="https://github.com/h3rald/min/releases/download/v0.38.0/min_v0.38.0_macosx_x64.zip">min v0.38.0 for macOS (x64)</a></li> +<li><a href="https://github.com/h3rald/min/releases/download/v0.38.0/min_v0.38.0_windows_x64.zip">min v0.38.0 for Windows (x64)</a></li> +<li><a href="https://github.com/h3rald/min/releases/download/v0.38.0/min_v0.38.0_linux_x64.zip">min v0.38.0 for Linux (x64)</a></li> </ul>

@@ -7542,7 +7542,7 @@ <h3>Running the min Shell<a href="#document-top" title="Go to top"></a></h3>

<p>To start the min shell, run <span class="cmd">min</span> with no arguments. You will be presented with a prompt displaying the path to the current directory:</p> -<div class="min-terminal"><p>min shell v$versio +<div class="min-terminal"><p>min shell v0.38.0 <span class="prompt">[/Users/h3rald/test]$</span></p></div> <p>You can type min code and press <span class="kbd">ENTER</span> to evaluate it immediately:</p>

@@ -12402,7 +12402,7 @@

<p>Stops the currently-running HTTP server. This operator should be used within an HTTP server handler quotation.</p></div> </div> <div id="footer"> - <p><span class="copy"></span> Fabio Cevasco &ndash; July 21, 2023</p> + <p><span class="copy"></span> Fabio Cevasco &ndash; July 23, 2023</p> <p><span>Powered by</span> <a href="https://h3rald.com/hastyscribe"><span class="hastyscribe"></span></a></p> </div> </div>
A assets/minline/minline.html

@@ -0,0 +1,787 @@

+<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<!-- This file is generated by Nim. --> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + +<meta name="viewport" content="width=device-width, initial-scale=1.0"> + +<!-- Favicon --> +<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/> +<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII="> + +<!-- Google fonts --> +<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/> +<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/> + +<!-- CSS --> +<title>minline</title> +<link rel="stylesheet" type="text/css" href="nimdoc.out.css"> + +<script type="text/javascript" src="dochack.js"></script> + +<script type="text/javascript"> +function main() { + var pragmaDots = document.getElementsByClassName("pragmadots"); + for (var i = 0; i < pragmaDots.length; i++) { + pragmaDots[i].onclick = function(event) { + // Hide tease + event.target.parentNode.style.display = "none"; + // Show actual + event.target.parentNode.nextElementSibling.style.display = "inline"; + } + } + + function switchTheme(e) { + if (e.target.checked) { + document.documentElement.setAttribute('data-theme', 'dark'); + localStorage.setItem('theme', 'dark'); + } else { + document.documentElement.setAttribute('data-theme', 'light'); + localStorage.setItem('theme', 'light'); + } + } + + const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]'); + if (toggleSwitch !== null) { + toggleSwitch.addEventListener('change', switchTheme, false); + } + + var currentTheme = localStorage.getItem('theme'); + if (!currentTheme && window.matchMedia('(prefers-color-scheme: dark)').matches) { + currentTheme = 'dark'; + } + if (currentTheme) { + document.documentElement.setAttribute('data-theme', currentTheme); + + if (currentTheme === 'dark' && toggleSwitch !== null) { + toggleSwitch.checked = true; + } + } +} + +window.addEventListener('DOMContentLoaded', main); +</script> + +</head> +<body> +<div class="document" id="documentId"> + <div class="container"> + <h1 class="title">minline</h1> + <div class="row"> + <div class="three columns"> + <div class="theme-switch-wrapper"> + <label class="theme-switch" for="checkbox"> + <input type="checkbox" id="checkbox" /> + <div class="slider round"></div> + </label> + &nbsp;&nbsp;&nbsp; <em>Dark Mode</em> + </div> + <div id="global-links"> + <ul class="simple"> + <li> + <a href="theindex.html">Index</a> + </li> + </ul> + </div> + <div id="searchInputDiv"> + Search: <input type="text" id="searchInput" + onkeyup="search()" /> + </div> + <div> + Group by: + <select onchange="groupBy(this.value)"> + <option value="section">Section</option> + <option value="type">Type</option> + </select> + </div> + <ul class="simple simple-toc" id="toc-list"> +<li> + <a class="reference reference-toplevel" href="#7" id="57">Types</a> + <ul class="simple simple-toc-section"> + <li><a class="reference" href="#Key" + title="Key = int">Key</a></li> + <li><a class="reference" href="#KeyCallback" + title="KeyCallback = proc (ed: var LineEditor) {.closure, gcsafe.}">KeyCallback</a></li> + <li><a class="reference" href="#KeySeq" + title="KeySeq = seq[Key]">KeySeq</a></li> + <li><a class="reference" href="#Line" + title="Line = object + text: string + position: int">Line</a></li> + <li><a class="reference" href="#LineEditor" + title="LineEditor = object + completionCallback*: proc (ed: LineEditor): seq[string] {.closure, gcsafe.} + history: LineHistory + line: Line + mode: LineEditorMode">LineEditor</a></li> + <li><a class="reference" href="#LineEditorError" + title="LineEditorError = ref Exception">LineEditorError</a></li> + <li><a class="reference" href="#LineEditorMode" + title="LineEditorMode = enum + mdInsert, mdReplace">LineEditorMode</a></li> + <li><a class="reference" href="#LineError" + title="LineError = ref Exception">LineError</a></li> + <li><a class="reference" href="#LineHistory" + title="LineHistory = object + file: string + tainted: bool + position: int + queue: Deque[string] + max: int">LineHistory</a></li> + + </ul> +</li> +<li> + <a class="reference reference-toplevel" href="#8" id="58">Vars</a> + <ul class="simple simple-toc-section"> + <li><a class="reference" href="#KEYMAP" + title="KEYMAP: CritBitTree[KeyCallback]">KEYMAP</a></li> + <li><a class="reference" href="#KEYNAMES" + title="KEYNAMES: array[0 .. 31, string]">KEYNAMES</a></li> + <li><a class="reference" href="#KEYSEQS" + title="KEYSEQS: CritBitTree[KeySeq]">KEYSEQS</a></li> + + </ul> +</li> +<li> + <a class="reference reference-toplevel" href="#10" id="60">Consts</a> + <ul class="simple simple-toc-section"> + <li><a class="reference" href="#CTRL" + title="CTRL = {0..31}">CTRL</a></li> + <li><a class="reference" href="#DIGIT" + title="DIGIT = {48..57}">DIGIT</a></li> + <li><a class="reference" href="#ESCAPES" + title="ESCAPES = {27}">ESCAPES</a></li> + <li><a class="reference" href="#LETTER" + title="LETTER = {65..122}">LETTER</a></li> + <li><a class="reference" href="#LOWERLETTER" + title="LOWERLETTER = {97..122}">LOWERLETTER</a></li> + <li><a class="reference" href="#PRINTABLE" + title="PRINTABLE = {32..126}">PRINTABLE</a></li> + <li><a class="reference" href="#UPPERLETTER" + title="UPPERLETTER = {65..90}">UPPERLETTER</a></li> + + </ul> +</li> +<li> + <a class="reference reference-toplevel" href="#12" id="62">Procs</a> + <ul class="simple simple-toc-section"> + <ul class="simple nested-toc-section">back + <li><a class="reference" href="#back%2CLineEditor%2Cint" + title="back(ed: var LineEditor; n = 1)">back(ed: var LineEditor; n = 1)</a></li> + + </ul> + <ul class="simple nested-toc-section">changeLine + <li><a class="reference" href="#changeLine%2CLineEditor%2Cstring" + title="changeLine(ed: var LineEditor; s: string)">changeLine(ed: var LineEditor; s: string)</a></li> + + </ul> + <ul class="simple nested-toc-section">clearLine + <li><a class="reference" href="#clearLine%2CLineEditor" + title="clearLine(ed: var LineEditor)">clearLine(ed: var LineEditor)</a></li> + + </ul> + <ul class="simple nested-toc-section">completeLine + <li><a class="reference" href="#completeLine%2CLineEditor" + title="completeLine(ed: var LineEditor): int">completeLine(ed: var LineEditor): int</a></li> + + </ul> + <ul class="simple nested-toc-section">deleteNext + <li><a class="reference" href="#deleteNext%2CLineEditor" + title="deleteNext(ed: var LineEditor)">deleteNext(ed: var LineEditor)</a></li> + + </ul> + <ul class="simple nested-toc-section">deletePrevious + <li><a class="reference" href="#deletePrevious%2CLineEditor" + title="deletePrevious(ed: var LineEditor)">deletePrevious(ed: var LineEditor)</a></li> + + </ul> + <ul class="simple nested-toc-section">forward + <li><a class="reference" href="#forward%2CLineEditor%2Cint" + title="forward(ed: var LineEditor; n = 1)">forward(ed: var LineEditor; n = 1)</a></li> + + </ul> + <ul class="simple nested-toc-section">getchr + <li><a class="reference" href="#getchr" + title="getchr(): cint">getchr(): cint</a></li> + + </ul> + <ul class="simple nested-toc-section">goToEnd + <li><a class="reference" href="#goToEnd%2CLineEditor" + title="goToEnd(ed: var LineEditor)">goToEnd(ed: var LineEditor)</a></li> + + </ul> + <ul class="simple nested-toc-section">goToStart + <li><a class="reference" href="#goToStart%2CLineEditor" + title="goToStart(ed: var LineEditor)">goToStart(ed: var LineEditor)</a></li> + + </ul> + <ul class="simple nested-toc-section">historyAdd + <li><a class="reference" href="#historyAdd%2CLineEditor" + title="historyAdd(ed: var LineEditor; force = false)">historyAdd(ed: var LineEditor; force = false)</a></li> + + </ul> + <ul class="simple nested-toc-section">historyFlush + <li><a class="reference" href="#historyFlush%2CLineEditor" + title="historyFlush(ed: var LineEditor)">historyFlush(ed: var LineEditor)</a></li> + + </ul> + <ul class="simple nested-toc-section">historyInit + <li><a class="reference" href="#historyInit%2Cint%2Cstring" + title="historyInit(size = 256; file: string = &quot;&quot;): LineHistory">historyInit(size = 256; file: string = &quot;&quot;): LineHistory</a></li> + + </ul> + <ul class="simple nested-toc-section">historyNext + <li><a class="reference" href="#historyNext%2CLineEditor" + title="historyNext(ed: var LineEditor)">historyNext(ed: var LineEditor)</a></li> + + </ul> + <ul class="simple nested-toc-section">historyPrevious + <li><a class="reference" href="#historyPrevious%2CLineEditor" + title="historyPrevious(ed: var LineEditor)">historyPrevious(ed: var LineEditor)</a></li> + + </ul> + <ul class="simple nested-toc-section">initEditor + <li><a class="reference" href="#initEditor%2Cint%2Cstring" + title="initEditor(mode = mdInsert; historySize = 256; historyFile: string = &quot;&quot;): LineEditor">initEditor(mode = mdInsert; historySize = 256; historyFile: string = &quot;&quot;): LineEditor</a></li> + + </ul> + <ul class="simple nested-toc-section">lineText + <li><a class="reference" href="#lineText%2CLineEditor" + title="lineText(ed: LineEditor): string">lineText(ed: LineEditor): string</a></li> + + </ul> + <ul class="simple nested-toc-section">password + <li><a class="reference" href="#password%2CLineEditor%2Cstring" + title="password(ed: var LineEditor; prompt = &quot;&quot;): string">password(ed: var LineEditor; prompt = &quot;&quot;): string</a></li> + + </ul> + <ul class="simple nested-toc-section">printChar + <li><a class="reference" href="#printChar%2CLineEditor%2Cint" + title="printChar(ed: var LineEditor; c: int)">printChar(ed: var LineEditor; c: int)</a></li> + + </ul> + <ul class="simple nested-toc-section">putchr + <li><a class="reference" href="#putchr%2Ccint" + title="putchr(c: cint)">putchr(c: cint)</a></li> + + </ul> + <ul class="simple nested-toc-section">readLine + <li><a class="reference" href="#readLine%2CLineEditor%2Cstring" + title="readLine(ed: var LineEditor; prompt = &quot;&quot;; hidechars = false): string">readLine(ed: var LineEditor; prompt = &quot;&quot;; hidechars = false): string</a></li> + + </ul> + + </ul> +</li> + +</ul> + + </div> + + <div class="nine columns" id="content"> + <div id="tocRoot"></div> + + <p class="module-desc"><p>This module provides a simple, limited but fully-functional line editing library written in pure Nim.</p> +<p>To use this library, you must first initialize a <strong>LineEditor</strong> object using the <strong>initEditor</strong> method, and then use the <strong>readLine</strong> method to capture standard input instead of <strong>stdout.readLine</strong>:</p> +<pre class="listing"><span class="Keyword">var</span> <span class="Identifier">ed</span> <span class="Operator">=</span> <span class="Identifier">initEditor</span><span class="Punctuation">(</span><span class="Identifier">historyFile</span> <span class="Operator">=</span> <span class="StringLit">&quot;history.txt&quot;</span><span class="Punctuation">)</span> +<span class="Keyword">while</span> <span class="Identifier">true</span><span class="Punctuation">:</span> + <span class="Keyword">let</span> <span class="Identifier">str</span> <span class="Operator">=</span> <span class="Identifier">ed</span><span class="Operator">.</span><span class="Identifier">readLine</span><span class="Punctuation">(</span><span class="StringLit">&quot;-&gt; &quot;</span><span class="Punctuation">)</span> + <span class="Identifier">echo</span> <span class="StringLit">&quot;You typed: &quot;</span><span class="Punctuation">,</span> <span class="Identifier">str</span></pre><p>Optionally, you can also configure custom key bindings for keys and key sequences:</p> +<pre class="listing"><span class="Identifier">KEYMAP</span><span class="Punctuation">[</span><span class="StringLit">&quot;ctrl+k&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="Keyword">proc</span><span class="Punctuation">(</span><span class="Identifier">ed</span><span class="Punctuation">:</span> <span class="Keyword">var</span> <span class="Identifier">LineEditor</span><span class="Punctuation">)</span> <span class="Operator">=</span> + <span class="Identifier">ed</span><span class="Operator">.</span><span class="Identifier">clearLine</span><span class="Punctuation">(</span><span class="Punctuation">)</span></pre><p>Additionally, you can also configure a <strong>completionCallback</strong> proc to trigger auto-completion by pressing TAB:</p> +<pre class="listing"><span class="Identifier">ed</span><span class="Operator">.</span><span class="Identifier">completionCallback</span> <span class="Operator">=</span> <span class="Keyword">proc</span><span class="Punctuation">(</span><span class="Identifier">ed</span><span class="Punctuation">:</span> <span class="Identifier">LineEditor</span><span class="Punctuation">)</span><span class="Punctuation">:</span> <span class="Identifier">seq</span><span class="Punctuation">[</span><span class="Identifier">string</span><span class="Punctuation">]</span> <span class="Operator">=</span> + <span class="Keyword">return</span> <span class="Operator">@</span><span class="Punctuation">[</span><span class="StringLit">&quot;copy&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;list&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;delete&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;move&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;remove&quot;</span><span class="Punctuation">]</span></pre><p><strong>Note</strong> When compared to the readline or linenoise libraries, this module has the following limitations:</p> +<ul class="simple"><li>It is only possible to edit one line of text at a time. When using the <strong>readLine</strong> method, it will not be possible to physically go to the next line (this simplifies things a bit...).</li> +<li>No UTF8 support, only ASCII characters are supported.</li> +<li>No support for colorized output.</li> +<li>Only limited support for Emacs keybindings, no support for Vi mode and Vi keybindings.</li> +</ul> +</p> + <div class="section" id="7"> +<h1><a class="toc-backref" href="#7">Types</a></h1> +<dl class="item"> +<div id="Key"> +<dt><pre><a href="minline.html#Key"><span class="Identifier">Key</span></a> <span class="Other">=</span> <span class="Identifier">int</span></pre></dt> +<dd> + +The ASCII code of a keyboard key. + +</dd> +</div> +<div id="KeyCallback"> +<dt><pre><a href="minline.html#KeyCallback"><span class="Identifier">KeyCallback</span></a> <span class="Other">=</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">)</span> {.<span class="Identifier">closure</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">gcsafe</span></span>.}</pre></dt> +<dd> + +A proc that can be bound to a key or a key sequence to access line editing functionalities. + +</dd> +</div> +<div id="KeySeq"> +<dt><pre><a href="minline.html#KeySeq"><span class="Identifier">KeySeq</span></a> <span class="Other">=</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="minline.html#Key"><span class="Identifier">Key</span></a><span class="Other">]</span></pre></dt> +<dd> + +A sequence of one or more Keys. + +</dd> +</div> +<div id="Line"> +<dt><pre><a href="minline.html#Line"><span class="Identifier">Line</span></a> <span class="Other">=</span> <span class="Keyword">object</span> + <span class="Identifier">text</span><span class="Other">:</span> <span class="Identifier">string</span> + <span class="Identifier">position</span><span class="Other">:</span> <span class="Identifier">int</span> +</pre></dt> +<dd> + +An object representing a line of text. + +</dd> +</div> +<div id="LineEditor"> +<dt><pre><a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a> <span class="Other">=</span> <span class="Keyword">object</span> + <span class="Identifier">completionCallback</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span> {.<span class="Identifier">closure</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">gcsafe</span></span>.} + <span class="Identifier">history</span><span class="Other">:</span> <a href="minline.html#LineHistory"><span class="Identifier">LineHistory</span></a> + <span class="Identifier">line</span><span class="Other">:</span> <a href="minline.html#Line"><span class="Identifier">Line</span></a> + <span class="Identifier">mode</span><span class="Other">:</span> <a href="minline.html#LineEditorMode"><span class="Identifier">LineEditorMode</span></a> +</pre></dt> +<dd> + +An object representing a line editor, used to process text typed in the terminal. + +</dd> +</div> +<div id="LineEditorError"> +<dt><pre><a href="minline.html#LineEditorError"><span class="Identifier">LineEditorError</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Identifier">Exception</span></pre></dt> +<dd> + +An error occured in the LineEditor. + +</dd> +</div> +<div id="LineEditorMode"> +<dt><pre><a href="minline.html#LineEditorMode"><span class="Identifier">LineEditorMode</span></a> <span class="Other">=</span> <span class="Keyword">enum</span> + <span class="Identifier">mdInsert</span><span class="Other">,</span> <span class="Identifier">mdReplace</span></pre></dt> +<dd> + +The <em>mode</em> a LineEditor operates in (insert or replace). + +</dd> +</div> +<div id="LineError"> +<dt><pre><a href="minline.html#LineError"><span class="Identifier">LineError</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Identifier">Exception</span></pre></dt> +<dd> + +A generic minline error. + +</dd> +</div> +<div id="LineHistory"> +<dt><pre><a href="minline.html#LineHistory"><span class="Identifier">LineHistory</span></a> <span class="Other">=</span> <span class="Keyword">object</span> + <span class="Identifier">file</span><span class="Other">:</span> <span class="Identifier">string</span> + <span class="Identifier">tainted</span><span class="Other">:</span> <span class="Identifier">bool</span> + <span class="Identifier">position</span><span class="Other">:</span> <span class="Identifier">int</span> + <span class="Identifier">queue</span><span class="Other">:</span> <span class="Identifier">Deque</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span> + <span class="Identifier">max</span><span class="Other">:</span> <span class="Identifier">int</span> +</pre></dt> +<dd> + +An object representing the history of all commands typed in a LineEditor. + +</dd> +</div> + +</dl></div> +<div class="section" id="8"> +<h1><a class="toc-backref" href="#8">Vars</a></h1> +<dl class="item"> +<div id="KEYMAP"> +<dt><pre><a href="minline.html#KEYMAP"><span class="Identifier">KEYMAP</span></a><span class="Other">:</span> <span class="Identifier">CritBitTree</span><span class="Other">[</span><a href="minline.html#KeyCallback"><span class="Identifier">KeyCallback</span></a><span class="Other">]</span></pre></dt> +<dd> + +The following key mappings are configured by default:<ul class="simple"><li>backspace: <strong>deletePrevious</strong></li> +<li>delete: <strong>deleteNext</strong></li> +<li>insert: <em>toggle editor mode</em></li> +<li>down: <strong>historyNext</strong></li> +<li>up: <strong>historyPrevious</strong></li> +<li>ctrl+n: <strong>historyNext</strong></li> +<li>ctrl+p: <strong>historyPrevious</strong></li> +<li>left: <strong>back</strong></li> +<li>right: <strong>forward</strong></li> +<li>ctrl+b: <strong>back</strong></li> +<li>ctrl+f: <strong>forward</strong></li> +<li>ctrl+c: <em>quits the program</em></li> +<li>ctrl+d: <em>quits the program</em></li> +<li>ctrl+u: <strong>clearLine</strong></li> +<li>ctrl+a: <strong>goToStart</strong></li> +<li>ctrl+e: <strong>goToEnd</strong></li> +<li>home: <strong>goToStart</strong></li> +<li>end: <strong>goToEnd</strong></li> +</ul> + + +</dd> +</div> +<div id="KEYNAMES"> +<dt><pre><a href="minline.html#KEYNAMES"><span class="Identifier">KEYNAMES</span></a><span class="Other">:</span> <span class="Identifier">array</span><span class="Other">[</span><span class="DecNumber">0</span> <span class="Operator">..</span> <span class="DecNumber">31</span><span class="Other">,</span> <span class="Identifier">string</span><span class="Other">]</span></pre></dt> +<dd> + +The following strings can be used in keymaps instead of the correspinding ASCII codes:<pre class="listing"><span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">1</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+a&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">2</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+b&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">3</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+c&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">4</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+d&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">5</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+e&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">6</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+f&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">7</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+g&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">8</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+h&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">9</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+i&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">9</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;tab&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">10</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+j&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">11</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+k&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">12</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+l&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">13</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+m&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">14</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+n&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">15</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+o&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">16</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+p&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">17</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+q&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">18</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+r&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">19</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+s&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">20</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+t&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">21</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+u&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">22</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+v&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">23</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+w&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">24</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+x&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">25</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+y&quot;</span> +<span class="Identifier">KEYNAMES</span><span class="Punctuation">[</span><span class="DecNumber">26</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="StringLit">&quot;ctrl+z&quot;</span></pre> + +</dd> +</div> +<div id="KEYSEQS"> +<dt><pre><a href="minline.html#KEYSEQS"><span class="Identifier">KEYSEQS</span></a><span class="Other">:</span> <span class="Identifier">CritBitTree</span><span class="Other">[</span><a href="minline.html#KeySeq"><span class="Identifier">KeySeq</span></a><span class="Other">]</span></pre></dt> +<dd> + +The following key sequences are defined and are used internally by <strong>LineEditor</strong>:<pre class="listing"><span class="Identifier">KEYSEQS</span><span class="Punctuation">[</span><span class="StringLit">&quot;up&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="Operator">@</span><span class="Punctuation">[</span><span class="DecNumber">27</span><span class="Punctuation">,</span> <span class="DecNumber">91</span><span class="Punctuation">,</span> <span class="DecNumber">65</span><span class="Punctuation">]</span> <span class="Comment"># Windows: @[224, 72]</span> +<span class="Identifier">KEYSEQS</span><span class="Punctuation">[</span><span class="StringLit">&quot;down&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="Operator">@</span><span class="Punctuation">[</span><span class="DecNumber">27</span><span class="Punctuation">,</span> <span class="DecNumber">91</span><span class="Punctuation">,</span> <span class="DecNumber">66</span><span class="Punctuation">]</span> <span class="Comment"># Windows: @[224, 80]</span> +<span class="Identifier">KEYSEQS</span><span class="Punctuation">[</span><span class="StringLit">&quot;right&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="Operator">@</span><span class="Punctuation">[</span><span class="DecNumber">27</span><span class="Punctuation">,</span> <span class="DecNumber">91</span><span class="Punctuation">,</span> <span class="DecNumber">67</span><span class="Punctuation">]</span> <span class="Comment"># Windows: @[224, 77]</span> +<span class="Identifier">KEYSEQS</span><span class="Punctuation">[</span><span class="StringLit">&quot;left&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="Operator">@</span><span class="Punctuation">[</span><span class="DecNumber">27</span><span class="Punctuation">,</span> <span class="DecNumber">91</span><span class="Punctuation">,</span> <span class="DecNumber">68</span><span class="Punctuation">]</span> <span class="Comment"># Windows: @[224, 75]</span> +<span class="Identifier">KEYSEQS</span><span class="Punctuation">[</span><span class="StringLit">&quot;home&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="Operator">@</span><span class="Punctuation">[</span><span class="DecNumber">27</span><span class="Punctuation">,</span> <span class="DecNumber">91</span><span class="Punctuation">,</span> <span class="DecNumber">72</span><span class="Punctuation">]</span> <span class="Comment"># Windows: @[224, 71]</span> +<span class="Identifier">KEYSEQS</span><span class="Punctuation">[</span><span class="StringLit">&quot;end&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="Operator">@</span><span class="Punctuation">[</span><span class="DecNumber">27</span><span class="Punctuation">,</span> <span class="DecNumber">91</span><span class="Punctuation">,</span> <span class="DecNumber">70</span><span class="Punctuation">]</span> <span class="Comment"># Windows: @[224, 79]</span> +<span class="Identifier">KEYSEQS</span><span class="Punctuation">[</span><span class="StringLit">&quot;insert&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="Operator">@</span><span class="Punctuation">[</span><span class="DecNumber">27</span><span class="Punctuation">,</span> <span class="DecNumber">91</span><span class="Punctuation">,</span> <span class="DecNumber">50</span><span class="Punctuation">,</span> <span class="DecNumber">126</span><span class="Punctuation">]</span> <span class="Comment"># Windows: @[224, 82]</span> +<span class="Identifier">KEYSEQS</span><span class="Punctuation">[</span><span class="StringLit">&quot;delete&quot;</span><span class="Punctuation">]</span> <span class="Operator">=</span> <span class="Operator">@</span><span class="Punctuation">[</span><span class="DecNumber">27</span><span class="Punctuation">,</span> <span class="DecNumber">91</span><span class="Punctuation">,</span> <span class="DecNumber">51</span><span class="Punctuation">,</span> <span class="DecNumber">126</span><span class="Punctuation">]</span> <span class="Comment"># Windows: @[224, 83]</span></pre> + +</dd> +</div> + +</dl></div> +<div class="section" id="10"> +<h1><a class="toc-backref" href="#10">Consts</a></h1> +<dl class="item"> +<div id="CTRL"> +<dt><pre><a href="minline.html#CTRL"><span class="Identifier">CTRL</span></a> <span class="Other">=</span> <span class="Other">{</span><span class="DecNumber">0</span><span class="Other">..</span><span class="DecNumber">31</span><span class="Other">}</span></pre></dt> +<dd> + +Control characters. + +</dd> +</div> +<div id="DIGIT"> +<dt><pre><a href="minline.html#DIGIT"><span class="Identifier">DIGIT</span></a> <span class="Other">=</span> <span class="Other">{</span><span class="DecNumber">48</span><span class="Other">..</span><span class="DecNumber">57</span><span class="Other">}</span></pre></dt> +<dd> + +Digits. + +</dd> +</div> +<div id="ESCAPES"> +<dt><pre><a href="minline.html#ESCAPES"><span class="Identifier">ESCAPES</span></a> <span class="Other">=</span> <span class="Other">{</span><span class="DecNumber">27</span><span class="Other">}</span></pre></dt> +<dd> + +Escape characters. + +</dd> +</div> +<div id="LETTER"> +<dt><pre><a href="minline.html#LETTER"><span class="Identifier">LETTER</span></a> <span class="Other">=</span> <span class="Other">{</span><span class="DecNumber">65</span><span class="Other">..</span><span class="DecNumber">122</span><span class="Other">}</span></pre></dt> +<dd> + +Letters. + +</dd> +</div> +<div id="LOWERLETTER"> +<dt><pre><a href="minline.html#LOWERLETTER"><span class="Identifier">LOWERLETTER</span></a> <span class="Other">=</span> <span class="Other">{</span><span class="DecNumber">97</span><span class="Other">..</span><span class="DecNumber">122</span><span class="Other">}</span></pre></dt> +<dd> + +Lowercase letters. + +</dd> +</div> +<div id="PRINTABLE"> +<dt><pre><a href="minline.html#PRINTABLE"><span class="Identifier">PRINTABLE</span></a> <span class="Other">=</span> <span class="Other">{</span><span class="DecNumber">32</span><span class="Other">..</span><span class="DecNumber">126</span><span class="Other">}</span></pre></dt> +<dd> + +Printable characters. + +</dd> +</div> +<div id="UPPERLETTER"> +<dt><pre><a href="minline.html#UPPERLETTER"><span class="Identifier">UPPERLETTER</span></a> <span class="Other">=</span> <span class="Other">{</span><span class="DecNumber">65</span><span class="Other">..</span><span class="DecNumber">90</span><span class="Other">}</span></pre></dt> +<dd> + +Uppercase letters. + +</dd> +</div> + +</dl></div> +<div class="section" id="12"> +<h1><a class="toc-backref" href="#12">Procs</a></h1> +<dl class="item"> +<div id="back,LineEditor,int"> +<dt><pre><span class="Keyword">proc</span> <a href="#back%2CLineEditor%2Cint"><span class="Identifier">back</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">;</span> <span class="Identifier">n</span> <span class="Other">=</span> <span class="DecNumber">1</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span> + <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Move the cursor back by <strong>n</strong> characters on the current line (unless the beginning of the line is reached). + +</dd> +</div> +<div id="changeLine,LineEditor,string"> +<dt><pre><span class="Keyword">proc</span> <a href="#changeLine%2CLineEditor%2Cstring"><span class="Identifier">changeLine</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">;</span> <span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span> + <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Replaces the contents of the current line with the string <strong>s</strong>. + +</dd> +</div> +<div id="clearLine,LineEditor"> +<dt><pre><span class="Keyword">proc</span> <a href="#clearLine%2CLineEditor"><span class="Identifier">clearLine</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span> + <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Clears the contents of the current line and reset the cursor position to the beginning of the line. + +</dd> +</div> +<div id="completeLine,LineEditor"> +<dt><pre><span class="Keyword">proc</span> <a href="#completeLine%2CLineEditor"><span class="Identifier">completeLine</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> {. + <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">EOFError</span><span class="Other">]</span><span class="Other">,</span> + <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">,</span> <span class="Identifier">WriteIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +<p>If a <strong>completionCallback</strong> proc has been specified for the current editor, attempts to auto-complete the current line by running <strong>completionProc</strong> to return a list of possible values. It is possible to cycle through the matches by pressing the same key that triggered this proc.</p> +<p>The matches provided will be filtered based on the contents of the line when this proc was first triggered. If a match starts with the contents of the line, it will be displayed.</p> +<p>The following is a real-world example of a <strong>completionCallback</strong> used to complete the last word on the line with valid file paths.</p> +<pre class="listing"><span class="Keyword">import</span> <span class="Identifier">sequtils</span><span class="Punctuation">,</span> <span class="Identifier">strutils</span><span class="Punctuation">,</span> <span class="Identifier">ospath</span> + +<span class="Identifier">ed</span><span class="Operator">.</span><span class="Identifier">completionCallback</span> <span class="Operator">=</span> <span class="Keyword">proc</span><span class="Punctuation">(</span><span class="Identifier">ed</span><span class="Punctuation">:</span> <span class="Identifier">LineEditor</span><span class="Punctuation">)</span><span class="Punctuation">:</span> <span class="Identifier">seq</span><span class="Punctuation">[</span><span class="Identifier">string</span><span class="Punctuation">]</span> <span class="Operator">=</span> + <span class="Keyword">var</span> <span class="Identifier">words</span> <span class="Operator">=</span> <span class="Identifier">ed</span><span class="Operator">.</span><span class="Identifier">lineText</span><span class="Operator">.</span><span class="Identifier">split</span><span class="Punctuation">(</span><span class="StringLit">&quot; &quot;</span><span class="Punctuation">)</span> + <span class="Keyword">var</span> <span class="Identifier">word</span><span class="Punctuation">:</span> <span class="Identifier">string</span> + <span class="Keyword">if</span> <span class="Identifier">words</span><span class="Operator">.</span><span class="Identifier">len</span> <span class="Operator">==</span> <span class="DecNumber">0</span><span class="Punctuation">:</span> + <span class="Identifier">word</span> <span class="Operator">=</span> <span class="Identifier">ed</span><span class="Operator">.</span><span class="Identifier">lineText</span> + <span class="Keyword">else</span><span class="Punctuation">:</span> + <span class="Identifier">word</span> <span class="Operator">=</span> <span class="Identifier">words</span><span class="Punctuation">[</span><span class="Identifier">words</span><span class="Operator">.</span><span class="Identifier">len</span><span class="Operator">-</span><span class="DecNumber">1</span><span class="Punctuation">]</span> + <span class="Keyword">var</span> <span class="Identifier">f</span> <span class="Operator">=</span> <span class="Identifier">word</span><span class="Punctuation">[</span><span class="FloatNumber">1.</span><span class="Operator">.^</span><span class="DecNumber">1</span><span class="Punctuation">]</span> + <span class="Keyword">if</span> <span class="Identifier">f</span> <span class="Operator">==</span> <span class="StringLit">&quot;&quot;</span><span class="Punctuation">:</span> + <span class="Identifier">f</span> <span class="Operator">=</span> <span class="Identifier">getCurrentDir</span><span class="Punctuation">(</span><span class="Punctuation">)</span><span class="Operator">.</span><span class="Identifier">replace</span><span class="Punctuation">(</span><span class="StringLit">&quot;</span><span class="EscapeSequence">\\</span><span class="StringLit">&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;/&quot;</span><span class="Punctuation">)</span> + <span class="Keyword">return</span> <span class="Identifier">toSeq</span><span class="Punctuation">(</span><span class="Identifier">walkDir</span><span class="Punctuation">(</span><span class="Identifier">f</span><span class="Punctuation">,</span> <span class="Identifier">true</span><span class="Punctuation">)</span><span class="Punctuation">)</span> + <span class="Operator">.</span><span class="Identifier">mapIt</span><span class="Punctuation">(</span><span class="StringLit">&quot;</span><span class="EscapeSequence">\&quot;</span><span class="StringLit">$1&quot;</span> <span class="Operator">%</span> <span class="Identifier">it</span><span class="Operator">.</span><span class="Identifier">path</span><span class="Operator">.</span><span class="Identifier">replace</span><span class="Punctuation">(</span><span class="StringLit">&quot;</span><span class="EscapeSequence">\\</span><span class="StringLit">&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;/&quot;</span><span class="Punctuation">)</span><span class="Punctuation">)</span> + <span class="Keyword">elif</span> <span class="Identifier">f</span><span class="Operator">.</span><span class="Identifier">dirExists</span><span class="Punctuation">:</span> + <span class="Identifier">f</span> <span class="Operator">=</span> <span class="Identifier">f</span><span class="Operator">.</span><span class="Identifier">replace</span><span class="Punctuation">(</span><span class="StringLit">&quot;</span><span class="EscapeSequence">\\</span><span class="StringLit">&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;/&quot;</span><span class="Punctuation">)</span> + <span class="Keyword">if</span> <span class="Identifier">f</span><span class="Punctuation">[</span><span class="Identifier">f</span><span class="Operator">.</span><span class="Identifier">len</span><span class="Operator">-</span><span class="DecNumber">1</span><span class="Punctuation">]</span> <span class="Operator">!=</span> <span class="CharLit">'/'</span><span class="Punctuation">:</span> + <span class="Identifier">f</span> <span class="Operator">=</span> <span class="Identifier">f</span> <span class="Operator">&amp;</span> <span class="StringLit">&quot;/&quot;</span> + <span class="Keyword">return</span> <span class="Identifier">toSeq</span><span class="Punctuation">(</span><span class="Identifier">walkDir</span><span class="Punctuation">(</span><span class="Identifier">f</span><span class="Punctuation">,</span> <span class="Identifier">true</span><span class="Punctuation">)</span><span class="Punctuation">)</span> + <span class="Operator">.</span><span class="Identifier">mapIt</span><span class="Punctuation">(</span><span class="StringLit">&quot;</span><span class="EscapeSequence">\&quot;</span><span class="StringLit">$1$2&quot;</span> <span class="Operator">%</span> <span class="Punctuation">[</span><span class="Identifier">f</span><span class="Punctuation">,</span> <span class="Identifier">it</span><span class="Operator">.</span><span class="Identifier">path</span><span class="Operator">.</span><span class="Identifier">replace</span><span class="Punctuation">(</span><span class="StringLit">&quot;</span><span class="EscapeSequence">\\</span><span class="StringLit">&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;/&quot;</span><span class="Punctuation">)</span><span class="Punctuation">]</span><span class="Punctuation">)</span> + <span class="Keyword">else</span><span class="Punctuation">:</span> + <span class="Keyword">var</span> <span class="Identifier">dir</span><span class="Punctuation">:</span> <span class="Identifier">string</span> + <span class="Keyword">if</span> <span class="Identifier">f</span><span class="Operator">.</span><span class="Identifier">contains</span><span class="Punctuation">(</span><span class="StringLit">&quot;/&quot;</span><span class="Punctuation">)</span> <span class="Keyword">or</span> <span class="Identifier">dir</span><span class="Operator">.</span><span class="Identifier">contains</span><span class="Punctuation">(</span><span class="StringLit">&quot;</span><span class="EscapeSequence">\\</span><span class="StringLit">&quot;</span><span class="Punctuation">)</span><span class="Punctuation">:</span> + <span class="Identifier">dir</span> <span class="Operator">=</span> <span class="Identifier">f</span><span class="Operator">.</span><span class="Identifier">parentDir</span> + <span class="Keyword">let</span> <span class="Identifier">file</span> <span class="Operator">=</span> <span class="Identifier">f</span><span class="Operator">.</span><span class="Identifier">extractFileName</span> + <span class="Keyword">return</span> <span class="Identifier">toSeq</span><span class="Punctuation">(</span><span class="Identifier">walkDir</span><span class="Punctuation">(</span><span class="Identifier">dir</span><span class="Punctuation">,</span> <span class="Identifier">true</span><span class="Punctuation">)</span><span class="Punctuation">)</span> + <span class="Operator">.</span><span class="Identifier">filterIt</span><span class="Punctuation">(</span><span class="Identifier">it</span><span class="Operator">.</span><span class="Identifier">path</span><span class="Operator">.</span><span class="Identifier">toLowerAscii</span><span class="Operator">.</span><span class="Identifier">startsWith</span><span class="Punctuation">(</span><span class="Identifier">file</span><span class="Operator">.</span><span class="Identifier">toLowerAscii</span><span class="Punctuation">)</span><span class="Punctuation">)</span> + <span class="Operator">.</span><span class="Identifier">mapIt</span><span class="Punctuation">(</span><span class="StringLit">&quot;</span><span class="EscapeSequence">\&quot;</span><span class="StringLit">$1/$2&quot;</span> <span class="Operator">%</span> <span class="Punctuation">[</span><span class="Identifier">dir</span><span class="Punctuation">,</span> <span class="Identifier">it</span><span class="Operator">.</span><span class="Identifier">path</span><span class="Operator">.</span><span class="Identifier">replace</span><span class="Punctuation">(</span><span class="StringLit">&quot;</span><span class="EscapeSequence">\\</span><span class="StringLit">&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;/&quot;</span><span class="Punctuation">)</span><span class="Punctuation">]</span><span class="Punctuation">)</span> + <span class="Keyword">else</span><span class="Punctuation">:</span> + <span class="Identifier">dir</span> <span class="Operator">=</span> <span class="Identifier">getCurrentDir</span><span class="Punctuation">(</span><span class="Punctuation">)</span> + <span class="Keyword">return</span> <span class="Identifier">toSeq</span><span class="Punctuation">(</span><span class="Identifier">walkDir</span><span class="Punctuation">(</span><span class="Identifier">dir</span><span class="Punctuation">,</span> <span class="Identifier">true</span><span class="Punctuation">)</span><span class="Punctuation">)</span> + <span class="Operator">.</span><span class="Identifier">filterIt</span><span class="Punctuation">(</span><span class="Identifier">it</span><span class="Operator">.</span><span class="Identifier">path</span><span class="Operator">.</span><span class="Identifier">toLowerAscii</span><span class="Operator">.</span><span class="Identifier">startsWith</span><span class="Punctuation">(</span><span class="Identifier">f</span><span class="Operator">.</span><span class="Identifier">toLowerAscii</span><span class="Punctuation">)</span><span class="Punctuation">)</span> + <span class="Operator">.</span><span class="Identifier">mapIt</span><span class="Punctuation">(</span><span class="StringLit">&quot;</span><span class="EscapeSequence">\&quot;</span><span class="StringLit">$1&quot;</span> <span class="Operator">%</span> <span class="Punctuation">[</span><span class="Identifier">it</span><span class="Operator">.</span><span class="Identifier">path</span><span class="Operator">.</span><span class="Identifier">replace</span><span class="Punctuation">(</span><span class="StringLit">&quot;</span><span class="EscapeSequence">\\</span><span class="StringLit">&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;/&quot;</span><span class="Punctuation">)</span><span class="Punctuation">]</span><span class="Punctuation">)</span></pre> + +</dd> +</div> +<div id="deleteNext,LineEditor"> +<dt><pre><span class="Keyword">proc</span> <a href="#deleteNext%2CLineEditor"><span class="Identifier">deleteNext</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">LineError</span><span class="Other">,</span> <span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span> + <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Move the cursor to the right by one character (unless at the end of the line) and delete the existing character, if any. + +</dd> +</div> +<div id="deletePrevious,LineEditor"> +<dt><pre><span class="Keyword">proc</span> <a href="#deletePrevious%2CLineEditor"><span class="Identifier">deletePrevious</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">)</span> {. + <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">LineError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Move the cursor to the left by one character (unless at the beginning of the line) and delete the existing character, if any. + +</dd> +</div> +<div id="forward,LineEditor,int"> +<dt><pre><span class="Keyword">proc</span> <a href="#forward%2CLineEditor%2Cint"><span class="Identifier">forward</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">;</span> <span class="Identifier">n</span> <span class="Other">=</span> <span class="DecNumber">1</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span> + <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Move the cursor forward by <strong>n</strong> characters on the current line (unless the beginning of the line is reached). + +</dd> +</div> +<div id="getchr"> +<dt><pre><span class="Keyword">proc</span> <a href="#getchr"><span class="Identifier">getchr</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">EOFError</span><span class="Other">]</span><span class="Other">,</span> + <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Retrieves an ASCII character from stdin. + +</dd> +</div> +<div id="goToEnd,LineEditor"> +<dt><pre><span class="Keyword">proc</span> <a href="#goToEnd%2CLineEditor"><span class="Identifier">goToEnd</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span> + <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Move the cursor to the end of the line. + +</dd> +</div> +<div id="goToStart,LineEditor"> +<dt><pre><span class="Keyword">proc</span> <a href="#goToStart%2CLineEditor"><span class="Identifier">goToStart</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Move the cursor to the beginning of the line. + +</dd> +</div> +<div id="historyAdd,LineEditor"> +<dt><pre><span class="Keyword">proc</span> <a href="#historyAdd%2CLineEditor"><span class="Identifier">historyAdd</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">;</span> <span class="Identifier">force</span> <span class="Other">=</span> <span class="Identifier">false</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span> + <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Adds the current editor line to the history. If <strong>force</strong> is set to <strong>true</strong>, the line will be added even if it's blank. + +</dd> +</div> +<div id="historyFlush,LineEditor"> +<dt><pre><span class="Keyword">proc</span> <a href="#historyFlush%2CLineEditor"><span class="Identifier">historyFlush</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +If there is at least one entry in the history, it sets the position of the cursor to the last element and sets the <strong>tainted</strong> flag to <strong>false</strong>. + +</dd> +</div> +<div id="historyInit,int,string"> +<dt><pre><span class="Keyword">proc</span> <a href="#historyInit%2Cint%2Cstring"><span class="Identifier">historyInit</span></a><span class="Other">(</span><span class="Identifier">size</span> <span class="Other">=</span> <span class="DecNumber">256</span><span class="Other">;</span> <span class="Identifier">file</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other">=</span> <span class="StringLit">&quot;&quot;</span><span class="Other">)</span><span class="Other">:</span> <a href="minline.html#LineHistory"><span class="Identifier">LineHistory</span></a> {. + <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadDirEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">,</span> <span class="Identifier">WriteIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Creates a new <strong>LineHistory</strong> object with the specified <strong>size</strong> and <strong>file</strong>. + +</dd> +</div> +<div id="historyNext,LineEditor"> +<dt><pre><span class="Keyword">proc</span> <a href="#historyNext%2CLineEditor"><span class="Identifier">historyNext</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span> + <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Replaces the contents of the current line with the following line stored in the history (if any). + +</dd> +</div> +<div id="historyPrevious,LineEditor"> +<dt><pre><span class="Keyword">proc</span> <a href="#historyPrevious%2CLineEditor"><span class="Identifier">historyPrevious</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span> + <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Replaces the contents of the current line with the previous line stored in the history (if any). The current line will be added to the history and the hisory will be marked as <em>tainted</em>. + +</dd> +</div> +<div id="initEditor,int,string"> +<dt><pre><span class="Keyword">proc</span> <a href="#initEditor%2Cint%2Cstring"><span class="Identifier">initEditor</span></a><span class="Other">(</span><span class="Identifier">mode</span> <span class="Other">=</span> <span class="Identifier">mdInsert</span><span class="Other">;</span> <span class="Identifier">historySize</span> <span class="Other">=</span> <span class="DecNumber">256</span><span class="Other">;</span> <span class="Identifier">historyFile</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Other">=</span> <span class="StringLit">&quot;&quot;</span><span class="Other">)</span><span class="Other">:</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a> {. + <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadDirEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">,</span> <span class="Identifier">WriteIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Creates a <strong>LineEditor</strong> object. + +</dd> +</div> +<div id="lineText,LineEditor"> +<dt><pre><span class="Keyword">proc</span> <a href="#lineText%2CLineEditor"><span class="Identifier">lineText</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Returns the contents of the current line. + +</dd> +</div> +<div id="password,LineEditor,string"> +<dt><pre><span class="Keyword">proc</span> <a href="#password%2CLineEditor%2Cstring"><span class="Identifier">password</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">;</span> <span class="Identifier">prompt</span> <span class="Other">=</span> <span class="StringLit">&quot;&quot;</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> {. + <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">EOFError</span><span class="Other">,</span> <span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">KeyError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span> + <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">,</span> <span class="Identifier">RootEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Convenience method to use instead of <strong>readLine</strong> to hide the characters inputed by the user. + +</dd> +</div> +<div id="printChar,LineEditor,int"> +<dt><pre><span class="Keyword">proc</span> <a href="#printChar%2CLineEditor%2Cint"><span class="Identifier">printChar</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">;</span> <span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">int</span><span class="Other">)</span> {. + <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">LineError</span><span class="Other">,</span> <span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Prints the character <strong>c</strong> to the current line. If in the middle of the line, the following characters are shifted right or replaced depending on the editor mode. + +</dd> +</div> +<div id="putchr,cint"> +<dt><pre><span class="Keyword">proc</span> <a href="#putchr%2Ccint"><span class="Identifier">putchr</span></a><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <span class="Identifier">cint</span><span class="Other">)</span> {.<span class="Identifier">header</span><span class="Other">:</span> <span class="StringLit">&quot;stdio.h&quot;</span><span class="Other">,</span> <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;putchar&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> + <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +Prints an ASCII character to stdout. + +</dd> +</div> +<div id="readLine,LineEditor,string"> +<dt><pre><span class="Keyword">proc</span> <a href="#readLine%2CLineEditor%2Cstring"><span class="Identifier">readLine</span></a><span class="Other">(</span><span class="Identifier">ed</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="minline.html#LineEditor"><span class="Identifier">LineEditor</span></a><span class="Other">;</span> <span class="Identifier">prompt</span> <span class="Other">=</span> <span class="StringLit">&quot;&quot;</span><span class="Other">;</span> <span class="Identifier">hidechars</span> <span class="Other">=</span> <span class="Identifier">false</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> {. + <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">gcsafe</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">EOFError</span><span class="Other">,</span> <span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">KeyError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span> + <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">,</span> <span class="Identifier">RootEffect</span><span class="Other">]</span></span>.}</pre></dt> +<dd> + +<p>High-level proc to be used instead of <strong>stdin.readLine</strong> to read a line from standard input using the specified <strong>LineEditor</strong> object.</p> +<p>Note that:</p> +<ul class="simple"><li><strong>prompt</strong> is a string (that <em>cannot</em> contain escape codes, so it cannot be colored) that will be prepended at the start of the line and not included in the contents of the line itself.</li> +<li>If <strong>hidechars</strong> is set to <strong>true</strong>, asterisks will be printed to stdout instead of the characters entered by the user.</li> +</ul> + + +</dd> +</div> + +</dl></div> + + </div> +</div> + + <div class="row"> + <div class="twelve-columns footer"> + <span class="nim-sprite"></span> + <br/> + <small style="color: var(--hint);">Made with Nim. Generated: 2023-07-30 20:08:27 UTC</small> + </div> + </div> + </div> +</div> + +</body> +</html>
A assets/minline/nimdoc.out.css

@@ -0,0 +1,1016 @@

+/* +Stylesheet for use with Docutils/rst2html. + +See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to +customize this style sheet. + +Modified from Chad Skeeters' rst2html-style +https://bitbucket.org/cskeeters/rst2html-style/ + +Modified by Boyd Greenfield and narimiran +*/ + +:root { + --primary-background: #fff; + --secondary-background: ghostwhite; + --third-background: #e8e8e8; + --info-background: #50c050; + --warning-background: #c0a000; + --error-background: #e04040; + --border: #dde; + --text: #222; + --anchor: #07b; + --anchor-focus: #607c9f; + --input-focus: #1fa0eb; + --strong: #3c3c3c; + --hint: #9A9A9A; + --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAN4AAAA9CAYAAADCt9ebAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp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M3XuxjBlW8DuRacDU3y0myNbNTPHPjxT5m0GTN15A/zVFiI+HKYzgc/ydMlrRfgmQWuYn0F91xJEQYxVuDnMcOrQAWJi2EI72ErQviwqLEQpQ+5XBEIqzi3YWLwF+BMiMcjshEqYR1Gdk1KmxBsaR9SQviSDdRFK8fxVU+YliWZmcbcq7vSFoQR/qJWvuxD0WgLDYoSzPzAqowtjVhORwDhEaKru4GPoliGgcyy4Hj0DLT4TBCo9WO88jQ8Bns97lLghvRTOfqqDiMYqrM+HyUYdBtaLykeRmlK12C9rQOh1FM1vd/HqUIzaT5e+LVoh/VxByHShs6HFaw0VjjHhTxP5d0LT+fRnu5q3HuAodlbHW02Q5cDByM+sw1642cRylCx6PeZiuTFScUFxK+f19QovaRS+t4tsasxhvABbZbSfUCV6CM7qtQl6Fm4E1U22UqcAYqvZ42fgJMxH6vdYc5nkBlSW6Pq4fbS6hb6jg0u9yGug7FyS5U1+UcVBbwbFSuMM1sQ1bXK4A9CcviqM0e9H80HdUxCpwIa4McygA/GfgAcCJqmGKKXUixupEv7nHsLc2agWNQ0d9OzC+PHNHIo1XeLCoe8kkqXiUtwKFoWXoEKqk3BpWLaC8cXsV8HT1J+tFTZKvn+DMqFZi1knvtyKg1O2lBHADcCVxEedNSAP4HJcsr0NNWHVUAAAAASUVORK5CYII="); + + --keyword: #5e8f60; + --identifier: #222; + --comment: #484a86; + --operator: #155da4; + --punctuation: black; + --other: black; + --escapeSequence: #c4891b; + --number: #252dbe; + --literal: #a4255b; + --program: #6060c0; + --option: #508000; + --raw-data: #a4255b; +} + +[data-theme="dark"] { + --primary-background: #171921; + --secondary-background: #1e202a; + --third-background: #2b2e3b; + --info-background: #008000; + --warning-background: #807000; + --error-background: #c03000; + --border: #0e1014; + --text: #fff; + --anchor: #8be9fd; + --anchor-focus: #8be9fd; + --input-focus: #8be9fd; + --strong: #bd93f9; + --hint: #7A7C85; + --nim-sprite-base64: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAAB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1dgcFgABqNNvruglwuh7t374JMJoOOjo7P79y5I+ru7m7q7e1tXQi7MzOh8PIv4pCw2DdaWtte37Au7aPIyCWAxWABjUbPif9HCMbjURtKiaQBfvr5zH9evlJ0uLQ4r/nJMXNiZTIRrMAlJAcHB18HBweWo6Mjy8rKajeJRAJLS0uwtLQECwsLoFAogMfjAYvFgpmZ2XNXMyqVCoaHh2FoaAiGh4cfvwYGBqCvrw+6u7vfvnfvXlNvb29rT09Pq0QsUM7S6c4rNqS/lrZ5U+YPRBKR9M7u9xwqBUUvtNAudH766XSLE8PR49ixE78/8tVnX403Zk7fUR46NUUAIPIPCMdTKJTdNjY2QKPRgE6nA51OB1tbWyCRSIDD4YBAIAAejwcCgfDYUajVakGlUoFarQadTvfY79HX1wf9/f0gl8tBLpfDvXv3HvXw+dxQPYYXMj+d+P7Mmzv+5OHr6/OJWq1GBHeB09TcUiKuq/coKS3/eqIx/wPkiIXC3w6YjAAAAABJRU5ErkJggg=="); + + --keyword: #ff79c6; + --identifier: #f8f8f2; + --comment: #6272a4; + --operator: #ff79c6; + --punctuation: #f8f8f2; + --other: #f8f8f2; + --escapeSequence: #bd93f9; + --number: #bd93f9; + --literal: #f1fa8c; + --program: #9090c0; + --option: #90b010; + --raw-data: #8be9fd; +} + +.theme-switch-wrapper { + display: flex; + align-items: center; +} + +.theme-switch-wrapper em { + margin-left: 10px; + font-size: 1rem; +} + +.theme-switch { + display: inline-block; + height: 22px; + position: relative; + width: 50px; +} + +.theme-switch input { + display: none; +} + +.slider { + background-color: #ccc; + bottom: 0; + cursor: pointer; + left: 0; + position: absolute; + right: 0; + top: 0; + transition: .4s; +} + +.slider:before { + background-color: #fff; + bottom: 4px; + content: ""; + height: 13px; + left: 4px; + position: absolute; + transition: .4s; + width: 13px; +} + +input:checked + .slider { + background-color: #66bb6a; +} + +input:checked + .slider:before { + transform: translateX(26px); +} + +.slider.round { + border-radius: 17px; +} + +.slider.round:before { + border-radius: 50%; +} + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; } + +body { + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-weight: 400; + font-size: 1.125em; + line-height: 1.5; + color: var(--text); + background-color: var(--primary-background); } + +/* Skeleton grid */ +.container { + position: relative; + width: 100%; + max-width: 1050px; + margin: 0 auto; + padding: 0; + box-sizing: border-box; } + +.column, +.columns { + width: 100%; + float: left; + box-sizing: border-box; + margin-left: 1%; +} + +.column:first-child, +.columns:first-child { + margin-left: 0; } + +.three.columns { + width: 22%; +} + +.nine.columns { + width: 77.0%; } + +.twelve.columns { + width: 100%; + margin-left: 0; } + +@media screen and (max-width: 860px) { + .three.columns { + display: none; + } + .nine.columns { + width: 98.0%; + } + body { + font-size: 1em; + line-height: 1.35; + } +} + +cite { + font-style: italic !important; } + + +/* Nim search input */ +div#searchInputDiv { + margin-bottom: 1em; +} +input#searchInput { + width: 80%; +} + +/* + * Some custom formatting for input forms. + * This also fixes input form colors on Firefox with a dark system theme on Linux. + */ +input { + -moz-appearance: none; + background-color: var(--secondary-background); + color: var(--text); + border: 1px solid var(--border); + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-size: 0.9em; + padding: 6px; +} + +input:focus { + border: 1px solid var(--input-focus); + box-shadow: 0 0 3px var(--input-focus); +} + +select { + -moz-appearance: none; + background-color: var(--secondary-background); + color: var(--text); + border: 1px solid var(--border); + font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif; + font-size: 0.9em; + padding: 6px; +} + +select:focus { + border: 1px solid var(--input-focus); + box-shadow: 0 0 3px var(--input-focus); +} + +/* Docgen styles */ + +:target { + border: 2px solid #B5651D; + border-style: dotted; +} + +/* Links */ +a { + color: var(--anchor); + text-decoration: none; +} + +a span.Identifier { + text-decoration: underline; + text-decoration-color: #aab; +} + +a.reference-toplevel { + font-weight: bold; +} + +a.toc-backref { + text-decoration: none; + color: var(--text); } + +a.link-seesrc { + color: #607c9f; + font-size: 0.9em; + font-style: italic; } + +a:hover, +a:focus { + color: var(--anchor-focus); + text-decoration: underline; } + +a:hover span.Identifier { + color: var(--anchor); +} + + +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; } + +sup { + top: -0.5em; } + +sub { + bottom: -0.25em; } + +img { + width: auto; + height: auto; + max-width: 100%; + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; } + +@media print { + * { + color: black !important; + text-shadow: none !important; + background: transparent !important; + box-shadow: none !important; } + + a, + a:visited { + text-decoration: underline; } + + a[href]:after { + content: " (" attr(href) ")"; } + + abbr[title]:after { + content: " (" attr(title) ")"; } + + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; } + + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; } + + thead { + display: table-header-group; } + + tr, + img { + page-break-inside: avoid; } + + img { + max-width: 100% !important; } + + @page { + margin: 0.5cm; } + + h1 { + page-break-before: always; } + + h1.title { + page-break-before: avoid; } + + p, + h2, + h3 { + orphans: 3; + widows: 3; } + + h2, + h3 { + page-break-after: avoid; } +} + + +p { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +small { + font-size: 85%; } + +strong { + font-weight: 600; + font-size: 0.95em; + color: var(--strong); +} + +em { + font-style: italic; } + +h1 { + font-size: 1.8em; + font-weight: 400; + padding-bottom: .25em; + border-bottom: 6px solid var(--third-background); + margin-top: 2.5em; + margin-bottom: 1em; + line-height: 1.2em; } + +h1.title { + padding-bottom: 1em; + border-bottom: 0px; + font-size: 2.5em; + text-align: center; + font-weight: 900; + margin-top: 0.75em; + margin-bottom: 0em; +} + +h2 { + font-size: 1.3em; + margin-top: 2em; } + +h2.subtitle { + margin-top: 0em; + text-align: center; } + +h3 { + font-size: 1.125em; + font-style: italic; + margin-top: 1.5em; } + +h4 { + font-size: 1.125em; + margin-top: 1em; } + +h5 { + font-size: 1.125em; + margin-top: 0.75em; } + +h6 { + font-size: 1.1em; } + + +ul, +ol { + padding: 0; + margin-top: 0.5em; + margin-left: 0.75em; } + +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; + margin-left: 1.25em; } + +ul.simple > li { + list-style-type: circle; +} + +ul.simple-boot li { + list-style-type: none; + margin-left: 0em; + margin-bottom: 0.5em; +} + +ol.simple > li, ul.simple > li { + margin-bottom: 0.2em; + margin-left: 0.4em } + +ul.simple.simple-toc > li { + margin-top: 1em; +} + +ul.simple-toc { + list-style: none; + font-size: 0.9em; + margin-left: -0.3em; + margin-top: 1em; } + +ul.simple-toc > li { + list-style-type: none; +} + +ul.simple-toc-section { + list-style-type: circle; + margin-left: 0.8em; + color: #6c9aae; } + +ul.nested-toc-section { + list-style-type: circle; + margin-left: -0.75em; + color: var(--text); +} + +ul.nested-toc-section > li { + margin-left: 1.25em; +} + + +ol.arabic { + list-style: decimal; } + +ol.loweralpha { + list-style: lower-alpha; } + +ol.upperalpha { + list-style: upper-alpha; } + +ol.lowerroman { + list-style: lower-roman; } + +ol.upperroman { + list-style: upper-roman; } + +ul.auto-toc { + list-style-type: none; } + + +dl { + margin-bottom: 1.5em; } + +dt { + margin-bottom: -0.5em; + margin-left: 0.0em; } + +dd { + margin-left: 2.0em; + margin-bottom: 3.0em; + margin-top: 0.5em; } + + +hr { + margin: 2em 0; + border: 0; + border-top: 1px solid #aaa; } + +hr.footnote { + width: 25%; + border-top: 0.15em solid #999; + margin-bottom: 0.15em; + margin-top: 0.15em; +} +div.footnote-group { + margin-left: 1em; } +div.footnote-label { + display: inline-block; + min-width: 1.7em; +} + +div.option-list { + border: 0.1em solid var(--border); +} +div.option-list-item { + padding-left: 12em; + padding-right: 0; + padding-bottom: 0.3em; + padding-top: 0.3em; +} +div.odd { + background-color: var(--secondary-background); +} +div.option-list-label { + margin-left: -11.5em; + margin-right: 0em; + min-width: 11.5em; + display: inline-block; + vertical-align: top; +} +div.option-list-description { + width: calc(100% - 1em); + padding-left: 1em; + padding-right: 0; + display: inline-block; +} + +blockquote { + font-size: 0.9em; + font-style: italic; + padding-left: 0.5em; + margin-left: 0; + border-left: 5px solid #bbc; +} + +.pre, span.tok { + font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace; + font-weight: 500; + font-size: 0.85em; + color: var(--text); + background-color: var(--third-background); + padding-left: 3px; + padding-right: 3px; + border-radius: 4px; +} + +span.tok { + border: 1px solid #808080; + padding-bottom: 0.1em; + margin-right: 0.2em; +} + +pre { + font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace; + color: var(--text); + font-weight: 500; + display: inline-block; + box-sizing: border-box; + min-width: 100%; + padding: 0.5em; + margin-top: 0.5em; + margin-bottom: 0.5em; + font-size: 0.85em; + white-space: pre !important; + overflow-y: hidden; + overflow-x: visible; + background-color: var(--secondary-background); + border: 1px solid var(--border); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; } + +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; } + + +/* Nim line-numbered tables */ +.line-nums-table { + width: 100%; + table-layout: fixed; } + +table.line-nums-table { + border-radius: 4px; + border: 1px solid #cccccc; + background-color: ghostwhite; + border-collapse: separate; + margin-top: 15px; + margin-bottom: 25px; } + +.line-nums-table tbody { + border: none; } + +.line-nums-table td pre { + border: none; + background-color: transparent; } + +.line-nums-table td.blob-line-nums { + width: 28px; } + +.line-nums-table td.blob-line-nums pre { + color: #b0b0b0; + -webkit-filter: opacity(75%); + filter: opacity(75%); + text-align: right; + border-color: transparent; + background-color: transparent; + padding-left: 0px; + margin-left: 0px; + padding-right: 0px; + margin-right: 0px; } + + +table { + max-width: 100%; + background-color: transparent; + margin-top: 0.5em; + margin-bottom: 1.5em; + border-collapse: collapse; + border-color: var(--third-background); + border-spacing: 0; + font-size: 0.9em; +} + +table th, table td { + padding: 0px 0.5em 0px; + border-color: var(--third-background); +} + +table th { + background-color: var(--third-background); + border-color: var(--third-background); + font-weight: bold; } + +table th.docinfo-name { + background-color: transparent; + text-align: right; +} + +table tr:hover { + background-color: var(--third-background); } + + +/* rst2html default used to remove borders from tables and images */ +.borderless, table.borderless td, table.borderless th { + border: 0; } + +table.borderless td, table.borderless th { + /* Override padding for "table.docutils td" with "! important". + The right padding separates the table cells. */ + padding: 0 0.5em 0 0 !important; } + +.admonition { + padding: 0.3em; + background-color: var(--secondary-background); + border-left: 0.4em solid #7f7f84; + margin-bottom: 0.5em; + -webkit-box-shadow: 0 5px 8px -6px rgba(0,0,0,.2); + -moz-box-shadow: 0 5px 8px -6px rgba(0,0,0,.2); + box-shadow: 0 5px 8px -6px rgba(0,0,0,.2); +} +.admonition-info { + border-color: var(--info-background); +} +.admonition-info-text { + color: var(--info-background); +} +.admonition-warning { + border-color: var(--warning-background); +} +.admonition-warning-text { + color: var(--warning-background); +} +.admonition-error { + border-color: var(--error-background); +} +.admonition-error-text { + color: var(--error-background); +} + +.first { + /* Override more specific margin styles with "! important". */ + margin-top: 0 !important; } + +.last, .with-subtitle { + margin-bottom: 0 !important; } + +.hidden { + display: none; } + +blockquote.epigraph { + margin: 2em 5em; } + +dl.docutils dd { + margin-bottom: 0.5em; } + +object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] { + overflow: hidden; } + + +div.figure { + margin-left: 2em; + margin-right: 2em; } + +div.footer, div.header { + clear: both; + text-align: center; + color: #666; + font-size: smaller; } + +div.footer { + padding-top: 5em; +} + +div.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; } + +div.line-block div.line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; } + +div.topic { + margin: 2em; } + +div.search_results { + background-color: var(--third-background); + margin: 3em; + padding: 1em; + border: 1px solid #4d4d4d; +} + +div#global-links ul { + margin-left: 0; + list-style-type: none; +} + +div#global-links > simple-boot { + margin-left: 3em; +} + +hr.docutils { + width: 75%; } + +img.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; } + +img.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; } + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; } + +.align-left { + text-align: left; } + +.align-center { + clear: both; + text-align: center; } + +.align-right { + text-align: right; } + +/* reset inner alignment in figures */ +div.align-right { + text-align: inherit; } + +p.attribution { + text-align: right; + margin-left: 50%; } + +p.caption { + font-style: italic; } + +p.credits { + font-style: italic; + font-size: smaller; } + +p.label { + white-space: nowrap; } + +p.rubric { + font-weight: bold; + font-size: larger; + color: maroon; + text-align: center; } + +p.topic-title { + font-weight: bold; } + +pre.address { + margin-bottom: 0; + margin-top: 0; + font: inherit; } + +pre.literal-block, pre.doctest-block, pre.math, pre.code { + margin-left: 2em; + margin-right: 2em; } + +pre.code .ln { + color: grey; } + +/* line numbers */ +pre.code, code { + background-color: #eeeeee; } + +pre.code .comment, code .comment { + color: #5c6576; } + +pre.code .keyword, code .keyword { + color: #3B0D06; + font-weight: bold; } + +pre.code .literal.string, code .literal.string { + color: #0c5404; } + +pre.code .name.builtin, code .name.builtin { + color: #352b84; } + +pre.code .deleted, code .deleted { + background-color: #DEB0A1; } + +pre.code .inserted, code .inserted { + background-color: #A3D289; } + +span.classifier { + font-style: oblique; } + +span.classifier-delimiter { + font-weight: bold; } + +span.problematic { + color: #b30000; } + +span.section-subtitle { + /* font-size relative to parent (h1..h6 element) */ + font-size: 80%; } + +span.DecNumber { + color: var(--number); } + +span.BinNumber { + color: var(--number); } + +span.HexNumber { + color: var(--number); } + +span.OctNumber { + color: var(--number); } + +span.FloatNumber { + color: var(--number); } + +span.Identifier { + color: var(--identifier); } + +span.Keyword { + font-weight: 600; + color: var(--keyword); } + +span.StringLit { + color: var(--literal); } + +span.LongStringLit { + color: var(--literal); } + +span.CharLit { + color: var(--literal); } + +span.EscapeSequence { + color: var(--escapeSequence); } + +span.Operator { + color: var(--operator); } + +span.Punctuation { + color: var(--punctuation); } + +span.Comment, span.LongComment { + font-style: italic; + font-weight: 400; + color: var(--comment); } + +span.RegularExpression { + color: darkviolet; } + +span.TagStart { + color: darkviolet; } + +span.TagEnd { + color: darkviolet; } + +span.Key { + color: #252dbe; } + +span.Value { + color: #252dbe; } + +span.RawData { + color: var(--raw-data); } + +span.Assembler { + color: #252dbe; } + +span.Preprocessor { + color: #252dbe; } + +span.Directive { + color: #252dbe; } + +span.option { + font-weight: bold; + font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace; + color: var(--option); +} + +span.Prompt { + font-weight: bold; + color: red; } + +span.ProgramOutput { + font-weight: bold; + color: #808080; } + +span.program { + font-weight: bold; + color: var(--program); + text-decoration: underline; + text-decoration-color: var(--hint); + text-decoration-thickness: 0.05em; + text-underline-offset: 0.15em; +} + +span.Command, span.Rule, span.Hyperlink, span.Label, span.Reference, +span.Other { + color: var(--other); } + +/* Pop type, const, proc, and iterator defs in nim def blocks */ +dt pre > span.Identifier, dt pre > span.Operator { + color: var(--identifier); + font-weight: 700; } + +dt pre > span.Keyword ~ span.Identifier, dt pre > span.Identifier ~ span.Identifier, +dt pre > span.Operator ~ span.Identifier, dt pre > span.Other ~ span.Identifier { + color: var(--identifier); + font-weight: inherit; } + +/* Nim sprite for the footer (taken from main page favicon) */ +.nim-sprite { + display: inline-block; + width: 51px; + height: 14px; + background-position: 0 0; + background-size: 51px 14px; + -webkit-filter: opacity(50%); + filter: opacity(50%); + background-repeat: no-repeat; + background-image: var(--nim-sprite-base64); + margin-bottom: 5px; } + +span.pragmadots { + /* Position: relative frees us up to make the dots + look really nice without fucking up the layout and + causing bulging in the parent container */ + position: relative; + /* 1px down looks slightly nicer */ + top: 1px; + padding: 2px; + background-color: var(--third-background); + border-radius: 4px; + margin: 0 2px; + cursor: pointer; + font-size: 0.8em; +} + +span.pragmadots:hover { + background-color: var(--hint); +} +span.pragmawrap { + display: none; +} + +span.attachedType { + display: none; + visibility: hidden; +}
M assets/styles/_style.cssassets/styles/_style.css

@@ -454,6 +454,10 @@ img {

border: 1px solid var(--secondary-background); } +.webring { + width: 25px; +} + /* iPad Fix */ @media screen and (min-width: 768px) and (max-width: 768px) {
M contents/min.mdcontents/min.md

@@ -10,7 +10,7 @@ content-type: project

active: true ci: true download: "https://github.com/h3rald/min/releases/download/" -version: 0.38.0 +version: 0.38.1 docs: /min/Min_DeveloperGuide.htm -----
M templates/_footer.mustachetemplates/_footer.mustache

@@ -39,6 +39,11 @@ <i class="ent ent-creative-commons-attribution"></i>

<i class="ent ent-creative-commons-noncommercial-eu"></i> <i class="ent ent-creative-commons-sharealike"></i> </p> + <p> + <a href="https://webring.xxiivv.com/#h3rald" target="_blank" rel="noopener"> + <img class="webring" src="/images/webring.icon.white.svg" alt="XXIIVV webring"/> + </a> + </p> </footer> <script src="/js/es6-shim.min.js" type="text/javascript"></script> <script src="/js/axios.min.js" type="text/javascript"></script>