]> git.cworth.org Git - ttt/blob - ChangeLog
2005-11-11 Carl Worth <cworth@cworth.org>
[ttt] / ChangeLog
1 2005-11-11  Carl Worth  <cworth@cworth.org>
2
3         * src/ttt-server.h:
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
7         into new ttt-client.c.
8
9         * src/ttt-client.h:
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
13         file descriptor.
14
15         * src/ttt-socket.h:
16         * src/ttt-socket.c: (ttt_socket_accept): Add closure argument. Add
17         a call to fork before calling the accept callback.
18
19         * src/ttt-args.c: Hide unused ttt_args_usage from the compiler to
20         keep it from complaining.
21
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
24         ttt-client.c).
25
26         * src/ttt.h:
27         * src/Makefile.am: Include and link with pthread now that we have
28         pthread-based mutex locking.
29
30 2005-11-11  Carl Worth  <cworth@pippin.local>
31
32         * src/ttt-server.c: (main): Don't assign to stderr which is
33         apparently an invalid lvalue on Mac OS X.
34
35         * src/x.h:
36         * src/x.c: (xfreopen): Change return type to void.
37
38         * src/ttt-board.c: (ttt_board_to_string): Add missing return
39         statement.
40
41 2005-11-11  Carl Worth  <cworth@cworth.org>
42
43         * configure.in: Key off of src/ttt.h instead of src/ttt.c which no
44         longer exists.
45
46 2005-11-11  Carl Worth  <cworth@cworth.org>
47
48         * src/ttt.h:
49         * src/x.c:
50         * src/x.h: Move include of stdarg.h from x.c to ttt.h.
51
52 2005-11-11  Carl Worth  <cworth@cworth.org>
53
54         * src/ttt-board.h: Include ttt.h to get standard includes.
55         
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
58         X).
59
60 2005-11-09  Carl Worth  <cworth@cworth.org>
61
62         * src/Makefile.am:
63         * src/ttt.h:
64         * src/ttt-server.c: (ttt_dispatch), (main):
65         * src/ttt-socket.h:
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
71         for more connections.
72
73 2005-11-09  Carl Worth  <cworth@cworth.org>
74
75         * src/ttt-args.h:
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.
78         
79         * src/ttt-server.c: (main): Use host, port, and log-file
80         command-line arguments.
81
82         * src/ttt-client.c: (main): Track change in signature of
83         ttt_args_parse.
84         
85         * src/x.h:
86         * src/x.c: (xfdopen), (xfreopen): More wrappers.
87
88 2005-11-08  Carl Worth  <cworth@cworth.org>
89
90         * src/ttt.h:
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.
94
95         * src/x.h:
96         * src/x.c: (xsocket), (xbind), (xlisten), (xfcntl), (xselect): Add
97         more wrapped system calls.
98
99 2005-11-07  Carl Worth  <cworth@cworth.org>
100
101         * src/ttt.h: Grab some useful definitions from wdo.h:
102         ASSERT_NOT_REACHEED and TTT_PRINTF_FORMAT. Add several needed
103         include directives.
104
105         * src/Makefile.am: Rip out not-yet existing ttt-command and
106         ttt-error.
107         
108         * src/ttt-args.c: (ttt_args_parse): Track name change from
109         args_help to ttt_args_help.
110
111         * src/ttt.c: Remove in favor of ttt-server.c and ttt-client.c.
112         
113         * src/x.h: Add prototype for xfwrite.
114
115 2005-11-05  Richard D. Worth  <richard@theworths.org>
116
117         * src/ttt-board.c: (ttt_board_init): Added for loop counter init.
118         * src/ttt-board.h: Added prototypes.
119
120 2005-11-05  Richard D. Worth  <richard@theworths.org>
121
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.
127
128 2005-11-05  Kevin Worth  <kevin@cworth.org>
129
130         * src/ttt-board.c: (ttt_board_init): Implemented board_init.
131         * src/ttt-board.h: (ttt_board_t): Added cells array.
132
133 2005-11-05  Carl Worth  <cworth@cworth.org>
134
135         * src/Makefile.am: Add ttt-board.[ch] and x.[ch]
136         
137         * src/ttt-board.h:
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
142         string.
143         
144         * src/x.h:
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.
150         
151 2005-11-05  Carl Worth  <cworth@cworth.org>
152
153         * src/Makefile.am: Break things up for separate ttt-client and
154         ttt-server and programs.
155