After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 565715 - Fortran: Missing characters in definition
Fortran: Missing characters in definition
Status: VERIFIED FIXED
Product: doxygen
Classification: Other
Component: general
1.5.7.1-SVN
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
: 572736 593680 633985 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-12-26 19:51 UTC by albert
Modified: 2011-11-01 13:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for problems reported in this bug report (6.74 KB, patch)
2010-11-06 14:00 UTC, albert
none Details | Review
Corrected patch file (6.41 KB, patch)
2010-11-06 16:08 UTC, albert
none Details | Review

Description albert 2008-12-26 19:51:25 UTC
Missing characters with character string definitions in documentation.
In this case the last R of PARMETER and last ) in function definition

Examle code:
============
MODULE bug_str
     CHARACTER( * ), PRIVATE, PARAMETER :: LOWER_CASE = 'abcde'

      CONTAINS
         FUNCTION StrUpCase ( Input_String ) RESULT ( Output_String )
           CHARACTER( * ), INTENT( IN ) :: Input_String
           CHARACTER( LEN( Input_String ) ) :: Output_String
           Output_String = ''
         END FUNCTION StrUpCase
END MODULE bug_str

Resulting documentation:
========================
Namespaces
namespace  	bug_str

Functions
CHARACTER(LEN(Input_String) 	bug_str::StrUpCase (Input_String)

Variables
CHARACTER(*), paramete 	bug_str::LOWER_CASE )
Comment 1 albert 2008-12-26 20:06:26 UTC
With the variable there is also an extra ) at the end of the line
The value is not show in the documentation
The specifier PRIVATE is not taken int account
Comment 2 albert 2008-12-28 09:57:34 UTC
Some further investigations lead to that the possible cause of the problem is the '*' in the length definition of the character string (just as '(*)' as well as '(len=*)'.
Comment 3 Daniel Franke 2010-02-26 21:43:27 UTC
Not sure about the '*' yet, but in fortranscanner.l on finds:

ARGS      {BS}("("[^)]*")")
CHAR      (CHARACTER{ARGS}?|CHARACTER{BS}"*"({BS}[0-9]+|{ARGS}))

which, applied to 

    CHARACTER( LEN( Input_String ) ) :: Output_String

stops at the first closing ')'; thus matching as type definition

    CHARACTER( LEN( Input_String )

only.
Comment 4 Daniel Franke 2010-02-26 21:44:15 UTC
*** Bug 572736 has been marked as a duplicate of this bug. ***
Comment 5 albert 2010-11-06 14:00:59 UTC
Created attachment 173946 [details] [review]
Patch for problems reported in this bug report

This bug contains the description of a number of bugs which are all handled in this patch as well as the bug reported in bug 633985.
I'll try to list the patches and references to the files (in the patch) that are modified for this problem:

All patches are against the svn version of October 10 2010 (1.7.2)

- public, private not recognized:
  example:     CHARACTER( * ), PRIVATE, PARAMETER :: LOWER_CASE = 'abcde'
  problem was that the words public and private were not handled
  patched in fortranscanner.l line 1327

- round brackets inside length definition of character string
  example:            CHARACTER( LEN( Input_String ) ) :: Output_String  and also bug 572736
  problem new definition of part betwen brackets required (currently one extra level of round brackets)
  patched in fortranscanner.l line 211 and fortrancode.l line 645

- character(*) not properly recognized as variable, removing ) and placing it with the name.
  example:  CHARACTER( * ),PARAMETER :: LOWER_CASE = 'abcde'
  problem character(*) was recognized as C function pointer and handled as such. Set language in Entry item and corrected routine that checks if it is a function pointer.
  patched in fortranscanner.l lines 377, 391, 1485, 1706 and doxygen.cpp lines 2197, 2381, 6164

- character(*) not recognized as function (bug 622985)
  example:      character*(*) function a()
                end function
  problem similar to the above part but now for functions. Fix requires and extra item in EntrNav
  patched in entry.h lines 413, 432, entry.cpp line 366 and doxygen.cpp line 2593
Comment 6 albert 2010-11-06 14:04:11 UTC
oops, patch refers at the end to bug 622985, this has to be bug 633985, sorry.
Comment 7 Dimitri van Heesch 2010-11-06 16:07:45 UTC
*** Bug 633985 has been marked as a duplicate of this bug. ***
Comment 8 albert 2010-11-06 16:08:14 UTC
Created attachment 173954 [details] [review]
Corrected patch file

Found bug 593680 also describing problems with round brackets (also filed by me).
Made bug fix more general and added one extra level of nesting of round brackets.
This bug fix includes all described in the previous patch.
Comment 9 albert 2010-11-06 16:11:42 UTC
*** Bug 593680 has been marked as a duplicate of this bug. ***
Comment 10 Dimitri van Heesch 2010-11-06 18:35:51 UTC
Thanks Albert,
 
I'll include your latest patch in the next subversion update.
Comment 11 Daniel Franke 2010-11-06 22:31:47 UTC
Thanks Albert, works like a charm!
Comment 12 Daniel Franke 2010-11-14 21:56:50 UTC
Could this PR be closed?
Comment 13 albert 2010-11-14 22:45:15 UTC
Daniel,

I've asked the same question to Dimitri and the answer was: when a bug
is solved in Dimitri's local build he sets the status to ASSIGNED.
When creating a release all ASSIGNED bugs are set to RESOLVED with the
request to the submitter to check if the BUG is really resolved.

Albert
Comment 14 Daniel Franke 2010-11-14 22:56:42 UTC
Hu? I'm used to RESOLVE FIXED if a fix went to svn and is available for testing, REOPEN if not fixed after all?!

Different project, different rules. So be it.
Comment 15 albert 2010-11-15 08:39:01 UTC
Hi Daniel,

Isn't this exactly what is happening. When Dimitri sends the patches to svn he sets the status to resolved. As soon as he receives a patch and incorporates it in his own version he sets the status to assigned.
There is no write access for us to the repository, I think this is OK, some quality checking before committing a patch is always good. Some more frequent updates of the repository would also be nice, but we have to keep in mind that all the work done is voluntary (and much appreciated)!!

I don't think we should continue this discussion in this bug but when necessary in the Doxygen-development forum.

Albert
Comment 16 Dimitri van Heesch 2011-01-03 19:01:22 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.7.3. Please verify if this is indeed the case. Reopen the
bug if you think it is not fixed and please include any additional information
that you think can be relevant.
Comment 17 albert 2011-11-01 13:17:03 UTC
Problem fixed, works like Daniels specifies OK.