1 /* Blerg is (C) 2011 The Dominion of Awesome, and is distributed under a
2 * BSD-style license. Please see the COPYING file for details.
9 int parse_url_info(const char *url, struct url_info *info) {
22 if (len > MAX_TAG_LENGTH)
24 memcpy(info->name, url, len);
26 info->contents |= URL_INFO_NAME;
28 if (c == NULL || c[1] == 0)
29 return info->contents;
31 info->record = strtoull(c + 1, NULL, 10);
32 info->contents |= URL_INFO_RECORD;
35 if (c == NULL || c[1] == 0)
36 return info->contents;
38 info->record_to = strtoull(c + 1, NULL, 10);
39 info->contents |= URL_INFO_RECORD_TO;
41 return info->contents;
44 uint64_t *make_sequential_list(uint64_t from, uint64_t to) {
45 uint64_t len = to - from + 1;
46 uint64_t *list = malloc(len * sizeof(uint64_t));
49 for (i = 0; i < len; i++) {