MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / d_fetchstr

Function d_fetchstr

dep/hfsutils/libhfs/data.c:365–379  ·  view source on GitHub ↗

* NAME: data->fetchstr() * DESCRIPTION: incrementally retrieve a string */

Source from the content-addressed store, hash-verified

363 * DESCRIPTION: incrementally retrieve a string
364 */
365void d_fetchstr(const unsigned char **ptr, char *dest, unsigned size)
366{
367 unsigned len;
368
369 len = d_getub(*ptr);
370
371 if (len > 0 && len < size)
372 memcpy(dest, *ptr + 1, len);
373 else
374 len = 0;
375
376 dest[len] = 0;
377
378 *ptr += size;
379}
380
381/*
382 * NAME: data->storestr()

Callers 4

l_getbbFunction · 0.85
l_getmdbFunction · 0.85
r_unpackcatkeyFunction · 0.85
r_unpackcatdataFunction · 0.85

Calls 1

d_getubFunction · 0.85

Tested by

no test coverage detected