mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-04 09:53:25 +00:00
Allow one to three digits in octal coded characters.
2007-10-22 Kevin Cozens <kcozens@cvs.gnome.org> * plug-ins/script-fu/tinyscheme/scheme.c: Allow one to three digits in octal coded characters. svn path=/trunk/; revision=23908
This commit is contained in:
parent
fdd1c1fa4c
commit
19ba673b2f
2 changed files with 14 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-10-22 Kevin Cozens <kcozens@cvs.gnome.org>
|
||||||
|
|
||||||
|
* plug-ins/script-fu/tinyscheme/scheme.c: Allow one to three
|
||||||
|
digits in octal coded characters.
|
||||||
|
|
||||||
2007-10-22 Sven Neumann <sven@gimp.org>
|
2007-10-22 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* plug-ins/gflare/gflare.c (plugin_do_non_asupsample): fixed
|
* plug-ins/gflare/gflare.c (plugin_do_non_asupsample): fixed
|
||||||
|
|
|
@ -1719,6 +1719,10 @@ static pointer readstrexp(scheme *sc) {
|
||||||
case '1':
|
case '1':
|
||||||
case '2':
|
case '2':
|
||||||
case '3':
|
case '3':
|
||||||
|
case '4':
|
||||||
|
case '5':
|
||||||
|
case '6':
|
||||||
|
case '7':
|
||||||
state=st_oct1;
|
state=st_oct1;
|
||||||
c1=g_unichar_digit_value(c);
|
c1=g_unichar_digit_value(c);
|
||||||
break;
|
break;
|
||||||
|
@ -1766,15 +1770,16 @@ static pointer readstrexp(scheme *sc) {
|
||||||
case st_oct2: /* State when handling third octal digit */
|
case st_oct2: /* State when handling third octal digit */
|
||||||
if (!g_unichar_isdigit(c) || g_unichar_digit_value(c) > 7)
|
if (!g_unichar_isdigit(c) || g_unichar_digit_value(c) > 7)
|
||||||
{
|
{
|
||||||
if (state==st_oct1)
|
|
||||||
return sc->F;
|
|
||||||
|
|
||||||
*p++=c1;
|
*p++=c1;
|
||||||
backchar(sc, c);
|
backchar(sc, c);
|
||||||
state=st_ok;
|
state=st_ok;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* Is value of three character octal too big for a byte? */
|
||||||
|
if (state==st_oct2 && c1 >= 32)
|
||||||
|
return sc->F;
|
||||||
|
|
||||||
c1=(c1<<3)+g_unichar_digit_value(c);
|
c1=(c1<<3)+g_unichar_digit_value(c);
|
||||||
|
|
||||||
if (state == st_oct1)
|
if (state == st_oct1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue