| 438 | |
| 439 | #ifdef NOCWD_ASSUMPTIONS |
| 440 | staticfn void |
| 441 | adjust_prefix(char *bufp, int prefixid) |
| 442 | { |
| 443 | char *ptr; |
| 444 | |
| 445 | if (!bufp) |
| 446 | return; |
| 447 | #ifdef WIN32 |
| 448 | if (fqn_prefix_locked[prefixid]) |
| 449 | return; |
| 450 | #endif |
| 451 | /* Backward compatibility, ignore trailing ;n */ |
| 452 | if ((ptr = strchr(bufp, ';')) != 0) |
| 453 | *ptr = '\0'; |
| 454 | if (strlen(bufp) > 0) { |
| 455 | gf.fqn_prefix[prefixid] = (char *) alloc(strlen(bufp) + 2); |
| 456 | Strcpy(gf.fqn_prefix[prefixid], bufp); |
| 457 | append_slash(gf.fqn_prefix[prefixid]); |
| 458 | } |
| 459 | } |
| 460 | #endif |
| 461 | |
| 462 | /* Choose at random one of the sep separated parts from str. Mangles str. */ |
no test coverage detected