anchors don't have leading zero

---------

From: Zvi Har'El (rl@math.technion.ac.il)
Date: Mon Jan 27 2003 - 11:54:10 CST

  • Next message: Peter C. McCluskey: "Re: anchors don't have leading zero"

    Hi,

    I have noticed, using hypermail 2.1.6, that the hrefs to messages sorted by ...
    in the footer of message page have anchors which are the message number, but
    without the leading zeros. E.g, although the index page have anchors like
    <A NAME="0030">, the message page has <A HREF="...#30">. I beleive the culprit
    might be fprint_menu0() in print.c:280, i.e, %d format should be replaced by
    %.4d, as follows:

    --- src/print.c.orig 2003-01-24 07:37:27.000000000 +0200
    +++ src/print.c 2003-01-27 19:51:37.000000000 +0200
    @@ -288,16 +288,16 @@
             fprintf(fp,"<li><strong>%s %s:</strong> \n",
                    lang[MSG_MESSAGES], lang[MSG_SORTED_BY]);
             if (show_index[dlev][DATE_INDEX])
    - fprintf(fp, "<a href=\"%s#%d\">[ %s ]</a>\n",
    + fprintf(fp, "<a href=\"%s#%.4d\">[ %s ]</a>\n",
                        index_name[dlev][DATE_INDEX], num, lang[MSG_DATE]);
            if (show_index[dlev][THREAD_INDEX])
    - fprintf(fp, "<a href=\"%s#%d\">[ %s ]</a>\n",
    + fprintf(fp, "<a href=\"%s#%.4d\">[ %s ]</a>\n",
                        index_name[dlev][THREAD_INDEX], num, lang[MSG_THREAD]);
            if (show_index[dlev][SUBJECT_INDEX])
    - fprintf(fp, "<a href=\"%s#%d\">[ %s ]</a>\n",
    + fprintf(fp, "<a href=\"%s#%.4d\">[ %s ]</a>\n",
                        index_name[dlev][SUBJECT_INDEX], num, lang[MSG_SUBJECT]);
            if (show_index[dlev][AUTHOR_INDEX])
    - fprintf(fp, "<a href=\"%s#%d\">[ %s ]</a>\n",
    + fprintf(fp, "<a href=\"%s#%.4d\">[ %s ]</a>\n",
                        index_name[dlev][AUTHOR_INDEX], num, lang[MSG_AUTHOR]);
            if (show_index[dlev][ATTACHMENT_INDEX]) {
                fprintf(fp, "<a href=\"%s\">[ %s ]</a>\n",

    -- 
    Dr. Zvi Har'El     mailto:rl@math.technion.ac.il     Department of Mathematics
    tel:+972-54-227607 icq:179294841     Technion - Israel Institute of Technology
    fax:+972-4-8324654 http://www.math.technion.ac.il/~rl/     Haifa 32000, ISRAEL
    "If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)
                                  Monday, 25 Shevat 5763, 27 January 2003,  7:34PM
    

  • Next message: Peter C. McCluskey: "Re: anchors don't have leading zero"

    ---------

    This archive was generated by hypermail 2.1.5.