version 1.5.4.2, 2002/04/26 02:21:42 |
version 1.6, 2002/01/03 03:49:16 |
|
|
|
|
if (subst) { |
if (subst) { |
new_prompt = (char *) emalloc(len + 1); |
new_prompt = (char *) emalloc(len + 1); |
for (p = old_prompt, np = new_prompt, lastchar = '\0'; *p; p++) { |
for (p = old_prompt, np = new_prompt; *p; p++) { |
if (lastchar == '%' && (*p == 'h' || *p == 'u' || *p == '%')) { |
if (lastchar == '%' && (*p == 'h' || *p == 'u' || *p == '%')) { |
/* substitute user/host name */ |
/* substiture user/host name */ |
if (*p == 'h') { |
if (*p == 'h') { |
np--; |
np--; |
strcpy(np, user_shost); |
strcpy(np, user_shost); |