----------------------------------------------------------------- */ decBiStr -- compare string with pairwise options */ / targ is the string to compare */ str1 is one of the strings to compare against (length may be 0) */ str2 is the other; it must be the same length as str1 */ / returns 1 if strings compare equal, (that is, targ is the
| 188 | /* if (decBiStr(test, "mike", "MIKE")) ... */ |
| 189 | /* ----------------------------------------------------------------- */ |
| 190 | static Flag decBiStr(const char *targ, const char *str1, const char *str2) { |
| 191 | for (;;targ++, str1++, str2++) { |
| 192 | if (*targ!=*str1 && *targ!=*str2) return 0; |
| 193 | // *targ has a match in one (or both, if terminator) |
| 194 | if (*targ=='\0') break; |
| 195 | } // forever |
| 196 | return 1; |
| 197 | } // decBiStr |
| 198 | |
| 199 | /* ------------------------------------------------------------------ */ |
| 200 | /* decFinalize -- adjust and store a final result */ |
no outgoing calls
no test coverage detected