static report_result_t *parse_reported_line(const char *line)
{
    report_result_t *result = xzalloc(sizeof(*result));

    //result->whole_line = xstrdup(line);
    for (;;)
    {
        line = skip_whitespace(line);
        if (!*line)
            break;
        const char *end = skip_non_whitespace(line);
        if (prefixcmp(line, "MSG=") == 0)
        {
            result->msg = xstrdup(line + 4);
            /* MSG=... eats entire line: exiting the loop */
            break;
        }
        if (prefixcmp(line, "URL=") == 0)
        {
            free(result->url);
            result->url = xstrndup(line + 4, end - (line + 4));
        }
        if (prefixcmp(line, "BTHASH=") == 0)
        {
            free(result->bthash);
            result->bthash = xstrndup(line + 7, end - (line + 7));
        }
        //else
        //if (strncmp(line, "TIME=", 5) == 0)
        //{
        //    free(result->time);
        //    result->time = foo(line + 5, end - (line + 5));
        //}
        //...
        line = end;
        continue;
    }

    return result;
}
static report_result_t *parse_reported_line(const char *line)
{
    report_result_t *result = xzalloc(sizeof(*result));

     
    for (;;)
    {
        line = skip_whitespace(line);
        if (!*line)
            break;
        const char *end = skip_non_whitespace(line);
        if (prefixcmp(line, "MSG=") == 0)
        {
            result->msg = xstrdup(line + 4);
             
            break;
        }
        if (prefixcmp(line, "URL=") == 0)
        {
            free(result->url);
            result->url = xstrndup(line + 4, end - (line + 4));
        }
        if (prefixcmp(line, "BTHASH=") == 0)
        {
            free(result->bthash);
            result->bthash = xstrndup(line + 7, end - (line + 7));
        }
         
         
         
         
         
         
         
        line = end;
        continue;
    }

    return result;
}