source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Save the MLINK name into the database, too; apropos(1) will need
Date: Fri, 27 Dec 2013 13:42:26 -0500 (EST)	[thread overview]
Message-ID: <201312271842.rBRIgPGs001656@krisdoz.my.domain> (raw)

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

                 reply	other threads:[~2013-12-27 18:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201312271842.rBRIgPGs001656@krisdoz.my.domain \
    --to=schwarze@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).