static int parse_interval(Interval *interval, int interval_count,

                          const char **buf, void *log_ctx)

{

    char *intervalstr;

    int ret;



    *buf += strspn(*buf, SPACES);

    if (!**buf)

        return 0;



    /* reset data */

    memset(interval, 0, sizeof(Interval));

    interval->index = interval_count;



    /* format: INTERVAL COMMANDS */



    /* parse interval */

    intervalstr = av_get_token(buf, DELIMS);

    if (intervalstr && intervalstr[0]) {

        char *start, *end;



        start = av_strtok(intervalstr, "-", &end);








        if ((ret = av_parse_time(&interval->start_ts, start, 1)) < 0) {


                   "Invalid start time specification '%s' in interval #%d\n",

                   start, interval_count);





        if (end) {

            if ((ret = av_parse_time(&interval->end_ts, end, 1)) < 0) {


                       "Invalid end time specification '%s' in interval #%d\n",

                       end, interval_count);



        } else {

            interval->end_ts = INT64_MAX;


        if (interval->end_ts < interval->start_ts) {


                   "Invalid end time '%s' in interval #%d: "

                   "cannot be lesser than start time '%s'\n",

                   end, interval_count, start);




    } else {


               "No interval specified for interval #%d\n", interval_count);






    /* parse commands */

    ret = parse_commands(&interval->commands, &interval->nb_commands,

                         interval_count, buf, log_ctx);



end:

    av_free(intervalstr);

    return ret;

static int parse_interval(Interval *interval, int interval_count,

                          const char **buf, void *log_ctx)

{

    char *intervalstr;

    int ret;



    *buf += strspn(*buf, SPACES);

    if (!**buf)

        return 0;



    

    memset(interval, 0, sizeof(Interval));

    interval->index = interval_count;



    



    

    intervalstr = av_get_token(buf, DELIMS);

    if (intervalstr && intervalstr[0]) {

        char *start, *end;



        start = av_strtok(intervalstr, "-", &end);








        if ((ret = av_parse_time(&interval->start_ts, start, 1)) < 0) {


                   "Invalid start time specification '%s' in interval #%d\n",

                   start, interval_count);





        if (end) {

            if ((ret = av_parse_time(&interval->end_ts, end, 1)) < 0) {


                       "Invalid end time specification '%s' in interval #%d\n",

                       end, interval_count);



        } else {

            interval->end_ts = INT64_MAX;


        if (interval->end_ts < interval->start_ts) {


                   "Invalid end time '%s' in interval #%d: "

                   "cannot be lesser than start time '%s'\n",

                   end, interval_count, start);




    } else {


               "No interval specified for interval #%d\n", interval_count);






    

    ret = parse_commands(&interval->commands, &interval->nb_commands,

                         interval_count, buf, log_ctx);



end:

    av_free(intervalstr);

    return ret;

static int FUNC_0(Interval *VAR_0, int VAR_1,

                          const char **VAR_2, void *VAR_3)

{

    char *VAR_4;

    int VAR_5;



    *VAR_2 += strspn(*VAR_2, SPACES);

    if (!**VAR_2)

        return 0;



    

    memset(VAR_0, 0, sizeof(Interval));

    VAR_0->index = VAR_1;



    



    

    VAR_4 = av_get_token(VAR_2, DELIMS);

    if (VAR_4 && VAR_4[0]) {

        char *VAR_6, *VAR_7;



        VAR_6 = av_strtok(VAR_4, "-", &VAR_7);








        if ((VAR_5 = av_parse_time(&VAR_0->start_ts, VAR_6, 1)) < 0) {


                   "Invalid VAR_6 time specification '%s' in VAR_0 #%d\n",

                   VAR_6, VAR_1);





        if (VAR_7) {

            if ((VAR_5 = av_parse_time(&VAR_0->end_ts, VAR_7, 1)) < 0) {


                       "Invalid VAR_7 time specification '%s' in VAR_0 #%d\n",

                       VAR_7, VAR_1);



        } else {

            VAR_0->end_ts = INT64_MAX;


        if (VAR_0->end_ts < VAR_0->start_ts) {


                   "Invalid VAR_7 time '%s' in VAR_0 #%d: "

                   "cannot be lesser than VAR_6 time '%s'\n",

                   VAR_7, VAR_1, VAR_6);




    } else {


               "No VAR_0 specified for VAR_0 #%d\n", VAR_1);






    

    VAR_5 = parse_commands(&VAR_0->commands, &VAR_0->nb_commands,

                         VAR_1, VAR_2, VAR_3);



VAR_7:

    av_free(VAR_4);

    return VAR_5;

static int FUNC_0(Interval *VAR_0, int VAR_1,
const char **VAR_2, void *VAR_3)
{ char *VAR_4; int VAR_5; *VAR_2 += strspn(*VAR_2, SPACES); if (!**VAR_2)
return 0; memset(VAR_0, 0, sizeof(Interval)); VAR_0->index = VAR_1; VAR_4 = av_get_token(VAR_2, DELIMS); if (VAR_4 && VAR_4[0]) { char *VAR_6, *VAR_7; VAR_6 = av_strtok(VAR_4, "-", &VAR_7); if ((VAR_5 = av_parse_time(&VAR_0->start_ts, VAR_6, 1)) < 0) { "Invalid VAR_6 time specification '%s' in VAR_0 #%d\n",
VAR_6, VAR_1); if (VAR_7) { if ((VAR_5 = av_parse_time(&VAR_0->end_ts, VAR_7, 1)) < 0) { "Invalid VAR_7 time specification '%s' in VAR_0 #%d\n",
VAR_7, VAR_1); } else { VAR_0->end_ts = INT64_MAX; if (VAR_0->end_ts < VAR_0->start_ts) { "Invalid VAR_7 time '%s' in VAR_0 #%d: "
"cannot be lesser than VAR_6 time '%s'\n",
VAR_7, VAR_1, VAR_6); } else { "No VAR_0 specified for VAR_0 #%d\n", VAR_1); VAR_5 = parse_commands(&VAR_0->commands, &VAR_0->nb_commands,
VAR_1, VAR_2, VAR_3); VAR_7:
av_free(VAR_4); return VAR_5;