X-Alens-uprop: save-for=1 year
Received: by ATHENA-PO-2.MIT.EDU (5.45/4.7) id AA29494; Wed, 11 Oct 89 00:56:32 EDT
Received: from PINK.MIT.EDU by ATHENA.MIT.EDU with SMTP
	id AA05608; Wed, 11 Oct 89 00:56:22 EDT
From: bgardner@ATHENA.MIT.EDU
Received: by PINK.MIT.EDU (5.61/4.7) id AA02159; Wed, 11 Oct 89 00:56:16 -0400
Date: Wed, 11 Oct 89 00:56:16 -0400
Message-Id: <8910110456.AA02159@PINK.MIT.EDU>
To: argus2@ATHENA.MIT.EDU
Subject: ruleprint bug fixed

   The bug that was causing the rules to be displayed and printed
with a bogus looking predicate has been fixed.
   This bug started at about the time the field type names and action names
were changed. It turns out that the ruleprint function was not handling the
error condition correctly for when the rule's printed form was larger than
the buffer passed to it. With the newer longer names for field types, operators,
and actions, the printed form of a rule is now very often larger than
the buffer passed to it. (The old strings were small enough not to hit this bug).
   I have now fixed the Alruleprint function, so that it now returns a -1
if the buffer passed to it isn't larger enough to hold the rule's printed form.

  *** Rich, if you use Alruleprint, you should check to see if you need
  *** to check for the return value of -1.  ****

  Also, the rulebrowser has a routine to trap the case were the Alruleprint
function returns a failure. The rulebrowser will automatically expand the
buffer size and update the rule's widgets to reflect the change.
(This is common whenever a ruleeditor is up and its "save" is clicked,
the rulebrowser updates the rules printed form.)
    -- Brian
