aboutsummaryrefslogtreecommitdiff
path: root/shell/lash.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-07-12 19:17:55 +0000
committerRob Landley <rob@landley.net>2006-07-12 19:17:55 +0000
commitc9c1a41c581101f53cc36efae53cd8ebb568962f (patch)
tree0aa4024f33e22567444f78d83d7d4b7986abe795 /shell/lash.c
parent801ab140132a111e9524371c9b8d425579692389 (diff)
downloadbusybox-w32-c9c1a41c581101f53cc36efae53cd8ebb568962f.tar.gz
busybox-w32-c9c1a41c581101f53cc36efae53cd8ebb568962f.tar.bz2
busybox-w32-c9c1a41c581101f53cc36efae53cd8ebb568962f.zip
A couple things that got tangled up in my tree, easier to check in both than
untangle them: Rewrite u_signal_names() into get_signum() and get_signame(), plus trim the signal list to that required by posix (they can specify the numbers for the rest if they really need them). (This is preparatory cleanup for adding a timeout applet like Roberto Foglietta wants.) Export the itoa (added due to Denis Vlasenko, although it's not quite his preferred implementation) from xfuncs.c so it's actually used, and remove several other redundant implementations of itoa and utoa() in the tree.
Diffstat (limited to 'shell/lash.c')
-rw-r--r--shell/lash.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/shell/lash.c b/shell/lash.c
index c5aaf1d1f..92c24d1c2 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -22,18 +22,7 @@
22 22
23 23
24#include "busybox.h" 24#include "busybox.h"
25#include <stdio.h>
26#include <stdlib.h>
27#include <ctype.h>
28#include <errno.h>
29#include <fcntl.h>
30#include <signal.h>
31#include <string.h>
32#include <sys/ioctl.h>
33#include <sys/wait.h>
34#include <unistd.h>
35#include <getopt.h> 25#include <getopt.h>
36#include <termios.h>
37#include "cmdedit.h" 26#include "cmdedit.h"
38 27
39#ifdef CONFIG_LOCALE_SUPPORT 28#ifdef CONFIG_LOCALE_SUPPORT
@@ -697,26 +686,6 @@ static int get_command(FILE * source, char *command)
697 return 0; 686 return 0;
698} 687}
699 688
700static char* itoa(int i)
701{
702 static char a[7]; /* Max 7 ints */
703 char *b = a + sizeof(a) - 1;
704 int sign = (i < 0);
705
706 if (sign)
707 i = -i;
708 *b = 0;
709 do
710 {
711 *--b = '0' + (i % 10);
712 i /= 10;
713 }
714 while (i);
715 if (sign)
716 *--b = '-';
717 return b;
718}
719
720static char * strsep_space( char *string, int * ix) 689static char * strsep_space( char *string, int * ix)
721{ 690{
722 char *token; 691 char *token;