* match_token takes a table and a string, returns the value associated * with the string (-1 in case of failure). */
| 673 | * with the string (-1 in case of failure). |
| 674 | */ |
| 675 | int |
| 676 | match_token(struct _s_x *table, const char *string) |
| 677 | { |
| 678 | struct _s_x *pt; |
| 679 | uint i = strlen(string); |
| 680 | |
| 681 | for (pt = table ; i && pt->s != NULL ; pt++) |
| 682 | if (strlen(pt->s) == i && !bcmp(string, pt->s, i)) |
| 683 | return pt->x; |
| 684 | return (-1); |
| 685 | } |
| 686 | |
| 687 | /** |
| 688 | * match_token_relaxed takes a table and a string, returns the value associated |
no outgoing calls
no test coverage detected