ref: ce0c4507d6c7e6460ed098e8a364194ea69b0e72
parent: a007855f2e510b6bac417fbf0d21527e54158466
author: glenda <glenda@9front.local>
date: Thu Nov 26 22:29:09 EST 2020
and a mkfile
--- /dev/null
+++ b/mkfile
@@ -1,0 +1,15 @@
+</$objtype/mkfile
+
+TARG=`{ls *.c | sed 's,\.c$,,'}
+PROGS=${TARG:%=%}
+
+all:V: $PROGS
+
+%: %.$O
+ $O^l -o $target $stem.$O
+
+%.$O: %.c
+ $O^c $stem.c
+
+clean:V:
+ rm -f *.$O $PROGS
--- /dev/null
+++ b/rate.c
@@ -1,0 +1,16 @@
+#include <u.h>
+#include <libc.h>
+
+void
+main(int argc, char **argv)
+{
+ int rate = atoi(argv[1]);
+ char *buf = malloc(rate);
+
+ for(;;){
+ if((readn(0, buf, rate)) < rate)
+ break;
+ write(1, buf, rate);
+ sleep(235);
+ }
+}