| 2646 | } |
| 2647 | |
| 2648 | static int strncmp(const char *s1, const char *s2, size_t n) |
| 2649 | { |
| 2650 | for (; n > 0; n--) |
| 2651 | { |
| 2652 | int cmp = (int)*s1 - (int)*s2; |
| 2653 | if (cmp != 0) |
| 2654 | return cmp; |
| 2655 | if (*s1 == '\0') |
| 2656 | return 0; |
| 2657 | s1++; s2++; |
| 2658 | } |
| 2659 | return 0; |
| 2660 | } |
| 2661 | |
| 2662 | static int strcmp(const char *s1, const char *s2) |
| 2663 | { |
no outgoing calls