diff options
author | Rob Landley | 2006-07-12 19:17:55 +0000 |
---|---|---|
committer | Rob Landley | 2006-07-12 19:17:55 +0000 |
commit | c9c1a41c581101f53cc36efae53cd8ebb568962f (patch) | |
tree | 0aa4024f33e22567444f78d83d7d4b7986abe795 /shell/msh.c | |
parent | 801ab140132a111e9524371c9b8d425579692389 (diff) | |
download | busybox-c9c1a41c581101f53cc36efae53cd8ebb568962f.zip busybox-c9c1a41c581101f53cc36efae53cd8ebb568962f.tar.gz |
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/msh.c')
-rw-r--r-- | shell/msh.c | 41 |
1 files changed, 1 insertions, 40 deletions
diff --git a/shell/msh.c b/shell/msh.c index 6330701..b491a08 100644 --- a/shell/msh.c +++ b/shell/msh.c @@ -10,41 +10,12 @@ * Robert Schwebel <r.schwebel@pengutronix.de> * Erik Andersen <andersen@codepoet.org> * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * Original copyright notice is retained at the end of this file. + * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. */ #include "busybox.h" -#include <ctype.h> -#include <dirent.h> -#include <errno.h> -#include <fcntl.h> -#include <limits.h> #include <setjmp.h> -#include <signal.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> -#include <unistd.h> -#include <sys/stat.h> #include <sys/times.h> -#include <sys/types.h> -#include <sys/wait.h> #include "cmdedit.h" @@ -293,7 +264,6 @@ static char *space(int n); static char *strsave(char *s, int a); static char *evalstr(char *cp, int f); static char *putn(int n); -static char *itoa(int n); static char *unquote(char *as); static struct var *lookup(char *n); static int rlookup(char *n); @@ -1252,15 +1222,6 @@ static char *putn(int n) return (itoa(n)); } -static char *itoa(int n) -{ - static char s[20]; - - snprintf(s, sizeof(s), "%u", n); - return (s); -} - - static void next(int f) { PUSHIO(afile, f, filechar); |