[2270] in Athena Bugs
XtTextInvalidate
daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Tue May 23 22:25:21 1989
Date: Tue, 23 May 89 22:24:59 EDT
From: Jonathan I. Kamens <jik@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
Cc: bjaspan@ATHENA.MIT.EDU
In-Reply-To: bugs[2258]
Yes, the XtTextInvalidate bug was present in xrn, and the writers of
xrn solved the problem by fixing the bug. This has already been
reported to xbugs, I think, but in any case, the patch to the X
sources is below (this actually fixes another bug as well -- a missing
close in XtDiskSourceDestroy).
jik
*************************
*** /net/eros/source/X/X.V11R3/lib/Xaw/Text.c Fri Oct 28 11:20:01 1988
--- Text.c Wed Nov 30 14:05:28 1988
***************
*** 1939,1944
{
TextWidget ctx = (TextWidget) w;
ctx->text.lastPos = (*ctx->text.source->GetLastPos)(ctx->text.source);
_XtTextPrepareToUpdate(ctx);
_XtTextNeedsUpdating(ctx, from, to);
--- 1939,1945 -----
{
TextWidget ctx = (TextWidget) w;
+ #ifdef BUG
ctx->text.lastPos = (*ctx->text.source->GetLastPos)(ctx->text.source);
#else
ctx->text.lastPos = GETLASTPOS;
***************
*** 1940,1945
TextWidget ctx = (TextWidget) w;
ctx->text.lastPos = (*ctx->text.source->GetLastPos)(ctx->text.source);
_XtTextPrepareToUpdate(ctx);
_XtTextNeedsUpdating(ctx, from, to);
ForceBuildLineTable(ctx);
--- 1941,1949 -----
#ifdef BUG
ctx->text.lastPos = (*ctx->text.source->GetLastPos)(ctx->text.source);
+ #else
+ ctx->text.lastPos = GETLASTPOS;
+ #endif
_XtTextPrepareToUpdate(ctx);
_XtTextNeedsUpdating(ctx, from, to);
ForceBuildLineTable(ctx);
*** /net/eros/source/X/X.V11R3/lib/Xaw/DiskSrc.c Tue Oct 18 09:29:58 1988
--- DiskSrc.c Wed Nov 30 14:05:49 1988
***************
*** 422,427
DiskSourcePtr data;
data = (DiskSourcePtr) src->data;
XtFree((char *) data->buffer);
if (data->is_tempfile) {
unlink(data->fileName);
XtFree((char *) data->fileName);
--- 422,428 -----
DiskSourcePtr data;
data = (DiskSourcePtr) src->data;
XtFree((char *) data->buffer);
+ (void) fclose(data->file);
if (data->is_tempfile) {
unlink(data->fileName);
XtFree((char *) data->fileName);