Module Name:    xsrc
Committed By:   mrg
Date:           Thu Mar 23 05:26:15 UTC 2023

Modified Files:
        xsrc/external/mit/libXaw/dist/src: Pixmap.c Text.c TextAction.c

Log Message:
merge libXaw 1.0.15.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/libXaw/dist/src/Pixmap.c \
    xsrc/external/mit/libXaw/dist/src/TextAction.c
cvs rdiff -u -r1.3 -r1.4 xsrc/external/mit/libXaw/dist/src/Text.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/libXaw/dist/src/Pixmap.c
diff -u xsrc/external/mit/libXaw/dist/src/Pixmap.c:1.2 xsrc/external/mit/libXaw/dist/src/Pixmap.c:1.3
--- xsrc/external/mit/libXaw/dist/src/Pixmap.c:1.2	Sun May  9 16:58:19 2021
+++ xsrc/external/mit/libXaw/dist/src/Pixmap.c	Thu Mar 23 05:26:15 2023
@@ -690,6 +690,7 @@ GetResourcePixmapPath(Display *display)
 		length = (length + (int)strlen(tok) + 3);
 	    }
 	}
+	XtFree(buffer);
 	pixmap_path = XtRealloc(pixmap_path, (Cardinal)((size_t)length + strlen(default_path) + 2));
 	if (length)
 	    pixmap_path[length++] = ':';
Index: xsrc/external/mit/libXaw/dist/src/TextAction.c
diff -u xsrc/external/mit/libXaw/dist/src/TextAction.c:1.2 xsrc/external/mit/libXaw/dist/src/TextAction.c:1.3
--- xsrc/external/mit/libXaw/dist/src/TextAction.c:1.2	Sun May  9 16:58:57 2021
+++ xsrc/external/mit/libXaw/dist/src/TextAction.c	Thu Mar 23 05:26:15 2023
@@ -2607,7 +2607,7 @@ InsertNewLineAndIndent(Widget w, XEvent 
 	strcpy(++ptr, line_to_ip);
 
 	length++;
-	while (length && (isspace(*ptr) || (*ptr == XawTAB)))
+	while (length && (isspace((unsigned char)*ptr) || (*ptr == XawTAB)))
 	    ptr++, length--;
 	*ptr = '\0';
 	text.length = (int)strlen(text.ptr);
@@ -2822,7 +2822,7 @@ RedrawDisplay(Widget w, XEvent *event, S
 
 /* This is kind of a hack, but, only one text widget can have focus at
  * a time on one display. There is a problem in the implementation of the
- * text widget, the scrollbars can not be adressed via editres, since they
+ * text widget, the scrollbars can not be addressed via editres, since they
  * are not children of a subclass of composite.
  * The focus variable is required to make sure only one text window will
  * show a block cursor at one time.
@@ -2971,7 +2971,7 @@ TextLeaveWindow(Widget w, XEvent *event,
  *	Arguments: ctx - The text widget.
  *
  * Description:
- *	  Breaks the line at the previous word boundry when
+ *	  Breaks the line at the previous word boundary when
  *	called inside InsertChar.
  */
 static void
@@ -3201,7 +3201,7 @@ InsertChar(Widget w, XEvent *event, Stri
  *
  * i18n requires the ability to specify multiple characters in a hexa-
  * decimal string at once.  Since Insert was already too long, I made
- * this a seperate routine.
+ * this a separate routine.
  *
  * A legal hex string in MBNF: '0' 'x' ( HEX-DIGIT HEX-DIGIT )+ '\0'
  *
@@ -3257,7 +3257,7 @@ IfHexConvertHexElseReturnParam(const cha
 	}
     }
 
-    /* We quit the above loop becasue we hit a non hex.  If that char is \0... */
+    /* We quit the above loop because we hit a non hex.  If that char is \0... */
     if ((c == '\0') && first_digit) {
 	*len_return = (int)strlen(hexval);
 	return (hexval);       /* ...it was a legal hex string, so return it */
@@ -3391,7 +3391,7 @@ Numeric(Widget w, XEvent *event, String 
 	long mult = ctx->text.mult;
 
 	if (*num_params != 1 || strlen(params[0]) != 1
-	    || (!isdigit(params[0][0])
+	    || (!isdigit((unsigned char)params[0][0])
 		&& (params[0][0] != '-' || mult != 0))) {
 	    char err_buf[256];
 
@@ -3589,7 +3589,7 @@ StripOutOldCRs(TextWidget ctx, XawTextPo
 		    if (!iswspace(((wchar_t*)buf)[i]) || ((periodPos + i) >= to))
 			break;
 		}
-		else if (!isspace(buf[i]) || (periodPos + i) >= to)
+		else if (!isspace((unsigned char)buf[i]) || (periodPos + i) >= to)
 		    break;
 
 	    XtFree(buf);
@@ -3679,7 +3679,7 @@ InsertNewCRs(TextWidget ctx, XawTextPosi
 		if (!iswspace(((wchar_t*)buf)[i]))
 		    break;
 	    }
-	    else if (!isspace(buf[i]))
+	    else if (!isspace((unsigned char)buf[i]))
 		break;
 
 	to -= (i - 1);
@@ -3809,7 +3809,7 @@ GetBlockBoundaries(TextWidget ctx,
 			   XawMin(ctx->text.s.left, ctx->text.s.right),
 			   XawstEOL, XawsdLeft, 1, False);
 	    to   = SrcScan(ctx->text.source,
-			   XawMax(ctx->text.s.right, ctx->text.s.right),
+			   XawMax(ctx->text.s.left, ctx->text.s.right),
 			   XawstEOL, XawsdRight, 1, False);
 	}
 	else {
@@ -4128,7 +4128,7 @@ NoOp(Widget w, XEvent *event _X_UNUSED, 
 	case 'R':
 	case 'r':
 	    XBell(XtDisplay(w), 0);
-	    /*FALLTROUGH*/
+	    /*FALLTHROUGH*/
 	default:
 	    break;
     }

Index: xsrc/external/mit/libXaw/dist/src/Text.c
diff -u xsrc/external/mit/libXaw/dist/src/Text.c:1.3 xsrc/external/mit/libXaw/dist/src/Text.c:1.4
--- xsrc/external/mit/libXaw/dist/src/Text.c:1.3	Mon Apr 26 21:25:12 2021
+++ xsrc/external/mit/libXaw/dist/src/Text.c	Thu Mar 23 05:26:15 2023
@@ -925,7 +925,7 @@ XawTextInitialize(Widget request _X_UNUS
     ctx->text.update = XmuNewScanline(0, 0, 0);
     ctx->text.gc = XtGetGC(cnew, 0, 0);
     ctx->text.hasfocus = False;
-    ctx->text.margin = ctx->text.r_margin; /* Strucure copy */
+    ctx->text.margin = ctx->text.r_margin; /* Structure copy */
     ctx->text.left_margin = ctx->text.r_margin.left;
     ctx->text.update_disabled = False;
     ctx->text.clear_to_eol = True;
@@ -1095,7 +1095,7 @@ _XawTextGetText(TextWidget ctx, XawTextP
 	bytes = sizeof(unsigned char);
     else if (XawTextFormat(ctx, XawFmtWide))
 	bytes = sizeof(wchar_t);
-    else /* if there is another fomat, add here */
+    else /* if there is another format, add here */
 	bytes = 1;
 
     /* leave space for ZERO */
@@ -1459,7 +1459,7 @@ _BuildLineTable(TextWidget ctx, XawTextP
  *
  * Description:
  *	  Returns the width (in pixels) of the widest line that
- *		     is currently visable.
+ *		     is currently visible.
  *
  * Returns:
  *	The width of the widest line
@@ -2824,8 +2824,8 @@ DisplayText(Widget w, XawTextPosition le
 /*
  * This routine implements multi-click selection in a hardwired manner.
  * It supports multi-click entity cycling (char, word, line, file) and mouse
- * motion adjustment of the selected entitie (i.e. select a word then, with
- * button still down, adjust wich word you really meant by moving the mouse).
+ * motion adjustment of the selected entity (i.e. select a word then, with
+ * button still down, adjust which word you really meant by moving the mouse).
  * [NOTE: This routine is to be replaced by a set of procedures that
  * will allows clients to implements a wide class of draw through and
  * multi-click selection user interfaces.]
@@ -3289,7 +3289,7 @@ XawTextExpose(Widget w, XEvent *event, R
 }
 
 /*
- * This routine does all setup required to syncronize batched screen updates
+ * This routine does all setup required to synchronize batched screen updates
  */
 void
 _XawTextPrepareToUpdate(TextWidget ctx)
@@ -3802,7 +3802,7 @@ XawTextGetValuesHook(Widget w, ArgList a
  *	pos - any position
  *
  * Description:
- *	Returns a valid position given any postition.
+ *	Returns a valid position given any position.
  *
  * Returns:
  *	A position between (0 and lastPos)

Reply via email to