Re: [PATCH] pager: use an environment variable for pager_in_use
- From
- Matthias Lederhofer <matled@gmx.net>
- Date
- Feb 16, 2007, 18:56 UTC
- Message-ID
- <20070216185653.GA10308@moooo.ath.cx>
- In-Reply-To
- <Pine.LNX.4.63.0702161934230.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> +int pager_in_use = getenv("GIT_PAGER_IN_USE");test.c:3: error: initializer element is not constant
So you could only add this at another place where pager_in_use is not yet used (e.g. start of main or some other initialization method). I did not want to put it at the beginning of main or another function. After adding GIT_PAGER_IN_USE I thought it would make sense to remove pager_in_use because there were only two parts of code using pager_in_use:
> pager_in_use = 1; > setenv(..);
and
> pager_in_use || getenv(..)