Skip to Content.
Sympa Menu

freetds - RE: indent(1) bent

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: James K. Lowden <jklowden AT speakeasy.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: RE: indent(1) bent
  • Date: Sat, 19 Oct 2002 18:39:19 -0400


On Sat, 19 Oct 2002 13:49:22 -0400, "Castellano, Nicholas"
<Nicholas_Castellano AT acml.com> wrote:
> You can't maintain symlinks or hard links in CVS.
>
> It's probably good enough to keep one copy in the top-level source
> directory of the CVS tree. When actually doing the indent, you would
> need to copy this to ~/.indent.pro or put a copy in each directory to be
> indented. Really, there should be no need for "normal" users or even for
> most developers to use this, so including it in CVS would actually be
> more a form of documentation than anything else.

I thought src seemed like the right place. I'll probably create symlinks
in my tree.

> I'm actually slightly more pedantic than indent in the "case" case that
> you cite. Not only would I indent it as shown, but I would also add the
> missing"break;" after each return.

Well, I wouldn't object. I don't think "break;" adds clarity or safety in
the case I cited. In a non-trivial switch, I'd agree, but when almost all
it does is return, I don't think "case X: return 0; break;" adds anything
but noise.

C doesn't have searchable maps as a datatype, so you often wind up using a
switch as a lookup mechanism. Cf. dblib.c::_get_printable_size(). A
language with spartan datatypes begs for spartan code from time to time.

> I really prefer that local variables inside functions be
> indented at the same level as code, instead of out at the margin with
> the function declaration.

I agree. Maybe we should just change all the code real fast before the
baby starts sleeping through the night. We can even give it (the process,
not the baby) a name and write a book about it: "Xtreme Reformatting".

While we're at it, can we set tabstops to 3?

Brian? You around? 3:1 says variable declarations don't belong in column
0. How strongly are you attached to that convention?

Indent doesn't adjust this AFAICT. It seems to respect left-flush
declarations. Nor does it seem to replace blanks with tabs; it just uses
tabs to do its work.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page