Fortran: Subroutine seen as function

Albert_1 <[email protected]>
Newsgroups gmane.text.doxygen.devel
Message-ID <[email protected]>
Dear all,

I just filed bug 630573 in Bugzilla (see message below), as promised there I
would also cross post to the doxygen-develop list because I'm not happy with
my solution.
In my solution I have to bring a language specific part into the
docparser.cpp, I'd rather change the fortranscanner.l so a subroutine would
be handled as a void function, I've not been able to do this yet. When I
change in, in the subroutine addSubprogram, the value of current>-type to
void (in case of a subroutine) I also get the word void in the documentation
and this is not what I want. I see that there are 2 variables "type" and
"mtype" both having for function and subroutines the same value (so both
have eg. the value "subroutine" or when changed as described above the word
"void").
The problem in my case is that I don't have enough (better said hardly any /
no) experience with the fortranscanner.
- How can I accomplish, in the FORTRAN scanner, that a subroutine is seen as
a void function, without disrupting the output ?
- what is the difference between type and mtype?

In advance, Thanks for the answers,

Best Regards,

Albert


===============  Buzilla 630573 entry =====================
When I generate the generate the documentation for the following code:


!>  \file

!>  Subroutine ftn_test_fie
!> @param [in] x input param

SUBROUTINE ftn_test_fie(x)
  integer x
END SUBROUTINE

and I have the option WARN_NO_PARAMDOC set to YES (Doxyfile attached)I get
the
warning message:
D:/bug_undoc/bb.f90:5: warning: return type of member ftn_test_fie is not
documented

For a Fortan subroutine there is no return type. 
I have a solution for it, but I'm not happy with it, around line 539 in
docparser.cpp:
    else if ( // see if return needs to documented
        g_memberDef->hasDocumentedReturnType() ||
        returnType.isEmpty()         || // empty return type
        returnType.find("void")!=-1  || // void return type
        g_memberDef->isConstructor() || // a constructor
        g_memberDef->isDestructor()     // or destructor
       )
replace by:
    else if ( // see if return needs to documented
        g_memberDef->hasDocumentedReturnType() ||
        returnType.isEmpty()         || // empty return type
        returnType.find("void")!=-1  || // void return type
        returnType.find("subroutine")!=-1  || // Fortran Subroutine
        g_memberDef->isConstructor() || // a constructor
        g_memberDef->isDestructor()     // or destructor
       )

-- 
View this message in context: http://old.nabble.com/Fortran%3A-Subroutine-seen-as-function-tp29806242p29806242.html
Sent from the Doxygen - Development mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.