summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/docblocks.doc6
-rw-r--r--src/commentcnv.h2
-rw-r--r--src/context.cpp2
-rw-r--r--src/dot.cpp8
-rw-r--r--src/fortrancode.h8
-rw-r--r--src/fortrancode.l12
-rw-r--r--src/fortranscanner.h16
-rw-r--r--src/fortranscanner.l14
-rw-r--r--src/index.cpp2
-rw-r--r--src/language.cpp10
-rw-r--r--src/lodepng.cpp2
-rw-r--r--src/types.h7
-rw-r--r--src/util.h1
13 files changed, 46 insertions, 44 deletions
diff --git a/doc/docblocks.doc b/doc/docblocks.doc
index 2cfff9a..6ef6bf0 100644
--- a/doc/docblocks.doc
+++ b/doc/docblocks.doc
@@ -460,10 +460,10 @@ settings where overruled.
When using doxygen for Fortran code you should
set \ref cfg_optimize_for_fortran "OPTIMIZE_FOR_FORTRAN" to \c YES.
-The parser tries to guess wheter the source code is fixed format Fortran or
-free format Fortran code. This is not always correct, in the later case
+The parser tries to guess if the source code is fixed format Fortran or
+free format Fortran code. This may not always be correct. If not
one should use \ref cfg_extension_mapping "EXTENSION_MAPPING" to correct this.
-By setteing `EXTENSION_MAPPING = f=FortranFixed f90=FortranFree` files with
+By setting `EXTENSION_MAPPING = f=FortranFixed f90=FortranFree` files with
extension \c f90 are interpreted as fixed format Fortran code and files with
extension \c f are interpreted as free format Fortran code.
diff --git a/src/commentcnv.h b/src/commentcnv.h
index 90206df..6255a73 100644
--- a/src/commentcnv.h
+++ b/src/commentcnv.h
@@ -16,7 +16,7 @@
*/
#ifndef _COMMENTCNV_H
-#define _COMMNETCNV_H
+#define _COMMENTCNV_H
class BufStr;
diff --git a/src/context.cpp b/src/context.cpp
index 0597493..9c99453 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -4045,7 +4045,7 @@ class ClassInheritanceContext::Private : public GenericNodeListContext
bool b;
if (cd->getLanguage()==SrcLangExt_VHDL)
{
- if (!(VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ENTITYCLASS)
+ if ((VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS)
{
continue;
}
diff --git a/src/dot.cpp b/src/dot.cpp
index ea41685..a1540af 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -2462,8 +2462,12 @@ void DotGfxHierarchyTable::addClassList(ClassSDict *cl)
for (cli.toLast();(cd=cli.current());--cli)
{
//printf("Trying %s subClasses=%d\n",cd->name().data(),cd->subClasses()->count());
- if (cd->getLanguage()==SrcLangExt_VHDL && !(VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ENTITYCLASS)
- continue;
+ if (cd->getLanguage()==SrcLangExt_VHDL &&
+ (VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS
+ )
+ {
+ continue;
+ }
if (!hasVisibleRoot(cd->baseClasses()) &&
cd->isVisibleInHierarchy()
) // root node in the forest
diff --git a/src/fortrancode.h b/src/fortrancode.h
index 2beea69..b64ede7 100644
--- a/src/fortrancode.h
+++ b/src/fortrancode.h
@@ -15,8 +15,10 @@
*
*/
-#ifndef CODE_H
-#define CODE_H
+#ifndef FORTRANCODE_H
+#define FORTRANCODE_H
+
+#include "types.h"
class CodeOutputInterface;
class FileDef;
@@ -28,7 +30,7 @@ void parseFortranCode(CodeOutputInterface &,const char *,const QCString &,
bool ,const char *,FileDef *fd,
int startLine,int endLine,bool inlineFragment,
MemberDef *memberDef,bool showLineNumbers,Definition *searchCtx,
- bool collectRefs, FortranKind codeType);
+ bool collectRefs, FortranFormat format);
void resetFortranCodeParserState();
void codeFreeScanner();
diff --git a/src/fortrancode.l b/src/fortrancode.l
index 8640f15..c31080b 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -154,14 +154,14 @@ static int bracketCount = 0;
// simplified way to know if this is fixed form
// duplicate in fortranscanner.l
-static bool recognizeFixedForm(const char* contents, FortranKind codeType)
+static bool recognizeFixedForm(const char* contents, FortranFormat format)
{
int column=0;
bool skipLine=FALSE;
- if (codeType == FORTRAN_FIXED) return TRUE;
- if (codeType == FORTRAN_FREE) return FALSE;
- for (int i=0;;i++)
+ if (format == FortranFormat_Fixed) return TRUE;
+ if (format == FortranFormat_Free) return FALSE;
+ for (int i=0;;i++)
{
column++;
@@ -1110,7 +1110,7 @@ void parseFortranCode(CodeOutputInterface &od,const char *className,const QCStri
bool exBlock, const char *exName,FileDef *fd,
int startLine,int endLine,bool inlineFragment,
MemberDef *memberDef,bool,Definition *searchCtx,
- bool collectXRefs, FortranKind codeType)
+ bool collectXRefs, FortranFormat format)
{
//printf("***parseCode() exBlock=%d exName=%s fd=%p\n",exBlock,exName,fd);
@@ -1124,7 +1124,7 @@ void parseFortranCode(CodeOutputInterface &od,const char *className,const QCStri
g_code = &od;
g_inputString = s;
g_inputPosition = 0;
- g_isFixedForm = recognizeFixedForm((const char*)s,codeType);
+ g_isFixedForm = recognizeFixedForm((const char*)s,format);
g_currentFontClass = 0;
g_needsTermination = FALSE;
g_searchCtx = searchCtx;
diff --git a/src/fortranscanner.h b/src/fortranscanner.h
index ec0d312..92a8669 100644
--- a/src/fortranscanner.h
+++ b/src/fortranscanner.h
@@ -19,7 +19,6 @@
#define SCANNER_FORTRAN_H
#include "parserintf.h"
-#include "util.h"
/** \brief Fortran language parser using state-based lexical scanning.
*
@@ -28,10 +27,10 @@
class FortranLanguageScanner : public ParserInterface
{
public:
- FortranLanguageScanner(void) { codeType = FORTRAN_UNKNOWN;}
- virtual ~FortranLanguageScanner(void) {}
+ FortranLanguageScanner(FortranFormat format=FortranFormat_Unknown) : m_format(format) { }
+ virtual ~FortranLanguageScanner() {}
void startTranslationUnit(const char *) {}
- void finishTranslationUnit(void) {}
+ void finishTranslationUnit() {}
void parseInput(const char *fileName,
const char *fileBuf,
Entry *root,
@@ -53,22 +52,23 @@ class FortranLanguageScanner : public ParserInterface
Definition *searchCtx=0,
bool collectXRefs=TRUE
);
- void resetCodeParserState(void);
+ void resetCodeParserState();
void parsePrototype(const char *text);
- FortranKind codeType;
+ private:
+ FortranFormat m_format;
};
class FortranLanguageScannerFree : public FortranLanguageScanner
{
public:
- FortranLanguageScannerFree(void) { codeType = FORTRAN_FREE; }
+ FortranLanguageScannerFree() : FortranLanguageScanner(FortranFormat_Free) { }
};
class FortranLanguageScannerFixed : public FortranLanguageScanner
{
public:
- FortranLanguageScannerFixed(void) { codeType = FORTRAN_FIXED; }
+ FortranLanguageScannerFixed() : FortranLanguageScanner(FortranFormat_Fixed) { }
};
#endif
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index e083b2d..f6616ad 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -1313,13 +1313,13 @@ void truncatePrepass(int index)
// simplified way to know if this is fixed form
// duplicate in fortrancode.l
-static bool recognizeFixedForm(const char* contents, FortranKind codeType)
+static bool recognizeFixedForm(const char* contents, FortranFormat format)
{
int column=0;
bool skipLine=FALSE;
- if (codeType == FORTRAN_FIXED) return TRUE;
- if (codeType == FORTRAN_FREE) return FALSE;
+ if (format == FortranFormat_Fixed) return TRUE;
+ if (format == FortranFormat_Free) return FALSE;
for(int i=0;;i++) {
column++;
@@ -2246,7 +2246,7 @@ level--;
#endif
-static void parseMain(const char *fileName,const char *fileBuf,Entry *rt, FortranKind codeType)
+static void parseMain(const char *fileName,const char *fileBuf,Entry *rt, FortranFormat format)
{
char *tmpBuf = NULL;
initParser();
@@ -2266,7 +2266,7 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt, Fortra
inputFile.setName(fileName);
if (inputFile.open(IO_ReadOnly))
{
- isFixedForm = recognizeFixedForm(fileBuf,codeType);
+ isFixedForm = recognizeFixedForm(fileBuf,format);
if (isFixedForm)
{
@@ -2345,7 +2345,7 @@ void FortranLanguageScanner::parseInput(const char *fileName,
printlex(yy_flex_debug, TRUE, __FILE__, fileName);
- ::parseMain(fileName,fileBuf,root,this->codeType);
+ ::parseMain(fileName,fileBuf,root,m_format);
printlex(yy_flex_debug, FALSE, __FILE__, fileName);
}
@@ -2368,7 +2368,7 @@ void FortranLanguageScanner::parseCode(CodeOutputInterface & codeOutIntf,
{
::parseFortranCode(codeOutIntf,scopeName,input,isExampleBlock,exampleName,
fileDef,startLine,endLine,inlineFragment,memberDef,
- showLineNumbers,searchCtx,collectXRefs,this->codeType);
+ showLineNumbers,searchCtx,collectXRefs,m_format);
}
bool FortranLanguageScanner::needsPreprocessing(const QCString &extension)
diff --git a/src/index.cpp b/src/index.cpp
index 2fdd0de..9bbc4a4 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -811,7 +811,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started,FT
bool b;
if (cd->getLanguage()==SrcLangExt_VHDL)
{
- if (!(VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ENTITYCLASS)
+ if ((VhdlDocGen::VhdlClasses)cd->protection()!=VhdlDocGen::ENTITYCLASS)
{
continue;
}
diff --git a/src/language.cpp b/src/language.cpp
index c7a2b12..3b57de1 100644
--- a/src/language.cpp
+++ b/src/language.cpp
@@ -156,16 +156,6 @@
Translator *theTranslator=0;
-static const char obsoleteMsg[] =
- "---------\n"
- "ERROR: The selected language is no longer supported!\n"
- "If you want doxygen to produce output in this language \n"
- "you are kindly requested to help bringing the documentation \n"
- "up to date. Please read the development section of the manual \n"
- "for more information or contact Petr Prikryl (Prikryl@skil.cz).\n"
- "Thanks in advance!\n"
- "---------\n";
-
bool setTranslator(const char *langName)
{
if (L_EQUAL("english"))
diff --git a/src/lodepng.cpp b/src/lodepng.cpp
index df8378e..b237d5a 100644
--- a/src/lodepng.cpp
+++ b/src/lodepng.cpp
@@ -1146,10 +1146,10 @@ static unsigned encodeLZ77_brute(uivector* out, const unsigned char* in, size_t
}
#endif
+/*
static const unsigned HASH_NUM_VALUES = 65536;
static const unsigned HASH_NUM_CHARACTERS = 6;
static const unsigned HASH_SHIFT = 2;
-/*
Good and fast values: HASH_NUM_VALUES=65536, HASH_NUM_CHARACTERS=6, HASH_SHIFT=2
making HASH_NUM_CHARACTERS larger (like 8), makes the file size larger but is a bit faster
making HASH_NUM_CHARACTERS smaller (like 3), makes the file size smaller but is slower
diff --git a/src/types.h b/src/types.h
index a05a72d..688d664 100644
--- a/src/types.h
+++ b/src/types.h
@@ -210,4 +210,11 @@ enum MemberType
MemberType_Service,
};
+enum FortranFormat
+{
+ FortranFormat_Unknown,
+ FortranFormat_Free,
+ FortranFormat_Fixed
+};
+
#endif
diff --git a/src/util.h b/src/util.h
index 5f9a873..c131dd0 100644
--- a/src/util.h
+++ b/src/util.h
@@ -414,7 +414,6 @@ QCString externalRef(const QCString &relPath,const QCString &ref,bool href);
int nextUtf8CharPosition(const QCString &utf8Str,int len,int startPos);
const char *writeUtf8Char(FTextStream &t,const char *s);
-enum FortranKind { FORTRAN_UNKNOWN = 0, FORTRAN_FREE, FORTRAN_FIXED};
/** Data associated with a HSV colored image. */
struct ColoredImgDataItem