? stats ? out ? diff ? impr_iter1.diff ? auto.rc ? empty_block1.diff ? max_comb1.diff ? id_to_info_row.diff Index: client/clinet.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/clinet.c,v retrieving revision 1.64 diff -u -r1.64 clinet.c --- client/clinet.c 2002/02/26 19:57:07 1.64 +++ client/clinet.c 2002/03/02 19:19:06 @@ -316,7 +316,7 @@ assert(fd == aconnection.sock); if (read_from_connection(&aconnection, FALSE) >= 0) { - int type; + enum packet_type type; bool result; char *packet; @@ -352,7 +352,7 @@ while (TRUE) { if (read_from_connection(&aconnection, TRUE) >= 0) { - int type; + enum packet_type type; bool result; char *packet; Index: common/packets.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/packets.c,v retrieving revision 1.192 diff -u -r1.192 packets.c --- common/packets.c 2002/02/26 20:19:10 1.192 +++ common/packets.c 2002/03/02 19:19:10 @@ -243,9 +243,12 @@ instead of just testing if the returning package is NULL as we sometimes return a NULL packet even if everything is OK (receive_packet_goto_route). **************************************************************************/ -void *get_packet_from_connection(struct connection *pc, int *ptype, bool *presult) +void *get_packet_from_connection(struct connection *pc, + enum packet_type *ptype, bool * presult) { - int len, type; + int len; + enum packet_type type; + *presult = FALSE; if (!pc->used) @@ -255,7 +258,7 @@ return NULL; /* length and type not read */ get_uint16(pc->buffer->data, &len); - get_uint8(pc->buffer->data+2, &type); + get_uint8(pc->buffer->data + 2, (int *) &type); if(pc->first_packet) { /* the first packet better be short: */ @@ -2276,7 +2279,7 @@ /************************************************************************** ... **************************************************************************/ -int send_packet_generic_empty(struct connection *pc, int type) +int send_packet_generic_empty(struct connection *pc, enum packet_type type) { unsigned char buffer[MAX_LEN_PACKET], *cptr; cptr=put_uint8(buffer+2, type); @@ -2745,7 +2748,7 @@ /************************************************************************** ... **************************************************************************/ -int send_packet_generic_message(struct connection *pc, int type, +int send_packet_generic_message(struct connection *pc, enum packet_type type, const struct packet_generic_message *packet) { unsigned char buffer[MAX_LEN_PACKET], *cptr; @@ -2771,7 +2774,7 @@ /************************************************************************** ... **************************************************************************/ -int send_packet_generic_integer(struct connection *pc, int type, +int send_packet_generic_integer(struct connection *pc, enum packet_type type, const struct packet_generic_integer *packet) { unsigned char buffer[MAX_LEN_PACKET], *cptr; @@ -2931,7 +2934,7 @@ /************************************************************************** ... **************************************************************************/ -int send_packet_generic_values(struct connection *pc, int type, +int send_packet_generic_values(struct connection *pc, enum packet_type type, const struct packet_generic_values *req) { unsigned char buffer[MAX_LEN_PACKET], *cptr; Index: common/packets.h =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/packets.h,v retrieving revision 1.108 diff -u -r1.108 packets.h --- common/packets.h 2002/02/26 17:24:26 1.108 +++ common/packets.h 2002/03/02 19:19:10 @@ -965,12 +965,12 @@ struct packet_alloc_nation *receive_packet_alloc_nation(struct connection *pc); -int send_packet_generic_message(struct connection *pc, int type, +int send_packet_generic_message(struct connection *pc, enum packet_type type, const struct packet_generic_message *packet); struct packet_generic_message *receive_packet_generic_message(struct connection *pc); -int send_packet_generic_integer(struct connection *pc, int type, +int send_packet_generic_integer(struct connection *pc, enum packet_type type, const struct packet_generic_integer *packet); struct packet_generic_integer *receive_packet_generic_integer(struct connection *pc); @@ -1059,7 +1059,7 @@ struct packet_ruleset_game * receive_packet_ruleset_game(struct connection *pc); -int send_packet_generic_values(struct connection *pc, int type, +int send_packet_generic_values(struct connection *pc, enum packet_type type, const struct packet_generic_values *req); struct packet_generic_values * receive_packet_generic_values(struct connection *pc); @@ -1084,7 +1084,7 @@ struct packet_sabotage_list * receive_packet_sabotage_list(struct connection *pc); -void *get_packet_from_connection(struct connection *pc, int *ptype, bool *presult); +void *get_packet_from_connection(struct connection *pc, enum packet_type *ptype, bool *presult); void remove_packet_from_buffer(struct socket_packet_buffer *buffer); int send_packet_goto_route(struct connection *pc, @@ -1102,7 +1102,7 @@ void generic_handle_attribute_chunk(struct player *pplayer, struct packet_attribute_chunk *chunk); -int send_packet_generic_empty(struct connection *pc, int type); +int send_packet_generic_empty(struct connection *pc, enum packet_type type); struct packet_generic_empty * receive_packet_generic_empty(struct connection *pc); Index: server/sernet.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/sernet.c,v retrieving revision 1.86 diff -u -r1.86 sernet.c --- server/sernet.c 2002/02/27 11:12:53 1.86 +++ server/sernet.c 2002/03/02 19:19:11 @@ -543,7 +543,7 @@ if(pconn->used && FD_ISSET(pconn->sock, &readfs)) { if(read_socket_data(pconn->sock, pconn->buffer)>=0) { char *packet; - int type; + enum packet_type type; bool result; while (TRUE) {