Ejemplo n.º 1
0
static void duration(char *buffer, void *_time)
{
	/* DivingLog 5.08 (and maybe other versions) appear to sometimes
	 * store the dive time as 44.00 instead of 44:00;
	 * This attempts to parse this in a fairly robust way */
	if (!strchr(buffer,':') && strchr(buffer,'.')) {
		char *mybuffer = strdup(buffer);
		char *dot = strchr(mybuffer,'.');
		*dot = ':';
		sampletime(mybuffer, _time);
	} else {
		sampletime(buffer, _time);
	}
}
Ejemplo n.º 2
0
static void eventtime(char *buffer, void *_duration)
{
	duration_t *duration = _duration;
	sampletime(buffer, duration);
	if (sample)
		duration->seconds += sample->time.seconds;
}
Ejemplo n.º 3
0
static void duration(char *buffer, void *_time)
{
	sampletime(buffer, _time);
}