[Freeciv-Dev] Re: (PR#1355)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, May 07, 2002 at 05:10:36PM -0700, Vasco Alexandre Da Silva Costa wrote:
> Index: client/gui-gtk-2.0/gui_main.c
> ===================================================================
> RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/gui_main.c,v
> retrieving revision 1.5
> diff -u -r1.5 gui_main.c
> --- client/gui-gtk-2.0/gui_main.c 2002/04/05 05:56:44 1.5
> +++ client/gui-gtk-2.0/gui_main.c 2002/05/08 00:02:01
> @@ -722,6 +722,43 @@
> }
>
> /**************************************************************************
> +...
> +**************************************************************************/
> +static unsigned char *put_conv(unsigned char *dst, const char *src)
> +static bool iget_conv(char *dst, int ndst, unsigned char *src, int nsrc)
Why is one if the arg unsigned char and the other a char?
> +{
> + gchar *out;
> + gsize len; /* length to copy, not including null */
> + bool ret;
> +
> + ret = FALSE;
Should be merged.
> +/* network string conversion */
> +typedef unsigned char * (*PUT_FUN) (unsigned char *dst, const char *src);
> +void put_set_callback(PUT_FUN fun);
> +
> +typedef bool (*IGET_FUN) (char *dst, int ndst, unsigned char *src, int nsrc);
> +void iget_set_callback(IGET_FUN fun);
Can you add a _conv? So that it reads PUT_CONV_FUN and set_put_conv_callback
Replace some of the int with size_t.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
Make a software that is foolproof, and only fools will want to use it.
|
|