parse-time-string: run uncrustify

This is the result of running

     $ uncrustify --replace --config ../devel/uncrustify.cfg *.c *.h

in the parse-time-string directory
This commit is contained in:
uncrustify 2019-06-13 07:35:36 -03:00 committed by David Bremner
parent 8099050c71
commit 8a3f86f2f9
2 changed files with 169 additions and 163 deletions

View file

@ -383,12 +383,14 @@ get_field (struct state *state, enum field field)
/* /*
* Validity checkers. * Validity checkers.
*/ */
static bool is_valid_12hour (int h) static bool
is_valid_12hour (int h)
{ {
return h >= 1 && h <= 12; return h >= 1 && h <= 12;
} }
static bool is_valid_time (int h, int m, int s) static bool
is_valid_time (int h, int m, int s)
{ {
/* Allow 24:00:00 to denote end of day. */ /* Allow 24:00:00 to denote end of day. */
if (h == 24 && m == 0 && s == 0) if (h == 24 && m == 0 && s == 0)
@ -397,22 +399,26 @@ static bool is_valid_time (int h, int m, int s)
return h >= 0 && h <= 23 && m >= 0 && m <= 59 && s >= 0 && s <= 59; return h >= 0 && h <= 23 && m >= 0 && m <= 59 && s >= 0 && s <= 59;
} }
static bool is_valid_mday (int mday) static bool
is_valid_mday (int mday)
{ {
return mday >= 1 && mday <= 31; return mday >= 1 && mday <= 31;
} }
static bool is_valid_mon (int mon) static bool
is_valid_mon (int mon)
{ {
return mon >= 1 && mon <= 12; return mon >= 1 && mon <= 12;
} }
static bool is_valid_year (int year) static bool
is_valid_year (int year)
{ {
return year >= 1970; return year >= 1970;
} }
static bool is_valid_date (int year, int mon, int mday) static bool
is_valid_date (int year, int mon, int mday)
{ {
return is_valid_year (year) && is_valid_mon (mon) && is_valid_mday (mday); return is_valid_year (year) && is_valid_mon (mon) && is_valid_mday (mday);
} }