From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: Re: [PATCH] search: fix altid search with XapHelper process
Date: Mon, 6 May 2024 06:08:39 +0000 [thread overview]
Message-ID: <20240506060839.M964200@dcvr> (raw)
In-Reply-To: <20240505233510.1896122-1-e@80x24.org>
Eric Wong <e@80x24.org> wrote:
> +++ b/lib/PublicInbox/xap_helper.h
> @@ -126,6 +127,7 @@ typedef bool (*cmd)(struct req *);
> struct req { // argv and pfxv point into global rbuf
> char *argv[MY_ARG_MAX];
> char *pfxv[MY_ARG_MAX]; // -A <prefix>
> + char *qpfxv[MY_ARG_MAX]; // -A <prefix>
That comment is wrong.
> +// setup query parser for altid and arbitrary headers
> +static void srch_init_extra(struct req *req)
> +{
> + const char *XPFX;
> + for (int i = 0; i < req->qpfxc; i++) {
> + size_t len = strlen(req->qpfxv[i]);
> + char *c = (char *)memchr(req->qpfxv[i], '=', len);
> +
> + if (c) { // it's boolean gmane:XGMANE
And so is that comment. Will squash this in before pushing:
diff --git a/lib/PublicInbox/xap_helper.h b/lib/PublicInbox/xap_helper.h
index 4e809fdd..bdc1c5b1 100644
--- a/lib/PublicInbox/xap_helper.h
+++ b/lib/PublicInbox/xap_helper.h
@@ -127,7 +127,7 @@ typedef bool (*cmd)(struct req *);
struct req { // argv and pfxv point into global rbuf
char *argv[MY_ARG_MAX];
char *pfxv[MY_ARG_MAX]; // -A <prefix>
- char *qpfxv[MY_ARG_MAX]; // -A <prefix>
+ char *qpfxv[MY_ARG_MAX]; // -Q <user_prefix>[:=]<INTERNAL_PREFIX>
size_t *lenv; // -A <prefix>LENGTH
struct srch *srch;
char *Pgit_dir;
@@ -595,7 +595,7 @@ static void srch_init_extra(struct req *req)
size_t len = strlen(req->qpfxv[i]);
char *c = (char *)memchr(req->qpfxv[i], '=', len);
- if (c) { // it's boolean gmane:XGMANE
+ if (c) { // it's boolean "gmane=XGMANE"
XPFX = c + 1;
*c = 0;
req->srch->qp->add_boolean_prefix(req->qpfxv[i], XPFX);
prev parent reply other threads:[~2024-05-06 6:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-05 23:35 [PATCH] search: fix altid search with XapHelper process Eric Wong
2024-05-06 6:08 ` Eric Wong [this message]
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
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240506060839.M964200@dcvr \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).