1999-01-03  Jay Painter <jpaint@serv.net>

	* zvtterm.c: removed ifdefs so building without background pixmap
	support is no longer a option; cleaned up the flickering a little
	with scrolling when we have a background pixmap.

1999-01-03  Jay Painter <jpaint@serv.net>

	* zvtterm.c, zvtterm.h: more widget cleanup, rearranged structure
	to take up less memory by putting all the bitfields at the end of
	the zvtterm structure (and breaking binary compatibility); fixed
	a bunch of memory leads caused by not unref(ing) fonts, objects.

1999-01-03  Jay Painter <jpaint@serv.net>

	* zterm.c: made the test program work better by properly duplicating
	and setting up the environment for the forked pty.

	* vt.c: fixed a resizing behavior so that the current line will
	not get moved up into the scrolling buffer; instead, it will
	destroy lines from the bottom of the terminal once it hits the
	current line when moving top lines into the scrollback area.

1999-01-02  Jay Painter <jpaint@serv.net>

	* vt.h, vt.c, update.c, zvtterm.c: fixed multiple buffer overruns
	thanks to electric fence.  Changed default color of terminal to
	black on white.

	* zterm.c: changed widget packing, and main window size hints to
	accureately reflect terminal grid size.	

1999-01-02  Jeff Garzik  <jgarzik@pobox.com>

	* gnome-pty-helper.c, subshell.c,
	  zterm.c, zvtterm.c:
	Include _xxx_SOURCE defines for 'gcc -ansi -pedantic'

	* gnome-pty.h:
	removed global var login_name not referenced anywhere.
	removed unnecessary comma.

	* gnome-pty-helper.c: include autoconf alloca incantation
	
1998-12-31  Jay Painter <jpaint@serv.net>

	* zvtterm.c, vtx.h, update.c: changed the way the zvtterm
	widget preforms size requests to be more consistant with the
	way other GTK+ widgets do -- that is, they only request their
	minimum allocation size and let their parents allocate more.
	Unfortunately, this scheme doesn't work well for a terminal 
	widget because it's hard for the parent widgets to know exactly
	how much to allocate; therefore, there is an additional API for
	setting the terminal grid size (zvt_term_set_size) which will
	preform a widget resize to the appropriate grid dimentions.
	
1998-12-30  Jay Painter <jpaint@serv.net>

	* zvtterm.c: fixed "unterminated macro 1511" syntax error
	that I didn't catch during my last merge.

1998-12-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* vt.c (vt_tab): Ok, use the VTATTR_CLEAR for tabs, not just
	"no-attributes".  This fixes the tab problem with other colors.
	Thanks to Jay for pointing this out.
	
1998-12-30  Jay Painter <jpaint@serv.net>

	* memory.[ch]: removed!  replaced with glib g_malloc, g_free
	and friends; this is for code clarty and to also fix a nasty
	bug that tried to free un-allocated memory when you resized
	while scrolled up.

	* vt.c, update.c: g_memory stuff all the way; removed all calls
	to alloca; 

	* zvtterm.c: just some formatting changes here and there

1998-12-29  Jay Painter <jpaint@serv.net>

	* zvtterm.[ch]: massive reformatting, added many meaningful 
	asserts, added gtk_widget_queue_resizes after font changes and
	maybe in another place or two; added framework for getting this
	widget to size itself like a normal GTK+ widget, but I havn't
	implimented it yet.  Replaced the alloca string allocations with
	GString(s) because if I remember right once you've increased your
	stack frame size, all stack frames called under it are at least
	that size -- but then I could also be on drugs.  I probably did 
	somthing else too...

1998-12-28  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* zvtterm.c (draw_back_pixmap): Do not reset the _tile to the
	previous value.  We probably do not care, as we have reset the
	fill style anyways (and tile only makes sense if the fill is set
	to GDK_TILED).
	
	(zvt_term_get_capabilities): Only allow the pixmap settings to
	take effect if the visuals are compatible. 
	
	(zvt_term_set_background): Even if we have support, make sure we
	do not acknowledge any calls if _capabilities does not allow us to
	use it. 

	Do not know why XSetTile does not accept a NULL pixmap though to
	reset this value. 

	* vt.c (vt_tab): Fix for the tab problem reported by Alan.  It
	happens that tabs are transparent regarding attributes.

Wed Dec 16 16:52:53 1998  Owen Taylor  <otaylor@redhat.com>

	* zvtterm.c (zvt_term_init): Initialize timeout_id to -1.

1998-12-31  Jay Painter <jpaint@serv.net>

	* zvtterm.c, vtx.h, update.c: changed the way the zvtterm
	widget preforms size requests to be more consistant with the
	way other GTK+ widgets do -- that is, they only request their
	minimum allocation size and let their parents allocate more.
	Unfortunately, this scheme doesn't work well for a terminal 
	widget because it's hard for the parent widgets to know exactly
	how much to allocate; therefore, there is an additional API for
	setting the terminal grid size (zvt_term_set_size) which will
	preform a widget resize to the appropriate grid dimentions.

1998-12-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gnome-pty-helper.c (open_ptys): Use pathmax, as the sysconfig
	tty size does not include the whole pathname.

	* vt.c (vt_tab): Ok, use the VTATTR_CLEAR for tabs, not just
	"no-attributes".  This fixes the tab problem with other colors.
	Thanks to Jay for pointing this out.

1998-12-30  Jay Painter <jpaint@serv.net>

	* memory.[ch]: removed!  replaced with glib g_malloc, g_free
	and friends; this is for code clarty and to also fix a nasty
	bug that tried to free un-allocated memory when you resized
	while scrolled up.

	* vt.c, update.c: g_memory stuff all the way; removed all calls
	to alloca; 

	* zvtterm.c: just some formatting changes here and there

1998-12-29  Jay Painter <jpaint@serv.net>

	* zvtterm.[ch]: massive reformatting, added many meaningful 
	asserts, added gtk_widget_queue_resizes after font changes and
	maybe in another place or two; added framework for getting this
	widget to size itself like a normal GTK+ widget, but I havn't
	implimented it yet.  Replaced the alloca string allocations with
	GString(s) because if I remember right once you've increased your
	stack frame size, all stack frames called under it are at least
	that size -- but then I could also be on drugs.  I probably did 
	somthing else too...

1998-12-28  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* zvtterm.c (draw_back_pixmap): Do not reset the _tile to the
	previous value.  We probably do not care, as we have reset the
	fill style anyways (and tile only makes sense if the fill is set
	to GDK_TILED).
	
	(zvt_term_get_capabilities): Only allow the pixmap settings to
	take effect if the visuals are compatible. 
	
	(zvt_term_set_background): Even if we have support, make sure we
	do not acknowledge any calls if _capabilities does not allow us to
	use it. 

	Do not know why XSetTile does not accept a NULL pixmap though to
	reset this value. 

	* vt.c (vt_tab): Fix for the tab problem reported by Alan.  It
	happens that tabs are transparent regarding attributes.

Wed Dec 16 16:52:53 1998  Owen Taylor  <otaylor@redhat.com>

	* zvtterm.c (zvt_term_init): Initialize timeout_id to -1.

1998-12-09  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* update.c (vt_get_selection): Fixed the paste problems.  We need
	to set the selection_size when we set the selection
	(vt_in_wordclass): Punctuation characters are not in wordclass

Wed Dec  9 05:39:05 PST 1998 Manish Singh <yosh@gimp.org>

	* zvtterm.[ch]: fix for IC changes in new gtk. It compiles,
	and zterm works, someone want to verify it is correctly fixed?

1998-12-05  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gnome-pty-helper.c (sanity_checks): Figure out if file
	descriptor 2 is valid, if not, then try using /dev/tty and
	/dev/null as replacements.
	(sanity_checks): Verify that descriptors 0 and 1 are valid. 

1998-12-05  Havoc Pennington  <hp@pobox.com>

	* vt.h: Change name of "this" member to "this_line," so C++
	doesn't puke. Add extern "C" stuff.
	* vt.c: reflect change throughout
	* update.c: same
	* vtx.h: extern "C"
	
1998-12-05  Michael Zucchi  <zucchi@zedzone.mmc.com.au>

	* zvtterm.c (zvt_term_get_buffer): New api function.  Returns a
	malloc'd block of memory containing buffer/scrollback contents as
	a sequence of bytes.

	* update.c (vt_select_block): New function, returns a malloc'd
	block of memory containing the scrollback contents.
	(vt_get_selection): Moved most of the code into vt_select_block.

Fri Dec  4 16:45:11 1998  Manish Vachharajani <mvachhar@vger.rutgers.edu>

	* gnome-pty-helper.c: Don't bail out if we can't open /dev/tty.
	Seems to cause problems.
	
Wed Dec 02 03:16:07 1998  George Lebl  <jirka@5z.com>

	* zvtterm.c: (vt_scroll_area) check for background pixmap in
	addition to transparency to do the cheap ass scrolling hack by
	repainting the entire window

Sun Nov 29 02:59:32 1998  George Lebl  <jirka@5z.com>

	* zvterm.[ch]: added function zvt_term_get_capabilities, which
	  returns the bitmask of capabilities supported by the zvt widget
	  right now, this is only the pixmap support, which is
	  ZVT_TERM_PIXMAP_SUPPORT

1998-11-26  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* subshell.c (get_ptys): Use n_read, just like gnome-pty-helper. 

	* gnome-pty-helper.c (main): Deal properly with read().  read
	might return -1/EINTR for an interrupted system call.  read might
	return less bytes than requested and read might return 0 on eof. 

	* gnome-login-support.c (n_read): New utility routine to deal with
	all of the read () system calls details.
	
	* subshell.c (zvt_init_subshell): Init SIGCHLD before the first
	fork. 

	* gnome-pty-helper.c: Duh.  Test was wrong.  Relaxed limits. 

	* zvtterm.c (zvt_term_title_changed_raise): Fix prototype.

	* gnome-pty-helper.c (sanity_checks): New routine takes care of
	making sure environment is sane for running a suid program.
	Thanks to Pavel Kankovsky for providing sample code for resource
	checks and signal checks.
	
	(main): Check for open return value.  Thanks
	to Pavel Kankovsky again for pointing this out.

1998-11-26  Jeff Garzik  <jgarzik@pobox.com>

	* vt.c, zterm.c, zvtterm.c:
	Replaced sprintf calls with g_snprintf.
	Updated a couple hardcoded length values to instead of sizeof().

1998-11-24  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	The following changes have been implemented after the comments
	from Pavel Kankovsky (peak@kerberos.troja.mff.cuni.cz) who audited
	the gnome-pty-helper code.

	Now I understand why Theo says that most of us mere programmers
	do not get properly aquainted with the proper Unix system call API.
	
	* gnome-login-support.c (pty_open_slave_bsd): Set the owner and
	group even if getgrnam fails due to a low memory condition on the system

	* gnome-pty-helper.c: Make the pty_info->line information be a
	character pointer instead of a static array.
	(pty_add, pty_remove): fix accordingly.
	
	(open_ptys): Size the array passed to openpty correctly: use
	sysconf (_SC_TTY_NAME_MAX) if available or PATH_MAX otherwise.

	dup2() might fail with EINTR, handle this case.

	A couple of extra problems still remain, will fix those tomorrow.
	
1998-11-23  Jay Painter <jpaint@serv.net>

	* zvtterm.c: added zvt_term_map & zvt_term_unmap so that the
	terminal and its subwindows are mapped/unmapped properly.

1998-11-23  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gnome-pty.h (USE_SYSV_UTMP): Define USE_SYSV_UTMP in the shared
	header file

	* subshell.c (zvt_shutdown_subshell): Duh, I was missing the tag
	write.  Protocol fixed.  This should fix gnome-terminal for everyone.

	* zvtterm.c (zvt_term_bell): Fix prototype.

1998-11-22  Jay Painter <jpaint@serv.net>

	* zvtterm.c: widget now creates a separate term_window for the
	terminal window.  This is sized inside of the widget->window
	so that the terminal widget has a relieved border.  I also 
	cleaned up a couple of leaks and moved some stuff from the
	_destroy method into the _unrealize method.  Sorry Michael,
	I tried to e-mail you before this commit but the mail bounced!

1998-11-21  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* zterm.c: Made window global.

	* zvtterm.c (zvt_term_get_bell): Fixed return if fail to be return
	val if fail.  Personally I can't imagine where you would ever need
	this function.
	(zvt_term_title_changed_raise): Function to actually raise the
	signal, when we get called by the terminal.

	* zvtterm.h: Fix zvt_term_bell prototype.

	* vt.c (vt_bell): Changed to call callback with user_data.
	vt.c: include <string.h> for strchr prototype.

	* zvtterm.c (zvt_term_bell): Changed prototype/callback to supply
	user-data (i.e. the widget pointer).

	* zterm.c (main): Add support for title_changed event callback.
	(title_changed_event): Set titles based on title_changed event.

	* vt.c (vt_init): Init change_my_name and user_data to NULL.
	(vt_set_text): Handle callbacks for setting titles.

	* update.c: Fixed vx->user_data references.

	* vtx.h: Removed user_data from struct _vtx.  Avoid duplication.
	Fixed all references.

	* vt.h: Added change_my_name callback, for title changes.  Added
	user_data field (to be removed from vtx).

	* zvtterm.c (zvt_term_title_changed): Dummy handler for
	title_changed signal.
	
	* zvtterm.h (struct _ZvtTermClass): Added title_changed callback.

	* zvtterm.c (zvt_term_class_init): Added "title_changed" signal.

1998-11-20  Manish Vachharajani <mvachhar@vger.rutgers.edu>

	* zvtterm.h: 
	* zvtterm.c: Added zvt_term_get_bell function
	
1998-11-19  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* zvtterm.c (vt_hightlight_block): Removed.  Function not used
	anymore.

1998-11-18  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* zvtterm.c (zvt_term_selection_received): Only scroll to bottom
	if scroll on keystroke is set, now that it should be safe to do
	so.

	* vt.c (vt_scrollback_add): Properly adjust scrollbackoffset and
	scrollbackold if extra data is added to the scrollback, and
	scrollback is 'active' (scrollbackoffset != 0).

	* update.c (vt_update): Handle edge condition when scanning
	backwards at edge of scrollback/real buffers properly.

	* vt.c (vt_scrollback_add): Force a newly added scrollback line to
	slot into the right sequence if scrollback is active.  This should
	fix scrolling output when viewing scrollback.  Only 3 @#$@ hours
	later.

	* zvtterm.c (zvt_term_bell): Definition of function.
	(zvt_term_init): Set the new ring_my_bell pointer callback.
	(zvt_term_set_bell): New function.  Sets ring_my_bell or clears it
	depending on the requested state.

	* zvtterm.h (zvt_term_bell): New external function to beep in a
	terminal-way.

	* vt.c (vt_bell): Use the new ring_my_bell callback if it is set.
	(vt_init): Set ring_my_bell to NULL on initialisation.

	* vt.h (ring_my_bell): callback function for bell ringers.

1998-11-17  Martin Baulig  <martin@home-of-linux.org>

	* gnome-pty-helper.c, test-utmp.c (update_dgs): Only call this
 	function if USE_SYSV_UTMP is defined.

	[NOTE: This is only some kind of hack since we define this
	function conditionally to USE_SYSV_UTMP in gnome-utmp.c.]

1998-11-16  Walter Mueller <walt@pi4.informatik.uni-mannheim.de>

	* gnome-utmp.c (write_logout_record): Changes for Solaris compilation.

1998-11-15  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* zvtterm.c (zvt_term_selection_received): Always scroll to bottom
	on non-empty paste.  This 'hides' a bug where the screen list can
	get corrupt.  Not sure if its in the parser or the update code.

	* vt.c (vt_dump): Replaced coded constant masks with defined
	values.
	(vt_parse_vt): Likewise.
	(vt_resize): Likewise.
	(vt_tab): Simplified processing.  Dont try and over-write anything
	onscreen, unless its empty.
	(vt_parse_vt): Remove 'handled' loop from interpreter.  It just
	wasn't doing anything useful ...
	(vt_parse_vt): Remove unecessary null-pointer check in state 5
	case.  Also force character to 7 bits when interpreting it.

	* update.c (vt_line_update): Replaced coded constant masks with
	defined values.
	(vt_scroll_update): Likewise.
	(vt_update): Likewise.

	* vt.h: Removed VTATTR_CHANGED flag.  This gives one extra
	attribute bit.
	(VTATTR_MASK): New mask - all attribute bits.
	(VTATTR_DATAMASK): No attribute bits.

1998-11-13  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* subshell.c (sigchld_handler): Only call the previous signal
	handler if it was set.

1998-11-14  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* vt.c (vt_cleareos): Fix ^[J command to clear in the right
	direction.
	(vt_resize): When expanding lines from scrollback, fill remainder
	of line with attributes of last character.

1998-11-11  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* zvtterm.c (zvt_term_set_del_key_swap):
	(zvt_term_key_press): Add support for swapping the sequences
	emited by DEL and Backspace.
	(zvt_term_set_del_key_swap): Actually implement it.

1998-11-10  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* gnome-utmp.c (update_dbs): Add support for UTMPX
	implementations. 
	Use getutid to find an available slot.
	(write_logout_record): New function to write a logout record.

	* vt.c (vt_closepty): Shutdown the pty properly (to register
	logout state). 

	* subshell.c (zvt_shutdown_subshell): Ask the PTY helper to
	write the logout record information.


	* subshell.c (get_ptys):
	* gnome-pty-helper.c: Use STDIN_FILENO to transfer protocol
	information.  Use STDOUT_FILENO to transfer file descriptors, as
	some BSD kernels crash if you use the same socket for transfering
	data and file descriptors (this information comes from Theo de
	Raadt). 
	
	* subshell.c (sigchld_handler): Chain signal handlers.
	Use waitpid with WNOHANG set to check for any of our known
	processes. 

	* gnome-utmp.c (update_dbs): Clear the utmp structure, per Theo de
	Raddt's recomendation.

1998-11-10  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* update.c (vt_scroll_update): Get the scroll fill colour from the
	corresponding new line, not the old line (the 'fill' is free, it
	may as well more likely match what we want - even if it doesn't it
	just slows it down a bit).

	* vt.c (vt_reset): Changed vt_cleareos call to vt_clear_lines.
	(vt_cleareos): Handle screen clear options properly, not just
	'clear to end'.
	(vt_insert_lines): Simplified clear condition - always clear
	(mumble grumble).
	(vt_delete_lines): Always clear line contents.
	(vt_clear_lines): Remove VTATTR_CHANGED from update.
	(vt_delete_chars): Remove VTATTR_CHANGED.
	(vt_insert_chars): Ditto.
	(vt_scroll_up): Ditto.
	(vt_scroll_down): Ditto.
	(vt_clear_line_portion): Ditto.
	(vt_tab): Ditto.
	(vt_parse_vt): Ditto.
	(vt_newline): Ditto.

1998-11-10  Michael Zucchi  <zucchi@zedzone.mmc.com.au>

	* vt.c (vt_down): Out by one on bounds checking against the bottom
	of the screen.

1998-11-10  Michael Zucchi  <zucchi@zedzone.mmc.com.au>

	* vtx.h (vt_scroll_area): Fix prototype for new 'fill' parameter.

	* update.c (vt_scroll_update): Calculate the scroll expose colour
	from the previous background colour on that line (or start of),
	and pass that to vt_scroll_area.  Make sure the line is 'cleared'
	with the same colour.  And by jove, we have it!

	* zvtterm.c (vt_scroll_area): Take a new option 'fill' - specifies
	the background colour to fill in the scrolled area.

1998-11-09  Jay Cox  <jaycox@earthlink.net>

	* zterm.c: replaced rindex with strrchr for portability.

1998-11-09  Martin Baulig  <baulig@merkur.uni-trier.de>

	* subshell.c, gnome-pty-helper.c: Include <sys/un.h> if we have it.
	(CMSG_DATA): Define this if if is not already defined.

1998-11-09  Martin Baulig  <martin@home-of-linux.org>

	* gnome-pty-helper.c (struct pty_info): Added `line' field.
	(shutdown_pty): Added logout code for FreeBSD.
	(open_ptys): Added some code for FreeBSD.

	* zterm.c: Added new `-l' command line parameter to make
	the shell a login shell.

	* gnome-login-support.h: Include <libutil.h> on FreeBSD.

	* gnome-pty.h (GnomePtyOps): Make it explicitly start with 1.

	* gnome-utmp.c (_HAVE_UT_USER, _HAVE_UT_TIME): Use this #ifdefs.
	(WTMP_FILENAME): Define if not already defined.
	(HAVE_LOGIN): If we have the login () function, call it - otherwise
	use the pututline () ... code.

1998-11-09  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* gnome-login-support.h: Include pty.h only if it exists, or
	util.h if that exists (for OpenBSD).

	* zvtterm.c: More slight doco updates/spelling fixes.

1998-11-07  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* vt.c: Mods to the doco - bit more meat and better spelling :)

1998-11-06  Raja R Harinath  <harinath@cs.umn.edu>

	* subshell.c (receive_fd) [!HAVE_SENDMSG]: Fix typos.
	* gnome-pty-helper.c (init_msg_pass) [!HAVE_SENDMSG]: New empty
	function. 
	* gnome-login-support.c (pty_open_master): Declare `slave_name'.
	Pass `used_bsd' to pty_open_master_bsd.
	* gnome-utmp.c (paths.h): Protect inclusion with HAVE_PATHS_H.
	(UTMP_FILENAME): Ensure that it is defined.
	From "Brandon S. Allbery" <allbery@ece.cmu.edu>.
	
1998-11-02  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* zvtterm.c, vt.c: Added documentation to the API entyr points in
	zvt and vt.

	* gnome-pty-helper.c: New suid program that takes care of pty
	allocation, permission setting and utmp/wtmp record updating. 

	* gnome-login-support.c: Utility functions to portably open pseudo
	terminals.  The code in this module is used by gnome-pty-helper.

	* Makefile.am (libzvt_la_SOURCES): Do not install subshell.h this
	is an internal header file.
	
	Add helper program.  Makie gnome-pty-helper program setuid root.
	
	* subshell.c (zvt_resize_subshell), vt.c: Cleaned up the name
	space. 
	
Tue Oct 27 14:19:15 1998  George Lebl  <jirka@5z.com>

	(this is a detailed changelog even for the last commit)
	* zvtterm.h: added transparent,shaded,pixmap_filename and background
	  pixmaps and zvt_term_set_background

	* zvtterm.c: added get_desktop_window for getting the current desktop
	  window, get_pixmap_prop, for getting an arbitrary pixmap property
	  on a window load_pixmap_back to load a pixmap, create_shaded_pixmap,
	  to make a shaded background pixmap, draw_back_pixmap for drawing
	  the background, which is done in draw and expose, and sometimes in
	  vt_draw_text. the call to set background stuff is
	  zvt_term_background. scrolling is done by calling a redraw even for
	  the entire widget

Tue Oct 27 01:07:21 1998  George Lebl  <jirka@5z.com>

	* zvtterm.[ch]: transparency hacks, it's not 100% clean and probably
	  doesn't work well with enlightenment desktops. it isn't much code
	  but if you really really don't want it (it doesn't affect the
	  normal operation at all) you can change a define in zvtterm.h,
	  it still  needs a lot of cleanup and I hope that committing it will
	  get people to make it work with their windowmanagers (hint hint
	  raster)
	
	* zvtterm.c,update.c: add headers to avoid warnings

1998-10-24  Martin Baulig  <martin@home-of-linux.org>

	* update.c: Only #include <alloca.h> if we `HAVE_ALLOCA_H'.

1998-10-22  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* update.c (vt_update_rect): Was going to the wrong next node when
	starting the screen list.
	(vt_update_rect): Bounds-check csy - cey to height.
	(vt_line_update): Removed assertion about runbuffer (alloca
	doesn't return null).
	(vt_line_update): Add node->next==NULL assertion to check for
	end-of-list.
	
1998-10-21  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* zterm.c (main): Set window hints/minimum size.  Now the terminal
	can be resized smaller!  (should this be done to gnome-terminal?)

	* vt.c (vt_resize): Make sure widened lines are cleared with a
	blank character.

	* lists.c (vt_list_remtail): This would never have worked.  Just
	lucky I never used it!  Changed tail to tailpred.
	(vt_list_addhead): This would never have worked either.  Changed
	tailpred to head *sigh*.

	* vt.c (vt_scrollback_add): Changed to static.
	(vt_dump): Changed to static.

	* memory.h (vt_mem_unget): Add vt_mem_unget() prototype.

	* memory.c: Include "memory.h" for prototypes.

	* vt.c (vt_resize): Recover old scrollback lines if they exist,
	and the view is getting bigger.

	* memory.c (MEM_BLOCK_ALIGN): New constant - defines alignment of
	allocations.  Pointers need to align to this.

1998-10-20  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* update.c: Include (missing) alloca.h.
	(vt_line_update): Handle line size changes (i.e. if rendering
	scrollback from before a resize).  Removed the g_return_if_fail
	for line size mismatch.

1998-10-19  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* update.c (vt_line_update): Toggle, not OR reverse bit, for
	rendering selected areas.
	(vt_line_update): Typo in bitmask was stripping most attributes
	from each character (7fff000->7fff0000).

Sun Oct 18 19:03:47 1998  Owen Taylor  <otaylor@gtk.org>

	* zvtterm.c: Changes to match the new GTK+ selection
	handling API.

1998-10-18  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* update.c (vt_fix_selection): When selecting by character, use
	the same start-of-selection criteria as used with selection-by
	word (stops the last character on a line from always being
	selected).
	(vt_scroll_update): Removed some bulky comments.

	* vtx.h: Removed vt_draw_text_select prototype.

	* update.c (vt_fix_selection): When selecting by word or
	character, force the initial selection to contain at least 1
	character.
	(vt_line_update): Removed warnings: Removed noclear, unused variable.
	(vt_scroll_update): Changed to static.
	(vt_update): Typecast list references to struct vt_line *'s.
	(vt_update): Removed un-used 'count'.
	(vt_in_wordclass): Changed to static.
	(vt_expand_line): Changed to static.
	(vt_draw_selection_part): Changed to static.
	(vt_draw_text_select): Force re-render of selected block's
	background, when rendering the selection.
	(vt_line_update): Integrated 'selection' rendering into here.  Now
	the code can properly determine exactly the screen rendering
	attributes before they are rendered.
	(vt_draw_text_select): Removed.  Functionality integrated into the
	vt_line_update routine.

	* zvtterm.c (zvt_term_button_press): Ignore button presses when
	CTRL is activated.  This interferes with the pop-up menu in
	gnome-terminal (semantically it makes no sense to support
	selection with any qualifiers anyway).
	(zvt_term_button_release): Likewise for button up.

	* TODO: Cleaned out some done todo's.

	* zvtterm.c (vt_draw_text): Doh!  Forgot to remove some debug.

1998-10-15  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* zvtterm.c (zvt_term_scroll): Some code here broke the new update
	stuff. scrollbackold should *never* be set outside of the update
	routine.
	(zvt_term_selection_clear): Modularised what had been, removed the
	fixme (calls vtx_unrender_selection()).
	(vtx_unrender_selection): Killed FIXME.
	(zvt_term_draw): Always force re-draw (through 'in_expose').
	(vt_draw_text): Change the sense of the dont-draw-background
	condition.  Always redraw background for expose events (will slow
	down refresh though - FIXME: the screen representation needs to be
	cleared to match the window, even for refresh).

1998-10-14  Michael Zucchi  <zucchi@zzedzone.fsi.com.au>

	* update.c (vt_line_update): Fix back_match determination.  Only
	match on all attributes for any blank rendering characters.  When
	this is the case the area behind text will not be cleared (often
	twice-cleared otherwise).

	* zvtterm.c (vt_draw_text): Hopefully properly fixed the 'dont
	clear the background if we've already cleared the background
	optimisation' bugs.

	* update.c (vt_scroll_update): Removed 'fn' - first node of update
	scroll area.  No longer reliable or useful - due to scrollback
	changes.
	(vt_update): Integrated scrollback update within the same main
	loop(s).  Now scrollback should have the same performance as
	normal scrolling.  Has a (messier) problem with using scrollback
	and screen update, which should be addressed with the scrollback
	counter/bar elsewhere.

	* vt.c (vt_tab): Change tab behaviour somewhat.  Dont overwrite
	attributes of existing characters.  Dont blank beyond the first
	space encountered [also, dont affect attributes].  Cleaned up code
	a little bit.

	* update.c (vt_update_rect): Make this take into account
	vx->vt.scrollbackoffset when rendering the rectangle.
	(vt_draw_cursor): Make sure the cursor is turned off when
	scrolling (using scrollbackold rather than scrollbackoffset).

	* zvtterm.c (zvt_term_scrollbar_moved): Only update 'scrollback'
	mode, rather then refresh.

1998-09-24  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* zvtterm.c (zvt_term_feed): New routine.  Used to feed
	information to a zvtterm from the application.

	* zvtterm.h: Changed the timeout it to be integer.

1998-09-14  Raja R Harinath  <harinath@cs.umn.edu>

	* subshell.c (close_msgfd): Change prototype to agree with
	declaration (use `pid_t', not int).

1998-20-14  Erik Troan  <ewt@redhat.com>

	* zvtterm.c, zvtterm.h: added optional automatic scrolling
	on keystrokes and/or output

1998-40-08  Erik Troan  <ewt@redhat.com>

	* subshell.c (pty_open_slave, pty_open_master): Set close-on-exec
	flag for slave and master file descriptors
	* handle SIGCHLD for proper termination detection

1998-09-04    <nicholas@cefiro.cs.nthu.edu.tw>

	* vt.c (vt_goto): reset vt->cursorx or vt->cursory to zero
	when it is negative number

1998-08-31  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* zvtterm.c (zvt_term_scroll): Clear any pending cached
	information about scrollback when the user has triggered a
	scroll view change.

1998-26-31  Erik Troan  <ewt@redhat.com>

	* vt.c (process_vt): accept : as a parameter seperator,
	not just ; (xterm does, linux console doesn't; we're
	supposed to be TERM=xterm, right?)
	* vt.c (vt_clear_lineportion): made ^[[K handle parameters 
	properly (only ^[[0K was supported)
	* vt.c (vt_delete_lines): cells containing spaces were
	never updated; if the attribute is being changed they
	need updating, however

1998-08-28  Erik Troan  <ewt@redhat.com> 

	* vt.c (process_vt): wrapped some debugging printf()
	statements with d()
	* vt.c (process_vt): don't let ^]*X (w/ X >= 0x80)
	segv the box
	* vt.h: made the parameter stuff unsigned chars

1998-08-26  Erik Troan  <ewt@redhat.com>

	* zvtterm.c (vt_draw_text): attempted vx->back_match 
	optimization was incorrect, and to ghost selections

1998-07-25  Jonathan Blandford  <jrb@redhat.com>

	* zvtterm.c (zvt_term_realize): Changed GdkIM*Nothing to
	GDK_IM_*_NOTHING to reflect the changes in gdk.
	
1998-07-19  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* zvtterm.c (zvt_term_init): Initialise in_expose variable at
	startup.

	* update.c (vt_draw_cursor): Force back_match==0 when drawing
	cursor - forces screen update.

	* zvtterm.c (vt_draw_text): Dont clear the background, if the
	screen already has the right colour [cleared], or we're in expose
	events.
	(zvt_term_expose): Set in_expose around expose events.  Optimises
	text drawing.

	* update.c (vt_line_update): Cleaned up logic a little.  Also, now
	scans back buffer to find out if it is already clear, set
	vx->back_match if it is.

1998-07-05  Nuno Ferreira  <nmrf@rnl.ist.utl.pt>

	* zvtterm.c (zvt_term_scroll): Check bounds when scrolling. You
	could Shift-PageDown while already on the last line and then would
	require 2 Shift-PageUp to start scrolling up again.

1998-06-15  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* update.c (vt_line_update): Was usually drawing 1 more character
	than necessary.
	(vt_draw_cursor): Map NUL or TAB to ' ' when drawing the cursor.

	* zvtterm.c (zvt_term_key_press): Insert \033 before backspace for
	meta-bs.
	(zvt_term_key_press): Same for delete.  Should probably be a
	cleaner/more generic way to do this.

	* vt.c (vt_gx_set): New function, sets the current font remappings
	for G0 to G3 font.
	(vt_init): Initialise vt->Gx, and vt->G[x]
	(vt_init): Initialise vt_remap_dec[]
	(vt_alt_start): Removed old redundant code.  Now sets G[1] charset
	as current.
	(vt_alt_end): Changed to reset to G[0] charset.
	(vt_reset): Reset Gx and G[x]

Sun Jun 14 14:07:34 1998  Tom Tromey  <tromey@cygnus.com>

	* Makefile.am (INCLUDES): Look in intl build directory.  Don't
	unconditionally look in support directory (configure will
	determine whether this is needed).

Sat Jun 13 21:08:50 1998  Tom Tromey  <tromey@cygnus.com>

	Fixed all -Wall warnings:
	* zterm.c: Include <stdlib.h> for atoi().
	* zvtterm.c: Include <string.h> for memset().

1998-06-10  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* zvtterm.c (zvt_term_set_color_scheme): Changed background to
	colour index 17 - colour index 18 doesn't exist!
	(zvt_term_readdata): Removed the 'read failed' message.

	* vt.c (vt_set_screen): Clear alternate screen on a switch.

	* update.c (vt_draw_selection_part): Check the line is on-screen
	before trying to re-render it.  Fixes a nasty segfault.
	(vt_line_update): Added some sanity checks to ensure segfaults are
	banished.

1998-06-07  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* zvtterm.c (zvt_term_key_press): Added debug macro around the key
	press printf.
	(zvt_term_key_press): Changed the ctrl-space handling code, so the
	default case doesn't grow into another switch statement to handle
	all possible cases [which is what the existing switch is for].

	* vt.c (vt_delete_line): For reverse scroll, compare to
	vt->scrolltop, and not 0 - fixes reverse scroll in pine.

1998-06-01  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* zvtterm.c (zvt_term_key_press): Handle control-space.

Mon Jun  1 19:44:25 CEST 1998  Eckehard Berns  <eb@berns.prima.de>

	* zvtterm.c: added input context to support deadkeys.

Mon Jun  1 17:34:41 CEST 1998  Eckehard Berns  <eb@berns.prima.de>

	* zvtterm.c (zvt_term_key_press): added GDK_Mode_switch and
	GDK_Multi_key to the switch statement to avoid [ff..] when pressing
	AltGr or Multikey

1998-05-25  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* update.c (vt_get_attr_at): New function, returns the
	attribute/char pair at a given column/row.

1998-05-23  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* vt.c (parse_vt): Looks up process() function at start of loop,
	enabling the rest of the routine to be 8 bit clean.

1998-05-21  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* zvtterm.c (zvt_term_draw): Implement a draw handler.

1998-05-12  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* zvtterm.c (zvt_term_selection_clear): Added call to
	gtk_selection_clear() to let gtk know the selection has been
	cleared.
	(zvt_term_button_release): Changed to use event->time rather than
	GDK_CURRENT_TIME in selection owner set.

1998-05-10  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* zvtterm.c (zvt_term_set_font_name): Removed "loading xxx font"
	message.  Probably needs some fallback if it can't load a font
	... better than the one it has.
	(vt_draw_text): Only set 'bright' colours, if a bold equivalent exists.

	* update.c (vt_draw_cursor): only draw/undraw cursor if not
	scrolled back at all.

	* zvtterm.c (zvt_term_button_release): Added GDK_SHIFT_MASK check
	before reporting mouse up events.

	* update.c (vt_draw_selection_part): Changed to use rendered
	selection, rather than inverting the rectangle.  May be slower for
	detailed screens.  Some of the arguments are now not used.

	* vtx.h: Added vt_draw_cursor() prototype.

	* zvtterm.c (vt_draw_text): Expanded to use 5 bit colour
	selection.  Put back in old default-colour handling code - needed
	for new cursor rendering algorithm.  Now swaps the referenced gc's
	rather than the gc's referenced colour,	when inverse mode set.
	Should fix some rendering glitches.

	* vt.c (vt_mode): removed VTATTR_FORE/BACK_SET bit settings, as
	these bits no longer exist.

	* vt.h : redordered VTATTR_* bits.  Modified fore/background
	colour to have 5 bits.

	* zvtterm.c (vt_cursor_state): Calls vt_draw_cursor() to render
	the cursor.

	* update.c (vt_get_selection): Fixed bug where it added the first
	line of a selection twice to the selection buffer.
	(vt_draw_text_select): Fixed update bug when refreshing could
	corrupt first and last line of a selection.
	(vt_draw_cursor): New function.  Draws the cursor onto the
	display.  Draws the cursor using vt_draw_text() and not an
	inverted box.

	* zvtterm.c: Fixed up calls to vt_draw_selection(), to call
	vt_fix_selection() where appropriate.

	* update.c (vt_draw_selection): Removed call to
	vt_fix_selection().  Now must be performed explicitly by caller.

1998-05-09  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* update.c (vt_update): Changed behaviour slightly for scroll-wrap
	lines.  Always update them.

	* vt.c (vt_delete_chars): Fixed out-by-1 error in scrolling the
	deleted charcters into place.

1998-05-08  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* zvtterm.c (zvt_term_set_color_scheme): Set the GdkWindow color
	to the default background of the terminal.  This avoids the
	flashing gray when switching desktops. 

1998-05-06  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* zvtterm.c (vt_draw_text): Use the default background/foreground
	unless an attribute has been specified.

	default_red, grn, blu: The colors 16 and 17 are default foreground
	and default background. 

Wed May  6 13:15:16 1998  Tom Tromey  <tromey@cygnus.com>

	* subshell.c: Include <config.h>.  Conditionally include
	<sys/select.h>.

1998-05-04  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* subshell.c (pty_open_master): Removed warnings.

	* vt.c (vt_model): Added case 47 - alternate screen off.
	(vt_modeh): Added case 47 - alternate screen on.
	(vt_set_screen): New function.  Sets the current screen.
	(vt_resize): Added code to handle resize of alternate screen too.
	(vt_scroll_up): Only add to scrollback if we are on the primary
	screen.
	(vt_reset): Resets screen to primary.
	(vt_destroy): Added cleanup for alternate screen and image buffer.

	* vt.h (VTMODE_ALTSCREEN): New definition.  Covers alternate
	screen switching.

1998-05-03  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* zterm.c (main): Allow window to be shrinked when the font
	changes. 

	* zvtterm.c (zvt_term_key_press): Add support for checking the
	scrollback contents with shift-pgup, shift-pgdn in zvtterm.

1998-05-03  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* vt.c (vt_resize): Now calls resize_subshell() instead of calling
	the ioctl directly.

	* subshell.h: New file.  Defines functions in subshell.c.

	* subshell.c: New file.  Includes init_subshell() and
	resize_subshell() commands.  Taken from 'mc' source tree.

	* vt.c (vt_forkpty): Changed to use init_subshell() call from
	subshell.c.  No longer needs forkpty() function!

1998-05-02  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* vt.c (vt_swap_buffers): Removed.  Not needed in the end.
	* update.c (vt_scroll_update): Cleaned up some dead code.
	(vt_scroll_update): Added code to perform scrolling of on-screen
	image buffer.
	(vt_line_update): Modified to use screen image buffer to optimise
	updates.  Seems to work very well!

1998-05-01  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* zvtterm.c (zvt_term_set_color_scheme): Add support for changing
	the color set in the terminal.
	(zvt_term_key_press): Add support for handling meta-key, for us,
	emacs users :-).

Thu Apr 30 23:19:07 1998  Tom Tromey  <tromey@cygnus.com>

	* forkpty.c (openpty): Removed buffer, buflen, and grbuffer
	variables.  Correctly call getgrnam.

1998-04-30  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* zvtterm.h: Use unsigned ints for the flags.

	* zvtterm.c (vt_cursor_state): Test for drawability.

1998-04-30  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* zvtterm.c (zvt_term_realize): Put GDK_POINTER_MOTION_MASK back
	in, because we *ARE* interested in the events even when the button
	isn't pressed.  Otherwise the mouse doesn't un-blank :)

1998-04-29  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* zvtterm.c (zvt_term_realize): Removed the
	GDK_POINTER_MOTION_HINT_MASK, as this was preventing the motion
	from being reported back to the application;  Removed the
	GDK_POINTER_MOTION_MASK, as we are only interested in the events
	when the button is held pressed.
	
	(zvt_term_button_press): If shift key is pressed, then do not try
	to report the button operations to the application (standars
	behaviour :-)

	(zvt_term_readdata): signal_emission might have killed this
	process, do not call zvt_term_fix_scrollbar (ie, do a return on
	the if-part for the dead process).

1998-04-28  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* vt.c (vt_newline): Initialize the whole array, as it can be
	accessed past the screen size when the whole line is selected. 

	* zvtterm.c (zvt_term_readdata): Always show the cursor if
	blinking has been disabled.
	
1998-04-30  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* zvtterm.c (vt_draw_text): Bold now renders 'bright' colours.
	This is really only necessary (?) to emulate the use of the linux
	console colours.
	(vt_scroll_area): Does not clear the scrolled area exited space
	anymore.  Doesn't seem to be needed and cleans up scrolling.

	* vt.c (vt_swap_buffers): New function.  Not used yet.  Working on
	some very experimental update optimisation code.  Maybe it will
	speed things up a little <maybe>.

	* update.c (vt_update_rect): Added range check for cex/csx.  Could
	be 1 character too large from expose event.

	* zvtterm.c (zvt_term_readdata): *ALWAYS* turn the cursor back on
	after an update.  This must have got lost somewhere and was the
	cause of the "blinking cursor usually off" bug that's been giving
	me the shits :)  Ahhhh, thats much better.
	(vt_draw_text): Removed the need for the "VTATTR_FORE/BACK_SET"
	flag.  All it needed was a changed VTATTR_CLEAR define :)
	Check it works properly though Miguel?

	* vt.c: Removed some unecessary prototypes/comments.
		Oh dear, its tommorow already :(

1998-04-29  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* vt.c (vt_scrollback_set): Changed back to the way it was and
	also fixed the boundary condition.  It is safe to call vt_mem_push
	with a null location.

1998-04-28  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* vt.c (vt_scrollback_set): ln might be null after calling
	vt_list_remhead, only execute vt_mem_push if ln is not null.
	Michael, I do not know if this is the correct fix, could you check this?

	* zvtterm.c (zvt_term_forkpty): set term->input_id to the file
	descriptor of the chid.

1998-04-28  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* zterm.c (child_died_event): New function, exits.  This is the
	signal handler for the "child_died" event.

	* zvtterm.c (zvt_term_destroy): Added call to zvt_term_closepty
	and vtx_destroy, to clean up emulator resources.  Not sure if its
	working right though.
	(zvt_term_init): Removed some redundant code.
	(zvt_term_child_died): Default signal handler for child death.
	Does nothing.
	(zvt_term_readdata): Emits "child_died" signal when read fails.
	(zvt_term_class_init): Added "child_died" signal creation to
	class.

	* vt.c (vt_init): Sets the line number on initialisation of
	lines.  Maybe cleaner rendering on startup?

	* zvtterm.c (zvt_term_destroy): Added call to vtx_destory.

	* vt.c (vt_destory): New function.  Cleans up memory associated
	with vt run-time.  Scrollback and lines.  Closes child file
	descriptor.

	* update.c (vtx_destroy): New function.  Cleans up the vtx
	structure and free's it.

	* zvtterm.c (zvt_term_killchild): New function.  Calls
	vt_killchild().
	(zvt_term_forkpty): Checks validity of arguments.  Also doesn't
	allow a 'forked terminal' to fork again.
	(zvt_term_closepty): New function.  Close the child's process
	master terminal, and removes the gdk input handler.  Logical
	inverse of zvt_term_forkpty()

	* vt.h (vt_closepty): Added api functions killchild/closepty.
	Perhaps it should also SIGHUP the child?

	* vt.c (vt_killchild): New function.  Sorry about the name.
	Equivalent of 'kill(2)'.
	(vt_closepty): Inverse of forkpty().  Just closes the master pty.

	* zvtterm.h: Added fore_last and back_last to keep track of the
	last foreground/background colour used in the fore/back_gc's.

	* update.c (vt_update): Added initialisation of fn and firstline
	so that gcc won't complain about logic it couldn't follow.

	* zvtterm.c (vt_scroll_area): Clears the scrolled area using the
	term->back_gc, which cleans up scrolling.
	(vt_term_realize): Initialises fore_last/back_last.
	(vt_draw_text): Removed static variables last_fore, last_back to
	term->fore_last, term->back_last.

1998-04-27  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* vt.h (VTATTR_BACK_SET): Added two new attribute flags to
	indicate if explicit foreground or background have been set. 

	* zvtterm.c (zvt_term_class_init): New overwritten method:
	unrealize
	(zvt_term_unrealize): Relese resources allocated on the realize
	method. 
	(zvt_term_realize): Allocate a color context for the foreground
	and one for the backgroudn;  Allocate colors with the gdk color
	context code.  
	(vt_draw_text): Add color support. 

	* vt.c (vt_mode): fix, process any number of arguments to the mode
	escape sequence.

	* zvtterm.c (zvt_term_key_press): Backspace sends ^H; Delete sends
	\177, and KP_Delete sends \033[3~.

1998-04-27  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* zvtterm.c (vt_scroll_area): Generates and processes graphics_expose
		events when scrolling from off-window areas.

	* update.c (vt_update_rect): Modified to keep old state of cursor
		on exit.
		(vt_update): Modified to keep old state of cursor on exit.

	* zvtterm.c (vt_cursor_state): Modified to return the previous
		state of the cursor.

1998-04-26  Michael Zucchi  <zucchi@zzedzone.box.net.au>

	* memory.c: renamed mem_* functions to vt_mem_* functions.

	* update.c (vt_get_selection): Added a sanity check to
		ensure the selection lines exist.

	* zterm.c (main): Added scrollbar.
		Added -s <number> scrollback size option.
		Added call to zvt_term_set_font_name().

	* vt.c (vt_delete_char): Fixed typo in if test.
	(vt.c): Removed globals inadvertantly left in the code.
		Renamed mem_* functions to vt_mem_* functions.
	(vt_scrollback_set): New function.
	(parse_vt): Now reads \E] command - set text options, although
		does not process it.
		Multiple arguments were being passed to \EM command
		- reverse scroll, wrongly.
	(vt_modeh/l): Detects/removes application cursor key mode.
	
	* zvtterm.c (zvt_term_fix_scrollbar): Added new function.
		Signals adjustemnt when a change occurs.
	(zvt_term_size_allocate): Added call to zvt_term_fix_scrollbar.
	(zvt_term_readdata): Added call to zvt_term_fix_scrollbar.
	(zvt_term_init): Fixed signal connect to point to the term widget.
	(zvt_term_scrollbar_moved): Implemented adjustment change callback.
	(zvt_term_selection_handler): Changed to void.  Fixed g_return() macros.
	(zvt_term_size_request): Added input validation.
	(vt_draw_text): Added input validation.
	(vt_scroll_area): Added input validation.
	(zvt_term_init): Added cast to gtk_adjustment_new().
	(zvt_term_set_scrollback): New function.  Calls vt_scrollback_set
		and fixes the scrollbar too.
	(zvt_term_set_fonts): New function.  Sets fonts.
	(zvt_term_set_font_name): New function, sets fonts by name.
	(vt_draw_text): Added underline rendering support.

