aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/std.zc32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/std.zc b/src/lib/std.zc
index f232422..dfa9841 100644
--- a/src/lib/std.zc
+++ b/src/lib/std.zc
@@ -13,12 +13,12 @@ include rt, run;
// the constructors arena(n) and bnew(n) and the argv helpers are plain
// functions, because an owned result has to carry its .u tag.
-//: ---- the command line and the environment ----
+// ---- the command line and the environment ----
-//: argc and argv, envc and envp, as passed to main by c. a zc string is
-//: one character per word, so an array of them is char*[?]. libinit() fills
-//: these and the runtime calls it before main, if the program has one (an
-//: image built by build_image, or a check-mode document, does not).
+// argc and argv, envc and envp, as passed to main by c. a zc string is
+// one character per word, so an array of them is char*[?]. libinit() fills
+// these and the runtime calls it before main, if the program has one (an
+// image built by build_image, or a check-mode document, does not).
int argc;
char*[?] argv;
@@ -59,7 +59,7 @@ int libinit() {
return 0;
}
-//: ---- capturing output ----
+// ---- capturing output ----
// capture.start() redirects everything the program writes into a string and
// returns it. writes go to the buffer instead of the terminal until end()
@@ -90,7 +90,7 @@ struct capture {
}
}
-//: ---- character strings ----
+// ---- character strings ----
struct Text {
// the number written in decimal at the start of s. a leading '-' makes it
@@ -246,7 +246,7 @@ struct Text {
}
}
-//: ---- numbers ----
+// ---- numbers ----
// plain integer helpers. none of them can fail: an out of range result wraps
// the same way the arithmetic does.
@@ -331,9 +331,9 @@ struct Num {
}
}
-//: ---- the host ----
+// ---- the host ----
-//: the argument block for Host.raw: the number, then its six arguments.
+// the argument block for Host.raw: the number, then its six arguments.
int rawblk[7];
struct Host {
@@ -378,7 +378,7 @@ struct Host {
}
}
-//: ---- byte strings ----
+// ---- byte strings ----
// the same helpers for packed byte strings. character-string helpers above are unchanged.
// a packed byte string has type bstr; len_s reads its stored byte length.
@@ -468,7 +468,7 @@ struct Bytes {
}
}
-//: ---- arenas ----
+// ---- arenas ----
// a region that is freed all at once.
// n: its capacity in words; values below 1 allocate one word
@@ -489,7 +489,7 @@ struct Arena {
static int reset(word a) { return rt.arena_reset(a); }
}
-//: ---- growable byte buffers ----
+// ---- growable byte buffers ----
// a byte buffer stores its length and capacity in two words, followed by the
// bytes, packed.
@@ -537,9 +537,9 @@ struct Buf {
}
}
-//: array algorithms borrow their input and visit elements in index order.
-//: map and filter return independent handles. reference elements are shared
-//: with the collector, so freeing the input does not invalidate the result.
+// array algorithms borrow their input and visit elements in index order.
+// map and filter return independent handles. reference elements are shared
+// with the collector, so freeing the input does not invalidate the result.
// the first index equal to value, or -1 when no element matches.
int array_find<T>(fixed T[?].m source, T value) {