Re: [HACKERS] Indent - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Indent
Date
Msg-id 199911100119.UAA25171@candle.pha.pa.us
Whole thread Raw
In response to Indent  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
> >From FAQ_DEV:
> 
> "pgindent will format source files to match our standard format, which
>  has four-space tabs, and an indenting format specified by flags to the
>  your operating system's utility indent."
> 
> Then why are all files indented with eight spaces? I personally like the
> four spaces, straight bsd style in Emacs and -orig in indent. But at least
> it should be consistent.

My guess is that you have tabs set to four spaces in your editor. 
Change it to 4-space tabs and you will be fine.

> 
> Also, how can I prevent this from happening:
> 
> void
> print_copyright(void)
> {
>         puts(
>                  "
>                  PostgreSQL Data Base Management System
>  
>                  Copyright(c) 1996 - 9 PostgreSQL Global Development Group
>   
> instead of
> 
> void                                                                              
> print_copyright(void)                                                             
> {                                                                                 
>         puts(                                                                     
> "                                                                
> PostgreSQL Data Base Management System
> 
> Copyright(c) 1996 - 9 PostgreSQL Global Development Group
> 
> ?
> Looks really ugly in the output.

Yes, it certainly does.  I changed it the quotes to "   " newline "  ",
and committed the cleanup.  Ran it through pgindent and it looks fine
now.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Indent
Next
From: Mike Mascari
Date:
Subject: Re: [HACKERS] Indent