[Top][All Lists]

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

[Octave-bug-tracker] [bug #58055] fgetl() reads in beyond newline accord

From: Toby
Subject: [Octave-bug-tracker] [bug #58055] fgetl() reads in beyond newline according to following ftell()
Date: Fri, 27 Mar 2020 05:07:23 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0


                 Summary: fgetl() reads in beyond newline according to
following ftell()
                 Project: GNU Octave
            Submitted by: streumix
            Submitted on: Fri 27 Mar 2020 09:07:22 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 5.2.0
         Discussion Lock: Any
        Operating System: Microsoft Windows




I have older code for text file import, which suddenly fails. It turned out
that fgetl() in current version of Octave reads beyond newline character (by a
few characters) according to ftell(), though the next call to fgetl() returns
the full line. There must be a ninternal buffer involved, which breaks
concurrent usage of ftell() / fseek(). 
Is this an intended change, and concurrent usage of ftell() / fseek() with
fgetl() is forbidden in general?

My code does a partial rewind, and that's exactly the reason why it's now
failing to work. It used to work in Octave 3 and probably in Octave 4, too.  

Is this a bug, or do I need to rework my code avoiding fgetl()?
(which file I/O functions to cooperate with ftell() and fseek()?)



Reply to this item at:


  Message sent via Savannah

reply via email to

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