Bug 218821

Summary: new line at the end of ascii file
Product: [Applications] kst Reporter: Grégoire Verlut <gregoire.verlut>
Component: generalAssignee: kst
Status: RESOLVED INTENTIONAL    
Severity: wishlist CC: netterfield
Priority: NOR    
Version: 2.0.0   
Target Milestone: 2.0.0   
Platform: unspecified   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:

Description Grégoire Verlut 2009-12-15 19:13:20 UTC
Version:           2.0.0_devel (using unspecified)
Compiler:          mingw, provided with QT Creator 
OS:                Windows 32-Bit

It seems that the last line of a source file will not be read if it does not end with a new line character.

Would it be possible to consider the EOF as a new line character? or does this assumption would break other projects that consider that valid lines must end with new line character?
Comment 1 Netterfield 2009-12-15 19:48:55 UTC
A primary application of kst is with dynamically expanding data files.  If kst grabs a data file in the middle of a line being written, then it could be reading a partial line, and not know it.

eg, last line as it will eventially be
1.0 23.45E-10

last line as kst happens to get it when it happens to read the file:
1.0 23.4

This would cause great troubles.  If we demand that the lines end with a new line, then we avoid this
problem. 

Even delaying, and checking back won't work, because the file could be coming from the end of a buffered pipe, in which case, the delays could be long and unpredictable.  

I'm leaning towards 'wont fix' unless someone can come up with a solution.
Comment 2 Nicolas Brisset 2009-12-16 08:40:03 UTC
Barth, I think that makes sense. I don't see any way to handle the "wrong timing" issue either, so I'd say the least bad solution is to leave as is, and let people who have fixed files without the final CR to add it...
Grégoire ?
Comment 3 Grégoire Verlut 2009-12-16 12:46:57 UTC
That was my fearing when I reported this wish.
Ok for closing the bug as "wont fix because not a bug" 
(maybe have an entry in the help that will come one day)

Grégoire
Comment 4 Netterfield 2009-12-17 03:27:54 UTC
Closing as wontfix, as per discussion...
Comment 5 Peter Kümmel 2010-08-14 12:14:33 UTC
Change version from 2.0.0_devel to 2.0.0 to simplify version numbering.
Comment 6 Peter Kümmel 2010-11-12 10:42:19 UTC
These bugs are solved with 2.0.0