--- src/classdef.cpp	2010-09-10 14:48:32.000000000 -0700
+++ addon/classdef.cpp	2010-10-17 17:47:32.000000000 -0700
@@ -39,6 +39,7 @@
 #include "vhdldocgen.h"
 #include "layout.h"
 
+
 //-----------------------------------------------------------------------------
 
 //static inline MemberList *createNewMemberList(MemberList::ListType lt)
@@ -258,6 +259,7 @@
   visited=FALSE;
   setReference(lref);
   m_impl = new ClassDefImpl;
+  m_qsl = new QStrList;
   m_impl->compType = ct;
   m_impl->lang     = SrcLangExt_Unknown;
   m_impl->init(defFileName,name(),compoundTypeString(),fName);
@@ -268,6 +270,7 @@
 ClassDef::~ClassDef()
 {
   delete m_impl;
+  delete m_qsl;
 }
 
 QCString ClassDef::getMemberListFileName() const
@@ -362,7 +365,18 @@
                                    )
 {
   //printf("insertInternalMember(%s) isHidden()=%d\n",md->name().data(),md->isHidden());
-  if (md->isHidden()) return;
+  static bool optVhdl    = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ 
+if (md->isHidden()) return;
+ if(optVhdl)
+	  {
+	  QCString tti=VhdlDocGen::trVhdlType(md->getMemberSpecifiers(),false);
+      //  VhdlDocGen::deleteAllChars(tti,' '); // Always Construct
+  
+	    int i=m_qsl->find(tti);
+        if(i<0)
+			 m_qsl->append(tti);
+	  }
 
   if (!isReference())
   {
@@ -1369,12 +1383,15 @@
 
 void ClassDef::writeSummaryLinks(OutputList &ol)
 {
+  static bool vhdlOpt    = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
+ 
   ol.pushGeneratorState();
   ol.disableAllBut(OutputGenerator::Html);
   QListIterator<LayoutDocEntry> eli(
       LayoutDocManager::instance().docEntries(LayoutDocManager::Class));
   LayoutDocEntry *lde;
   bool first=TRUE;
+  if(!vhdlOpt)
   for (eli.toFirst();(lde=eli.current());++eli)
   {
     if (lde->kind()==LayoutDocEntry::ClassNestedClasses && 
@@ -1394,7 +1411,17 @@
         writeSummaryLink(ol,ml->listTypeAsString(),lmd->title,first);
       }
     }
+  }// for
+  else
+	  {
+	  uint len=m_qsl->count();
+	  for(uint i=0;i<len;i++)
+		  {
+		  QCString qq=(QCString)m_qsl->at(i);
+		  writeSummaryLink(ol,qq.data(),qq.data(),first);
+		  }
   }
+	   
   if (!first)
   {
     ol.writeString("  </div>\n");
@@ -3490,3 +3517,5 @@
   insertMember(md);
 }
 
+
+ 
--- src/vhdlscanner.l	2010-03-14 08:28:10.000000000 -0700
+++ addon/vhdlscanner.l	2010-10-17 10:51:40.000000000 -0700
@@ -1558,7 +1558,7 @@
 }
    */
 
-<*>{BR}*"--!"[^{}\n][^\n]*\n/{B}*"--!" { // multi line comment
+<*>{B}*"--!"[^{}\n][^\n]*\n/{B}*"--!" { // multi line comment
   if (iDocLine==-1) iDocLine=yyLineNr;
   // signal clk :in std_logic; --!@brief global clock
   // --!@brief  global reset
--- src/vhdldocgen.cpp	2010-09-11 08:10:38.000000000 -0700
+++ addon/vhdldocgen.cpp	2010-10-17 18:18:30.000000000 -0700
@@ -1300,7 +1300,9 @@
       bool k=VhdlDocGen::isNumber(find); // is this a number
       if (k)
       {
+	   ol.docify(" ");
 	VhdlDocGen::startFonts(find,"vhdldigit",ol);
+         ol.docify(" ");
       }
       else if (j != 0 && ss)
       {
@@ -1579,6 +1581,7 @@
     const ArgumentList* al,
     bool /*type*/)
 {
+  //static bool optVerilog       = Config_getBool("OPTIMIZE_OUTPUT_VERILOG"); 
   if (al==0) return;
   bool sem=FALSE;    
   ol.enableAll();
@@ -1597,30 +1600,28 @@
   { 
     ol.startParameterType(first,"");  
     if (first) ol.writeChar('(');
-    if (!VhdlDocGen::isProcess(md))
-    {
-      if (TRUE) //VhdlDocGen::isProcedure(md))
+      if (VhdlDocGen::isProcedure(md))
       {
 	startFonts(arg->defval,"keywordtype",ol);
 	ol.docify(" ");
       } 
-      // linkifyText(TextGeneratorOLImpl(ol),md->getClassDef(),md->getBodyDef(),md->name(),arg->type);
+      ol.endParameterType();
+	  ol.startParameterName(true);
       VhdlDocGen::writeFormatString(arg->name,ol,md);
       ol.docify(" ");
 
       if (VhdlDocGen::isProcedure(md))
 	startFonts(arg->attrib,"stringliteral",ol);
-      else
+	  else if(VhdlDocGen::isVhdlFunction(md))
 	startFonts(QCString("in"),"stringliteral",ol);
-    }
+    
+  
     ol.docify(" ");
     ol.disable(OutputGenerator::Man);
     ol.startEmphasis();
     ol.enable(OutputGenerator::Man);
     if (!VhdlDocGen::isProcess(md))
       startFonts(arg->type,"vhdlkeyword",ol);
-    else
-      startFonts(arg->name,"vhdlkeyword",ol);
     ol.disable(OutputGenerator::Man);
     ol.endEmphasis();
     ol.enable(OutputGenerator::Man);
@@ -1630,14 +1631,14 @@
     else
       ol.docify(" ) ");
 
-    ol.endParameterName(FALSE,FALSE,FALSE); 
-
+    ol.endParameterName(TRUE,FALSE,FALSE); 
     sem=TRUE;        
     first=FALSE;
   }
 
 } // writeDocFunProc
 
+*/
 /*!
  * returns TRUE if this string is a function prototype or 
  * FALSE if this is a procedure
@@ -1778,6 +1779,8 @@
     MemberDef* memdef=VhdlDocGen::findMember(na,nn);
     if (memdef && memdef->isLinkable()) 
     { 
+        ol.docify(" ");
+      
       ol.startBold();
       //ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,mdef->typeString());                
        writeLink(memdef,ol);
@@ -1786,8 +1789,10 @@
     }
     else
     {
+     ol.docify(" ");
       QCString ttype=mdef->typeString();
       VhdlDocGen::formatString(ttype,ol,mdef);
+     ol.docify(" "); 
     }
     ol.docify(mdef->name());
     VhdlDocGen::writeFuncProcDocu(mdef,ol, mdef->argumentList().pointer());
@@ -1947,6 +1952,8 @@
       VhdlDocGen::formatString(ltype,ol,mdef);
       ol.endBold();
       ol.insertMemberAlign();
+      ol.docify(" ");
+	
       writeLink(mdef,ol);
       if (alp!=0 && mm==VhdlDocGen::FUNCTION)
 	VhdlDocGen::writeFunctionProto(ol,alp.pointer(),mdef);
@@ -1986,11 +1993,11 @@
     case VhdlDocGen::GENERIC:
     case VhdlDocGen::PORT:
       writeLink(mdef,ol);
+     ol.docify(" ");
       ol.insertMemberAlign();
       if (mm==VhdlDocGen::GENERIC)
       {
 	ol.startBold();
-	ol.docify(" ");
 	VhdlDocGen::formatString(ltype,ol,mdef);
 	ol.endBold();
       }
@@ -2016,6 +2023,8 @@
     case VhdlDocGen::CONFIG:
       writeLink(mdef,ol);
       ol.insertMemberAlign();
+      ol.docify("  ");
+       
       ol.startBold();
       ol.docify(ltype);
       ol.endBold();
@@ -2070,6 +2079,7 @@
       break;
     case VhdlDocGen::RECORD:    
       writeLink(mdef,ol);
+	  ol.docify(" ");
       ol.startBold();
       if (ltype.isEmpty()) ol.docify("     : record");    
       ol.insertMemberAlign();
@@ -2080,6 +2090,7 @@
     case VhdlDocGen::UNITS:
       ol.startBold();
       writeLink(mdef,ol);
+	  ol.docify(" ");
       if (ltype.isEmpty()) ol.docify("     : unit");    
       ol.insertMemberAlign();
       if (!ltype.isEmpty())
@@ -2220,7 +2231,7 @@
 
   if (title) 
   {
-    ol.startMemberHeader(ml->listTypeAsString());
+    ol.startMemberHeader(title);
     ol.parseText(title);
     ol.endMemberHeader();
     ol.docify(" ");
--- src/classdef.h	2010-06-18 10:43:42.000000000 -0700
+++ addon/classdef.h	2010-10-17 15:18:50.000000000 -0700
@@ -351,6 +351,7 @@
     void writeAuthorSection(OutputList &ol);
     
     ClassDefImpl *m_impl;
+    QStrList *m_qsl;
 
 };
 
