Hi Arjen!

>> BTW: You can also define a constant for the string length instead of  
>> using  integer literals in the code.
>
> Good thinking! Actually, as I look at the code, I see that it presumes
> that lines are never longer than 30 characters.

If I understand http://en.wikipedia.org/wiki/Fgets corrytly, then the code  
assumes lines to be no longer than 29 characters because fgets always  
appends a NUL-byte to the string read (or do I misunderstand something  
here?). This is why I also thought that you could omit changing the  
lineending to a NUL-byte. Howevere, just changing all /r, /n to NUL is the  
safest way, I guess.

> If they are, the reading process will fail in an uneasy way. I will try
> and take care of that too.

Why does it fail in an uneasy way? Will strlen not terminate, because  
there is no NUL-byte in the string returned by fgets then?

-- 
Gruß,
Thorsten

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Plplot-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to