patchGNU Octave - Patches: patch #7817, strread.m: bit width and %[] and...

 
 

patch #7817: strread.m: bit width and %[] and %q format conversion specifiers (bug #33875)

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Fri 13 Jul 2012 09:32:47 AM UTC  
 
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 13 Jul 2012 09:32:47 AM UTC, original submission:

(Re-posted from bug tracker where I accidentally put it initially)_

A while ago I've implemented bit width format conversion specifiers (%d8, %u64, etc) to strread.m; as strread.m currently is the work horse for textscan.m, they now also work in textscan.m
AFAICS these changes seem to work fairly reliably. Patch including some tests attached.

I've also implemented %[] (and %[], %[^..], %[^..]) plus %q specifiers in strread.m (so these will work in textscan, too), but these changes don't work so very reliably. That is, they do, as long as whitespace and/or delimiters are not contained in words matching the %q and %[]-like specifiers. In the tests you can see that in columns matching %[] or %q specifiers the same number of whitespace/delimiters must be present on each line, otherwise strread.m quickly loses track.
For my own (simple) purposes it worked OK up till now, but that's no guarantee.

As advised by Rik I won't develop these patches any further (in principle that is as I may need further fixes myself).
I contribute them here just for in case other people want to have a try.
For convenience I've also attached patched strread.m versions in a tarball ( md5sum: 5294a30679a2f6c633f110792da611b7 )

Philip Nienhuis <philipnienhuis>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #26192:  strread_bitwidth.patch added by philipnienhuis (9kB - application/x-download)
file #26193:  strread_bitwidth_regexp.patch added by philipnienhuis (29kB - application/x-download)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by philipnienhuis (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 13 Jul 2012 09:32:47 AM UTCphilipnienhuisAttached File-=>Added strread_bitwidth.patch, #26192
      Attached File-=>Added strread_bitwidth_regexp.patch, #26193
      Attached File-=>Added strread_bitwidth_regexp.tar.gz, #26194

    Back to the top


    Powered by Savane 3.1-cleanup