X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Freadconfig.c;h=1ddd648f9feeef1563452102578e9e9fd89774e6;hb=e69044f7624abe5cb2cb796d528c0cc5f29515f7;hp=4cf05f1b2db56faa222446601007f0b93f766fb8;hpb=0808f3e85977428948be17783e31c14c4f4b8622;p=mmh diff --git a/sbr/readconfig.c b/sbr/readconfig.c index 4cf05f1..1ddd648 100644 --- a/sbr/readconfig.c +++ b/sbr/readconfig.c @@ -106,6 +106,23 @@ readconfig (struct node **npp, FILE *ib, char *file, int ctx) break; } + /* + * Special handling for the pager processes: lproc and moreproc. + * + * If they are not set by the profile, use the callers $PAGER if + * available, otherwise set them to DEFAULT_PAGER. + */ + if (lproc == NULL) { + lproc = getenv("PAGER"); + if (lproc == NULL || lproc[0] == '\0') + lproc = DEFAULT_PAGER; + } + if (moreproc == NULL) { + moreproc = getenv("PAGER"); + if (moreproc == NULL || moreproc[0] == '\0') + moreproc = DEFAULT_PAGER; + } + if (opp == NULL) { /* Check for duplicated non-null profile entries. Except allow multiple profile entries named "#", because that's