#include "stdlib.h" #include "string.h" #include "astring.h" void c_s_to_i(int itime[6], char *strtime) { char allmon[38]="janfebmaraprmayjunjulaugsepoctnovdec\0"; char *psmon, *day, *mon, *year; int i; day = strmid(strtime,0,2); mon = strmid(strtime,3,3); year = strmid(strtime,7,2); itime[0] = atoi(year); itime[2] = atoi(day); psmon = mklower(mon); itime[1] = strloc(allmon,psmon)/3 + 1; i = strlen(strtime); if (i > 10) { if (strstr(strmid(strtime,10,2)," ") == NULL ) { itime[3] = atoi(strmid(strtime,10,2)); } else { itime[3] = 0; } } else { itime[3] = 0; } if (i > 13) { if (strstr(strmid(strtime,13,2)," ") == NULL ) { itime[4] = atoi(strmid(strtime,13,2)); } else { itime[4] = 0; } } else { itime[4] = 0; } if (i > 16) { if (strstr(strmid(strtime,16,2)," ") == NULL ) { itime[5] = atoi(strmid(strtime,16,2)); } else { itime[5] = 0; } } else { itime[5] = 0; } }