Ethereal-dev: Re: [PATCH] Re: [Ethereal-dev] Problem with parsing float values onsome machines

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Lars Ruoff" <lars.ruoff@xxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Jan 2004 09:46:58 +0100
> > Here is a patch that introduces a new global function to
gtk_stat_util.h/.c
> > (right place?)
> > to compare two string values representing floats (works like strcmp).
> > However the function uses possibly heavy string processing and needs
> > refinement for cases of scientific notation.
>
> Even "atof()" involves string processing.
>
> Would it be possible to allocate, for all rows in RTP analysis's CList,
> a data structure containing the numerical values for that row (and to
> free all those data structures when the CList is destroyed)?
>
> If so, then you could set the row data for the row to be a pointer to
> the corresponding data structure, and have the sort function get that
> data for the row (the "data" field of the GtkCListRow structure) and
> sort based on the structure members - no string process is involved at
> all with that.

Of course that would be possible. But the problem occurs in at least 4
places throughout Ethereal code, including the main packet list (!), various
statistics-tables, ...
They would all have to be changed.

Lars Ruoff.