]> git.cworth.org Git - ttt/blobdiff - ChangeLog
* TODO: checked off WHO, QUIT, ERROR SYNTAX
[ttt] / ChangeLog
index 24fa00bc3a302d32e0c65fd7e7d95e7812b92096..df44897953e563538ef1fdeeec4b2012a8ac724a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,204 @@
+2005-11-25  Richard D. Worth  <richard@theworths.org>
+
+       * TODO: checked off WHO, QUIT, ERROR SYNTAX
+
+       * src/ttt-client.c: (_ttt_client_execute_helo), (_ttt_client_init),
+       (ttt_client_get_num_wins):
+       * src/ttt-client.h:
+       * src/ttt-server.c: (ttt_server_who): Whitespace changes. Add
+       missing player win count for WHO.
+
+2005-11-24  Richard D. Worth  <richard@theworths.org>
+
+       * AUTHORS: Add Richard D. Worth
+       * TODO: Add newline before EOF
+
+       * src/ttt-client.c: (_ttt_client_execute_who):
+       * src/ttt-server.h:
+       * src/ttt-server.c: (ttt_server_who): Implement WHO.
+
+2005-11-24  Carl Worth  <cworth@cworth.org>
+
+       * PROTOCOL: Document QUIT.
+
+       * src/ttt-client.c: (_ttt_client_execute_helo),
+       (_ttt_client_execute_quit), (_ttt_client_init), (_ttt_client_fini),
+       (_execute_request), (_handle_requests_thread): Implement QUIT. Add
+       client->registered flag and unregister only if registered. Change
+       from args_min and args_max to args_required.
+
+       * src/ttt-error.h:
+       * src/ttt-error.c: (ttt_error_string):
+       * src/ttt-server.c: (ttt_server_register_client): Put underscores
+       in TTT_ERRROR names for better readability.
+
+2005-11-24  Carl Worth  <cworth@cworth.org>
+
+       * PROTOCOL:
+       * src/ttt-server.c: (ttt_server_init),
+       (ttt_server_register_client): Remove unique-name generation from
+       the server. The client is going to have to have code to do this
+       anyway.
+
+       * src/ttt-client.c: Change minimum arguments for HELO from 0 to 1.
+
+       * TODO: Note that HELO and ERROR INVALIDNAME are implemented in
+       the server.
+
+2005-11-23  Richard D. Worth  <richard@theworths.org>
+
+       * PROTOCOL: Remove unused servername
+
+       * src/ttt-client.h: * src/ttt-client.c:
+       (_ttt_client_execute_helo), (_ttt_client_init),
+       (_ttt_client_fini), (_execute_request), (ttt_client_get_name),
+       (ttt_client_set_name): Added command descriptions structure. Match
+       command case-insensitively, dispatch to execute
+       function. Implement HELO command. Register on HELO instead of on
+       connect.
+
+       * src/ttt-server.h: * src/ttt-server.c: (ttt_server_init),
+       (ttt_server_register_client), (ttt_server_unregister_client),
+       (ttt_server_get_host), (ttt_server_get_port), (main): Added host
+       and port to server. Make client registration name-based rather
+       than id-based.
+
+       * src/x.c: (xstrdup): Return NULL on NULL
+
+       * src/ttt-lex.h: Regenerated
+
+2005-11-22  Carl Worth  <cworth@cworth.org>
+
+       * TODO: Add TODO file listing all the stuff from the protocol that
+       needs to be implemented.
+       
+       * src/Makefile.am:
+       * configure.in:
+       * ylwrap:
+       * src/ttt-lex.h:
+       * src/ttt-lex.l:
+       * src/ttt-token.h: Add support for a flex-based tokenizer which
+       tokenizes newlines and space-separated strings.
+
+       * src/ttt-client.c: (_ttt_client_init), (_ttt_client_fini),
+       (_append_to_request), (_free_request), (_read_request),
+       (_execute_request): Use new tokenizer to tokenize input into an
+       array of request strings.
+
+2005-11-15  Carl Worth  <cworth@cworth.org>
+
+       * src/Makefile.am:
+       * src/ttt-error.h:
+       * src/ttt-error.c: (ttt_error_string): Add error values and error
+       strings from protocol.
+
+       * src/ttt.h: Add typedefs for ttt_client_t and ttt_server_t so
+       that there's no problem with ttt-client.h and ttt-server.h needing
+       to mutually include each other.
+
+       * src/ttt-server.h:
+       * src/ttt-server.c: (ttt_server_register_client),
+       (ttt_server_unregister_client), (_ttt_server_accept), (main): Push
+       the client request handling thread back down into ttt-client.c
+       where it really does belong. The server code no longer ever
+       reaches down inside the ttt_client_t structure. Export
+       ttt_server_register_client and ttt_server_unregister_client. Add
+       documentation for ttt_server_broadcast. Document locking semantics
+       for all functions which acquire the server lock.
+
+       * src/ttt-client.h:
+       * src/ttt-client.c: (_ttt_client_create), (_ttt_client_destroy),
+       (_read_into_request_until), (_read_request), (_execute_request),
+       (_handle_requests_thread), (ttt_client_new), (ttt_client_get_id):
+       Pull the ttt_client structure definition back down inside the
+       ttt-client.c file. Don't export ttt_client_create and
+       ttt_client_destroy anymore, but instead just use static
+       _ttt_client_init and _ttt_client_fini. Implement the broadcast by
+       just passing a client pointer around and using client->request
+       rather than passing char *request all over. Document new
+       ttt_client_new and remove ttt_client_read_line. Add locking to
+       ttt_client_send and document it. Add ttt_client_get_id.
+
+2005-11-14  Carl Worth  <cworth@cworth.org>
+
+       Server now acts as a very simple chat server.
+
+       * src/ttt-client.h:
+       * src/ttt-client.c: (ttt_client_create), (ttt_client_destroy),
+       (_append_to_request), (ttt_client_read_into_request_until),
+       (ttt_client_read_line), (ttt_client_send): Add support to do a
+       buffering read within the client and to reuse the buffer (which
+       grows by doubling) from one request to the next. Add function to
+       send a message to a client.
+
+       * src/ttt-server.c: (ttt_server_init), (ttt_server_create_client):
+       Add support for a client idea. Resize the server's client list by
+       doubling.
+       * src/ttt-server.c: (ttt_server_destroy_client): Add support to
+       destroy a client.
+       * src/ttt-server.c: (_handle_client_requests_thread),
+       (_accept_client): Move handling of client requests up to
+       ttt-server.c from ttt-client.c. Use threads rather than a fork per
+       client.
+       * src/ttt-server.h:
+       * src/ttt-server.h: (ttt_server_broadcast): Add function to send a
+       message to all connected clients.
+
+       * src/ttt-socket.h:
+       * src/ttt-socket.c: (ttt_socket_read),
+       (ttt_socket_write): Add functions to do blocking read or write of
+       the specified number of bytes.
+
+       * src/ttt-socket.c: (ttt_socket_accept): Remove fork, so that the
+       accept function call can take care of anything like that itself.
+       
+       * src/x.h:
+       * src/x.c: (xread), (xwrite): New wrappers for read and write.
+
+       * src/ttt.h: Add TTT_STATUS_EOF, TRUE, and FALSE.
+
+       * src/ttt.c: Need to include ttt-args.h explicitly now.
+
+2005-11-11  Carl Worth  <cworth@cworth.org>
+
+       * src/ttt-server.h:
+       * src/ttt-server.c: (ttt_server_init), (ttt_server_add_client),
+       (_accept_client), (main): Add a new ttt_server_t object with a
+       mutex-protected list of clients. Move client handling code down
+       into new ttt-client.c.
+
+       * src/ttt-client.h:
+       * src/ttt-client.c: (ttt_client_create), (ttt_client_destroy),
+       (ttt_client_handle_requests): New ttt_client_t object that simply
+       holds a pointer back to the server as well as the client socket
+       file descriptor.
+
+       * src/ttt-socket.h:
+       * src/ttt-socket.c: (ttt_socket_accept): Add closure argument. Add
+       a call to fork before calling the accept callback.
+
+       * src/ttt-args.c: Hide unused ttt_args_usage from the compiler to
+       keep it from complaining.
+
+       * src/ttt.c: (main): Rename the client main program from
+       ttt-client to ttt.c, (since the server code now has its own
+       ttt-client.c).
+
+       * src/ttt.h:
+       * src/Makefile.am: Include and link with pthread now that we have
+       pthread-based mutex locking.
+
+2005-11-11  Carl Worth  <cworth@pippin.local>
+
+       * src/ttt-server.c: (main): Don't assign to stderr which is
+       apparently an invalid lvalue on Mac OS X.
+
+       * src/x.h:
+       * src/x.c: (xfreopen): Change return type to void.
+
+       * src/ttt-board.c: (ttt_board_to_string): Add missing return
+       statement.
+
 2005-11-11  Carl Worth  <cworth@cworth.org>
 
        * configure.in: Key off of src/ttt.h instead of src/ttt.c which no