2002-03-30  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* xmj.man: Add KongHas3Types.

	* scoring.c, player.c, gui.c, player.h:
	Used annexed instead of melded, since melded is inaccurate.

	* gui.c: Handle Millington kongs

	* scoring.c: Handle GOKongHas3Types

	* game.c: Add GOKongHas3Types.

	* player.h: Add melded flag to Tileset for Millington kongs.

	* player.c: Handle three types of kong. Note that the three types are
	distinguished, and the printed forms distinguished (by printing
	TT-TT-TT-TT for a melded kong and TT-TT-TT+TT for a claimed kong)
	always, regardless of options or protocol versions, since to do
	anything else would involve importing external info into the module.
	This is thus not strictly backward compatible; but it happens to be
	backward compatible by implementation, since the previous tileset
	parser only looks at the first separator to distinguish open and
	closed kongs.

	* protocol.h: Add GOKongHas3Types; proto version 1034

2002-02-04  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* ChangeLog, CHANGES: 1.3.2

	* gui-dial.c, gui.c:
	Fix for infelicity in spinbuttons: they do not change the internal
	value when numbers are typed until return is hit, so call update
	explicitly before getting value.

2002-01-08  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* ChangeLog: really 1.3.1

	* gui.c: Remove ugly hack that Nicolas justly rejects.

	* ChangeLog, CHANGES: 1.3.1

	* gui.c: code for animation both with internal widgets and with popups.
	Default to popups for Windows, where it seems to smooth animation.

2002-01-07  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c:
	don't uniconify auxilary windows that have been closed while the main
	window was iconified.

	* Makefile.in:
	remove a mysterious 0240(nbsp) character that got in at some point.

	* gui.c: (a) sort out bugs in the new tiletip implementation.
	(b) fix bug in option reading (IconifyDialogs).

2002-01-06  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* FILES-src: oops -- add vlazyfixed

	* xmj.man: tiletips shown for selected tile when "always".

	* gui.c:
	(a) Make tiletips of mouse and selected tile interact correctly.
	(b) Don't install toggle callback on non-toggles!

	* gui.c: fix bug in get_relative_posn.

	* gui.c: Changed tiletips into children of boarfixed.
	Unfortunately, this has exposed a bug in get_relative_posn, sigh.

	* gui.c:
	If tiletips always shown, show the tiletip of the selected tile.

	* gui.c: Remove the top_window visibility tracking. No longer needed,
	since now there are no more independent popups/animations to suppress.

	* gui.c: Make the claim windows descendants of the main window as well.
	(The positioning is no longer quite perfect, since I'm not bothering
	to reposition them for Mah Jong!, but just doing it once on Pung!.
	Never mind.)

2002-01-05  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* Makefile.in, gui.h, gui.c:
	Introduced the vlazy_fixed widget, and used it to finally fix up
	animation so that the floating animations are part of the display
	window instead of being independent.

	* vlazyfixed.c, vlazyfixed.h: *** empty log message ***

	* MANIFEST:
	Introduced the vlazy_fixed widget, and used it to finally fix up
	animation so that the floating animations are part of the display
	window instead of being independent.

2002-01-02  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* ChangeLog: Really 1.3

	* protocol.h: game opt optnat field should be unsigned

	* greedy.c: suppress a warning on really picky compilers

	* sysdep.h: define socklen_t for windows

	* sysdep.c: hpup fix and warning suppression

	* CHANGES: 1.3 (hopefully...)

	* ChangeLog: 1.3, I  hope.

2001-12-29  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* README: add PATH reminder

	* MANIFEST: credit for arabic tiles

2001-12-28  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* sysdep.h: try to remove warning in hpux

	* xmj.man: note that left/right accelerators don't work under Windows.

	* gui.c: vis_callback only works under X.

2001-12-27  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* Makefile.in: Add some example LDLIBS settings.

	* gui-dial.c, player.c, controller.c, gui.c:
	Make sure all functions pre-declared as static are then
	declared as static, to suppress warnings on HP compiler.

2001-12-26  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* make-release:
	Add -Wl,--noinhibit-exec to link options for static xmj.
	This is because in order to get arrow key accelerators we are
	redefining a symbol in libgtk.a, and normally ld will consider that an
	error.

	* MANIFEST: Add tiles-numbered

	* ChangeLog, CHANGES: 1.3pre1

	* gui-dial.c: close button takes focus in scoring window

	* gui.c, gui-dial.c, xmj.man:
	IconifyDialogs not supported under Windows.

	* gui.c: eliminate warnings

2001-12-24  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c: Don't try the X-specific (un)iconify stuff.

	* sysdep.c: start_background_program_with_io for Windows.

	* sysdep.h: comment update

2001-12-23  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c, gui.h, gui-dial.c:
	fix dialog_popup: wasn't handling CentredOnce etc. correctly!
	Also, open_dialog wasn't being closed with saving_posn.

	* gui-dial.c, gui.c, gui.h, xmj.man:
	Implement the IconifyDialogs display option.

	* gui.c: avoid animating or popping up claim windows if the top window
	is unmapped or obscured. (Unfortunately, this still doesn't
	seem to cover the case of the window being offscreen, but I'm
	not sure I can be bothered to do anything about that.)

	* gui-dial.c: fix accelerator key for save as...

2001-12-17  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* Makefile.in: make version.h no longer depend on version.h.in .

	* make-release: remove version.h before making it.

2001-12-16  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c: suppress warning

	* scoring.c: remove a warning

	* controller.c, gui-dial.c: remove multi-line string literals

2001-12-09  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* README: add tiles-numbered

	* FILES-binary, FILES-src: Add tiles-numbered

2001-12-07  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c: wall tiles should not take focus.

	* xmj.man: document menu accelerators

	* gui-dial.c:
	Add accelerators to menu, and have start button take focus
	in menus.

	* sysdep.c: Add the start_background_program_with_io function.
	However, the Windows version is entirely unchecked, and
	may not even compile. Check it at the office.

	* sysdep.h: Add start_background_program_with_io

	* gui.c: Use the new server output feature to detect when it's started,
	and reduce the sleep times to speed up game starting.

	* controller.c: change output to OK: address or FAILED: reason

2001-12-06  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* controller.c:
	print the successful socket (as a valid --address argument)
	on stdout as Socket: socket. If fail, print Socket: -1.

	* gui.h: Add a game extras struct

	* gui.c: Change dead wall positioning so that it's always determined by
	the original start of the dead wall.

	* xmj.man:
	document keyboard accelerators and change of Done to Finished
	in scoring dialogue.

	* gui-dial.c: add keyboard accels to scoring dialog;
	change "done" to "finished".

2001-12-05  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui-dial.c: Add accelerators to chow dialog

	* gui.c: fix behaviour of arrow keys when no tile selected

2001-12-04  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui-dial.c: add accelerators to ds dialog

	* gui-dial.c: add accelerators to turn dialog

	* gui-dial.c: Add accelerators for the discard dialog.

	* gui.c: move include gdkkeysyms to gui.h

	* gui.h: include gdkkeysyms

	* gui.c:
	Implemented, with extreme difficulty owing to GTK's arrogant ideas
	about what you're allowed to do, left/right arrow keys for tile
	selection changing. We're now dependend on gtk sources... yech.

2001-12-03  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* scoring.c, xmj.man:
	Add ConcealedFully, ConcealedAlmost and LosersPurity game options and
	implement their scoring.
	Change All Honours and All Terminals to get All Majors also.

	* game.c:
	Add ConcealedFully, ConcealedAlmost and LosersPurity game options.

	* protocol.h:
	Add ConcealedFully, ConcealedAlmost and LosersPurity game options.
	Increase protocol version to 1032.

2001-12-02  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* sysdep.h: Add sys/time.h back again, for gettimeofday.

	* gui.h, gui-dial.c, gui.c, xmj.man, greedy.c:
	Add --name for mj-player (which was supposed to be there all along),
	add entries for it in the new game panel, and add display options
	to give defaults for it.

2001-11-07  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* sysdep.h: use time.h instead of sys/time.h

2001-09-06  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* ChangeLog, CHANGES: 1.2.3

	* gui.c: Aaargh! Was clearing discard_history in the wrong place! So it
	wasn't getting cleared at all.


2001-09-04  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* ChangeLog:
	This really is release 1.2.2, unless something else goes wrong.

	* gui.c: Copy pref_showwall from --[no-]show-wall option.

	* xmj.man: Show-wall display option now has immediate effect.

	* CHANGES: 1.2.2 really: includes display option changing.

	* gui.c: when recreating topwindow, put it where it was.

	* gui.c: handle discard placement when recreating display.

	* gui.c: display rebuilding now handles wall.

	* gui.c: display recreation handles players and dialogs.
	Now for wall and discard...

	* ChangeLog: includes changes not in 1.2.2

	* ChangeLog: for 1.2.2

	* CHANGES: new date for 1.2.2; maybe finally got it right.

	* sysdep.h: include unistd.h in windows as well.

	* gui.h, gui-dial.c, gui.c:
	Checkpoint: moved display creation into separate function,
	made destroy function, remake display when options change.
	But still need to handle redisplay of players, discards and
	dialog setup.

	* client.c: client_close should set g->fd to invalid

2001-09-03  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.h, gui-dial.c, gui.c:
	Checkpoint: moved display creation into separate function,
	made destroy function, remake display when options change.
	But still need to handle redisplay of players, discards and
	dialog setup.

	* client.c: client_close should set g->fd to invalid

	* Makefile.in: Use NULL for tileset path, for Windoze.

2001-09-02  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* Makefile.in: remove quotes wrong for Windows

	* ChangeLog, CHANGES: 1.2.2

	* gui.h, gui-dial.c, gui.c, xmj.man:
	Add Tileset and Tileset Path display options to gui.

	* Makefile.in: Change for TILESET(PATH)

	* xmj.man: Remove --tilepixmapdir, replace by
	--tileset and --tileset-path .

2001-08-21  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* ChangeLog, CHANGES: for 1.2.1

	* README: change donation text.

2001-08-19  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* scoring.c:
	fix bug in filling only place (was counting claimed discard as
	an exposed tile when calculating "all exposed").

	* game.c: the game_draw/peek_tile functions must return error if
	the live_used is >=, not just ==, the live_end, because
	the draw_loose_tile assumes this (with the non-Millington dead wall).

	* controller.h: hike number of history els to 1024

2001-08-15  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c, xmj.man: Remove --tilepixmapdir, replace by
	--tileset and --tileset-path . (NOT IN 1.2.1.)

2001-08-11  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* Makefile.in: make version.h if not there.

2001-08-06  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* version.h.in: *** empty log message ***

	* ChangeLog, CHANGES: For 1.2

	* version.h: File deleted.

	* make-release: put version in version.h

	* version.h: have version subbed in by make-release.

	* controller.c:
	Add the hack for dumping history of hand by second save state request.

2001-08-05  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* proto-encode-msg.pl, gui.c, game.c, controller.c, greedy.c, protocol.c, protocol.h:
	Add CMsgComment (with hacks to give it code #); protocol version to
	1030.

	* xmj.man: Update for new features.

	* gui-dial.c, gui.h, controller.c, gui.c:
	Add --save-on-exit to server and gui panel.

2001-08-01  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* controller.c: remember to initialize the game extras structure.

2001-07-31  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui-dial.c, gui.c, gui.h: Add Resume game... entry to Game menu.

	* controller.c: Add --no-id-required option.

	* controller.c: fix game loading.

	* gui.c, gui.h, gui-dial.c: Add Save as... menu entry to Game menu.

	* controller.c: More intelligent choice of default save file name:
	previous explicit name, failing which:
	file given by --load-game option, failing which:
	game-DATE-SEQ up to seq of 9.

2001-07-30  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.h, gui.c, gui-dial.c: Popup notice when state saved.
	Add save option to connect menu.
	Rename Connect menu to Game.

	* controller.c: Take notice of the filename in SaveState, and return
	a StateSaved message.

2001-07-29  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* greedy.c, controller.c, game.c: Handle CMsgStateSaved.

	* gui.c: Handle (by doing nothing) CMsgStateSaved.

	* protocol.h: Add filename field to PMsgSaveState.
	Add CMsgStateSaved.

	* Makefile.in: add EXTRA_CFLAGS for command line use.

	* controller.c:
	On resumption, feed the history to all reconnecting players at once,
	rather than one after the other.

	* controller.c:
	implemented restoring of game state (via --load-game option),
	though file name is currently ignored.

	* game.c:
	handling CMsgWall: load until MAX_WALL_SIZE or end of message.
	(game.wall.size is actually set at NewHand, not before).

	* game.c: set options from default when handling a Game CMsg,
	rather than clearing them.

	* controller.h, controller.c:
	Adjusted save_state so that it doesn't save completed hands any more.
	Added prehistory to game structure so we _can_ save a completed hand
	if we want to later.

2001-07-28  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* controller.c: implemented game saving again.
	Next: loading it!

	* sysdep.h, sysdep.c: Add fd_put_line and fd_get_line.

	* gui.c, game.c, controller.c, greedy.c: Handle CMsgWallMsg.

	* protocol.h: Add CMsgWallMsg. Inc pversion to 1025 during development.

	* controller.h, controller.c:
	Get rid of player histories, and just keep a single
	game history.

2001-05-17  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* xmj.man: New major version starting at 1.1 release

	* xmj.man: remove mistaken backslashes

	* CHANGES: 1.1 really (slightly more human text)

	* tiles.h, version.h, proto-encode-msg.pl, protocol.c, protocol.h, runtest, scoring.c, scoring.h, stats, sysdep.c, sysdep.h, tiles.c, make-release, makedep, makefallbacktiles, makefile.msvc.old, maketxt, mj-player.man, mj-server.man, player.c, player.h, proto-decode-msg.pl, gui-dial.c, gui.c, gui.h, iconres.rs, lazyfixed.c, lazyfixed.h, logstats, make-enums.pl, controller.h, game.c, game.h, greedy.c, ChangeLog, FILES-binary, FILES-src, LICENCE, MANIFEST, Makefile.in, README, client.c, client.h, controller.c:
	New major version starting at 1.1 release

	* version.h: Version 1.1

	* CHANGES: Change for 1.1

	* ChangeLog: Changes up to 1.1

	* gui.c: Tidy; remove the .xmjrc.new file after using it.

	* sysdep.c: Back out last change (socklen_t not defined in windoze).
	Add unlink() for windoze.

	* sysdep.h:
	Add a defn for unlink() in Windows (provided by mingw anyway, but
	we prob shouldn't assume that).

2001-05-16  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* README: typo

	* sysdep.c: use socklen_t where appropriate

	* gui-dial.c: remove superfluous semi-colon

	* sysdep.h, sysdep.c: Add get_homedir.

	* gui.c: Use get_homedir.

	* game.c: don't use uint; not always defined.

2001-05-15  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* xmj.man: fix error in proto desc

	* protocol.c:
	Skip leading white space when reading game option entry description
	field.

	* make-release:
	Change mj-*-static.tar to static-mj-*.tar in a desperate attempt
	to stop	the idiots who download the static version unnecessarily.

2001-05-14  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui-dial.c: change wording

	* maketxt: fixed a bug or two, and add clause for my game option macro.

	* xmj.man: Documented all the game options.

2001-05-13  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.h, gui.c, gui-dial.c: Add nagware.

	* protocol.h: remove old comment.

	* gui.c: update sequence number in stdin callback

	* client.h, client.c:
	client_send_packet maintains and returns packet sequence number.

	* game.h: Add cseqno field for client_ routines.

	* controller.c: was wrongly incrementing sequence number twice

2001-05-11  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c: During kong, always query for Mah Jong. (It's possible for
	player_can_mah_jong(..,0) to be true, but for us not to be able
	to go out, because of minimum double requirements.)

	* xmj.man: Change DisplayOption to XmjOption.

	* gui.c: (a) make last change work (shd compile before checking in...)
	(b) Change DisplayOption to XmjOption.

	* gui.c: Don't put up the kong claim window until we know we need it.

	* gui.c: remove incorrect guard in canmahjong answer clause
	(has no id).

2001-05-10  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* protocol.h, game.c, scoring.c: Add MahJongScore option.

2001-05-08  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* xmj.man: Documented changes to xmj.
	Next, document game options.
	(And possible player strategy options.)

	* controller.c: Don't make robot players managers.

	* gui.c, gui-dial.c:
	Only apply game preferences/options when allowed to.

	* controller.c: Set the game manager to be the first player to connect.

	* gui-dial.c:
	Initialize new game timeout option entry from preference table.

	* gui.h, gui.c, gui-dial.c:
	Add showwall preference to display options panel.

	* gui.c, gui-dial.c:
	Use player names in scoring window tabs, and make homogeneous tabs.

	* xmj.man: remove old mj-player option example.

	* xmj.man: update mj-server options.

2001-05-07  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui-dial.c: Make all buttons on prefs panel close window.

	* controller.c: Add --option-file argument.

	* greedy.c: Make sure to get the game options.

	* protocol.h, gui.c, game.c: Add DeadWall option.

	* game.c: Bug fix: game_set_option_in_table was not correctly setting
	options with unknown codes.

	* protocol.h, controller.c, game.c, gui.c:
	Make dead wall type option DeadWall16 (Millington) rather than
	DeadWall14 (non-Millington).

2001-05-06  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* lazyfixed.h, lazyfixed.c:
	Now only overrides the remove method of fixed, as this seems to
	suffice to eliminate flicking. Don't ask me why.

	* gui.c: Changed all the lazy calls back to fixed, since we've made
	lazyfixed inherit all the external methods of fixed.

	* lazyfixed.c:
	It seems that it's only the remove method that causes flickering.
	That should mean we can use all the supplied methods.

	* gui.c: remove now unnecessary resize on discard_area

	* game.c: game_handle_cmsg should ignore NoClaims for old discards!

	* FILES-src, MANIFEST: Add the lazyfixed.[ch] files.

	* Makefile.in: Add the lazyfixed widget to the Makefile.

	* gui.c, gui.h: Use my own lazyfixed widget for the discard area.
	This reduces (eliminates!) flickering in the wall.

	* lazyfixed.c, lazyfixed.h: New file.

	* controller.c: Have DeadWall14 as default when enabled.

	* gui.c, gui.h, gui-dial.c: Add tiletips display option.
	Current game options... menu entry only sensitive during game.

2001-05-05  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* protocol.h, game.c, scoring.c, gui.c: Add DeadWall14 option.

	* protocol.h, game.c, controller.c: Add FlowersLoose option.

2001-05-03  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui-dial.c, gui.c:
	make declaring option dialog handle Flowers option.

	* game.c: make game_get_option_value handle null game.

	* protocol.h, controller.c, game.c: Handle the Flowers option.

	* gui.c: Display now handles walls smaller than the maximum.

2001-05-02  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* controller.c, gui.c:
	Use wall.size field of game struct instead of 144.

	* gui.c, gui-dial.c, game.c, game.h, controller.c, scoring.c, greedy.c:
	Unpack the internal info struct in the game struct; just have
	fields directly in the main struct.

	* game.h, game.c, controller.c:
	Remove the superfluous discard_serial field from the game struct.

	* gui.c: Remove a fixed FIXME comment.

	* game.c, game.h: Add wall.size field to game struct.

	* tiles.c: replace 144 by MAX_WALL_SIZE where appropriate.
	And add includespecials arg to random_tiles.

	* controller.c, tiles.h: Add includespecials arg to random_tiles.

	* game.h: replace 144 by MAX_WALL_SIZE where appropriate.

	* protocol.h: Add a MAX_WALL_SIZE define.

2001-05-01  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c: Query all options on getting game message, instead of
	just querying timeout on connect.

	* controller.c:
	GameOption and PlayerOptionSet messages should not go into
	the history.
	Clients must always query/set.

	* game.c: And make handle_cmsg clear the option table on GameMsg, not
	copy from default.

	* game.c, game.h: add game_clear_option_table

	* gui-dial.c: more slight improvs to prefs panel.

	* gui.h, gui-dial.c, gui.c:
	Handle rcfile reading better: changed spec and name of
	read_or_update_rcfile.

	* gui-dial.c: Improvement to prefs panel.

	* scoring.c: rationalize the own flower/season scoring a bit.

	* gui.c: make showwall global; remove the tilesleft label, which is
	now done in the dialogs.

	* gui.h: Make showwall global.

	* gui-dial.c:
	When not showing the wall, put the tiles left in the dialog labels.

	* gui.c: Add a tilesleft indication when not showing the wall.

2001-04-30  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* controller.c:
	Add some protection against flooding: call the timeout handler
	if the timeleft goes negative.

	* gui.c: Handle querying of mj after kong properly (was getting
	into loop).

	* gui-dial.c: Don't put disabled options in the game options panel.

	* protocol.h, game.c: Add Flower scoring options.

	* scoring.c: Implement Flower scoring options.
	(And add parens round score arg in doscore.)

	* scoring.c: Use GOSevenPairsVal for scoring.

	* gui-dial.c: In option panels, make reset sensitive only on change.

2001-04-29  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* proto-encode-msg.pl:
	If a (char *) arg starts with a space, escape it with backslash.

	* gui.c: Call expand_protocol_text on scoring and settlement messages.

	* scoring.c:
	Rationalize the scoring code; it's now set up to take GOTScore values.

	* player.c: get rid of qsort, and use bubblesort instead.
	Doesn't actually make a huge difference, around 8%.

	* protocol.c: increase buffer sizes.

2001-04-28  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* controller.c, scoring.c, greedy.c, game.c, game.h:
	Change the names of the option entry returning functions to make
	it clear what they return; add game_get_option_value to get
	a value from a game without fuss.

	* gui-dial.c: Change Score type in option dialog to allow half limits.

	* protocol.h: Changed defn of Score type to have centi-limits.

	* protocol.h, game.c: Add SevenPairsVal option.

	* gui-dial.c:
	Simplify game option panels: don't show current value separately.

	* player.h: Change player_can_mah_jong to take flags indicating certain
	special hands are allowed; flags given (as bits) by MJSpecialHandFlags
	enum.

	* gui.c: Handle change to player_can_mah_jong spec.

	* greedy.c: Handle SevenPairs.
	(Don't try to get it, but don't pass it up if it just happens.)

	* client.h, client.c:
	Handle special sets in mah-jong; change to spec of client_find_sets.

	* player.c:
	Handle seven pairs. Required change to spec of player_can_mah_jong.

	* protocol.h: Add SevenPairs game option.

	* controller.c: Handle SevenPairs.

	* game.c: Add SevenPairs game option and handle it.

	* scoring.c: Handle scoring for seven pairs.

	* game.c: Correct types of option function args.
	And optimize option lookup.

	* game.h: Correct types of option function args.

	* gui.c: Ask server about ability to mah-jong, when robbing kongs.

	* gui-dial.c: change style of prefs panel a bit

	* gui.c: clear game option dialog on new game.

	* scoring.c: Implement the ScoreLimit and NoLimit options.

	* game.c: Add game_copy_option_table.

	* gui.h: Implement game preferences panel.

	* game.h: Add game_copy_option_table.

	* gui.c, gui-dial.c: Implement game preferences panel.

2001-04-18  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* protocol.c, gui-dial.c, controller.c: Add the GOTNat option type.

	* game.c:
	Add the GOTNat option type; add ScoreLimit and NoLimit options.
	Change Timeout to Nat.

	* protocol.h:
	Add the GOTNat option type; add ScoreLimit and NoLimit options.

2001-04-09  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.h, gui.c, gui-dial.c:
	More work on option dialog: reset button for each entry,
	and global update button. Make it update over creation and killing of
	game.
	This is awful mess. Make it properly OO sometime.

2001-04-05  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c, gui.h, gui-dial.c:
	Game option panel basically in place. Now add some options
	and test it.

	* gui.c: Have --size default to 17, not 18, for 800x600.
	(for 1.0.4, included now in devel version so I don't forget.)

	* CHANGES: 1.0.4 changes

	* gui.c: Have --size default to 17, not 18, for 800x600.

	* gui.h, gui-dial.c: checkpoint

	* scoring.c: Bug fix: was always giving 2 for fishing the eyes, instead
	of 4 for a major pair.

2001-04-03  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* game.c: give unknown option null name in default table,
	and infinite protocol, so always disabled.

2001-04-02  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.h, gui-dial.c: checkpoint while implementing game option dialog

	* game.c: fix warnings resulting from last change

	* game.c, protocol.c, protocol.h:
	add a userdata field to GameOptionEntry

	* MANIFEST, FILES-src: add icon files

	* Makefile.in: add stuff for Windows icon resource.

	* iconres.rs: New file.

2001-04-01  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui-dial.c: checkpoint; adding game option setting...

2001-03-31  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* game.c, controller.c, game.h:
	Introduced struct for option table, and changed game accordingly.
	Added functions to get/set options in tables.

2001-03-30  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.h, gui-dial.c, gui.c: Saving of display options done.

2001-03-29  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c: Basic rcfile reading for display options in place.

2001-03-23  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* greedy.c:
	added a little defensiveness: slight reluctance to discard to
	the right player. Makes a small (not sig) improv.

2001-03-06  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c: pop down turn dialog at handcomplete (for washouts).

2001-03-04  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui-dial.c:
	Add animation to the display options panel. (And fix bug.)

2001-03-03  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.h, gui.c, gui-dial.c:
	Added the Options menu, and the display options panel,
	which allows switching dialog posns.
	There are bugs when the program starts with -below and then
	one switches to -central, but I don't think these are mine;
	I can't be bothered to track down the gtk bugs.

2001-03-01  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c: hide discard dialog at start

	* gui.h, gui-dial.c, gui.c:
	move dialog (dependent on --dialog-XXX) creation into single function

2001-02-26  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* ChangeLog: 1.0.3

	* CHANGES: 1.0.3 changes

	* gui.c: add read_rcfile stub

	* gui-dial.c:
	Oops. Positioning in dialogs-below has been broken for some time.
	Now fixed.

2001-02-20  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* controller.c: added --wallfile option to load wall from file.

2001-02-11  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* Makefile.in:
	remove warnings and optimizations from production code makefile

	* xmj.man: Add server --seed option.

	* CHANGES: --seed server option.

	* ChangeLog: 1.0.2

	* CHANGES: 1.0.2 changes

	* greedy.c:
	If check_discard called while declaring specials, it's to try
	robbing a kong. In fact, the players would cope correctly with
	this situation anyway, but that was by accident!

2001-02-10  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* version.h: release 1.0.2

	* gui.c:
	Fix bugs in handling of kongs declared while declaring specials.

	* controller.c:
	Fix bugs in handling of kongs declared while declaring specials.
	Was not drawing a loose tile for the declarer! Also,
	must allow claims, since theoretically possible to rob such kongs.

	* game.c:
	Fix bugs in handling of kongs declared while declaring specials.
	(Must allow claims, since theoretically possible to rob them.)

	* scoring.c: Correct the detection of Heaven's/Earth's Blessing.
	Was relying on discard_serial, which would be incremented
	by kongs declared in the initial phase. Now use the player
	NoDiscard flags.

2001-02-09  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui-dial.c: correct GPL name; extend copyright date.

	* LICENCE: Correct name of GPL.

2001-02-07  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* runtest: Add various useful options.

	* greedy.c:
	further extensive simplification; several really stupid bugs fixed;
	extensive tuning. It is now definitely better: 1-2 sd better than
	10.21, and 4sd better than release 1.0.
	Details of intervening changes are in StuffToKeep.

2001-01-30  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* controller.c: Make sure that the caller slot is correctly filled even
	in the case of Heaven's Blessing (to avoid warning from
	scoring module).

	* controller.c:
	provide a --seed  option to seed the random number generator.

	* runtest:
	Use a fixed series of games, given by initial seed 101, and then
	incrementing for each game.

	* greedy.c:
	This is an almost complete restructing of the strategy code.
	The same basic ideas are used, but now they are controlled
	at user level by a smaller number of orthogonal (more or less)
	parameters, which then generate the old-style parameters.
	This is (will be) now documented, as it works well enough
	to let people use it.
	This rewrite was done on another system; the history of the
	changes is in the separate file greedy.c-10.20-10.21,v
	in the StuffToKeep directory.

2001-01-29  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* sysdep.h, sysdep.c: add rand_seed

	* version.h: 1.0.1

2001-01-28  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* CHANGES: 1.0.1

	* ChangeLog: for 1.0.1

	* xmj.man: correct when scoring info window appears

	* greedy.c:
	more fiddles. This file has been transferred to the big pc for
	experimentation.

2001-01-27  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* greedy.c: This does OK compared to the 1.0 release. (The same.)
	It's overly keen on no score hands (more than 25%), and not
	quite keen enough on concealed hands.
	Now strip out the old stuff.

2001-01-26  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* logstats: helps to count Limit hands as wins...

	* protocol.c: add variable for use by switch code.

	* proto-encode-msg.pl:
	allow bad entries in bool fields of incoming structures; treat as
	TRUE, to match normal C practice.

	* greedy.c: This did reasonably, but is still very chow-biased.

	* game.h: game_flag should return a boolean.

	* greedy.c: checkpoint on the way to revising.
	This currently does very badly (-5s.d.).
	It no-scores more often, but gets no-chows less often,
	never gets concealed (why not?), and wins less often, and has a lower
	score when not winning.
	See last results of 2001-01-25.

2001-01-25  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* controller.c:
	wasn't setting discard field of DangerousDiscard message.

	* logstats: Add one suit counting.

2001-01-22  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* make-release: Include -lXi in static build arguments.
	Exit if static build fails.

	* gui.h: <errno.h>, not "errno.h"

	* gui-dial.c:
	The scoring info window needs to be a bit bigger on Windows,
	as the font one gets by default is bigger.

	* controller.c:
	Must allow querying game options while game is suspended
	(so that clients can get the timeout on startup).

	* client.c: include system assert.h, not local.

	* Makefile.in: A few changes to make it more Windows-friendly.

	* gui.c: Move the big font loading to be with the fixed font loading.

	* CHANGES: changes for 1.0

	* ChangeLog: Update for release.

	* greedy.c: rcs_id and version.h

	* scoring.c: rcs_id

	* controller.c: rcs_id and version.h

	* sysdep.c, game.c, protocol.c, tiles.c, player.c, client.c: rcs_id

	* index.html: Update for release.

	* xmj.man: Add the discard timeout selector in new game.

	* README: note about makefile.msvc.old

	* FILES-src, MANIFEST: Add makefile.msvc.old

	* makefile.msvc.old: *** empty log message ***

2001-01-21  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c: handle tile selection at mah jong a bit better

	* gui-dial.c: handle timeout progress bar better

	* gui.c: Query the game timeout option after connect.

	* controller.c: Set timeout game option from command line.

	* gui.h: add timeout selector to new game.

	* protocol.c, game.c, sysdep.c: suppress uninitialized variable warning

	* gui-dial.c, gui.c: add timeout selector to new game.
	Suppress uninitialized variable warning.

	* controller.c, scoring.c: suppress uninitialized variable warning

	* README-binary: file deleted ; README has everything now.

	* FILES-binary: Only one README file now.

	* README: Updated for Makefile only, and include binary info.

	* Makefile.in: Tidied it up and commented it.
	Call with Win32=1 to compile under windows.

	* make-release: more windows; and full release.

	* make-release: good idea to include the binaries...

	* make-release: windoze uses zip

	* make-release: Cope with Windows, and add -norcs option.

	* FILES-binary: don't include tiles-v1 in binary distribution

	* make-release: if no RCS directory, build from existing files

	* make-release: make static release only for linux

	* Makefile.in: fbtiles now depends on Makefile, not Imakefile

	* MANIFEST, FILES-src: add version.h

	* make-release: Change from Imakefile to Makefile.in

	* gui.c: rcs_id

	* gui.h: include version.h

	* gui-dial.c: version and rcs strings

	* version.h: *** empty log message ***

	* MANIFEST: Imakefile/Makefile changes

	* FILES-src: delete Imakefile; add Makefile and Makefile.in

	* Imakefile:
	don't use imake; it's just too unlikely to be correctly installed.

	* Makefile.in: *** empty log message ***

	* make-release: use the make-release of the appropriate release

	* MANIFEST, FILES-src: add makedep

	* makedep: *** empty log message ***

	* sysdep.c: make warn() add terminators intelligently

	* controller.c, game.c: ANSIfication

2001-01-20  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* sysdep.c: Numerous changes to accommodate Windows:
	warn adds appropriate terminator.
	headers included appropriately.
	Socket routines redefined: use a type SOCKET, which in Windows
	is provided, and in Unix typedef'd to int;
	the error code is INVALID_SOCKET, not -1;
	the routines can be given functions to use to transform sockets,
	and to read/write/close the results (used by the gtk code);
	Unix socket domain ifdef'd out for Windows;
	get_line returns error if any read fails;
	new routine to start background jobs;
	Windows emulation for some Unix library routines.

	* README: Change Windows stuff

	* xmj.man: change --randomseats to --random-seats.
	Change quick start to use xmj menu.

	* controller.c:
	type tidies; one or two leftovers of restructuring fixed.
	Change --randomseats to --random-seats.
	Allow - to mean stdout for logfile.

	* client.c: use sysdep's close_socket to close.

	* greedy.c: type and brace tidies

	* gui.c: clear wall in appropriate places.
	load two fonts and use appropriately.
	type tidies.
	In Windows, need to intercept sockets and turn them into glib
	channels, and tell the socket routines to use appropriate functions to
	access them.
	display message while game suspended.
	use sysdep's start_background_program instead of doing it in Unix.
	use strerror instead of sys_errlist.
	adjust_wall_loose() always returns a valid pointer (or
	alternatively all uses of it would have to check; former was easier).

	* gui-dial.c: Some type tidies.
	Increased pbar_timeout interval to 50 ms.
	Display a message while a game is suspended.
	Fix bug in New Game dialog: wasn't matching button to sensitivity of
	options.
	Load the two fonts (fixed and big) in main routine, for use elsewhere.
	Don't show Unix options in connect window when on Windows.

	* gui.h: added global variables for the two fonts used

	* sysdep.h: Numerous changes to accommodate Windows:
	warn adds appropriate terminator.
	headers included appropriately.
	Socket routines redefined: use a type SOCKET, which in Windows
	is provided, and in Unix typedef'd to int;
	the error code is INVALID_SOCKET, not -1;
	the routines can be given functions to use to transform sockets,
	and to read/write/close the results (used by the gtk code);
	Unix socket domain ifdef'd out for Windows;
	get_line returns error if any read fails;
	new routine to start background jobs;
	Windows emulation for some Unix library routines.

	* tiles.c: couple of type tidies

2001-01-16  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* Imakefile: a few tidies

2001-01-14  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui-dial.c: ansification

	* controller.c:
	restructured the connection book-keeping so that sockets are
	no longer assumed to be small integers. (So things will work
	on Windows.)

	* sysdep.c, sysdep.h: checkpoint on the way to windows

2001-01-13  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* protocol.h:
	up the protocol version to 1010 to mark the change in kong/flower
	rules (we now agree with the rest of the world in only allowing them
	after drawing from the wall).

	* game.c:
	reinstate the old rule (allow kong etc after claiming discard)
	for old protocol versions.

2001-01-07  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* Imakefile: further warning fiddling

	* proto-encode-msg.pl, controller.c, scoring.c, greedy.c: ansification

	* tiles.c: remove superfluous ;

	* gui.c: ansification

	* tiles.c, tiles.h: change type of make_tile

	* Imakefile: more vicious warning options.

	* sysdep.h, gui.c, gui.h, player.c, controller.c, greedy.c:
	prototype/static fixes.

	* gui-dial.c: (a) prototype fixes
	(b) wasn't using right function to close error messages.

2001-01-06  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* greedy.c: tried to make evaluation of singletons better.
	No effect, save to reduce scores a bit and slightly increase frequency
	of winning. Time to stop fiddling.

2001-01-05  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c:
	on second thoughts, don't raise the scoring window at settlement.

	* gui.c:
	Raise the scoring info window on settlement, not on first score.
	(This apparently makes it more friendly for Windows users.)

	* gui-dial.c:
	showraise also does a gtk_window_show to force uniconification.

	* gui-dial.c:
	Fix the progress bar timeout; stops the Mah-Jong claim window suddenly
	disappearing!

	* greedy.c:
	This is as 10.9, but only considers changing strategy after drawing
	from the wall. It gives a semi-significant improvement (1.8sd), mainly
	by winning more frequently. It seems to get the concealed hand less
	often.

2001-01-04  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* controller.c:
	stupid bug in score_hand meant that cannon detection was failing.
	(was changing s, but left p over from previous s).

	* greedy.c:
	this has the supposedly better principle of working out the discard
	before claiming. It didn't work well, so tried hiking expc penalty,
	and explicitly banning discard of claimed tile.
	After this, go back to previous, and try the simple fixes.

2001-01-03  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* greedy.c: (a) restructured code, preparatory to changes.
	(b) Put a small exposure penalty in the fast strategy.

	* xmj.man: Document the new Connect menu.

	* runtest: add --no-special-scores to server options.

	* xmj.man:
	Add the mj-server no-special-scores option to suppress flower/season scores.

	* controller.c:
	Add the no-special-scores option to suppress flower/season scores.

	* scoring.h, scoring.c:
	Add the no_special_scores variable to suppress flower/season scores.

	* greedy.c: change concealed partchow to match others. Seems to make no
	difference.

2001-01-02  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* runtest:
	put evals into the player execution commands so that redirections
	can be included.

2001-01-01  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* greedy.c:
	(a) Only switch to fast when opponent displays four sets (not three).
	    Not very significant (1sd), but seems harmless.
	(b) remove old stuff.

	* greedy.c:
	Various fixes to response logic so that it doesn't try to do things
	twice.

	* game.c:
	Amazingly enough, game_handle_cmsg was in most cases not actually
	returning the correct affected id.

	* greedy.c:
	Don't claim mah jong on a concealed hand if we still have a reasonable
	chance of picking up the tile. (Need to take account of the number
	of tiles left to make this more accurate.)
	This does about 1.8 sd better than 10.4.

	* greedy.c: correct erroneous comments

2000-12-31  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.h, gui.c, gui-dial.c:
	Basic new game panel now working. Now tidy it, capturing
	children diagnostics etc.

	* sysdep.h, sysdep.c:
	connect_to_host: mark the connection close on exec.

	* gui-dial.c:
	checkpoint: added fields etc to open panel for starting game.

2000-12-30  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* greedy.c: remove the easy switch back to default; treat as others.

2000-12-29  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* runtest: put date in results file

	* game.c: set discard_serial to one, as the controller did.

	* controller.c:
	controller was doing things that should have been done by processing
	a newhand message. There's still more to do on this.

2000-12-27  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* game.c: Set info.whence to FromWall at start of play.

	* greedy.c: trying to avoid scoring pairs in chow hands

	* greedy.c:
	make kong declaring rules match M: only after drawing from wall.

	* greedy.c: trying to avoid scoring pairs in chow hands

2000-12-26  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* controller.c: State saving is broken, so don't try to do it.

	* xmj.man, controller.c: Add  --exit-on-disconnect  server option.

	* gui-dial.c: add an "about" window.

	* xmj.man, scoring.c: Cut bouquets down to one double.

2000-12-25  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* ChangeLog: update; strip out stuff before the pre-release.

	* game.c: CMsgSpecialSetMsg wasn't adding the discard when checking for
	existence of the set!

	* gui-dial.c: Use new tilesetbox_init function.

	* gui.c: Several changes to fix robbing kong bugs:
	(1) use new tilesetbox_init function to create all widgets in
	    initialization, rather than on the fly; associated changes to
	    tilesetbox_set;
	(2) playerdisp_update_exposed must be able to handle a closed kong
	    being robbed;
	(3) when forming a special set, the destination tile is found in
	    the concealed tiles, not the exposed.

	* gui.h:
	Stripped func out of tilesetbox, and added tilesetbox_init function.

	* game.c: allow closed kong robbing for thirteen wonders

	* xmj.man: clarifications

	* xmj.man:
	make kong declaring rules match M: only after drawing from wall.

	* game.c:
	Make rules match the rest of the world: specials and kongs can
	only be declared after drawing a tile from the wall, not after
	taking a discard.

2000-12-23  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* controller.c:
	The send_infotiles function was sending the message to all players
	depending on the option of the affected player, instead of depending
	on their own option setting.

2000-12-21  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* xmj.man: fix some slips in option argument typog

	* gui.c: showwall should start undetermined

2000-12-20  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui-dial.c:
	fix the radio group functionality in the concealed buttons.
	This is not concurrency-safe: it relies on induced callbacks being executed
	synchronously. I should fix this.

2000-12-17  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* gui.c: clear discards on game over

2000-12-14  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* make-release: replace - by _ in symname

	* index.html: update for beta release

2000-12-07  Julian Bradfield  <jcb@dcs.ed.ac.uk>

	* stats, runtest, logstats: increase version to 10 for post release

	* xmj.man, tiles.h, tiles.c, sysdep.h, sysdep.c, scoring.h, scoring.c, protocol.h, protocol.c, proto-encode-msg.pl, proto-decode-msg.pl, player.h, player.c, mj-server.man, mj-player.man, maketxt, makefallbacktiles, make-release, make-enums.pl, gui.h, gui.c, gui-dial.c, greedy.c, game.h, game.c, controller.h, controller.c, client.h, client.c, README-binary, README, MANIFEST, LICENCE, Imakefile, FILES-src, FILES-binary:
	1.0 pre-release

[ removed older stuff ]
