(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); }
Initialize(request, new, args, num_args)Widget request, new;ArgList args;			/* unused */Cardinal *num_args;		/* unused */{  TextWidget ctx = (TextWidget) new;  char error_buf[BUFSIZ];  ctx->text.lt.lines = 0;  ctx->text.lt.info = NULL;  (void) bzero((char *) &(ctx->text.origSel), sizeof(XawTextSelection));  (void) bzero((char *) &(ctx->text.s), sizeof(XawTextSelection));   ctx->text.s.type = XawselectPosition;  ctx->text.salt = NULL;  ctx->text.hbar = ctx->text.vbar = (Widget) NULL;  ctx->text.lasttime = 0; /* ||| correct? */  ctx->text.time = 0; /* ||| correct? */  ctx->text.showposition = TRUE;  ctx->text.lastPos = (ctx->text.source != NULL) ? GETLASTPOS : 0;  ctx->text.file_insert = NULL;  ctx->text.search = NULL;  ctx->text.updateFrom = (XawTextPosition *) XtMalloc((unsigned) ONE);  ctx->text.updateTo = (XawTextPosition *) XtMalloc((unsigned) ONE);  ctx->text.numranges = ctx->text.maxranges = 0;  ctx->text.gc = DefaultGCOfScreen(XtScreen(ctx));   ctx->text.hasfocus = FALSE;  ctx->text.margin = ctx->text.r_margin; /* Strucure copy. */  ctx->text.update_disabled = FALSE;  ctx->text.old_insert = -1;  ctx->text.mult = 1;  ctx->text.single_char = FALSE;  ctx->text.copy_area_offsets = NULL;  ctx->text.salt2 = NULL;  if (ctx->core.height == DEFAULT_TEXT_HEIGHT) {    ctx->core.height = VMargins(ctx);    if (ctx->text.sink != NULL)      ctx->core.height += XawTextSinkMaxHeight(ctx->text.sink, 1);  }  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);      ctx->text.scroll_vert = XawtextScrollNever;    }    else if (ctx->text.scroll_vert == XawtextScrollAlways)      CreateVScrollBar(ctx);  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);      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);      ctx->text.scroll_horiz = XawtextScrollNever;    }    else if (ctx->text.scroll_horiz == XawtextScrollAlways)      CreateHScrollBar(ctx);}