[comp.sources.d] hpgl2ps question

bin@rhesus.primate.wisc.edu (Brain in Neutral) (07/20/88)

A while back, a convertor for HPGL to PostScript was posted to
comp.sources.misc by Don McCormack.  I compiled it, but get
an undefined symbol "rint".  I presume from its use that this
takes a real and returns an int.  Anybody know if that's correct?
I couldn't find any rint function or macro in the source, and "ar t"
on my system libraries turned up nothing.

I assume that

# define	rint(f)	((int) f)

would do the trick.

bin@rhesus.primate.wisc.edu (Brain in Neutral) (07/21/88)

From article <343@rhesus.primate.wisc.edu>, by bin@rhesus.primate.wisc.edu (Brain in Neutral):
> A while back, a convertor for HPGL to PostScript was posted to
> comp.sources.misc by Don McCormack.  I compiled it, but get
> an undefined symbol "rint"...

Well.  This was on an Ultrix 1.2 machine.  I find in my Ultrix 2.2
documentation, in the floor(3m) manual page:

	double rint(x)
	double x;

	The rint routine returns the integer (represented as a double
	precision number) nearest x in the direction of the prevailing
	rounding mode.

Sure enough, no undefined rint when compiling with -lm on Ultrix 2.2.

Oh, by the way, it's Don McCormick.  I spelled the author's name wrong.