Cleanup from Gennady Feldman <gfeldman@mail.com>

This commit is contained in:
Eric Andersen 2000-12-22 18:02:02 +00:00
parent a9819b2908
commit 2d5b64273f
3 changed files with 6 additions and 24 deletions

10
lash.c
View File

@ -807,14 +807,8 @@ static int get_command(FILE * source, char *command)
signal(SIGWINCH, SIG_DFL);
return 0;
#else
i=strlen(cwd);
i--;
if (i>1){
while ((i>0) && (*(cwd+i)!='/') ) i--;
if (*(cwd+i)=='/') i++;
}
fprintf(stdout, "[%s@%s %s]%s",user, buf, (cwd+i), prompt);
fprintf(stdout, "[%s@%s %s]%s",user, buf,
get_last_path_component(cwd), prompt);
fflush(stdout);
#endif
}

10
sh.c
View File

@ -807,14 +807,8 @@ static int get_command(FILE * source, char *command)
signal(SIGWINCH, SIG_DFL);
return 0;
#else
i=strlen(cwd);
i--;
if (i>1){
while ((i>0) && (*(cwd+i)!='/') ) i--;
if (*(cwd+i)=='/') i++;
}
fprintf(stdout, "[%s@%s %s]%s",user, buf, (cwd+i), prompt);
fprintf(stdout, "[%s@%s %s]%s",user, buf,
get_last_path_component(cwd), prompt);
fflush(stdout);
#endif
}

View File

@ -807,14 +807,8 @@ static int get_command(FILE * source, char *command)
signal(SIGWINCH, SIG_DFL);
return 0;
#else
i=strlen(cwd);
i--;
if (i>1){
while ((i>0) && (*(cwd+i)!='/') ) i--;
if (*(cwd+i)=='/') i++;
}
fprintf(stdout, "[%s@%s %s]%s",user, buf, (cwd+i), prompt);
fprintf(stdout, "[%s@%s %s]%s",user, buf,
get_last_path_component(cwd), prompt);
fflush(stdout);
#endif
}