aboutsummaryrefslogtreecommitdiff
path: root/shell/msh.c
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-07-12 19:17:55 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-07-12 19:17:55 +0000
commit4c90819a28a6ff368dc8ec867714cf856e6b58f3 (patch)
tree0aa4024f33e22567444f78d83d7d4b7986abe795 /shell/msh.c
parentf09cc3b1b53e74ebe0f5733f73d55846d25194ec (diff)
downloadbusybox-w32-4c90819a28a6ff368dc8ec867714cf856e6b58f3.tar.gz
busybox-w32-4c90819a28a6ff368dc8ec867714cf856e6b58f3.tar.bz2
busybox-w32-4c90819a28a6ff368dc8ec867714cf856e6b58f3.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. git-svn-id: svn://busybox.net/trunk/busybox@15687 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell/msh.c')
-rw-r--r--shell/msh.c41
1 files changed, 1 insertions, 40 deletions
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 @@
10 * Robert Schwebel <r.schwebel@pengutronix.de> 10 * Robert Schwebel <r.schwebel@pengutronix.de>
11 * Erik Andersen <andersen@codepoet.org> 11 * Erik Andersen <andersen@codepoet.org>
12 * 12 *
13 * This program is free software; you can redistribute it and/or modify 13 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 *
27 * Original copyright notice is retained at the end of this file.
28 */ 14 */
29 15
30#include "busybox.h" 16#include "busybox.h"
31#include <ctype.h>
32#include <dirent.h>
33#include <errno.h>
34#include <fcntl.h>
35#include <limits.h>
36#include <setjmp.h> 17#include <setjmp.h>
37#include <signal.h>
38#include <stddef.h>
39#include <stdio.h>
40#include <stdlib.h>
41#include <string.h>
42#include <time.h>
43#include <unistd.h>
44#include <sys/stat.h>
45#include <sys/times.h> 18#include <sys/times.h>
46#include <sys/types.h>
47#include <sys/wait.h>
48 19
49#include "cmdedit.h" 20#include "cmdedit.h"
50 21
@@ -293,7 +264,6 @@ static char *space(int n);
293static char *strsave(char *s, int a); 264static char *strsave(char *s, int a);
294static char *evalstr(char *cp, int f); 265static char *evalstr(char *cp, int f);
295static char *putn(int n); 266static char *putn(int n);
296static char *itoa(int n);
297static char *unquote(char *as); 267static char *unquote(char *as);
298static struct var *lookup(char *n); 268static struct var *lookup(char *n);
299static int rlookup(char *n); 269static int rlookup(char *n);
@@ -1252,15 +1222,6 @@ static char *putn(int n)
1252 return (itoa(n)); 1222 return (itoa(n));
1253} 1223}
1254 1224
1255static char *itoa(int n)
1256{
1257 static char s[20];
1258
1259 snprintf(s, sizeof(s), "%u", n);
1260 return (s);
1261}
1262
1263
1264static void next(int f) 1225static void next(int f)
1265{ 1226{
1266 PUSHIO(afile, f, filechar); 1227 PUSHIO(afile, f, filechar);