obfuscating indent options...

From: <jose.kahan_at_w3.org_at_hypermail-project.org>
Date: Thu, 28 Oct 1999 19:31:20 +0200 (MET DST)
Message-Id: <199910281731.TAA01082_at_tuvalu.inrialpes.fr>


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


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)
                                        );

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?"--&gt; ":"",
            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 ? "--&gt; " : "", 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));
    } Received on Thu 28 Oct 1999 07:31:52 PM GMT

This archive was generated by hypermail 2.3.0 : Sat 13 Mar 2010 03:46:11 AM GMT GMT