summaryrefslogtreecommitdiff
path: root/common.c
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2004-12-22 15:38:18 +0000
committerlordjaxom <lordjaxom>2004-12-22 15:38:18 +0000
commitb0a767292621b6c79a8bd021bbe2915a64e5b30c (patch)
tree6166ae06ea3a52e5bdeefca0210ba307dc13b9cb /common.c
parent2369ba357f0157b5ba5c1456b2b48c28dca1b33a (diff)
downloadvdr-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.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/common.c b/common.c
index bee0fd0..a249f9d 100644
--- a/common.c
+++ b/common.c
@@ -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 == '%')