bugGNU Octave - Bugs: bug #52310, [octave-forge] (io) read_namelist...

 
 

bug #52310: [octave-forge] (io) read_namelist cannot read character sequences containing a /

Submitted by:  None
Submitted on:  Mon 30 Oct 2017 02:53:53 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Philip Nienhuis <philipnienhuis>
Originator Name: Brice DAVIEROriginator Email: -unavailable-
Open/Closed: ClosedRelease: other
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Sat 04 Nov 2017 09:58:19 AM UTC, comment #3:

Pushed here with a few minor edits:
http://hg.code.sf.net/p/octave/io/rev/866a7f4544a8

Thanks for the patch!

Closing report.

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Tue 31 Oct 2017 04:44:27 PM UTC, comment #2:

You're welcome.
The patch is done on top of the default branch, after 2.4.8 (1069:e568074cf09d). It does not conflict with the previous patch on read_namelist (which was also from me).

Attached is a patch with the style corrections. Also, I just found out that a comment should have been removed in the previous patch, at the beginning of the file:

I deleted it in the new patch since it was fixed.

(file #42309)

Anonymous
Mon 30 Oct 2017 06:25:38 PM UTC, comment #1:

(io pkg maintainer here)
Thanks for the bug report and patch, Brice

Against which io package release have you made the patch? because recently io-2.4.8 was released and one or two days earlier another patch for read_namelist.m had been applied. That one and your patch shouldn't "cross" :-)

As to your patch: some small style thingies:

  • space between function name and left parenthesis (L. 17, 26, 41, 52, 53, 59, 63, ...)
  • no ";" after an if clause (L. 15)
  • we use ## at start of comment rather than %
  • space between ! and logical expression (L. 42, ...)

I have little experience with Fortran since ~2000 so I more or less have (to have) blind faith in namelist patches :-)
Maybe someone else can comment on this patch' merits.

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Mon 30 Oct 2017 02:53:53 PM UTC, original submission:

A namelist can contain a / in a character sequence (inside quotes). read_namelist wrongly interprets it as the ending character of the namelist.
The attached patch checks if any / character is quoted. I am not familiar with octave, so there may be simpler ways to do this. It also seems to work well when double quotes and apostrophes contain each other, but my tests were limited.
I hope the changeset is done right !

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #42309:  patch2.txt added by None (3KiB - text/plain - Style corrections)
file #42301:  patch.txt added by None (3KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by None (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 project members can vote.

     

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

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 04 Nov 2017 09:58:19 AM UTCphilipnienhuisStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Tue 31 Oct 2017 09:03:16 PM UTCphilipnienhuisStatusNone=>Patch Submitted
      Assigned toNone=>philipnienhuis
    Tue 31 Oct 2017 08:25:05 PM UTCjweSummary[octave-forge] io: read_namelist cannot read character sequences containing a /=>[octave-forge] (io) read_namelist cannot read character sequences containing a /
    Tue 31 Oct 2017 04:44:27 PM UTCNoneAttached File-=>Added patch2.txt, #42309
    Mon 30 Oct 2017 02:53:53 PM UTCNoneAttached File-=>Added patch.txt, #42301

    Back to the top


    Powered by Savane 3.1-cleanup1