From c9c1a41c581101f53cc36efae53cd8ebb568962f Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 12 Jul 2006 19:17:55 +0000 Subject: 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. --- shell/msh.c | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) (limited to 'shell/msh.c') diff --git a/shell/msh.c b/shell/msh.c index 633070112..b491a08a4 100644 --- a/shell/msh.c +++ b/shell/msh.c @@ -10,41 +10,12 @@ * Robert Schwebel * Erik Andersen * - * 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 -#include -#include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include #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); -- cgit v1.2.3