Lines Matching refs:buf
115 b.len = vp2buf(myself, &b.buf, b.len, fmt, ap);
120 defErr->message = b.buf;
127 sfree(b.buf);
434 * result to '*buf'.
437 vp2buf(const char *msg, char **buf, int buflen, const char *fmt, va_list ap) {
444 if (buf == 0 || buflen < 0 || fmt == 0) {
460 *buf = scat(msg, T, *buf, newbuf);
476 pb.len = vp2buf(msg, &pb.buf, pb.len, fmt, ap);
486 b->len = vp2buf(msg, &b->buf, b->len, fmt, ap);
490 /* Copy 'buf' to the specified __nis_buffer_t */
492 bc2buf(const char *msg, void *buf, int len, __nis_buffer_t *b) {
501 new = realloc(b->buf, b->len+len+1);
503 b->buf = new;
504 memcpy(&(b->buf[b->len]), buf, len);
507 if (b->len > 0 && b->buf[b->len-1] != '\0')
508 b->buf[b->len] = '\0';
517 sbc2buf(const char *msg, void *buf, int len, __nis_buffer_t *b) {
518 if (buf == 0 || len <= 0 || b == 0)
521 while (len > 0 && ((char *)buf)[len-1] == '\0')
525 bc2buf(msg, buf, len, b);
528 /* Copy 'buf' to the generic __nis_buffer_t */
530 c2buf(const char *msg, void *buf, int len) {
531 bc2buf(msg, buf, len, &pb);
536 sc2buf(const char *msg, void *buf, int len) {
537 sbc2buf(msg, buf, len, &pb);
548 if (pb.buf != 0) {
552 tmp = write(1, pb.buf, len);
561 free(pb.buf);
562 pb.buf = 0;