aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-12-22 18:02:02 +0000
committerEric Andersen <andersen@codepoet.org>2000-12-22 18:02:02 +0000
commit2d5b64273fb10938f963ea845bf558b55c3884fa (patch)
tree7a470ffead9aec7702b319d30fb86dd44c988cd6
parenta9819b290848e0a760f3805d5937fa050235d707 (diff)
downloadbusybox-w32-2d5b64273fb10938f963ea845bf558b55c3884fa.tar.gz
busybox-w32-2d5b64273fb10938f963ea845bf558b55c3884fa.tar.bz2
busybox-w32-2d5b64273fb10938f963ea845bf558b55c3884fa.zip
Cleanup from Gennady Feldman <gfeldman@mail.com>
-rw-r--r--lash.c10
-rw-r--r--sh.c10
-rw-r--r--shell/lash.c10
3 files changed, 6 insertions, 24 deletions
diff --git a/lash.c b/lash.c
index a47ff5ca2..14571169b 100644
--- a/lash.c
+++ b/lash.c
@@ -807,14 +807,8 @@ static int get_command(FILE * source, char *command)
807 signal(SIGWINCH, SIG_DFL); 807 signal(SIGWINCH, SIG_DFL);
808 return 0; 808 return 0;
809#else 809#else
810 i=strlen(cwd); 810 fprintf(stdout, "[%s@%s %s]%s",user, buf,
811 i--; 811 get_last_path_component(cwd), prompt);
812 if (i>1){
813 while ((i>0) && (*(cwd+i)!='/') ) i--;
814 if (*(cwd+i)=='/') i++;
815 }
816
817 fprintf(stdout, "[%s@%s %s]%s",user, buf, (cwd+i), prompt);
818 fflush(stdout); 812 fflush(stdout);
819#endif 813#endif
820 } 814 }
diff --git a/sh.c b/sh.c
index a47ff5ca2..14571169b 100644
--- a/sh.c
+++ b/sh.c
@@ -807,14 +807,8 @@ static int get_command(FILE * source, char *command)
807 signal(SIGWINCH, SIG_DFL); 807 signal(SIGWINCH, SIG_DFL);
808 return 0; 808 return 0;
809#else 809#else
810 i=strlen(cwd); 810 fprintf(stdout, "[%s@%s %s]%s",user, buf,
811 i--; 811 get_last_path_component(cwd), prompt);
812 if (i>1){
813 while ((i>0) && (*(cwd+i)!='/') ) i--;
814 if (*(cwd+i)=='/') i++;
815 }
816
817 fprintf(stdout, "[%s@%s %s]%s",user, buf, (cwd+i), prompt);
818 fflush(stdout); 812 fflush(stdout);
819#endif 813#endif
820 } 814 }
diff --git a/shell/lash.c b/shell/lash.c
index a47ff5ca2..14571169b 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -807,14 +807,8 @@ static int get_command(FILE * source, char *command)
807 signal(SIGWINCH, SIG_DFL); 807 signal(SIGWINCH, SIG_DFL);
808 return 0; 808 return 0;
809#else 809#else
810 i=strlen(cwd); 810 fprintf(stdout, "[%s@%s %s]%s",user, buf,
811 i--; 811 get_last_path_component(cwd), prompt);
812 if (i>1){
813 while ((i>0) && (*(cwd+i)!='/') ) i--;
814 if (*(cwd+i)=='/') i++;
815 }
816
817 fprintf(stdout, "[%s@%s %s]%s",user, buf, (cwd+i), prompt);
818 fflush(stdout); 812 fflush(stdout);
819#endif 813#endif
820 } 814 }