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 memcpy(info->author, url, len);
23 info->author[len] = 0;
24 info->contents |= URL_INFO_AUTHOR;
26 if (c == NULL || c[1] == 0)
27 return info->contents;
29 info->record = strtoull(c + 1, NULL, 10);
30 info->contents |= URL_INFO_RECORD;
33 if (c == NULL || c[1] == 0)
34 return info->contents;
36 info->record_to = strtoull(c + 1, NULL, 10);
37 info->contents |= URL_INFO_RECORD_TO;
39 return info->contents;
42 uint64_t *make_sequential_list(uint64_t from, uint64_t to) {
43 uint64_t len = to - from + 1;
44 uint64_t *list = malloc(len * sizeof(uint64_t));
47 for (i = 0; i < len; i++) {