]> granicus.if.org Git - postgresql/commit
Initial pgindent run with pg_bsd_indent version 2.0.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 21 Jun 2017 18:39:04 +0000 (14:39 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 21 Jun 2017 18:39:04 +0000 (14:39 -0400)
commite3860ffa4dd0dad0dd9eea4be9cc1412373a8c89
tree8dc7df95c340803546152724fbc17aee4b8527f9
parent8ff6d4ec7840b0af56f1207073f44b7f2afae96d
Initial pgindent run with pg_bsd_indent version 2.0.

The new indent version includes numerous fixes thanks to Piotr Stefaniak.
The main changes visible in this commit are:

* Nicer formatting of function-pointer declarations.
* No longer unexpectedly removes spaces in expressions using casts,
  sizeof, or offsetof.
* No longer wants to add a space in "struct structname *varname", as
  well as some similar cases for const- or volatile-qualified pointers.
* Declarations using PG_USED_FOR_ASSERTS_ONLY are formatted more nicely.
* Fixes bug where comments following declarations were sometimes placed
  with no space separating them from the code.
* Fixes some odd decisions for comments following case labels.
* Fixes some cases where comments following code were indented to less
  than the expected column 33.

On the less good side, it now tends to put more whitespace around typedef
names that are not listed in typedefs.list.  This might encourage us to
put more effort into typedef name collection; it's not really a bug in
indent itself.

There are more changes coming after this round, having to do with comment
indentation and alignment of lines appearing within parentheses.  I wanted
to limit the size of the diffs to something that could be reviewed without
one's eyes completely glazing over, so it seemed better to split up the
changes as much as practical.

Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org
Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
379 files changed:
contrib/bloom/blutils.c
contrib/btree_gist/btree_utils_var.c
contrib/dblink/dblink.c
contrib/fuzzystrmatch/fuzzystrmatch.c
contrib/intarray/_int_gin.c
contrib/ltree/lquery_op.c
contrib/oid2name/oid2name.c
contrib/pg_stat_statements/pg_stat_statements.c
contrib/pg_trgm/trgm_op.c
contrib/pg_visibility/pg_visibility.c
contrib/pgcrypto/imath.c
contrib/pgcrypto/imath.h
contrib/pgcrypto/internal.c
contrib/pgcrypto/mbuf.h
contrib/pgcrypto/pgp-decrypt.c
contrib/pgcrypto/pgp-pgsql.c
contrib/pgcrypto/px-crypt.c
contrib/pgcrypto/px.h
contrib/pgcrypto/rijndael.h
contrib/pgcrypto/sha1.c
contrib/pgstattuple/pgstatapprox.c
contrib/pgstattuple/pgstattuple.c
contrib/sepgsql/hooks.c
contrib/sepgsql/label.c
contrib/sepgsql/selinux.c
contrib/sepgsql/sepgsql.h
contrib/sepgsql/uavc.c
contrib/spi/timetravel.c
contrib/uuid-ossp/uuid-ossp.c
contrib/vacuumlo/vacuumlo.c
contrib/xml2/xpath.c
src/backend/access/common/reloptions.c
src/backend/access/gin/ginarrayproc.c
src/backend/access/gin/gindatapage.c
src/backend/access/hash/hash.c
src/backend/access/hash/hash_xlog.c
src/backend/access/hash/hashovfl.c
src/backend/access/heap/rewriteheap.c
src/backend/access/heap/tuptoaster.c
src/backend/access/nbtree/nbtree.c
src/backend/access/spgist/spgdoinsert.c
src/backend/access/spgist/spgscan.c
src/backend/access/transam/parallel.c
src/backend/access/transam/slru.c
src/backend/access/transam/twophase.c
src/backend/access/transam/xlog.c
src/backend/catalog/index.c
src/backend/catalog/partition.c
src/backend/commands/copy.c
src/backend/commands/extension.c
src/backend/commands/functioncmds.c
src/backend/commands/publicationcmds.c
src/backend/commands/tablecmds.c
src/backend/commands/trigger.c
src/backend/commands/vacuumlazy.c
src/backend/executor/execCurrent.c
src/backend/executor/functions.c
src/backend/executor/nodeAgg.c
src/backend/executor/nodeHashjoin.c
src/backend/executor/nodeMaterial.c
src/backend/executor/nodeMergejoin.c
src/backend/executor/nodeProjectSet.c
src/backend/executor/nodeSetOp.c
src/backend/executor/nodeWindowAgg.c
src/backend/lib/binaryheap.c
src/backend/lib/ilist.c
src/backend/lib/rbtree.c
src/backend/libpq/auth.c
src/backend/libpq/be-fsstubs.c
src/backend/libpq/hba.c
src/backend/libpq/ifaddr.c
src/backend/libpq/pqcomm.c
src/backend/nodes/nodeFuncs.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/path/joinrels.c
src/backend/optimizer/prep/prepjointree.c
src/backend/optimizer/util/predtest.c
src/backend/parser/parse_expr.c
src/backend/parser/parse_func.c
src/backend/port/win32/crashdump.c
src/backend/port/win32/socket.c
src/backend/port/win32/timer.c
src/backend/postmaster/autovacuum.c
src/backend/postmaster/bgworker.c
src/backend/postmaster/pgstat.c
src/backend/postmaster/postmaster.c
src/backend/postmaster/syslogger.c
src/backend/regex/regc_color.c
src/backend/regex/regc_cvec.c
src/backend/regex/regc_lex.c
src/backend/regex/regc_locale.c
src/backend/regex/regc_nfa.c
src/backend/regex/regcomp.c
src/backend/regex/rege_dfa.c
src/backend/regex/regerror.c
src/backend/regex/regexec.c
src/backend/regex/regexport.c
src/backend/regex/regprefix.c
src/backend/replication/basebackup.c
src/backend/replication/logical/reorderbuffer.c
src/backend/replication/walreceiver.c
src/backend/replication/walsender.c
src/backend/rewrite/rewriteHandler.c
src/backend/snowball/dict_snowball.c
src/backend/statistics/dependencies.c
src/backend/statistics/extended_stats.c
src/backend/statistics/mvdistinct.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/freelist.c
src/backend/storage/ipc/dsm.c
src/backend/storage/ipc/shm_mq.c
src/backend/storage/ipc/shm_toc.c
src/backend/storage/ipc/shmem.c
src/backend/storage/lmgr/lwlock.c
src/backend/storage/lmgr/predicate.c
src/backend/storage/lmgr/proc.c
src/backend/storage/lmgr/s_lock.c
src/backend/storage/smgr/md.c
src/backend/storage/smgr/smgr.c
src/backend/tcop/fastpath.c
src/backend/tcop/postgres.c
src/backend/tcop/utility.c
src/backend/tsearch/regis.c
src/backend/tsearch/spell.c
src/backend/tsearch/ts_typanalyze.c
src/backend/tsearch/wparser_def.c
src/backend/utils/adt/array_typanalyze.c
src/backend/utils/adt/arrayfuncs.c
src/backend/utils/adt/arrayutils.c
src/backend/utils/adt/cash.c
src/backend/utils/adt/date.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/dbsize.c
src/backend/utils/adt/encode.c
src/backend/utils/adt/formatting.c
src/backend/utils/adt/geo_ops.c
src/backend/utils/adt/int.c
src/backend/utils/adt/jsonb.c
src/backend/utils/adt/jsonfuncs.c
src/backend/utils/adt/like_match.c
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/pg_locale.c
src/backend/utils/adt/rangetypes.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/adt/selfuncs.c
src/backend/utils/adt/timestamp.c
src/backend/utils/adt/tsquery.c
src/backend/utils/adt/tsrank.c
src/backend/utils/adt/tsvector_op.c
src/backend/utils/adt/tsvector_parser.c
src/backend/utils/adt/varlena.c
src/backend/utils/cache/catcache.c
src/backend/utils/cache/inval.c
src/backend/utils/cache/typcache.c
src/backend/utils/error/elog.c
src/backend/utils/fmgr/dfmgr.c
src/backend/utils/fmgr/fmgr.c
src/backend/utils/hash/dynahash.c
src/backend/utils/mb/wchar.c
src/backend/utils/misc/backend_random.c
src/backend/utils/misc/guc.c
src/backend/utils/mmgr/aset.c
src/backend/utils/mmgr/slab.c
src/backend/utils/resowner/resowner.c
src/backend/utils/sort/tuplesort.c
src/bin/initdb/findtimezone.c
src/bin/initdb/initdb.c
src/bin/pg_dump/parallel.h
src/bin/pg_dump/pg_backup.h
src/bin/pg_dump/pg_backup_custom.c
src/bin/pg_dump/pg_backup_utils.c
src/bin/pg_dump/pg_dump_sort.c
src/bin/pg_upgrade/check.c
src/bin/pg_upgrade/version.c
src/bin/pgbench/pgbench.c
src/bin/pgevent/pgevent.c
src/bin/psql/conditional.h
src/bin/psql/copy.c
src/bin/psql/describe.c
src/bin/psql/mainloop.c
src/bin/psql/startup.c
src/bin/psql/stringutils.c
src/bin/psql/tab-complete.c
src/common/exec.c
src/common/ip.c
src/common/unicode/norm_test.c
src/fe_utils/mbprint.c
src/fe_utils/print.c
src/fe_utils/simple_list.c
src/fe_utils/string_utils.c
src/include/access/amapi.h
src/include/access/gin_private.h
src/include/access/ginxlog.h
src/include/access/hash.h
src/include/access/hash_xlog.h
src/include/access/hio.h
src/include/access/itup.h
src/include/access/relscan.h
src/include/access/slru.h
src/include/access/tsmapi.h
src/include/access/tupdesc.h
src/include/access/tuptoaster.h
src/include/access/twophase_rmgr.h
src/include/access/xact.h
src/include/access/xloginsert.h
src/include/access/xlogreader.h
src/include/access/xlogrecord.h
src/include/c.h
src/include/catalog/index.h
src/include/catalog/namespace.h
src/include/catalog/objectaccess.h
src/include/catalog/pg_db_role_setting.h
src/include/catalog/pg_description.h
src/include/catalog/pg_extension.h
src/include/catalog/pg_init_privs.h
src/include/catalog/pg_largeobject.h
src/include/catalog/pg_pltemplate.h
src/include/catalog/pg_proc.h
src/include/catalog/pg_replication_origin.h
src/include/catalog/pg_seclabel.h
src/include/catalog/pg_shdescription.h
src/include/catalog/pg_shseclabel.h
src/include/catalog/pg_subscription.h
src/include/catalog/pg_trigger.h
src/include/commands/explain.h
src/include/commands/seclabel.h
src/include/commands/vacuum.h
src/include/common/int128.h
src/include/common/ip.h
src/include/common/unicode_norm_table.h
src/include/executor/executor.h
src/include/executor/hashjoin.h
src/include/executor/tablefunc.h
src/include/fe_utils/mbprint.h
src/include/fe_utils/print.h
src/include/fe_utils/psqlscan.h
src/include/fmgr.h
src/include/foreign/fdwapi.h
src/include/getaddrinfo.h
src/include/getopt_long.h
src/include/lib/pairingheap.h
src/include/lib/simplehash.h
src/include/libpq/ifaddr.h
src/include/libpq/libpq-be.h
src/include/mb/pg_wchar.h
src/include/nodes/execnodes.h
src/include/nodes/extensible.h
src/include/nodes/memnodes.h
src/include/nodes/nodeFuncs.h
src/include/nodes/nodes.h
src/include/nodes/params.h
src/include/nodes/parsenodes.h
src/include/nodes/primnodes.h
src/include/nodes/relation.h
src/include/optimizer/cost.h
src/include/optimizer/paths.h
src/include/optimizer/plancat.h
src/include/optimizer/planmain.h
src/include/optimizer/planner.h
src/include/parser/analyze.h
src/include/parser/parse_node.h
src/include/parser/parser.h
src/include/pg_getopt.h
src/include/pgstat.h
src/include/pgtime.h
src/include/port.h
src/include/port/win32.h
src/include/postgres.h
src/include/postmaster/bgworker.h
src/include/regex/regguts.h
src/include/replication/logical.h
src/include/replication/output_plugin.h
src/include/replication/reorderbuffer.h
src/include/replication/walreceiver.h
src/include/rewrite/rowsecurity.h
src/include/rusagestub.h
src/include/statistics/statistics.h
src/include/storage/itemptr.h
src/include/storage/lock.h
src/include/storage/lwlock.h
src/include/storage/pg_shmem.h
src/include/storage/predicate_internals.h
src/include/tcop/dest.h
src/include/tcop/utility.h
src/include/tsearch/ts_utils.h
src/include/utils/bytea.h
src/include/utils/datetime.h
src/include/utils/elog.h
src/include/utils/expandeddatum.h
src/include/utils/guc.h
src/include/utils/guc_tables.h
src/include/utils/hsearch.h
src/include/utils/nabstime.h
src/include/utils/portal.h
src/include/utils/rangetypes.h
src/include/utils/rel.h
src/include/utils/resowner.h
src/include/utils/selfuncs.h
src/include/utils/snapshot.h
src/include/utils/timestamp.h
src/include/utils/xml.h
src/interfaces/ecpg/compatlib/informix.c
src/interfaces/ecpg/ecpglib/connect.c
src/interfaces/ecpg/ecpglib/descriptor.c
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/ecpglib/extern.h
src/interfaces/ecpg/ecpglib/memory.c
src/interfaces/ecpg/ecpglib/misc.c
src/interfaces/ecpg/ecpglib/prepare.c
src/interfaces/ecpg/ecpglib/sqlda.c
src/interfaces/ecpg/include/ecpg_informix.h
src/interfaces/ecpg/include/ecpglib.h
src/interfaces/ecpg/include/ecpgtype.h
src/interfaces/ecpg/include/pgtypes_date.h
src/interfaces/ecpg/include/pgtypes_interval.h
src/interfaces/ecpg/include/pgtypes_numeric.h
src/interfaces/ecpg/include/pgtypes_timestamp.h
src/interfaces/ecpg/include/sqlca.h
src/interfaces/ecpg/pgtypeslib/dt.h
src/interfaces/ecpg/pgtypeslib/dt_common.c
src/interfaces/ecpg/pgtypeslib/interval.c
src/interfaces/ecpg/pgtypeslib/timestamp.c
src/interfaces/ecpg/preproc/extern.h
src/interfaces/ecpg/preproc/output.c
src/interfaces/ecpg/preproc/type.c
src/interfaces/ecpg/preproc/variable.c
src/interfaces/ecpg/test/expected/compat_informix-test_informix2.c
src/interfaces/ecpg/test/expected/preproc-init.c
src/interfaces/ecpg/test/expected/preproc-outofscope.c
src/interfaces/ecpg/test/expected/sql-array.c
src/interfaces/ecpg/test/expected/sql-code100.c
src/interfaces/ecpg/test/expected/sql-copystdout.c
src/interfaces/ecpg/test/expected/sql-define.c
src/interfaces/ecpg/test/expected/sql-dynalloc.c
src/interfaces/ecpg/test/expected/sql-dynalloc2.c
src/interfaces/ecpg/test/expected/sql-dyntest.c
src/interfaces/ecpg/test/expected/sql-indicators.c
src/interfaces/ecpg/test/expected/sql-sqlda.c
src/interfaces/ecpg/test/expected/thread-alloc.c
src/interfaces/ecpg/test/expected/thread-descriptor.c
src/interfaces/ecpg/test/expected/thread-prep.c
src/interfaces/ecpg/test/regression.h
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/fe-print.c
src/interfaces/libpq/fe-secure-openssl.c
src/interfaces/libpq/libpq-events.h
src/interfaces/libpq/libpq-fe.h
src/interfaces/libpq/win32.c
src/pl/plperl/plperl.c
src/pl/plpgsql/src/pl_comp.c
src/pl/plpgsql/src/pl_exec.c
src/pl/plpgsql/src/pl_funcs.c
src/pl/plpgsql/src/plpgsql.h
src/pl/plpython/plpy_exec.c
src/pl/tcl/pltcl.c
src/port/crypt.c
src/port/dirmod.c
src/port/getaddrinfo.c
src/port/getopt.c
src/port/getopt_long.c
src/port/getrusage.c
src/port/gettimeofday.c
src/port/inet_aton.c
src/port/mkdtemp.c
src/port/thread.c
src/port/win32error.c
src/port/win32setlocale.c
src/test/modules/worker_spi/worker_spi.c
src/test/regress/pg_regress.h
src/test/regress/regress.c
src/timezone/localtime.c
src/timezone/pgtz.h
src/timezone/strftime.c
src/timezone/zic.c
src/tools/ifaddrs/test_ifaddrs.c
src/tools/testint128.c
src/tutorial/complex.c
src/tutorial/funcs.c