octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58055] ftell() incorrect on MS Windows platfo


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #58055] ftell() incorrect on MS Windows platforms if file is not encoded with CRLF line endings
Date: Wed, 15 Apr 2020 14:41:07 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0

Update of bug #58055 (project octave):

              Item Group:        Incorrect Result => Matlab Compatibility   
                  Status:          Ready For Test => Confirmed              

    _______________________________________________________

Follow-up Comment #21:

That fixes the bug for me.
Only downside might be that the performance might be worse now even for the
case when the file actually contains the "correct" line endings. The work
around is only really needed if the file has the "wrong" line endings (and the
user cares about ftell).
But hopefully MS will fix the bug (and the run time test will de-activate the
work around).

Not sure if we care about those kind of things:

diff --git a/liboctave/system/lo-sysdep.cc b/liboctave/system/lo-sysdep.cc
--- a/liboctave/system/lo-sysdep.cc
+++ b/liboctave/system/lo-sysdep.cc
@@ -212,7 +212,7 @@
                          });
 
       if (set_nonbuffered_mode)
-        ::setvbuf (fptr, 0, _IONBF, 0);
+        ::setvbuf (fptr, nullptr, _IONBF, 0);
 
       while (true)
         {


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58055>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]