1 2005-11-11 Carl Worth <cworth@cworth.org>
4 * src/ttt-server.c: (ttt_server_init), (ttt_server_add_client),
5 (_accept_client), (main): Add a new ttt_server_t object with a
6 mutex-protected list of clients. Move client handling code down
10 * src/ttt-client.c: (ttt_client_create), (ttt_client_destroy),
11 (ttt_client_handle_requests): New ttt_client_t object that simply
12 holds a pointer back to the server as well as the client socket
16 * src/ttt-socket.c: (ttt_socket_accept): Add closure argument. Add
17 a call to fork before calling the accept callback.
19 * src/ttt-args.c: Hide unused ttt_args_usage from the compiler to
20 keep it from complaining.
22 * src/ttt.c: (main): Rename the client main program from
23 ttt-client to ttt.c, (since the server code now has its own
27 * src/Makefile.am: Include and link with pthread now that we have
28 pthread-based mutex locking.
30 2005-11-11 Carl Worth <cworth@pippin.local>
32 * src/ttt-server.c: (main): Don't assign to stderr which is
33 apparently an invalid lvalue on Mac OS X.
36 * src/x.c: (xfreopen): Change return type to void.
38 * src/ttt-board.c: (ttt_board_to_string): Add missing return
41 2005-11-11 Carl Worth <cworth@cworth.org>
43 * configure.in: Key off of src/ttt.h instead of src/ttt.c which no
46 2005-11-11 Carl Worth <cworth@cworth.org>
50 * src/x.h: Move include of stdarg.h from x.c to ttt.h.
52 2005-11-11 Carl Worth <cworth@cworth.org>
54 * src/ttt-board.h: Include ttt.h to get standard includes.
56 * src/ttt-socket.c: Replace include of netinet/ip.h with
57 netinet/in.h which seems to be necessary for BSD libc, (eg. Mac OS
60 2005-11-09 Carl Worth <cworth@cworth.org>
64 * src/ttt-server.c: (ttt_dispatch), (main):
66 * src/ttt-socket.c: (_sockaddr_init), (_wait_for_connection),
67 (ttt_socket_create_server), (ttt_socket_accept): Push a lot of
68 code out of ttt-server.c down into a new ttt_socket abstraction
69 layer. The code is much easier to read now. The server also no
70 longer exits when the first client exits, but continues to listen
73 2005-11-09 Carl Worth <cworth@cworth.org>
76 * src/ttt-args.c: (ttt_args_help), (ttt_args_parse): Add support
77 for -h,--host, -p,--port, and --log-file command-line arguments.
79 * src/ttt-server.c: (main): Use host, port, and log-file
80 command-line arguments.
82 * src/ttt-client.c: (main): Track change in signature of
86 * src/x.c: (xfdopen), (xfreopen): More wrappers.
88 2005-11-08 Carl Worth <cworth@cworth.org>
91 * src/ttt-server.c: (_sockaddr_init), (_wait_for_connection),
92 (main): Add socket, bind, listen, accept calls to provide a
93 simple, functional, one-shot server demonstration.
96 * src/x.c: (xsocket), (xbind), (xlisten), (xfcntl), (xselect): Add
97 more wrapped system calls.
99 2005-11-07 Carl Worth <cworth@cworth.org>
101 * src/ttt.h: Grab some useful definitions from wdo.h:
102 ASSERT_NOT_REACHEED and TTT_PRINTF_FORMAT. Add several needed
105 * src/Makefile.am: Rip out not-yet existing ttt-command and
108 * src/ttt-args.c: (ttt_args_parse): Track name change from
109 args_help to ttt_args_help.
111 * src/ttt.c: Remove in favor of ttt-server.c and ttt-client.c.
113 * src/x.h: Add prototype for xfwrite.
115 2005-11-05 Richard D. Worth <richard@theworths.org>
117 * src/ttt-board.c: (ttt_board_init): Added for loop counter init.
118 * src/ttt-board.h: Added prototypes.
120 2005-11-05 Richard D. Worth <richard@theworths.org>
122 * src/args.c: Renamed ttt-args.c
123 * src/args.h: Renamed ttt-args.h
124 * src/ttt-args.c: (ttt_args_help), (ttt_args_usage),
125 (ttt_args_parse): Added ttt_ prefix.
126 * src/ttt-args.h: Added ttt_, TTT_ prefix.
128 2005-11-05 Kevin Worth <kevin@cworth.org>
130 * src/ttt-board.c: (ttt_board_init): Implemented board_init.
131 * src/ttt-board.h: (ttt_board_t): Added cells array.
133 2005-11-05 Carl Worth <cworth@cworth.org>
135 * src/Makefile.am: Add ttt-board.[ch] and x.[ch]
138 * src/ttt-board.c: (ttt_board_init), (ttt_board_init_from_string),
139 (ttt_board_to_string), (ttt_board_write): Add some stub functions
140 for Richard and Kevin to have some practice
141 implementing. Functions to represent a board and to go to/from a
145 * src/x.c: (xasprintf), (xvasprintf), (xpipe), (xfork), (xmalloc),
146 (xcalloc), (xrealloc), (xfdopen), (xstrdup), (xfwrite): Several
147 utility functions that make system calls, check the result, and
148 exit on any error. This will simplify the error checking needed in
149 programs using these functions.
151 2005-11-05 Carl Worth <cworth@cworth.org>
153 * src/Makefile.am: Break things up for separate ttt-client and
154 ttt-server and programs.