[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:

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

I'll be able to post the rest of the motorola driver code soon if you
can answer my questions about the phonebook entries ;)


Bastien Nocera <address@hidden> 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]