diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-01-05 03:25:52 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2014-01-05 03:25:52 +0000 |
commit | 8648816b0dfd2b5158223853ba228488c50d89b7 (patch) | |
tree | 3f335adb3230d82c7c40a7b7238dd1c6aa71e81f /usr.bin/mandoc/mandocdb.c | |
parent | 796b79b2f66f673644d023a556461b3cffa729ab (diff) |
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 'usr.bin/mandoc/mandocdb.c')
-rw-r--r-- | usr.bin/mandoc/mandocdb.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c index 9961e3ad73b..54df489710c 100644 --- a/usr.bin/mandoc/mandocdb.c +++ b/usr.bin/mandoc/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.55 2014/01/05 03:06:36 schwarze Exp $ */ +/* $Id: mandocdb.c,v 1.56 2014/01/05 03:25:51 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org> @@ -1811,13 +1811,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]); @@ -1955,14 +1953,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" @@ -1999,7 +1995,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 (?,?,?,?,?)"; |