+ } else if (strcmp (name, "time") == 0) {
+ double limit;
+ char *end;
+ limit = strtod (value, &end);
+ while (isspace (*end))
+ end++;
+ if (*end == '\0') {
+ category->time_limit = limit;
+ } else {
+ fprintf (stderr, "Failed to parse time value: %s at %s:%d\n",
+ value, path, line_count);
+ exit (1);
+ }
+ } else if (strcmp (name, "challenge") == 0) {
+ if (strcmp (value, "text") == 0) {
+ category->challenge_type = CHALLENGE_TYPE_TEXT;
+ } else if (strcmp (value, "image") == 0) {
+ category->challenge_type = CHALLENGE_TYPE_IMAGE;
+ } else if (strcmp (value, "audio") == 0) {
+ category->challenge_type = CHALLENGE_TYPE_AUDIO;
+ } else if (strcmp (value, "midi") == 0) {
+ category->challenge_type = CHALLENGE_TYPE_MIDI;
+ } else if (strcmp (value, "text-to-speech") == 0) {
+ category->challenge_type = CHALLENGE_TYPE_TEXT_TO_SPEECH;
+ } else {
+ fprintf (stderr, "Unknown value for \"challenge\" option \"%s\" at %s:%d\n",
+ value, path, line_count);
+ exit (1);
+ }
+ } else if (strcmp (name, "repeat") == 0) {
+ if (strcmp (value, "0") == 0)
+ category->repeat = 0;
+ else
+ category->repeat = 1;