[285] in bug-owl

home help back first fref pref prev next nref lref last post

invalid colors cause garbage display

daemon@ATHENA.MIT.EDU (Arun A Tharuvai)
Fri Oct 31 21:37:50 2003

Date: Fri, 31 Oct 2003 21:37:47 -0500
From: Arun A Tharuvai <aatharuv@MIT.EDU>
To: bug-owl@MIT.EDU
Cc: aatharuv@MIT.EDU
Message-ID: <20031101023747.GD19477@multics.mit.edu>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="BXVAT5kNtrzKuDFl"
Content-Disposition: inline


--BXVAT5kNtrzKuDFl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On current CVS,on multics , an invalid value for an @color tag
(e.g. @color(red4) , will cause the following text to be replaced with
a string of ASCII control and line-drawing characters. This doesn't
seem to happen with owl-beta for sun4x_58.

Here's a patch against current CVS to restore the previous behavior --
if the color is invalid use OWL_COLOR_DEFAULT .

Arun

-- 
Arun A Tharuvai
aatharuv (at) mit (dot) edu
aat (at) alum (dot) mit (dot) edu

--BXVAT5kNtrzKuDFl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="owl-invalid-color.patch"

Index: fmtext.c
===================================================================
RCS file: /mit/ktools/src/owl/repository/owl/fmtext.c,v
retrieving revision 1.13
diff -u -r1.13 fmtext.c
--- fmtext.c	29 Oct 2003 00:56:36 -0000	1.13
+++ fmtext.c	1 Nov 2003 02:14:22 -0000
@@ -546,6 +546,7 @@
 
 	  /* set it as the current color */
 	  curcolor=owl_util_string_to_color(buff);
+	  curcolor= ((curcolor==-1)?OWL_COLOR_DEFAULT:curcolor);
 	  owl_free(buff);
 	  txtptr=tmpptr+1;
 	  continue;

--BXVAT5kNtrzKuDFl--

home help back first fref pref prev next nref lref last post