Re: [HACKERS] Running pgindent

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: lockhart(at)alumni(dot)caltech(dot)edu (Thomas G(dot) Lockhart)
Cc: hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Running pgindent
Date: 1998-02-25 00:25:28
Message-ID: 199802250025.TAA26711@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Well, *&^*^#$! I wasted hours cleaning up some of what I considered damage from
> the last pass through.
> Would it be possible to pass back through (i.e. pipe indent output to a filter)
> and fix at least points (1) and (2)? _That_ would be pretty easy to automate
> since the heuristics can be pretty simple:
>
> if (first char is nonwhitespace) && (next word is "*") && (next line starts with
> word+paren)
> then compress whitespace
>
> else if (first char is "}") && (next word is "/*")
> then compress whitespace
>
> else
> write line as-is
>
> I'll write the perl if you would be willing to use it?

OK, I have changed pgindent to reflect the new structure names, and have
made your requested changes. For #1, if the line began with an alpha,
and ends with a *, I remove tabs/spaces before the * and make it only
one space. Let me know how you like the changes.

I have not run it on the source yet because people are still holding
patches.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ocie 1998-02-25 00:44:21 Compiling under Solaris
Previous Message Keith Parks 1998-02-25 00:09:30 initdb error on 24th Feb (PM) cvsup.