+char *parse_user(char *t, char **name, char **email, unsigned long *date)
+{
+ char *p = t;
+ int mode = 1;
+
+ while (p && *p) {
+ if (mode == 1 && *p == '<') {
+ *name = substr(t, p - 1);
+ t = p;
+ mode++;
+ } else if (mode == 1 && *p == '\n') {
+ *name = substr(t, p);
+ p++;
+ break;
+ } else if (mode == 2 && *p == '>') {
+ *email = substr(t, p + 1);
+ t = p;
+ mode++;
+ } else if (mode == 2 && *p == '\n') {
+ *email = substr(t, p);
+ p++;
+ break;
+ } else if (mode == 3 && isdigit(*p)) {
+ *date = atol(p);
+ mode++;
+ } else if (*p == '\n') {
+ p++;
+ break;
+ }
+ p++;
+ }
+ return p;
+}
+
+#ifdef NO_ICONV
+#define reencode(a, b, c)
+#else
+const char *reencode(char **txt, const char *src_enc, const char *dst_enc)
+{
+ char *tmp;
+
+ if (!txt || !*txt || !src_enc || !dst_enc)
+ return *txt;
+
+ tmp = reencode_string(*txt, src_enc, dst_enc);
+ if (tmp) {
+ free(*txt);
+ *txt = tmp;
+ }
+ return *txt;
+}
+#endif
+