diff options
author | lordjaxom <lordjaxom> | 2004-12-22 15:38:18 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2004-12-22 15:38:18 +0000 |
commit | b0a767292621b6c79a8bd021bbe2915a64e5b30c (patch) | |
tree | 6166ae06ea3a52e5bdeefca0210ba307dc13b9cb /common.c | |
parent | 2369ba357f0157b5ba5c1456b2b48c28dca1b33a (diff) | |
download | vdr-plugin-text2skin-b0a767292621b6c79a8bd021bbe2915a64e5b30c.tar.gz vdr-plugin-text2skin-b0a767292621b6c79a8bd021bbe2915a64e5b30c.tar.bz2 |
- moved break-down of duration types out of loop
Diffstat (limited to 'common.c')
-rw-r--r-- | common.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1,5 +1,5 @@ /* - * $Id: common.c,v 1.4 2004/12/21 21:39:21 lordjaxom Exp $ + * $Id: common.c,v 1.5 2004/12/22 15:38:18 lordjaxom Exp $ */ #include "common.h" @@ -150,13 +150,13 @@ cxType DurationType(uint Index, const std::string &Format) const char *ptr = Format.c_str(); char *res = result; enum { normal, format } state = normal; + int n = 0; + int f = (Index % FRAMESPERSEC) + 1; + int s = (Index / FRAMESPERSEC); + int m = s / 60 % 60; + int h = s / 3600; + s %= 60; while (*ptr && res < result + sizeof(result)) { - int n = 0; - int f = (Index % FRAMESPERSEC) + 1; - int s = (Index / FRAMESPERSEC); - int m = s / 60 % 60; - int h = s / 3600; - s %= 60; switch (state) { case normal: if (*ptr == '%') |