Skip to content

Commit 0232bc7

Browse files
author
Daigo Matsubara
committed
fixed some markup problems
1 parent 6228d03 commit 0232bc7

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

src/print.c

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ void fprint_menu0(FILE *fp, struct emailinfo *email, int pos)
257257
int num = email->msgnum;
258258
int loc_cmp = (pos == PAGE_BOTTOM ? 3 : 4);
259259
char *ptr;
260+
char *id= (pos == PAGE_TOP) ? "option2" : "option3";
260261

261262
#ifdef HAVE_ICONV
262263
int tmplen;
@@ -271,8 +272,8 @@ void fprint_menu0(FILE *fp, struct emailinfo *email, int pos)
271272

272273

273274
if (set_mailcommand && set_hmail) {
274-
fprintf(fp, "<li><a name=\"options2\" id=\"options2\"></a><dfn>%s</dfn>:",
275-
lang[MSG_MAIL_ACTIONS]);
275+
fprintf(fp, "<li><a name=\"%s\" id=\"%s\"></a><dfn>%s</dfn>:",
276+
id,id,lang[MSG_MAIL_ACTIONS]);
276277
if ((email->msgid && email->msgid[0]) || (email->subject && email->subject[0])) {
277278
#ifdef HAVE_ICONV
278279
ptr = makemailcommand(set_replymsg_command, set_hmail, email->msgid, tmpptr);
@@ -298,7 +299,7 @@ void fprint_menu0(FILE *fp, struct emailinfo *email, int pos)
298299
fprintf (fp, "<li>");
299300
/* add the anchor if we didn't do so in the above block */
300301
if (!(set_mailcommand && set_hmail))
301-
fprintf (fp, "<a name=\"options2\" id=\"options2\"></a>");
302+
fprintf (fp, "<a name=\"%s\" id=\"%s\"></a>",id,id);
302303
fprintf(fp, "<dfn>%s</dfn>:", lang[MSG_CONTEMPORARY_MSGS_SORTED]);
303304
if (show_index[dlev][DATE_INDEX])
304305
fprintf(fp, " [ <a href=\"%s#%d\" title=\"%s\">%s</a> ]",
@@ -316,19 +317,22 @@ void fprint_menu0(FILE *fp, struct emailinfo *email, int pos)
316317
fprintf(fp, " [ <a href=\"%s#%d\" title=\"%s\">%s</a> ]",
317318
index_name[dlev][AUTHOR_INDEX], num,
318319
lang[MSG_LTITLE_BY_AUTHOR], lang[MSG_BY_AUTHOR]);
319-
if (show_index[dlev][ATTACHMENT_INDEX]) {
320+
if (show_index[dlev][ATTACHMENT_INDEX])
320321
fprintf(fp, " [ <a href=\"%s\" title=\"%s\">%s</a> ]",
321322
index_name[dlev][ATTACHMENT_INDEX],
322323
lang[MSG_LTITLE_BY_ATTACHMENT], lang[MSG_BY_ATTACHMENT]);
323-
fprintf (fp, "</li>\n");
324-
if (ihtmlhelpupfile)
325-
fprintf(fp, "<li><dfn>%s</dfn>: %s</li>", lang[MSG_HELP], ihtmlhelpupfile);
326-
}
324+
fprintf (fp, "</li>\n");
325+
if (ihtmlhelpupfile)
326+
fprintf(fp, "<li><dfn>%s</dfn>: %s</li>", lang[MSG_HELP], ihtmlhelpupfile);
327327
}
328328

329329
if (set_custom_archives && *set_custom_archives)
330330
fprintf(fp, "<li><dfn>%s</dfn>: %s</li>\n", lang[MSG_OTHER_MAIL_ARCHIVES], set_custom_archives);
331-
fprintf (fp,"</ul>\n");
331+
332+
if (!(set_show_msg_links && set_show_msg_links != loc_cmp)
333+
|| (set_show_index_links && set_show_index_links != loc_cmp)){
334+
fprintf (fp,"</ul>\n");
335+
}
332336
#ifdef HAVE_ICONV
333337
if(tmpptr)
334338
free(tmpptr);
@@ -1096,7 +1100,7 @@ void printheaders (FILE *fp, struct emailinfo *email)
10961100
d_index = MSG_EXPIRED;
10971101
if (email->is_deleted == 4 || email->is_deleted == 8)
10981102
d_index = MSG_FILTERED_OUT;
1099-
fprintf(fp, "<a name=\"start%d\" accesskey=\"j\" id=\"start\"></a>", email->msgnum);
1103+
fprintf(fp, "<a name=\"start%d\" accesskey=\"j\" id=\"start%d\"></a>", email->msgnum,email->msgnum);
11001104
fprintf(fp, "<p>%s</p>\n", lang[d_index]); /* AUDIT biege: No more warnings about format-bug */
11011105
return;
11021106
}
@@ -1199,14 +1203,14 @@ void printbody(FILE *fp, struct emailinfo *email, int maybe_reply, int is_reply)
11991203
d_index = MSG_EXPIRED;
12001204
if (email->is_deleted == 4 || email->is_deleted == 8)
12011205
d_index = MSG_FILTERED_OUT;
1202-
fprintf(fp, "<a name=\"start%d\" accesskey=\"j\" id=\"start\"></a>", email->msgnum);
1206+
fprintf(fp, "<a name=\"start%d\" accesskey=\"j\" id=\"start%d\"></a>", email->msgnum,email->msgnum);
12031207
fprintf(fp, "<p>%s</p>\n", lang[d_index]); /* AUDIT biege: No more warnings about format-bug */
12041208
return;
12051209
}
12061210

12071211
if (!set_showhtml) {
12081212
fprintf(fp, "<pre id=\"body\">\n");
1209-
fprintf(fp, "<a name=\"start%d\" accesskey=\"j\" id=\"start\"></a>", email->msgnum);
1213+
fprintf(fp, "<a name=\"start%d\" accesskey=\"j\" id=\"start%d\"></a>", email->msgnum,email->msgnum);
12101214
pre = TRUE;
12111215
}
12121216

0 commit comments

Comments
 (0)