MCPcopy Create free account
hub / github.com/OpenPrinting/cups / cups_unquote

Function cups_unquote

cups/language.c:1631–1671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1629 */
1630
1631static void
1632cups_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}

Callers 2

_cupsMessageLoadFunction · 0.85
cups_read_stringsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected