Commit 37b875cc authored by Kevin Cozens's avatar Kevin Cozens Committed by Kevin Cozens

plug-ins/script-fu/tinyscheme/scheme-private.h Allow a maximum of two

2007-10-25  Kevin Cozens  <kcozens@cvs.gnome.org>

	* plug-ins/script-fu/tinyscheme/scheme-private.h
	* plug-ins/script-fu/tinyscheme/scheme.c:
	Allow a maximum of two calls to backchar() needed by the "case '.'"
	part of the switch statement in token(). Fixes bug #490198.

svn path=/trunk/; revision=23952
parent c40518f3
2007-10-25 Kevin Cozens <kcozens@cvs.gnome.org>
* plug-ins/script-fu/tinyscheme/scheme-private.h
* plug-ins/script-fu/tinyscheme/scheme.c:
Allow a maximum of two calls to backchar() needed by the "case '.'"
part of the switch statement in token(). Fixes bug #490198.
2007-10-25 Martin Nordholts <martinn@svn.gnome.org>
* app/tools/gimprectangletool.c: Aligned static function
......
......@@ -132,7 +132,7 @@ struct scheme_interface *vptr;
void *dump_base; /* pointer to base of allocated dump stack */
int dump_size; /* number of frames allocated for dump stack */
gunichar backchar;
gunichar backchar[2];
int bc_flag;
};
......
......@@ -1560,10 +1560,7 @@ static gunichar inchar(scheme *sc) {
if(pt->kind&port_file)
{
if (sc->bc_flag)
{
sc->bc_flag = 0;
c = sc->backchar;
}
c = sc->backchar[--sc->bc_flag];
else
c=basic_inchar(pt);
}
......@@ -1590,8 +1587,8 @@ static void backchar(scheme *sc, gunichar c) {
charlen = g_unichar_to_utf8(c, NULL);
pt=sc->inport->_object._port;
if(pt->kind&port_file) {
sc->backchar = c;
sc->bc_flag = 1;
if (sc->bc_flag < 2)
sc->backchar[sc->bc_flag++] = c;
} else {
if(pt->rep.string.curr!=pt->rep.string.start) {
if(pt->rep.string.curr-pt->rep.string.start >= charlen)
......
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