Update ohex doc to 0.1.0.

This commit is contained in:
Hannes Mehnert 2024-03-14 21:47:23 +01:00
parent c464eea71d
commit a05c98694a
39 changed files with 2130 additions and 0 deletions

19
doc/index.html Normal file
View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>index</title>
<link rel="stylesheet" href="./odoc.support/odoc.css"/>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1.0"/>
</head>
<body>
<main class="content">
<div class="by-name">
<h2>OCaml package documentation</h2>
<ol>
<li><a href="ohex/index.html">ohex</a> <span class="version">0.1.0</span></li>
</ol>
</div>
</main>
</body>
</html>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

1
doc/odoc.support/katex.min.css vendored Normal file

File diff suppressed because one or more lines are too long

1
doc/odoc.support/katex.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1393
doc/odoc.support/odoc.css Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,66 @@
/* The browsers interpretation of the CORS origin policy prevents to run
webworkers from javascript files fetched from the file:// protocol. This hack
is to workaround this restriction. */
function createWebWorker() {
var searchs = search_urls.map((search_url) => {
let parts = document.location.href.split("/");
parts[parts.length - 1] = search_url;
return '"' + parts.join("/") + '"';
});
blobContents = ["importScripts(" + searchs.join(",") + ");"];
var blob = new Blob(blobContents, { type: "application/javascript" });
var blobUrl = URL.createObjectURL(blob);
var worker = new Worker(blobUrl);
URL.revokeObjectURL(blobUrl);
return worker;
}
var worker;
var waiting = 0;
function wait() {
waiting = waiting + 1;
document.querySelector(".search-snake").classList.add("search-busy");
}
function stop_waiting() {
if (waiting > 0) waiting = waiting - 1;
else waiting = 0;
if (waiting == 0) {
document.querySelector(".search-snake").classList.remove("search-busy");
}
}
document.querySelector(".search-bar").addEventListener("focus", (ev) => {
if (typeof worker == "undefined") {
worker = createWebWorker();
worker.onmessage = (e) => {
stop_waiting();
let results = e.data;
let search_results = document.querySelector(".search-result");
search_results.innerHTML = "";
let f = (entry) => {
let search_result = document.createElement("a");
search_result.classList.add("search-entry");
search_result.href = base_url + entry.url;
search_result.innerHTML = entry.html;
search_results.appendChild(search_result);
};
results.forEach(f);
let search_request = document.querySelector(".search-bar").value;
if (results.length == 0 && search_request != "") {
let no_result = document.createElement("div");
no_result.classList.add("search-no-result");
no_result.innerText = "No result...";
search_results.appendChild(no_result);
}
};
}
});
document.querySelector(".search-bar").addEventListener("input", (ev) => {
wait();
worker.postMessage(ev.target.value);
});

14
doc/ohex/Ohex/index.html Normal file
View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Ohex (ohex.Ohex)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> <a href="../index.html">ohex</a> &#x00BB; Ohex</nav><header class="odoc-preamble"><h1>Module <code><span>Ohex</span></code></h1><p>Convert from and to hexadecimal representation.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-required_length"><a href="#val-required_length" class="anchor"></a><code><span><span class="keyword">val</span> required_length : <span><span class="optlabel">?skip_whitespace</span>:bool <span class="arrow">&#45;&gt;</span></span> <span>string <span class="arrow">&#45;&gt;</span></span> int</span></code></div><div class="spec-doc"><p><code>required_length ~skip_whitespace s</code> returns the length needed when the hex string <code>s</code> would be decoded into a sequence of octets. The argument <code>skip_whitespace</code> defaults to <code>true</code>, and skips any whitespace characters (' ', '\n', '\r', '\t'). This function is useful for estimating the space required for <code>decode_into</code>.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if any character in <code>s</code> is not a hex character, or an odd amount of characters are present.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-decode"><a href="#val-decode" class="anchor"></a><code><span><span class="keyword">val</span> decode : <span><span class="optlabel">?skip_whitespace</span>:bool <span class="arrow">&#45;&gt;</span></span> <span>string <span class="arrow">&#45;&gt;</span></span> string</span></code></div><div class="spec-doc"><p><code>decode ~skip_whitespace s</code> decodes a hex string <code>s</code> into a sequence of octets. The argument <code>skip_whitespace</code> defaults to <code>true</code>, and skips any whitespace characters in <code>s</code> (' ', '\n', '\r', '\t'). An example: <code>decode &quot;4142&quot; = &quot;AB&quot;</code>.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if any character in <code>s</code> is not a hex character, or an odd amount of characters are present.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-decode_into"><a href="#val-decode_into" class="anchor"></a><code><span><span class="keyword">val</span> decode_into :
<span><span class="optlabel">?skip_whitespace</span>:bool <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
<span>bytes <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?off</span>:int <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div><div class="spec-doc"><p><code>decode_into ~skip_whitespace s dst ~off ()</code> decodes <code>s</code> into <code>dst</code> starting at <code>off</code> (defaults to 0). The argument <code>skip_whitespace</code> defaults to <code>true</code> and skips any whitespace characters.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if any character in <code>s</code> is not a hex character, an odd amount of characters are present, or <code>dst</code> does not contain enough space.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-encode"><a href="#val-encode" class="anchor"></a><code><span><span class="keyword">val</span> encode : <span>string <span class="arrow">&#45;&gt;</span></span> string</span></code></div><div class="spec-doc"><p><code>encode s</code> encodes <code>s</code> into a freshly allocated string of double size, where each character in <code>s</code> is encoded as two hex digits in the returned string. An example: <code>encode &quot;AB&quot; = &quot;4142&quot;</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-encode_into"><a href="#val-encode_into" class="anchor"></a><code><span><span class="keyword">val</span> encode_into : <span>string <span class="arrow">&#45;&gt;</span></span> <span>bytes <span class="arrow">&#45;&gt;</span></span> <span><span class="optlabel">?off</span>:int <span class="arrow">&#45;&gt;</span></span> <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p><code>encode_into s dst ~off ()</code> encodes <code>s</code> into <code>dst</code> starting at <code>off</code> (defaults to 0). Each character is encoded as two hex digits in <code>dst</code>.</p><ul class="at-tags"><li class="raises"><span class="at-tag">raises</span> <code>Invalid_argument</code> <p>if <code>dst</code> does not contain enough space.</p></li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span><span class="keyword">val</span> pp :
<span><span class="optlabel">?row_numbers</span>:bool <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?chars</span>:bool <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>
<span><span class="xref-unresolved">Stdlib</span>.Format.formatter <span class="arrow">&#45;&gt;</span></span>
<span>string <span class="arrow">&#45;&gt;</span></span>
unit</span></code></div><div class="spec-doc"><p><code>pp ~row_numbers ~chars () ppf s</code> pretty-prints the string <code>s</code> in hexadecimal (similar to <code>hexdump -C</code>). If <code>row_numbers</code> is provided (defaults to <code>true</code>), each output line is prefixed with the row number. If <code>chars</code> is provided (defaults to <code>true</code>), in the last column the ASCII string is printed (non-printable characters are printed as '.').</p></div></div></div></body></html>

2
doc/ohex/index.html Normal file
View file

@ -0,0 +1,2 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>index (ohex.index)</title><meta charset="utf-8"/><link rel="stylesheet" href="../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> ohex</nav><header class="odoc-preamble"><h1 id="ohex-index"><a href="#ohex-index" class="anchor"></a>ohex index</h1></header><nav class="odoc-toc"><ul><li><a href="#library-ohex">Library ohex</a></li></ul></nav><div class="odoc-content"><h2 id="library-ohex"><a href="#library-ohex" class="anchor"></a>Library ohex</h2><p>The entry point of this library is the module: <a href="Ohex/index.html"><code>Ohex</code></a>.</p></div></body></html>