[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnokii gtk2 port
From: |
Bastien Nocera |
Subject: |
Re: [PATCH] gnokii gtk2 port |
Date: |
Mon, 01 Aug 2005 23:01:57 +0100 |
Hey Pawel,
On Mon, 2005-08-01 at 23:39 +0200, Pawel Kot wrote:
> Hi,
>
> 2005/8/1, Bastien Nocera <address@hidden>:
> > > > You haven't answered about the use of glib in libgnokii itself though,
> > > > is that fine by you?
> > >
> > > I don't think libgnokii requires glib at all.
> >
> > If you can write safe replacements equivalent to g_strsplit()[1], or
> > g_strdup_printf()[2], I'll be happy to use them. The motorola backend is
> > currently using those.
>
> Where can I see the code?
For g_strsplit and g_strdup_printf, they're in glib:
http://cvs.gnome.org/viewcvs/glib/glib/gstrfuncs.c?view=markup
The reason why I use g_strsplit is because at_line_buffer and
splitlines() are wholly inadequate. Only 4 lines maximum, and looking
for the last line used is too complicated.
g_strdup_printf is just because sprintf is dangerous (there's no way to
tell whether the destination string can fit the whole string) and
snprintf not secure either (there's no way of telling whether the string
has been fully copied to the destination string, or that it is
null-terminated).
I'll be able to post the rest of the motorola driver code soon if you
can answer my questions about the phonebook entries ;)
Cheers
---
Bastien Nocera <address@hidden>
- Re: [PATCH] gnokii gtk2 port, Bastien Nocera, 2005/08/01
- Re: [PATCH] gnokii gtk2 port, Pawel Kot, 2005/08/01
- Re: [PATCH] gnokii gtk2 port, Pawel Kot, 2005/08/01
- Re: [PATCH] gnokii gtk2 port, Bastien Nocera, 2005/08/01
- Re: [PATCH] gnokii gtk2 port, Pawel Kot, 2005/08/01
- Re: [PATCH] gnokii gtk2 port,
Bastien Nocera <=
- Re: [PATCH] gnokii gtk2 port, Pawel Kot, 2005/08/01
- Re: [PATCH] gnokii gtk2 port, BORBELY Zoltan, 2005/08/02
- Re: [PATCH] gnokii gtk2 port, Pawel Kot, 2005/08/02
- Re: [PATCH] gnokii gtk2 port, Bastien Nocera, 2005/08/03
- Re: [PATCH] gnokii gtk2 port, Pawel Kot, 2005/08/03
- Re: [PATCH] gnokii gtk2 port, BORBELY Zoltan, 2005/08/03
- Re: [PATCH] gnokii gtk2 port, Bastien Nocera, 2005/08/04
- [PATCH]: gnokii_strsplit as in glib (was Re: [PATCH] gnokii gtk2 port), Bastien Nocera, 2005/08/04
- Re: [PATCH]: gnokii_strsplit as in glib (was Re: [PATCH] gnokii gtk2 port), Pawel Kot, 2005/08/09
- Re: [PATCH]: gnokii_strsplit as in glib (was Re: [PATCH] gnokii gtk2 port), Bastien Nocera, 2005/08/10