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.


