Re: [Radiance-dev] NREL Radiance re-distribution

2016-05-12 Thread Gregory J. Ward
I agree the code in wordfile.c is a bit over-complex and confusing. Hopefully, it will make more sense to you tomorrow. Meanwhile, you can try running the following code on the attached files: #include #include "platform.h" int main(int argc, char *argv[]) { charrdbuf[40];

Re: [Radiance-dev] NREL Radiance re-distribution

2016-05-12 Thread Georg Mischler
Hmmm... I really seem to be tired. That null byte is the one we just wrote ourselfes... But something in the counting is definitively off. "buf+MAXWLEN-crem" will point to the second character of the next word, and memmove() probably reads one beyond the buffer. More tomorrow. Cheers

Re: [Radiance-dev] NREL Radiance re-distribution

2016-05-12 Thread Georg Mischler
The problem is that in wordfile(), crem still gets incremented even after passing the null byte in buf. I must admit that I don't quite understand the counting logic in there yet, the function looks unnecessarily complicated to me. Maybe I'll see clearer tomorrow when I'm fully awake again...

Re: [Radiance-dev] NREL Radiance re-distribution

2016-05-12 Thread Gregory J. Ward
Should be reproducible with a sequence of read calls on a file with one or two printing characters per line, followed by "\r\n" as usual. If a character gets eaten, then it must be the _O_TEXT processing at fault, somehow. -Greg > From: Georg Mischler > Subject: Re:

Re: [Radiance-dev] Meta files and library

2016-05-12 Thread Randolph M. Fritz
Just to be confusing "gnuplot" and "GNU plotutils" are entirely different programs. The gnuplot developers had the name first and are keeping it. In any event, the GNU plotutils will, as far as i know, work with plotin and (if it is resurrected) plotout. Randolph

Re: [Radiance-dev] Meta files and library

2016-05-12 Thread Georg Mischler
Just checked the SuSe installation DVD: Besides gnuplot there's also a gnu plotutils package containing "libplot" and commands like "plot", "graph", etc. Not installed by default, but with a deeply nested package productivity/graphics/visualization/graph. So it evidently still exists in some

Re: [Radiance-dev] Meta files and library

2016-05-12 Thread Randolph M. Fritz
> > > Ah, so "plot files" are indeed something different from "graph files". > > Since the plot(5) man page presumably documenting that format is gone, > > keeping a program around that depends on it doesn't make much sense. > > Well, it was never my package, so I've no idea if it's still "out

Re: [Radiance-dev] Meta files and library

2016-05-12 Thread Gregory J. Ward
Responses inline... > From: Georg Mischler > Subject: Re: [Radiance-dev] Meta files and library > Date: May 12, 2016 12:58:14 AM PDT > > Am 2016-05-12 02:27, schrieb Gregory J. Ward: >> The "graph files" are related to .cal files in an odd way. > > "Subtly incompatible"

Re: [Radiance-dev] NREL Radiance re-distribution

2016-05-12 Thread Gregory J. Ward
Well, due to the way wordfile.c backs up over words split by read buffer boundaries, its effective buffer length changes, so it does in fact read this particular line in a way that splits the EOL character. I had to simulate it, but I think I counted correctly. It will be interesting to see