Source-Changes-HG archive

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

[xsrc/trunk]: xsrc/external/mit merge libXaw 1.0.14, libXres 1.2.1, and libXt...



details:   https://anonhg.NetBSD.org/xsrc/rev/059f086aad76
branches:  trunk
changeset: 10674:059f086aad76
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Apr 26 21:25:12 2021 +0000

description:
merge libXaw 1.0.14, libXres 1.2.1, and libXt 1.2.1.

diffstat:

 external/mit/libXaw/dist/README         |    26 -
 external/mit/libXaw/dist/src/Text.c     |   211 +-
 external/mit/libXres/dist/README        |    25 -
 external/mit/libXres/dist/src/XRes.c    |     3 +-
 external/mit/libXt/dist/compile         |     6 +-
 external/mit/libXt/dist/m4/libtool.m4   |    71 +-
 external/mit/libXt/dist/src/Convert.c   |  1393 +++++++++---------
 external/mit/libXt/dist/src/NextEvent.c |  2163 ++++++++++++++-------------
 external/mit/libXt/dist/src/ResConfig.c |  1358 ++++++++---------
 external/mit/libXt/dist/src/TMparse.c   |  2336 +++++++++++++++---------------
 external/mit/libXt/dist/util/makestrs.c |   996 ++++++------
 11 files changed, 4371 insertions(+), 4217 deletions(-)

diffs (truncated from 11431 to 300 lines):

diff -r c682ae58d9d8 -r 059f086aad76 external/mit/libXaw/dist/README
--- a/external/mit/libXaw/dist/README   Mon Apr 26 21:23:24 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-Xaw is the X Athena Widget Set.
-Xaw is a widget set based on the X Toolkit Intrinsics (Xt) Library.
-
-All questions regarding this software should be directed at the
-Xorg mailing list:
-
-        http://lists.freedesktop.org/mailman/listinfo/xorg
-
-Please submit bug reports to the Xorg bugzilla:
-
-        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
-
-The master development code repository can be found at:
-
-        git://anongit.freedesktop.org/git/xorg/lib/libXaw
-
-        http://cgit.freedesktop.org/xorg/lib/libXaw
-
-For patch submission instructions, see:
-
-       http://www.x.org/wiki/Development/Documentation/SubmittingPatches
-
-For more information on the git code manager, see:
-
-        http://wiki.x.org/wiki/GitPage
-
diff -r c682ae58d9d8 -r 059f086aad76 external/mit/libXaw/dist/src/Text.c
--- a/external/mit/libXaw/dist/src/Text.c       Mon Apr 26 21:23:24 2021 +0000
+++ b/external/mit/libXaw/dist/src/Text.c       Mon Apr 26 21:25:12 2021 +0000
@@ -292,7 +292,7 @@
     sizeof(Cursor),
     offset(simple.cursor),
     XtRString,
-    "xterm"
+    (XtPointer)"xterm"
   },
   {
     XtNheight,
@@ -481,7 +481,7 @@
 
 /*ARGSUSED*/
 static void
-CvtStringToScrollMode(XrmValuePtr args, Cardinal *num_args,
+CvtStringToScrollMode(XrmValuePtr args _X_UNUSED, Cardinal *num_args _X_UNUSED,
                      XrmValuePtr fromVal, XrmValuePtr toVal)
 {
     static XawTextScrollMode scrollMode = XawtextScrollNever;
@@ -507,10 +507,10 @@
 
 /*ARGSUSED*/
 static Boolean
-CvtScrollModeToString(Display *dpy, XrmValue *args, Cardinal *num_args,
-                     XrmValue *fromVal, XrmValue *toVal, XtPointer *data)
+CvtScrollModeToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args _X_UNUSED,
+                     XrmValue *fromVal, XrmValue *toVal _X_UNUSED, XtPointer *data _X_UNUSED)
 {
-    static char *buffer;
+    static String buffer;
     Cardinal size;
 
     switch (*(XawTextScrollMode *)fromVal->addr) {
@@ -527,7 +527,7 @@
            toVal->size = 0;
            return (False);
     }
-    size = strlen(buffer) + 1;
+    size = (Cardinal)strlen(buffer) + 1;
     if (toVal->addr != NULL) {
        if (toVal->size < size) {
            toVal->size = size;
@@ -544,7 +544,7 @@
 
 /*ARGSUSED*/
 static void
-CvtStringToWrapMode(XrmValuePtr args, Cardinal *num_args,
+CvtStringToWrapMode(XrmValuePtr args _X_UNUSED, Cardinal *num_args _X_UNUSED,
                    XrmValuePtr fromVal, XrmValuePtr toVal)
 {
     static XawTextWrapMode wrapMode = XawtextWrapNever;
@@ -569,10 +569,10 @@
 
 /*ARGSUSED*/
 static Boolean
-CvtWrapModeToString(Display *dpy, XrmValue *args, Cardinal *num_args,
-                   XrmValue *fromVal, XrmValue *toVal, XtPointer *data)
+CvtWrapModeToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args _X_UNUSED,
+                   XrmValue *fromVal, XrmValue *toVal _X_UNUSED, XtPointer *data _X_UNUSED)
 {
-    static char *buffer;
+    static String buffer;
     Cardinal size;
 
     switch (*(XawTextWrapMode *)fromVal->addr) {
@@ -591,7 +591,7 @@
            toVal->size = 0;
            return (False);
     }
-    size = strlen(buffer) + 1;
+    size = (Cardinal)strlen(buffer) + 1;
     if (toVal->addr != NULL) {
        if (toVal->size < size) {
            toVal->size = size;
@@ -608,8 +608,8 @@
 
 /*ARGSUSED*/
 static Boolean
-CvtStringToJustifyMode(Display *dpy, XrmValue *args, Cardinal *num_args,
-                      XrmValue *fromVal, XrmValue *toVal, XtPointer *data)
+CvtStringToJustifyMode(Display *dpy _X_UNUSED, XrmValue *args _X_UNUSED, Cardinal *num_args _X_UNUSED,
+                      XrmValue *fromVal, XrmValue *toVal, XtPointer *data _X_UNUSED)
 {
     XawTextJustifyMode justify;
     XrmQuark q;
@@ -641,10 +641,10 @@
 
 /*ARGSUSED*/
 static Boolean
-CvtJustifyModeToString(Display *dpy, XrmValue *args, Cardinal *num_args,
-                      XrmValue *fromVal, XrmValue *toVal, XtPointer *data)
+CvtJustifyModeToString(Display *dpy, XrmValue *args _X_UNUSED, Cardinal *num_args _X_UNUSED,
+                      XrmValue *fromVal, XrmValue *toVal, XtPointer *data _X_UNUSED)
 {
-    static char *buffer;
+    static String buffer;
     Cardinal size;
 
     switch (*(XawTextJustifyMode *)fromVal->addr) {
@@ -666,7 +666,7 @@
            toVal->size = 0;
            return (False);
     }
-    size = strlen(buffer) + 1;
+    size = (Cardinal)strlen(buffer) + 1;
     if (toVal->addr != NULL) {
        if (toVal->size < size) {
            toVal->size = size;
@@ -687,9 +687,9 @@
 XawTextClassInitialize(void)
 {
     if (!XawFmt8Bit)
-       FMT8BIT = XawFmt8Bit = XrmPermStringToQuark("FMT8BIT");
+       FMT8BIT = XawFmt8Bit = (unsigned long)XrmPermStringToQuark("FMT8BIT");
     if (!XawFmtWide)
-       XawFmtWide = XrmPermStringToQuark("FMTWIDE");
+       XawFmtWide = (unsigned long)XrmPermStringToQuark("FMTWIDE");
 
     XawInitializeWidgetSet();
 
@@ -739,12 +739,12 @@
        return;
 
     if (vbar != NULL)
-       x = XtWidth(vbar);
+       x = (Position)XtWidth(vbar);
     else
-       x = -XtBorderWidth(hbar);
-    y = XtHeight(ctx) - XtHeight(hbar) - XtBorderWidth(hbar);
+       x = (Position)(-XtBorderWidth(hbar));
+    y = (Position)(XtHeight(ctx) - XtHeight(hbar) - XtBorderWidth(hbar));
     if (vbar != NULL) {
-       width = XtWidth(ctx) - XtWidth(vbar) - XtBorderWidth(vbar);
+       width = (Dimension)(XtWidth(ctx) - XtWidth(vbar) - XtBorderWidth(vbar));
        if (width > XtWidth(ctx))
            width = XtWidth(ctx);
     }
@@ -775,7 +775,7 @@
     if (vbar == NULL)
        return;
 
-    x = y = -XtBorderWidth(vbar);
+    x = y = (Position)(-XtBorderWidth(vbar));
     height = XtHeight(ctx);
     width = XtWidth(vbar);
 
@@ -795,7 +795,7 @@
     XtAddCallback(vbar, XtNscrollProc, VScroll, (XtPointer)ctx);
     XtAddCallback(vbar, XtNjumpProc, VJump, (XtPointer)ctx);
 
-    ctx->text.r_margin.left += XtWidth(vbar) + XtBorderWidth(vbar);
+    ctx->text.r_margin.left += (XtWidth(vbar) + XtBorderWidth(vbar));
     ctx->text.left_margin = ctx->text.margin.left = ctx->text.r_margin.left;
 
     PositionVScrollBar(ctx);
@@ -827,7 +827,7 @@
     if (vbar == NULL)
        return;
 
-    ctx->text.r_margin.left -= XtWidth(vbar) + XtBorderWidth(vbar);
+    ctx->text.r_margin.left = (Position)(ctx->text.r_margin.left - (XtWidth(vbar) + XtBorderWidth(vbar)));
     ctx->text.left_margin = ctx->text.margin.left = ctx->text.r_margin.left;
 
     XtDestroyWidget(vbar);
@@ -856,7 +856,7 @@
 
     bottom = ctx->text.r_margin.bottom + XtHeight(hbar) + XtBorderWidth(hbar);
 
-    ctx->text.margin.bottom = ctx->text.r_margin.bottom = bottom;
+    ctx->text.margin.bottom = ctx->text.r_margin.bottom = (Position)bottom;
 
     PositionHScrollBar(ctx);
     TextSinkResize(ctx->text.sink);
@@ -886,7 +886,9 @@
     if (hbar == NULL)
        return;
 
-    ctx->text.r_margin.bottom -= XtHeight(hbar) + XtBorderWidth(hbar);
+    ctx->text.r_margin.bottom = (Position)(ctx->text.r_margin.bottom
+                                          - (XtHeight(hbar)
+                                           + XtBorderWidth(hbar)));
     ctx->text.margin.bottom = ctx->text.r_margin.bottom;
 
     XtDestroyWidget(hbar);
@@ -897,8 +899,8 @@
 
 /*ARGSUSED*/
 static void
-XawTextInitialize(Widget request, Widget cnew,
-                 ArgList args, Cardinal *num_args)
+XawTextInitialize(Widget request _X_UNUSED, Widget cnew,
+                 ArgList args _X_UNUSED, Cardinal *num_args _X_UNUSED)
 {
     TextWidget ctx = (TextWidget)cnew;
 
@@ -946,7 +948,7 @@
 #endif
 
     if (XtHeight(ctx) == DEFAULT_TEXT_HEIGHT) {
-       XtHeight(ctx) = VMargins(ctx);
+       XtHeight(ctx) = (Dimension)VMargins(ctx);
        if (ctx->text.sink != NULL)
            XtHeight(ctx) += XawTextSinkMaxHeight(ctx->text.sink, 1);
     }
@@ -1046,7 +1048,7 @@
        else
            y += (ctx->text.lt.info[line].y - ctx->text.lt.info[line - 1].y) + 1;
 
-       XawTextSinkInsertCursor(ctx->text.sink, x, y, state);
+       XawTextSinkInsertCursor(ctx->text.sink, (Position)x, (Position)y, state);
     }
 
     /* Keep Input Method up to speed  */
@@ -1097,7 +1099,7 @@
        bytes = 1;
 
     /* leave space for ZERO */
-    tempResult = result = XtMalloc((unsigned)(right - left + ONE) * bytes);
+    tempResult = result = XtMalloc((unsigned)(right - left + ONE) * (unsigned)bytes);
 
     while (left < right) {
        left = SrcRead(ctx->text.source, left, &text, (int)(right - left));
@@ -1131,7 +1133,7 @@
     if (XawTextFormat(ctx, XawFmtWide)) {
        MultiSinkObject sink = (MultiSinkObject)ctx->text.sink;
        ws = (wchar_t *)_XawTextGetText(ctx, left, right);
-       n = wcslen(ws);
+       n = (long)wcslen(ws);
        for (j = 0, i = 0; j < n; j++) {
            wc = ws[j];
            if (XwcTextEscapement (sink->multi_sink.fontset, &wc, 1)
@@ -1145,7 +1147,7 @@
     else {
        s = (unsigned char *)_XawTextGetText(ctx, left, right);
        /* only HT and NL control chars are allowed, strip out others */
-       n = strlen((char *)s);
+       n = (long)strlen((char *)s);
        i = 0;
        for (j = 0; j < n; j++) {
            c = s[j];
@@ -1255,10 +1257,10 @@
     Cardinal size;
 
     if ((int)XtHeight(ctx) > VMargins(ctx)) {
-       height = XtHeight(ctx) - VMargins(ctx);
+       height = (Dimension)(XtHeight(ctx) - VMargins(ctx));
        lines = XawTextSinkMaxLines(ctx->text.sink, height);
     }
-    size = sizeof(XawTextLineTableEntry) * (lines + 1);
+    size = (Cardinal)(sizeof(XawTextLineTableEntry) * (size_t)(lines + 1));
 
     if (lines != ctx->text.lt.lines || ctx->text.lt.info == NULL) {
        ctx->text.lt.info = (XawTextLineTableEntry *)
@@ -1380,12 +1382,12 @@
            lt->y = y;
            ctx->text.clear_to_eol = True;
        }
-       if (lt->textWidth != width) {
-           if (lt->textWidth > width)
+       if (lt->textWidth != (Cardinal)width) {
+           if (lt->textWidth > (Cardinal)width)
                ctx->text.clear_to_eol = True;
-           lt->textWidth = width;
+           lt->textWidth = (unsigned)width;
        }
-       y += height;
+       y = (Position)(y + height);
 



Home | Main Index | Thread Index | Old Index