Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
db51e5dd
Commit
db51e5dd
authored
Jun 16, 2013
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 702066 - VHDL: Bad HTML formatting when using inline sources
parent
0e1e9f73
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
14 deletions
+26
-14
vhdlcode.l
src/vhdlcode.l
+26
-14
No files found.
src/vhdlcode.l
View file @
db51e5dd
...
...
@@ -63,7 +63,7 @@ static bool isFuncProto=FALSE;
static bool isComponent=FALSE;
static bool isPackageBody=FALSE;
static bool isProto = FALSE;
static bool g_startCode = FALSE;
static QCString g_PrevString;
static QCString g_CurrClass;
static QDict<QCString>g_vhdlKeyDict;
...
...
@@ -185,6 +185,7 @@ static void startCodeLine()
//if (g_currentFontClass) { g_code->endFontClass(); }
if (g_sourceFileDef)
{
g_startCode=TRUE;
//QCString lineNumber,lineAnchor;
//lineNumber.sprintf("%05d",g_yyLineNr);
//lineAnchor.sprintf("l%05d",g_yyLineNr);
...
...
@@ -247,12 +248,15 @@ static void endCodeLine()
static void nextCodeLine()
{
if (g_startCode)
{
endCodeLine(); // </div>
}
const char *fc = g_currentFontClass;
endCodeLine();
if (g_yyLineNr<g_inputLines)
{
g_currentFontClass = fc;
startCodeLine();
startCodeLine();
//<div>
}
}
...
...
@@ -347,7 +351,7 @@ static void writeWord(const char *word,const char* curr_class=0,bool classLink=F
/*! write a code fragment `text' that may span multiple lines, inserting
* line numbers for each line.
*/
static void codifyLines(const char *text,const char *cl=0,bool classlink=FALSE)
static void codifyLines(const char *text,const char *cl=0,bool classlink=FALSE
,bool comment=FALSE
)
{
if (text==0) return;
//printf("codifyLines(%d,\"%s\")\n",g_yyLineNr,text);
...
...
@@ -365,12 +369,21 @@ static void codifyLines(const char *text,const char *cl=0,bool classlink=FALSE)
line = line.left((int)(p-sp)-1);
//*(p-1)='\0';
//g_code->codify(sp);
writeWord(line,cl,classlink);
if (comment)
{
writeFont("keyword",line.data());
}
else
{
writeWord(line,cl,classlink);
}
nextCodeLine();
}
else
{
//g_code->codify(sp);
if (comment)
writeFont("keyword",sp);
else
writeWord(sp,cl,classlink);
done=TRUE;
}
...
...
@@ -1465,9 +1478,9 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
else // normal comment
{
startFontClass("keyword");
codifyLines(text);
endFontClass();
//
startFontClass("keyword");
codifyLines(text
,0,FALSE,TRUE
);
//
endFontClass();
}
}
<*>{TEXTT} { // found normal or special comment after something
...
...
@@ -1480,9 +1493,9 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
else // normal comment
{
startFontClass("keyword");
codifyLines(text);
endFontClass();
//
startFontClass("keyword");
codifyLines(text
,0,FALSE,TRUE
);
//
endFontClass();
}
}
...
...
@@ -1581,8 +1594,7 @@ void parseVhdlCode(CodeOutputInterface &od,const char *className,const QCString
delete g_sourceFileDef;
g_sourceFileDef=0;
}
return;
g_startCode=FALSE;
}
void codeFreeVhdlScanner()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment