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
962ad74f
Commit
962ad74f
authored
Jun 16, 2014
by
Petr Prikryl
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into devel
parents
39bdafef
8cac977d
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
2297 additions
and
2288 deletions
+2297
-2288
inputstring.cpp
addon/doxywizard/inputstring.cpp
+1
-1
configure
configure
+14
-6
install.doc
doc/install.doc
+1
-0
translator.py
doc/translator.py
+2002
-2029
qstring.cpp
qtools/qstring.cpp
+2
-0
code.l
src/code.l
+81
-75
config.xml
src/config.xml
+1
-1
configgen.py
src/configgen.py
+164
-164
lang_cfg.py
src/lang_cfg.py
+3
-3
languages.py
src/languages.py
+6
-6
latexgen.cpp
src/latexgen.cpp
+1
-1
portable_c.c
src/portable_c.c
+6
-0
scanner.l
src/scanner.l
+12
-0
util.cpp
src/util.cpp
+3
-2
No files found.
addon/doxywizard/inputstring.cpp
View file @
962ad74f
...
@@ -167,7 +167,7 @@ void InputString::setEnabled(bool state)
...
@@ -167,7 +167,7 @@ void InputString::setEnabled(bool state)
{
{
m_lab
->
setEnabled
(
state
);
m_lab
->
setEnabled
(
state
);
if
(
m_le
)
m_le
->
setEnabled
(
state
);
if
(
m_le
)
m_le
->
setEnabled
(
state
);
if
(
m_im
)
m_
le
->
setEnabled
(
state
);
if
(
m_im
)
m_
im
->
setEnabled
(
state
);
if
(
m_br
)
m_br
->
setEnabled
(
state
);
if
(
m_br
)
m_br
->
setEnabled
(
state
);
if
(
m_com
)
m_com
->
setEnabled
(
state
);
if
(
m_com
)
m_com
->
setEnabled
(
state
);
updateDefault
();
updateDefault
();
...
...
configure
View file @
962ad74f
...
@@ -594,9 +594,10 @@ fi
...
@@ -594,9 +594,10 @@ fi
# - check for python ----------------------------------------------------------
# - check for python ----------------------------------------------------------
python_version
=
0
printf
" Checking for python... "
printf
" Checking for python... "
if
test
"
$f_python
"
=
NO
;
then
if
test
"
$f_python
"
=
NO
;
then
python_names
=
"python2 python"
python_names
=
"python
3 python
2 python"
python_dirs
=
"
$bin_dirs
/usr/bin /usr/local/bin /bin /sbin"
python_dirs
=
"
$bin_dirs
/usr/bin /usr/local/bin /bin /sbin"
python_prog
=
NO
python_prog
=
NO
python_found
=
NO
python_found
=
NO
...
@@ -604,26 +605,33 @@ if test "$f_python" = NO; then
...
@@ -604,26 +605,33 @@ if test "$f_python" = NO; then
for
j
in
$python_dirs
;
do
for
j
in
$python_dirs
;
do
if
test
-x
"
$j
/
$i
"
;
then
if
test
-x
"
$j
/
$i
"
;
then
python_found
=
YES
python_found
=
YES
if
test
`
$j
/
$i
-c
"import sys; print sys.version_info[0]"
`
=
2
;
then
if
test
`
$j
/
$i
-c
"import sys; print(sys.version_info[0])"
`
=
3
;
then
python_prog
=
"
$j
/
$i
"
python_prog
=
"
$j
/
$i
"
;
python_version
=
`
$j
/
$i
-c
"import platform; print(platform.python_version())"
`
;
break
2
break
2
elif
test
`
$j
/
$i
-c
"import sys; print(sys.version_info[0])"
`
=
2
;
then
if
test
`
$j
/
$i
-c
"import sys; print(sys.version_info[1])"
`
-ge
6
;
then
python_prog
=
"
$j
/
$i
"
;
python_version
=
`
$j
/
$i
-c
"import platform; print(platform.python_version())"
`
;
break
2
fi
fi
fi
fi
fi
done
done
done
done
f_python
=
"
$python_prog
"
f_python
=
"
$python_prog
"
fi
fi
if
test
"
$f_python
"
=
NO
;
then
if
test
"
$f_python
"
=
NO
;
then
if
test
"
$python_found
"
=
YES
;
then
if
test
"
$python_found
"
=
YES
;
then
echo
"version should be python 2."
echo
"version should be python 2.
6 or higher.
"
else
else
echo
"not found!"
;
echo
"not found!"
;
fi
fi
echo
echo
exit
2
exit
2
fi
fi
echo
"using
$f_python
"
;
echo
"using
$f_python
(version
$python_version
)
"
;
# - check for perl ------------------------------------------------------------
# - check for perl ------------------------------------------------------------
...
...
doc/install.doc
View file @
962ad74f
...
@@ -556,6 +556,7 @@ open-source tools:
...
@@ -556,6 +556,7 @@ open-source tools:
<li>GNU bison version 2.5 (Linux) and 2.3 (MacOSX)
<li>GNU bison version 2.5 (Linux) and 2.3 (MacOSX)
<li>GNU make version 3.81
<li>GNU make version 3.81
<li>Perl version 5.12
<li>Perl version 5.12
<li>Python verion 2.7 and 3.4
<li>TeX Live 2009 (or later)
<li>TeX Live 2009 (or later)
</ul>
</ul>
...
...
doc/translator.py
View file @
962ad74f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
qtools/qstring.cpp
View file @
962ad74f
...
@@ -11601,7 +11601,9 @@ static inline bool is_arabic(unsigned short x) {
...
@@ -11601,7 +11601,9 @@ static inline bool is_arabic(unsigned short x) {
((x >= 0xfb50) && (x <= 0xfdff)) ||
((x >= 0xfb50) && (x <= 0xfdff)) ||
((x >= 0xfe70) && (x <= 0xfeff)));
((x >= 0xfe70) && (x <= 0xfeff)));
}
}
#endif
#ifndef QT_NO_UNICODETABLES
static
inline
bool
is_neutral
(
unsigned
short
dir
)
{
static
inline
bool
is_neutral
(
unsigned
short
dir
)
{
return
((
dir
==
QChar
::
DirB
)
||
return
((
dir
==
QChar
::
DirB
)
||
(
dir
==
QChar
::
DirS
)
||
(
dir
==
QChar
::
DirS
)
||
...
...
src/code.l
View file @
962ad74f
...
@@ -329,44 +329,44 @@ class CallContext
...
@@ -329,44 +329,44 @@ class CallContext
public:
public:
struct Ctx
struct Ctx
{
{
Ctx() : name(g_name), type(g_type),
c
d(0) {}
Ctx() : name(g_name), type(g_type), d(0) {}
QCString name;
QCString name;
QCString type;
QCString type;
ClassDef *c
d;
Definition *
d;
};
};
CallContext()
CallContext()
{
{
m_
class
List.append(new Ctx);
m_
def
List.append(new Ctx);
m_
class
List.setAutoDelete(TRUE);
m_
def
List.setAutoDelete(TRUE);
}
}
virtual ~CallContext() {}
virtual ~CallContext() {}
void set
Class(ClassDef *c
d)
void set
Scope(Definition *
d)
{
{
Ctx *ctx = m_
class
List.getLast();
Ctx *ctx = m_
def
List.getLast();
if (ctx)
if (ctx)
{
{
DBG_CTX((stderr,"** Set call context %s (%p)\n",
cd==0 ? "<null>" : cd->name().data(),c
d));
DBG_CTX((stderr,"** Set call context %s (%p)\n",
d==0 ? "<null>" : d->name().data(),
d));
ctx->
cd=c
d;
ctx->
d=
d;
}
}
}
}
void pushScope()
void pushScope()
{
{
m_
class
List.append(new Ctx);
m_
def
List.append(new Ctx);
DBG_CTX((stderr,"** Push call context %d\n",m_
class
List.count()));
DBG_CTX((stderr,"** Push call context %d\n",m_
def
List.count()));
}
}
void popScope()
void popScope()
{
{
if (m_
class
List.count()>1)
if (m_
def
List.count()>1)
{
{
DBG_CTX((stderr,"** Pop call context %d\n",m_
class
List.count()));
DBG_CTX((stderr,"** Pop call context %d\n",m_
def
List.count()));
Ctx *ctx = m_
class
List.getLast();
Ctx *ctx = m_
def
List.getLast();
if (ctx)
if (ctx)
{
{
g_name = ctx->name;
g_name = ctx->name;
g_type = ctx->type;
g_type = ctx->type;
}
}
m_
class
List.removeLast();
m_
def
List.removeLast();
}
}
else
else
{
{
...
@@ -376,17 +376,17 @@ class CallContext
...
@@ -376,17 +376,17 @@ class CallContext
void clear()
void clear()
{
{
DBG_CTX((stderr,"** Clear call context\n"));
DBG_CTX((stderr,"** Clear call context\n"));
m_
class
List.clear();
m_
def
List.clear();
m_
class
List.append(new Ctx);
m_
def
List.append(new Ctx);
}
}
ClassDef *getClass
() const
Definition *getScope
() const
{
{
Ctx *ctx = m_
class
List.getLast();
Ctx *ctx = m_
def
List.getLast();
if (ctx) return ctx->
c
d; else return 0;
if (ctx) return ctx->d; else return 0;
}
}
private:
private:
QList<Ctx> m_
classList;
QList<Ctx> m_
defList;
};
};
static CallContext g_theCallContext;
static CallContext g_theCallContext;
...
@@ -732,7 +732,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
...
@@ -732,7 +732,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
if (md)
if (md)
{
{
//printf("name=%s scope=%s\n",locName.data(),scope.data());
//printf("name=%s scope=%s\n",locName.data(),scope.data());
g_theCallContext.set
Class
(stripClassName(md->typeString(),md->getOuterScope()));
g_theCallContext.set
Scope
(stripClassName(md->typeString(),md->getOuterScope()));
return md;
return md;
}
}
}
}
...
@@ -745,7 +745,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
...
@@ -745,7 +745,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
if (md)
if (md)
{
{
//printf("name=%s scope=%s\n",locName.data(),scope.data());
//printf("name=%s scope=%s\n",locName.data(),scope.data());
g_theCallContext.set
Class
(stripClassName(md->typeString(),md->getOuterScope()));
g_theCallContext.set
Scope
(stripClassName(md->typeString(),md->getOuterScope()));
return md;
return md;
}
}
}
}
...
@@ -760,7 +760,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
...
@@ -760,7 +760,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
if (mcd!=VariableContext::dummyContext)
if (mcd!=VariableContext::dummyContext)
{
{
DBG_CTX((stderr,"local var `%s' mcd=%s\n",name.data(),mcd->name().data()));
DBG_CTX((stderr,"local var `%s' mcd=%s\n",name.data(),mcd->name().data()));
g_theCallContext.set
Class
(mcd);
g_theCallContext.set
Scope
(mcd);
}
}
}
}
else
else
...
@@ -778,7 +778,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
...
@@ -778,7 +778,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
if (g_scopeStack.top()!=CLASSBLOCK)
if (g_scopeStack.top()!=CLASSBLOCK)
{
{
DBG_CTX((stderr,"class member `%s' mcd=%s\n",name.data(),mcd->name().data()));
DBG_CTX((stderr,"class member `%s' mcd=%s\n",name.data(),mcd->name().data()));
g_theCallContext.set
Class
(stripClassName(md->typeString(),md->getOuterScope()));
g_theCallContext.set
Scope
(stripClassName(md->typeString(),md->getOuterScope()));
}
}
return md;
return md;
}
}
...
@@ -794,7 +794,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
...
@@ -794,7 +794,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
MemberDef *md=mn->getFirst();
MemberDef *md=mn->getFirst();
if (!md->isStatic() || md->getBodyDef()==g_sourceFileDef)
if (!md->isStatic() || md->getBodyDef()==g_sourceFileDef)
{
{
g_theCallContext.set
Class
(stripClassName(md->typeString(),md->getOuterScope()));
g_theCallContext.set
Scope
(stripClassName(md->typeString(),md->getOuterScope()));
return md;
return md;
}
}
return 0;
return 0;
...
@@ -816,7 +816,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
...
@@ -816,7 +816,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
(g_forceTagReference.isEmpty() || g_forceTagReference==md->getReference())
(g_forceTagReference.isEmpty() || g_forceTagReference==md->getReference())
)
)
{
{
g_theCallContext.set
Class
(stripClassName(md->typeString(),md->getOuterScope()));
g_theCallContext.set
Scope
(stripClassName(md->typeString(),md->getOuterScope()));
//printf("returning member %s in source file %s\n",md->name().data(),g_sourceFileDef->name().data());
//printf("returning member %s in source file %s\n",md->name().data(),g_sourceFileDef->name().data());
return md;
return md;
}
}
...
@@ -829,15 +829,15 @@ static MemberDef *setCallContextForVar(const QCString &name)
...
@@ -829,15 +829,15 @@ static MemberDef *setCallContextForVar(const QCString &name)
static void updateCallContextForSmartPointer()
static void updateCallContextForSmartPointer()
{
{
ClassDef *cd = g_theCallContext.getClass
();
Definition *d = g_theCallContext.getScope
();
//printf("updateCallContextForSmartPointer() cd=%s\n",cd ?
c
d->name().data() : "<none>");
//printf("updateCallContextForSmartPointer() cd=%s\n",cd ? d->name().data() : "<none>");
MemberDef *md;
MemberDef *md;
if (
cd && (md=cd
->isSmartPointer()))
if (
d && d->definitionType()==Definition::TypeClass && (md=((ClassDef*)d)
->isSmartPointer()))
{
{
ClassDef *ncd = stripClassName(md->typeString(),md->getOuterScope());
ClassDef *ncd = stripClassName(md->typeString(),md->getOuterScope());
if (ncd)
if (ncd)
{
{
g_theCallContext.set
Class
(ncd);
g_theCallContext.set
Scope
(ncd);
//printf("Found smart pointer call %s->%s!\n",cd->name().data(),ncd->name().data());
//printf("Found smart pointer call %s->%s!\n",cd->name().data(),ncd->name().data());
}
}
}
}
...
@@ -879,7 +879,7 @@ static bool getLinkInScope(const QCString &c, // scope
...
@@ -879,7 +879,7 @@ static bool getLinkInScope(const QCString &c, // scope
if (md->getGroupDef()) d = md->getGroupDef();
if (md->getGroupDef()) d = md->getGroupDef();
if (d && d->isLinkable())
if (d && d->isLinkable())
{
{
g_theCallContext.set
Class
(stripClassName(md->typeString(),md->getOuterScope()));
g_theCallContext.set
Scope
(stripClassName(md->typeString(),md->getOuterScope()));
//printf("g_currentDefinition=%p g_currentMemberDef=%p g_insideBody=%d\n",
//printf("g_currentDefinition=%p g_currentMemberDef=%p g_insideBody=%d\n",
// g_currentDefinition,g_currentMemberDef,g_insideBody);
// g_currentDefinition,g_currentMemberDef,g_insideBody);
...
@@ -965,8 +965,18 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
...
@@ -965,8 +965,18 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
cd=getResolvedClass(d,g_sourceFileDef,bareName,&md); // try unspecialized version
cd=getResolvedClass(d,g_sourceFileDef,bareName,&md); // try unspecialized version
}
}
}
}
NamespaceDef *nd = getResolvedNamespace(className);
if (nd)
{
g_theCallContext.setScope(nd);
addToSearchIndex(className);
writeMultiLineCodeLink(*g_code,nd,clName);
return;
}
//printf("md=%s\n",md?md->name().data():"<none>");
//printf("md=%s\n",md?md->name().data():"<none>");
DBG_CTX((stderr,"is found as a type %s\n",cd?cd->name().data():"<null>"));
DBG_CTX((stderr,"is found as a type cd=%s nd=%s\n",
cd?cd->name().data():"<null>",
nd?nd->name().data():"<null>"));
if (cd==0 && md==0) // also see if it is variable or enum or enum value
if (cd==0 && md==0) // also see if it is variable or enum or enum value
{
{
if (getLink(g_classScope,clName,ol,clName,varOnly))
if (getLink(g_classScope,clName,ol,clName,varOnly))
...
@@ -981,7 +991,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
...
@@ -981,7 +991,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
if (lcd!=VariableContext::dummyContext)
if (lcd!=VariableContext::dummyContext)
{
{
//printf("non-dummy context lcd=%s!\n",lcd->name().data());
//printf("non-dummy context lcd=%s!\n",lcd->name().data());
g_theCallContext.set
Class
(lcd);
g_theCallContext.set
Scope
(lcd);
// to following is needed for links to a global variable, but is
// to following is needed for links to a global variable, but is
// no good for a link to a local variable that is also a global symbol.
// no good for a link to a local variable that is also a global symbol.
...
@@ -1011,7 +1021,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
...
@@ -1011,7 +1021,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
}
}
writeMultiLineCodeLink(ol,cd,clName);
writeMultiLineCodeLink(ol,cd,clName);
addToSearchIndex(className);
addToSearchIndex(className);
g_theCallContext.set
Class
(cd);
g_theCallContext.set
Scope
(cd);
if (md)
if (md)
{
{
Definition *d = md->getOuterScope()==Doxygen::globalScope ?
Definition *d = md->getOuterScope()==Doxygen::globalScope ?
...
@@ -1111,7 +1121,7 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,MemberDef *xmd,const
...
@@ -1111,7 +1121,7 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,MemberDef *xmd,const
ClassDef *typeClass = stripClassName(removeAnonymousScopes(xmd->typeString()),xmd->getOuterScope());
ClassDef *typeClass = stripClassName(removeAnonymousScopes(xmd->typeString()),xmd->getOuterScope());
DBG_CTX((stderr,"%s -> typeName=%p\n",xmd->typeString(),typeClass));
DBG_CTX((stderr,"%s -> typeName=%p\n",xmd->typeString(),typeClass));
g_theCallContext.set
Class
(typeClass);
g_theCallContext.set
Scope
(typeClass);
Definition *xd = xmd->getOuterScope()==Doxygen::globalScope ?
Definition *xd = xmd->getOuterScope()==Doxygen::globalScope ?
xmd->getFileDef() : xmd->getOuterScope();
xmd->getFileDef() : xmd->getOuterScope();
...
@@ -1142,18 +1152,42 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,MemberDef *xmd,const
...
@@ -1142,18 +1152,42 @@ static bool generateClassMemberLink(CodeOutputInterface &ol,MemberDef *xmd,const
return FALSE;
return FALSE;
}
}
static bool generateClassMemberLink(CodeOutputInterface &ol,
ClassDef *mcd
,const char *memName)
static bool generateClassMemberLink(CodeOutputInterface &ol,
Definition *def
,const char *memName)
{
{
if (
mcd
)
if (
def && def->definitionType()==Definition::TypeClass
)
{
{
MemberDef *xmd = mcd->getMemberByName(memName);
ClassDef *cd = (ClassDef*)def;
//printf("generateClassMemberLink(class=%s,member=%s)=%p\n",mcd->name().data(),memName,xmd);
MemberDef *xmd = cd->getMemberByName(memName);
//printf("generateClassMemberLink(class=%s,member=%s)=%p\n",def->name().data(),memName,xmd);
if (xmd)
if (xmd)
{
{
return generateClassMemberLink(ol,xmd,memName);
return generateClassMemberLink(ol,xmd,memName);
}
}
else
{
Definition *innerDef = cd->findInnerCompound(memName);
if (innerDef)
{
g_theCallContext.setScope(innerDef);
addToSearchIndex(memName);
writeMultiLineCodeLink(*g_code,innerDef,memName);
return TRUE;
}
}
}
else if (def && def->definitionType()==Definition::TypeNamespace)
{
NamespaceDef *nd = (NamespaceDef*)def;
//printf("Looking for %s inside namespace %s\n",memName,nd->name().data());
Definition *innerDef = nd->findInnerCompound(memName);
if (innerDef)
{
g_theCallContext.setScope(innerDef);
addToSearchIndex(memName);
writeMultiLineCodeLink(*g_code,innerDef,memName);
return TRUE;
}
}
}
return FALSE;
return FALSE;
}
}
...
@@ -1743,9 +1777,7 @@ B [ \t]
...
@@ -1743,9 +1777,7 @@ B [ \t]
BN [ \t\n\r]
BN [ \t\n\r]
ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
ID "$"?[a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF]*
SEP ("::"|"\\")
SEP ("::"|"\\")
SEPCS (".")
SCOPENAME ({SEP}{BN}*)?({ID}{BN}*{SEP}{BN}*)*("~"{BN}*)?{ID}
SCOPENAME ({SEP}{BN}*)?({ID}{BN}*{SEP}{BN}*)*("~"{BN}*)?{ID}
SCOPENAMECS ({SEPCS}{BN}*)?({ID}{BN}*{SEPCS}{BN}*)*("~"{BN}*)?{ID}
TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">"
TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">"
SCOPETNAME (((({ID}{TEMPLIST}?){BN}*)?{SEP}{BN}*)*)((~{BN}*)?{ID})
SCOPETNAME (((({ID}{TEMPLIST}?){BN}*)?{SEP}{BN}*)*)((~{BN}*)?{ID})
SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*{SEP}{BN}*)+
SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*{SEP}{BN}*)+
...
@@ -2490,20 +2522,6 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
...
@@ -2490,20 +2522,6 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
generateClassOrGlobalLink(*g_code,yytext);
generateClassOrGlobalLink(*g_code,yytext);
g_name+=yytext;
g_name+=yytext;
}
}
<Body>{SCOPENAMECS}/{BN}*[;,)\]] { // "int var;" or "var, var2" or "debug(f) macro"
if (!g_insideCS && !g_insideJava)
{
REJECT;
}
else
{
addType();
// changed this to generateFunctionLink, see bug 624514
//generateClassOrGlobalLink(*g_code,yytext,FALSE,TRUE);
generateFunctionLink(*g_code,yytext);
g_name+=yytext;
}
}
<Body>{SCOPENAME}/{BN}*[;,)\]] { // "int var;" or "var, var2" or "debug(f) macro"
<Body>{SCOPENAME}/{BN}*[;,)\]] { // "int var;" or "var, var2" or "debug(f) macro"
addType();
addType();
// changed this to generateFunctionLink, see bug 624514
// changed this to generateFunctionLink, see bug 624514
...
@@ -2511,18 +2529,6 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
...
@@ -2511,18 +2529,6 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
generateFunctionLink(*g_code,yytext);
generateFunctionLink(*g_code,yytext);
g_name+=yytext;
g_name+=yytext;
}
}
<Body>{SCOPENAMECS}/{B}* { // p->func()
if (!g_insideCS && !g_insideJava)
{
REJECT;
}
else
{
addType();
generateClassOrGlobalLink(*g_code,yytext);
g_name+=yytext;
}
}
<Body>{SCOPENAME}/{B}* { // p->func()
<Body>{SCOPENAME}/{B}* { // p->func()
addType();
addType();
generateClassOrGlobalLink(*g_code,yytext);
generateClassOrGlobalLink(*g_code,yytext);
...
@@ -2657,9 +2663,9 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
...
@@ -2657,9 +2663,9 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
BEGIN( MemberCall );
BEGIN( MemberCall );
}
}
<MemberCall>{SCOPETNAME}/{BN}*"(" {
<MemberCall>{SCOPETNAME}/{BN}*"(" {
if (g_theCallContext.get
Class
())
if (g_theCallContext.get
Scope
())
{
{
if (!generateClassMemberLink(*g_code,g_theCallContext.get
Class
(),yytext))
if (!generateClassMemberLink(*g_code,g_theCallContext.get
Scope
(),yytext))
{
{
g_code->codify(yytext);
g_code->codify(yytext);
addToSearchIndex(yytext);
addToSearchIndex(yytext);
...
@@ -2684,10 +2690,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
...
@@ -2684,10 +2690,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
}
}
}
<MemberCall>{SCOPENAME}/{B}* {
<MemberCall>{SCOPENAME}/{B}* {
if (g_theCallContext.get
Class
())
if (g_theCallContext.get
Scope
())
{
{
DBG_CTX((stderr,"g_theCallContext.getClass()=%p\n",g_theCallContext.get
Class
()));
DBG_CTX((stderr,"g_theCallContext.getClass()=%p\n",g_theCallContext.get
Scope
()));
if (!generateClassMemberLink(*g_code,g_theCallContext.get
Class
(),yytext))
if (!generateClassMemberLink(*g_code,g_theCallContext.get
Scope
(),yytext))
{
{
g_code->codify(yytext);
g_code->codify(yytext);
addToSearchIndex(yytext);
addToSearchIndex(yytext);
...
@@ -2733,7 +2739,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
...
@@ -2733,7 +2739,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
if (*yytext!='[' && !g_type.isEmpty())
if (*yytext!='[' && !g_type.isEmpty())
{
{
//printf("g_scopeStack.bottom()=%p\n",g_scopeStack.bottom());
//printf("g_scopeStack.bottom()=%p\n",g_scopeStack.bottom());
if (g_scopeStack.top()!=CLASSBLOCK)
//if (g_scopeStack.top()!=CLASSBLOCK) // commented out for bug731363
{
{
//printf("AddVariable: '%s' '%s' context=%d\n",
//printf("AddVariable: '%s' '%s' context=%d\n",
// g_type.data(),g_name.data(),g_theVarContext.count());
// g_type.data(),g_name.data(),g_theVarContext.count());
...
@@ -3008,7 +3014,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
...
@@ -3008,7 +3014,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
g_theVarContext.addVariable(g_type,g_name);
g_theVarContext.addVariable(g_type,g_name);
}
}
g_parmType.resize(0);g_parmName.resize(0);
g_parmType.resize(0);g_parmName.resize(0);
g_theCallContext.set
Class
(0);
g_theCallContext.set
Scope
(0);
if (*yytext==';' || g_insideBody)
if (*yytext==';' || g_insideBody)
{
{
if (!g_insideBody)
if (!g_insideBody)
...
...
src/config.xml
View file @
962ad74f
...
@@ -3076,7 +3076,7 @@ to be found in the default search path.
...
@@ -3076,7 +3076,7 @@ to be found in the default search path.
<option
type=
'string'
id=
'DOT_FONTNAME'
format=
'string'
defval=
'Helvetica'
depends=
'HAVE_DOT'
>
<option
type=
'string'
id=
'DOT_FONTNAME'
format=
'string'
defval=
'Helvetica'
depends=
'HAVE_DOT'
>
<docs>
<docs>
<![CDATA[
<![CDATA[
When you want a differently looking font n the dot files that doxygen generates
When you want a differently looking font
i
n the dot files that doxygen generates
you can specify the font name
you can specify the font name
using \c DOT_FONTNAME. You need to make sure dot is able to find the font,
using \c DOT_FONTNAME. You need to make sure dot is able to find the font,
which can be done by putting it in a standard location or by setting the
which can be done by putting it in a standard location or by setting the
...
...
src/configgen.py
View file @
962ad74f
...
@@ -18,7 +18,6 @@ import re
...
@@ -18,7 +18,6 @@ import re
import
textwrap
import
textwrap
from
xml.dom
import
minidom
,
Node
from
xml.dom
import
minidom
,
Node
def
transformDocs
(
doc
):
def
transformDocs
(
doc
):
# join lines, unless it is an empty line
# join lines, unless it is an empty line
# remove doxygen layout constructs
# remove doxygen layout constructs
...
@@ -112,7 +111,7 @@ def addValues(var, node):
...
@@ -112,7 +111,7 @@ def addValues(var, node):
if
(
n
.
nodeName
==
"value"
):
if
(
n
.
nodeName
==
"value"
):
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
name
=
n
.
getAttribute
(
'name'
)
name
=
n
.
getAttribute
(
'name'
)
print
"
%
s->addValue(
\"
%
s
\"
);"
%
(
var
,
name
)
print
(
"
%
s->addValue(
\"
%
s
\"
);"
%
(
var
,
name
)
)
def
parseHeader
(
node
,
objName
):
def
parseHeader
(
node
,
objName
):
...
@@ -123,15 +122,15 @@ def parseHeader(node,objName):
...
@@ -123,15 +122,15 @@ def parseHeader(node,objName):
if
(
n
.
getAttribute
(
'doxyfile'
)
!=
"0"
):
if
(
n
.
getAttribute
(
'doxyfile'
)
!=
"0"
):
doc
+=
parseDocs
(
n
)
doc
+=
parseDocs
(
n
)
docC
=
transformDocs
(
doc
)
docC
=
transformDocs
(
doc
)
print
"
%
s->setHeader("
%
(
objName
)
print
(
"
%
s->setHeader("
%
(
objName
)
)
rng
=
len
(
docC
)
rng
=
len
(
docC
)
for
i
in
range
(
rng
):
for
i
in
range
(
rng
):
line
=
docC
[
i
]
line
=
docC
[
i
]
if
i
!=
rng
-
1
:
# since we go from 0 to rng-1
if
i
!=
rng
-
1
:
# since we go from 0 to rng-1
print
"
\"
%
s
\\
n
\"
"
%
(
line
)
print
(
"
\"
%
s
\\
n
\"
"
%
(
line
)
)
else
:
else
:
print
"
\"
%
s
\"
"
%
(
line
)
print
(
"
\"
%
s
\"
"
%
(
line
)
)
print
" );"
print
(
" );"
)
def
prepCDocs
(
node
):
def
prepCDocs
(
node
):
...
@@ -201,7 +200,7 @@ def prepCDocs(node):
...
@@ -201,7 +200,7 @@ def prepCDocs(node):
else
:
else
:
if
abspath
==
'1'
:
if
abspath
==
'1'
:
doc
+=
"<br/>The file has to be specified with full path."
doc
+=
"<br/>The file has to be specified with full path."
elif
f
ile
==
'image'
:
elif
f
ormat
==
'image'
:
abspath
=
node
.
getAttribute
(
'abspath'
)
abspath
=
node
.
getAttribute
(
'abspath'
)
if
defval
!=
''
:
if
defval
!=
''
:
if
abspath
!=
'1'
:
if
abspath
!=
'1'
:
...
@@ -238,8 +237,8 @@ def parseOption(node):
...
@@ -238,8 +237,8 @@ def parseOption(node):
setting
=
node
.
getAttribute
(
'setting'
)
setting
=
node
.
getAttribute
(
'setting'
)
docC
=
prepCDocs
(
node
);
docC
=
prepCDocs
(
node
);
if
len
(
setting
)
>
0
:
if
len
(
setting
)
>
0
:
print
"#if
%
s"
%
(
setting
)
print
(
"#if
%
s"
%
(
setting
)
)
print
" //----"
print
(
" //----"
)
if
type
==
'bool'
:
if
type
==
'bool'
:
if
len
(
adefval
)
>
0
:
if
len
(
adefval
)
>
0
:
enabled
=
adefval
enabled
=
adefval
...
@@ -247,108 +246,108 @@ def parseOption(node):
...
@@ -247,108 +246,108 @@ def parseOption(node):
enabled
=
"TRUE"
enabled
=
"TRUE"
else
:
else
:
enabled
=
"FALSE"
enabled
=
"FALSE"
print
" cb = cfg->addBool("
print
(
" cb = cfg->addBool("
)
print
"
\"
%
s
\"
,"
%
(
name
)
print
(
"
\"
%
s
\"
,"
%
(
name
)
)
rng
=
len
(
docC
)
rng
=
len
(
docC
)
for
i
in
range
(
rng
):
for
i
in
range
(
rng
):
line
=
docC
[
i
]
line
=
docC
[
i
]
if
i
!=
rng
-
1
:
# since we go from 0 to rng-1
if
i
!=
rng
-
1
:
# since we go from 0 to rng-1
print
"
\"
%
s
\\
n
\"
"
%
(
line
)
print
(
"
\"
%
s
\\
n
\"
"
%
(
line
)
)
else
:
else
:
print
"
\"
%
s
\"
,"
%
(
line
)
print
(
"
\"
%
s
\"
,"
%
(
line
)
)
print
"
%
s"
%
(
enabled
)
print
(
"
%
s"
%
(
enabled
)
)
print
" );"
print
(
" );"
)
if
depends
!=
''
:
if
depends
!=
''
:
print
" cb->addDependency(
\"
%
s
\"
);"
%
(
depends
)
print
(
" cb->addDependency(
\"
%
s
\"
);"
%
(
depends
)
)
elif
type
==
'string'
:
elif
type
==
'string'
:
print
" cs = cfg->addString("
print
(
" cs = cfg->addString("
)
print
"
\"
%
s
\"
,"
%
(
name
)
print
(
"
\"
%
s
\"
,"
%
(
name
)
)
rng
=
len
(
docC
)
rng
=
len
(
docC
)
for
i
in
range
(
rng
):
for
i
in
range
(
rng
):
line
=
docC
[
i
]
line
=
docC
[
i
]
if
i
!=
rng
-
1
:
# since we go from 0 to rng-1
if
i
!=
rng
-
1
:
# since we go from 0 to rng-1
print
"
\"
%
s
\\
n
\"
"
%
(
line
)
print
(
"
\"
%
s
\\
n
\"
"
%
(
line
)
)
else
:
else
:
print
"
\"
%
s
\"
"
%
(
line
)
print
(
"
\"
%
s
\"
"
%
(
line
)
)
print
" );"
print
(
" );"
)
if
defval
!=
''
:
if
defval
!=
''
:
print
" cs->setDefaultValue(
\"
%
s
\"
);"
%
(
defval
)
print
(
" cs->setDefaultValue(
\"
%
s
\"
);"
%
(
defval
)
)
if
format
==
'file'
:
if
format
==
'file'
:
print
" cs->setWidgetType(ConfigString::File);"
print
(
" cs->setWidgetType(ConfigString::File);"
)
elif
format
==
'image'
:
elif
format
==
'image'
:
print
" cs->setWidgetType(ConfigString::Image);"
print
(
" cs->setWidgetType(ConfigString::Image);"
)
elif
format
==
'dir'
:
elif
format
==
'dir'
:
print
" cs->setWidgetType(ConfigString::Dir);"
print
(
" cs->setWidgetType(ConfigString::Dir);"
)
if
depends
!=
''
:
if
depends
!=
''
:
print
" cs->addDependency(
\"
%
s
\"
);"
%
(
depends
)
print
(
" cs->addDependency(
\"
%
s
\"
);"
%
(
depends
)
)
elif
type
==
'enum'
:
elif
type
==
'enum'
:
print
" ce = cfg->addEnum("
print
(
" ce = cfg->addEnum("
)
print
"
\"
%
s
\"
,"
%
(
name
)
print
(
"
\"
%
s
\"
,"
%
(
name
)
)
rng
=
len
(
docC
)
rng
=
len
(
docC
)
for
i
in
range
(
rng
):
for
i
in
range
(
rng
):
line
=
docC
[
i
]
line
=
docC
[
i
]
if
i
!=
rng
-
1
:
# since we go from 0 to rng-1
if
i
!=
rng
-
1
:
# since we go from 0 to rng-1
print
"
\"
%
s
\\
n
\"
"
%
(
line
)
print
(
"
\"
%
s
\\
n
\"
"
%
(
line
)
)
else
:
else
:
print
"
\"
%
s
\"
,"
%
(
line
)
print
(
"
\"
%
s
\"
,"
%
(
line
)
)
print
"
\"
%
s
\"
"
%
(
defval
)
print
(
"
\"
%
s
\"
"
%
(
defval
)
)
print
" );"
print
(
" );"
)
addValues
(
"ce"
,
node
)
addValues
(
"ce"
,
node
)
if
depends
!=
''
:
if
depends
!=
''
:
print
" ce->addDependency(
\"
%
s
\"
);"
%
(
depends
)
print
(
" ce->addDependency(
\"
%
s
\"
);"
%
(
depends
)
)
elif
type
==
'int'
:
elif
type
==
'int'
:
minval
=
node
.
getAttribute
(
'minval'
)
minval
=
node
.
getAttribute
(
'minval'
)
maxval
=
node
.
getAttribute
(
'maxval'
)
maxval
=
node
.
getAttribute
(
'maxval'
)
print
" ci = cfg->addInt("
print
(
" ci = cfg->addInt("
)
print
"
\"
%
s
\"
,"
%
(
name
)
print
(
"
\"
%
s
\"
,"
%
(
name
)
)
rng
=
len
(
docC
)
rng
=
len
(
docC
)
for
i
in
range
(
rng
):
for
i
in
range
(
rng
):
line
=
docC
[
i
]
line
=
docC
[
i
]
if
i
!=
rng
-
1
:
# since we go from 0 to rng-1
if
i
!=
rng
-
1
:
# since we go from 0 to rng-1
print
"
\"
%
s
\\
n
\"
"
%
(
line
)
print
(
"
\"
%
s
\\
n
\"
"
%
(
line
)
)
else
:
else
:
print
"
\"
%
s
\"
,"
%
(
line
)
print
(
"
\"
%
s
\"
,"
%
(
line
)
)
print
"
%
s,
%
s,
%
s"
%
(
minval
,
maxval
,
defval
)
print
(
"
%
s,
%
s,
%
s"
%
(
minval
,
maxval
,
defval
)
)
print
" );"
print
(
" );"
)
if
depends
!=
''
:
if
depends
!=
''
:
print
" ci->addDependency(
\"
%
s
\"
);"
%
(
depends
)
print
(
" ci->addDependency(
\"
%
s
\"
);"
%
(
depends
)
)
elif
type
==
'list'
:
elif
type
==
'list'
:
print
" cl = cfg->addList("
print
(
" cl = cfg->addList("
)
print
"
\"
%
s
\"
,"
%
(
name
)
print
(
"
\"
%
s
\"
,"
%
(
name
)
)
rng
=
len
(
docC
)
rng
=
len
(
docC
)
for
i
in
range
(
rng
):
for
i
in
range
(
rng
):
line
=
docC
[
i
]
line
=
docC
[
i
]
if
i
!=
rng
-
1
:
# since we go from 0 to rng-1
if
i
!=
rng
-
1
:
# since we go from 0 to rng-1
print
"
\"
%
s
\\
n
\"
"
%
(
line
)
print
(
"
\"
%
s
\\
n
\"
"
%
(
line
)
)
else
:
else
:
print
"
\"
%
s
\"
"
%
(
line
)
print
(
"
\"
%
s
\"
"
%
(
line
)
)
print
" );"
print
(
" );"
)
addValues
(
"cl"
,
node
)
addValues
(
"cl"
,
node
)
if
depends
!=
''
:
if
depends
!=
''
:
print
" cl->addDependency(
\"
%
s
\"
);"
%
(
depends
)
print
(
" cl->addDependency(
\"
%
s
\"
);"
%
(
depends
)
)
if
format
==
'file'
:
if
format
==
'file'
:
print
" cl->setWidgetType(ConfigList::File);"
print
(
" cl->setWidgetType(ConfigList::File);"
)
elif
format
==
'dir'
:
elif
format
==
'dir'
:
print
" cl->setWidgetType(ConfigList::Dir);"
print
(
" cl->setWidgetType(ConfigList::Dir);"
)
elif
format
==
'filedir'
:
elif
format
==
'filedir'
:
print
" cl->setWidgetType(ConfigList::FileAndDir);"
print
(
" cl->setWidgetType(ConfigList::FileAndDir);"
)
elif
type
==
'obsolete'
:
elif
type
==
'obsolete'
:
print
" cfg->addObsolete(
\"
%
s
\"
);"
%
(
name
)
print
(
" cfg->addObsolete(
\"
%
s
\"
);"
%
(
name
)
)
if
len
(
setting
)
>
0
:
if
len
(
setting
)
>
0
:
print
"#else"
print
(
"#else"
)
print
" cfg->addDisabled(
\"
%
s
\"
);"
%
(
name
)
print
(
" cfg->addDisabled(
\"
%
s
\"
);"
%
(
name
)
)
print
"#endif"
print
(
"#endif"
)
def
parseGroups
(
node
):
def
parseGroups
(
node
):
name
=
node
.
getAttribute
(
'name'
)
name
=
node
.
getAttribute
(
'name'
)
doc
=
node
.
getAttribute
(
'docs'
)
doc
=
node
.
getAttribute
(
'docs'
)
print
"
%
s
%
s"
%
(
" //-----------------------------------------"
,
print
(
"
%
s
%
s"
%
(
" //-----------------------------------------"
,
"----------------------------------"
)
"----------------------------------"
)
)
print
" cfg->addInfo(
\"
%
s
\"
,
\"
%
s
\"
);"
%
(
name
,
doc
)
print
(
" cfg->addInfo(
\"
%
s
\"
,
\"
%
s
\"
);"
%
(
name
,
doc
)
)
print
"
%
s
%
s"
%
(
" //-----------------------------------------"
,
print
(
"
%
s
%
s"
%
(
" //-----------------------------------------"
,
"----------------------------------"
)
"----------------------------------"
)
)
print
print
(
""
)
for
n
in
node
.
childNodes
:
for
n
in
node
.
childNodes
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
parseOption
(
n
)
parseOption
(
n
)
...
@@ -360,16 +359,16 @@ def parseGroupCDocs(node):
...
@@ -360,16 +359,16 @@ def parseGroupCDocs(node):
name
=
n
.
getAttribute
(
'id'
)
name
=
n
.
getAttribute
(
'id'
)
docC
=
prepCDocs
(
n
);
docC
=
prepCDocs
(
n
);
if
type
!=
'obsolete'
:
if
type
!=
'obsolete'
:
print
" doc->add("
print
(
" doc->add("
)
print
"
\"
%
s
\"
,"
%
(
name
)
print
(
"
\"
%
s
\"
,"
%
(
name
)
)
rng
=
len
(
docC
)
rng
=
len
(
docC
)
for
i
in
range
(
rng
):
for
i
in
range
(
rng
):
line
=
docC
[
i
]
line
=
docC
[
i
]
if
i
!=
rng
-
1
:
# since we go from 0 to rng-1
if
i
!=
rng
-
1
:
# since we go from 0 to rng-1
print
"
\"
%
s
\\
n
\"
"
%
(
line
)
print
(
"
\"
%
s
\\
n
\"
"
%
(
line
)
)
else
:
else
:
print
"
\"
%
s
\"
"
%
(
line
)
print
(
"
\"
%
s
\"
"
%
(
line
)
)
print
" );"
print
(
" );"
)
def
parseOptionDoc
(
node
,
first
):
def
parseOptionDoc
(
node
,
first
):
# Handling part for documentation
# Handling part for documentation
...
@@ -388,52 +387,52 @@ def parseOptionDoc(node, first):
...
@@ -388,52 +387,52 @@ def parseOptionDoc(node, first):
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
doc
+=
parseDocs
(
n
)
doc
+=
parseDocs
(
n
)
if
(
first
):
if
(
first
):
print
"
\\
anchor cfg_
%
s"
%
(
name
.
lower
(
))
print
(
"
\\
anchor cfg_
%
s"
%
(
name
.
lower
()
))
print
"<dl>"
print
(
"<dl>"
)
print
""
print
(
""
)
print
"<dt>
\\
c
%
s <dd>"
%
(
name
)
print
(
"<dt>
\\
c
%
s <dd>"
%
(
name
)
)
else
:
else
:
print
"
\\
anchor cfg_
%
s"
%
(
name
.
lower
(
))
print
(
"
\\
anchor cfg_
%
s"
%
(
name
.
lower
()
))
print
"<dt>
\\
c
%
s <dd>"
%
(
name
)
print
(
"<dt>
\\
c
%
s <dd>"
%
(
name
)
)
print
"
\\
addindex
%
s"
%
(
name
)
print
(
"
\\
addindex
%
s"
%
(
name
)
)
print
doc
print
(
doc
)
if
(
type
==
'enum'
):
if
(
type
==
'enum'
):
values
=
collectValues
(
node
)
values
=
collectValues
(
node
)
print
""
print
(
""
)
print
"Possible values are: "
print
(
"Possible values are: "
)
rng
=
len
(
values
)
rng
=
len
(
values
)
for
i
in
range
(
rng
):
for
i
in
range
(
rng
):
val
=
values
[
i
]
val
=
values
[
i
]
if
i
==
rng
-
2
:
if
i
==
rng
-
2
:
print
"
%
s and "
%
(
val
)
print
(
"
%
s and "
%
(
val
)
)
elif
i
==
rng
-
1
:
elif
i
==
rng
-
1
:
print
"
%
s."
%
(
val
)
print
(
"
%
s."
%
(
val
)
)
else
:
else
:
print
"
%
s, "
%
(
val
)
print
(
"
%
s, "
%
(
val
)
)
if
(
defval
!=
""
):
if
(
defval
!=
""
):
print
""
print
(
""
)
print
""
print
(
""
)
print
"The default value is: <code>
%
s</code>."
%
(
defval
)
print
(
"The default value is: <code>
%
s</code>."
%
(
defval
)
)
print
""
print
(
""
)
elif
(
type
==
'int'
):
elif
(
type
==
'int'
):
minval
=
node
.
getAttribute
(
'minval'
)
minval
=
node
.
getAttribute
(
'minval'
)
maxval
=
node
.
getAttribute
(
'maxval'
)
maxval
=
node
.
getAttribute
(
'maxval'
)
print
""
print
(
""
)
print
""
print
(
""
)
print
"
%
s:
%
s
%
s
%
s,
%
s:
%
s
%
s
%
s,
%
s:
%
s
%
s
%
s."
%
(
print
(
"
%
s:
%
s
%
s
%
s,
%
s:
%
s
%
s
%
s,
%
s:
%
s
%
s
%
s."
%
(
" Minimum value"
,
"<code>"
,
minval
,
"</code>"
,
" Minimum value"
,
"<code>"
,
minval
,
"</code>"
,
"maximum value"
,
"<code>"
,
maxval
,
"</code>"
,
"maximum value"
,
"<code>"
,
maxval
,
"</code>"
,
"default value"
,
"<code>"
,
defval
,
"</code>"
)
"default value"
,
"<code>"
,
defval
,
"</code>"
)
)
print
""
print
(
""
)
elif
(
type
==
'bool'
):
elif
(
type
==
'bool'
):
print
""
print
(
""
)
print
""
print
(
""
)
if
(
node
.
hasAttribute
(
'altdefval'
)):
if
(
node
.
hasAttribute
(
'altdefval'
)):
print
"The default value is: system dependent."
print
(
"The default value is: system dependent."
)
else
:
else
:
print
"The default value is: <code>
%
s</code>."
%
(
print
(
"The default value is: <code>
%
s</code>."
%
(
"YES"
if
(
defval
==
"1"
)
else
"NO"
)
"YES"
if
(
defval
==
"1"
)
else
"NO"
)
)
print
""
print
(
""
)
elif
(
type
==
'list'
):
elif
(
type
==
'list'
):
if
format
==
'string'
:
if
format
==
'string'
:
values
=
collectValues
(
node
)
values
=
collectValues
(
node
)
...
@@ -441,67 +440,67 @@ def parseOptionDoc(node, first):
...
@@ -441,67 +440,67 @@ def parseOptionDoc(node, first):
for
i
in
range
(
rng
):
for
i
in
range
(
rng
):
val
=
values
[
i
]
val
=
values
[
i
]
if
i
==
rng
-
2
:
if
i
==
rng
-
2
:
print
"
%
s and "
%
(
val
)
print
(
"
%
s and "
%
(
val
)
)
elif
i
==
rng
-
1
:
elif
i
==
rng
-
1
:
print
"
%
s."
%
(
val
)
print
(
"
%
s."
%
(
val
)
)
else
:
else
:
print
"
%
s, "
%
(
val
)
print
(
"
%
s, "
%
(
val
)
)
print
""
print
(
""
)
elif
(
type
==
'string'
):
elif
(
type
==
'string'
):
if
format
==
'dir'
:
if
format
==
'dir'
:
if
defval
!=
''
:
if
defval
!=
''
:
print
""
print
(
""
)
print
"The default directory is: <code>
%
s</code>."
%
(
print
(
"The default directory is: <code>
%
s</code>."
%
(
defval
)
defval
)
)
elif
format
==
'file'
:
elif
format
==
'file'
:
abspath
=
node
.
getAttribute
(
'abspath'
)
abspath
=
node
.
getAttribute
(
'abspath'
)
if
defval
!=
''
:
if
defval
!=
''
:
print
""
print
(
""
)
if
abspath
!=
'1'
:
if
abspath
!=
'1'
:
print
"The default file is: <code>
%
s</code>."
%
(
print
(
"The default file is: <code>
%
s</code>."
%
(
defval
)
defval
)
)
else
:
else
:
print
"
%
s:
%
s
%
s
%
s."
%
(
print
(
"
%
s:
%
s
%
s
%
s."
%
(
"The default file (with absolute path) is"
,
"The default file (with absolute path) is"
,
"<code>"
,
defval
,
"</code>"
)
"<code>"
,
defval
,
"</code>"
)
)
else
:
else
:
if
abspath
==
'1'
:
if
abspath
==
'1'
:
print
""
print
(
""
)
print
"The file has to be specified with full path."
print
(
"The file has to be specified with full path."
)
elif
f
ile
==
'image'
:
elif
f
ormat
==
'image'
:
abspath
=
node
.
getAttribute
(
'abspath'
)
abspath
=
node
.
getAttribute
(
'abspath'
)
if
defval
!=
''
:
if
defval
!=
''
:
print
""
print
(
""
)
if
abspath
!=
'1'
:
if
abspath
!=
'1'
:
print
"The default image is: <code>
%
s</code>."
%
(
print
(
"The default image is: <code>
%
s</code>."
%
(
defval
)
defval
)
)
else
:
else
:
print
"
%
s:
%
s
%
s
%
s."
%
(
print
(
"
%
s:
%
s
%
s
%
s."
%
(
"The default image (with absolute path) is"
,
"The default image (with absolute path) is"
,
"<code>"
,
defval
,
"</code>"
)
"<code>"
,
defval
,
"</code>"
)
)
else
:
else
:
if
abspath
==
'1'
:
if
abspath
==
'1'
:
print
""
print
(
""
)
print
"The image has to be specified with full path."
print
(
"The image has to be specified with full path."
)
else
:
# format == 'string':
else
:
# format == 'string':
if
defval
!=
''
:
if
defval
!=
''
:
print
""
print
(
""
)
print
"The default value is: <code>
%
s</code>."
%
(
print
(
"The default value is: <code>
%
s</code>."
%
(
defval
)
defval
)
)
print
""
print
(
""
)
# depends handling
# depends handling
if
(
node
.
hasAttribute
(
'depends'
)):
if
(
node
.
hasAttribute
(
'depends'
)):
depends
=
node
.
getAttribute
(
'depends'
)
depends
=
node
.
getAttribute
(
'depends'
)
print
""
print
(
""
)
print
"
%
s
\\
ref cfg_
%
s
\"
%
s
\"
is set to
\\
c YES."
%
(
print
(
"
%
s
\\
ref cfg_
%
s
\"
%
s
\"
is set to
\\
c YES."
%
(
"This tag requires that the tag"
,
depends
.
lower
(),
depends
.
upper
())
"This tag requires that the tag"
,
depends
.
lower
(),
depends
.
upper
())
)
return
False
return
False
def
parseGroupsDoc
(
node
):
def
parseGroupsDoc
(
node
):
name
=
node
.
getAttribute
(
'name'
)
name
=
node
.
getAttribute
(
'name'
)
doc
=
node
.
getAttribute
(
'docs'
)
doc
=
node
.
getAttribute
(
'docs'
)
print
"
\
section config_
%
s
%
s"
%
(
name
.
lower
(),
doc
)
print
(
"
\
section config_
%
s
%
s"
%
(
name
.
lower
(),
doc
)
)
# Start of list has been moved to the first option for better
# Start of list has been moved to the first option for better
# anchor placement
# anchor placement
# print "<dl>"
# print "<dl>"
...
@@ -511,7 +510,7 @@ def parseGroupsDoc(node):
...
@@ -511,7 +510,7 @@ def parseGroupsDoc(node):
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
first
=
parseOptionDoc
(
n
,
first
)
first
=
parseOptionDoc
(
n
,
first
)
if
(
not
first
):
if
(
not
first
):
print
"</dl>"
print
(
"</dl>"
)
def
parseGroupsList
(
node
,
commandsList
):
def
parseGroupsList
(
node
,
commandsList
):
...
@@ -542,7 +541,7 @@ def parseHeaderDoc(node):
...
@@ -542,7 +541,7 @@ def parseHeaderDoc(node):
if
(
n
.
nodeName
==
"docs"
):
if
(
n
.
nodeName
==
"docs"
):
if
(
n
.
getAttribute
(
'documentation'
)
!=
"0"
):
if
(
n
.
getAttribute
(
'documentation'
)
!=
"0"
):
doc
+=
parseDocs
(
n
)
doc
+=
parseDocs
(
n
)
print
doc
print
(
doc
)
def
parseFooterDoc
(
node
):
def
parseFooterDoc
(
node
):
...
@@ -552,7 +551,7 @@ def parseFooterDoc(node):
...
@@ -552,7 +551,7 @@ def parseFooterDoc(node):
if
(
n
.
nodeName
==
"docs"
):
if
(
n
.
nodeName
==
"docs"
):
if
(
n
.
getAttribute
(
'documentation'
)
!=
"0"
):
if
(
n
.
getAttribute
(
'documentation'
)
!=
"0"
):
doc
+=
parseDocs
(
n
)
doc
+=
parseDocs
(
n
)
print
doc
print
(
doc
)
def
main
():
def
main
():
...
@@ -561,16 +560,17 @@ def main():
...
@@ -561,16 +560,17 @@ def main():
try
:
try
:
doc
=
xml
.
dom
.
minidom
.
parse
(
sys
.
argv
[
2
])
doc
=
xml
.
dom
.
minidom
.
parse
(
sys
.
argv
[
2
])
except
Exception
as
inst
:
except
Exception
as
inst
:
print
>>
sys
.
stderr
sys
.
stdout
=
sys
.
stderr
print
>>
sys
.
stderr
,
inst
print
(
""
)
print
>>
sys
.
stderr
print
(
inst
)
print
(
""
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
elem
=
doc
.
documentElement
elem
=
doc
.
documentElement
if
(
sys
.
argv
[
1
]
==
"-doc"
):
if
(
sys
.
argv
[
1
]
==
"-doc"
):
print
"/* WARNING: This file is generated!"
print
(
"/* WARNING: This file is generated!"
)
print
" * Do not edit this file, but edit config.xml instead and run"
print
(
" * Do not edit this file, but edit config.xml instead and run"
)
print
" * python configgen.py -doc config.xml to regenerate this file!"
print
(
" * python configgen.py -doc config.xml to regenerate this file!"
)
print
" */"
print
(
" */"
)
# process header
# process header
for
n
in
elem
.
childNodes
:
for
n
in
elem
.
childNodes
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
...
@@ -582,10 +582,10 @@ def main():
...
@@ -582,10 +582,10 @@ def main():
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
(
n
.
nodeName
==
"group"
):
if
(
n
.
nodeName
==
"group"
):
commandsList
=
parseGroupsList
(
n
,
commandsList
)
commandsList
=
parseGroupsList
(
n
,
commandsList
)
print
"
\\
secreflist"
print
(
"
\\
secreflist"
)
for
x
in
sorted
(
commandsList
):
for
x
in
sorted
(
commandsList
):
print
"
\\
refitem cfg_
%
s
%
s"
%
(
x
.
lower
(),
x
)
print
(
"
\\
refitem cfg_
%
s
%
s"
%
(
x
.
lower
(),
x
)
)
print
"
\\
endsecreflist"
print
(
"
\\
endsecreflist"
)
# process groups and options
# process groups and options
for
n
in
elem
.
childNodes
:
for
n
in
elem
.
childNodes
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
...
@@ -597,24 +597,24 @@ def main():
...
@@ -597,24 +597,24 @@ def main():
if
(
n
.
nodeName
==
"footer"
):
if
(
n
.
nodeName
==
"footer"
):
parseFooterDoc
(
n
)
parseFooterDoc
(
n
)
elif
(
sys
.
argv
[
1
]
==
"-cpp"
):
elif
(
sys
.
argv
[
1
]
==
"-cpp"
):
print
"/* WARNING: This file is generated!"
print
(
"/* WARNING: This file is generated!"
)
print
" * Do not edit this file, but edit config.xml instead and run"
print
(
" * Do not edit this file, but edit config.xml instead and run"
)
print
" * python configgen.py -cpp config.xml to regenerate this file!"
print
(
" * python configgen.py -cpp config.xml to regenerate this file!"
)
print
" */"
print
(
" */"
)
print
""
print
(
""
)
print
"#include
\"
configoptions.h
\"
"
print
(
"#include
\"
configoptions.h
\"
"
)
print
"#include
\"
config.h
\"
"
print
(
"#include
\"
config.h
\"
"
)
print
"#include
\"
portable.h
\"
"
print
(
"#include
\"
portable.h
\"
"
)
print
"#include
\"
settings.h
\"
"
print
(
"#include
\"
settings.h
\"
"
)
print
""
print
(
""
)
print
"void addConfigOptions(Config *cfg)"
print
(
"void addConfigOptions(Config *cfg)"
)
print
"{"
print
(
"{"
)
print
" ConfigString *cs;"
print
(
" ConfigString *cs;"
)
print
" ConfigEnum *ce;"
print
(
" ConfigEnum *ce;"
)
print
" ConfigList *cl;"
print
(
" ConfigList *cl;"
)
print
" ConfigInt *ci;"
print
(
" ConfigInt *ci;"
)
print
" ConfigBool *cb;"
print
(
" ConfigBool *cb;"
)
print
""
print
(
""
)
# process header
# process header
for
n
in
elem
.
childNodes
:
for
n
in
elem
.
childNodes
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
...
@@ -624,17 +624,17 @@ def main():
...
@@ -624,17 +624,17 @@ def main():
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
(
n
.
nodeName
==
"group"
):
if
(
n
.
nodeName
==
"group"
):
parseGroups
(
n
)
parseGroups
(
n
)
print
"}"
print
(
"}"
)
elif
(
sys
.
argv
[
1
]
==
"-wiz"
):
elif
(
sys
.
argv
[
1
]
==
"-wiz"
):
print
"/* WARNING: This file is generated!"
print
(
"/* WARNING: This file is generated!"
)
print
" * Do not edit this file, but edit config.xml instead and run"
print
(
" * Do not edit this file, but edit config.xml instead and run"
)
print
" * python configgen.py -wiz config.xml to regenerate this file!"
print
(
" * python configgen.py -wiz config.xml to regenerate this file!"
)
print
" */"
print
(
" */"
)
print
"#include
\"
configdoc.h
\"
"
print
(
"#include
\"
configdoc.h
\"
"
)
print
"#include
\"
docintf.h
\"
"
print
(
"#include
\"
docintf.h
\"
"
)
print
""
print
(
""
)
print
"void addConfigDocs(DocIntf *doc)"
print
(
"void addConfigDocs(DocIntf *doc)"
)
print
"{"
print
(
"{"
)
for
n
in
elem
.
childNodes
:
for
n
in
elem
.
childNodes
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
(
n
.
nodeName
==
"header"
):
if
(
n
.
nodeName
==
"header"
):
...
@@ -643,7 +643,7 @@ def main():
...
@@ -643,7 +643,7 @@ def main():
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
n
.
nodeType
==
Node
.
ELEMENT_NODE
:
if
(
n
.
nodeName
==
"group"
):
if
(
n
.
nodeName
==
"group"
):
parseGroupCDocs
(
n
)
parseGroupCDocs
(
n
)
print
"}"
print
(
"}"
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
main
()
src/lang_cfg.py
View file @
962ad74f
...
@@ -2,7 +2,7 @@ import sys
...
@@ -2,7 +2,7 @@ import sys
if
(
len
(
sys
.
argv
)
>
1
):
if
(
len
(
sys
.
argv
)
>
1
):
if
(
sys
.
argv
[
1
]
==
"ENONLY"
):
if
(
sys
.
argv
[
1
]
==
"ENONLY"
):
print
"#define ENGLISH_ONLY"
print
(
"#define ENGLISH_ONLY"
)
else
:
else
:
for
x
in
x
range
(
1
,
len
(
sys
.
argv
)):
for
x
in
range
(
1
,
len
(
sys
.
argv
)):
print
"#define LANG_
%
s"
%
(
sys
.
argv
[
x
]
)
print
(
"#define LANG_
%
s"
%
(
sys
.
argv
[
x
])
)
src/languages.py
View file @
962ad74f
...
@@ -15,7 +15,7 @@ for f in files:
...
@@ -15,7 +15,7 @@ for f in files:
# generating file is lang_cfg.py
# generating file is lang_cfg.py
# the rules file has to output lang_cfg.h
# the rules file has to output lang_cfg.h
#
#
print
"""
\
print
(
"""
\
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<VisualStudioToolFile
<VisualStudioToolFile
Name="languages"
Name="languages"
...
@@ -52,7 +52,7 @@ print """\
...
@@ -52,7 +52,7 @@ print """\
/>
/>
</Values>
</Values>
</EnumProperty>
</EnumProperty>
"""
"""
)
#
#
# generate loop, English is mandatory (so cannot be chosen)
# generate loop, English is mandatory (so cannot be chosen)
#
#
...
@@ -76,7 +76,7 @@ for f in new_list:
...
@@ -76,7 +76,7 @@ for f in new_list:
l1
=
l
.
replace
(
"-"
,
""
)
l1
=
l
.
replace
(
"-"
,
""
)
# capatalize first letter
# capatalize first letter
l
=
l
.
title
()
l
=
l
.
title
()
print
"""
\
print
(
"""
\
<EnumProperty
<EnumProperty
Name="
%
s"
Name="
%
s"
DisplayName="Use
%
s"
DisplayName="Use
%
s"
...
@@ -96,11 +96,11 @@ for f in new_list:
...
@@ -96,11 +96,11 @@ for f in new_list:
/>
/>
</Values>
</Values>
</EnumProperty>
</EnumProperty>
"""
%
(
l1
,
l
,
l
,
l
,
f
[
1
],
l
)
"""
%
(
l1
,
l
,
l
,
l
,
f
[
1
],
l
)
)
print
"""
\
print
(
"""
\
</Properties>
</Properties>
</CustomBuildRule>
</CustomBuildRule>
</Rules>
</Rules>
</VisualStudioToolFile>
</VisualStudioToolFile>
"""
"""
)
src/latexgen.cpp
View file @
962ad74f
...
@@ -290,6 +290,7 @@ static void writeDefaultHeaderPart1(FTextStream &t)
...
@@ -290,6 +290,7 @@ static void writeDefaultHeaderPart1(FTextStream &t)
// Load required packages
// Load required packages
t
<<
"% Packages required by doxygen
\n
"
t
<<
"% Packages required by doxygen
\n
"
"
\\
usepackage{fixltx2e}
\n
"
// for \textsubscript
"
\\
usepackage{calc}
\n
"
"
\\
usepackage{calc}
\n
"
"
\\
usepackage{doxygen}
\n
"
"
\\
usepackage{doxygen}
\n
"
"
\\
usepackage{graphicx}
\n
"
"
\\
usepackage{graphicx}
\n
"
...
@@ -297,7 +298,6 @@ static void writeDefaultHeaderPart1(FTextStream &t)
...
@@ -297,7 +298,6 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"
\\
usepackage{makeidx}
\n
"
"
\\
usepackage{makeidx}
\n
"
"
\\
usepackage{multicol}
\n
"
"
\\
usepackage{multicol}
\n
"
"
\\
usepackage{multirow}
\n
"
"
\\
usepackage{multirow}
\n
"
"
\\
usepackage{fixltx2e}
\n
"
// for \textsubscript
"
\\
PassOptionsToPackage{warn}{textcomp}
\n
"
"
\\
PassOptionsToPackage{warn}{textcomp}
\n
"
"
\\
usepackage{textcomp}
\n
"
"
\\
usepackage{textcomp}
\n
"
"
\\
usepackage[nointegrals]{wasysym}
\n
"
"
\\
usepackage[nointegrals]{wasysym}
\n
"
...
...
src/portable_c.c
View file @
962ad74f
#if defined(__APPLE__) || defined(macintosh)
// define this before including iconv.h to avoid a mapping of
// iconv_open and friends to libicon_open (done by mac ports),
// while the symbols without 'lib' are linked from /usr/lib/libiconv
#define LIBICONV_PLUG
#endif
#include <iconv.h>
#include <iconv.h>
// These functions are implemented in a C file, because there are different
// These functions are implemented in a C file, because there are different
...
...
src/scanner.l
View file @
962ad74f
...
@@ -6675,6 +6675,18 @@ static void parseCompounds(Entry *rt)
...
@@ -6675,6 +6675,18 @@ static void parseCompounds(Entry *rt)
current = new Entry;
current = new Entry;
gstat = FALSE;
gstat = FALSE;
initEntry();
initEntry();
// deep copy group list from parent (see bug 727732)
if (rt->groups)
{
QListIterator<Grouping> gli(*rt->groups);
Grouping *g;
for (;(g=gli.current());++gli)
{
ce->groups->append(new Grouping(*g));
}
}
int ni=ce->name.findRev("::"); if (ni==-1) ni=0; else ni+=2;
int ni=ce->name.findRev("::"); if (ni==-1) ni=0; else ni+=2;
// set default protection based on the compound type
// set default protection based on the compound type
if( ce->section==Entry::CLASS_SEC ) // class
if( ce->section==Entry::CLASS_SEC ) // class
...
...
src/util.cpp
View file @
962ad74f
...
@@ -1798,8 +1798,9 @@ nextChar:
...
@@ -1798,8 +1798,9 @@ nextChar:
)
)
)
)
{
{
if
(
c
==
'\t'
)
c
=
' '
;
if
(
c
==
'*'
||
c
==
'&'
||
c
==
'@'
||
c
==
'$'
)
if
(
c
==
'*'
||
c
==
'&'
||
c
==
'@'
||
c
==
'$'
)
{
{
//uint rl=result.length();
//uint rl=result.length();
uint
rl
=
growBuf
.
getPos
();
uint
rl
=
growBuf
.
getPos
();
if
((
rl
>
0
&&
(
isId
(
growBuf
.
at
(
rl
-
1
))
||
growBuf
.
at
(
rl
-
1
)
==
'>'
))
&&
if
((
rl
>
0
&&
(
isId
(
growBuf
.
at
(
rl
-
1
))
||
growBuf
.
at
(
rl
-
1
)
==
'>'
))
&&
...
@@ -1827,8 +1828,8 @@ nextChar:
...
@@ -1827,8 +1828,8 @@ nextChar:
}
}
}
}
}
}
//printf("removeRedundantWhiteSpace(`%s')=`%s'\n",s.data(),result.data());
growBuf
.
addChar
(
0
);
growBuf
.
addChar
(
0
);
//printf("removeRedundantWhiteSpace(`%s')=`%s'\n",s.data(),growBuf.get());
//result.resize(resultPos);
//result.resize(resultPos);
return
growBuf
.
get
();
return
growBuf
.
get
();
}
}
...
...
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