Mercurial > masqmail
comparison src/timeival.c @ 254:82d168dd52fd
removed the obsolete pos argument from time_interval()
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Thu, 04 Nov 2010 14:45:42 -0300 |
parents | f671821d8222 |
children | 2e7d3a02edb1 |
comparison
equal
deleted
inserted
replaced
253:c28e8dfebfc3 | 254:82d168dd52fd |
---|---|
20 #include <glib.h> | 20 #include <glib.h> |
21 | 21 |
22 #include "masqmail.h" | 22 #include "masqmail.h" |
23 | 23 |
24 gint | 24 gint |
25 time_interval(gchar * str, gint * pos) | 25 time_interval(gchar * str) |
26 { | 26 { |
27 gchar buf[16]; | 27 gchar buf[16]; |
28 gchar *p = str, *q = buf; | 28 gchar *p = str, *q = buf; |
29 gint factor = 1, val; | 29 gint factor = 1, val; |
30 | 30 |
31 while (*p && isdigit(*p) && (q < buf + 15)) { | 31 while (*p && isdigit(*p) && (q < buf + 15)) { |
32 *(q++) = *(p++); | 32 *(q++) = *(p++); |
33 (*pos)++; | |
34 } | 33 } |
35 (*pos)++; | |
36 *q = '\0'; | 34 *q = '\0'; |
37 val = atoi(buf); | 35 val = atoi(buf); |
38 | 36 |
39 /* fall through: */ | 37 /* fall through: */ |
40 switch (*p) { | 38 switch (*p) { |