Thread

  1. Re: [HACKERS] Indent

    Bruce Momjian <maillist@candle.pha.pa.us> — 1999-11-10T01:19:48Z

    > >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, Pennsylvania 19026