| 413 | ****************************************************************************/ |
| 414 | |
| 415 | static char *dequote(char *ptr) |
| 416 | { |
| 417 | int len; |
| 418 | |
| 419 | /* Check if there is a trailing quote */ |
| 420 | |
| 421 | len = strlen(ptr); |
| 422 | if (ptr[len - 1] == '"') |
| 423 | { |
| 424 | /* Yes... replace it with a terminator */ |
| 425 | |
| 426 | ptr[len - 1] = '\0'; |
| 427 | len--; |
| 428 | } |
| 429 | |
| 430 | /* Is there a leading quote? */ |
| 431 | |
| 432 | if (ptr[0] == '"') |
| 433 | { |
| 434 | /* Yes.. skip over the leading quote */ |
| 435 | |
| 436 | ptr++; |
| 437 | len--; |
| 438 | } |
| 439 | |
| 440 | /* Handle the case where nothing is left after dequoting */ |
| 441 | |
| 442 | if (len <= 0) |
| 443 | { |
| 444 | ptr = NULL; |
| 445 | } |
| 446 | |
| 447 | return ptr; |
| 448 | } |
| 449 | |
| 450 | /**************************************************************************** |
| 451 | * Name: htmlize_character |
no test coverage detected