MCPcopy Create free account
hub / github.com/antirez/ds4 / log_context_memory

Function log_context_memory

ds4_cli.c:192–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190static int parse_nonnegative_int(const char *s, const char *opt) {
191 char *end = NULL;
192 long v = strtol(s, &end, 10);
193 if (s[0] == '\0' || *end != '\0' || v < 0 || v > INT32_MAX) {
194 fprintf(stderr, "ds4: invalid value for %s: %s\n", opt, s);
195 exit(2);
196 }
197 return (int)v;
198}
199
200static uint64_t parse_u64(const char *s, const char *opt) {
201 char *end = NULL;
202 unsigned long long v = strtoull(s, &end, 10);
203 if (s[0] == '\0' || *end != '\0' || v == 0) {
204 fprintf(stderr, "ds4: invalid value for %s: %s\n", opt, s);
205 exit(2);
206 }
207 return (uint64_t)v;
208}
209
210static float parse_float_range(const char *s, const char *opt, float min, float max) {

Callers 2

run_replFunction · 0.70
mainFunction · 0.70

Calls 2

ds4_backend_nameFunction · 0.85

Tested by

no test coverage detected