54 for(ptr=0;ptr<p_length;ptr++)
56 if (p_string[ptr] ==
':')
58 if (splitptr >= 2)
throw std::runtime_error(
"invalid INDEX time syntax");
59 splitmarks[splitptr++] = ptr;
61 else if (!
pfc::char_is_numeric(p_string[ptr]))
throw std::runtime_error(
"invalid INDEX time syntax");
64 t_size minutes_base = 0, minutes_length = 0, seconds_base = 0, seconds_length = 0, frames_base = 0, frames_length = 0;
70 frames_length = p_length;
74 seconds_length = splitmarks[0];
75 frames_base = splitmarks[0] + 1;
76 frames_length = p_length - frames_base;
80 minutes_length = splitmarks[0];
81 seconds_base = splitmarks[0] + 1;
82 seconds_length = splitmarks[1] - seconds_base;
83 frames_base = splitmarks[1] + 1;
84 frames_length = p_length - frames_base;
90 if (frames_length > 0) ret +=
pfc::atoui_ex(p_string + frames_base,frames_length);
91 if (seconds_length > 0) ret += 75 *
pfc::atoui_ex(p_string + seconds_base,seconds_length);
92 if (minutes_length > 0) ret += 60 * 75 *
pfc::atoui_ex(p_string + minutes_base,minutes_length);
t_size strlen_max(const char *ptr, t_size max)
unsigned atoui_ex(const char *p_string, t_size p_string_len)
bool char_is_numeric(char_t p_char)