Commit 19ba673b authored by Kevin Cozens's avatar Kevin Cozens Committed by Kevin Cozens

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
parent fdd1c1fa
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
...@@ -23,7 +28,7 @@ ...@@ -23,7 +28,7 @@
2007-10-21 Simon Budig <simon@gimp.org> 2007-10-21 Simon Budig <simon@gimp.org>
* plg-ins/script-fu/scheme-wrapper.c: Add comment regarding * plg-ins/script-fu/scheme-wrapper.c: Add comment regarding
the safe-foreign issue. the safe-foreign issue.
2007-10-21 Kevin Cozens <kcozens@cvs.gnome.org> 2007-10-21 Kevin Cozens <kcozens@cvs.gnome.org>
...@@ -1719,6 +1719,10 @@ static pointer readstrexp(scheme *sc) { ...@@ -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) { ...@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment