MCPcopy Index your code
hub / github.com/NetHack/NetHack / build_savebones_compat_string

Function build_savebones_compat_string

src/mdlib.c:392–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390static char save_bones_compat_buf[BUFSZ];
391
392staticfn void
393build_savebones_compat_string(void)
394{
395#ifdef VERSION_COMPATIBILITY
396 unsigned long uver = VERSION_COMPATIBILITY,
397 cver = (((unsigned long) VERSION_MAJOR << 24)
398 | ((unsigned long) VERSION_MINOR << 16)
399 | ((unsigned long) PATCHLEVEL << 8));
400#endif
401
402 Strcpy(save_bones_compat_buf,
403 "save and bones files accepted from version");
404#ifdef VERSION_COMPATIBILITY
405 if (uver != cver)
406 Sprintf(eos(save_bones_compat_buf), "s %lu.%lu.%lu through %d.%d.%d",
407 ((uver >> 24) & 0x0ffUL),
408 ((uver >> 16) & 0x0ffUL),
409 ((uver >> 8) & 0x0ffUL),
410 VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL);
411 else
412#endif
413 Sprintf(eos(save_bones_compat_buf), " %d.%d.%d only",
414 VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL);
415}
416
417static const char *const build_opts[] = {
418#ifdef AMIGA_WBENCH

Callers 2

build_optionsFunction · 0.85
runtime_info_initFunction · 0.85

Calls 1

eosFunction · 0.85

Tested by

no test coverage detected