Re: [HACKERS] pgindent - Mailing list pgsql-hackers
From | Bruce Momjian |
---|---|
Subject | Re: [HACKERS] pgindent |
Date | |
Msg-id | 199909091944.PAA01295@candle.pha.pa.us Whole thread Raw |
In response to | pgindent (Bernard Frankpitt <frankpit@pop.dn.net>) |
List | pgsql-hackers |
> Hi All, > > I just tried to get pgindent to work and I ran into a few snags > } > } > ! if (*buf_ptr == 'L' || *buf_ptr == 'l') > *e_token++ = *buf_ptr++; > } > > while (1) { > if (!(seensfx & 1) && > (*buf_ptr == 'U' || *buf_ptr == 'u')) { > CHECK_SIZE_TOKEN; > *e_token++ = *buf_ptr++; > seensfx |= 1; > Also, in the openbsd source the specials buffer is automatically > resized, so it seems that neither part of the patch is necessary for > recent openbsd sources. Great. Your version looks nice. BSDI also has fixed the buffer size problem, but it was easier to just send people a patch to apply, rather than illegally sending out their changes. > > I think that you need to use > indent --version -npro </dev/null >/dev/null 2>&1 > > On my system (Redhat Linux 5.?) I get > > aims2-bernie:$ indent --version > GNU indent 1.9.1 > aims2-bernie:$ echo $? > 0 > aims2-bernie:$ bsdindent --version > bsdindent: Command line: unknown parameter "--version" > aims2-bernie:$ echo $? > 1 > > ( That is with 'bsdindent' as the patched freebsd indent ) Good. OK, new test is: indent --version </dev/null >/dev/null 2>&1if [ "$?" -eq 0 ]then echo "You do not appear to have 'indent' installed onyoursystem." >&2 exit 1fi > > > 3) > > Finally, the result of running > > find . -name '*.[ch]' -type f -print | egrep -v '\+\+|/odbc/|s_lock.h' > | xargs -n100 pgindent > > on a fresh copy of the 6.5 sources with either the openbsd or patched > bsd indent is the following > > Hope you installed /src/tools/pgindent/indent.bsd.patch. > Hope you installed /src/tools/pgindent/indent.bsd.patch. > ./backend/parser/gram.c > Error@5251: #if stack overflow > Error@5252: #if stack overflow > Error@5263: Unmatched #endif > Error@5264: Unmatched #endif This is expected. Gram.c is generated from gram.y, so there is no real need to indent it. > Hope you installed /src/tools/pgindent/indent.bsd.patch. > Hope you installed /src/tools/pgindent/indent.bsd.patch. > Hope you installed /src/tools/pgindent/indent.bsd.patch. > Hope you installed /src/tools/pgindent/indent.bsd.patch. > Hope you installed /src/tools/pgindent/indent.bsd.patch. > Hope you installed /src/tools/pgindent/indent.bsd.patch. > ./interfaces/ecpg/test/header_test.h > Error@19: Stuff missing from end of file. I haven't seen the egcs problem. In this case, it is getting confused by the inline SQL commands. No cause for concern. -- 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: