silcunixutil.c
- Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+ Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 2000 Pekka Riikonen
+ Copyright (C) 1997 - 2001 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
regex[count] = '.';
count++;
} else if (string[i] == ',') {
+ if (i + 1 == len)
+ continue;
regex[count] = '|';
count++;
continue;
count++;
}
- regex[count - 1] = ')';
+ regex[count++] = ')';
regex[count] = '$';
return regex;
char *s1;
int ret = FALSE;
+ if (!string1 || !string2)
+ return ret;
+
s1 = silc_string_regexify(string1);
ret = silc_string_regex_match(s1, string2);
silc_free(s1);
}
return strdup(logname);
-}
+}
/* Returns the real name of ther user. */
return realname;
}
+
+/* Return current time to struct timeval. */
+
+int silc_gettimeofday(struct timeval *p)
+{
+ return gettimeofday(p, NULL);
+}