Lines Matching defs:buf
1050 /// void *buf = calloc(1,64*1024);
1051 /// nk_init_fixed(&ctx, buf, 64*1024);
1262 /// const struct nk_draw_command* nk__draw_end(const struct nk_context *ctx, const struct nk_buffer *buf);
5374 struct nk_popup_buffer buf;
5826 NK_LIB int nk_strfmt(char *buf, int buf_size, const char *fmt, va_list args);
6895 nk_vsnprintf(char *buf, int buf_size, const char *fmt, va_list args)
6921 NK_ASSERT(buf);
6923 if (!buf || !buf_size || !fmt) return 0;
6927 buf[len++] = *iter++;
6989 buf[len++] = '%';
6993 NK_ASSERT(str != buf && "buffer and argument are not allowed to overlap!");
6997 if (str == buf) return -1;
6999 buf[len++] = *str++;
7037 buf[len++] = '0';
7038 else buf[len++] = ' ';
7044 buf[len++] = '+';
7046 buf[len++] = ' ';
7051 buf[len++] = '0';
7058 buf[len++] = *num_iter++;
7063 buf[len++] = ' ';
7105 buf[len++] = '0';
7106 else buf[len++] = ' ';
7113 buf[len++] = '0';
7115 buf[len++] = '0';
7116 buf[len++] = 'x';
7118 buf[len++] = '0';
7119 buf[len++] = 'X';
7123 buf[len++] = '0';
7130 buf[len++] = number_buffer[num_len-1];
7137 buf[len++] = ' ';
7166 buf[len++] = '0';
7167 else buf[len++] = ' ';
7174 buf[len++] = '+';
7176 buf[len++] = ' ';
7180 buf[len++] = *num_iter;
7189 buf[len++] = '.';
7193 buf[len++] = '0';
7200 buf[len++] = ' ';
7208 buf[(len >= buf_size)?(buf_size-1):len] = 0;
7214 nk_strfmt(char *buf, int buf_size, const char *fmt, va_list args)
7217 NK_ASSERT(buf);
7219 if (!buf || !buf_size || !fmt) return 0;
7221 result = NK_VSNPRINTF(buf, (nk_size)buf_size, fmt, args);
7223 buf[buf_size-1] = 0;
7225 result = nk_vsnprintf(buf, buf_size, fmt, args);
7298 char *buf;
7318 buf = (char*)alloc->alloc(alloc->userdata,0, *siz);
7319 NK_ASSERT(buf);
7320 if (!buf) {
7324 *siz = (nk_size)fread(buf, 1,*siz, fd);
7326 return buf;
15153 struct nk_popup_buffer *buf;
15159 buf = &win->popup.buf;
15160 buf->begin = win->buffer.end;
15161 buf->end = win->buffer.end;
15162 buf->parent = win->buffer.last;
15163 buf->last = buf->begin;
15164 buf->active = nk_true;
15169 struct nk_popup_buffer *buf;
15174 buf = &win->popup.buf;
15175 buf->last = win->buffer.last;
15176 buf->end = win->buffer.end;
15189 struct nk_popup_buffer *buf;
15197 if (!win->popup.buf.active) return;
15199 buf = &win->popup.buf;
15201 parent_last = nk_ptr_add(struct nk_command, memory, buf->parent);
15202 parent_last->next = buf->end;
15249 struct nk_popup_buffer *buf;
15250 if (!it->popup.buf.active)
15253 buf = &it->popup.buf;
15254 cmd->next = buf->begin;
15255 cmd = nk_ptr_add(struct nk_command, buffer, buf->last);
15256 buf->active = nk_false;
16888 win->popup.buf.active = 0;
19435 char buf[256];
19436 nk_strfmt(buf, NK_LEN(buf), fmt, args);
19437 nk_label_colored(ctx, buf, flags, color);
19444 char buf[256];
19445 nk_strfmt(buf, NK_LEN(buf), fmt, args);
19446 nk_label_colored_wrap(ctx, buf, color);
19452 char buf[256];
19453 nk_strfmt(buf, NK_LEN(buf), fmt, args);
19454 nk_label(ctx, buf, flags);
19460 char buf[256];
19461 nk_strfmt(buf, NK_LEN(buf), fmt, args);
19462 nk_label_wrap(ctx, buf);
25412 char buf[256];
25413 nk_strfmt(buf, NK_LEN(buf), fmt, args);
25414 nk_tooltip(ctx, buf);