Lines Matching refs:ts
44 char *ts; in mod_expire_get_offset() local
61 ts = expire->ptr; in mod_expire_get_offset()
63 if (0 == strncmp(ts, "access ", 7)) { in mod_expire_get_offset()
65 ts += 7; in mod_expire_get_offset()
66 } else if (0 == strncmp(ts, "now ", 4)) { in mod_expire_get_offset()
68 ts += 4; in mod_expire_get_offset()
69 } else if (0 == strncmp(ts, "modification ", 13)) { in mod_expire_get_offset()
71 ts += 13; in mod_expire_get_offset()
74 log_error(errh, __FILE__, __LINE__, "invalid <base>: %s", ts); in mod_expire_get_offset()
78 if (0 == strncmp(ts, "plus ", 5)) { in mod_expire_get_offset()
80 ts += 5; in mod_expire_get_offset()
88 if (NULL == (space = strchr(ts, ' '))) { in mod_expire_get_offset()
90 "missing space after <num>: %s", ts); in mod_expire_get_offset()
94 num = strtol(ts, &err, 10); in mod_expire_get_offset()
97 "missing <type> after <num>: %s", ts); in mod_expire_get_offset()
101 ts = space + 1; in mod_expire_get_offset()
103 if (NULL == (space = strchr(ts, ' '))) in mod_expire_get_offset()
110 slen = space - ts; in mod_expire_get_offset()
111 if (ts[slen-1] == 's') --slen; /* strip plural */ in mod_expire_get_offset()
113 if (slen == 4 && 0 == strncmp(ts, "year", slen)) in mod_expire_get_offset()
115 else if (slen == 5 && 0 == strncmp(ts, "month", slen)) in mod_expire_get_offset()
117 else if (slen == 4 && 0 == strncmp(ts, "week", slen)) in mod_expire_get_offset()
119 else if (slen == 3 && 0 == strncmp(ts, "day", slen)) in mod_expire_get_offset()
121 else if (slen == 4 && 0 == strncmp(ts, "hour", slen)) in mod_expire_get_offset()
123 else if (slen == 6 && 0 == strncmp(ts, "minute", slen)) in mod_expire_get_offset()
125 else if (slen == 6 && 0 == strncmp(ts, "second", slen)) in mod_expire_get_offset()
128 log_error(errh, __FILE__, __LINE__, "unknown type: %s", ts); in mod_expire_get_offset()
135 ts = space + 1; in mod_expire_get_offset()
137 } while (*ts); in mod_expire_get_offset()