mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-12 22:19:10 +00:00
Auto-generate some documentation
This commit is contained in:
parent
117d0111ab
commit
13437dd19b
97 changed files with 2033 additions and 661 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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 0≤arity≤3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue