summaryrefslogtreecommitdiff
path: root/args.c
AgeCommit message (Collapse)Author
2020-05-16Bump version to 2.1.1.REL_2_1_1Tom Lane
2019-05-19Rip out -kr/-nkr switches again.Tom Lane
The upstream maintainer doesn't want these, so drop 'em. Also, teach is_func_definition() about //-style comments. The main lexi.c code doesn't know about those either, but I assume somebody will wish to fix that at some point.
2019-05-19Bump version to 2.1.Tom Lane
2019-05-18Improve indent's ability to distinguish function defs from decls.Tom Lane
The previous coding for deciding whether "foo(" begins a function definition or just a declaration was quite stupid: it could be fooled by nested parentheses in the parameter list, or comments in or after the parameter list, or whitespace just after the parameter list. And it didn't work if the parameter list crossed a line boundary, either. We can upgrade all those cases without any objectionable side effects, I believe. However, there's one more case that's problematic: if there's non-punctuation stuff after the parenthesized arguments, it's difficult to tell whether that stuff is K&R-style parameter declarations or function attributes. I don't care to try to make the lookahead code smart enough to tell the difference, so instead let's invent a switch to tell what to do. The '-kr' mode is backward-compatible, hence the default. The '-nkr' mode will do the right thing with function attributes and the wrong thing with pre-ANSI function declarations; but for a code base with none of the latter, that hardly matters.
2017-06-20Add feature patch for -tpg/-ntpg.Tom Lane
This switch enables using Postgres' rules for using tabs vs spaces in indents, to match the output of our old "entab" program. The FreeBSD maintainer wants no part of this, so we'll have to carry this as a forked patch. (The alternative is to go over to use-tabs- whenever-possible rules, but that would result in circa 10K lines of invisible whitespace diffs in the PG sources, which seems like lots more pain than is justified.)
2017-06-20Adjust #include's to build in Postgres rather than FreeBSD environment.Tom Lane
Remove '#include <sys/cdefs.h>', which will fail in many non-BSD environments, as well as the __FBSDID() FreeBSD-ism. Replace them with '#include "c.h"', which will allow use of the Postgres project's portability infrastructure. This is intended to be a permanent diff between the FreeBSD upstream files and our copy.
2017-06-20Import current development version of FreeBSD indent.Tom Lane
This commit copies Piotr Stefaniak's development repo https://github.com/pstef/freebsd_indent as of commit 5d3b621cd54de672983c51d9622dee84d458dd83 (2017-06-18). But I've omitted Makefile and Makefile.depend, as they are of no use in non-BSD build environments.