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. --- include/libbb.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 0a52b6421..2f9041273 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -25,10 +26,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include @@ -178,6 +181,10 @@ extern void bb_xdaemon(int nochdir, int noclose); extern void bb_xbind(int sockfd, struct sockaddr *my_addr, socklen_t addrlen); extern void bb_xlisten(int s, int backlog); extern void bb_xchdir(const char *path); +extern void utoa_to_buf(unsigned n, char *buf, unsigned buflen); +extern char *utoa(unsigned n); +extern void itoa_to_buf(int n, char *buf, unsigned buflen); +extern char *itoa(int n); #define BB_GETOPT_ERROR 0x80000000UL extern const char *bb_opt_complementally; @@ -331,7 +338,9 @@ char *dirname (char *path); int bb_make_directory (char *path, long mode, int flags); -const char *u_signal_names(const char *str_sig, int *signo, int startnum); +int get_signum(char *name); +char *get_signame(int number); + char *bb_simplify_path(const char *path); enum { /* DO NOT CHANGE THESE VALUES! cp.c depends on them. */ -- cgit v1.2.3