• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/xnu-2782.1.97/bsd/kern/

Lines Matching refs:sbuf

50 #include <sys/sbuf.h>
53 /* MALLOC_DEFINE(M_SBUF, "sbuf", "string buffers"); */
90 _assert_sbuf_integrity(const char *fun, struct sbuf *s)
93 ("%s called with a NULL sbuf pointer", fun));
95 ("%s called with uninitialized or corrupt sbuf", fun));
97 ("wrote past end of sbuf (%d >= %d)", s->s_len, s->s_size));
101 _assert_sbuf_state(const char *fun, struct sbuf *s, int state)
104 ("%s called with %sfinished or corrupt sbuf", fun,
132 * Extend an sbuf.
135 sbuf_extend(struct sbuf *s, int addlen)
158 * Initialize an sbuf.
162 struct sbuf *
163 sbuf_new(struct sbuf *s, char *buf, int length, int flags)
166 ("attempt to create an sbuf of negative length (%d)", length));
172 s = (struct sbuf *)SBMALLOC(sizeof *s);
201 * Create an sbuf with uio data
203 struct sbuf *
204 sbuf_uionew(struct sbuf *s, struct uio *uio, int *error)
228 * Clear an sbuf and reset its position.
231 sbuf_clear(struct sbuf *s)
242 * Set the sbuf's end position to an arbitrary value.
243 * Effectively truncates the sbuf at the new position.
246 sbuf_setpos(struct sbuf *s, int pos)
254 ("attempt to seek past end of sbuf (%d >= %d)", pos, s->s_size));
263 * Append a byte string to an sbuf.
266 sbuf_bcat(struct sbuf *s, const void *buf, size_t len)
290 * Copy a byte string from userland into an sbuf.
293 sbuf_bcopyin(struct sbuf *s, const void *uaddr, size_t len)
316 * Copy a byte string into an sbuf.
319 sbuf_bcpy(struct sbuf *s, const void *buf, size_t len)
329 * Append a string to an sbuf.
332 sbuf_cat(struct sbuf *s, const char *str)
354 * Append a string from userland to an sbuf.
357 sbuf_copyin(struct sbuf *s, const void *uaddr, size_t len)
389 * Copy a string into an sbuf.
392 sbuf_cpy(struct sbuf *s, const char *str)
402 * Format the given argument list and append the resulting string to an sbuf.
405 sbuf_vprintf(struct sbuf *s, const char *fmt, va_list ap)
441 ("wrote past end of sbuf (%d >= %d)", s->s_len, s->s_size));
449 * Format the given arguments and append the resulting string to an sbuf.
452 sbuf_printf(struct sbuf *s, const char *fmt, ...)
464 * Append a character to an sbuf.
467 sbuf_putc(struct sbuf *s, int c)
491 * Trim whitespace characters from end of an sbuf.
494 sbuf_trim(struct sbuf *s)
509 * Check if an sbuf overflowed
512 sbuf_overflowed(struct sbuf *s)
518 * Finish off an sbuf.
521 sbuf_finish(struct sbuf *s)
532 * Return a pointer to the sbuf data.
535 sbuf_data(struct sbuf *s)
544 * Return the length of the sbuf data.
547 sbuf_len(struct sbuf *s)
558 * Clear an sbuf, free its buffer if necessary.
561 sbuf_delete(struct sbuf *s)
577 * Check if an sbuf has been finished.
580 sbuf_done(struct sbuf *s)