summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-01-05 03:25:51 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-01-05 03:25:51 +0000
commit608a6c89c9426ab56ed7aed08e536320749c0734 (patch)
tree5794e5bff174141dd98748def06215e0d9df335c /mandocdb.c
parent309ba0ab0e453acde16dc583e036874dbeb4a2a4 (diff)
downloadmandoc-608a6c89c9426ab56ed7aed08e536320749c0734.tar.gz
Remove the obsolete sec and arch columns from the mpages table.
They were confusing because a manpage can have MLINKS in different sections and architectures.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 4b5d8fdb..4740a284 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1819,13 +1819,11 @@ dbindex(const struct mpage *mpage, struct mchars *mc)
i = 1;
/*
- * XXX The following three lines are obsolete
+ * XXX The following line is obsolete
* and only kept for backward compatibility
* until apropos(1) and friends have caught up.
*/
SQL_BIND_TEXT(stmts[STMT_INSERT_PAGE], i, mpage->mlinks->file);
- SQL_BIND_TEXT(stmts[STMT_INSERT_PAGE], i, mpage->mlinks->dsec);
- SQL_BIND_TEXT(stmts[STMT_INSERT_PAGE], i, mpage->mlinks->arch);
SQL_BIND_TEXT(stmts[STMT_INSERT_PAGE], i, desc);
SQL_BIND_INT(stmts[STMT_INSERT_PAGE], i, FORM_SRC == mpage->form);
SQL_STEP(stmts[STMT_INSERT_PAGE]);
@@ -1963,14 +1961,12 @@ dbopen(int real)
}
/*
- * XXX The first three columns in table mpages are obsolete
+ * XXX The first column in table mpages is obsolete
* and only kept for backward compatibility
* until apropos(1) and friends have caught up.
*/
sql = "CREATE TABLE \"mpages\" (\n"
" \"file\" TEXT NOT NULL,\n"
- " \"sec\" TEXT NOT NULL,\n"
- " \"arch\" TEXT NOT NULL,\n"
" \"desc\" TEXT NOT NULL,\n"
" \"form\" INTEGER NOT NULL,\n"
" \"id\" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL\n"
@@ -2007,7 +2003,7 @@ prepare_statements:
sql = "DELETE FROM mpages where file=?";
sqlite3_prepare_v2(db, sql, -1, &stmts[STMT_DELETE_PAGE], NULL);
sql = "INSERT INTO mpages "
- "(file,sec,arch,desc,form) VALUES (?,?,?,?,?)";
+ "(file,desc,form) VALUES (?,?,?)";
sqlite3_prepare_v2(db, sql, -1, &stmts[STMT_INSERT_PAGE], NULL);
sql = "INSERT INTO mlinks "
"(file,sec,arch,name,pageid) VALUES (?,?,?,?,?)";