stew

a monorepo of some sort
git clone git://git.nsmpr.xyz/stew.git
Log | Files | Refs

reader.c (238B)


      1 #include <u.h>
      2 #include <libc.h>
      3 #define BSize (1024 * 1024 * 64)
      4 void
      5 main(void)
      6 {
      7 	long n;
      8 	char *buf = malloc(BSize);
      9 	while ((n = read(0, buf, BSize)) > 0) {
     10 		fprint(2, "reader: %ld/%d\n", n, BSize);
     11 	}
     12 	if (n < 0) sysfatal("%r");
     13 }