#ident "@(#) %M% %I% %D% SwRI" #include /* for sprintf */ #include /* for memset */ #include "SDDAS_types.h" #include "libdb.h" /* for RequestedDataType */ #include "local.h" void MakeFileName (char *vinst, SDDAS_USHORT time_yr, SDDAS_USHORT time_day, SDDAS_ULONG time_msec, char tail, char *loc, int len) { short hr, min /**, sec, msec **/; long tm; tm = time_msec; hr = tm / 3600000; tm %= 3600000; min = tm / 60000; tm %= 60000; /* the next two variables may be used in later versions sec = tm / 1000; msec = tm % 1000; **/ snprintf (loc, len, "%s%04d%03d%02hd%02hd%c", vinst, (int) time_yr, (int) time_day, hr, min, tail); }