| 313 | const char *fmt, ...); |
| 314 | |
| 315 | char * |
| 316 | version_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 |
no test coverage detected