diff -c hanterm304beta6p1/Imakefile hanterm304beta7/Imakefile
*** hanterm304beta6p1/Imakefile	Wed Feb  4 18:01:53 1998
--- hanterm304beta7/Imakefile	Wed Mar 25 12:37:38 1998
***************
*** 47,53 ****
        LDOPTIONS = -L/usr/openwin/lib
  #endif
  
! /* dkim@cwc.com */
  #if SVR4ix86Architecture && i386SVR4Architecture
      EXTRA_DEFINES = -Dunixware -DALLOWLOGFILEONOFF
      SYS_LIBRARIES = -lgen -lsocket
--- 47,53 ----
        LDOPTIONS = -L/usr/openwin/lib
  #endif
  
! /* dkim@surecom.com */
  #if SVR4ix86Architecture && i386SVR4Architecture
      EXTRA_DEFINES = -Dunixware -DALLOWLOGFILEONOFF
      SYS_LIBRARIES = -lgen -lsocket
***************
*** 97,103 ****
--- 97,110 ----
  #endif
  #endif
  
+ /* dkim@surecom.com */
+ #ifdef SVR4
+      TERMCAPLIB =
+      TERMINFOLIB = -lcurses
+ #else
       TERMCAPLIB = TermcapLibrary
+      TERMINFOLIB =
+ #endif
  
  AllTarget($(PROGRAMS))
  AllTarget($(HAN_PCF_FONTS))
***************
*** 117,123 ****
  #define ProgramTarget NormalProgramTarget
  #endif
  
! ProgramTarget(hanterm,$(OBJS),$(DEPLIBS),XawClientLibs,$(TERMCAPLIB) $(PTYLIB))
  
  /*
  #if InstallHantermSetUID && defined(SunArchitecture) && HasSharedLibraries
--- 124,130 ----
  #define ProgramTarget NormalProgramTarget
  #endif
  
! ProgramTarget(hanterm,$(OBJS),$(DEPLIBS),XawClientLibs,$(TERMCAPLIB) $(TERMINFOLIB) $(PTYLIB))
  
  /*
  #if InstallHantermSetUID && defined(SunArchitecture) && HasSharedLibraries
***************
*** 137,143 ****
  install:: hanterm
  	MakeDir($(DESTDIR)$(BINDIR))
  	$(RM) hanterm.inst
! 	$(CC) -o hanterm.inst $(OBJS1) $(LDOPTIONS) $(LDOVERRIDE) -lXaw -lXmu -lXt -lXext -lX11 $(LDRESUME) $(LDLIBS) $(TERMCAPLIB) $(PTYLIB) $(EXTRA_LOAD_FLAGS)
  	$(INSTALL) -c $(INSTPGMFLAGS) $(INSTUIDFLAGS) hanterm.inst $(DESTDIR)$(BINDIR)/hanterm
  	$(RM) hanterm.inst
  
--- 144,150 ----
  install:: hanterm
  	MakeDir($(DESTDIR)$(BINDIR))
  	$(RM) hanterm.inst
! 	$(CC) -o hanterm.inst $(OBJS1) $(LDOPTIONS) $(LDOVERRIDE) -lXaw -lXmu -lXt -lXext -lX11 $(LDRESUME) $(LDLIBS) $(TERMCAPLIB) $(TERMINFOLIB) $(PTYLIB) $(EXTRA_LOAD_FLAGS)
  	$(INSTALL) -c $(INSTPGMFLAGS) $(INSTUIDFLAGS) hanterm.inst $(DESTDIR)$(BINDIR)/hanterm
  	$(RM) hanterm.inst
  
diff -c hanterm304beta6p1/Makefile hanterm304beta7/Makefile
*** hanterm304beta6p1/Makefile	Wed Mar 25 12:38:30 1998
--- hanterm304beta7/Makefile	Wed Mar 25 12:38:15 1998
***************
*** 7,13 ****
  #
  
  # -------------------------------------------------------------------------
! # Makefile generated from "Imake.tmpl" and </tmp/IIf.a000H6>
  # $XConsortium: Imake.tmpl,v 1.158 92/09/03 19:54:25 rws Exp $
  #
  # Platform-specific parameters may be set in the appropriate <vendor>.cf
--- 7,13 ----
  #
  
  # -------------------------------------------------------------------------
! # Makefile generated from "Imake.tmpl" and </tmp/IIf.a000H0>
  # $XConsortium: Imake.tmpl,v 1.158 92/09/03 19:54:25 rws Exp $
  #
  # Platform-specific parameters may be set in the appropriate <vendor>.cf
***************
*** 346,352 ****
  
  # #endif
  
!      TERMCAPLIB = -ltermcap
  
  all:: $(PROGRAMS)
  
--- 346,353 ----
  
  # #endif
  
!      TERMCAPLIB =
!      TERMINFOLIB = -lcurses
  
  all:: $(PROGRAMS)
  
***************
*** 366,372 ****
  
  hanterm: $(OBJS) $(DEPLIBS)
  	$(RM) $@
! 	$(CC) -o $@ $(OBJS) $(LDOPTIONS) $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XLIB) $(LDLIBS) $(TERMCAPLIB) $(PTYLIB) $(EXTRA_LOAD_FLAGS)
  
  clean::
  	$(RM) hanterm
--- 367,373 ----
  
  hanterm: $(OBJS) $(DEPLIBS)
  	$(RM) $@
! 	$(CC) -o $@ $(OBJS) $(LDOPTIONS) $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XLIB) $(LDLIBS) $(TERMCAPLIB) $(TERMINFOLIB) $(PTYLIB) $(EXTRA_LOAD_FLAGS)
  
  clean::
  	$(RM) hanterm
diff -c hanterm304beta6p1/Makefile.hp hanterm304beta7/Makefile.hp
*** hanterm304beta6p1/Makefile.hp	Thu Nov 20 06:18:04 1997
--- hanterm304beta7/Makefile.hp	Wed Mar 25 12:37:29 1998
***************
*** 12,28 ****
  #
  #LIBS=-L/usr/lib -lXaw -lXt -lXmu -lX11 -ltermcap
  #
! # Here I'm NOT quite sure we have to use termlib or curses - dkim@cwc.com
  LIBS=-L/usr/lib -L/usr/contrib/X11R6/lib -lXaw -lXt -lXmu -lXext -lX11 -lcurses
  
  #
! # Define your HPUX version, dkim@cwc.com
  #
  OSMAJORVERSION = 10
  OSMINORVERSION = 20
  
  #
! # use the HPUX version from the above. dkim@cwc.com
  #
  DEFINES=-Dhpux -DSYSV -DUTMP \
  	-DOSMAJORVERSION=$(OSMAJORVERSION) -DOSMINORVERSION=$(OSMINORVERSION) \
--- 12,28 ----
  #
  #LIBS=-L/usr/lib -lXaw -lXt -lXmu -lX11 -ltermcap
  #
! # Here I'm NOT quite sure we have to use termlib or curses - dkim@surecom.com
  LIBS=-L/usr/lib -L/usr/contrib/X11R6/lib -lXaw -lXt -lXmu -lXext -lX11 -lcurses
  
  #
! # Define your HPUX version, dkim@surecom.com
  #
  OSMAJORVERSION = 10
  OSMINORVERSION = 20
  
  #
! # use the HPUX version from the above. dkim@surecom.com
  #
  DEFINES=-Dhpux -DSYSV -DUTMP \
  	-DOSMAJORVERSION=$(OSMAJORVERSION) -DOSMINORVERSION=$(OSMINORVERSION) \
diff -c hanterm304beta6p1/README.0 hanterm304beta7/README.0
*** hanterm304beta6p1/README.0	Mon Feb  5 18:31:11 1996
--- hanterm304beta7/README.0	Wed Mar 25 12:37:03 1998
***************
*** 18,24 ****
      For HP users, I included "Makefile.hp". Try "make -f Makefile.hp"
      if you dont have xmkmf.
  
!     For DGUX users, try "make -f Makefile.dgux". It is from dkim@cwc.com.
  
  2. Do "make".
      It makes "hanterm" in the directory.
--- 18,24 ----
      For HP users, I included "Makefile.hp". Try "make -f Makefile.hp"
      if you dont have xmkmf.
  
!     For DGUX users, try "make -f Makefile.dgux". It is from dkim@surecom.com
  
  2. Do "make".
      It makes "hanterm" in the directory.
***************
*** 431,437 ****
  IRIX4.0.5 Æ÷ÆÃ°ú º£Å¸ Å×½ºÆ®¸¦ ÇØÁØ ÀÓµ¿Ã¶´Ô(lim@rani.chem.yale.edu),
  3.0 ÀÌ ³ª¿Ã ¼ö ÀÖµµ·Ï °Ý·ÁÇØ ÁØ ¹Ú¿ë¼·´Ô(park@casbah.acns.nwu.edu),
   ½ÅÁ¤½Ä´Ô(jshin@minerva.cis.yale.edu),
! DGUX ¿¡ Æ÷ÆÃÇÑ ±è´ë½Ä´Ô(dkim@cwc.com),
  ÇÑ±Û ÆùÆ®¸¦ »ç¿ëÇÒ ¼ö ÀÖµµ·Ï Çã¶ôÇØ ÁØ ÇÑ±Û°ú ÄÄÇ»ÅÍ,
  README ÀÇ Ã¶ÀÚ¸¦ ¹Ù·Î ÀâÀº Çö½Â¼®´Ô(hyun@ils.nwu.edu),
  Resource È­ÀÏÀÇ translations ¸¦ ¹Ù·Î ÀâÀº Marcus S. Yoo´Ô(msy@scr.siemens.com),
--- 431,437 ----
  IRIX4.0.5 Æ÷ÆÃ°ú º£Å¸ Å×½ºÆ®¸¦ ÇØÁØ ÀÓµ¿Ã¶´Ô(lim@rani.chem.yale.edu),
  3.0 ÀÌ ³ª¿Ã ¼ö ÀÖµµ·Ï °Ý·ÁÇØ ÁØ ¹Ú¿ë¼·´Ô(park@casbah.acns.nwu.edu),
   ½ÅÁ¤½Ä´Ô(jshin@minerva.cis.yale.edu),
! DGUX ¿¡ Æ÷ÆÃÇÑ ±è´ë½Ä´Ô(dkim@surecom.com)
  ÇÑ±Û ÆùÆ®¸¦ »ç¿ëÇÒ ¼ö ÀÖµµ·Ï Çã¶ôÇØ ÁØ ÇÑ±Û°ú ÄÄÇ»ÅÍ,
  README ÀÇ Ã¶ÀÚ¸¦ ¹Ù·Î ÀâÀº Çö½Â¼®´Ô(hyun@ils.nwu.edu),
  Resource È­ÀÏÀÇ translations ¸¦ ¹Ù·Î ÀâÀº Marcus S. Yoo´Ô(msy@scr.siemens.com),
diff -c hanterm304beta6p1/README.2 hanterm304beta7/README.2
*** hanterm304beta6p1/README.2	Mon Feb  5 18:31:11 1996
--- hanterm304beta7/README.2	Wed Mar 25 12:36:32 1998
***************
*** 41,44 ****
      defined as YES, then hanterm will be installed as 'setuid' to root.
  
  
! Daeshik Kim (hellcat@korea.slip.umd.edu // dkim@cwc.com)
--- 41,44 ----
      defined as YES, then hanterm will be installed as 'setuid' to root.
  
  
! Daeshik Kim (dkim@surecom.com)
diff -c hanterm304beta6p1/README.HANTERM304ALPHA hanterm304beta7/README.HANTERM304ALPHA
*** hanterm304beta6p1/README.HANTERM304ALPHA	Fri Feb 16 20:08:56 1996
--- hanterm304beta7/README.HANTERM304ALPHA	Wed Mar 25 12:36:18 1998
***************
*** 33,36 ****
  	add '-fno-strength-reduce' in order to avoid gcc bug.
  
  Daeshik Kim
! dkim@cwc.com // hellcat@korea.slip.umd.edu
--- 33,36 ----
  	add '-fno-strength-reduce' in order to avoid gcc bug.
  
  Daeshik Kim
! dkim@surecom.com
diff -c hanterm304beta6p1/README.HANTERM304BETA1 hanterm304beta7/README.HANTERM304BETA1
*** hanterm304beta6p1/README.HANTERM304BETA1	Fri Mar 15 16:11:51 1996
--- hanterm304beta7/README.HANTERM304BETA1	Wed Mar 25 12:36:06 1998
***************
*** 11,17 ****
  Also, now JOHAB fonts for hanterm is seperated from HANTERM!
  
  Daeshik Kim
! dkim@cwc.com // hellcat@korea.slip.umd.edu
  (also, you can find my id (hellcat or HellCat) from various Korean Internet BBS)
  
  Note for HP users:
--- 11,17 ----
  Also, now JOHAB fonts for hanterm is seperated from HANTERM!
  
  Daeshik Kim
! dkim@surecom.com
  (also, you can find my id (hellcat or HellCat) from various Korean Internet BBS)
  
  Note for HP users:
diff -c hanterm304beta6p1/README.HANTERM304BETA2 hanterm304beta7/README.HANTERM304BETA2
*** hanterm304beta6p1/README.HANTERM304BETA2	Mon Apr 15 20:07:06 1996
--- hanterm304beta7/README.HANTERM304BETA2	Wed Mar 25 12:35:55 1998
***************
*** 16,19 ****
  Note for HP users: try termlib instead of curses if hanterm crashes.
  
  Daeshik Kim
! dkim@cwc.com // hellcat@korea.slip.umd.edu
--- 16,19 ----
  Note for HP users: try termlib instead of curses if hanterm crashes.
  
  Daeshik Kim
! dkim@surecom.com
diff -c hanterm304beta6p1/README.HANTERM304BETA3 hanterm304beta7/README.HANTERM304BETA3
*** hanterm304beta6p1/README.HANTERM304BETA3	Sun Jun  2 21:11:53 1996
--- hanterm304beta7/README.HANTERM304BETA3	Wed Mar 25 12:35:35 1998
***************
*** 15,18 ****
  
  	Daeshik Kim
  
! 	dkim@cwc.com // hellcat@korea.slip.umd.edu
--- 15,18 ----
  
  	Daeshik Kim
  
! 	dkim@surecom.com
Only in hanterm304beta7: README.HANTERM304BETA7
Common subdirectories: hanterm304beta6p1/X11 and hanterm304beta7/X11
diff -c hanterm304beta6p1/button.c hanterm304beta7/button.c
*** hanterm304beta6p1/button.c	Wed Feb  4 04:39:53 1998
--- hanterm304beta7/button.c	Wed Mar 25 12:35:09 1998
***************
*** 1215,1221 ****
  	*targetP++ = XA_COMPOUND_TEXT(d);
  	*targetP++ = XA_LENGTH(d);
  	*targetP++ = XA_LIST_LENGTH(d);
! 	/* no overlap - dkim@cwc.com */
  	memcpy((char*)targetP, (char*)std_targets, sizeof(Atom)*std_length);
  	XtFree((char*)std_targets);
  	*type = XA_ATOM;
--- 1215,1221 ----
  	*targetP++ = XA_COMPOUND_TEXT(d);
  	*targetP++ = XA_LENGTH(d);
  	*targetP++ = XA_LIST_LENGTH(d);
! 	/* no overlap - dkim@surecom.com */
  	memcpy((char*)targetP, (char*)std_targets, sizeof(Atom)*std_length);
  	XtFree((char*)std_targets);
  	*type = XA_ATOM;
***************
*** 1241,1247 ****
  	    *(long*)*value = 1;
  	else {
  	    long temp = 1;
! 	    /* no overlap - dkim@cwc.com */
  	    memcpy((char*)*value, ((char*)&temp)+sizeof(long)-4, 4);
  	}
  	*type = XA_INTEGER;
--- 1241,1247 ----
  	    *(long*)*value = 1;
  	else {
  	    long temp = 1;
! 	    /* no overlap - dkim@surecom.com */
  	    memcpy((char*)*value, ((char*)&temp)+sizeof(long)-4, 4);
  	}
  	*type = XA_INTEGER;
***************
*** 1255,1261 ****
  	    *(long*)*value = xterm->screen.selection_length;
  	else {
  	    long temp = xterm->screen.selection_length;
! 	    /* no overlap - dkim@cwc.com */
  	    memcpy((char*)*value, ((char*)&temp)+sizeof(long)-4, 4);
  	}
  	*type = XA_INTEGER;
--- 1255,1261 ----
  	    *(long*)*value = xterm->screen.selection_length;
  	else {
  	    long temp = xterm->screen.selection_length;
! 	    /* no overlap - dkim@surecom.com */
  	    memcpy((char*)*value, ((char*)&temp)+sizeof(long)-4, 4);
  	}
  	*type = XA_INTEGER;
***************
*** 1501,1518 ****
  	v_write(pty, line, 6);
  }
  
- 
- /*ARGSUSED*/
- void HandleGINInput (w, event, param_list, nparamsp)
-     Widget w;
-     XEvent *event;
-     String *param_list;
-     Cardinal *nparamsp;
- {
-     Bell ();
- }
- 
- 
  /* ARGSUSED */
  void HandleSecure(w, event, params, param_count)
      Widget w;
--- 1501,1506 ----
diff -c hanterm304beta6p1/charproc.c hanterm304beta7/charproc.c
*** hanterm304beta6p1/charproc.c	Fri Feb  6 17:38:55 1998
--- hanterm304beta7/charproc.c	Wed Mar 25 12:34:59 1998
***************
*** 72,79 ****
  extern int font_minus_width_char_byte2;
  #endif
  
- extern jmp_buf VTend;
- 
  extern Widget toplevel;
  extern void exit();
  extern char *malloc();
--- 72,77 ----
***************
*** 186,191 ****
--- 184,190 ----
  #define XtNscrollPos "scrollPos"
  #define XtNsignalInhibit "signalInhibit"
  #define XtNtiteInhibit "titeInhibit"
+ #define XtNunderLine "underLine"
  #define XtNvisualBell "visualBell"
  #define XtNallowSendEvents "allowSendEvents"
  
***************
*** 226,231 ****
--- 225,231 ----
  #define XtCScrollCond "ScrollCond"
  #define XtCSignalInhibit "SignalInhibit"
  #define XtCTiteInhibit "TiteInhibit"
+ #define XtCUnderLine "UnderLine"
  #define XtCVisualBell "VisualBell"
  #define XtCAllowSendEvents "AllowSendEvents"
  
***************
*** 394,400 ****
      { "soft-reset",		HandleSoftReset },
      { "hard-reset",		HandleHardReset },
      { "clear-saved-lines",	HandleClearSavedLines },
-     { "set-terminal-type",	HandleSetTerminalType },
      { "visual-bell",		HandleVisualBell },
  };
  
--- 394,399 ----
***************
*** 567,572 ****
--- 566,574 ----
  {XtNtiteInhibit, XtCTiteInhibit, XtRBoolean, sizeof(Boolean),
  	XtOffsetOf(XtermWidgetRec, misc.titeInhibit),
  	XtRBoolean, (XtPointer) &defaultFALSE},
+ {XtNunderLine, XtCUnderLine, XtRBoolean, sizeof(Boolean),
+         XtOffsetOf(XtermWidgetRec, screen.underline),
+         XtRBoolean, (XtPointer) &defaultFALSE},
  {XtNvisualBell, XtCVisualBell, XtRBoolean, sizeof(Boolean),
  	XtOffsetOf(XtermWidgetRec, screen.visualbell),
  	XtRBoolean, (XtPointer) &defaultFALSE},
***************
*** 1591,1597 ****
  static char *v_bufstr = NULL;	/* beginning of area to write */
  static char *v_bufptr;		/* end of area to write */
  static char *v_bufend;		/* end of physical buffer */
! #if !defined(linux) && !defined(SVR4)	/* dkim@cwc.com */
  #define	ptymask()	(v_bufptr > v_bufstr ? pty_mask : 0)
  #endif
  
--- 1593,1599 ----
  static char *v_bufstr = NULL;	/* beginning of area to write */
  static char *v_bufptr;		/* end of area to write */
  static char *v_bufend;		/* end of physical buffer */
! #if !defined(linux) && !defined(SVR4)	/* dkim@surecom.com */
  #define	ptymask()	(v_bufptr > v_bufstr ? pty_mask : 0)
  #endif
  
***************
*** 1644,1650 ****
  		    fprintf(stderr, "moving data down %d\n",
  			    v_bufstr - v_buffer);
  #endif
! #ifdef SVR4	/* dkim@cwc.com */
  		    memmove(v_buffer, v_bufstr, v_bufptr - v_bufstr);
  #else
  		    bcopy(v_bufstr, v_buffer, v_bufptr - v_bufstr);
--- 1646,1652 ----
  		    fprintf(stderr, "moving data down %d\n",
  			    v_bufstr - v_buffer);
  #endif
! #ifdef SVR4	/* dkim@surecom.com */
  		    memmove(v_buffer, v_bufstr, v_bufptr - v_bufstr);
  #else
  		    bcopy(v_bufstr, v_buffer, v_bufptr - v_bufstr);
***************
*** 1676,1682 ****
  	    }
  	    if (v_bufend >= v_bufptr + len) {
  		/* new stuff will fit */
! 		/* no overlap?? - dkim@cwc.com */
  		memcpy(v_bufptr, d, len);
  		v_bufptr += len;
  	    }
--- 1678,1684 ----
  	    }
  	    if (v_bufend >= v_bufptr + len) {
  		/* new stuff will fit */
! 		/* no overlap?? - dkim@surecom.com */
  		memcpy(v_bufptr, d, len);
  		v_bufptr += len;
  	    }
***************
*** 2113,2119 ****
  				currentGC, currentHGC, cx + 1, cy, johab_buf,
  				len);
  	    
! 	    if(fgs & UNDERLINE) 
  		XDrawLine(screen->display, TextWindow(screen), currentGC,
  			  cx, cy+1,
  			  cx + len * FontWidth(screen), cy+1);
--- 2115,2121 ----
  				currentGC, currentHGC, cx + 1, cy, johab_buf,
  				len);
  	    
! 	    if((fgs & UNDERLINE) && screen->underline)
  		XDrawLine(screen->display, TextWindow(screen), currentGC,
  			  cx, cy+1,
  			  cx + len * FontWidth(screen), cy+1);
***************
*** 2659,2665 ****
      register int rows = screen->max_row + 1;
      char *save [4 * MAX_ROWS];
  
!     /* no overlap - dkim@cwc.com */
      memcpy((char *)save, (char *)screen->buf, 4 * sizeof(char *) * rows);
      memcpy((char *)screen->buf, (char *)screen->altbuf, 4 * sizeof(char *) * rows);
      memcpy((char *)screen->altbuf, (char *)save, 4 * sizeof(char *) * rows);
--- 2661,2667 ----
      register int rows = screen->max_row + 1;
      char *save [4 * MAX_ROWS];
  
!     /* no overlap - dkim@surecom.com */
      memcpy((char *)save, (char *)screen->buf, 4 * sizeof(char *) * rows);
      memcpy((char *)screen->buf, (char *)screen->altbuf, 4 * sizeof(char *) * rows);
      memcpy((char *)screen->altbuf, (char *)save, 4 * sizeof(char *) * rows);
***************
*** 2679,2686 ****
  
  	bcnt = 0;
  	bptr = buffer;
! 	if(!setjmp(VTend))
! 		VTparse();
  	HideCursor();
  	screen->cursor_set = OFF;
  }
--- 2681,2687 ----
  
  	bcnt = 0;
  	bptr = buffer;
! 	VTparse();
  	HideCursor();
  	screen->cursor_set = OFF;
  }
***************
*** 2829,2834 ****
--- 2830,2836 ----
     new->screen.scrolllines = request->screen.scrolllines;
     new->screen.scrollttyoutput = request->screen.scrollttyoutput;
     new->screen.scrollkey = request->screen.scrollkey;
+    new->screen.underline = request->screen.underline;
     new->screen.visualbell = request->screen.visualbell;
     new->misc.re_verse = request->misc.re_verse;
     new->screen.multiClickTime = request->screen.multiClickTime;
***************
*** 2942,2948 ****
  
  	/*
  	 * mem. leak?
! 	 * Daeshik Kim (dkim@cwc.com) - DKIM
  	 */
  	if (screen->fnt_norm)
  	  XFreeFont (screen->display, screen->fnt_norm);
--- 2944,2950 ----
  
  	/*
  	 * mem. leak?
! 	 * Daeshik Kim (dkim@surecom.com) - DKIM
  	 */
  	if (screen->fnt_norm)
  	  XFreeFont (screen->display, screen->fnt_norm);
***************
*** 3315,3321 ****
  	if((flags & BOLD) && screen->enbolden) /* no bold font */
  		HDrawString(screen->display, TextWindow(screen), currentGC,
  			    currentHGC, x + 1, y, (char *) c, n);
! 	if(flags & UNDERLINE) 
  		XDrawLine(screen->display, TextWindow(screen), currentGC,
  			x, y+1, x + n*FontWidth(screen), y+1);
  #if !defined(NO_PATCH_CURSOR_MOVE) /* by hanmaum 1998.2.6 */
--- 3317,3323 ----
  	if((flags & BOLD) && screen->enbolden) /* no bold font */
  		HDrawString(screen->display, TextWindow(screen), currentGC,
  			    currentHGC, x + 1, y, (char *) c, n);
! 	if((flags & UNDERLINE) && screen->underline)
  		XDrawLine(screen->display, TextWindow(screen), currentGC,
  			x, y+1, x + n*FontWidth(screen), y+1);
  #if !defined(NO_PATCH_CURSOR_MOVE) /* by hanmaum 1998.2.6 */
***************
*** 3455,3461 ****
  	if((flags & BOLD) && screen->enbolden)
  		HDrawString(screen->display, TextWindow(screen), currentGC,
  			    currentHGC, x + 1, y, c, n);
! 	if(flags & UNDERLINE) 
  		XDrawLine(screen->display, TextWindow(screen), currentGC,
  			x, y+1, x + n*FontWidth(screen), y+1);
  	screen->cursor_state = OFF;
--- 3457,3463 ----
  	if((flags & BOLD) && screen->enbolden)
  		HDrawString(screen->display, TextWindow(screen), currentGC,
  			    currentHGC, x + 1, y, c, n);
! 	if((flags & UNDERLINE) && screen->underline)
  		XDrawLine(screen->display, TextWindow(screen), currentGC,
  			x, y+1, x + n*FontWidth(screen), y+1);
  	screen->cursor_state = OFF;
diff -c hanterm304beta6p1/cursor.c hanterm304beta7/cursor.c
*** hanterm304beta6p1/cursor.c	Fri Mar 15 12:48:26 1996
--- hanterm304beta7/cursor.c	Wed Mar 25 12:34:50 1998
***************
*** 225,231 ****
  	sc->flags = term->flags;
  	sc->curgl = screen->curgl;
  	sc->curgr = screen->curgr;
! 	/* no overlap - dkim@cwc.com */
  	memcpy(sc->gsets, screen->gsets, sizeof(screen->gsets));
  }
  
--- 225,231 ----
  	sc->flags = term->flags;
  	sc->curgl = screen->curgl;
  	sc->curgr = screen->curgr;
! 	/* no overlap - dkim@surecom.com */
  	memcpy(sc->gsets, screen->gsets, sizeof(screen->gsets));
  }
  
***************
*** 238,244 ****
  {
  	register TScreen *screen = &term->screen;
  
! 	/* no overlap - dkim@cwc.com */
  	memcpy(screen->gsets, sc->gsets, sizeof(screen->gsets));
  	screen->curgl = sc->curgl;
  	screen->curgr = sc->curgr;
--- 238,244 ----
  {
  	register TScreen *screen = &term->screen;
  
! 	/* no overlap - dkim@surecom.com */
  	memcpy(screen->gsets, sc->gsets, sizeof(screen->gsets));
  	screen->curgl = sc->curgl;
  	screen->curgr = sc->curgr;
diff -c hanterm304beta6p1/data.c hanterm304beta7/data.c
*** hanterm304beta6p1/data.c	Fri Feb  6 17:38:56 1998
--- hanterm304beta7/data.c	Wed Mar 25 11:39:12 1998
***************
*** 37,43 ****
  Char buffer[BUF_SIZE];
  Char *bptr = buffer;
  #endif
- jmp_buf VTend;
  XPoint VTbox[NBOX] = {
  	{0, 0},
  	{0, 0},
--- 37,42 ----
diff -c hanterm304beta6p1/hangul.c hanterm304beta7/hangul.c
*** hanterm304beta6p1/hangul.c	Sun Feb  8 07:45:57 1998
--- hanterm304beta7/hangul.c	Wed Mar 25 12:34:40 1998
***************
*** 348,354 ****
   * This can be used uninitialized and it can crash hanterm
   * when you 'cat' huge files to the screen.
   *
!  * Daeshik Kim (dkim@cwc.com)
   */
  GC fillgc = NULL;
  
--- 348,354 ----
   * This can be used uninitialized and it can crash hanterm
   * when you 'cat' huge files to the screen.
   *
!  * Daeshik Kim (dkim@surecom.com)
   */
  GC fillgc = NULL;
  
diff -c hanterm304beta6p1/main.c hanterm304beta7/main.c
*** hanterm304beta6p1/main.c	Fri Feb  6 17:38:57 1998
--- hanterm304beta7/main.c	Wed Mar 25 12:10:42 1998
***************
*** 61,67 ****
  #endif
  #endif
  
! #ifdef DGUX /* dkim@cwc.com */
  /* DGUX is SVR4 but its SYSV side of TTY has bugs in it */
  /* we have to use BSD part of DGUX except this UTMP parts */
  /* since BSD parts of UTMP coding won't work on DGUX - DKIM */
--- 61,67 ----
  #endif
  #endif
  
! #ifdef DGUX /* dkim@surecom.com */
  /* DGUX is SVR4 but its SYSV side of TTY has bugs in it */
  /* we have to use BSD part of DGUX except this UTMP parts */
  /* since BSD parts of UTMP coding won't work on DGUX - DKIM */
***************
*** 84,90 ****
--- 84,97 ----
  #define USE_TERMIOS
  #endif
  #define HAS_UTMP_UT_HOST
+ 
+ /* in solaris, let's use terminfo instead of termcap */
+ /* dkim@surecom.com */
+ #ifdef sun
+ #define USE_TERMINFO
  #endif
+ 
+ #endif
    
  #if defined(SYSV) && defined(i386) && !defined(SVR4)
  #define USE_SYSV_UTMP
***************
*** 341,346 ****
--- 348,359 ----
  #include <locale.h>
  #endif
  
+ /* dkim@surecom.com */
+ #ifdef USE_TERMINFO
+ #include <curses.h>
+ #include <term.h>
+ #endif
+ 
  #ifdef SYSV
  extern char *ptsname();
  #endif
***************
*** 753,759 ****
--- 766,774 ----
  "Fonts are automatically detected by its facename.",
  NULL};
  
+ #ifndef USE_TERMIOS
  static void remove_termcap_entry ();
+ #endif
  
  static void Syntax (badOption)
      char *badOption;
***************
*** 898,909 ****
  	register TScreen *screen;
  	register int i, pty;
  	int Xsocket, mode;
! 	char *base_name();
  	int xerror(), xioerror();
  
-         putenv("HANX_INPUT_DISABLE=1");
- 	putenv("HANX_OUTPUT_DISABLE=1");
- 
  	ProgramName = argv[0];
  
  	ttydev = (char *) malloc (strlen (TTYDEV) + 1);
--- 913,921 ----
  	register TScreen *screen;
  	register int i, pty;
  	int Xsocket, mode;
! 	char *base_name(), *ptr;
  	int xerror(), xioerror();
  
  	ProgramName = argv[0];
  
  	ttydev = (char *) malloc (strlen (TTYDEV) + 1);
***************
*** 1108,1113 ****
--- 1120,1152 ----
  
  	/* Init the Toolkit. */
  	XtSetErrorHandler(xt_error);
+ 
+ 	if ((ptr = (char*)malloc (strlen("HANX_INPUT_DISABLE=1")+1)) == NULL)
+ 	{
+ 		perror ("malloc for putenv");
+ 		exit (1);
+ 	}
+ 	strcpy (ptr, "HANX_INPUT_DISABLE=1");
+ 	if (putenv (ptr))
+ 	{
+ 		perror ("putenv");
+ 		free (ptr);
+ 		exit (1);
+ 	}
+ 
+ 	if ((ptr = (char*)malloc (strlen("HANX_OUTPUT_DISABLE=1")+1)) == NULL)
+ 	{
+ 		perror ("malloc for putenv");
+ 		exit (1);
+ 	}
+ 	strcpy (ptr, "HANX_OUTPUT_DISABLE=1");
+ 	if (putenv (ptr))
+ 	{
+ 		perror ("putenv");
+ 		free (ptr);
+ 		exit (1);
+ 	}
+ 
  	toplevel = XtAppInitialize (&app_con, "Hanterm", 
  				    optionDescList, XtNumber(optionDescList), 
  				    &argc, argv, fallback_resources, NULL, 0);
***************
*** 1233,1239 ****
  
  	/*
  	 * Need to initialize for later garbage collection
! 	 * Daeshik Kim (dkim@cwc.com) - DKIM
  	 */
  	screen->fnt_norm = screen->fnt_bold = screen->fnt_hangul = NULL;
  
--- 1272,1278 ----
  
  	/*
  	 * Need to initialize for later garbage collection
! 	 * Daeshik Kim (dkim@surecom.com) - DKIM
  	 */
  	screen->fnt_norm = screen->fnt_bold = screen->fnt_hangul = NULL;
  
***************
*** 1768,1776 ****
--- 1807,1817 ----
  	char termcap [1024];
  	char newtc [1024];
  #else
+ #ifndef USE_TERMINFO            /* dkim@surecom.com */
  	char termcap [2048];
  	char newtc [2048];
  #endif
+ #endif
  	char *ptr, *shname, *shname_minus;
  	int i, no_dev_tty = FALSE;
  #ifdef USE_SYSV_TERMIO
***************
*** 1958,1966 ****
  	}
  #endif
  	envnew = vtterm;
- 	ptr = termcap;
  	TermName = NULL;
  	if (resource.term_name) {
  	    if (tgetent (ptr, resource.term_name) == 1) {
  		TermName = resource.term_name;
  		resize (screen, TermName, termcap, newtc);
--- 1999,2024 ----
  	}
  #endif
  	envnew = vtterm;
  	TermName = NULL;
+ 
+ #ifndef USE_TERMINFO            /* dkim@surecom.com */
+         ptr = termcap;
+ #endif
  	if (resource.term_name) {
+ /* dkim@surecom.com */
+ #ifdef USE_TERMINFO
+ 	    int errret;
+ 	    if (setupterm (resource.term_name, 1, &errret) == OK) {
+ 		TermName = resource.term_name;
+ 	    } else {
+ 		if (errret == 0)
+ 		    fprintf (stderr, "%s:  cannot find terminal.\n",
+ 			 ProgramName);
+ 		else
+ 		    fprintf (stderr, "%s:  invalid terminfo entry \"%s\".\n",
+ 			 ProgramName, resource.term_name);
+             }
+ #else
  	    if (tgetent (ptr, resource.term_name) == 1) {
  		TermName = resource.term_name;
  		resize (screen, TermName, termcap, newtc);
***************
*** 1968,1976 ****
--- 2026,2050 ----
  		fprintf (stderr, "%s:  invalid termcap entry \"%s\".\n",
  			 ProgramName, resource.term_name);
  	    }
+ #endif
  	}
  	if (!TermName) {
+ /* dkim@surecom.com */
+ #ifdef USE_TERMINFO
  	    while (*envnew != NULL) {
+ 		if (setupterm (*envnew, 1, NULL) == OK) {
+ 		    TermName = *envnew;
+ 		    break;
+ 		}
+ 		envnew++;
+ 	    }
+ 	    if (TermName == NULL) {
+ 		fprintf (stderr, "%s:  unable to find usable terminfo entry.\n",
+ 			 ProgramName);
+ 		Exit (1);
+ 	    }
+ #else
+ 	    while (*envnew != NULL) {
  		if(tgetent(ptr, *envnew) == 1) {
  			TermName = *envnew;
  			resize(screen, TermName, termcap, newtc);
***************
*** 1983,1988 ****
--- 2057,2063 ----
  			 ProgramName);
  		Exit (1);
  	    }
+ #endif
  	}
  
  #if defined(sun) && !defined(SVR4)
***************
*** 2219,2225 ****
  		     * child pty.
  		     */
  		    /* input: nl->nl, don't ignore cr, cr->nl */
! 		    /* -istrip - dkim@cwc.com */
  		    tio.c_iflag &= ~(INLCR|IGNCR|ISTRIP);
  		    tio.c_iflag |= ICRNL;
  		    /* ouput: cr->cr, nl is not return, no delays, ln->cr/nl */
--- 2294,2300 ----
  		     * child pty.
  		     */
  		    /* input: nl->nl, don't ignore cr, cr->nl */
! 		    /* -istrip - dkim@surecom.com */
  		    tio.c_iflag &= ~(INLCR|IGNCR|ISTRIP);
  		    tio.c_iflag |= ICRNL;
  		    /* ouput: cr->cr, nl is not return, no delays, ln->cr/nl */
***************
*** 2237,2243 ****
  		    tio.c_cflag &= ~(CBAUD);
  		    tio.c_cflag |= B9600;
  #endif	/* !BAUD_0 */
! 		    /* dkim@cwc.com */
  		    tio.c_cflag &= ~CSIZE;
  		    tio.c_cflag |= CS8;
  		    /* enable signals, canonical processing (erase, kill, etc),
--- 2312,2318 ----
  		    tio.c_cflag &= ~(CBAUD);
  		    tio.c_cflag |= B9600;
  #endif	/* !BAUD_0 */
! 		    /* dkim@surecom.com */
  		    tio.c_cflag &= ~CSIZE;
  		    tio.c_cflag |= CS8;
  		    /* enable signals, canonical processing (erase, kill, etc),
***************
*** 2441,2449 ****
  		envsize += 1;   /* LOGNAME */
  #endif /* UTMP */
  #ifdef USE_SYSV_ENVVARS
! #ifndef TIOCSWINSZ		/* window size not stored in driver? */
  		envsize += 2;	/* COLUMNS, LINES */
! #endif /* TIOCSWINSZ */
  #ifdef UTMP
  		envsize += 2;   /* HOME, SHELL */
  #endif /* UTMP */
--- 2516,2526 ----
  		envsize += 1;   /* LOGNAME */
  #endif /* UTMP */
  #ifdef USE_SYSV_ENVVARS
! /* dkim@surecom.com - no need.
! #ifndef TIOCSWINSZ	*/	/* window size not stored in driver? */
  		envsize += 2;	/* COLUMNS, LINES */
! /*
! #endif *//* TIOCSWINSZ */
  #ifdef UTMP
  		envsize += 2;   /* HOME, SHELL */
  #endif /* UTMP */
***************
*** 2451,2462 ****
  		envsize += 1;	/* TERMCAP */
  #endif /* USE_SYSV_ENVVARS */
  		envnew = (char **) calloc ((unsigned) i + envsize, sizeof(char *));
! 		/* no overlap - dkim@cwc.com */
  		memcpy((char*)envnew, (char *)environ, i * sizeof(char *));
  		environ = envnew;
  		Setenv ("TERM=", TermName);
  		if(!TermName)
  			*newtc = 0;
  
  		sprintf (buf, "%lu",
  			 ((unsigned long) XtWindow (XtParent(term))));
--- 2528,2543 ----
  		envsize += 1;	/* TERMCAP */
  #endif /* USE_SYSV_ENVVARS */
  		envnew = (char **) calloc ((unsigned) i + envsize, sizeof(char *));
! 		/* no overlap - dkim@surecom.com */
  		memcpy((char*)envnew, (char *)environ, i * sizeof(char *));
  		environ = envnew;
  		Setenv ("TERM=", TermName);
+ 
+ /* dkim@surecom.com */
+ #ifndef USE_TERMINFO
  		if(!TermName)
  			*newtc = 0;
+ #endif
  
  		sprintf (buf, "%lu",
  			 ((unsigned long) XtWindow (XtParent(term))));
***************
*** 2739,2744 ****
--- 2820,2827 ----
  		}
  #endif /* UTMP */
  #else /* USE_SYSV_ENVVAR */
+ /* dkim@surecom.com */
+ #ifndef USE_TERMINFO
  		strcpy (termcap, newtc);
  		resize (screen, TermName, termcap, newtc);
  		if (term->misc.titeInhibit) {
***************
*** 2756,2761 ****
--- 2839,2845 ----
  		    strcat (newtc, ":im=\\E[4h:ei=\\E[4l:mi:");
  		}
  		Setenv ("TERMCAP=", newtc);
+ #endif
  #endif /* USE_SYSV_ENVVAR */
  
  
***************
*** 3181,3186 ****
--- 3265,3271 ----
  }
  
  
+ #ifndef USE_TERMIOS
  static void remove_termcap_entry (buf, str)
      char *buf;
      char *str;
***************
*** 3201,3206 ****
--- 3286,3292 ----
      }
      return;
  }
+ #endif
  
  /*
   * parse_tty_modes accepts lines of the following form:
diff -c hanterm304beta6p1/menu.c hanterm304beta7/menu.c
*** hanterm304beta6p1/menu.c	Fri Mar 15 13:38:14 1996
--- hanterm304beta7/menu.c	Wed Mar 25 11:36:56 1998
***************
*** 935,957 ****
  {
      do_clearsavedlines(w, NULL, NULL);
  }
- 
- void HandleSetTerminalType(w, event, params, param_count)
-     Widget w;
-     XEvent *event;
-     String *params;
-     Cardinal *param_count;
- {
-     if (*param_count == 1) {
- 	switch (params[0][0]) {
- 	  case 'v': case 'V':
- 	    break;
- 	  case 't': case 'T':
- 	    break;
- 	  default:
- 	    Bell();
- 	}
-     } else {
- 	Bell();
-     }
- }
--- 935,937 ----
diff -c hanterm304beta6p1/misc.c hanterm304beta7/misc.c
*** hanterm304beta6p1/misc.c	Fri Feb  6 17:38:57 1998
--- hanterm304beta7/misc.c	Wed Mar 25 12:34:29 1998
***************
*** 54,61 ****
  extern void ReverseVideo();
  extern void recolor_cursor();
  
- extern jmp_buf VTend;
- 
  #ifndef X_NOT_STDC_ENV
  #include <stdlib.h>
  #else
--- 54,59 ----
***************
*** 371,377 ****
  
      /*
       * This is a memory leak if it's not released
!      * Daeshik Kim (dkim@cwc.com) - DKIM
       */
      XtReleaseGC ((Widget)term, visualGC);
  }
--- 369,375 ----
  
      /*
       * This is a memory leak if it's not released
!      * Daeshik Kim (dkim@surecom.com) - DKIM
       */
      XtReleaseGC ((Widget)term, visualGC);
  }
diff -c hanterm304beta6p1/ptyx.h hanterm304beta7/ptyx.h
*** hanterm304beta6p1/ptyx.h	Fri Nov 21 03:16:55 1997
--- hanterm304beta7/ptyx.h	Wed Mar 25 11:40:43 1998
***************
*** 323,328 ****
--- 323,329 ----
  	int		refresh_amt;	/* amount to refresh		*/
  	Boolean		jumpscroll;	/* whether we should jumpscroll */
  	Boolean         always_highlight; /* whether to highlight cursor */
+ 	Boolean		underline;	/* whether to underline text */
  
          int             multiClickTime;  /* time between multiclick selects */
          int             bellSuppressTime; /* msecs after Bell before another allowed */
diff -c hanterm304beta6p1/screen.c hanterm304beta7/screen.c
*** hanterm304beta6p1/screen.c	Wed Feb  4 04:39:55 1998
--- hanterm304beta7/screen.c	Wed Mar 25 12:33:57 1998
***************
*** 122,128 ****
  	    if (move_up < 0)
  		move_up = 0;
  	    /* Overlapping bcopy here! */
! #ifdef SVR4	/* dkim@cwc.com */
  	    memmove(*sbuf, *sbuf+move_up,
  		  (oldrow-move_up)*sizeof((*sbuf)[0]) );
  #else
--- 122,128 ----
  	    if (move_up < 0)
  		move_up = 0;
  	    /* Overlapping bcopy here! */
! #ifdef SVR4	/* dkim@surecom.com */
  	    memmove(*sbuf, *sbuf+move_up,
  		  (oldrow-move_up)*sizeof((*sbuf)[0]) );
  #else
***************
*** 151,157 ****
  	    tmp += ncol*move_down;
  	}
  	for (i = 0; i < minrows; i++, tmp += ncol) {
! 		/* no overlap?? - dkim@cwc.com */
  #ifdef SVR4
  		memmove(tmp, base[i], mincols);
  #else
--- 151,157 ----
  	    tmp += ncol*move_down;
  	}
  	for (i = 0; i < minrows; i++, tmp += ncol) {
! 		/* no overlap?? - dkim@surecom.com */
  #ifdef SVR4
  		memmove(tmp, base[i], mincols);
  #else
***************
*** 200,206 ****
  	flags &= ATTRIBUTES;
  	flags |= CHARDRAWN;
  
! 	/* no overlap? dkim@cwc.com */
  #ifdef SVR4
  	memmove(col, str, length);
  #else
--- 200,206 ----
  	flags &= ATTRIBUTES;
  	flags |= CHARDRAWN;
  
! 	/* no overlap? dkim@surecom.com */
  #ifdef SVR4
  	memmove(col, str, length);
  #else
***************
*** 244,250 ****
  
  
  	/* save n lines at bottom */
! 	/* no overlap? - dkim@cwc.com */
  #ifdef SVR4
  	memmove ((char *) save, (char *) &sb [4 * (last -= n - 1)],
  		4 * sizeof (char *) * n);
--- 244,250 ----
  
  
  	/* save n lines at bottom */
! 	/* no overlap? - dkim@surecom.com */
  #ifdef SVR4
  	memmove ((char *) save, (char *) &sb [4 * (last -= n - 1)],
  		4 * sizeof (char *) * n);
***************
*** 266,272 ****
  	 *
  	 *   +--------|---------|----+
  	 */
! #ifdef SVR4	/* dkim@cwc.com */
  	memmove ((char *) &sb [4 * (where + n)], (char *) &sb [4 * where],
  		4 * sizeof (char *) * (last - where));
  #else
--- 266,272 ----
  	 *
  	 *   +--------|---------|----+
  	 */
! #ifdef SVR4	/* dkim@surecom.com */
  	memmove ((char *) &sb [4 * (where + n)], (char *) &sb [4 * where],
  		4 * sizeof (char *) * (last - where));
  #else
***************
*** 275,281 ****
  #endif
  
  	/* reuse storage for new lines at where */
! 	/* no overlap? - dkim@cwc.com */
  	memcpy ((char *) &sb[4 * where], (char *)save, 4 * sizeof(char *) * n);
  }
  
--- 275,281 ----
  #endif
  
  	/* reuse storage for new lines at where */
! 	/* no overlap? - dkim@surecom.com */
  	memcpy ((char *) &sb[4 * where], (char *)save, 4 * sizeof(char *) * n);
  }
  
***************
*** 295,301 ****
  	char *save [4 * MAX_ROWS];
  
  	/* save n lines at where */
! 	/* no overlap - dkim@cwc.com */
  	memcpy ((char *)save, (char *) &sb[4 * where], 4 * sizeof(char *) * n);
  
  	/* clear contents of old rows */
--- 295,301 ----
  	char *save [4 * MAX_ROWS];
  
  	/* save n lines at where */
! 	/* no overlap - dkim@surecom.com */
  	memcpy ((char *)save, (char *) &sb[4 * where], 4 * sizeof(char *) * n);
  
  	/* clear contents of old rows */
***************
*** 303,309 ****
  		memset ((char *) save [i], '\0', size);
  
  	/* move up lines */
! #ifdef SVR4	/* dkim@cwc.com */
  	memmove ((char *) &sb[4 * where], (char *) &sb[4 * (where + n)],
  		4 * sizeof (char *) * ((last -= n - 1) - where));
  #else
--- 303,309 ----
  		memset ((char *) save [i], '\0', size);
  
  	/* move up lines */
! #ifdef SVR4	/* dkim@surecom.com */
  	memmove ((char *) &sb[4 * where], (char *) &sb[4 * (where + n)],
  		4 * sizeof (char *) * ((last -= n - 1) - where));
  #else
***************
*** 312,318 ****
  #endif
  
  	/* reuse storage for new bottom lines */
! 	/* no overlap - dkim@cwc.com */
  	memcpy ((char *) &sb[4 * last], (char *)save, 4 * sizeof(char *) * n);
  }
  
--- 312,318 ----
  #endif
  
  	/* reuse storage for new bottom lines */
! 	/* no overlap - dkim@surecom.com */
  	memcpy ((char *) &sb[4 * last], (char *)save, 4 * sizeof(char *) * n);
  }
  
***************
*** 525,531 ****
  		if((flags & BOLD) && screen->enbolden)
  		    HDrawString(screen->display, TextWindow(screen), 
  				gc, hgc, x + 1, y, p, n);
! 		if(flags & UNDERLINE) 
  		    XDrawLine(screen->display, TextWindow(screen), 
  			      gc, x, y+1, x+n*FontWidth(screen), y+1);
  		
--- 525,531 ----
  		if((flags & BOLD) && screen->enbolden)
  		    HDrawString(screen->display, TextWindow(screen), 
  				gc, hgc, x + 1, y, p, n);
! 		if((flags & UNDERLINE) && screen->underline) 
  		    XDrawLine(screen->display, TextWindow(screen), 
  			      gc, x, y+1, x+n*FontWidth(screen), y+1);
  		
***************
*** 625,631 ****
  	if((flags & BOLD) && screen->enbolden)
  	    HDrawString(screen->display, TextWindow(screen), gc, hgc,
  			x + 1, y, p, n);
! 	if(flags & UNDERLINE) 
  	    XDrawLine(screen->display, TextWindow(screen), gc, 
  		      x, y+1, x + n * FontWidth(screen), y+1);
      }
--- 625,631 ----
  	if((flags & BOLD) && screen->enbolden)
  	    HDrawString(screen->display, TextWindow(screen), gc, hgc,
  			x + 1, y, p, n);
! 	if((flags & UNDERLINE) && screen->underline)
  	    XDrawLine(screen->display, TextWindow(screen), gc, 
  		      x, y+1, x + n * FontWidth(screen), y+1);
      }
diff -c hanterm304beta6p1/scrollbar.c hanterm304beta7/scrollbar.c
*** hanterm304beta6p1/scrollbar.c	Thu Mar 28 22:41:53 1996
--- hanterm304beta7/scrollbar.c	Wed Mar 25 12:34:17 1998
***************
*** 347,353 ****
  	       == NULL)
  	      Error (ERROR_SBRALLOC);
  	    screen->buf = &screen->allbuf[4 * screen->savelines];
! #ifdef SVR4	/* dkim@cwc.com */
  	    memmove ((char *)screen->buf, (char *)screen->allbuf,
  		   4 * (screen->max_row + 2) * sizeof (char *));
  #else
--- 347,353 ----
  	       == NULL)
  	      Error (ERROR_SBRALLOC);
  	    screen->buf = &screen->allbuf[4 * screen->savelines];
! #ifdef SVR4	/* dkim@surecom.com */
  	    memmove ((char *)screen->buf, (char *)screen->allbuf,
  		   4 * (screen->max_row + 2) * sizeof (char *));
  #else
