summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko2007-10-13 03:36:03 +0000
committerDenis Vlasenko2007-10-13 03:36:03 +0000
commit77f1ec1b9bf100e6c10aa0856c7156e321511785 (patch)
treef20e5a9062ecad82a43bde81e3041a19c4292733 /include
parent11c23d7b990eae27357e5a41a97d62b9a214f7db (diff)
downloadbusybox-77f1ec1b9bf100e6c10aa0856c7156e321511785.zip
busybox-77f1ec1b9bf100e6c10aa0856c7156e321511785.tar.gz
bzip2: port bzip2 1.0.4 to busybox. note: bzip2 code resides
in separate directory (archival/bz/*) and is covered by BSD-style license. code size: 13k
Diffstat (limited to 'include')
-rw-r--r--include/applets.h1
-rw-r--r--include/libbb.h3
-rw-r--r--include/platform.h6
-rw-r--r--include/usage.h14
4 files changed, 20 insertions, 4 deletions
diff --git a/include/applets.h b/include/applets.h
index ceab003..29a5d09 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -88,6 +88,7 @@ USE_BBCONFIG(APPLET(bbconfig, _BB_DIR_BIN, _BB_SUID_NEVER))
//USE_BBSH(APPLET(bbsh, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_BUNZIP2(APPLET(bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
USE_BUNZIP2(APPLET_ODDNAME(bzcat, bunzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER, bzcat))
+USE_BZIP2(APPLET(bzip2, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
USE_CAL(APPLET(cal, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
USE_CAT(APPLET_NOFORK(cat, cat, _BB_DIR_BIN, _BB_SUID_NEVER, cat))
USE_CATV(APPLET(catv, _BB_DIR_BIN, _BB_SUID_NEVER))
diff --git a/include/libbb.h b/include/libbb.h
index be548a3..af385e2 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -709,6 +709,9 @@ int chown_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
#if ENABLE_GUNZIP
int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
#endif
+#if ENABLE_BUNZIP2
+int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
+#endif
int bbunpack(char **argv,
char* (*make_new_name)(char *filename),
USE_DESKTOP(long long) int (*unpacker)(void)
diff --git a/include/platform.h b/include/platform.h
index 53d7282..edb0f8a 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -54,7 +54,8 @@
# define ATTRIBUTE_ALIGNED(m) __attribute__ ((__aligned__(m)))
# if __GNUC_PREREQ (3,0)
# define ALWAYS_INLINE __attribute__ ((always_inline)) inline
-# define NOINLINE __attribute__((noinline))
+/* I've seen a toolchain where I needed __noinline__ instead of noinline */
+# define NOINLINE __attribute__((__noinline__))
# if !ENABLE_WERROR
# define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
# define ATTRIBUTE_UNUSED_RESULT __attribute__ ((warn_unused_result))
@@ -63,7 +64,8 @@
# define ATTRIBUTE_UNUSED_RESULT /* n/a */
# endif
# else
-# define ALWAYS_INLINE inline
+# define ALWAYS_INLINE inline /* n/a */
+# define NOINLINE /* n/a */
# define ATTRIBUTE_DEPRECATED /* n/a */
# define ATTRIBUTE_UNUSED_RESULT /* n/a */
# endif
diff --git a/include/usage.h b/include/usage.h
index b53820d..4c697d3 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -127,6 +127,16 @@
" -c Write output to standard output\n" \
" -f Force"
+#define bzip2_trivial_usage \
+ "[OPTION]... [FILE]..."
+#define bzip2_full_usage \
+ "Compress FILE(s) with bzip2 algorithm.\n" \
+ "When FILE is '-' or unspecified, reads standard input. Implies -c." \
+ "\n\nOptions:\n" \
+ " -c Write output to standard output instead of FILE.bz\n" \
+ " -d Decompress\n" \
+ " -f Force"
+
#define busybox_notes_usage \
"Hello world!\n"
@@ -1201,7 +1211,7 @@
"Uncompress FILE (or standard input if FILE is '-')" \
"\n\nOptions:\n" \
" -c Write output to standard output\n" \
- " -f Force read when source is a terminal\n" \
+ " -f Force\n" \
" -t Test compressed file integrity"
#define gunzip_example_usage \
"$ ls -la /tmp/BusyBox*\n" \
@@ -1218,7 +1228,7 @@
"\n\nOptions:\n" \
" -c Write output to standard output instead of FILE.gz\n" \
" -d Decompress\n" \
- " -f Force write when destination is a terminal"
+ " -f Force"
#define gzip_example_usage \
"$ ls -la /tmp/busybox*\n" \
"-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/busybox.tar\n" \