📄 readme
字号:
This can format all PostgreSQL *.c and *.h files, but excludes *.y, and *.lfiles.Get the list of typedef's included in pgindent by running this on thepgsql/bin directory: /src/tools/find_typedefand update the list in pgindent. This requires the binaries have debug symbols.From the top directory, run: find . -name '*.[ch]' -type f -print | egrep -v '\+\+|s_lock.h' | xargs -n100 pgindentThe stock BSD indent has two bugs. First, a comment after the word 'else'causes the rest of the file to be ignored. Second, it silently ignorestypedefs after getting the first 100.Both problems are worked-around in this script. We also include a patchfor the second bug in: /src/tools/pgindent/indent.bsd.patchEven with the workaround, installation of the patch produces betteroutput. You can get a patched BSD indent from ftp://ftp.postgresql.org/pub/dev.GNU indent, version 2.2.6, has several problems, and is not recommended.These bugs become pretty major when you are doing >400k lines of code.If you don't believe me, take a directory and make a copy. Run pgindenton the copy using GNU indent, and do a diff -r. You will see what Imean. GNU indent does some things better, but mangles too.---------------------------------------------------------------------------For java, we use astyle, http://astyle.sourceforge.net/, with thefollowing options: find . \( -name '*.java' -o -name '*.java.in' \) -print | xargs -n100 pgjindent---------------------------------------------------------------------------For cpp, we use astyle, http://astyle.sourceforge.net/, with thefollowing options: find src/interfaces/libpq++ -name '*.[ch]' -print | xargs -n100 pgcppindent
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -