fill buffer with short version (so caller can avoid including date.h) * buf cannot be NULL */
| 19 | /* fill buffer with short version (so caller can avoid including date.h) |
| 20 | * buf cannot be NULL */ |
| 21 | char * |
| 22 | version_string(char *buf, size_t bufsz) |
| 23 | { |
| 24 | Snprintf(buf, bufsz, "%s", |
| 25 | ((nomakedefs.version_string && nomakedefs.version_string[0]) |
| 26 | ? nomakedefs.version_string |
| 27 | /* in case we try to write a paniclog entry after releasing |
| 28 | the 'nomakedefs' data */ |
| 29 | : mdlib_version_string(buf, "."))); |
| 30 | return buf; |
| 31 | } |
| 32 | |
| 33 | /* fill and return the given buffer with the long nethack version string */ |
| 34 | char * |
no test coverage detected