TOKEN COMPARE - DOES CASE INSENSITIVE COMPARE OF TOKEN TO WHOLE TARGET C STRING*/
| 274 | /* TOKEN COMPARE - DOES CASE INSENSITIVE COMPARE OF TOKEN TO |
| 275 | WHOLE TARGET C STRING*/ |
| 276 | int tokcmp(const char *tok, int ltok, const char *targ) |
| 277 | { |
| 278 | int rc; |
| 279 | if (ltok == 0) { |
| 280 | if (targ[0] == 0) |
| 281 | return 0; /*match, both no data*/ |
| 282 | return -1; /*no match, if target has data*/ |
| 283 | } |
| 284 | rc = strncasecmp(tok, targ, ltok); |
| 285 | if (rc != 0) |
| 286 | return rc; |
| 287 | if (targ[ltok] != 0) |
| 288 | return -1; /*target is greater*/ |
| 289 | return 0; |
| 290 | } |
| 291 | |
| 292 | /* TOKEN COMPARE - DOES CASE INSENSITIVE COMPARE OF TOKEN TO |
| 293 | TARGET C STRING. PARTIAL MATCH OF C STRING OK.*/ |
no outgoing calls
no test coverage detected