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
5386a768
Commit
5386a768
authored
Sep 07, 2013
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #31 from albert-github/feature/bug_707685
Feature/bug 707685
parents
ec9d0e37
2e03209d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
3 deletions
+37
-3
doxywizard.cpp
addon/doxywizard/doxywizard.cpp
+6
-2
fortranscanner.l
src/fortranscanner.l
+31
-1
No files found.
addon/doxywizard/doxywizard.cpp
View file @
5386a768
...
@@ -224,9 +224,13 @@ void MainWindow::updateConfigFileName(const QString &fileName)
...
@@ -224,9 +224,13 @@ void MainWindow::updateConfigFileName(const QString &fileName)
void
MainWindow
::
loadConfigFromFile
(
const
QString
&
fileName
)
void
MainWindow
::
loadConfigFromFile
(
const
QString
&
fileName
)
{
{
m_expert
->
loadConfig
(
fileName
);
// save full path info of original file
m_wizard
->
refresh
();
QString
absFileName
=
QFileInfo
(
fileName
).
absoluteFilePath
();
// updates the current directory
updateConfigFileName
(
fileName
);
updateConfigFileName
(
fileName
);
// open the specified configuration file
m_expert
->
loadConfig
(
absFileName
);
m_wizard
->
refresh
();
updateLaunchButtonState
();
updateLaunchButtonState
();
m_modified
=
false
;
m_modified
=
false
;
updateTitle
();
updateTitle
();
...
...
src/fortranscanner.l
100644 → 100755
View file @
5386a768
...
@@ -1366,7 +1366,7 @@ static const char* prepassFixedForm(const char* contents)
...
@@ -1366,7 +1366,7 @@ static const char* prepassFixedForm(const char* contents)
int prevLineLength=0;
int prevLineLength=0;
int prevLineAmpOrExclIndex=-1;
int prevLineAmpOrExclIndex=-1;
bool emptyLabel=TRUE;
bool emptyLabel=TRUE;
int newContentsSize = strlen(contents)+
2; // \000
and one spare character (to avoid reallocation)
int newContentsSize = strlen(contents)+
3; // \000, \n (when necessary)
and one spare character (to avoid reallocation)
char* newContents = (char*)malloc(newContentsSize);
char* newContents = (char*)malloc(newContentsSize);
for(int i=0, j=0;;i++,j++) {
for(int i=0, j=0;;i++,j++) {
...
@@ -1390,6 +1390,14 @@ static const char* prepassFixedForm(const char* contents)
...
@@ -1390,6 +1390,14 @@ static const char* prepassFixedForm(const char* contents)
break;
break;
case '\000':
case '\000':
newContents[j]='\000';
newContents[j]='\000';
newContentsSize = strlen(newContents);
if (newContents[newContentsSize - 1] != '\n')
{
// to be on the safe side
newContents = (char*)realloc(newContents, newContentsSize+2);
newContents[newContentsSize] = '\n';
newContents[newContentsSize + 1] = '\000';
}
return newContents;
return newContents;
case 'C':
case 'C':
case 'c':
case 'c':
...
@@ -1425,6 +1433,15 @@ static const char* prepassFixedForm(const char* contents)
...
@@ -1425,6 +1433,15 @@ static const char* prepassFixedForm(const char* contents)
break;
break;
}
}
}
}
newContentsSize = strlen(newContents);
if (newContents[newContentsSize - 1] != '\n')
{
// to be on the safe side
newContents = (char*)realloc(newContents, newContentsSize+2);
newContents[newContentsSize] = '\n';
newContents[newContentsSize + 1] = '\000';
}
return newContents;
return newContents;
}
}
...
@@ -2228,6 +2245,7 @@ level--;
...
@@ -2228,6 +2245,7 @@ level--;
static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
{
{
char *tmpBuf = NULL;
initParser();
initParser();
defaultProtection = Public;
defaultProtection = Public;
...
@@ -2258,6 +2276,14 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
...
@@ -2258,6 +2276,14 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
//clock_t end=clock();
//clock_t end=clock();
//printf("CPU time used=%f\n", ((double) (end-start))/CLOCKS_PER_SEC);
//printf("CPU time used=%f\n", ((double) (end-start))/CLOCKS_PER_SEC);
}
}
else if (inputString[strlen(fileBuf)-1] != '\n')
{
tmpBuf = (char *)malloc(strlen(fileBuf)+2);
strcpy(tmpBuf,fileBuf);
tmpBuf[strlen(fileBuf)]= '\n';
tmpBuf[strlen(fileBuf)+1]= '\000';
inputString = tmpBuf;
}
yyLineNr= 1 ;
yyLineNr= 1 ;
yyFileName = fileName;
yyFileName = fileName;
...
@@ -2291,6 +2317,10 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
...
@@ -2291,6 +2317,10 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
rt->program.resize(0);
rt->program.resize(0);
delete current; current=0;
delete current; current=0;
moduleProcedures.clear();
moduleProcedures.clear();
if (tmpBuf) {
free((char*)tmpBuf);
inputString=NULL;
}
if (isFixedForm) {
if (isFixedForm) {
free((char*)inputString);
free((char*)inputString);
inputString=NULL;
inputString=NULL;
...
...
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