gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (08/09/85)
SYMPTOM: A trailing : in $PATH or $CDPATH is not interpreted as meaning that a null entry (current working directory) follows the : FIX: The following is for the UNIX System V Release 2.0 Bourne shell, including the BRL job-control version. Earlier Bourne shells are fixed in a similar way, modulo the translation into pseudo-Algol 68. In file "service.c", function catpath(), change: if (*scanp == COLON) scanp++; path = (*scanp ? scanp : 0); to: path = *scanp ? scanp + 1 : 0; /* DAG -- bug fix */ In the same file, function nextpath(), change: if (*scanp == COLON) scanp++; return(*scanp ? scanp : 0); to: return *scanp ? scanp + 1 : 0; /* DAG -- bug fix */ NOTE: The resulting executable is also 12 bytes smaller (VAX version).