Version 0.20.2 - April 2020
* Programming languages support:
+ - Shell:
+ The programs 'gettext', 'ngettext', when invoked with option -e, now
+ expand '\\' and octal escape sequences, instead of swallowing them.
+ (Bug present since the beginning.)
- Desktop Entry:
The value of the 'Icon' property is no longer extracted into the POT file
by xgettext. The documentation explains how to localize icons.
char *retval, *rp;
const char *cp = str;
+ /* Find the location of the first escape sequence.
+ If the string contains no escape sequences, return it right away. */
for (;;)
{
while (cp[0] != '\0' && cp[0] != '\\')
++cp;
break;
case '\\':
- *rp = '\\';
+ *rp++ = '\\';
++cp;
break;
case '0': case '1': case '2': case '3':
ch += *cp++ - '0';
}
}
- *rp = ch;
+ *rp++ = ch;
}
break;
default:
- *rp = '\\';
+ *rp++ = '\\';
break;
}
+ /* Find the next escape sequence. */
while (cp[0] != '\0' && cp[0] != '\\')
*rp++ = *cp++;
}
while (cp[0] != '\0');
- /* Terminate string. */
+ /* Terminate the resulting string. */
*rp = '\0';
- return (const char *) retval;
+ return retval;
}
char *retval, *rp;
const char *cp = str;
+ /* Find the location of the first escape sequence.
+ If the string contains no escape sequences, return it right away. */
for (;;)
{
while (cp[0] != '\0' && cp[0] != '\\')
++cp;
break;
case '\\':
- *rp = '\\';
+ *rp++ = '\\';
++cp;
break;
case '0': case '1': case '2': case '3':
ch += *cp++ - '0';
}
}
- *rp = ch;
+ *rp++ = ch;
}
break;
default:
- *rp = '\\';
+ *rp++ = '\\';
break;
}
+ /* Find the next escape sequence. */
while (cp[0] != '\0' && cp[0] != '\\')
*rp++ = *cp++;
}
while (cp[0] != '\0');
- /* Terminate string. */
+ /* Terminate the resulting string. */
*rp = '\0';
- return (const char *) retval;
+ return retval;
}
char *retval, *rp;
const char *cp = str;
+ /* Find the location of the first escape sequence.
+ If the string contains no escape sequences, return it right away. */
for (;;)
{
while (cp[0] != '\0' && cp[0] != '\\')
++cp;
break;
case '\\':
- *rp = '\\';
+ *rp++ = '\\';
++cp;
break;
case '0': case '1': case '2': case '3':
ch += *cp++ - '0';
}
}
- *rp = ch;
+ *rp++ = ch;
}
break;
default:
- *rp = '\\';
+ *rp++ = '\\';
break;
}
+ /* Find the next escape sequence. */
while (cp[0] != '\0' && cp[0] != '\\')
*rp++ = *cp++;
}
while (cp[0] != '\0');
- /* Terminate string. */
+ /* Terminate the resulting string. */
*rp = '\0';
- return (const char *) retval;
+ return retval;
}