| 428 | #endif |
| 429 | |
| 430 | unsigned long |
| 431 | get_feature_notice_ver(char *str) |
| 432 | { |
| 433 | char buf[BUFSZ]; |
| 434 | int ver_maj, ver_min, patch; |
| 435 | char *istr[3]; |
| 436 | int j = 0; |
| 437 | |
| 438 | if (!str) |
| 439 | return 0L; |
| 440 | str = strcpy(buf, str); |
| 441 | istr[j] = str; |
| 442 | while (*str) { |
| 443 | if (*str == '.') { |
| 444 | *str++ = '\0'; |
| 445 | j++; |
| 446 | istr[j] = str; |
| 447 | if (j == 2) |
| 448 | break; |
| 449 | } else if (strchr("0123456789", *str) != 0) { |
| 450 | str++; |
| 451 | } else |
| 452 | return 0L; |
| 453 | } |
| 454 | if (j != 2) |
| 455 | return 0L; |
| 456 | ver_maj = atoi(istr[0]); |
| 457 | ver_min = atoi(istr[1]); |
| 458 | patch = atoi(istr[2]); |
| 459 | return FEATURE_NOTICE_VER(ver_maj, ver_min, patch); |
| 460 | /* macro from hack.h */ |
| 461 | } |
| 462 | |
| 463 | unsigned long |
| 464 | get_current_feature_ver(void) |
no outgoing calls
no test coverage detected