Eric Wong <[email protected]> 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);

Reply via email to