[Freeciv-Dev] (PR#9830) remove bool32
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9830 >
This patch removes bool32 from dataio. It is unused, and any potential
user should use bool8 instead.
jason
Index: common/dataio.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/dataio.c,v
retrieving revision 1.11
diff -u -r1.11 dataio.c
--- common/dataio.c 2 Jun 2004 19:47:41 -0000 1.11
+++ common/dataio.c 27 Aug 2004 00:37:43 -0000
@@ -245,19 +245,6 @@
/**************************************************************************
...
**************************************************************************/
-void dio_put_bool32(struct data_out *dout, bool value)
-{
- if (value != TRUE && value != FALSE) {
- freelog(LOG_ERROR, "Trying to put a non-boolean: %d", (int) value);
- value = FALSE;
- }
-
- dio_put_uint32(dout, value ? 1 : 0);
-}
-
-/**************************************************************************
-...
-**************************************************************************/
void dio_put_uint8_vec8(struct data_out *dout, int *values, int stop_value)
{
size_t count;
@@ -464,23 +451,6 @@
/**************************************************************************
...
**************************************************************************/
-void dio_get_bool32(struct data_in *din, bool * dest)
-{
- int ival;
-
- dio_get_uint32(din, &ival);
-
- if (ival != 0 && ival != 1) {
- freelog(LOG_ERROR, "Received value isn't boolean: %d", ival);
- ival = 1;
- }
-
- *dest = (ival != 0);
-}
-
-/**************************************************************************
-...
-**************************************************************************/
void dio_get_sint8(struct data_in *din, int *dest)
{
int tmp;
Index: common/dataio.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/dataio.h,v
retrieving revision 1.6
diff -u -r1.6 dataio.h
--- common/dataio.h 2 Jun 2004 19:47:41 -0000 1.6
+++ common/dataio.h 27 Aug 2004 00:37:43 -0000
@@ -63,7 +63,6 @@
void dio_get_bool8(struct data_in *din, bool *dest);
-void dio_get_bool32(struct data_in *din, bool *dest);
void dio_get_memory(struct data_in *din, void *dest, size_t dest_size);
void dio_get_string(struct data_in *din, char *dest, size_t max_dest_size);
void dio_get_bit_string(struct data_in *din, char *dest,
- [Freeciv-Dev] (PR#9830) remove bool32,
Jason Short <=
|
|