Back to index

courier  0.68.2
comstrtimestamp.c
Go to the documentation of this file.
00001 /*
00002 ** Copyright 1998 - 1999 Double Precision, Inc.
00003 ** See COPYING for distribution information.
00004 */
00005 
00006 #include      "comstrtimestamp.h"
00007 #include      "maxlongsize.h"
00008 
00009 const char *strtimestamp(time_t n)
00010 {
00011 static char buf[MAXLONGSIZE];
00012 char *p=buf+sizeof(buf)-1;
00013 
00014        *p=0;
00015        do
00016        {
00017               *--p='0' + (n % 10);
00018               n=n / 10;
00019        } while (n);
00020        return (p);
00021 }
00022