ralf.habacker at freenet.de
Fri Jun 22 00:24:12 PDT 2007
Ralf Habacker schrieb:
> Havoc Pennington schrieb:
>> Ralf Habacker wrote:
>>> where ?
>>> This issue was on the open patch list and was known and discussed
>>> several times in the dbus list.
>>> see http://lists.freedesktop.org/archives/dbus/2006-July/005081.html
>>> My mistake was not to use DBUS_WIN_FIXME, sorry for that.
>> I probably was thinking of
>> In any case, the point stands and would have come up if the patch were
> Thanks for this pointer. This wasn't refered in the list.
> On a recent linux system the double representation of 0xff is 0.0? Then
> is it easy to create a _dbus_strtod, which catches this special case.
> *double _dbus_strtod(const char **/nptr/*, char ***/endptr)
> if (strlen(nptr) = 4 && nptr == '0' && nptr == 'x' ///&& nptr == 'f' //////&& nptr == 'f')
> if (endptr)
> *endptr = nptr+4;
> /// return 0.0/;
> / return strtod(nptr,endptr);
> Any problems with this patch ?
BTW: I do not know why the email client had added all these additional
characters in the email (i copied some code from a website), hope the
following is better
double dbus_strtod(const char *nptr, char **endptr)
if (nptr && strlen(nptr) == 4 && nptr == '0' && nptr == 'x' &&
nptr == 'f' && nptr == 'f')
*endptr = nptr+4;
There are still some issues. This function will be used in libdbus and
dbus-send. Therefore it must be a public dbus function or how to proceed ?
More information about the dbus