Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/libXaw/dist/src merge libXaw 1.0.15.



details:   https://anonhg.NetBSD.org/xsrc/rev/a991b86947ed
branches:  trunk
changeset: 7502:a991b86947ed
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Mar 23 05:26:15 2023 +0000

description:
merge libXaw 1.0.15.

diffstat:

 external/mit/libXaw/dist/src/Pixmap.c     |   1 +
 external/mit/libXaw/dist/src/Text.c       |  14 +++++++-------
 external/mit/libXaw/dist/src/TextAction.c |  20 ++++++++++----------
 3 files changed, 18 insertions(+), 17 deletions(-)

diffs (163 lines):

diff -r 9ebca160c8a1 -r a991b86947ed external/mit/libXaw/dist/src/Pixmap.c
--- a/external/mit/libXaw/dist/src/Pixmap.c     Thu Mar 23 05:25:48 2023 +0000
+++ b/external/mit/libXaw/dist/src/Pixmap.c     Thu Mar 23 05:26:15 2023 +0000
@@ -690,6 +690,7 @@
                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++] = ':';
diff -r 9ebca160c8a1 -r a991b86947ed external/mit/libXaw/dist/src/Text.c
--- a/external/mit/libXaw/dist/src/Text.c       Thu Mar 23 05:25:48 2023 +0000
+++ b/external/mit/libXaw/dist/src/Text.c       Thu Mar 23 05:26:15 2023 +0000
@@ -925,7 +925,7 @@
     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 @@
        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 @@
  *
  * 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 @@
 /*
  * 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 @@
 }
 
 /*
- * 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 @@
  *     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)
diff -r 9ebca160c8a1 -r a991b86947ed external/mit/libXaw/dist/src/TextAction.c
--- a/external/mit/libXaw/dist/src/TextAction.c Thu Mar 23 05:25:48 2023 +0000
+++ b/external/mit/libXaw/dist/src/TextAction.c Thu Mar 23 05:26:15 2023 +0000
@@ -2607,7 +2607,7 @@
        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 @@
 
 /* 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 @@
  *     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 @@
  *
  * 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 @@
        }
     }
 
-    /* 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 @@
        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 @@
                    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 @@
                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 @@
                           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 @@
        case 'R':
        case 'r':
            XBell(XtDisplay(w), 0);
-           /*FALLTROUGH*/
+           /*FALLTHROUGH*/
        default:
            break;
     }



Home | Main Index | Thread Index | Old Index