MCPcopy Create free account
hub / github.com/NetHack/NetHack / version_id_string

Function version_id_string

src/mdlib.c:315–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313 const char *fmt, ...);
314
315char *
316version_id_string(char *outbuf, size_t bufsz, const char *build_date)
317{
318 char subbuf[64], versbuf[64];
319 char statusbuf[64];
320
321#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
322#if (NH_DEVEL_STATUS == NH_STATUS_BETA)
323 Strcpy(statusbuf, " Beta");
324#else
325#if (NH_DEVEL_STATUS == NH_STATUS_WIP)
326 Strcpy(statusbuf, " Work-in-progress");
327#else
328 Strcpy(statusbuf, " post-release");
329#endif
330#endif
331#else
332 statusbuf[0] = '\0';
333#endif
334 subbuf[0] = '\0';
335#ifdef PORT_SUB_ID
336 subbuf[0] = ' ';
337 Strcpy(&subbuf[1], PORT_SUB_ID);
338#endif
339
340 Snprintf(outbuf, bufsz, "%s NetHack%s Version %s%s - last %s %s.",
341 PORT_ID, subbuf, mdlib_version_string(versbuf, "."), statusbuf,
342 date_via_env ? "revision" : "build", build_date);
343 return outbuf;
344}
345
346/* still within #if MAKDEFS_C || FOR_RUNTIME */
347

Callers 2

populate_nomakedefsFunction · 0.85
do_dateFunction · 0.85

Calls 1

mdlib_version_stringFunction · 0.85

Tested by

no test coverage detected