summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-01-31 11:23:59 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-01-31 11:23:59 +0000
commit159f69218dfbfc25dda011367da71826a97ca424 (patch)
tree2eaf05495904a9236c2ea2ad997a24057527a9b0 /src
parentfadcbdc5b28d048ab519c6c938ec10e2c9c5ac66 (diff)
- Move myctime() from irc_string.c to s_misc.c
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2971 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'src')
-rw-r--r--src/irc_string.c25
-rw-r--r--src/s_misc.c25
2 files changed, 25 insertions, 25 deletions
diff --git a/src/irc_string.c b/src/irc_string.c
index 3ad8f93..4ba1057 100644
--- a/src/irc_string.c
+++ b/src/irc_string.c
@@ -49,31 +49,6 @@ has_wildcards(const char *str)
}
/*
- * myctime - This is like standard ctime()-function, but it zaps away
- * the newline from the end of that string. Also, it takes
- * the time value as parameter, instead of pointer to it.
- * Note that it is necessary to copy the string to alternate
- * buffer (who knows how ctime() implements it, maybe it statically
- * has newline there and never 'refreshes' it -- zapping that
- * might break things in other places...)
- *
- *
- * Thu Nov 24 18:22:48 1986
- */
-const char *
-myctime(time_t value)
-{
- static char buf[32];
- char *p;
-
- strlcpy(buf, ctime(&value), sizeof(buf));
-
- if ((p = strchr(buf, '\n')) != NULL)
- *p = '\0';
- return buf;
-}
-
-/*
* strip_tabs(dst, src, length)
*
* Copies src to dst, while converting all \t (tabs) into spaces.
diff --git a/src/s_misc.c b/src/s_misc.c
index 005fac8..855b91a 100644
--- a/src/s_misc.c
+++ b/src/s_misc.c
@@ -115,6 +115,31 @@ smalldate(time_t lclock)
return buf;
}
+/*
+ * myctime - This is like standard ctime()-function, but it zaps away
+ * the newline from the end of that string. Also, it takes
+ * the time value as parameter, instead of pointer to it.
+ * Note that it is necessary to copy the string to alternate
+ * buffer (who knows how ctime() implements it, maybe it statically
+ * has newline there and never 'refreshes' it -- zapping that
+ * might break things in other places...)
+ *
+ *
+ * Thu Nov 24 18:22:48 1986
+ */
+const char *
+myctime(time_t value)
+{
+ static char buf[32];
+ char *p;
+
+ strlcpy(buf, ctime(&value), sizeof(buf));
+
+ if ((p = strchr(buf, '\n')) != NULL)
+ *p = '\0';
+ return buf;
+}
+
#ifdef HAVE_LIBCRYPTO
const char *
ssl_get_cipher(const SSL *ssl)