HomeFreeBSD

indent(1): Optimize parser stack usage.

Description

indent(1): Optimize parser stack usage.

When special else-if processing is enabled (-ei), we can assume "else if"
and "if" to be equivalent for indentation purposes.
This reduction saves a lot of stack space in case of a long "if-else-if
... else-if" sequence; with this change,
Postgres/src/bin/psql/tab-complete.c as of 9.6beta3
requires minimum of the stack length to be 31 instead of 444.

Submitted by: Piotr Sephaniak

Details

Provenance
pfgAuthored on
Parents
rS309414: Revert r309372
Branches
Unknown
Tags
Unknown