Artifact ee66dac973fdb8f9151d7a06df206a69811a7b6a63f43662408f6f3b6ec47645:
- File notes.c — part of check-in [5781ae8096] at 2026-11-26 04:32:02 on branch trunk — Print notes wrapped, using wrap from vendor/wrap. (user: dmestas, size: 358) [annotate] [blame] [check-ins using]
/* notes: print a note from stdin, wrapped to a width (default 40). */ #include <stdio.h> #include <stdlib.h> #include "vendor/wrap/wrap.h" int main(int argc, char **argv){ static char buf[65536]; int width = argc > 1 ? atoi(argv[1]) : 40; size_t n = fread(buf, 1, sizeof buf - 1, stdin); buf[n] = 0; wrap_print(stdout, buf, width); return 0; }