* mdocml: Save the MLINK name into the database, too; apropos(1) will need
@ 2013-12-27 18:42 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2013-12-27 18:42 UTC (permalink / raw)
To: source
Log Message:
-----------
Save the MLINK name into the database, too;
apropos(1) will need it to display its results.
Modified Files:
--------------
mdocml:
mandocdb.c
Revision Data
-------------
Index: mandocdb.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandocdb.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -Lmandocdb.c -Lmandocdb.c -u -p -r1.87 -r1.88
--- mandocdb.c
+++ mandocdb.c
@@ -1806,9 +1806,10 @@ dbindex(const struct mpage *mpage, struc
for (mlink = mpage->mlinks; mlink; mlink = mlink->next) {
i = 1;
+ SQL_BIND_TEXT(stmts[STMT_INSERT_LINK], i, mlink->file);
SQL_BIND_TEXT(stmts[STMT_INSERT_LINK], i, mlink->dsec);
SQL_BIND_TEXT(stmts[STMT_INSERT_LINK], i, mlink->arch);
- SQL_BIND_TEXT(stmts[STMT_INSERT_LINK], i, mlink->file);
+ SQL_BIND_TEXT(stmts[STMT_INSERT_LINK], i, mlink->name);
SQL_BIND_INT64(stmts[STMT_INSERT_LINK], i, recno);
SQL_STEP(stmts[STMT_INSERT_LINK]);
sqlite3_reset(stmts[STMT_INSERT_LINK]);
@@ -1948,6 +1949,7 @@ dbopen(int real)
");\n"
"\n"
"CREATE TABLE \"mlinks\" (\n"
+ " \"file\" TEXT NOT NULL,\n"
" \"sec\" TEXT NOT NULL,\n"
" \"arch\" TEXT NOT NULL,\n"
" \"name\" TEXT NOT NULL,\n"
@@ -1980,7 +1982,7 @@ prepare_statements:
"(file,sec,arch,desc,form) VALUES (?,?,?,?,?)";
sqlite3_prepare_v2(db, sql, -1, &stmts[STMT_INSERT_PAGE], NULL);
sql = "INSERT INTO mlinks "
- "(sec,arch,name,pageid) VALUES (?,?,?,?)";
+ "(file,sec,arch,name,pageid) VALUES (?,?,?,?,?)";
sqlite3_prepare_v2(db, sql, -1, &stmts[STMT_INSERT_LINK], NULL);
sql = "INSERT INTO keys "
"(bits,key,pageid) VALUES (?,?,?)";
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-27 18:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-27 18:42 mdocml: Save the MLINK name into the database, too; apropos(1) will need schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).