commit 0f4ac4f4b7649f1fc8f9b01b32dc7de5ec0f7ade Author: MSVSphere Packaging Team Date: Fri Oct 25 13:46:24 2024 +0300 import Xaw3d-1.6.5-3.el10 diff --git a/.Xaw3d.metadata b/.Xaw3d.metadata new file mode 100644 index 0000000..118dad7 --- /dev/null +++ b/.Xaw3d.metadata @@ -0,0 +1,3 @@ +6e8c8b981cf0bb8c11e94c78694a2929b9a4f4da SOURCES/libXaw3d-1.6.5.tar.xz +2c171797c80ab18a2ada25c9d46a910aeb363f7f SOURCES/libXaw3d-1.6.5.tar.xz.sig +0751bc040e0e2ec05655a412017d40f76737b22c SOURCES/matt.turner.asc diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3473839 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +SOURCES/libXaw3d-1.6.5.tar.xz +SOURCES/libXaw3d-1.6.5.tar.xz.sig +SOURCES/matt.turner.asc diff --git a/SOURCES/Xaw3d-1.5-debian-fixes.patch b/SOURCES/Xaw3d-1.5-debian-fixes.patch new file mode 100644 index 0000000..2a2aedf --- /dev/null +++ b/SOURCES/Xaw3d-1.5-debian-fixes.patch @@ -0,0 +1,647 @@ +diff -up Xaw3d-1.5libXaw3d-1.6.1/src/AsciiSrc.c.debian Xaw3d-1.5libXaw3d-1.6.1/src/AsciiSrc.c +--- Xaw3d-1.5libXaw3d-1.6.1/src/AsciiSrc.c.debian 2000-11-27 14:19:36.000000000 +0100 ++++ Xaw3d-1.5libXaw3d-1.6.1/src/AsciiSrc.c 2008-10-06 11:42:13.000000000 +0200 +@@ -51,11 +51,17 @@ in this Software without prior written a + #include + #endif + ++#include ++#include ++#include + + #if (defined(ASCII_STRING) || defined(ASCII_DISK)) + # include /* for Widget Classes. */ + #endif + ++#include ++#include ++#include + + /**************************************************************** + * +@@ -1007,7 +1013,9 @@ InitStringOrFile(src, newString) + AsciiSrcObject src; + Boolean newString; + { +- char * open_mode = NULL; ++ mode_t open_mode = 0; ++ const char *fdopen_mode = NULL; ++ int fd; + FILE * file; + char fileName[TMPSIZ]; + +@@ -1049,7 +1057,8 @@ Boolean newString; + XtErrorMsg("NoFile", "asciiSourceCreate", "XawError", + "Creating a read only disk widget and no file specified.", + NULL, 0); +- open_mode = "r"; ++ open_mode = O_RDONLY; ++ fdopen_mode = "r"; + break; + case XawtextAppend: + case XawtextEdit: +@@ -1057,9 +1066,17 @@ Boolean newString; + src->ascii_src.string = fileName; + (void) tmpnam(src->ascii_src.string); + src->ascii_src.is_tempfile = TRUE; +- open_mode = "w"; +- } else +- open_mode = "r+"; ++ open_mode = O_WRONLY | O_CREAT | O_EXCL; ++ fdopen_mode = "w"; ++ } else { ++/* O_NOFOLLOW is a BSD & Linux extension */ ++#ifdef O_NOFOLLOW ++ open_mode = O_RDWR | O_NOFOLLOW; ++#else ++ open_mode = O_RDWR; /* unsafe; subject to race conditions */ ++#endif ++ fdopen_mode = "r+"; ++ } + break; + default: + XtErrorMsg("badMode", "asciiSourceCreate", "XawError", +@@ -1078,11 +1095,14 @@ Boolean newString; + } + + if (!src->ascii_src.is_tempfile) { +- if ((file = fopen(src->ascii_src.string, open_mode)) != 0) { +- (void) fseek(file, (Off_t)0, 2); +- src->ascii_src.length = (XawTextPosition) ftell(file); +- return file; +- } else { ++ if ((fd = open(src->ascii_src.string, open_mode, 0666))) { ++ if ((file = fdopen(fd, fdopen_mode)) != NULL) { ++ (void)fseek(file, 0, SEEK_END); ++ src->ascii_src.length = (XawTextPosition)ftell(file); ++ return (file); ++ } ++ } ++ { + String params[2]; + Cardinal num_params = 2; + +@@ -1094,7 +1114,7 @@ Boolean newString; + } + } + src->ascii_src.length = 0; +- return((FILE *)NULL); ++ return(NULL); + } + + static void +diff -up Xaw3d-1.5libXaw3d-1.6.1/include/X11/Xaw3d/AsciiSrcP.h.debian Xaw3d-1.5libXaw3d-1.6.1/include/X11/Xaw3d/AsciiSrcP.h +--- Xaw3d-1.5libXaw3d-1.6.1/include/X11/Xaw3d/AsciiSrcP.h.debian 1996-10-15 16:41:18.000000000 +0200 ++++ Xaw3d-1.5libXaw3d-1.6.1/include/X11/Xaw3d/AsciiSrcP.h 2008-10-06 11:42:13.000000000 +0200 +@@ -85,7 +85,11 @@ SOFTWARE. + #ifdef L_tmpnam + #define TMPSIZ L_tmpnam + #else +-#define TMPSIZ 32 /* bytes to allocate for tmpnam */ ++#ifdef PATH_MAX ++#define TMPSIZ PATH_MAX ++#else ++#define TMPSIZ 1024 /* bytes to allocate for tmpnam */ ++#endif + #endif + + #define MAGIC_VALUE ((XawTextPosition) -1) /* Magic value. */ +diff -up Xaw3d-1.5libXaw3d-1.6.1/src/MenuButton.c.debian Xaw3d-1.5libXaw3d-1.6.1/src/MenuButton.c +--- Xaw3d-1.5libXaw3d-1.6.1/src/MenuButton.c.debian 1996-10-15 16:41:20.000000000 +0200 ++++ Xaw3d-1.5libXaw3d-1.6.1/src/MenuButton.c 2008-10-06 11:42:13.000000000 +0200 +@@ -53,6 +53,8 @@ in this Software without prior written a + #include + #include + ++#include "XawAlloc.h" ++ + static void ClassInitialize(); + static void PopupMenu(); + +@@ -179,9 +181,16 @@ Cardinal * num_params; + + if (menu == NULL) { + char error_buf[BUFSIZ]; +- (void) sprintf(error_buf, "MenuButton: %s %s.", +- "Could not find menu widget named", mbw->menu_button.menu_name); +- XtAppWarning(XtWidgetToApplicationContext(w), error_buf); ++ char *err1 = "MenuButton: Could not find menu widget named "; ++ char *perr; ++ int len; ++ ++ len = strlen(err1) + strlen(mbw->menu_button.menu_name) + 1 + 1; ++ perr = XtStackAlloc(len, error_buf); ++ if (perr == NULL) return; ++ sprintf(perr, "%s%s.", err1, mbw->menu_button.menu_name); ++ XtAppWarning(XtWidgetToApplicationContext(w), perr); ++ XtStackFree(perr, error_buf); + return; + } + if (!XtIsRealized(menu)) +diff -up Xaw3d-1.5libXaw3d-1.6.1/src/MultiSrc.c.debian Xaw3d-1.5libXaw3d-1.6.1/src/MultiSrc.c +--- Xaw3d-1.5libXaw3d-1.6.1/src/MultiSrc.c.debian 2008-10-06 11:42:13.000000000 +0200 ++++ Xaw3d-1.5libXaw3d-1.6.1/src/MultiSrc.c 2008-10-06 11:42:13.000000000 +0200 +@@ -74,6 +74,9 @@ in this Software without prior written a + #include + #include + #include ++#include ++#include ++#include + + /**************************************************************** + * +@@ -1077,7 +1080,9 @@ InitStringOrFile(src, newString) + MultiSrcObject src; + Boolean newString; + { +- char * open_mode = NULL; ++ mode_t open_mode = 0; ++ const char *fdopen_mode = NULL; ++ int fd; + FILE * file; + char fileName[TMPSIZ]; + Display *d = XtDisplayOfObject((Widget)src); +@@ -1128,7 +1133,8 @@ InitStringOrFile(src, newString) + XtErrorMsg("NoFile", "multiSourceCreate", "XawError", + "Creating a read only disk widget and no file specified.", + NULL, 0); +- open_mode = "r"; ++ open_mode = O_RDONLY; ++ fdopen_mode = "r"; + break; + case XawtextAppend: + case XawtextEdit: +@@ -1141,9 +1147,17 @@ InitStringOrFile(src, newString) + + (void) tmpnam(src->multi_src.string); + src->multi_src.is_tempfile = TRUE; +- open_mode = "w"; +- } else +- open_mode = "r+"; ++ open_mode = O_WRONLY | O_CREAT | O_EXCL; ++ fdopen_mode = "w"; ++ } else { ++/* O_NOFOLLOW is a BSD & Linux extension */ ++#ifdef O_NOFOLLOW ++ open_mode = O_RDWR | O_NOFOLLOW; ++#else ++ open_mode = O_RDWR; /* unsafe; subject to race conditions */ ++#endif ++ fdopen_mode = "r+"; ++ } + break; + default: + XtErrorMsg("badMode", "multiSourceCreate", "XawError", +@@ -1162,11 +1176,14 @@ InitStringOrFile(src, newString) + } + + if (!src->multi_src.is_tempfile) { +- if ((file = fopen(src->multi_src.string, open_mode)) != 0) { +- (void) fseek(file, (Off_t)0, 2); +- src->multi_src.length = ftell (file); +- return file; +- } else { ++ if ((fd = open(src->multi_src.string, open_mode, 0666))) { ++ if ((file = fdopen(fd, fdopen_mode)) != NULL) { ++ (void)fseek(file, 0, SEEK_END); ++ src->multi_src.length = (XawTextPosition)ftell(file); ++ return (file); ++ } ++ } ++ { + String params[2]; + Cardinal num_params = 2; + +@@ -1178,7 +1195,7 @@ InitStringOrFile(src, newString) + } + } + src->multi_src.length = 0; +- return((FILE *)NULL); ++ return(NULL); + #undef StrLen + } + +diff -up Xaw3d-1.5libXaw3d-1.6.1/include/X11/Xaw3d/MultiSrcP.h.debian Xaw3d-1.5libXaw3d-1.6.1/include/X11/Xaw3d/MultiSrcP.h +--- Xaw3d-1.5libXaw3d-1.6.1/include/X11/Xaw3d/MultiSrcP.h.debian 1996-10-15 16:41:21.000000000 +0200 ++++ Xaw3d-1.5libXaw3d-1.6.1/include/X11/Xaw3d/MultiSrcP.h 2008-10-06 11:42:13.000000000 +0200 +@@ -113,7 +113,11 @@ SOFTWARE. + #ifdef L_tmpnam + #define TMPSIZ L_tmpnam + #else +-#define TMPSIZ 32 /* bytes to allocate for tmpnam */ ++#ifdef PATH_MAX ++#define TMPSIZ PATH_MAX ++#else ++#define TMPSIZ 1024 /* bytes to allocate for tmpnam */ ++#endif + #endif + + #define MAGIC_VALUE ((XawTextPosition) -1) /* Magic value. */ +diff -up Xaw3d-1.5libXaw3d-1.6.1/src/Simple.c.debian Xaw3d-1.5libXaw3d-1.6.1/src/Simple.c +--- Xaw3d-1.5libXaw3d-1.6.1/src/Simple.c.debian 2000-11-27 14:19:36.000000000 +0100 ++++ Xaw3d-1.5libXaw3d-1.6.1/src/Simple.c 2008-10-06 11:42:13.000000000 +0200 +@@ -56,6 +56,8 @@ SOFTWARE. + #include + #include + ++#include "XawAlloc.h" ++ + #define offset(field) XtOffsetOf(SimpleRec, simple.field) + + static XtResource resources[] = { +@@ -148,11 +150,17 @@ static void ClassPartInitialize(class) + + if (c->simple_class.change_sensitive == NULL) { + char buf[BUFSIZ]; +- +- (void) sprintf(buf, +- "%s Widget: The Simple Widget class method 'change_sensitive' is undefined.\nA function must be defined or inherited.", +- c->core_class.class_name); +- XtWarning(buf); ++ char *pbuf; ++ char *msg1 = " Widget: The Simple Widget class method 'change_sensitive' is undefined.\nA function must be defined or inherited."; ++ int len; ++ ++ len = strlen(msg1) + strlen(c->core_class.class_name) + 1; ++ pbuf = XtStackAlloc(len, buf); ++ if (pbuf != NULL) { ++ sprintf(pbuf, "%s%s", c->core_class.class_name, msg1); ++ XtWarning(pbuf); ++ XtStackFree(pbuf, buf); ++ } + c->simple_class.change_sensitive = ChangeSensitive; + } + +diff -up Xaw3d-1.5libXaw3d-1.6.1/src/SimpleMenu.c.debian Xaw3d-1.5libXaw3d-1.6.1/src/SimpleMenu.c +--- Xaw3d-1.5libXaw3d-1.6.1/src/SimpleMenu.c.debian 2003-02-17 07:45:07.000000000 +0100 ++++ Xaw3d-1.5libXaw3d-1.6.1/src/SimpleMenu.c 2008-10-06 11:42:13.000000000 +0200 +@@ -51,6 +51,8 @@ in this Software without prior written a + #include + #include + ++#include "XawAlloc.h" ++ + #define streq(a, b) ( strcmp((a), (b)) == 0 ) + + #define offset(field) XtOffsetOf(SimpleMenuRec, simple_menu.field) +@@ -755,9 +757,17 @@ Cardinal * num_params; + + if ( (menu = FindMenu(w, params[0])) == NULL) { + char error_buf[BUFSIZ]; +- (void) sprintf(error_buf, "%s '%s'", +- "Xaw - SimpleMenuWidget: could not find menu named: ", params[0]); +- XtAppWarning(XtWidgetToApplicationContext(w), error_buf); ++ char *err1 = "Xaw - SimpleMenuWidget: could not find menu named: "; ++ char *perr; ++ int len; ++ ++ len = strlen(err1) + strlen(params[0]) + 2 + 1; ++ perr = XtStackAlloc(len, error_buf); ++ if (perr == NULL) ++ return; ++ sprintf(perr, "%s'%s'", err1, params[0]); ++ XtAppWarning(XtWidgetToApplicationContext(w), perr); ++ XtStackFree(perr, error_buf); + return; + } + +diff -up Xaw3d-1.5libXaw3d-1.6.1/src/StripChart.c.debian Xaw3d-1.5libXaw3d-1.6.1/src/StripChart.c +--- Xaw3d-1.5libXaw3d-1.6.1/src/StripChart.c.debian 2003-02-10 18:18:00.000000000 +0100 ++++ Xaw3d-1.5libXaw3d-1.6.1/src/StripChart.c 2008-10-06 11:42:13.000000000 +0200 +@@ -315,7 +315,15 @@ XtIntervalId *id; /* unused */ + if (w->strip_chart.points != NULL) { + w->strip_chart.points[0].x = w->strip_chart.interval + s; + XDrawPoints(XtDisplay(w), XtWindow(w), w->strip_chart.hiGC, +- w->strip_chart.points, w->strip_chart.scale, ++ /* ++ * patch: ++ * ++ * w->strip_chart.points, w->strip_chart.scale, ++ * ++ * this to avoid a subdle bug of extra spurios scan ++ * line in this widget. ++ */ ++ w->strip_chart.points, w->strip_chart.scale - 1, + CoordModePrevious); + } + +diff -up Xaw3d-1.5libXaw3d-1.6.1/src/Text.c.debian Xaw3d-1.5libXaw3d-1.6.1/src/Text.c +--- Xaw3d-1.5libXaw3d-1.6.1/src/Text.c.debian 2008-10-06 11:42:13.000000000 +0200 ++++ Xaw3d-1.5libXaw3d-1.6.1/src/Text.c 2008-10-06 11:43:16.000000000 +0200 +@@ -76,6 +76,8 @@ SOFTWARE. + #include /* for isprint() */ + #include + ++#include "XawAlloc.h" ++ + #ifndef MAX_LEN_CT + #define MAX_LEN_CT 6 /* for sequence: ESC $ ( A \xx \xx */ + #endif +@@ -521,6 +523,8 @@ Cardinal *num_args; /* unused */ + TextWidget ctx = (TextWidget) new; + char error_buf[BUFSIZ]; + int s; ++ char *perr; /* frankie */ ++ size_t len; /* frankie */ + + ctx->text.threeD = XtVaCreateWidget("threeD", threeDWidgetClass, new, + XtNx, 0, XtNy, 0, +@@ -569,10 +573,17 @@ Cardinal *num_args; /* unused */ + if (ctx->text.scroll_vert != XawtextScrollNever) + if ( (ctx->text.resize == XawtextResizeHeight) || + (ctx->text.resize == XawtextResizeBoth) ) { +- (void) sprintf(error_buf, "Xaw Text Widget %s:\n %s %s.", ctx->core.name, +- "Vertical scrolling not allowed with height resize.\n", +- "Vertical scrolling has been DEACTIVATED."); +- XtAppWarning(XtWidgetToApplicationContext(new), error_buf); ++ char *err1 = "Xaw Text Widget "; ++ char *err2 = ":\nVertical scrolling not allowed with height resize.\n"; ++ char *err3 = "Vertical scrolling has been DEACTIVATED."; ++ len = strlen(err1) + strlen(err2) + strlen(err3) + ++ strlen(ctx->core.name) + 1; ++ perr = XtStackAlloc(len, error_buf); ++ if (perr != NULL) { ++ (void) sprintf(perr, "%s%s%s%s", err1, ctx->core.name, err2, err3); ++ XtAppWarning(XtWidgetToApplicationContext(new), perr); ++ XtStackFree(perr, error_buf); ++ } + ctx->text.scroll_vert = XawtextScrollNever; + } + else if (ctx->text.scroll_vert == XawtextScrollAlways) +@@ -580,18 +591,32 @@ Cardinal *num_args; /* unused */ + + if (ctx->text.scroll_horiz != XawtextScrollNever) + if (ctx->text.wrap != XawtextWrapNever) { +- (void) sprintf(error_buf, "Xaw Text Widget %s:\n %s %s.", ctx->core.name, +- "Horizontal scrolling not allowed with wrapping active.\n", +- "Horizontal scrolling has been DEACTIVATED."); +- XtAppWarning(XtWidgetToApplicationContext(new), error_buf); ++ char *err1 = "Xaw Text Widget "; ++ char *err2 = ":\nHorizontal scrolling not allowed with wrapping active."; ++ char *err3 = "\nHorizontal scrolling has been DEACTIVATED."; ++ len = strlen(err1) + strlen(err2) + strlen(err3) + ++ strlen(ctx->core.name) + 1; ++ perr = XtStackAlloc(len, error_buf); ++ if (perr != NULL) { ++ (void) sprintf(perr, "%s%s%s%s", err1, ctx->core.name, err2, err3); ++ XtAppWarning(XtWidgetToApplicationContext(new), perr); ++ XtStackFree(perr, error_buf); ++ } + ctx->text.scroll_horiz = XawtextScrollNever; + } + else if ( (ctx->text.resize == XawtextResizeWidth) || + (ctx->text.resize == XawtextResizeBoth) ) { +- (void) sprintf(error_buf, "Xaw Text Widget %s:\n %s %s.", ctx->core.name, +- "Horizontal scrolling not allowed with width resize.\n", +- "Horizontal scrolling has been DEACTIVATED."); +- XtAppWarning(XtWidgetToApplicationContext(new), error_buf); ++ char *err1 = "Xaw Text Widget "; ++ char *err2 = ":\nHorizontal scrolling not allowed with width resize.\n"; ++ char *err3 = "Horizontal scrolling has been DEACTIVATED."; ++ len = strlen(err1) + strlen(err2) + strlen(err3) + ++ strlen(ctx->core.name) + 1; ++ perr = XtStackAlloc(len, error_buf); ++ if (perr != NULL) { ++ (void) sprintf(perr, "%s%s%s%s", err1, ctx->core.name, err2, err3); ++ XtAppWarning(XtWidgetToApplicationContext(new), perr); ++ XtStackFree(perr, error_buf); ++ } + ctx->text.scroll_horiz = XawtextScrollNever; + } + else if (ctx->text.scroll_horiz == XawtextScrollAlways) +diff -up Xaw3d-1.5libXaw3d-1.6.1/src/TextPop.c.debian Xaw3d-1.5libXaw3d-1.6.1/src/TextPop.c +--- Xaw3d-1.5libXaw3d-1.6.1/src/TextPop.c.debian 2000-11-27 14:19:36.000000000 +0100 ++++ Xaw3d-1.5libXaw3d-1.6.1/src/TextPop.c 2008-10-06 11:42:13.000000000 +0200 +@@ -66,6 +66,8 @@ in this Software without prior written a + #include /* for O_RDONLY */ + #include + ++#include "XawAlloc.h" ++ + #ifdef X_NOT_STDC_ENV + extern int errno; + #endif +@@ -809,6 +811,8 @@ DoSearch(search) + struct SearchAndReplace * search; + { + char msg[BUFSIZ]; ++ char *pmsg; ++ int len; + Widget tw = XtParent(search->search_popup); + XawTextPosition pos; + XawTextScanDirection dir; +@@ -835,9 +839,20 @@ struct SearchAndReplace * search; + /* The Raw string in find.ptr may be WC I can't use here, so I re - call + GetString to get a tame version. */ + +- if (pos == XawTextSearchError) +- (void) sprintf( msg, "Could not find string ``%s''.", GetString( search->search_text ) ); +- else { ++ if (pos == XawTextSearchError) { ++ char *msg1 = "Could not find string ``"; ++ char *msg2 = "''."; ++ len = strlen(msg1) + strlen(msg2) + ++ strlen(GetString( search->search_text )) + 1; ++ pmsg = XtStackAlloc(len, msg); ++ if (pmsg != NULL) { ++ (void) sprintf( pmsg, "%s%s%s", msg1, GetString( search->search_text ), ++ msg2); ++ } else { ++ pmsg = msg; ++ (void) sprintf( pmsg, "Could not find string"); ++ } ++ } else { + if (dir == XawsdRight) + XawTextSetInsertionPoint( tw, pos + text.length); + else +@@ -849,7 +864,8 @@ struct SearchAndReplace * search; + } + + XawTextUnsetSelection(tw); +- SetSearchLabels(search, msg, "", TRUE); ++ SetSearchLabels(search, pmsg, "", TRUE); ++ XtStackFree(pmsg, msg); + return(FALSE); + } + +@@ -982,13 +998,26 @@ Boolean once_only, show_current; + if ( (new_pos == XawTextSearchError) ) { + if (count == 0) { + char msg[BUFSIZ]; ++ char *pmsg; ++ int len; ++ char *msg1 = "*** Error: Could not find string ``"; ++ char *msg2 = "''. ***"; + + /* The Raw string in find.ptr may be WC I can't use here, + so I call GetString to get a tame version.*/ + +- (void) sprintf( msg, "%s %s %s", "*** Error: Could not find string ``", +- GetString( search->search_text ), "''. ***"); +- SetSearchLabels(search, msg, "", TRUE); ++ len = strlen(msg1) + strlen(msg2) + ++ strlen(GetString( search->search_text )) + 1; ++ pmsg = XtStackAlloc(len, msg); ++ if (pmsg != NULL) { ++ (void) sprintf( pmsg, "%s%s%s", msg1, ++ GetString( search->search_text ), msg2); ++ } else { ++ pmsg = msg; ++ (void) sprintf(pmsg, "*** Error: Could not find string ***"); ++ } ++ SetSearchLabels(search, pmsg, "", TRUE); ++ XtStackFree(pmsg, msg); + return(FALSE); + } + else +@@ -1011,9 +1040,22 @@ Boolean once_only, show_current; + + if (XawTextReplace(tw, pos, end_pos, &replace) != XawEditDone) { + char msg[BUFSIZ]; +- +- (void) sprintf( msg, "'%s' with '%s'. ***", find.ptr, replace.ptr); ++ char *pmsg; ++ int len; ++ char *msg1 = "' with '"; ++ char *msg2 = "'. ***"; ++ ++ len = 1 + strlen(msg1) + strlen(msg2) + strlen(find.ptr) + ++ strlen(replace.ptr) + 1; ++ pmsg = XtStackAlloc(len, msg); ++ if (pmsg != NULL) { ++ (void) sprintf( pmsg, "`%s%s%s%s", find.ptr, msg1, replace.ptr, msg2); ++ } else { ++ pmsg = msg; ++ (void) sprintf(pmsg, "string ***"); ++ } + SetSearchLabels(search, "*** Error while replacing", msg, TRUE); ++ XtStackFree(pmsg, msg); + return(FALSE); + } + +@@ -1164,13 +1206,20 @@ XtArgVal value; + { + Widget temp_widget; + char buf[BUFSIZ]; ++ char *pbuf; ++ int len; + +- (void) sprintf(buf, "%s.%s", FORM_NAME, name); ++ len = strlen(FORM_NAME) + strlen(name) + 2; ++ pbuf = XtStackAlloc(len, buf); ++ if (pbuf == NULL) return FALSE; ++ (void) sprintf(pbuf, "%s.%s", FORM_NAME, name); + +- if ( (temp_widget = XtNameToWidget(shell, buf)) != NULL) { ++ if ( (temp_widget = XtNameToWidget(shell, pbuf)) != NULL) { + SetResource(temp_widget, res_name, value); ++ XtStackFree(pbuf, buf); + return(TRUE); + } ++ XtStackFree(pbuf, buf); + return(FALSE); + } + +diff -up /dev/null Xaw3d-1.5libXaw3d-1.6.1/include/X11/Xaw3d/XawAlloc.h +--- /dev/null 2008-10-06 08:37:32.418005377 +0200 ++++ Xaw3d-1.5libXaw3d-1.6.1/include/X11/Xaw3d/XawAlloc.h 2008-10-06 11:42:13.000000000 +0200 +@@ -0,0 +1,10 @@ ++/* $XFree86: xc/lib/Xaw/XawAlloc.h,v 1.1.2.1 1998/05/16 09:05:23 dawes Exp $ */ ++ ++#define XtStackAlloc(size, stack_cache_array) \ ++ ((size) <= sizeof(stack_cache_array) \ ++ ? (XtPointer)(stack_cache_array) \ ++ : XtMalloc((unsigned)(size))) ++ ++#define XtStackFree(pointer, stack_cache_array) \ ++ if ((pointer) != ((XtPointer)(stack_cache_array))) XtFree(pointer); else ++ +--- xaw3d-1.5libXaw3d-1.6.1/src/SmeBSB.c 2003-08-04 17:27:58.000000000 +0200 ++++ xaw3d-1.5libXaw3d-1.6.1/src/SmeBSB.c 2003-08-07 15:02:39.000000000 +0200 +@@ -52,6 +52,8 @@ + #include + #include + ++#include "XawAlloc.h" ++ + /* needed for abs() */ + #ifndef X_NOT_STDC_ENV + #include +@@ -712,6 +714,8 @@ + int x, y; + unsigned int width, height, bw; + char buf[BUFSIZ]; ++ char *pbuf; ++ int len; + + if (is_left) { + width = height = 0; +@@ -720,18 +724,24 @@ + if (!XGetGeometry(XtDisplayOfObject(w), + entry->sme_bsb.left_bitmap, &root, &x, &y, + &width, &height, &bw, &entry->sme_bsb.left_depth)) { +- (void) sprintf(buf, "Xaw SmeBSB Object: %s %s \"%s\".", +- "Could not get Left Bitmap", +- "geometry information for menu entry", +- XtName(w)); +- XtAppError(XtWidgetToApplicationContext(w), buf); ++ char *err1 = "Xaw SmeBSB Object: Could not get Left Bitmap geometry information for menu entry "; ++ len = strlen(err1) + strlen(XtName(w)) + 3 + 1; ++ pbuf = XtStackAlloc(len, buf); ++ if (pbuf == NULL) return; ++ sprintf(pbuf, "%s\"%s\".", err1, XtName(w)); ++ XtAppError(XtWidgetToApplicationContext(w), pbuf); ++ XtStackFree(pbuf, buf); + } + #ifdef NEVER + if (entry->sme_bsb.left_depth != 1) { +- (void) sprintf(buf, "Xaw SmeBSB Object: %s \"%s\" %s.", +- "Left Bitmap of entry", XtName(w), +- "is not one bit deep"); +- XtAppError(XtWidgetToApplicationContext(w), buf); ++ char *err1 = "Xaw SmeBSB Object: Left Bitmap of entry "; ++ char *err2 = " is not one bit deep."; ++ len = strlen(err1) + strlen(err2) + strlen(XtName(w)) + 2 + 1; ++ pbuf = XtStackAlloc(len, buf); ++ if (pbuf == NULL) return; ++ sprintf(pbuf, "%s\"%s\"%s", err1, XtName(w), err2); ++ XtAppError(XtWidgetToApplicationContext(w), pbuf); ++ XtStackFree(pbuf, buf); + } + #endif + } +@@ -745,18 +755,24 @@ + if (!XGetGeometry(XtDisplayOfObject(w), + entry->sme_bsb.right_bitmap, &root, &x, &y, + &width, &height, &bw, &entry->sme_bsb.right_depth)) { +- (void) sprintf(buf, "Xaw SmeBSB Object: %s %s \"%s\".", +- "Could not get Right Bitmap", +- "geometry information for menu entry", +- XtName(w)); +- XtAppError(XtWidgetToApplicationContext(w), buf); ++ char *err1 = "Xaw SmeBSB Object: Could not get Right Bitmap geometry information for menu entry "; ++ len = strlen(err1) + strlen(XtName(w)) + 3 + 1; ++ pbuf = XtStackAlloc(len, buf); ++ if (pbuf == NULL) return; ++ sprintf(pbuf, "%s\"%s\".", err1, XtName(w)); ++ XtAppError(XtWidgetToApplicationContext(w), pbuf); ++ XtStackFree(pbuf, buf); + } + #ifdef NEVER + if (entry->sme_bsb.right_depth != 1) { +- (void) sprintf(buf, "Xaw SmeBSB Object: %s \"%s\" %s.", +- "Right Bitmap of entry", XtName(w), +- "is not one bit deep"); +- XtAppError(XtWidgetToApplicationContext(w), buf); ++ char *err1 = "Xaw SmeBSB Object: Right Bitmap of entry "; ++ char *err2 = " is not one bit deep."; ++ len = strlen(err1) + strlen(err2) + strlen(XtName(w)) + 2 + 1; ++ pbuf = XtStackAlloc(len, buf); ++ if (pbuf == NULL) return; ++ sprintf(pbuf, "%s\"%s\"%s", err1, XtName(w), err2); ++ XtAppError(XtWidgetToApplicationContext(w), pbuf); ++ XtStackFree(pbuf, buf); + } + #endif + } diff --git a/SOURCES/Xaw3d-1.6.1-3Dlabel.patch b/SOURCES/Xaw3d-1.6.1-3Dlabel.patch new file mode 100644 index 0000000..0feb7aa --- /dev/null +++ b/SOURCES/Xaw3d-1.6.1-3Dlabel.patch @@ -0,0 +1,162 @@ +diff -up libXaw3d-1.6.1/src/Label.c.3Dlabel libXaw3d-1.6.1/src/Label.c +--- libXaw3d-1.6.1/src/Label.c.3Dlabel 2011-09-19 15:42:36.000000000 -0600 ++++ libXaw3d-1.6.1/src/Label.c 2012-02-25 14:44:33.766774776 -0700 +@@ -416,9 +416,16 @@ GetgrayGC(LabelWidget lw) + static void + compute_bitmap_offsets (LabelWidget lw) + { +- if (lw->label.lbm_height != 0) +- lw->label.lbm_y = (lw->core.height - lw->label.lbm_height) / 2; +- else ++ /* ++ * bitmap will be eventually be displayed at ++ * (internal_width, internal_height + lbm_y) ++ */ ++ if (lw->label.lbm_height != 0) { ++ lw->label.lbm_y = (lw->core.height - ++ (lw->threeD.shadow_width * 2 + ++ lw->label.internal_height * 2 + ++ lw->label.lbm_height)) / 2; ++ } else + lw->label.lbm_y = 0; + } + +@@ -444,9 +451,11 @@ Initialize(Widget request, Widget new, A + { + LabelWidget lw = (LabelWidget) new; + ++#if 0 + /* disable shadows if we're not a subclass of Command */ + if (!XtIsSubclass(new, commandWidgetClass)) + lw->threeD.shadow_width = 0; ++#endif + + if (lw->label.label == NULL) + lw->label.label = XtNewString(lw->core.name); +@@ -460,18 +469,20 @@ Initialize(Widget request, Widget new, A + + if (lw->core.height == 0) + lw->core.height = lw->label.label_height + +- 2 * lw->label.internal_height; ++ 2 * lw->label.internal_height + ++ 2 * lw->threeD.shadow_width; + + set_bitmap_info(lw); /* req's core.height, sets label.lbm_* */ + + if (lw->label.lbm_height > lw->label.label_height) + lw->core.height = lw->label.lbm_height + +- 2 * lw->label.internal_height; ++ 2 * lw->label.internal_height; + + if (lw->core.width == 0) + lw->core.width = lw->label.label_width + +- 2 * lw->label.internal_width + +- LEFT_OFFSET(lw); /* req's label.lbm_width */ ++ 2 * lw->label.internal_width + ++ 2 * lw->threeD.shadow_width + ++ LEFT_OFFSET(lw); /* req's label.lbm_width */ + + lw->label.label_x = lw->label.label_y = 0; + (*XtClass(new)->core_class.resize) ((Widget)lw); +@@ -549,14 +560,16 @@ Redisplay(Widget gw, XEvent *event, Regi + if (w->label.depth == 1) + XCopyPlane(XtDisplay(gw), pm, XtWindow(gw), gc, 0, 0, + w->label.lbm_width, w->label.lbm_height, +- (int) w->label.internal_width, +- (int) w->label.lbm_y, ++ (int) w->label.internal_width + w->threeD.shadow_width, ++ (int) w->label.internal_height + w->threeD.shadow_width ++ + w->label.lbm_y, + (unsigned long) 1L); + else + XCopyArea(XtDisplay(gw), pm, XtWindow(gw), gc, 0, 0, + w->label.lbm_width, w->label.lbm_height, +- (int) w->label.internal_width, +- (int) w->label.lbm_y); ++ (int) w->label.internal_width + w->threeD.shadow_width, ++ (int) w->label.internal_height + w->threeD.shadow_width ++ + w->label.lbm_y); + } + + #ifdef XAW_INTERNATIONALIZATION +@@ -646,14 +659,17 @@ _Reposition(LabelWidget lw, Dimension wi + Position *dx, Position *dy) + { + Position newPos; +- Position leftedge = lw->label.internal_width + LEFT_OFFSET(lw); ++ Position leftedge = lw->label.internal_width + LEFT_OFFSET(lw) + ++ lw->threeD.shadow_width; ++ + + switch (lw->label.justify) { + case XtJustifyLeft: + newPos = leftedge; + break; + case XtJustifyRight: +- newPos = width - lw->label.label_width - lw->label.internal_width; ++ newPos = width - (lw->label.label_width + lw->label.internal_width + ++ lw->threeD.shadow_width); + break; + case XtJustifyCenter: + default: +@@ -745,17 +761,20 @@ SetValues(Widget current, Widget request + if (newlw->label.resize && was_resized) { + if (curlw->core.height == reqlw->core.height && !checks[HEIGHT]) + newlw->core.height = newlw->label.label_height + +- 2 * newlw->label.internal_height; ++ 2 * newlw->label.internal_height + ++ 2 * newlw->threeD.shadow_width; + + set_bitmap_info (newlw); /* req's core.height, sets label.lbm_* */ + + if (newlw->label.lbm_height > newlw->label.label_height) + newlw->core.height = newlw->label.lbm_height + +- 2 * newlw->label.internal_height; ++ 2 * newlw->label.internal_height + ++ 2 * newlw->threeD.shadow_width; + + if (curlw->core.width == reqlw->core.width && !checks[WIDTH]) + newlw->core.width = newlw->label.label_width + + 2 * newlw->label.internal_width + ++ 2 * newlw->threeD.shadow_width + + LEFT_OFFSET(newlw); /* req's label.lbm_width */ + } + +@@ -764,15 +783,20 @@ SetValues(Widget current, Widget request + if (checks[HEIGHT]) { + if (newlw->label.label_height > newlw->label.lbm_height) + i = newlw->label.label_height + +- 2 * newlw->label.internal_height; ++ 2 * newlw->label.internal_height + ++ 2 * newlw->threeD.shadow_width; + else +- i = newlw->label.lbm_height + 2 * newlw->label.internal_height; ++ i = newlw->label.lbm_height + ++ 2 * newlw->label.internal_height + ++ 2 * newlw->threeD.shadow_width; + if (i > newlw->core.height) + newlw->core.height = i; + } + if (checks[WIDTH]) { +- i = newlw->label.label_width + 2 * newlw->label.internal_width + +- LEFT_OFFSET(newlw); /* req's label.lbm_width */ ++ i = newlw->label.label_width + ++ 2 * newlw->label.internal_width + ++ 2 * newlw->threeD.shadow_width + ++ LEFT_OFFSET(newlw); /* req's label.lbm_width */ + if (i > newlw->core.width) + newlw->core.width = i; + } +@@ -843,9 +867,11 @@ QueryGeometry(Widget w, XtWidgetGeometry + preferred->request_mode = CWWidth | CWHeight; + preferred->width = (lw->label.label_width + + 2 * lw->label.internal_width + ++ 2 * lw->threeD.shadow_width + + LEFT_OFFSET(lw)); + preferred->height = lw->label.label_height + +- 2 * lw->label.internal_height; ++ 2 * lw->label.internal_height + ++ 2 * lw->threeD.shadow_width; + if ( ((intended->request_mode & (CWWidth | CWHeight)) + == (CWWidth | CWHeight)) && + intended->width == preferred->width && diff --git a/SOURCES/Xaw3d-1.6.1-hsbar.patch b/SOURCES/Xaw3d-1.6.1-hsbar.patch new file mode 100644 index 0000000..1f3987e --- /dev/null +++ b/SOURCES/Xaw3d-1.6.1-hsbar.patch @@ -0,0 +1,260 @@ +diff -up libXaw3d-1.6.1/src/Text.c.hsbar libXaw3d-1.6.1/src/Text.c +--- libXaw3d-1.6.1/src/Text.c.hsbar 2011-10-06 13:17:19.000000000 -0600 ++++ libXaw3d-1.6.1/src/Text.c 2012-02-25 14:54:41.996656624 -0700 +@@ -495,8 +495,10 @@ CreateHScrollBar(TextWidget ctx) + (XtPointer) NULL); + + /**/ +- ctx->text.r_margin.bottom += hbar->core.height + hbar->core.border_width; +- ctx->text.margin.bottom = ctx->text.r_margin.bottom; ++ if (ctx->text.scroll_vert == XawtextScrollAlways) { ++ ctx->text.r_margin.bottom += hbar->core.height + hbar->core.border_width; ++ ctx->text.margin.bottom = ctx->text.r_margin.bottom; ++ } + /**/ + PositionHScrollBar(ctx); + if (XtIsRealized((Widget)ctx)) { +@@ -519,8 +521,10 @@ DestroyHScrollBar(TextWidget ctx) + if (hbar == NULL) return; + + /**/ +- ctx->text.r_margin.bottom -= hbar->core.height + hbar->core.border_width; +- ctx->text.margin.bottom = ctx->text.r_margin.bottom; ++ if (ctx->text.scroll_vert == XawtextScrollAlways) { ++ ctx->text.r_margin.bottom -= hbar->core.height + hbar->core.border_width; ++ ctx->text.margin.bottom = ctx->text.r_margin.bottom; ++ } + /**/ + if (ctx->text.vbar == NULL) + XtRemoveCallback((Widget) ctx, XtNunrealizeCallback, UnrealizeScrollbars, +diff -up libXaw3d-1.6.1/src/Viewport.c.hsbar libXaw3d-1.6.1/src/Viewport.c +--- libXaw3d-1.6.1/src/Viewport.c.hsbar 2012-01-24 14:56:03.000000000 -0700 ++++ libXaw3d-1.6.1/src/Viewport.c 2012-02-25 14:58:18.474098582 -0700 +@@ -244,7 +244,7 @@ Initialize(Widget request, Widget new, A + XtVaGetValues((Widget)(w->viewport.threeD), XtNshadowWidth, &sw, NULL); + if (sw) + { +- pad = 2; ++ pad = 2 * sw; + + arg_cnt = 0; + XtSetArg(threeD_args[arg_cnt], XtNborderWidth, 0); arg_cnt++; +@@ -262,8 +262,8 @@ Initialize(Widget request, Widget new, A + XtSetArg(clip_args[arg_cnt], XtNright, XtChainRight); arg_cnt++; + XtSetArg(clip_args[arg_cnt], XtNtop, XtChainTop); arg_cnt++; + XtSetArg(clip_args[arg_cnt], XtNbottom, XtChainBottom); arg_cnt++; +- XtSetArg(clip_args[arg_cnt], XtNwidth, w->core.width - 2 * sw); arg_cnt++; +- XtSetArg(clip_args[arg_cnt], XtNheight, w->core.height - 2 * sw); arg_cnt++; ++ XtSetArg(clip_args[arg_cnt], XtNwidth, w->core.width - pad); arg_cnt++; ++ XtSetArg(clip_args[arg_cnt], XtNheight, w->core.height - pad); arg_cnt++; + + w->viewport.clip = XtCreateManagedWidget("clip", widgetClass, new, + clip_args, arg_cnt); +@@ -283,8 +283,8 @@ Initialize(Widget request, Widget new, A + * Set the clip widget to the correct height. + */ + +- clip_width = w->core.width - 2 * sw; +- clip_height = w->core.height - 2 * sw; ++ clip_width = w->core.width - pad; ++ clip_height = w->core.height - pad; + + if ( (h_bar != NULL) && + ((int)w->core.width > +@@ -509,23 +509,13 @@ ComputeLayout(Widget widget, Boolean que + XtWidgetGeometry intended; + Dimension pad = 0, sw = 0; + +- /* +- * I've made two optimizations here. The first does away with the +- * loop, and the second defers setting the child dimensions to the +- * clip if smaller until after adjusting for possible scrollbars. +- * If you find that these go too far, define the identifiers here +- * as required. -- djhjr +- */ +-#define NEED_LAYOUT_LOOP +-#undef PREP_CHILD_TO_CLIP +- + if (child == (Widget) NULL) return; + + XtVaGetValues(threeD, XtNshadowWidth, &sw, NULL); +- if (sw) pad = 2; ++ if (sw) pad = 2 * sw; + +- clip_width = w->core.width - 2 * sw; +- clip_height = w->core.height - 2 * sw; ++ clip_width = w->core.width - pad; ++ clip_height = w->core.height - pad; + intended.request_mode = CWBorderWidth; + intended.border_width = 0; + +@@ -536,10 +526,8 @@ ComputeLayout(Widget widget, Boolean que + &clip_width, &clip_height); + } + else { +-#ifdef NEED_LAYOUT_LOOP + Dimension prev_width, prev_height; + XtGeometryMask prev_mode; +-#endif + XtWidgetGeometry preferred; + + needshoriz = needsvert = False; +@@ -553,31 +541,25 @@ ComputeLayout(Widget widget, Boolean que + if (!w->viewport.allowhoriz) + intended.request_mode |= CWWidth; + +-#ifdef PREP_CHILD_TO_CLIP +- if ((int)child->core.width < clip_width) +- intended.width = clip_width; ++ if ((int)child->core.width < clip_width + pad) ++ intended.width = clip_width + pad; + else +-#endif + intended.width = child->core.width; + +- if (!w->viewport.allowvert) +- intended.request_mode |= CWHeight; +- +-#ifdef PREP_CHILD_TO_CLIP +- if ((int)child->core.height < clip_height) +- intended.height = clip_height; ++ if ((int)child->core.height < clip_height + pad) ++ intended.height = clip_height + pad; + else +-#endif + intended.height = child->core.height; + ++ if (!w->viewport.allowvert) ++ intended.request_mode |= CWHeight; ++ + if (!query) { + preferred.width = child->core.width; + preferred.height = child->core.height; + } + +-#ifdef NEED_LAYOUT_LOOP + do { /* while intended != prev */ +-#endif + if (query) { + (void) XtQueryGeometry( child, &intended, &preferred ); + if ( !(preferred.request_mode & CWWidth) ) +@@ -585,12 +567,9 @@ ComputeLayout(Widget widget, Boolean que + if ( !(preferred.request_mode & CWHeight) ) + preferred.height = intended.height; + } +- +-#ifdef NEED_LAYOUT_LOOP + prev_width = intended.width; + prev_height = intended.height; + prev_mode = intended.request_mode; +-#endif + + /* + * Note that having once decided to turn on either bar +@@ -600,7 +579,7 @@ ComputeLayout(Widget widget, Boolean que + + #define CheckHoriz() \ + if (w->viewport.allowhoriz && \ +- (int)preferred.width > clip_width + 2 * sw) { \ +++ (int)preferred.width > clip_width + pad) { \ + if (!needshoriz) { \ + Widget horiz_bar = w->viewport.horiz_bar; \ + needshoriz = True; \ +@@ -615,7 +594,7 @@ ComputeLayout(Widget widget, Boolean que + /* enddef */ + CheckHoriz(); + if (w->viewport.allowvert && +- (int)preferred.height > clip_height + 2 * sw) { ++ (int)preferred.height > clip_height + pad) { + if (!needsvert) { + Widget vert_bar = w->viewport.vert_bar; + needsvert = True; +@@ -629,38 +608,22 @@ ComputeLayout(Widget widget, Boolean que + intended.height = preferred.height; + } + +-#ifdef PREP_CHILD_TO_CLIP + if (!w->viewport.allowhoriz || +- (int)preferred.width < clip_width) { +- intended.width = clip_width; ++ (int)preferred.width < clip_width + pad) { ++ intended.width = clip_width + pad; + intended.request_mode |= CWWidth; + } + if (!w->viewport.allowvert || +- (int)preferred.height < clip_height) { +- intended.height = clip_height; ++ (int)preferred.height < clip_height + pad) { ++ intended.height = clip_height + pad; + intended.request_mode |= CWHeight; + } +-#endif +-#ifdef NEED_LAYOUT_LOOP ++ + } while ( intended.request_mode != prev_mode || + (intended.request_mode & CWWidth && + intended.width != prev_width) || + (intended.request_mode & CWHeight && + intended.height != prev_height) ); +-#endif +- +-#ifndef PREP_CHILD_TO_CLIP +- if (!w->viewport.allowhoriz || +- (int)preferred.width < clip_width) { +- intended.width = clip_width; +- intended.request_mode |= CWWidth; +- } +- if (!w->viewport.allowvert || +- (int)preferred.height < clip_height) { +- intended.height = clip_height; +- intended.request_mode |= CWHeight; +- } +-#endif + } + + bar_width = bar_height = 0; +@@ -705,7 +668,7 @@ ComputeLayout(Widget widget, Boolean que + else { + int bw = bar->core.border_width; + XtResizeWidget( bar, +- (Dimension)(clip_width + 2 * sw), bar->core.height, ++ (Dimension)(clip_width + pad), bar->core.height, + (Dimension)bw ); + XtMoveWidget( bar, + (Position)((needsvert && !w->viewport.useright) +@@ -730,7 +693,7 @@ ComputeLayout(Widget widget, Boolean que + else { + int bw = bar->core.border_width; + XtResizeWidget( bar, +- bar->core.width, (Dimension)(clip_height + 2 * sw), ++ bar->core.width, (Dimension)(clip_height + pad), + (Dimension)bw ); + XtMoveWidget( bar, + (Position)(w->viewport.useright +@@ -780,7 +743,7 @@ ComputeWithForceBars(Widget widget, Bool + */ + + XtVaGetValues((Widget)(w->viewport.threeD), XtNshadowWidth, &sw, NULL); +- if (sw) pad = 2; ++ if (sw) pad = 2 * sw; + + if (w->viewport.allowvert) { + if (w->viewport.vert_bar == NULL) +@@ -926,7 +889,7 @@ GeometryRequestPlusScrollbar(ViewportWid + Dimension pad = 0, sw = 0; + + XtVaGetValues((Widget)(w->viewport.threeD), XtNshadowWidth, &sw, NULL); +- if (sw) pad = 2; ++ if (sw) pad = 2 * sw; + + plusScrollbars = *request; + if ((bar = w->viewport.horiz_bar) == (Widget)NULL) +@@ -997,7 +960,7 @@ GeometryManager(Widget child, XtWidgetGe + return XtGeometryNo; + + XtVaGetValues((Widget)(w->viewport.threeD), XtNshadowWidth, &sw, NULL); +- if (sw) pad = 2; ++ if (sw) pad = 2 * sw; + + allowed = *request; + diff --git a/SOURCES/Xaw3d-1.6.5-fontset.patch b/SOURCES/Xaw3d-1.6.5-fontset.patch new file mode 100644 index 0000000..a7a8965 --- /dev/null +++ b/SOURCES/Xaw3d-1.6.5-fontset.patch @@ -0,0 +1,44 @@ +--- libXaw3d-1.6.5/src/Command.c~ 2023-05-12 19:08:46.000000000 -0500 ++++ libXaw3d-1.6.5/src/Command.c 2024-02-01 15:39:48.779640222 -0600 +@@ -220,6 +220,8 @@ + CommandWidget cbw = (CommandWidget) new; + int shape_event_base, shape_error_base; + ++ if (!cbw->label.font) XtError("Aborting: no font found\n"); ++ + if (cbw->command.shape_style != XawShapeRectangle + && !XShapeQueryExtension(XtDisplay(new), &shape_event_base, + &shape_error_base)) +--- libXaw3d-1.6.5/src/List.c~ 2023-05-12 19:08:46.000000000 -0500 ++++ libXaw3d-1.6.5/src/List.c 2024-02-01 15:40:50.716135054 -0600 +@@ -362,6 +362,8 @@ + { + ListWidget lw = (ListWidget) new; + ++ if (!lw->list.font) XtError("Aborting: no font found\n"); ++ + /* + * Initialize all private resources. + */ +--- libXaw3d-1.6.5/src/SmeBSB.c~ 2023-05-12 19:08:46.000000000 -0500 ++++ libXaw3d-1.6.5/src/SmeBSB.c 2024-02-01 15:41:39.772150867 -0600 +@@ -203,6 +203,8 @@ + else + entry->sme_bsb.label = XtNewString( entry->sme_bsb.label ); + ++ if (!entry->sme_bsb.font) XtError("Aborting: no font found\n"); ++ + CreateGCs(new); + + GetBitmapInfo(new, TRUE); /* Left Bitmap Info */ +--- libXaw3d-1.6.5/src/Tip.c~ 2023-05-12 19:08:46.000000000 -0500 ++++ libXaw3d-1.6.5/src/Tip.c 2024-02-01 15:42:15.952687460 -0600 +@@ -248,6 +248,8 @@ + TipWidget tip = (TipWidget)w; + XGCValues values; + ++ if (!tip->tip.font) XtError("Aborting: no font found\n"); ++ + tip->tip.timer = 0; + + values.foreground = tip->tip.foreground; diff --git a/SOURCES/Xaw3d-c99-2.patch b/SOURCES/Xaw3d-c99-2.patch new file mode 100644 index 0000000..176297b --- /dev/null +++ b/SOURCES/Xaw3d-c99-2.patch @@ -0,0 +1,35 @@ +commit 7b4af57e8a1471747e17fff184032d8250e598b6 +Author: Alan Coopersmith +Date: Thu Dec 7 18:01:47 2023 -0800 + + Multisink.c: Clear -Werror=incompatible-pointer-types error + + MultiSink.c: In function ‘SetValues’: + MultiSink.c:582:18: error: passing argument 1 of ‘SetTabs’ from + incompatible pointer type [-Werror=incompatible-pointer-types] + 582 | SetTabs( w, w->text_sink.tab_count, w->text_sink.char_tabs ); + | ^ + | | + | MultiSinkObject {aka struct _MultiSinkRec *} + MultiSink.c:99:21: note: expected ‘Widget’ {aka ‘struct _WidgetRec *’} + but argument is of type ‘MultiSinkObject’ {aka ‘struct _MultiSinkRec *’} + 99 | static void SetTabs(Widget, int, short *); + | ^~~~~~ + + Adopts change originally made to libXaw in XFree86 4 + + Signed-off-by: Alan Coopersmith + +diff --git a/src/MultiSink.c b/src/MultiSink.c +index acf6caaca871a77e..cbae854004802708 100644 +--- a/src/MultiSink.c ++++ b/src/MultiSink.c +@@ -579,7 +579,7 @@ SetValues(Widget current, Widget request, Widget new, ArgList args, Cardinal *nu + if ( w->multi_sink.fontset != old_w->multi_sink.fontset ) { + ((TextWidget)XtParent(new))->text.redisplay_needed = True; + #ifndef NO_TAB_FIX +- SetTabs( w, w->text_sink.tab_count, w->text_sink.char_tabs ); ++ SetTabs((Widget)w, w->text_sink.tab_count, w->text_sink.char_tabs); + #endif + } + diff --git a/SPECS/Xaw3d.spec b/SPECS/Xaw3d.spec new file mode 100644 index 0000000..879108a --- /dev/null +++ b/SPECS/Xaw3d.spec @@ -0,0 +1,432 @@ +Summary: A version of the MIT Athena widget set for X +Name: Xaw3d +Version: 1.6.5 +Release: 3%{?dist} +Source0: https://xorg.freedesktop.org/archive/individual/lib/libXaw3d-%{version}.tar.xz +Source1: https://xorg.freedesktop.org/archive/individual/lib/libXaw3d-%{version}.tar.xz.sig +Source2: matt.turner.asc +Patch5: Xaw3d-1.5-debian-fixes.patch +Patch7: Xaw3d-1.6.1-3Dlabel.patch +Patch10: Xaw3d-1.6.5-fontset.patch +Patch11: Xaw3d-1.6.1-hsbar.patch +Patch12: Xaw3d-c99-2.patch + +License: MIT AND X11 AND GPL-3.0-or-later +URL: http://xorg.freedesktop.org/ + +BuildRequires: gcc +BuildRequires: make +BuildRequires: libXmu-devel +BuildRequires: libXt-devel +BuildRequires: libSM-devel +BuildRequires: libXext-devel +BuildRequires: libX11-devel +BuildRequires: libXpm-devel +BuildRequires: xorg-x11-util-macros +BuildRequires: bison +BuildRequires: flex +BuildRequires: ed +BuildRequires: gnupg2 + +%description +Xaw3d is an enhanced version of the MIT Athena Widget set for +the X Window System. Xaw3d adds a three-dimensional look to applications +with minimal or no source code changes. + +You should install Xaw3d if you are using applications which incorporate +the MIT Athena widget set and you'd like to incorporate a 3D look into +those applications. + +%package devel +Summary: Header files and libraries for development using Xaw3d +Requires: %{name} = %{version}-%{release} +Requires: libXmu-devel +Requires: libXt-devel +Requires: libSM-devel +Requires: libXext-devel +Requires: libX11-devel +Requires: libXpm-devel + +%description devel +Xaw3d is an enhanced version of the MIT Athena widget set for +the X Window System. Xaw3d adds a three-dimensional look to those +applications with minimal or no source code changes. Xaw3d-devel includes +the header files and libraries for developing programs that take full +advantage of Xaw3d's features. + +You should install Xaw3d-devel if you are going to develop applications +using the Xaw3d widget set. You'll also need to install the Xaw3d +package. + + +%prep +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%setup -q -n libXaw3d-%{version} +# This doesn't apply cleanly, but has not been applied +#%patch5 -p1 -b .debian +%patch -P 7 -p1 -b .3Dlabel +%patch -P 10 -p1 -b .fontset +%patch -P 11 -p1 -b .hsbar +%patch -P 12 -p1 + + +%build +%configure --disable-static \ + --enable-arrow-scrollbars \ + --enable-gray-stipples \ + --enable-multiplane-bitmaps +%make_build + + +%install +%make_install +rm $RPM_BUILD_ROOT%{_libdir}/libXaw3d.la +rm -r $RPM_BUILD_ROOT%{_docdir} + + + +%ldconfig_scriptlets + + +%files +%license COPYING +%doc ChangeLog README.md src/README.XAW3D +%{_libdir}/*.so.* + +%files devel +%{_libdir}/*.so +%{_libdir}/pkgconfig/xaw3d.pc +%{_includedir}/X11/Xaw3d + +%changelog +* Mon Jun 24 2024 Troy Dawson - 1.6.5-3 +- Bump release for June 2024 mass rebuild + +* Fri Feb 02 2024 Gwyn Ciesla - 1.6.5-2 +- SPDX license tags. + +* Thu Feb 01 2024 Gwyn Ciesla - 1.6.5-1 +- 1.6.5 + +* Mon Jan 29 2024 Fedora Release Engineering - 1.6.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jan 24 2024 Fedora Release Engineering - 1.6.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 1.6.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Tue Jan 09 2024 Florian Weimer - 1.6.4-4 +- Backport upstream patches to fix C type errors + +* Wed Jul 19 2023 Fedora Release Engineering - 1.6.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jan 18 2023 Fedora Release Engineering - 1.6.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Oct 01 2022 Orion Poplawski - 1.6.4-1 +- Update to 1.6.4 + +* Wed Jul 20 2022 Fedora Release Engineering - 1.6.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jan 19 2022 Fedora Release Engineering - 1.6.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 1.6.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Mon Jan 25 2021 Fedora Release Engineering - 1.6.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Sat Aug 01 2020 Fedora Release Engineering - 1.6.3-4 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 27 2020 Fedora Release Engineering - 1.6.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jan 28 2020 Fedora Release Engineering - 1.6.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sun Aug 18 2019 Hans de Goede - 1.6.3-1 +- Add source tarbal PGP signature verification + +* Sun Aug 11 2019 Orion Poplawski +- Update to 1.6.3 + +* Wed Jul 24 2019 Fedora Release Engineering - 1.6.2-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Thu Jan 31 2019 Fedora Release Engineering - 1.6.2-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Jul 12 2018 Fedora Release Engineering - 1.6.2-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Feb 07 2018 Fedora Release Engineering - 1.6.2-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Aug 02 2017 Fedora Release Engineering - 1.6.2-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.6.2-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 1.6.2-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Feb 03 2016 Fedora Release Engineering - 1.6.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Tue Jun 16 2015 Fedora Release Engineering - 1.6.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Aug 15 2014 Fedora Release Engineering - 1.6.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Fri Jun 06 2014 Fedora Release Engineering - 1.6.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 1.6.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Feb 13 2013 Fedora Release Engineering - 1.6.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 1.6.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed May 2 2012 Orion Poplawski - 1.6.2-2 +- Drop static from -devel summary/description (bug #817935) + +* Tue Apr 3 2012 Orion Poplawski - 1.6.2-1 +- Update to 1.6.2 +- Drop patches applied upstream +- Enable multiplane-bitmaps and gray-stipples + +* Sat Feb 25 2012 Orion Poplawski - 1.6.1-2 +- Rebase compat patch + +* Sat Feb 25 2012 Orion Poplawski - 1.6.1-1 +- Update to 1.6.1 + +* Thu Jan 12 2012 Fedora Release Engineering - 1.5E-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Feb 07 2011 Fedora Release Engineering - 1.5E-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Dec 1 2010 Hans de Goede - 1.5E-19 +- Do not make missing font sets a fatal error (#658526) + +* Tue Nov 9 2010 Hans de Goede - 1.5E-18 +- Drop Xaw3d-1.5E-lex.patch it was not applied for a reason (#587349) + +* Mon Nov 8 2010 Hans de Goede - 1.5E-17 +- Also apply the Xaw3d-1.5E-secure, Xaw3d-1.5E-thumb and Xaw3d-1.5E-cast + (replacing xaw3d.patch) patches from http://gitorious.org/xaw3d (#587349) +- Apply accidentally not applied Xaw3d-1.5E-lex.patch + +* Mon Nov 8 2010 Orion Poplawski - 1.5E-16 +- Add patches from http://gitorious.org/xaw3d + +* Fri Jul 24 2009 Fedora Release Engineering - 1.5E-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Sun Mar 15 2009 Hans de Goede 1.5E-14 +- Fix a bunch of (potentially harmfull) compiler warnings + +* Mon Feb 23 2009 Fedora Release Engineering - 1.5E-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Oct 6 2008 Hans de Goede 1.5E-12 +- Remove obsolete PreReq and Prefix stuff from specfile +- Fix BuildRoot to match the guidelines +- Require base package by full EVR from devel package +- Drop non relevant Patches and Sources +- Rebase the still relevant patches +- Actually apply the still relevant patches +- Add a patch from Debian fixing an infinite loop (rh436998) +- Add patches from Debian fixes various potential bufferoverflows + +* Tue Feb 19 2008 Fedora Release Engineering - 1.5E-11.1 +- Autorebuild for GCC 4.3 + +* Wed Jul 12 2006 Jesse Keating - 1.5E-10.1 +- rebuild + +* Wed Jun 07 2006 Than Ngo 1.5E-10 +- BR on bison ed flex #194184 + +* Wed Jun 7 2006 Jeremy Katz - 1.5E-9 +- rebuild for -devel deps + +* Tue Apr 25 2006 Adam Jackson 1.5E-8 +- Rebuild for new imake build rules + +* Tue Feb 28 2006 Than Ngo 1.5E-7 +- update Url #183314 + +* Mon Feb 13 2006 Jesse Keating - 1.5E-6.2.2 +- rebump for build order issues during double-long bump + +* Fri Feb 10 2006 Jesse Keating - 1.5E-6.2.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 1.5E-6.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Wed Nov 16 2005 Than Ngo 1.5E-6 +- fix for modular X + +* Tue Nov 05 2005 Warren Togami 1.5E-5 +- req individual X dependencies +- remove X11R6 references + +* Thu Mar 03 2005 Than Ngo 1.5E-4 +- rebuilt + +* Thu Jan 20 2005 Than Ngo 1.5E-3 +- bump release + +* Thu Jan 20 2005 Than Ngo 1.5E-2 +- enable ARROW_SCROLLBARS, MULTIPLANE_PIXMAPS + +* Tue Nov 30 2004 Than Ngo 1.5E-1 +- update to 1.5E, #130310 +- fix compiler warning #110766 + +* Tue Nov 23 2004 Than Ngo 1.5-25 +- rebuilt + +* Tue Nov 23 2004 Than Ngo 1.5-24 +- add patch to fix build problem with xorg-x11, #140475 + +* Mon Jul 26 2004 Than Ngo 1.5-23 +- added requires on XFree86-devel + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Wed Nov 26 2003 Than Ngo 1.5-20 +- added missing Buildprereq: XFree86-devel (bug #110601, #109692, #110735) +- fixed arguments in scrollbar (bug #110766) + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Thu Nov 7 2002 han Ngo 1.5-17 +- fix some building problems + +* Thu Sep 5 2002 Preston Brown 1.5-16 +- -DARROW_SCROLLBAR for rms + +* Thu Aug 8 2002 Than Ngo 1.5-15 +- Added patch file to fix i18n issue, ynakai@redhat.com + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Tue Feb 26 2002 Than Ngo 1.5-12 +- rebuild in new enviroment + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Sun Jun 24 2001 Elliot Lee +- Bump release + rebuild. + +* Wed Feb 28 2001 Than Ngo +- add requires Xaw3d = %%{version} +- add prereq /sbin/ldconfig + +* Tue Oct 10 2000 Than Ngo +- fix link which causes faulty update (Bug #17895) + +* Mon Jul 24 2000 Bill Nottingham +- ia64 tweaks + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Mon Jul 10 2000 Bernhard Rosenkraenzer +- Restore Xaw3d 1.5 - the addition of the backward compatibility library + killed the current one. +- get rid of the CDEBUGFLAGS="" hack, the current gcc fixes it + +* Mon Jul 03 2000 Than Ngo +- fix Imakefile to static Xawd3d + +* Sat Jun 17 2000 Than Ngo +- add backward compatibility libXaw3d.so.6 (Bug# 12261) + +* Mon May 15 2000 Bill Nottingham +- fix unaligned traps on ia64 + +* Mon May 8 2000 Bernhard Rosenkraenzer +- 1.5 + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 21) + +* Wed Feb 24 1999 Preston Brown +- Injected new description and group. + +* Fri Dec 18 1998 Preston Brown +- bumped spec number for initial rh 6.0 build + +* Fri Nov 06 1998 Preston Brown +- added security/update patch from debian (the X11R6.3 patch). Thanks guys. :) + +* Wed Oct 14 1998 Cristian Gafton +- handle the symlink with triggers instead of getting rid of it + +* Mon Oct 5 1998 Jeff Johnson +- remove backward compatible symlink. + +* Wed May 06 1998 Cristian Gafton +- fixed the bad symlink +- BuildRoot + +* Mon Apr 27 1998 Prospector System +- translations modified for de, fr, tr + +* Tue Nov 04 1997 Erik Troan +- don't lave an improper return code from %%pre + +* Mon Nov 03 1997 Cristian Gafton +- take care of the old location of the Xaw3d includes in case that one exist +- updated Prereq: field + +* Mon Oct 26 1997 Cristian Gafton +- minor spec file cleanups + +* Wed Oct 01 1997 Erik Troan +- i18n widec.h patch needs to be applied on all systems + +* Sun Sep 14 1997 Erik Troan +- changed axp check to alpha + +* Mon Jun 16 1997 Erik Troan +- built against glibc