/* $Id: funcs.cpp,v 1.0 2003/04/21 17:45:48 folkert Exp folkert $ * $Log: funcs.cpp,v $ * Revision 1.0 2003/04/21 17:45:48 folkert * small fixes * * Revision 0.95 2003/03/16 14:12:40 folkert * *** empty log message *** * * Revision 0.9 2003/02/20 19:23:36 folkert * *** empty log message *** * * Revision 0.7 2003/02/18 18:41:23 folkert * date-conversion now also handles incorrect date-fields * * Revision 0.6 2003/02/04 21:26:09 folkert * made "re:"-stripper strip even more * * Revision 0.5 2003/02/03 19:48:55 folkert * *** empty log message *** * */ #include #include #include #include #include #include #include #include #include "main.h" extern "C" { #include "mem.h" } char * stripstring(char *in) { int len = strlen(in), index=0, loop=0; char *dummy = (char *)mymalloc(len+1, "stripped string"); if (!dummy) { fprintf(stderr, "malloc failure\n"); exit(1); } while(loop= 0 && (dummy[index] ==' ' || dummy[index] == '\t')) { dummy[index] = 0x00; index--; } return dummy; } /* Thu, 30 Jan 2003 18:42:31 +0100 */ char datestringtofields(char *string, int &year, int &month, int &day, int &wday, int &hour, int &minute, int &second, char **timezone) { char *curpos; for(unsigned int loop=0; loop 0) *timezone = curpos; else *timezone = NULL; return 1; }