MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / tp_put

Function tp_put

tests/test_doc_links_pdf.c:38–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36} tp_buf_t;
37
38static void tp_put(tp_buf_t *b, const void *s, size_t n) {
39 if (b->n + n + 1 > b->cap) {
40 size_t cap = b->cap ? b->cap * 2 : 4096;
41 while (cap < b->n + n + 1) {
42 cap *= 2;
43 }
44 b->p = (unsigned char *)realloc(b->p, cap);
45 b->cap = cap;
46 }
47 memcpy(b->p + b->n, s, n);
48 b->n += n;
49 b->p[b->n] = 0;
50}
51
52static void tp_puts(tp_buf_t *b, const char *s) {
53 tp_put(b, s, strlen(s));

Callers 9

tp_putsFunction · 0.85
tp_pdfFunction · 0.85
tp_objstm_chainFunction · 0.85
tp_compressedFunction · 0.85
tp_ahxFunction · 0.85
tp_a85Function · 0.85
tp_xrefstm_sectionsFunction · 0.85
tp_write_pdfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected