| 7555 | */ |
| 7556 | |
| 7557 | staticfn int |
| 7558 | feature_alert_opts(char *op, const char *optn) |
| 7559 | { |
| 7560 | char buf[BUFSZ]; |
| 7561 | unsigned long fnv = get_feature_notice_ver(op); /* version.c */ |
| 7562 | |
| 7563 | if (fnv == 0L) |
| 7564 | return 0; |
| 7565 | if (fnv > get_current_feature_ver()) { |
| 7566 | if (!go.opt_initial) { |
| 7567 | You_cant("disable new feature alerts for future versions."); |
| 7568 | } else { |
| 7569 | config_error_add( |
| 7570 | "%s=%s Invalid reference to a future version ignored", |
| 7571 | optn, op); |
| 7572 | } |
| 7573 | return 0; |
| 7574 | } |
| 7575 | |
| 7576 | flags.suppress_alert = fnv; |
| 7577 | if (!go.opt_initial) { |
| 7578 | Sprintf(buf, "%lu.%lu.%lu", FEATURE_NOTICE_VER_MAJ, |
| 7579 | FEATURE_NOTICE_VER_MIN, FEATURE_NOTICE_VER_PATCH); |
| 7580 | pline( |
| 7581 | "Feature change alerts disabled for NetHack %s features and prior.", |
| 7582 | buf); |
| 7583 | } |
| 7584 | return 1; |
| 7585 | } |
| 7586 | |
| 7587 | /* |
| 7588 | * This is used by parse_config_line() in files.c |
no test coverage detected