#include <mad.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <assert.h>
#include "common.h"
#include "parsetime.h"
#include "report.h"
#include "snprintf/snprintf.h"
Go to the source code of this file.
Functions | |
bool | isletter (char c) |
void | parse_timecount (int *h, int *min, int *s, int *ms, const char *expr) |
void | parse_partial_clock (int *h, int *min, int *s, int *ms, const char *expr) |
void | parse_full_clock (int *h, int *min, int *s, int *ms, const char *expr) |
mad_timer_t | convert_mad_timer_t (int *h, int *min, int *s, int *ms) |
unsigned long int | convert_milliseconds_from_time (int *h, int *min, int *s, int *ms) |
enum pt_type | type (const char *expr) |
mad_timer_t | parse_time_mad_time_t (const char *expr) |
unsigned long int | parse_time_milliseconds (const char *expr) |
unsigned long int | parse_time_get_dur (const char *start, const char *stop) |
|
converts h, min, s, ms to a mad_timer_t type
Definition at line 280 of file parsetime.c. References REP_DEBUG, report(), and STRLEN. Referenced by parse_time_mad_time_t(). |
|
converts h, min, s, ms to a milliseconds
Definition at line 321 of file parsetime.c. References REP_DEBUG, report(), and STRLEN. Referenced by parse_time_milliseconds(). |
|
Checks is a char is a letter or not.
Definition at line 89 of file parsetime.c. Referenced by parse_timecount(). |
|
Parses a full_clock expression into h, min, s, ms
Definition at line 236 of file parsetime.c. References REP_DEBUG, report(), and STRLEN. Referenced by parse_time_mad_time_t(), and parse_time_milliseconds(). |
|
Parses a partial_clock expression into h, min, s, ms
Definition at line 196 of file parsetime.c. References REP_DEBUG, report(), and STRLEN. Referenced by parse_time_mad_time_t(), and parse_time_milliseconds(). |
|
Returns the duration in milliseconds from char start- and stop-arguments
Definition at line 472 of file parsetime.c. References parse_time_milliseconds(). Referenced by audio_play(). |
|
Translates valid DAISY time formats to seconds and fractions NOTE: sec. 7.7, (page 41) in ANSI/NISO Z39.86.2005
Definition at line 388 of file parsetime.c. References convert_mad_timer_t(), parse_full_clock(), parse_partial_clock(), parse_timecount(), PT_FULL_CLOCK, PT_INVALID_FORMAT, PT_PARTIAL_CLOCK, PT_TIMECOUNT, REP_DEBUG, report(), STRLEN, and type(). Referenced by audio_play(). |
|
Translates valid DAISY time formats to milliseconds Note: sec. 7.7, (page 41) in ANSI/NISO Z39.86.2005
Definition at line 430 of file parsetime.c. References convert_milliseconds_from_time(), parse_full_clock(), parse_partial_clock(), parse_timecount(), PT_FULL_CLOCK, PT_INVALID_FORMAT, PT_PARTIAL_CLOCK, PT_TIMECOUNT, REP_DEBUG, report(), STRLEN, and type(). Referenced by parse_time_get_dur(). |
|
Parses a timecount expression into h, min, s, ms
Definition at line 107 of file parsetime.c. References isletter(), PT_HOURS, PT_MILLISECONDS, PT_MINUTES, PT_SECONDS, REP_DEBUG, report(), and STRLEN. Referenced by parse_time_mad_time_t(), and parse_time_milliseconds(). |
|
Figures out what type of time-format we're dealing with.
Definition at line 350 of file parsetime.c. References PT_FULL_CLOCK, PT_INVALID_FORMAT, PT_PARTIAL_CLOCK, PT_TIMECOUNT, pt_type, REP_ERROR, report(), and STRLEN. Referenced by parse_time_mad_time_t(), and parse_time_milliseconds(). |