| 1629 | */ |
| 1630 | |
| 1631 | static void |
| 1632 | cups_unquote(char *d, /* O - Unquoted string */ |
| 1633 | const char *s) /* I - Original string */ |
| 1634 | { |
| 1635 | while (*s) |
| 1636 | { |
| 1637 | if (*s == '\\') |
| 1638 | { |
| 1639 | s ++; |
| 1640 | if (isdigit(*s)) |
| 1641 | { |
| 1642 | *d = 0; |
| 1643 | |
| 1644 | while (isdigit(*s)) |
| 1645 | { |
| 1646 | *d = *d * 8 + *s - '0'; |
| 1647 | s ++; |
| 1648 | } |
| 1649 | |
| 1650 | d ++; |
| 1651 | } |
| 1652 | else |
| 1653 | { |
| 1654 | if (*s == 'n') |
| 1655 | *d ++ = '\n'; |
| 1656 | else if (*s == 'r') |
| 1657 | *d ++ = '\r'; |
| 1658 | else if (*s == 't') |
| 1659 | *d ++ = '\t'; |
| 1660 | else |
| 1661 | *d++ = *s; |
| 1662 | |
| 1663 | s ++; |
| 1664 | } |
| 1665 | } |
| 1666 | else |
| 1667 | *d++ = *s++; |
| 1668 | } |
| 1669 | |
| 1670 | *d = '\0'; |
| 1671 | } |
no outgoing calls
no test coverage detected