
D:\Programs\doxygen-svn_corrected>diff -u src/.svn/text-base/fortrancode.l.svn-base src/fortrancode.l 
--- src/.svn/text-base/fortrancode.l.svn-base	2010-10-10 15:44:30.521014600 +0200
+++ src/fortrancode.l	2010-11-06 17:00:43.262631700 +0100
@@ -645,12 +645,16 @@
 BS        [ \t]*
 BS_       [ \t]+
 COMMA     {BS},{BS}
-ARGS      {BS}("("[^)]*")"){BS}
+ARGS_L0   ("("[^)]*")")
+ARGS_L1a  [^()]*"("[^)]*")"[^)]*
+ARGS_L1   ("("{ARGS_L1a}*")")
+ARGS_L2   "("({ARGS_L0}|[^()]|{ARGS_L1a}|{ARGS_L1})*")"
+ARGS      {BS}({ARGS_L0}|{ARGS_L1}|{ARGS_L2})
 
 NUM_TYPE  (complex|integer|logical|real)
 KIND      {ARGS}
 CHAR      (CHARACTER{ARGS}?|CHARACTER{BS}"*"({BS}[0-9]+|{ARGS}))
-TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{B}PRECISION|{CHAR})
+TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS_}PRECISION|{CHAR}|TYPE{ARGS})
 
 INTENT_SPEC intent{BS}"("{BS}(in|out|in{BS}out){BS}")"
 ATTR_SPEC (ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PRIVATE|PUBLIC|SAVE|TARGET|RECURSIVE|PURE|ELEMENTAL)

D:\Programs\doxygen-svn_corrected>diff -u src/.svn/text-base/fortranscanner.l.svn-base src/fortranscanner.l 
--- src/.svn/text-base/fortranscanner.l.svn-base	2010-10-10 15:44:32.268014600 +0200
+++ src/fortranscanner.l	2010-11-06 16:57:02.956631700 +0100
@@ -210,7 +210,11 @@
 BS        [ \t]*
 BS_       [ \t]+
 COMMA     {BS},{BS}
-ARGS      {BS}("("[^)]*")")
+ARGS_L0   ("("[^)]*")")
+ARGS_L1a  [^()]*"("[^)]*")"[^)]*
+ARGS_L1   ("("{ARGS_L1a}*")")
+ARGS_L2   "("({ARGS_L0}|[^()]|{ARGS_L1a}|{ARGS_L1})*")"
+ARGS      {BS}({ARGS_L0}|{ARGS_L1}|{ARGS_L2})
 NOARGS    {BS}"\n"
 
 NUM_TYPE  (complex|integer|logical|real)
@@ -377,6 +381,7 @@
   					  current->section=Entry::USINGDIR_SEC;
 					  current_root->addSubEntry(current);
 					  current = new Entry;
+                                          current->lang    = SrcLangExt_F90; 
                                           yy_pop_state();
                                         }
 <Use>{ID}/,                             { 
@@ -391,6 +396,7 @@
   					  current->section=Entry::USINGDECL_SEC;
 					  current_root->addSubEntry(current);
 					  current = new Entry ;
+                                          current->lang    = SrcLangExt_F90; 
   					}
 <Use,UseOnly>"\n"                       {
                                           unput(*yytext);
@@ -1327,6 +1333,16 @@
     typeName += ",";
     typeName += "save";
   }
+  if (mdfs.protection == SymbolModifiers::PUBLIC)
+  {
+    typeName += ",";
+    typeName += "public";
+  }
+  else if (mdfs.protection == SymbolModifiers::PRIVATE)
+  {
+    typeName += ",";
+    typeName += "private";
+  }
 
   return typeName;
 }
@@ -1485,6 +1501,7 @@
   current->mtype      = mtype;
   current->virt       = virt;
   current->stat       = gstat;
+  current->lang       = SrcLangExt_F90; 
   initGroupInfo(current);
 }
 
@@ -1706,11 +1723,13 @@
     groupEnterFile(yyFileName,yyLineNr);
 
     current          = new Entry;
+    current->lang    = SrcLangExt_F90; 
     current->name    = yyFileName;
     current->section = Entry::SOURCE_SEC;
     current_root->addSubEntry(current);
     file_root        = current;
     current          = new Entry;
+    current->lang    = SrcLangExt_F90; 
 
     fscanYYrestart( fscanYYin );
     {

D:\Programs\doxygen-svn_corrected>diff -u src/.svn/text-base/entry.cpp.svn-base src/entry.cpp 
--- src/.svn/text-base/entry.cpp.svn-base	2010-10-10 15:44:33.772014600 +0200
+++ src/entry.cpp	2010-11-06 09:59:40.213619600 +0100
@@ -366,7 +366,7 @@
 EntryNav::EntryNav(EntryNav *parent, Entry *e)
              : m_parent(parent), m_subList(0), m_section(e->section), m_type(e->type),
               m_name(e->name), m_fileDef(0), m_info(0), m_offset(-1), 
-              m_noLoad(FALSE)
+              m_noLoad(FALSE), m_lang(e->lang)
 {
   if (e->tagInfo)
   {

D:\Programs\doxygen-svn_corrected>diff -u src/.svn/text-base/entry.h.svn-base src/entry.h 
--- src/.svn/text-base/entry.h.svn-base	2010-10-10 15:44:30.487014600 +0200
+++ src/entry.h	2010-11-06 10:00:54.427619600 +0100
@@ -413,6 +413,7 @@
 
     Entry *entry() const { return m_info; }
     int section() const { return m_section; }
+    SrcLangExt lang() const { return m_lang; }
     const QCString &type() const { return m_type; }
     const QCString &name() const { return m_name; }
     TagInfo *tagInfo() const { return m_tagInfo; }
@@ -432,6 +433,7 @@
     QCString	 m_name;        //!< member name
     TagInfo     *m_tagInfo;      //!< tag file info
     FileDef     *m_fileDef;
+    SrcLangExt   m_lang;         //!< programming language in which this entry was found
 
     Entry       *m_info;
     int64        m_offset;

D:\Programs\doxygen-svn_corrected>diff -u src/.svn/text-base/doxygen.cpp.svn-base src/doxygen.cpp 
--- src/.svn/text-base/doxygen.cpp.svn-base	2010-10-10 15:44:33.457014600 +0200
+++ src/doxygen.cpp	2010-11-06 10:07:45.731619600 +0100
@@ -2197,8 +2197,9 @@
  *  \returns -1 if this is not a function pointer variable or
  *           the index at which the brace of (...*name) was found.
  */
-static int findFunctionPtr(const QCString &type,int *pLength=0)
+static int findFunctionPtr(const QCString &type,int lang, int *pLength=0)
 {
+  if (lang == SrcLangExt_F90) return -1; // Fortran does not have function pointers
   static const QRegExp re("([^)]*[\\*\\^][^)]*)");
   int i=-1,l;
   if (!type.isEmpty() &&             // return type is non-empty
@@ -2381,7 +2382,7 @@
     else
     {
       int i=isFuncPtr;
-      if (i==-1) i=findFunctionPtr(root->type); // for typedefs isFuncPtr is not yet set
+      if (i==-1) i=findFunctionPtr(root->type,root->lang); // for typedefs isFuncPtr is not yet set
       if (i!=-1) // function pointer
       {
         int ai = root->type.find('[',i);
@@ -2593,7 +2594,7 @@
        (rootNav->section()==Entry::VARIABLE_SEC    // it's a variable
        ) ||
        (rootNav->section()==Entry::FUNCTION_SEC && // or maybe a function pointer variable 
-        (isFuncPtr=findFunctionPtr(rootNav->type()))!=-1
+        (isFuncPtr=findFunctionPtr(rootNav->type(),rootNav->lang()))!=-1
        ) ||
        (rootNav->section()==Entry::FUNCTION_SEC && // class variable initialized by constructor
         isVarWithConstructor(rootNav)
@@ -6164,7 +6165,7 @@
   }
 
   if ( // detect func variable/typedef to func ptr
-      (i=findFunctionPtr(root->type,&l))!=-1 
+      (i=findFunctionPtr(root->type,root->lang,&l))!=-1 
      )
   {
     //printf("Fixing function pointer!\n");
