Back to index

courier  0.68.2
comstrtotime.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      "comstrtotime.h"
00007 #include      <ctype.h>
00008 
00009 time_t strtotime(const char *p)
00010 {
00011 time_t n=0;
00012 
00013        while (isdigit((int)(unsigned char)*p))
00014        {
00015               n *= 10;
00016               n += *p++ - '0';
00017        }
00018        return (n);
00019 }