static void VTInitialize (wrequest, wnew, args, num_args) Widget wrequest, wnew; ArgList args GCC_UNUSED; Cardinal *num_args GCC_UNUSED;
static void VTInitialize ( Widget wrequest, Widget wnew, ArgList args GCC_UNUSED, Cardinal *num_args GCC_UNUSED)
static void VTInitialize (wrequest, wnew, args, num_args)   Widget wrequest, wnew;   ArgList args GCC_UNUSED;   Cardinal *num_args GCC_UNUSED;{   XtermWidget request = (XtermWidget) wrequest;   XtermWidget new     = (XtermWidget) wnew;   int i;#if OPT_ISO_COLORS   Boolean color_ok;#endif   /* Zero out the entire "screen" component of "new" widget,      then do field-by-field assigment of "screen" fields      that are named in the resource list. */   bzero ((char *) &new->screen, sizeof(new->screen));   new->screen.c132 = request->screen.c132;   new->screen.curses = request->screen.curses;   new->screen.hp_ll_bc = request->screen.hp_ll_bc;#if OPT_XMC_GLITCH   new->screen.xmc_glitch = request->screen.xmc_glitch;   new->screen.xmc_attributes = request->screen.xmc_attributes;   new->screen.xmc_inline = request->screen.xmc_inline;   new->screen.move_sgr_ok = request->screen.move_sgr_ok;#endif   new->screen.foreground = request->screen.foreground;   new->screen.cursorcolor = request->screen.cursorcolor;#if OPT_BLINK_CURS   new->screen.cursor_blink = request->screen.cursor_blink;#endif   new->screen.border = request->screen.border;   new->screen.jumpscroll = request->screen.jumpscroll;#ifdef ALLOWLOGGING   new->screen.logfile = request->screen.logfile;#endif   new->screen.marginbell = request->screen.marginbell;   new->screen.mousecolor = request->screen.mousecolor;   new->screen.mousecolorback = request->screen.mousecolorback;   new->screen.multiscroll = request->screen.multiscroll;   new->screen.nmarginbell = request->screen.nmarginbell;   new->screen.savelines = request->screen.savelines;   new->screen.scrolllines = request->screen.scrolllines;   new->screen.scrollttyoutput = request->screen.scrollttyoutput;   new->screen.scrollkey = request->screen.scrollkey;   new->screen.terminal_id = request->screen.terminal_id;   if (new->screen.terminal_id < MIN_DECID)       new->screen.terminal_id = MIN_DECID;   if (new->screen.terminal_id > MAX_DECID)       new->screen.terminal_id = MAX_DECID;   new->screen.ansi_level = (new->screen.terminal_id / 100);   new->screen.visualbell = request->screen.visualbell;#if OPT_TEK4014   new->screen.TekEmu = request->screen.TekEmu;#endif   new->misc.re_verse = request->misc.re_verse;   new->screen.multiClickTime = request->screen.multiClickTime;   new->screen.bellSuppressTime = request->screen.bellSuppressTime;   new->screen.charClass = request->screen.charClass;   new->screen.cutNewline = request->screen.cutNewline;   new->screen.cutToBeginningOfLine = request->screen.cutToBeginningOfLine;   new->screen.highlight_selection = request->screen.highlight_selection;   new->screen.always_highlight = request->screen.always_highlight;   new->screen.pointer_cursor = request->screen.pointer_cursor;   new->screen.printer_command = request->screen.printer_command;   new->screen.printer_extent = request->screen.printer_extent;   new->screen.printer_formfeed = request->screen.printer_formfeed;   new->screen.printer_controlmode = request->screen.printer_controlmode;#ifdef OPT_PRINT_COLORS   new->screen.print_attributes = request->screen.print_attributes;#endif   new->screen.input_eight_bits = request->screen.input_eight_bits;   new->screen.output_eight_bits = request->screen.output_eight_bits;   new->screen.control_eight_bits = request->screen.control_eight_bits;   new->screen.backarrow_key = request->screen.backarrow_key;   new->screen.allowSendEvents = request->screen.allowSendEvents;#ifndef NO_ACTIVE_ICON   new->screen.fnt_icon = request->screen.fnt_icon;#endif /* NO_ACTIVE_ICON */   new->misc.titeInhibit = request->misc.titeInhibit;   new->misc.dynamicColors = request->misc.dynamicColors;   for (i = fontMenu_font1; i <= fontMenu_lastBuiltin; i++) {       new->screen.menu_font_names[i] = request->screen.menu_font_names[i];   }   /* set default in realize proc */   new->screen.menu_font_names[fontMenu_fontdefault] = NULL;   new->screen.menu_font_names[fontMenu_fontescape] = NULL;   new->screen.menu_font_names[fontMenu_fontsel] = NULL;   new->screen.menu_font_number = fontMenu_fontdefault;#if OPT_ISO_COLORS   new->screen.boldColors    = request->screen.boldColors;   new->screen.colorAttrMode = request->screen.colorAttrMode;   new->screen.colorBDMode   = request->screen.colorBDMode;   new->screen.colorBLMode   = request->screen.colorBLMode;   new->screen.colorMode     = request->screen.colorMode;   new->screen.colorULMode   = request->screen.colorULMode;   for (i = 0, color_ok = False; i < MAXCOLORS; i++) {       new->screen.Acolors[i] = request->screen.Acolors[i];       if (new->screen.Acolors[i] != request->screen.foreground        && new->screen.Acolors[i] != request->core.background_pixel)	   color_ok = True;   }   /* If none of the colors are anything other than the foreground or    * background, we'll assume this isn't color, no matter what the colorMode    * resource says.  (There doesn't seem to be any good way to determine if    * the resource lookup failed versus the user having misconfigured this).    */   if (!color_ok)	new->screen.colorMode = False;   new->num_ptrs = new->screen.colorMode ? 3 : 2;   new->sgr_foreground = -1;#endif /* OPT_ISO_COLORS */#if OPT_HIGHLIGHT_COLOR   new->screen.highlightcolor = request->screen.highlightcolor;#endif#if OPT_DEC_CHRSET   new->num_ptrs = 5;#endif   new->screen.underline = request->screen.underline;   new->cur_foreground = 0;   new->cur_background = 0;   new->keyboard.flags = MODE_SRM;   if (new->screen.backarrow_key)	   new->keyboard.flags |= MODE_DECBKM;    /*     * The definition of -rv now is that it changes the definition of     * XtDefaultForeground and XtDefaultBackground.  So, we no longer     * need to do anything special.     */   new->screen.display = new->core.screen->display;   new->core.height = new->core.width = 1;      /* dummy values so that we don't try to Realize the parent shell	 with height or width of 0, which is illegal in X.  The real	 size is computed in the xtermWidget's Realize proc,	 but the shell's Realize proc is called first, and must see	 a valid size. */   /* look for focus related events on the shell, because we need    * to care about the shell's border being part of our focus.    */   XtAddEventHandler(XtParent(new), EnterWindowMask, FALSE,		HandleEnterWindow, (Opaque)NULL);   XtAddEventHandler(XtParent(new), LeaveWindowMask, FALSE,		HandleLeaveWindow, (Opaque)NULL);   XtAddEventHandler(XtParent(new), FocusChangeMask, FALSE,		HandleFocusChange, (Opaque)NULL);   XtAddEventHandler((Widget)new, 0L, TRUE,		VTNonMaskableEvent, (Opaque)NULL);   XtAddEventHandler((Widget)new, PropertyChangeMask, FALSE,		     HandleBellPropertyChange, (Opaque)NULL);#if OPT_ZICONBEEP   /* Flag icon name with "***"  on window output when iconified.    * Put in a handler that will tell us when we get Map/Unmap events.    */   if ( zIconBeep )       XtAddEventHandler(XtParent(new), StructureNotifyMask, FALSE,			 HandleMapUnmap, (Opaque)NULL);#endif /* OPT_ZICONBEEP */   new->screen.bellInProgress = FALSE;   set_character_class (new->screen.charClass);   /* create it, but don't realize it */   ScrollBarOn (new, TRUE, FALSE);   /* make sure that the resize gravity acceptable */   if ( new->misc.resizeGravity != NorthWestGravity &&        new->misc.resizeGravity != SouthWestGravity) {       Cardinal nparams = 1;       XtAppWarningMsg(app_con, "rangeError", "resizeGravity", "XTermError",		       "unsupported resizeGravity resource value (%d)",		       (String *) &(new->misc.resizeGravity), &nparams);       new->misc.resizeGravity = SouthWestGravity;   }#ifndef NO_ACTIVE_ICON   new->screen.whichVwin = &new->screen.fullVwin;#if OPT_TEK4014   new->screen.whichTwin = &new->screen.fullTwin;#endif#endif /* NO_ACTIVE_ICON */   return;}