--- xaw3d-1.5+E.orig/lib/Xaw3d/Text.c
+++ xaw3d-1.5+E/lib/Xaw3d/Text.c
@@ -75,6 +75,8 @@
 #include <X11/Xfuncs.h>
 #include <ctype.h>		/* for isprint() */
 
+#include "XawAlloc.h"
+
 #ifndef MAX_LEN_CT
 #define MAX_LEN_CT 6		/* for sequence: ESC $ ( A \xx \xx */
 #endif
@@ -520,6 +522,8 @@
   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,
@@ -568,10 +572,17 @@
   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)
@@ -579,18 +590,32 @@
 
   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)
