From f23b96cebfe169eee7131efd8b879748587d1845 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 24 Aug 2006 03:06:55 +0000 Subject: tag busybox-1.2.1 --- shell/lash.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'shell/lash.c') diff --git a/shell/lash.c b/shell/lash.c index 92c24d1..be2f364 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -22,7 +22,18 @@ #include "busybox.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include +#include #include "cmdedit.h" #ifdef CONFIG_LOCALE_SUPPORT @@ -532,6 +543,16 @@ static void checkjobs(struct jobset *j_list) /* child stopped */ job->stopped_progs++; job->progs[prognum].is_stopped = 1; + +#if 0 + /* Printing this stuff is a pain, since it tends to + * overwrite the prompt an inconveinient moments. So + * don't do that. */ + if (job->stopped_progs == job->num_progs) { + printf(JOB_STATUS_FORMAT, job->jobid, "Stopped", + job->text); + } +#endif } } @@ -686,6 +707,26 @@ static int get_command(FILE * source, char *command) return 0; } +static char* itoa(register int i) +{ + static char a[7]; /* Max 7 ints */ + register char *b = a + sizeof(a) - 1; + int sign = (i < 0); + + if (sign) + i = -i; + *b = 0; + do + { + *--b = '0' + (i % 10); + i /= 10; + } + while (i); + if (sign) + *--b = '-'; + return b; +} + static char * strsep_space( char *string, int * ix) { char *token; -- cgit v1.1