* Compare a string to a key with quoted characters */
| 44 | * Compare a string to a key with quoted characters |
| 45 | */ |
| 46 | static __inline int |
| 47 | keyncmp(char *str, char *key, INTN n) |
| 48 | { |
| 49 | INTN c; |
| 50 | while (n--) { |
| 51 | c = *key++; |
| 52 | if (c == '\\') { |
| 53 | switch(c = *key++) { |
| 54 | case 'n': |
| 55 | c = '\n'; |
| 56 | break; |
| 57 | case 'r': |
| 58 | c = '\r'; |
| 59 | break; |
| 60 | case 't': |
| 61 | c = '\t'; |
| 62 | break; |
| 63 | default: |
| 64 | break; |
| 65 | } |
| 66 | } else if (c == '\"') { |
| 67 | /* Premature end of key */ |
| 68 | return 1; |
| 69 | } |
| 70 | if (c != *str++) { |
| 71 | return 1; |
| 72 | } |
| 73 | } |
| 74 | return 0; |
| 75 | } |
| 76 | |
| 77 | static void eatThru(char val, char **table_p) |
| 78 | { |
no outgoing calls
no test coverage detected