diff options
Diffstat (limited to 'strtimet.c')
| -rw-r--r-- | strtimet.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/strtimet.c b/strtimet.c new file mode 100644 index 0000000..c174872 --- /dev/null +++ b/strtimet.c | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | ** Copyright 1998 - 2000 Double Precision, Inc. | ||
| 3 | ** See COPYING for distribution information. | ||
| 4 | */ | ||
| 5 | |||
| 6 | #if HAVE_CONFIG_H | ||
| 7 | #include "config.h" | ||
| 8 | #endif | ||
| 9 | #include "numlib.h" | ||
| 10 | #include <string.h> | ||
| 11 | |||
| 12 | static const char rcsid[]="$Id: strtimet.c,v 1.3 2000/05/27 04:59:26 mrsam Exp $"; | ||
| 13 | |||
| 14 | char *str_time_t(time_t t, char *arg) | ||
| 15 | { | ||
| 16 | char buf[NUMBUFSIZE]; | ||
| 17 | char *p=buf+sizeof(buf)-1; | ||
| 18 | |||
| 19 | *p=0; | ||
| 20 | do | ||
| 21 | { | ||
| 22 | *--p= '0' + (t % 10); | ||
| 23 | t=t / 10; | ||
| 24 | } while(t); | ||
| 25 | return (strcpy(arg, p)); | ||
| 26 | } | ||
