From e52e6467de2bdcf5dda2474c8d7831d11ace173f Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 3 May 2021 12:55:35 +0200 Subject: Adding field extern for sqlite output In case we have: ``` extern int var; ``` the `extern` was not recorded in case of sqlite output. --- src/sqlite3gen.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp index 6943fb9..8b9ed94 100644 --- a/src/sqlite3gen.cpp +++ b/src/sqlite3gen.cpp @@ -175,6 +175,7 @@ const char * table_schema[][2] = { "\twrite TEXT,\n" "\tprot INTEGER DEFAULT 0, -- 0:public 1:protected 2:private 3:package\n" "\tstatic INTEGER DEFAULT 0, -- 0:no 1:yes\n" + "\textern INTEGER DEFAULT 0, -- 0:no 1:yes\n" "\tconst INTEGER DEFAULT 0, -- 0:no 1:yes\n" "\texplicit INTEGER DEFAULT 0, -- 0:no 1:yes\n" "\tinline INTEGER DEFAULT 0, -- 0:no 1:yes 2:both (set after encountering inline and not-inline)\n" @@ -608,6 +609,7 @@ SqlStmt memberdef_insert={ "write," "prot," "static," + "extern," "const," "explicit," "inline," @@ -666,6 +668,7 @@ SqlStmt memberdef_insert={ ":write," ":prot," ":static," + ":extern," ":const," ":explicit," ":inline," @@ -925,7 +928,7 @@ static int insertPath(QCString name, bool local=TRUE, bool found=TRUE, int type= static void recordMetadata() { bindTextParameter(meta_insert,":doxygen_version",getFullVersion()); - bindTextParameter(meta_insert,":schema_version","0.2.0",TRUE); //TODO: this should be a constant somewhere; not sure where + bindTextParameter(meta_insert,":schema_version","0.2.1",TRUE); //TODO: this should be a constant somewhere; not sure where bindTextParameter(meta_insert,":generated_at",dateToString(TRUE)); bindTextParameter(meta_insert,":generated_on",dateToString(FALSE)); bindTextParameter(meta_insert,":project_name",Config_getString(PROJECT_NAME)); @@ -1147,7 +1150,7 @@ static int prepareStatement(sqlite3 *db, SqlStmt &s) rc = sqlite3_prepare_v2(db,s.query,-1,&s.stmt,0); if (rc!=SQLITE_OK) { - err("prepare failed for %s\n%s\n", s.query, sqlite3_errmsg(db)); + err("prepare failed for:\n %s\n %s\n", s.query, sqlite3_errmsg(db)); s.db = NULL; return -1; } @@ -1612,6 +1615,7 @@ static void generateSqlite3ForMember(const MemberDef *md, struct Refid scope_ref bindIntParameter(memberdef_insert,":prot",md->protection()); bindIntParameter(memberdef_insert,":static",md->isStatic()); + bindIntParameter(memberdef_insert,":extern",md->isExternal()); bool isFunc=FALSE; switch (md->memberType()) @@ -2496,7 +2500,7 @@ void generateSqlite3() if ( -1 == prepareStatements(db) ) { - err("sqlite generator: prepareStatements failed!"); + err("sqlite generator: prepareStatements failed!\n"); return; } @@ -2579,7 +2583,7 @@ void generateSqlite3() #else // USE_SQLITE3 void generateSqlite3() { - err("sqlite3 support has not been compiled in!"); + err("sqlite3 support has not been compiled in!\n"); } #endif // vim: noai:ts=2:sw=2:ss=2:expandtab -- cgit v0.12 From 36ac0ef72404e15109e0ceba9d6588930415f239 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 8 May 2021 14:24:01 +0200 Subject: Missing page when followed by mainpage When we have in one file a `\page` followed by a `\mainpage` than this page is not shown / completely ignore, an example: ``` @page pg_tst_1 Test 1 the 1 page @mainpage Test MainPage the mainpage ``` this problem is due to the fact that `handleMainPage` is called when a `\mainpage` command is found, and this is also the case at the end of the content of `\page` resulting in the fact that the name of this page is removed (and thus actually the complete page). --- src/commentscan.l | 1 - 1 file changed, 1 deletion(-) diff --git a/src/commentscan.l b/src/commentscan.l index adf7e1b..23a0471 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -2120,7 +2120,6 @@ static bool handleMainpage(yyscan_t yyscanner,const QCString &, const StringVect { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::MAINPAGEDOC_SEC); - yyextra->current->name = ""; if (!stop) { yyextra->current->name = "mainpage"; -- cgit v0.12