Artifact 25e9d731b6809c3e429110ccd417e02702f16ee16fae9f8065fd2ee822a39c53:
- File mod/kstr/bufmk.fn.c — part of check-in [8d6b36fcac] at 2019-10-30 07:44:12 on branch trunk — factor out write buffer code so any module and libk users can call it; update documentation to match; add kssz string length function (user: lexi, size: 192) [annotate] [blame] [check-ins using]
#include <k/type.h> #include <k/str.h> ksbuf* ksbufmk (void* where, kiochan channel, sz run) { ksbuf* r = where; r -> cur = r -> buf; r -> channel = channel; r -> run = run; return r; }