foobar2000 SDK  2015-08-03
Typedefs | Functions | Variables
filetimetools.cpp File Reference

Go to the source code of this file.

Typedefs

typedef exception_io_data exception_time_error
 

Functions

static bool is_spacing (char c)
 
static bool is_spacing (const char *str, t_size len)
 
static unsigned ParseDateElem (const char *ptr, t_size len)
 

Variables

static const char g_invalidMsg [] = "<invalid timestamp>"
 

Typedef Documentation

typedef exception_io_data exception_time_error

Definition at line 15 of file filetimetools.cpp.

Function Documentation

static bool is_spacing ( char  c)
static

Definition at line 8 of file filetimetools.cpp.

8 {return c == ' ' || c==10 || c==13 || c == '\t';}
static bool is_spacing ( const char *  str,
t_size  len 
)
static

Definition at line 10 of file filetimetools.cpp.

10  {
11  for(t_size walk = 0; walk < len; ++walk) if (!is_spacing(str[walk])) return false;
12  return true;
13 }
static bool is_spacing(char c)
size_t t_size
Definition: int_types.h:48
static unsigned ParseDateElem ( const char *  ptr,
t_size  len 
)
static

Definition at line 17 of file filetimetools.cpp.

17  {
18  unsigned ret = 0;
19  for(t_size walk = 0; walk < len; ++walk) {
20  const char c = ptr[walk];
21  if (c < '0' || c > '9') throw exception_time_error();
22  ret = ret * 10 + (unsigned)(c - '0');
23  }
24  return ret;
25 }
size_t t_size
Definition: int_types.h:48
exception_io_data exception_time_error

Variable Documentation

const char g_invalidMsg[] = "<invalid timestamp>"
static

Definition at line 73 of file filetimetools.cpp.