MCPcopy Create free account
hub / github.com/cgsecurity/testdisk / get_compilation_date

Function get_compilation_date

src/misc.c:299–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297
298#ifdef RECORD_COMPILATION_DATE
299const char *get_compilation_date(void)
300{
301 static char buffer[100] = {0x00};
302#ifdef __DATE__
303#if defined(HAVE_STRPTIME)
304 struct tm tm;
305 memset(&tm,0,sizeof(tm));
306 if(strptime(__DATE__, "%b %d %Y", &tm)!=NULL)
307 sprintf(buffer, "%4d-%02d-%02dT", tm.tm_year + 1900, tm.tm_mon+1, tm.tm_mday);
308 else
309 strcpy(buffer, __DATE__);
310#ifdef __TIME__
311 strcat(buffer, __TIME__);
312#endif
313#else
314 strcpy(buffer, __DATE__);
315#ifdef __TIME__
316 strcat(buffer, " ");
317 strcat(buffer, __TIME__);
318#endif
319#endif
320#endif
321 /*@ assert valid_read_string(&buffer[0]); */
322 return buffer;
323}
324#endif

Callers 8

display_versionFunction · 0.85
mainFunction · 0.85
xml_add_DFXML_creatorFunction · 0.85
display_versionFunction · 0.85
mainFunction · 0.85
display_versionFunction · 0.85
mainFunction · 0.85
display_versionFunction · 0.85

Calls

no outgoing calls

Tested by 2

display_versionFunction · 0.68
mainFunction · 0.68