diff -urN /home/ldoolitt/cvs/busybox/Config.h busybox-trial/Config.h
--- /home/ldoolitt/cvs/busybox/Config.h	Tue Mar 20 12:08:10 2001
+++ busybox-trial/Config.h	Thu Mar 22 09:55:25 2001
@@ -6,129 +6,6 @@
 //   i.e.  //#define BB_BLAH
 //
 //
-// BusyBox Applications
-//#define BB_ADJTIMEX
-//#define BB_AR
-#define BB_BASENAME
-#define BB_CAT
-#define BB_CHMOD_CHOWN_CHGRP
-#define BB_CHROOT
-#define BB_CHVT
-#define BB_CLEAR
-//#define BB_CMP
-#define BB_CP_MV
-#define BB_CUT
-#define BB_DATE
-//#define BB_DC
-#define BB_DD
-//#define BB_DEALLOCVT
-#define BB_DF
-#define BB_DIRNAME
-#define BB_DMESG
-//#define BB_DOS2UNIX
-//#define BB_DPKG
-//#define BB_DPKG_DEB
-//#define BB_DUTMP
-#define BB_DU
-//#define BB_DUMPKMAP
-#define BB_ECHO
-//#define BB_EXPR
-//#define BB_FBSET
-//#define BB_FDFLUSH
-#define BB_FIND
-#define BB_FREE
-//#define BB_FREERAMDISK
-//#define BB_FSCK_MINIX
-//#define BB_GETOPT
-#define BB_GREP
-#define BB_GUNZIP
-#define BB_GZIP
-#define BB_HALT
-#define BB_HEAD
-//#define BB_HOSTID
-//#define BB_HOSTNAME
-#define BB_ID
-//#define BB_IFCONFIG
-#define BB_INIT
-//#define BB_INSMOD
-#define BB_KILL
-#define BB_KILLALL
-#define BB_KLOGD
-//#define BB_LENGTH
-#define BB_LN
-//#define BB_LOADACM
-//#define BB_LOADFONT
-//#define BB_LOADKMAP
-#define BB_LOGGER
-//#define BB_LOGNAME
-#define BB_LS
-#define BB_LSMOD
-//#define BB_MAKEDEVS
-//#define BB_MD5SUM
-#define BB_MKDIR
-//#define BB_MKFIFO
-//#define BB_MKFS_MINIX
-#define BB_MKNOD
-#define BB_MKSWAP
-//#define BB_MKTEMP
-//#define BB_NC
-#define BB_MORE
-#define BB_MOUNT
-//#define BB_MT
-//#define BB_NSLOOKUP
-//#define BB_PING
-//#define BB_PIVOT_ROOT
-#define BB_POWEROFF
-//#define BB_PRINTF
-#define BB_PS
-#define BB_PWD
-//#define BB_RDATE
-//#define BB_READLINK
-#define BB_REBOOT
-//#define BB_RENICE
-#define BB_RESET
-#define BB_RM
-#define BB_RMDIR
-//#define BB_RMMOD
-//#define BB_ROUTE
-//#define BB_RPMUNPACK
-#define BB_SED
-//#define BB_SETKEYCODES
-#define BB_SH
-#define BB_SLEEP
-#define BB_SORT
-//#define BB_STTY
-#define BB_SWAPONOFF
-#define BB_SYNC
-#define BB_SYSLOGD
-#define BB_TAIL
-#define BB_TAR
-//#define BB_TEE
-//#define BB_TEST
-//#define BB_TELNET
-//#define BB_TFTP
-#define BB_TOUCH
-//#define BB_TR
-#define BB_TRUE_FALSE
-#define BB_TTY
-//#define BB_UUENCODE
-//#define BB_UUDECODE
-#define BB_UMOUNT
-#define BB_UNIQ
-#define BB_UNAME
-//#define BB_UPDATE
-#define BB_UPTIME
-//#define BB_USLEEP
-//#define BB_WATCHDOG
-#define BB_WC
-//#define BB_WGET
-#define BB_WHICH
-#define BB_WHOAMI
-#define BB_XARGS
-#define BB_YES
-// End of Applications List
-//
-//
 //
 // ---------------------------------------------------------
 // This is where feature definitions go.  Generally speaking,
@@ -345,101 +222,32 @@
 // Nothing beyond this point should ever be touched by 
 // mere mortals so leave this stuff alone.
 //
-#if defined BB_MOUNT || defined BB_UMOUNT || defined BB_DF
-	#ifdef BB_FEATURE_MOUNT_MTAB_SUPPORT
-		#define BB_MTAB
-	#endif
-#else
-	#undef BB_MTAB
-#endif	
-//
-#if defined BB_SH
-	#if defined BB_FEATURE_COMMAND_EDITING 
-		#define BB_CMDEDIT
-	#else
-		#undef BB_FEATURE_COMMAND_EDITING
-		#undef BB_FEATURE_COMMAND_TAB_COMPLETION
-		#undef BB_FEATURE_COMMAND_USERNAME_COMPLETION
-		#define BB_FEATURE_SH_SIMPLE_PROMPT
-	#endif
+#if defined BB_FEATURE_COMMAND_EDITING 
+	#define BB_CMDEDIT
 #else
-	#undef BB_FEATURE_SH_APPLETS_ALWAYS_WIN
-	#undef BB_FEATURE_SH_STANDALONE_SHELL
-	#undef BB_FEATURE_SH_SIMPLE_PROMPT
-#endif
-//
-#ifdef BB_KILLALL
-	#ifndef BB_KILL
-		#define BB_KILL
-	#endif
+	#undef BB_FEATURE_COMMAND_EDITING
+	#undef BB_FEATURE_COMMAND_TAB_COMPLETION
+	#undef BB_FEATURE_COMMAND_USERNAME_COMPLETION
+	#define BB_FEATURE_SH_SIMPLE_PROMPT
 #endif
-//
+// XXX mixed--fixme
 #ifndef BB_INIT
 	#undef BB_FEATURE_LINUXRC
 #endif
-//
-#ifdef BB_GZIP
-	#ifndef BB_GUNZIP
-		#define BB_GUNZIP
-	#endif
-#endif
-//
-#ifdef BB_DPKG
-	#ifndef BB_DPKG_DEB
-		#define BB_DPKG_DEB
-	#endif
-#endif
-//
+// XXX mixed--fixme
 #ifdef BB_DPKG_DEB
-	#ifndef BB_AR
-		#define BB_AR
-	#endif
-	#ifndef BB_TAR
-		#define BB_TAR
-	#endif 
 	#ifndef BB_FEATURE_TAR_GZIP
 		#define BB_FEATURE_TAR_GZIP
 	#endif
 #endif
 //
-#ifdef BB_TAR
-	#ifdef BB_FEATURE_TAR_GZIP
-		#ifndef BB_GUNZIP
-			#define BB_GUNZIP
-		#endif
-	#endif
-#endif
-//
-#if defined BB_MOUNT && defined BB_FEATURE_NFSMOUNT
-	#define BB_NFSMOUNT
-#endif
-//
-#if defined BB_IFCONFIG
-	#ifdef BB_FEATURE_IFCONFIG_STATUS
-		#define BB_INTERFACE
-	#endif
-#else
-	#undef BB_INTERFACE
-#endif	
-//
 #if defined BB_FEATURE_AUTOWIDTH
 	#ifndef BB_FEATURE_USE_TERMIOS
 		#define BB_FEATURE_USE_TERMIOS
 	#endif
 #endif
 //
-#if defined BB_INSMOD || defined BB_LSMOD
-	#if ! defined BB_FEATURE_NEW_MODULE_INTERFACE && ! defined BB_FEATURE_OLD_MODULE_INTERFACE
-		#define BB_FEATURE_NEW_MODULE_INTERFACE
-	#endif
+#if ! defined BB_FEATURE_NEW_MODULE_INTERFACE && ! defined BB_FEATURE_OLD_MODULE_INTERFACE
+	#define BB_FEATURE_NEW_MODULE_INTERFACE
 #endif
 //
-#ifdef BB_SYSLOGD
-	#if defined BB_FEATURE_IPC_SYSLOG
-		#define BB_LOGREAD
-	#endif
-#endif
-//
-#if defined BB_DOS2UNIX 
-	#define BB_UNIX2DOS
-#endif
diff -urN /home/ldoolitt/cvs/busybox/Makefile busybox-trial/Makefile
--- /home/ldoolitt/cvs/busybox/Makefile	Wed Mar 21 09:42:00 2001
+++ busybox-trial/Makefile	Thu Mar 22 10:36:53 2001
@@ -196,7 +196,7 @@
 # This is option 3:
 #
 #APPLET_SOURCES = $(shell \
-#   echo -e 'all: busybox.sh Config.h\n\t@ $$(SHELL) $$^ $$(BB_SRC_DIR)' >slist.mk; \
+#   echo -e 'all: busybox.sh applet_select.h\n\t@ $$(SHELL) $$^ $$(BB_SRC_DIR)' >slist.mk; \
 #   make -f slist.mk VPATH=$(VPATH) BB_SRC_DIR=$(BB_SRC_DIR) \
 #)
 # And option 4:
@@ -248,7 +248,7 @@
 
 all: applet_source_list busybox busybox.links doc
 
-applet_source_list: busybox.sh Config.h
+applet_source_list: busybox.sh Config.h applet_select.h
 	(echo -n "APPLET_SOURCES := "; $(SHELL) $^ $(BB_SRC_DIR)) > $@
 
 doc: olddoc
@@ -314,10 +314,11 @@
 # Without VPATH, rule expands to "/bin/sh busybox.mkll Config.h applets.h"
 # but with VPATH, some or all of those file names are resolved to the
 # directories in which they live.
-busybox.links: busybox.mkll Config.h applets.h
+busybox.links: busybox.mkll applet_select.h applets.h
 	- $(SHELL) $^ >$@
 
 nfsmount.o cmdedit.o: %.o: %.h
+applets.o usage.o: applet_select.h
 sh.o: cmdedit.h
 $(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile
 	$(CC) -I- $(CFLAGS) -I. $(patsubst %,-I%,$(subst :, ,$(BB_SRC_DIR))) -c $< -o $*.o
diff -urN /home/ldoolitt/cvs/busybox/applet_select.h busybox-trial/applet_select.h
--- /home/ldoolitt/cvs/busybox/applet_select.h	Wed Dec 31 16:00:00 1969
+++ busybox-trial/applet_select.h	Thu Mar 22 10:37:29 2001
@@ -0,0 +1,209 @@
+/* vi: set sw=4 ts=4: */
+// This file defines the feature set to be compiled into busybox.
+// When you turn things off here, they won't be compiled in at all.
+//
+//// This file is parsed by sed. You MUST use single line comments.
+//   i.e.  //#define BB_BLAH
+//
+//
+// BusyBox Applications
+#define BB_ADJTIMEX
+//#define BB_AR
+#define BB_BASENAME
+#define BB_CAT
+#define BB_CHMOD_CHOWN_CHGRP
+#define BB_CHROOT
+#define BB_CHVT
+#define BB_CLEAR
+//#define BB_CMP
+#define BB_CP_MV
+#define BB_CUT
+#define BB_DATE
+//#define BB_DC
+#define BB_DD
+//#define BB_DEALLOCVT
+#define BB_DF
+#define BB_DIRNAME
+#define BB_DMESG
+//#define BB_DOS2UNIX
+//#define BB_DPKG
+//#define BB_DPKG_DEB
+//#define BB_DUTMP
+#define BB_DU
+//#define BB_DUMPKMAP
+#define BB_ECHO
+//#define BB_EXPR
+//#define BB_FBSET
+//#define BB_FDFLUSH
+#define BB_FIND
+#define BB_FREE
+//#define BB_FREERAMDISK
+//#define BB_FSCK_MINIX
+//#define BB_GETOPT
+#define BB_GREP
+#define BB_GUNZIP
+#define BB_GZIP
+#define BB_HALT
+#define BB_HEAD
+//#define BB_HOSTID
+//#define BB_HOSTNAME
+#define BB_ID
+//#define BB_IFCONFIG
+#define BB_INIT
+//#define BB_INSMOD
+#define BB_KILL
+#define BB_KILLALL
+#define BB_KLOGD
+//#define BB_LENGTH
+#define BB_LN
+//#define BB_LOADACM
+//#define BB_LOADFONT
+//#define BB_LOADKMAP
+//#define BB_LOGGER
+//#define BB_LOGNAME
+#define BB_LS
+#define BB_LSMOD
+//#define BB_MAKEDEVS
+//#define BB_MD5SUM
+#define BB_MKDIR
+//#define BB_MKFIFO
+//#define BB_MKFS_MINIX
+#define BB_MKNOD
+#define BB_MKSWAP
+//#define BB_MKTEMP
+//#define BB_NC
+#define BB_MORE
+#define BB_MOUNT
+//#define BB_MT
+//#define BB_NSLOOKUP
+//#define BB_PING
+//#define BB_PIVOT_ROOT
+#define BB_POWEROFF
+//#define BB_PRINTF
+#define BB_PS
+#define BB_PWD
+//#define BB_RDATE
+//#define BB_READLINK
+#define BB_REBOOT
+//#define BB_RENICE
+#define BB_RESET
+#define BB_RM
+#define BB_RMDIR
+//#define BB_RMMOD
+//#define BB_ROUTE
+//#define BB_RPMUNPACK
+#define BB_SED
+//#define BB_SETKEYCODES
+#define BB_SH
+#define BB_SLEEP
+#define BB_SORT
+//#define BB_STTY
+#define BB_SWAPONOFF
+#define BB_SYNC
+#define BB_SYSLOGD
+#define BB_TAIL
+#define BB_TAR
+//#define BB_TEE
+//#define BB_TEST
+//#define BB_TELNET
+//#define BB_TFTP
+#define BB_TOUCH
+//#define BB_TR
+#define BB_TRUE_FALSE
+#define BB_TTY
+//#define BB_UUENCODE
+//#define BB_UUDECODE
+#define BB_UMOUNT
+#define BB_UNIQ
+#define BB_UNAME
+//#define BB_UPDATE
+#define BB_UPTIME
+//#define BB_USLEEP
+//#define BB_WATCHDOG
+#define BB_WC
+//#define BB_WGET
+#define BB_WHICH
+#define BB_WHOAMI
+#define BB_XARGS
+#define BB_YES
+// End of Applications List
+//
+//
+//
+//---------------------------------------------------
+// Nothing beyond this point should ever be touched by 
+// mere mortals so leave this stuff alone.
+// These interlocks cover the cases that affect selection
+// of applets or other files to compile and link.
+// It is allowed to depend on BB_FEATURE_FOO.
+//
+#if defined BB_MOUNT || defined BB_UMOUNT || defined BB_DF
+	#ifdef BB_FEATURE_MOUNT_MTAB_SUPPORT
+		#define BB_MTAB
+	#endif
+#else
+	#undef BB_MTAB
+#endif	
+//
+#if defined BB_SH
+	#if defined BB_FEATURE_COMMAND_EDITING 
+		#define BB_CMDEDIT
+	#endif
+#endif
+//
+#ifdef BB_KILLALL
+	#ifndef BB_KILL
+		#define BB_KILL
+	#endif
+#endif
+//
+#ifdef BB_GZIP
+	#ifndef BB_GUNZIP
+		#define BB_GUNZIP
+	#endif
+#endif
+//
+#ifdef BB_DPKG
+	#ifndef BB_DPKG_DEB
+		#define BB_DPKG_DEB
+	#endif
+#endif
+//
+#ifdef BB_DPKG_DEB
+	#ifndef BB_AR
+		#define BB_AR
+	#endif
+	#ifndef BB_TAR
+		#define BB_TAR
+	#endif 
+#endif
+//
+#ifdef BB_TAR
+	#ifdef BB_FEATURE_TAR_GZIP
+		#ifndef BB_GUNZIP
+			#define BB_GUNZIP
+		#endif
+	#endif
+#endif
+//
+#if defined BB_MOUNT && defined BB_FEATURE_NFSMOUNT
+	#define BB_NFSMOUNT
+#endif
+//
+#if defined BB_IFCONFIG
+	#ifdef BB_FEATURE_IFCONFIG_STATUS
+		#define BB_INTERFACE
+	#endif
+#else
+	#undef BB_INTERFACE
+#endif	
+//
+#ifdef BB_SYSLOGD
+	#if defined BB_FEATURE_IPC_SYSLOG
+		#define BB_LOGREAD
+	#endif
+#endif
+//
+#if defined BB_DOS2UNIX 
+	#define BB_UNIX2DOS
+#endif
diff -urN /home/ldoolitt/cvs/busybox/applets.c busybox-trial/applets.c
--- /home/ldoolitt/cvs/busybox/applets.c	Mon Mar 19 11:34:04 2001
+++ busybox-trial/applets.c	Thu Mar 22 09:47:00 2001
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "busybox.h"
+#include "applet_select.h"
 
 #undef APPLET
 #undef APPLET_NOUSAGE
diff -urN /home/ldoolitt/cvs/busybox/applets.h busybox-trial/applets.h
--- /home/ldoolitt/cvs/busybox/applets.h	Tue Mar 20 12:08:10 2001
+++ busybox-trial/applets.h	Thu Mar 22 10:08:19 2001
@@ -21,7 +21,7 @@
   #define APPLET_ODDNAME(a,b,c,d) extern int b(int argc, char **argv);
   extern const char usage_messages[];
 #elif defined(MAKE_USAGE)
-  #ifdef BB_FEATURE_TRIVIAL_HELP
+  #if defined PROTOTYPES || defined BB_FEATURE_TRIVIAL_HELP
     #define APPLET(a,b,c) a##_trivial_usage "\0"
     #define APPLET_NOUSAGE(a,b,c) "\0"
     #define APPLET_ODDNAME(a,b,c,d) d##_trivial_usage "\0"
@@ -43,395 +43,395 @@
 
 
 
-#ifdef BB_TEST
+#if defined PROTOTYPES || defined BB_TEST
 	APPLET_NOUSAGE("[", test_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_ADJTIMEX
+#if defined PROTOTYPES || defined BB_ADJTIMEX
 	APPLET(adjtimex, adjtimex_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_AR
+#if defined PROTOTYPES || defined BB_AR
 	APPLET(ar, ar_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_BASENAME
+#if defined PROTOTYPES || defined BB_BASENAME
 	APPLET(basename, basename_main, _BB_DIR_USR_BIN)
 #endif
 	APPLET_NOUSAGE("busybox", busybox_main, _BB_DIR_BIN)
-#ifdef BB_CAT
+#if defined PROTOTYPES || defined BB_CAT
 	APPLET(cat, cat_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_CHMOD_CHOWN_CHGRP
+#if defined PROTOTYPES || defined BB_CHMOD_CHOWN_CHGRP
 	APPLET(chgrp, chmod_chown_chgrp_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_CHMOD_CHOWN_CHGRP
+#if defined PROTOTYPES || defined BB_CHMOD_CHOWN_CHGRP
 	APPLET(chmod, chmod_chown_chgrp_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_CHMOD_CHOWN_CHGRP
+#if defined PROTOTYPES || defined BB_CHMOD_CHOWN_CHGRP
 	APPLET(chown, chmod_chown_chgrp_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_CHROOT
+#if defined PROTOTYPES || defined BB_CHROOT
 	APPLET(chroot, chroot_main, _BB_DIR_USR_SBIN)
 #endif
-#ifdef BB_CHVT
+#if defined PROTOTYPES || defined BB_CHVT
 	APPLET(chvt, chvt_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_CLEAR
+#if defined PROTOTYPES || defined BB_CLEAR
 	APPLET(clear, clear_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_CMP
+#if defined PROTOTYPES || defined BB_CMP
 	APPLET(cmp, cmp_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_CP_MV
+#if defined PROTOTYPES || defined BB_CP_MV
 	APPLET(cp, cp_mv_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_CUT
+#if defined PROTOTYPES || defined BB_CUT
 	APPLET(cut, cut_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_DATE
+#if defined PROTOTYPES || defined BB_DATE
 	APPLET(date, date_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_DC
+#if defined PROTOTYPES || defined BB_DC
 	APPLET(dc, dc_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_DD
+#if defined PROTOTYPES || defined BB_DD
 	APPLET(dd, dd_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_DEALLOCVT
+#if defined PROTOTYPES || defined BB_DEALLOCVT
 	APPLET(deallocvt, deallocvt_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_DF
+#if defined PROTOTYPES || defined BB_DF
 	APPLET(df, df_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_DIRNAME
+#if defined PROTOTYPES || defined BB_DIRNAME
 	APPLET(dirname, dirname_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_DMESG
+#if defined PROTOTYPES || defined BB_DMESG
 	APPLET(dmesg, dmesg_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_DOS2UNIX
+#if defined PROTOTYPES || defined BB_DOS2UNIX
 	APPLET(dos2unix, dos2unix_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_DPKG
+#if defined PROTOTYPES || defined BB_DPKG
 	APPLET(dpkg, dpkg_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_DPKG_DEB
+#if defined PROTOTYPES || defined BB_DPKG_DEB
 	APPLET_ODDNAME("dpkg-deb", dpkg_deb_main, _BB_DIR_USR_BIN, dpkg_deb)
 #endif
-#ifdef BB_DU
+#if defined PROTOTYPES || defined BB_DU
 	APPLET(du, du_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_DUMPKMAP
+#if defined PROTOTYPES || defined BB_DUMPKMAP
 	APPLET(dumpkmap, dumpkmap_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_DUTMP
+#if defined PROTOTYPES || defined BB_DUTMP
 	APPLET(dutmp, dutmp_main, _BB_DIR_USR_SBIN)
 #endif
-#ifdef BB_ECHO
+#if defined PROTOTYPES || defined BB_ECHO
 	APPLET(echo, echo_main, _BB_DIR_BIN)
 #endif
 #if defined(BB_FEATURE_GREP_EGREP_ALIAS) && defined(BB_GREP)
 	APPLET_NOUSAGE("egrep", grep_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_EXPR
+#if defined PROTOTYPES || defined BB_EXPR
 	APPLET(expr, expr_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_TRUE_FALSE
+#if defined PROTOTYPES || defined BB_TRUE_FALSE
 	APPLET(false, false_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_FBSET
+#if defined PROTOTYPES || defined BB_FBSET
 	APPLET(fbset, fbset_main, _BB_DIR_USR_SBIN)
 #endif
-#ifdef BB_FDFLUSH
+#if defined PROTOTYPES || defined BB_FDFLUSH
 	APPLET(fdflush, fdflush_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_FIND
+#if defined PROTOTYPES || defined BB_FIND
 	APPLET(find, find_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_FREE
+#if defined PROTOTYPES || defined BB_FREE
 	APPLET(free, free_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_FREERAMDISK
+#if defined PROTOTYPES || defined BB_FREERAMDISK
 	APPLET(freeramdisk, freeramdisk_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_FSCK_MINIX
+#if defined PROTOTYPES || defined BB_FSCK_MINIX
 	APPLET_ODDNAME("fsck.minix", fsck_minix_main, _BB_DIR_SBIN, fsck_minix)
 #endif
-#ifdef BB_GETOPT
+#if defined PROTOTYPES || defined BB_GETOPT
 	APPLET(getopt, getopt_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_GREP
+#if defined PROTOTYPES || defined BB_GREP
 	APPLET(grep, grep_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_GUNZIP
+#if defined PROTOTYPES || defined BB_GUNZIP
 	APPLET(gunzip, gunzip_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_GZIP
+#if defined PROTOTYPES || defined BB_GZIP
 	APPLET(gzip, gzip_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_HALT
+#if defined PROTOTYPES || defined BB_HALT
 	APPLET(halt, halt_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_HEAD
+#if defined PROTOTYPES || defined BB_HEAD
 	APPLET(head, head_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_HOSTID
+#if defined PROTOTYPES || defined BB_HOSTID
 	APPLET(hostid, hostid_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_HOSTNAME
+#if defined PROTOTYPES || defined BB_HOSTNAME
 	APPLET(hostname, hostname_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_ID
+#if defined PROTOTYPES || defined BB_ID
 	APPLET(id, id_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_IFCONFIG
+#if defined PROTOTYPES || defined BB_IFCONFIG
 	APPLET(ifconfig, ifconfig_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_INIT
+#if defined PROTOTYPES || defined BB_INIT
 	APPLET(init, init_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_INSMOD
+#if defined PROTOTYPES || defined BB_INSMOD
 	APPLET(insmod, insmod_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_KILL
+#if defined PROTOTYPES || defined BB_KILL
 	APPLET(kill, kill_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_KILLALL
+#if defined PROTOTYPES || defined BB_KILLALL
 	APPLET(killall, kill_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_KLOGD
+#if defined PROTOTYPES || defined BB_KLOGD
 	APPLET(klogd, klogd_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_LENGTH
+#if defined PROTOTYPES || defined BB_LENGTH
 	APPLET(length, length_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_FEATURE_LINUXRC
+#if defined PROTOTYPES || defined BB_FEATURE_LINUXRC
 	APPLET_NOUSAGE("linuxrc", init_main, _BB_DIR_ROOT)
 #endif
-#ifdef BB_LN
+#if defined PROTOTYPES || defined BB_LN
 	APPLET(ln, ln_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_LOADACM
+#if defined PROTOTYPES || defined BB_LOADACM
 	APPLET(loadacm, loadacm_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_LOADFONT
+#if defined PROTOTYPES || defined BB_LOADFONT
 	APPLET(loadfont, loadfont_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_LOADKMAP
+#if defined PROTOTYPES || defined BB_LOADKMAP
 	APPLET(loadkmap, loadkmap_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_LOGGER
+#if defined PROTOTYPES || defined BB_LOGGER
 	APPLET(logger, logger_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_LOGNAME
+#if defined PROTOTYPES || defined BB_LOGNAME
 	APPLET(logname, logname_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_LOGREAD
+#if defined PROTOTYPES || defined BB_LOGREAD
 	APPLET(logread, logread_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_LS
+#if defined PROTOTYPES || defined BB_LS
 	APPLET(ls, ls_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_LSMOD
+#if defined PROTOTYPES || defined BB_LSMOD
 	APPLET(lsmod, lsmod_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_MAKEDEVS
+#if defined PROTOTYPES || defined BB_MAKEDEVS
 	APPLET(makedevs, makedevs_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_MD5SUM
+#if defined PROTOTYPES || defined BB_MD5SUM
 	APPLET(md5sum, md5sum_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_MKDIR
+#if defined PROTOTYPES || defined BB_MKDIR
 	APPLET(mkdir, mkdir_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_MKFIFO
+#if defined PROTOTYPES || defined BB_MKFIFO
 	APPLET(mkfifo, mkfifo_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_MKFS_MINIX
+#if defined PROTOTYPES || defined BB_MKFS_MINIX
 	APPLET_ODDNAME("mkfs.minix", mkfs_minix_main, _BB_DIR_SBIN, mkfs_minix)
 #endif
-#ifdef BB_MKNOD
+#if defined PROTOTYPES || defined BB_MKNOD
 	APPLET(mknod, mknod_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_MKSWAP
+#if defined PROTOTYPES || defined BB_MKSWAP
 	APPLET(mkswap, mkswap_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_MKTEMP
+#if defined PROTOTYPES || defined BB_MKTEMP
 	APPLET(mktemp, mktemp_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_MORE
+#if defined PROTOTYPES || defined BB_MORE
 	APPLET(more, more_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_MOUNT
+#if defined PROTOTYPES || defined BB_MOUNT
 	APPLET(mount, mount_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_MT
+#if defined PROTOTYPES || defined BB_MT
 	APPLET(mt, mt_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_CP_MV
+#if defined PROTOTYPES || defined BB_CP_MV
 	APPLET(mv, cp_mv_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_NC
+#if defined PROTOTYPES || defined BB_NC
 	APPLET(nc, nc_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_NSLOOKUP
+#if defined PROTOTYPES || defined BB_NSLOOKUP
 	APPLET(nslookup, nslookup_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_PING
+#if defined PROTOTYPES || defined BB_PING
 	APPLET(ping, ping_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_PIVOT_ROOT
+#if defined PROTOTYPES || defined BB_PIVOT_ROOT
  	APPLET(pivot_root, pivot_root_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_POWEROFF
+#if defined PROTOTYPES || defined BB_POWEROFF
 	APPLET(poweroff, poweroff_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_PRINTF
+#if defined PROTOTYPES || defined BB_PRINTF
 	APPLET(printf, printf_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_PS
+#if defined PROTOTYPES || defined BB_PS
 	APPLET(ps, ps_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_PWD
+#if defined PROTOTYPES || defined BB_PWD
 	APPLET(pwd, pwd_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_RDATE
+#if defined PROTOTYPES || defined BB_RDATE
 	APPLET(rdate, rdate_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_READLINK
+#if defined PROTOTYPES || defined BB_READLINK
 	APPLET(readlink, readlink_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_REBOOT
+#if defined PROTOTYPES || defined BB_REBOOT
 	APPLET(reboot, reboot_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_RENICE
+#if defined PROTOTYPES || defined BB_RENICE
 	APPLET(renice, renice_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_RESET
+#if defined PROTOTYPES || defined BB_RESET
 	APPLET(reset, reset_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_RM
+#if defined PROTOTYPES || defined BB_RM
 	APPLET(rm, rm_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_RMDIR
+#if defined PROTOTYPES || defined BB_RMDIR
 	APPLET(rmdir, rmdir_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_RMMOD
+#if defined PROTOTYPES || defined BB_RMMOD
 	APPLET(rmmod, rmmod_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_ROUTE
+#if defined PROTOTYPES || defined BB_ROUTE
  	APPLET(route, route_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_RPMUNPACK
+#if defined PROTOTYPES || defined BB_RPMUNPACK
 	APPLET(rpmunpack, rpmunpack_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_SED
+#if defined PROTOTYPES || defined BB_SED
 	APPLET(sed, sed_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_SETKEYCODES
+#if defined PROTOTYPES || defined BB_SETKEYCODES
 	APPLET(setkeycodes, setkeycodes_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_SH
+#if defined PROTOTYPES || defined BB_SH
 	APPLET(sh, shell_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_SLEEP
+#if defined PROTOTYPES || defined BB_SLEEP
 	APPLET(sleep, sleep_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_SORT
+#if defined PROTOTYPES || defined BB_SORT
 	APPLET(sort, sort_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_STTY
+#if defined PROTOTYPES || defined BB_STTY
 	APPLET(stty, stty_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_SWAPONOFF
+#if defined PROTOTYPES || defined BB_SWAPONOFF
 	APPLET(swapoff, swap_on_off_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_SWAPONOFF
+#if defined PROTOTYPES || defined BB_SWAPONOFF
 	APPLET(swapon, swap_on_off_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_SYNC
+#if defined PROTOTYPES || defined BB_SYNC
 	APPLET(sync, sync_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_SYSLOGD
+#if defined PROTOTYPES || defined BB_SYSLOGD
 	APPLET(syslogd, syslogd_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_TAIL
+#if defined PROTOTYPES || defined BB_TAIL
 	APPLET(tail, tail_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_TAR
+#if defined PROTOTYPES || defined BB_TAR
 	APPLET(tar, tar_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_TEE
+#if defined PROTOTYPES || defined BB_TEE
 	APPLET(tee, tee_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_TELNET
+#if defined PROTOTYPES || defined BB_TELNET
 	APPLET(telnet, telnet_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_TEST
+#if defined PROTOTYPES || defined BB_TEST
 	APPLET(test, test_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_TFTP
+#if defined PROTOTYPES || defined BB_TFTP
 	APPLET(tftp, tftp_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_TOUCH
+#if defined PROTOTYPES || defined BB_TOUCH
 	APPLET(touch, touch_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_TR
+#if defined PROTOTYPES || defined BB_TR
 	APPLET(tr, tr_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_TRUE_FALSE
+#if defined PROTOTYPES || defined BB_TRUE_FALSE
 	APPLET(true, true_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_TTY
+#if defined PROTOTYPES || defined BB_TTY
 	APPLET(tty, tty_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_UMOUNT
+#if defined PROTOTYPES || defined BB_UMOUNT
 	APPLET(umount, umount_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_UNAME
+#if defined PROTOTYPES || defined BB_UNAME
 	APPLET(uname, uname_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_UNIQ
+#if defined PROTOTYPES || defined BB_UNIQ
 	APPLET(uniq, uniq_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_UNIX2DOS
+#if defined PROTOTYPES || defined BB_UNIX2DOS
 	APPLET(unix2dos, dos2unix_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_UPDATE
+#if defined PROTOTYPES || defined BB_UPDATE
 	APPLET(update, update_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_UPTIME
+#if defined PROTOTYPES || defined BB_UPTIME
 	APPLET(uptime, uptime_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_USLEEP
+#if defined PROTOTYPES || defined BB_USLEEP
 	APPLET(usleep, usleep_main, _BB_DIR_BIN)
 #endif
-#ifdef BB_UUDECODE
+#if defined PROTOTYPES || defined BB_UUDECODE
 	APPLET(uudecode, uudecode_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_UUENCODE
+#if defined PROTOTYPES || defined BB_UUENCODE
 	APPLET(uuencode, uuencode_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_WATCHDOG
+#if defined PROTOTYPES || defined BB_WATCHDOG
 	APPLET(watchdog, watchdog_main, _BB_DIR_SBIN)
 #endif
-#ifdef BB_WC
+#if defined PROTOTYPES || defined BB_WC
 	APPLET(wc, wc_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_WGET
+#if defined PROTOTYPES || defined BB_WGET
 	APPLET(wget, wget_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_WHICH
+#if defined PROTOTYPES || defined BB_WHICH
 	APPLET(which, which_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_WHOAMI
+#if defined PROTOTYPES || defined BB_WHOAMI
 	APPLET(whoami, whoami_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_XARGS
+#if defined PROTOTYPES || defined BB_XARGS
 	APPLET(xargs, xargs_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_YES
+#if defined PROTOTYPES || defined BB_YES
 	APPLET(yes, yes_main, _BB_DIR_USR_BIN)
 #endif
-#ifdef BB_GUNZIP
+#if defined PROTOTYPES || defined BB_GUNZIP
 	APPLET(zcat, gunzip_main, _BB_DIR_BIN)
 #endif
 
Binary files /home/ldoolitt/cvs/busybox/busybox and busybox-trial/busybox differ
diff -urN /home/ldoolitt/cvs/busybox/busybox.sh busybox-trial/busybox.sh
--- /home/ldoolitt/cvs/busybox/busybox.sh	Thu Mar  8 15:20:44 2001
+++ busybox-trial/busybox.sh	Thu Mar 22 10:35:43 2001
@@ -4,12 +4,12 @@
 export LC_CTYPE=POSIX
 
 RAW=` \
-    gcc -E -dM ${1:-Config.h} | \
+    gcc -E -dM -include ${1:-Config.h} ${2:-applet_select.h} | \
     sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\<BB_\(.*\)\>/\1.c/gp;' \
     | tr A-Z a-z | sort
 `
 test "${RAW}" != "" ||  exit
-cd ${2:-.}
+cd ${3:-.}
 # By running $RAW through "ls", we avoid listing
 # source files that don't exist.
 ls $RAW 2>/dev/null | tr '\n' ' '
diff -urN /home/ldoolitt/cvs/busybox/usage.c busybox-trial/usage.c
--- /home/ldoolitt/cvs/busybox/usage.c	Thu Feb 22 16:19:23 2001
+++ busybox-trial/usage.c	Thu Mar 22 09:47:17 2001
@@ -1,4 +1,5 @@
 #include "busybox.h"
+#include "applet_select.h"
 
 const char usage_messages[] =
 
