Lines Matching defs:cb

1176 	char_buf_t *cb;
1180 if ((cb = alloc_char_buf(CB_DEFAULT_LEN)) == NULL) {
1183 if (set_char_buf(cb, "%s.default", pool_elem_class_string(pe)) !=
1185 free_char_buf(cb);
1188 if (pool_value_set_name(props[0], cb->cb_buf) != PO_SUCCESS) {
1189 free_char_buf(cb);
1192 free_char_buf(cb);
1304 char_buf_t *cb;
1315 if ((cb = alloc_char_buf(CB_DEFAULT_LEN)) == NULL) {
1318 if (set_char_buf(cb, "%s.sys_id", type) != PO_SUCCESS) {
1319 free_char_buf(cb);
1322 if (pool_value_set_name(props[1], cb->cb_buf) != PO_SUCCESS) {
1323 free_char_buf(cb);
1326 free_char_buf(cb);
1506 resize_char_buf(char_buf_t *cb, size_t size)
1510 if ((re_cb = realloc(cb->cb_buf, size)) == NULL) {
1515 if (cb->cb_buf == NULL)
1518 if (size < cb->cb_size)
1520 cb->cb_buf = re_cb;
1521 cb->cb_size = size;
1534 char_buf_t *cb;
1536 if ((cb = malloc(sizeof (char_buf_t))) == NULL) {
1540 (void) memset(cb, 0, sizeof (char_buf_t));
1542 if (resize_char_buf(cb, size + 1) == PO_FAIL) {
1543 free(cb);
1546 return (cb);
1553 free_char_buf(char_buf_t *cb)
1555 free((void *)cb->cb_buf);
1556 free(cb);
1567 set_char_buf(char_buf_t *cb, const char *fmt, ...)
1573 if ((new_size = vsnprintf(cb->cb_buf, cb->cb_size, fmt, ap)) >=
1574 cb->cb_size) {
1575 if (resize_char_buf(cb, new_size + 1) != PO_SUCCESS) {
1579 (void) vsnprintf(cb->cb_buf, cb->cb_size, fmt, ap);
1593 append_char_buf(char_buf_t *cb, const char *fmt, ...)
1600 if (cb->cb_buf != NULL)
1601 old_len = strlen(cb->cb_buf);
1604 if (new_len + old_len >= cb->cb_size) {
1605 if (resize_char_buf(cb, old_len + new_len + 1) !=
1614 (void) vsnprintf(&cb->cb_buf[old_len], cb->cb_size - old_len, fmt, ap);