Auto-generate some documentation

This commit is contained in:
Justine Tunney 2020-12-26 02:09:07 -08:00
parent 117d0111ab
commit 13437dd19b
97 changed files with 2033 additions and 661 deletions

View file

@ -27,10 +27,10 @@
/**
* Decodes human-readable CP437 glyphs into binary, e.g.
*
* char binged[5];
* char golden[5] = "\0\1\2\3\4";
* unbingbuf(binged, sizeof(binged), u" ☺☻♥♦", -1);
* CHECK_EQ(0, memcmp(binged, golden, 5));
* char binged[5];
* char golden[5] = "\0\1\2\3\4";
* unbingbuf(binged, sizeof(binged), u" ☺☻♥♦", -1);
* CHECK_EQ(0, memcmp(binged, golden, 5));
*
* @param buf is caller owned
* @param size is byte length of buf

View file

@ -24,7 +24,7 @@
/**
* Decodes human-readable CP437 glyphs into binary, e.g.
*
* CHECK_EQ(0, memcmp(gc(unbingstr(u" ☺☻♥♦")), "\0\1\2\3\4", 5));
* CHECK_EQ(0, memcmp(gc(unbingstr(u" ☺☻♥♦")), "\0\1\2\3\4", 5));
*
* @param buf is caller owned
* @param size is byte length of buf

View file

@ -24,12 +24,12 @@
/**
* Joins paths, e.g.
*
* "a" + "b" "a/b"
* "a/" + "b" "a/b"
* "a" + "b/" "a/b/"
* "a" + "/b" "/b"
* "." + "b" "b"
* "" + "b" "b"
* "a" + "b" "a/b"
* "a/" + "b" "a/b"
* "a" + "b/" "a/b/"
* "a" + "/b" "/b"
* "." + "b" "b"
* "" + "b" "b"
*
* @return newly allocated string of resulting path
*/

View file

@ -26,8 +26,8 @@
/**
* Installs handler for kernel interrupt, e.g.:
*
* onctrlc(sig) { exit(128+sig); }
* CHECK_NE(-1, xsigaction(SIGINT, onctrlc, SA_RESETHAND, 0, 0));
* onctrlc(sig) { exit(128+sig); }
* CHECK_NE(-1, xsigaction(SIGINT, onctrlc, SA_RESETHAND, 0, 0));
*
* @param sig can be SIGINT, SIGTERM, etc.
* @param handler is SIG_DFL, SIG_IGN, or a pointer to a 0arity3