9 #define ROUNDUP(n) ((n+CHUNK)&~(CHUNK-1))
12 _frallocstr(Frame *f, unsigned n)
16 p = malloc(ROUNDUP(n));
18 drawerror(f->display, "out of memory");
23 _frinsure(Frame *f, int bn, unsigned n)
30 drawerror(f->display, "_frinsure");
31 if(ROUNDUP(b->nrune) > n) /* > guarantees room for terminal NUL */
33 p = _frallocstr(f, n);
35 memmove(p, b->ptr, NBYTE(b)+1);