From: Bjoern V. <bj...@cs...> - 2006-04-10 20:45:14
|
Richard Laager <rl...@wi...> wrote: > We could take advantage of the fact that gettext doesn't honor #if 0... >=20 > #if 0 > /* This is for gettext only. */ > > static const char * jabber_user_dir_comments [] =3D { > > =09/* current comment from Jabber User Directory users.jabber.org */ > > =09N_("Find a contact by entering the search criteria in the given fiel= ds. " > > =09 "Note: Each field supports wild card searches (%)"), > > =09NULL > > }; > #endif Ok. This is clever.=20 I forget to write about another problem in the existing code: if((instnode =3D xmlnode_get_child(query, "instructions"))) { char *tmp =3D xmlnode_get_data(instnode); instructions =3D g_strdup_printf(_("Server Instru= ctions: %s"), tmp); g_free(tmp); } What happens, if tmp is NULL? I looked into xmlnode_get_data(). This function can return NULL. And probably a modified JUD can return such an XML-node without data. I think, the code is more safe with an test for tmp!=3DNULL. The problem exists both in the existing and in the patched code. Greetings, Bj=F6rn |