Stephane Fillod | 7 Feb 2005 23:41
Picon
Favicon

Re: PRIll?

On Thu, Jan 27, 2005 at 03:59:37AM -0800, Nate Bargmann wrote:
> A few days ago Stephane uploaded a series of patches
> to transition away from lld/lli and inserted PRIfreq
> in its place.  I noticed that the last occurance in
> each file the substitution became PRIll rather than
> PRIfreq.  I have a computer issue that prevents me
> from compiling right now (I removed a noisy fan from
> my northbridge and now the machine locks up on
> compilation).
> 
> I didn't find PRIll defined in rig.h, so before I
> upload a series of untested patches I want to make the
> list aware of this discrepancy.

PRIll is defined in src/misc.h, and apply to 64bit ints,
and is only for internal use (not part of exported API).

PRIfreq is defined in rig.h, and pertain to the freq_t type,
which is actually a double float.

Rem: we cannot use the freq typing everywhere because of 
the rounding "feature" of *printf formating.

So basically in frontend/backends, use PRIfreq for debugging
or formating with real precision, and use PRIll (along with 
appropriate type casting) to format a huge integer number.

73,
Stephane - F8CFE

(Continue reading)

Nate Bargmann | 8 Feb 2005 00:00

Re: PRIll?

* Stephane Fillod <f8cfe <at> free.fr> [2005 Feb 07 16:46 -0600]:
> PRIll is defined in src/misc.h, and apply to 64bit ints,
> and is only for internal use (not part of exported API).
> 
> PRIfreq is defined in rig.h, and pertain to the freq_t type,
> which is actually a double float.
> 
> Rem: we cannot use the freq typing everywhere because of 
> the rounding "feature" of *printf formating.
> 
> So basically in frontend/backends, use PRIfreq for debugging
> or formating with real precision, and use PRIll (along with 
> appropriate type casting) to format a huge integer number.

Very good.  I was just surprised to see PRIll in the
ft_920_send_dial_freq() function of ft920.c in the rig_debug() call
while all the other functions calling rig_debug use PRIfreq.  In fact,
ft_920_send_dial_freq() has an earlier rig_debug() call that uses
PRIfreq!

I see that you used PRIll to display the result of a from_bcd() call
which is probably a good idea.  Now that I know the difference, I won't
worry about it.

So, anytime a frequency value is passed to/from the frontend, PRIfreq
is prefered and for internal calculations PRIll is probably prefered.

73, de Nate >>

--

-- 
(Continue reading)


Gmane