diff --git a/Makefile b/Makefile index 2a685d3..bb7e6c5 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,9 @@ include Makefile.common.mk RELEASE_SQL = $(EXTENSION)--$(PGSPHERE_VERSION).sql USE_PGXS = 1 -USE_HEALPIX =? 1 +USE_HEALPIX ?= 1 +PGINDENT ?= pgindent +PGBSDINDENT ?= pg_bsd_indent # the base dir name may be changed depending on git clone command SRC_DIR = $(shell basename $(shell pwd)) @@ -223,3 +225,10 @@ endif dist : clean sparse.c sscan.c find . -name '*~' -type f -exec rm {} \; cd .. && tar --transform s/$(SRC_DIR)/pgsphere-$(PGSPHERE_VERSION)/ --exclude CVS --exclude .git -czf pgsphere-$(PGSPHERE_VERSION).tar.gz $(SRC_DIR) && cd - + +pgindent: + $(PGINDENT) \ + --typedefs=pgindent-typedefs.list \ + --excludes=pgindent-excludes.list \ + --indent=${PGBSDINDENT} \ + src diff --git a/pgindent-excludes.list b/pgindent-excludes.list new file mode 100644 index 0000000..c3add5c --- /dev/null +++ b/pgindent-excludes.list @@ -0,0 +1 @@ +pgs_process_moc.h diff --git a/pgindent-typedefs.list b/pgindent-typedefs.list new file mode 100644 index 0000000..7f2c8fe --- /dev/null +++ b/pgindent-typedefs.list @@ -0,0 +1,236 @@ +align_val_t +allocator_type +__alloc_rebind +ArrayType +AttrDefault +AttrNumber +_Base_ptr +BlockNumber +Box3D +BpChar +bpoint +BrinDesc +BrinOpcInfo +brin_serialize_callback_type +BrinValues +__builtin_va_list +_Char_alloc_type +char_type +CommonEntry +__compar_fn_t +ConsiderSplitContext +_Const_Base_ptr +__const_iterator +const_iterator +_Const_Link_type +const_pointer +ConstrCheck +const_reference +const_reverse_iterator +const_void_pointer +coord_t +CPoint +Datum +difference_type +_DistanceType +div_t +DomainConstraintCache +double_t +__dso_handle +__enable_if_t +false> +false_type +__FILE +FILE +first_type +flex_int16_t +flex_uint8_t +float4 +float8 +float_t +FmgrInfo +fmNodePtr +FormData_pg_attribute +__fpos_t +fpos_t +FunctionCallInfo +GISTENTRY +GistEntryVector +GISTPageOpaque +GISTPageOpaqueData +GIST_SPLITVEC +GiSTSPointKey +__gnuc_va_list +Healpix_Base2 +hpint64 +insert_return_type +int16 +__int16_t +int16_t +int32 +__int32_t +int32_t +int64 +__int64_t +int64_t +int8 +__int8_t +int8_t +int_fast16_t +int_fast32_t +int_fast64_t +int_fast8_t +__int_least16_t +int_least16_t +__int_least32_t +int_least32_t +__int_least64_t +int_least64_t +__int_least8_t +int_least8_t +__intmax_t +intmax_t +intptr_t +int_type +_IO_lock_t +iostate +ItemIdData +iterator +iterator_category +iterator_type +key_compare +key_type +layout_vec +ldiv_t +_Link_type +lldiv_t +LocationIndex +__make_not_void +map_const_iter +map_iterator +mapped_type +map_rev_iter +max_align_t +__mbstate_t +mbstate_t +MemoryContext +moc_interval +moc_map +moc_map_entry +moc_out_data +moc_tree_entry +NameData +_Node_allocator +NodeTag +node_type +NullableDatum +nullptr_t +__off64_t +OffsetNumber +__off_t +Oid +ostream +__ostream_type +other +output_map +Page +PageGistNSN +PageHeader +PageHeaderData +PageXLogRecPtr +Pg_finfo_record +PGFunction +Pg_magic_struct +pgs_error_handler +phasevec +Point +Point3D +__pointer +pointer +Pointer +ptrdiff_t +__ptr_rebind +rebind +rebind_alloc +reference +Relation +_Rep_type +reverse_iterator +rintv_iter +rnode_iter +rtype +SBOX +SCIRCLE +second_type +_Self +SELLIPSE +SEuler +Size +size_t +size_type +SLine +Smoc +SPATH +SplitInterval +SPoint +SPOLY +StrategyNumber +streamsize +string +__sv_type +t_ang +tdiff +text +_Tp_alloc_type +TransactionId +true_type +tsize +TupleConstr +TupleDesc +__type +type +TypeCacheEntry +uchar +uint16 +__uint16_t +uint16_t +uint32 +__uint32_t +uint32_t +uint64 +__uint64_t +uint64_t +uint8 +__uint8_t +uint8_t +uint_fast16_t +uint_fast32_t +uint_fast64_t +uint_fast8_t +__uint_least16_t +uint_least16_t +__uint_least32_t +uint_least32_t +__uint_least64_t +uint_least64_t +__uint_least8_t +uint_least8_t +__uintmax_t +uintmax_t +uintptr_t +va_list +value_type +varattrib_4b +vec3 +Vector3D +wctrans_t +wctype_t +wint_t +YY_BUFFER_STATE +YY_CHAR +yy_size_t +yy_state_type +YYSTYPE +yytype_int16 +yytype_int8 +yytype_uint8