Subversion Repositories SvarDOS

Compare Revisions

Ignore whitespace Rev 437 → Rev 438

/svarcom/trunk/command.c
104,11 → 104,7
 
static void buildprompt(char *s, unsigned short envseg) {
/* locate the prompt variable or use the default pattern */
const char far *fmt = env_lookup(envseg, "PROMPT");
while ((fmt != NULL) && (*fmt != 0)) {
fmt++;
if (fmt[-1] == '=') break;
}
const char far *fmt = env_lookup_val(envseg, "PROMPT");
if ((fmt == NULL) || (*fmt == 0)) fmt = "$p$g"; /* fallback to default if empty */
/* build the prompt string based on pattern */
for (; *fmt != 0; fmt++) {