From 5e0093547ede77e28e5618d44bb37a44d90f4edd Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 2 Sep 1999 20:54:07 +0000 Subject: [PATCH] Accept what g_strescape throws at us (specifically, octal sequences that 1999-09-02 Tor Lillqvist * plug-ins/script-fu/interp_sliba.c (lreadstring): Accept what g_strescape throws at us (specifically, octal sequences that start with any octal digit, and are at most three octal digits long). * app/makefile.{cygwin,msc}: Update. --- ChangeLog | 8 ++++++++ app/makefile.cygwin | 2 ++ app/makefile.msc | 2 ++ plug-ins/script-fu/interp_sliba.c | 21 ++++++++++++++++----- plug-ins/script-fu/siod/sliba.c | 21 ++++++++++++++++----- 5 files changed, 44 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 61db042386..a13c1bff4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +1999-09-02 Tor Lillqvist + + * plug-ins/script-fu/interp_sliba.c (lreadstring): Accept what + g_strescape throws at us (specifically, octal sequences that start + with any octal digit, and are at most three octal digits long). + + * app/makefile.{cygwin,msc}: Update. + Thu Sep 2 22:31:11 MEST 1999 Sven Neumann * plug-ins/gap/gap_lib.[ch] diff --git a/app/makefile.cygwin b/app/makefile.cygwin index 3b22b491a2..c5f1e4bdd6 100644 --- a/app/makefile.cygwin +++ b/app/makefile.cygwin @@ -154,6 +154,8 @@ gimp_OBJECTS = \ gradient_select.o \ gradient_select_cmds.o \ guides_cmds.o \ + gtkwrapbox.o \ + gtkhwrapbox.o \ gximage.o \ histogramwidget.o \ histogram_tool.o \ diff --git a/app/makefile.msc b/app/makefile.msc index e2a78e03f9..414d9a468d 100644 --- a/app/makefile.msc +++ b/app/makefile.msc @@ -161,6 +161,8 @@ gimp_OBJECTS = \ gradient_select.obj \ gradient_select_cmds.obj\ guides_cmds.obj \ + gtkwrapbox.obj \ + gtkhwrapbox.obj \ gximage.obj \ histogramwidget.obj \ histogram_tool.obj \ diff --git a/plug-ins/script-fu/interp_sliba.c b/plug-ins/script-fu/interp_sliba.c index fe11414c43..6b514177c2 100644 --- a/plug-ins/script-fu/interp_sliba.c +++ b/plug-ins/script-fu/interp_sliba.c @@ -654,7 +654,7 @@ string_downcase (LISP str) LISP lreadstring (struct gen_readio * f) { - int j, c, n; + int j, c, n, ndigits; char *p; j = 0; p = tkbuffer; @@ -689,14 +689,25 @@ lreadstring (struct gen_readio * f) c = ' '; break; case '0': - n = 0; - while (1) + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + n = c - '0'; + ndigits = 1; + while (ndigits <= 3) { c = GETC_FCN (f); if (c == EOF) my_err ("eof after \\0", NIL); - if (isdigit (c)) - n = n * 8 + c - '0'; + if (c >= '0' && c <= '7') + { + n = n * 8 + c - '0'; + ndigits++; + } else { UNGETC_FCN (c, f); diff --git a/plug-ins/script-fu/siod/sliba.c b/plug-ins/script-fu/siod/sliba.c index fe11414c43..6b514177c2 100644 --- a/plug-ins/script-fu/siod/sliba.c +++ b/plug-ins/script-fu/siod/sliba.c @@ -654,7 +654,7 @@ string_downcase (LISP str) LISP lreadstring (struct gen_readio * f) { - int j, c, n; + int j, c, n, ndigits; char *p; j = 0; p = tkbuffer; @@ -689,14 +689,25 @@ lreadstring (struct gen_readio * f) c = ' '; break; case '0': - n = 0; - while (1) + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + n = c - '0'; + ndigits = 1; + while (ndigits <= 3) { c = GETC_FCN (f); if (c == EOF) my_err ("eof after \\0", NIL); - if (isdigit (c)) - n = n * 8 + c - '0'; + if (c >= '0' && c <= '7') + { + n = n * 8 + c - '0'; + ndigits++; + } else { UNGETC_FCN (c, f);