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

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

[Octave-patch-tracker] [patch #8783] C++ implementation of textscan


From: Lachlan Andrew
Subject: [Octave-patch-tracker] [patch #8783] C++ implementation of textscan
Date: Sun, 14 Feb 2016 12:25:12 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #52, patch #8783 (project octave):

Yes, TMW seem to have improved textscan in several ways in recent releases,
and their documentation seem quite good.

Current the EOL at EOF thing in textscan.cc uses a seek to one position before
the EOF.  Technically that is undefined behaviour (because, for example, the
file could be in UTF-8 and the last byte may not be a whole character). 
However, most of Octave breaks for non-ASCII files, so I think it should be
OK.

FWIW, I'm attaching a patch to enable tellg/seekg that uses ftello and fseeko
as jwe recommended.  I haven't yet tested that it works properly beyond 4GB;
that will have to be tested on as wide a range of compilers/systems as
possible, too.

The patch seems harmless; nothing currently relies on being able to
seekg/tellg (because it is disabled) so there is nothing that can be broken by
a buggy implementation of it.  Once jwe is happy to apply it, textscan can be
a module and it should be much easier to test.

(file #36334)
    _______________________________________________________

Additional Item Attachment:

File name: textscan_enable_seek_v2.cset   Size:1 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8783>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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