![]()
From: jose.kahan@w3.org
Date: Thu Oct 28 1999 - 12:31:20 CDT
Are the current indent options right?
They seem to make parts of the code much more harder to read than before.
I'm copying two examples taken from the CVS base in which the semantics
and logical ordering of the structure was much better before going thru
indent. In my opinion, it's much easier to understand the code following
the author's own formatting than that produced by a program.
Is this indent pass a one-time thing or do we have to indent the files
before commiting them each time? If yes, we should try to ease the
indent options or use the special label that allows to turn off indenting
on some parts of the code.
-Jose
===================
** parse.c
before indent===>
while(bp) {
origbp = addbody(origbp, &origlp,
bp->line,
(bp->header?BODY_HEADER:0)|
(bp->html?BODY_HTMLIZED:0)|
(bp->attached?BODY_ATTACHED:0)
);
current==>
while (bp) {
origbp = addbody(origbp, &origlp,
bp->line,
(bp->
header ? BODY_HEADER
: 0) | (bp->
html ?
BODY_HTMLIZED
: 0) | (bp->
attached
?
BODY_ATTAC
HED
: 0)
);
*** threadprint.c
before===>
if(set_indextable) {
fprintf(fp,"<tr><td>%s<A HREF=\"%.4d.%s\"><STRONG>%s</STRONG></A></td>"
"<td><A NAME=\"%d\">%s</a></td>"
"<td>%s</td></tr>\n",
level>1?"--> ":"",
email->msgnum, set_htmlsuffix,
subj, email->msgnum, email->name,
getdatestr(email->date));
}
else {
fprintf(fp,"<li><A HREF=\"%.4d.%s\">"
"<STRONG>%s</STRONG></A> "
"<A NAME=\"%d\"><EM>%s <small>(%s)</small></EM></A>\n",
email->msgnum, set_htmlsuffix,
subj,
email->msgnum, email->name, getdatestr(email->date));
}
current==>
if (set_indextable) {
fprintf(fp,
"<tr><td>%s<A HREF=\"%.4d.%s\"><STRONG>%s</STRONG></A></td>"
"<td><A NAME=\"%d\">%s</a></td>" "<td>%s</td></tr>\n",
level > 1 ? "--> " : "", email->msgnum, set_htmlsuffix,
subj, email->msgnum, email->name, getdatestr(email->date));
}
else {
fprintf(fp, "<li><A HREF=\"%.4d.%s\">"
"<STRONG>%s</STRONG></A> "
"<A NAME=\"%d\"><EM>%s <small>(%s)</small></EM></A>\n",
email->msgnum, set_htmlsuffix,
subj, email->msgnum, email->name, getdatestr(email->date));
}
![]()